diff --git a/Makefile b/Makefile index 02e9b4ae7..63d012e99 100644 --- a/Makefile +++ b/Makefile @@ -123,8 +123,12 @@ checkfmt: .PHONY: lint-dashboard lint-dashboard: prereqs - @echo "### Linting dashboard" - $(DASHBOARD_LINTER) lint grafana/dashboard.json + @echo "### Linting dashboard"; + @if [ "$(shell sh -c 'git ls-files --modified | grep grafana/dashboard.json ')" != "" ]; then \ + $(DASHBOARD_LINTER) lint --strict grafana/dashboard.json; \ + else \ + echo '(no git changes detected. Skipping)'; \ + fi .PHONY: lint lint: prereqs checkfmt diff --git a/bpf/flow.h b/bpf/flow.h index ad009c2b5..383d347b2 100644 --- a/bpf/flow.h +++ b/bpf/flow.h @@ -46,6 +46,8 @@ typedef struct flow_metrics_t { u16 flags; // direction of the flow EGRESS / INGRESS u8 direction; + // who initiated of the connection: INITIATOR_SRC or INITIATOR_DST + u8 initiator; // The positive errno of a failed map insertion that caused a flow // to be sent via ringbuffer. // 0 otherwise diff --git a/bpf/flows.c b/bpf/flows.c index 23e671a87..4c7ea5a8e 100644 --- a/bpf/flows.c +++ b/bpf/flows.c @@ -195,6 +195,7 @@ static inline int flow_monitor(struct __sk_buff *skb) { .end_mono_time_ns = current_time, .flags = flags, .direction = UNKNOWN, + .initiator = INITIATOR_UNKNOWN, }; u8 *direction = (u8 *)bpf_map_lookup_elem(&flow_directions, &id); @@ -225,6 +226,8 @@ static inline int flow_monitor(struct __sk_buff *skb) { new_flow.direction = *direction; } + new_flow.initiator = get_connection_initiator(&id, flags); + // even if we know that the entry is new, another CPU might be concurrently inserting a flow // so we need to specify BPF_ANY long ret = bpf_map_update_elem(&aggregated_flows, &id, &new_flow, BPF_ANY); diff --git a/bpf/flows_common.h b/bpf/flows_common.h index 59fa3f508..8ed3ac8dc 100644 --- a/bpf/flows_common.h +++ b/bpf/flows_common.h @@ -31,6 +31,16 @@ #define FIN_ACK_FLAG 0x200 #define RST_ACK_FLAG 0x400 +// In conn_initiator_key, which sorted ip:port inititated the connection +#define INITIATOR_LOW 1 +#define INITIATOR_HIGH 2 + +// In flow_metrics, who initiated the connection +#define INITIATOR_SRC 1 +#define INITIATOR_DST 2 + +#define INITIATOR_UNKNOWN 0 + // Common Ringbuffer as a conduit for ingress/egress flows to userspace struct { __uint(type, BPF_MAP_TYPE_RINGBUF); @@ -47,16 +57,138 @@ struct { // Key: the flow identifier. Value: the flow direction. struct { - __uint(type, BPF_MAP_TYPE_LRU_HASH); - __type(key, flow_id); - __type(value, u8); + __uint(type, BPF_MAP_TYPE_LRU_HASH); + __type(key, flow_id); + __type(value, u8); } flow_directions SEC(".maps"); +// To know who initiated each connection, we store the src/dst ip:ports but ordered +// by numeric value of the IP (and port as secondary criteria), so the key is consistent +// for either client and server flows. +typedef struct conn_initiator_key_t { + struct in6_addr low_ip; + struct in6_addr high_ip; + u16 low_ip_port; + u16 high_ip_port; +} __attribute__((packed)) conn_initiator_key; + +// Key: the flow identifier. +// Value: the connection initiator index (INITIATOR_LOW, INITIATOR_HIGH). +struct { + __uint(type, BPF_MAP_TYPE_LRU_HASH); + __type(key, conn_initiator_key); + __type(value, u8); +} conn_initiators SEC(".maps"); + const u8 ip4in6[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff}; // Constant definitions, to be overridden by the invoker volatile const u32 sampling = 0; volatile const u8 trace_messages = 0; +// we can safely assume that the passed address is IPv6 as long as we encode IPv4 +// as IPv6 during the creation of the flow_id. +static inline s32 compare_ipv6(flow_id *fid) { + for (int i = 0; i < 4; i++) { + s32 diff = fid->src_ip.in6_u.u6_addr32[i] - fid->dst_ip.in6_u.u6_addr32[i]; + if (diff != 0) { + return diff; + } + } + return 0; +} + +// creates a key that is consistent for both requests and responses, by +// ordering endpoints (ip:port) numerically into a lower and a higher endpoint. +// returns true if the lower address corresponds to the source address +// (false if the lower address corresponds to the destination address) +static inline u8 fill_conn_initiator_key(flow_id *id, conn_initiator_key *key) { + s32 cmp = compare_ipv6(id); + if (cmp < 0) { + __builtin_memcpy(&key->low_ip, &id->src_ip, sizeof(struct in6_addr)); + key->low_ip_port = id->src_port; + __builtin_memcpy(&key->high_ip, &id->dst_ip, sizeof(struct in6_addr)); + key->high_ip_port = id->dst_port; + return 1; + } + // if the IPs are equal (cmp == 0) we will use the ports as secondary order criteria + __builtin_memcpy(&key->high_ip, &id->src_ip, sizeof(struct in6_addr)); + __builtin_memcpy(&key->low_ip, &id->dst_ip, sizeof(struct in6_addr)); + if (cmp > 0 || id->src_port > id->dst_port) { + key->high_ip_port = id->src_port; + key->low_ip_port = id->dst_port; + return 0; + } + key->low_ip_port = id->src_port; + key->high_ip_port = id->dst_port; + return 1; +} + +// returns INITIATOR_SRC or INITIATOR_DST, but might return INITIATOR_UNKNOWN +// if the connection initiator couldn't be found. The user-space Beyla pipeline +// will handle this last case heuristically +static inline u8 get_connection_initiator(flow_id *id, u16 flags) { + conn_initiator_key initiator_key; + // from the initiator_key with sorted ip/ports, know the index of the + // endpoint that that initiated the connection, which might be the low or the high address + u8 low_is_src = fill_conn_initiator_key(id, &initiator_key); + u8 *initiator = (u8 *)bpf_map_lookup_elem(&conn_initiators, &initiator_key); + u8 initiator_index = INITIATOR_UNKNOWN; + if (initiator == NULL) { + // SYN and ACK is sent from the server to the client + // The initiator is the destination address + if ((flags & (SYN_FLAG | ACK_FLAG)) == (SYN_FLAG | ACK_FLAG)) { + if (low_is_src) { + initiator_index = INITIATOR_HIGH; + } else { + initiator_index = INITIATOR_LOW; + } + } + // SYN is sent from the client to the server. + // The initiator is the source address + else if (flags & SYN_FLAG) { + if (low_is_src) { + initiator_index = INITIATOR_LOW; + } else { + initiator_index = INITIATOR_HIGH; + } + } + + if (initiator_index != INITIATOR_UNKNOWN) { + bpf_map_update_elem(&conn_initiators, &initiator_key, &initiator_index, BPF_NOEXIST); + } + } else { + initiator_index = *initiator; + } + + // when flow receives FIN or RST, clean flow_directions + if (flags & FIN_FLAG || flags & RST_FLAG || flags & FIN_ACK_FLAG || flags & RST_ACK_FLAG) { + bpf_map_delete_elem(&conn_initiators, &initiator_key); + } + + u8 flow_initiator = INITIATOR_UNKNOWN; + // at this point, we should know the index of the endpoint that initiated the connection. + // Then we accordingly set whether the initiator is the source or the destination address. + // If not, we forward the unknown status and the userspace will take + // heuristic actions to guess who is + switch (initiator_index) { + case INITIATOR_LOW: + if (low_is_src) { + flow_initiator = INITIATOR_SRC; + } else { + flow_initiator = INITIATOR_DST; + } + break; + case INITIATOR_HIGH: + if (low_is_src) { + flow_initiator = INITIATOR_DST; + } else { + flow_initiator = INITIATOR_SRC; + } + break; + } + + return flow_initiator; +} #endif //__FLOW_HELPERS_H__ \ No newline at end of file diff --git a/bpf/flows_sock.c b/bpf/flows_sock.c index 31d0f4acb..6fdccdc1b 100644 --- a/bpf/flows_sock.c +++ b/bpf/flows_sock.c @@ -241,6 +241,8 @@ int socket__http_filter(struct __sk_buff *skb) { new_flow.direction = *direction; } + new_flow.initiator = get_connection_initiator(&id, flags); + // even if we know that the entry is new, another CPU might be concurrently inserting a flow // so we need to specify BPF_ANY long ret = bpf_map_update_elem(&aggregated_flows, &id, &new_flow, BPF_ANY); diff --git a/bpf/go_common.h b/bpf/go_common.h index 5a98ae665..12ebd57b7 100644 --- a/bpf/go_common.h +++ b/bpf/go_common.h @@ -228,7 +228,7 @@ static __always_inline void read_ip_and_port(u8 *dst_ip, u16 *dst_port, void *sr } } -static __always_inline void get_conn_info_from_fd(void *fd_ptr, connection_info_t *info) { +static __always_inline u8 get_conn_info_from_fd(void *fd_ptr, connection_info_t *info) { if (fd_ptr) { void *laddr_ptr = 0; void *raddr_ptr = 0; @@ -251,20 +251,26 @@ static __always_inline void get_conn_info_from_fd(void *fd_ptr, connection_info_ // in Go we keep the original connection info order, since we only need it // sorted when we make server requests or when we populate the trace_map for // black box context propagation. + + return 1; } } + + return 0; } // HTTP black-box context propagation -static __always_inline void get_conn_info(void *conn_ptr, connection_info_t *info) { +static __always_inline u8 get_conn_info(void *conn_ptr, connection_info_t *info) { if (conn_ptr) { void *fd_ptr = 0; bpf_probe_read(&fd_ptr, sizeof(fd_ptr), (void *)(conn_ptr + conn_fd_pos)); // find fd bpf_dbg_printk("Found fd ptr %llx", fd_ptr); - get_conn_info_from_fd(fd_ptr, info); + return get_conn_info_from_fd(fd_ptr, info); } + + return 0; } #endif // GO_COMMON_H diff --git a/bpf/go_grpc.c b/bpf/go_grpc.c index ce2ea3e74..63b928833 100644 --- a/bpf/go_grpc.c +++ b/bpf/go_grpc.c @@ -188,8 +188,7 @@ int uprobe_server_handleStream_return(struct pt_regs *ctx) { bpf_probe_read(&conn_conn_ptr, sizeof(conn_conn_ptr), conn_ptr + 8); bpf_dbg_printk("conn_conn_ptr %llx", conn_conn_ptr); if (conn_conn_ptr) { - get_conn_info(conn_conn_ptr, &trace->conn); - found_conn = 1; + found_conn = get_conn_info(conn_conn_ptr, &trace->conn); } } } @@ -431,8 +430,10 @@ int uprobe_transport_http2Client_NewStream(struct pt_regs *ctx) { bpf_dbg_printk("conn_conn_ptr %llx", conn_conn_ptr); if (conn_conn_ptr) { connection_info_t conn = {0}; - get_conn_info(conn_conn_ptr, &conn); - bpf_map_update_elem(&ongoing_client_connections, &goroutine_addr, &conn, BPF_ANY); + u8 ok = get_conn_info(conn_conn_ptr, &conn); + if (ok) { + bpf_map_update_elem(&ongoing_client_connections, &goroutine_addr, &conn, BPF_ANY); + } } } diff --git a/bpf/go_kafka_go.c b/bpf/go_kafka_go.c index f4d7a5391..c0aebadf2 100644 --- a/bpf/go_kafka_go.c +++ b/bpf/go_kafka_go.c @@ -191,7 +191,10 @@ int uprobe_protocol_roundtrip_ret(struct pt_regs *ctx) { bpf_probe_read(&conn_ptr, sizeof(conn_ptr), (void *)(p_ptr->conn_ptr + 8)); // find conn bpf_dbg_printk("conn ptr %llx", conn_ptr); if (conn_ptr) { - get_conn_info(conn_ptr, &trace->conn); + u8 ok = get_conn_info(conn_ptr, &trace->conn); + if (!ok) { + __builtin_memset(&trace->conn, 0, sizeof(connection_info_t)); + } } __builtin_memcpy(trace->topic, topic_ptr->name, MAX_TOPIC_NAME_LEN); @@ -237,7 +240,10 @@ int uprobe_reader_read(struct pt_regs *ctx) { bpf_probe_read(&conn_ptr, sizeof(conn_ptr), (void *)(conn + 8)); // find conn bpf_dbg_printk("conn ptr %llx", conn_ptr); if (conn_ptr) { - get_conn_info(conn_ptr, &r.conn); + u8 ok = get_conn_info(conn_ptr, &r.conn); + if (!ok) { + __builtin_memset(&r.conn, 0, sizeof(connection_info_t)); + } } } diff --git a/bpf/go_nethttp.c b/bpf/go_nethttp.c index 02abfde5d..28e6f2b53 100644 --- a/bpf/go_nethttp.c +++ b/bpf/go_nethttp.c @@ -246,8 +246,7 @@ int uprobe_ServeHTTPReturns(struct pt_regs *ctx) { bpf_probe_read(&conn_conn_conn_ptr, sizeof(conn_conn_conn_ptr), conn_conn_ptr + 8); bpf_dbg_printk("conn_conn_conn_ptr %llx", conn_conn_conn_ptr); - get_conn_info(conn_conn_conn_ptr, &trace->conn); - found_conn = 1; + found_conn = get_conn_info(conn_conn_conn_ptr, &trace->conn); } } @@ -276,9 +275,10 @@ int uprobe_ServeHTTPReturns(struct pt_regs *ctx) { void *conn_ptr = 0; bpf_probe_read(&conn_ptr, sizeof(conn_ptr), (void *)(rwc_ptr + rwc_conn_pos)); // find conn if (conn_ptr) { - get_conn_info(conn_ptr, &trace->conn); - found = 1; - bpf_dbg_printk("found backup connection info"); + found = get_conn_info(conn_ptr, &trace->conn); + if (found) { + bpf_dbg_printk("found backup connection info"); + } //dbg_print_http_connection_info(&conn); } } @@ -644,12 +644,14 @@ int uprobe_http2RoundTrip(struct pt_regs *ctx) { bpf_dbg_printk("tconn_conn %llx", tconn_conn); connection_info_t conn = {0}; - get_conn_info(tconn_conn, &conn); + u8 ok = get_conn_info(tconn_conn, &conn); - void *goroutine_addr = GOROUTINE_PTR(ctx); - bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); + if (ok) { + void *goroutine_addr = GOROUTINE_PTR(ctx); + bpf_dbg_printk("goroutine_addr %lx", goroutine_addr); - bpf_map_update_elem(&ongoing_client_connections, &goroutine_addr, &conn, BPF_ANY); + bpf_map_update_elem(&ongoing_client_connections, &goroutine_addr, &conn, BPF_ANY); + } } #ifndef NO_HEADER_PROPAGATION @@ -857,7 +859,7 @@ int uprobe_netFdRead(struct pt_regs *ctx) { bpf_dbg_printk("Found existing server connection, parsing FD information for socket tuples, %llx", goroutine_addr); void *fd_ptr = GO_PARAM1(ctx); - get_conn_info_from_fd(fd_ptr, conn); + get_conn_info_from_fd(fd_ptr, conn); // ok to not check the result, we leave it as 0 //dbg_print_http_connection_info(conn); } @@ -895,7 +897,7 @@ int uprobe_persistConnRoundTrip(struct pt_regs *ctx) { bpf_probe_read(&conn_ptr, sizeof(conn_ptr), (void *)(conn_conn_ptr + rwc_conn_pos)); // find conn if (conn_ptr) { connection_info_t conn = {0}; - get_conn_info(conn_ptr, &conn); + get_conn_info(conn_ptr, &conn); // initialized to 0, no need to check the result if we succeeded u64 pid_tid = bpf_get_current_pid_tgid(); u32 pid = pid_from_pid_tgid(pid_tid); tp_info_pid_t tp_p = { diff --git a/bpf/go_redis.c b/bpf/go_redis.c index aa9f52b88..a9b140935 100644 --- a/bpf/go_redis.c +++ b/bpf/go_redis.c @@ -115,7 +115,10 @@ int uprobe_redis_with_writer(struct pt_regs *ctx) { bpf_probe_read(&conn_ptr, sizeof(conn_ptr), (void *)(tcp_conn_ptr + 8)); // find conn bpf_dbg_printk("conn ptr %llx", conn_ptr); if (conn_ptr) { - get_conn_info(conn_ptr, &req->conn); + u8 ok = get_conn_info(conn_ptr, &req->conn); + if (!ok) { + __builtin_memset(&req->conn, 0, sizeof(connection_info_t)); + } } } } diff --git a/bpf/go_sarama.c b/bpf/go_sarama.c index 9dab2dfd3..d7fecd72f 100644 --- a/bpf/go_sarama.c +++ b/bpf/go_sarama.c @@ -101,7 +101,10 @@ int uprobe_sarama_broker_write(struct pt_regs *ctx) { bpf_probe_read(&conn_ptr, sizeof(conn_ptr), (void *)(tcp_conn_ptr + 8)); // find conn bpf_dbg_printk("conn ptr %llx", conn_ptr); if (conn_ptr) { - get_conn_info(conn_ptr, &req.conn); + u8 ok = get_conn_info(conn_ptr, &req.conn); + if (!ok) { + __builtin_memset(&req.conn, 0, sizeof(connection_info_t)); + } } } } diff --git a/examples/quickstart/golang/golang b/examples/quickstart/golang/golang new file mode 100755 index 000000000..3d37bd08e Binary files /dev/null and b/examples/quickstart/golang/golang differ diff --git a/go.mod b/go.mod index 98ef55c96..69d4ef345 100644 --- a/go.mod +++ b/go.mod @@ -4,9 +4,6 @@ go 1.22 require ( github.com/AlessandroPomponio/go-gibberish v0.0.0-20191004143433-a2d4156f0396 - github.com/aws/aws-sdk-go-v2 v1.25.2 - github.com/aws/aws-sdk-go-v2/credentials v1.17.4 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.149.1 github.com/caarlos0/env/v9 v9.0.0 github.com/cilium/ebpf v0.12.3 github.com/gavv/monotime v0.0.0-20190418164738-30dba4353424 @@ -23,7 +20,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.19.1 github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.53.0 + github.com/prometheus/common v0.54.0 github.com/prometheus/procfs v0.15.0 github.com/shirou/gopsutil/v3 v3.24.4 github.com/stretchr/testify v1.9.0 @@ -31,65 +28,61 @@ require ( github.com/vladimirvivien/gexe v0.2.0 github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2 github.com/yl2chen/cidranger v1.0.2 - go.opentelemetry.io/collector/component v0.102.1 - go.opentelemetry.io/collector/config/configgrpc v0.102.1 - go.opentelemetry.io/collector/config/confighttp v0.102.1 - go.opentelemetry.io/collector/config/configopaque v1.9.0 - go.opentelemetry.io/collector/config/configretry v0.102.1 - go.opentelemetry.io/collector/config/configtelemetry v0.102.1 - go.opentelemetry.io/collector/config/configtls v0.102.1 - go.opentelemetry.io/collector/consumer v0.102.1 - go.opentelemetry.io/collector/exporter v0.102.1 - go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 - go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1 - go.opentelemetry.io/collector/pdata v1.9.0 - go.opentelemetry.io/otel v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 - go.opentelemetry.io/otel/metric v1.27.0 - go.opentelemetry.io/otel/sdk v1.27.0 - go.opentelemetry.io/otel/sdk/metric v1.27.0 - go.opentelemetry.io/otel/trace v1.27.0 + go.opentelemetry.io/collector/component v0.104.0 + go.opentelemetry.io/collector/config/configgrpc v0.104.0 + go.opentelemetry.io/collector/config/confighttp v0.104.0 + go.opentelemetry.io/collector/config/configopaque v1.11.0 + go.opentelemetry.io/collector/config/configretry v1.11.0 + go.opentelemetry.io/collector/config/configtelemetry v0.104.0 + go.opentelemetry.io/collector/config/configtls v0.104.0 + go.opentelemetry.io/collector/consumer v0.104.0 + go.opentelemetry.io/collector/exporter v0.104.0 + go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 + go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 + go.opentelemetry.io/collector/pdata v1.11.0 + go.opentelemetry.io/contrib/detectors/aws/eks v1.28.0 + go.opentelemetry.io/otel v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 + go.opentelemetry.io/otel/metric v1.28.0 + go.opentelemetry.io/otel/sdk v1.28.0 + go.opentelemetry.io/otel/sdk/metric v1.28.0 + go.opentelemetry.io/otel/trace v1.28.0 go.uber.org/zap v1.27.0 golang.org/x/arch v0.7.0 - golang.org/x/mod v0.15.0 - golang.org/x/net v0.25.0 - golang.org/x/sys v0.20.0 + golang.org/x/mod v0.17.0 + golang.org/x/net v0.26.0 + golang.org/x/sys v0.21.0 google.golang.org/grpc v1.64.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 - k8s.io/api v0.29.3 - k8s.io/apimachinery v0.29.3 - k8s.io/client-go v0.29.3 + k8s.io/api v0.29.4 + k8s.io/apimachinery v0.29.4 + k8s.io/client-go v0.29.4 sigs.k8s.io/e2e-framework v0.3.0 ) -replace go.opentelemetry.io/otel => github.com/grafana/opentelemetry-go v1.27.0-grafana.1 +replace go.opentelemetry.io/otel => github.com/grafana/opentelemetry-go v1.28.0-grafana.2 -replace go.opentelemetry.io/otel/metric => github.com/grafana/opentelemetry-go/metric v1.27.0-grafana.1 +replace go.opentelemetry.io/otel/metric => github.com/grafana/opentelemetry-go/metric v1.28.0-grafana.2 -replace go.opentelemetry.io/otel/trace => github.com/grafana/opentelemetry-go/trace v1.27.0-grafana.1 +replace go.opentelemetry.io/otel/trace => github.com/grafana/opentelemetry-go/trace v1.28.0-grafana.2 -replace go.opentelemetry.io/otel/sdk => github.com/grafana/opentelemetry-go/sdk v1.27.0-grafana.1 +replace go.opentelemetry.io/otel/sdk => github.com/grafana/opentelemetry-go/sdk v1.28.0-grafana.2 -replace go.opentelemetry.io/otel/sdk/metric => github.com/grafana/opentelemetry-go/sdk/metric v1.27.0-grafana.1 +replace go.opentelemetry.io/otel/sdk/metric => github.com/grafana/opentelemetry-go/sdk/metric v1.28.0-grafana.2 require ( - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 // indirect - github.com/aws/smithy-go v1.20.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bytedance/sonic v1.9.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.1 // indirect github.com/evanphx/json-patch v4.12.0+incompatible // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -98,9 +91,9 @@ require ( github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-openapi/jsonpointer v0.21.0 // indirect + github.com/go-openapi/jsonreference v0.21.0 // indirect + github.com/go-openapi/swag v0.23.0 // indirect github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.14.0 // indirect @@ -115,10 +108,9 @@ require ( github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect github.com/hashicorp/go-version v1.7.0 // indirect github.com/imdario/mergo v0.3.15 // indirect - github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.8 // indirect + github.com/klauspost/compress v1.17.9 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect @@ -132,7 +124,7 @@ require ( github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mostynb/go-grpc-compression v1.2.2 // indirect + github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect @@ -147,34 +139,34 @@ require ( github.com/ugorji/go/codec v1.2.11 // indirect github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect - go.opentelemetry.io/collector v0.102.1 // indirect - go.opentelemetry.io/collector/config/configauth v0.102.1 // indirect - go.opentelemetry.io/collector/config/configcompression v1.9.0 // indirect - go.opentelemetry.io/collector/config/confignet v0.102.1 // indirect - go.opentelemetry.io/collector/config/internal v0.102.1 // indirect - go.opentelemetry.io/collector/confmap v0.102.1 // indirect - go.opentelemetry.io/collector/extension v0.102.1 // indirect - go.opentelemetry.io/collector/extension/auth v0.102.1 // indirect - go.opentelemetry.io/collector/featuregate v1.9.0 // indirect + go.opentelemetry.io/collector v0.104.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.104.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.11.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.104.0 // indirect + go.opentelemetry.io/collector/config/internal v0.104.0 // indirect + go.opentelemetry.io/collector/confmap v0.104.0 // indirect + go.opentelemetry.io/collector/extension v0.104.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.104.0 // indirect + go.opentelemetry.io/collector/featuregate v1.11.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect + go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.24.0 // indirect golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 // indirect - golang.org/x/oauth2 v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect - golang.org/x/time v0.3.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 // indirect + golang.org/x/oauth2 v0.21.0 // indirect + golang.org/x/term v0.21.0 // indirect + golang.org/x/text v0.16.0 // indirect + golang.org/x/time v0.5.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - k8s.io/klog/v2 v2.110.1 // indirect - k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + k8s.io/klog/v2 v2.130.1 // indirect + k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b // indirect + k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect sigs.k8s.io/controller-runtime v0.15.1 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index e2b45ff5e..4861f97ed 100644 --- a/go.sum +++ b/go.sum @@ -2,22 +2,6 @@ github.com/AlessandroPomponio/go-gibberish v0.0.0-20191004143433-a2d4156f0396 h1 github.com/AlessandroPomponio/go-gibberish v0.0.0-20191004143433-a2d4156f0396/go.mod h1:2VCDG9kHYQ5vfYUqeoB7foVlcvIvB7rp9LxTELLD1qU= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/aws/aws-sdk-go-v2 v1.25.2 h1:/uiG1avJRgLGiQM9X3qJM8+Qa6KRGK5rRPuXE0HUM+w= -github.com/aws/aws-sdk-go-v2 v1.25.2/go.mod h1:Evoc5AsmtveRt1komDwIsjHFyrP5tDuF1D1U+6z6pNo= -github.com/aws/aws-sdk-go-v2/credentials v1.17.4 h1:h5Vztbd8qLppiPwX+y0Q6WiwMZgpd9keKe2EAENgAuI= -github.com/aws/aws-sdk-go-v2/credentials v1.17.4/go.mod h1:+30tpwrkOgvkJL1rUZuRLoxcJwtI/OkeBLYnHxJtVe0= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 h1:bNo4LagzUKbjdxE0tIcR9pMzLR2U/Tgie1Hq1HQ3iH8= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2/go.mod h1:wRQv0nN6v9wDXuWThpovGQjqF1HFdcgWjporw14lS8k= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 h1:EtOU5jsPdIQNP+6Q2C5e3d65NKT1PeCiQk+9OdzO12Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2/go.mod h1:tyF5sKccmDz0Bv4NrstEr+/9YkSPJHrcO7UsUKf7pWM= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.149.1 h1:OGZUMBYZnz+R5nkW6FS1J8UlfLeM/pKojck+74+ZQGY= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.149.1/go.mod h1:XxJNg7fIkR8cbm89i0zVZSxKpcPYsC8BWRwMIJOWbnk= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 h1:EyBZibRTVAs6ECHZOw5/wlylS9OcTzwyjeQMudmREjE= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1/go.mod h1:JKpmtYhhPs7D97NL/ltqz7yCkERFW5dOlHyVl66ZYF8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 h1:5ffmXjPtwRExp1zc7gENLgCPyHFbhEPwVTkTiH9niSk= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2/go.mod h1:Ru7vg1iQ7cR4i7SZ/JTLYN9kaXtbL69UdgG0OQWQxW0= -github.com/aws/smithy-go v1.20.1 h1:4SZlSlMr36UEqC7XOyRVb27XMeZubNcBNN+9IgEPIQw= -github.com/aws/smithy-go v1.20.1/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= @@ -34,12 +18,11 @@ github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhD github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= github.com/cilium/ebpf v0.12.3 h1:8ht6F9MquybnY97at+VDZb3eQQr8ev79RueWeVaEcG4= github.com/cilium/ebpf v0.12.3/go.mod h1:TctK1ivibvI3znr66ljgi4hqOT8EYQjz1KWBfb1UVgM= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU= +github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= @@ -59,7 +42,6 @@ github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= @@ -68,12 +50,12 @@ github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= -github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= @@ -83,7 +65,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91 github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= @@ -105,8 +88,8 @@ github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= +github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= @@ -116,16 +99,16 @@ github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWm github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grafana/go-offsets-tracker v0.1.7 h1:2zBQ7iiGzvyXY7LA8kaaSiEqH/Yx82UcfRabbY5aOG4= github.com/grafana/go-offsets-tracker v0.1.7/go.mod h1:qcQdu7zlUKIFNUdBJlLyNHuJGW0SKWKjkrN6jtt+jds= -github.com/grafana/opentelemetry-go v1.27.0-grafana.1 h1:C7zzm8GaQH7LQU4jnLbF6UJczv0Oe5cgiualNm5ifZo= -github.com/grafana/opentelemetry-go v1.27.0-grafana.1/go.mod h1:DMpAK8fzYRzs+bi3rS5REupisuqTheUlSZJ1WnZaPAQ= -github.com/grafana/opentelemetry-go/metric v1.27.0-grafana.1 h1:rVI0qUyjlYIwdl0EWHcHNdhdkftekmV0vYdoKePl9+U= -github.com/grafana/opentelemetry-go/metric v1.27.0-grafana.1/go.mod h1:mVFgmRlhljgBiuk/MP/oKylr4hs85GZAylncepAX/ak= -github.com/grafana/opentelemetry-go/sdk v1.27.0-grafana.1 h1:WdKFfSBQ9JI+FshIFQHoew5e8naSXoI1ISX/IY6V9rk= -github.com/grafana/opentelemetry-go/sdk v1.27.0-grafana.1/go.mod h1:Ha9vbLwJE6W86YstIywK2xFfPjbWlCuwPtMkKdz/Y4A= -github.com/grafana/opentelemetry-go/sdk/metric v1.27.0-grafana.1 h1:iGv2+T3PyGMN+SBRh11kIyLAw2q7bvrKVqO4zrU+gTI= -github.com/grafana/opentelemetry-go/sdk/metric v1.27.0-grafana.1/go.mod h1:we7jJVrYN2kh3mVBlswtPU22K0SA+769l93J6bsyvqw= -github.com/grafana/opentelemetry-go/trace v1.27.0-grafana.1 h1:b4w6laH2s/bB/+VFO4DXrficMaDLRW2LnS3/KPJHE+0= -github.com/grafana/opentelemetry-go/trace v1.27.0-grafana.1/go.mod h1:6RiD1hkAprV4/q+yd2ln1HG9GoPx39SuvvstaLBl+l4= +github.com/grafana/opentelemetry-go v1.28.0-grafana.2 h1:GmGMrL4hOW9i2djP9kpU2626UJaoao1zbVZGuuC/Tgg= +github.com/grafana/opentelemetry-go v1.28.0-grafana.2/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +github.com/grafana/opentelemetry-go/metric v1.28.0-grafana.2 h1:AE5qDMRN0rtX9srQ+Gzuddww23QbVHS/rSATmeV1+CI= +github.com/grafana/opentelemetry-go/metric v1.28.0-grafana.2/go.mod h1:Fb1eVBFZmLVTMb6PPohq3TO9IIhUisDsbJoL/+uQW4s= +github.com/grafana/opentelemetry-go/sdk v1.28.0-grafana.2 h1:1v9geetSasMpacuJ8RuQXAAKSuh0aJkBrwK3u/Yppe8= +github.com/grafana/opentelemetry-go/sdk v1.28.0-grafana.2/go.mod h1:oYj7ClPUA7Iw3m+r7GeEjz0qckQRJK2B8zjcZEfu7Pg= +github.com/grafana/opentelemetry-go/sdk/metric v1.28.0-grafana.2 h1:3Ct2TlVvGdra2vkMoqmeDA0vltaV7nLEWrm7QMDOs4Q= +github.com/grafana/opentelemetry-go/sdk/metric v1.28.0-grafana.2/go.mod h1:cWPjykihLAPvXKi4iZc1dpER3Jdq2Z0YLse3moQUCpg= +github.com/grafana/opentelemetry-go/trace v1.28.0-grafana.2 h1:8fKddaX8cHH5bFt4xQXMVZsg3IfLZyRmJRPrbVhUHt4= +github.com/grafana/opentelemetry-go/trace v1.28.0-grafana.2/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= @@ -135,18 +118,14 @@ github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyf github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM= github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= -github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= -github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= -github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU= -github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= +github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= +github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= @@ -156,11 +135,8 @@ github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPgh github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= github.com/knadh/koanf/v2 v2.1.1 h1:/R8eXqasSTsmDCsAyYj+81Wteg8AqrV9CP6gvsTsOmM= github.com/knadh/koanf/v2 v2.1.1/go.mod h1:4mnTRbZCK+ALuBXHZMjDfG9y714L7TykVnZkXbMU3Es= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= @@ -186,16 +162,16 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= -github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= +github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= +github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= -github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= -github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= -github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/onsi/ginkgo/v2 v2.17.2 h1:7eMhcy3GimbsA3hEnVKdw/PQM9XN9krpKVXsZdph0/g= +github.com/onsi/ginkgo/v2 v2.17.2/go.mod h1:nP2DPOQoNsQmsVyv5rDA8JkXQoCs6goXIvr/PRJ1eCc= +github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= +github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -209,8 +185,8 @@ github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQ github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.53.0 h1:U2pL9w9nmJwJDa4qqLQ3ZaePJ6ZTwt7cMD3AG3+aLCE= -github.com/prometheus/common v0.53.0/go.mod h1:BrxBKv3FWBIGXw89Mg1AeBq7FSyRzXWI3l3e7W3RN5U= +github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= +github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= github.com/prometheus/procfs v0.15.0 h1:A82kmvXJq2jTu5YUhSGNlYoxh85zLnKgPz4bMZgI5Ek= github.com/prometheus/procfs v0.15.0/go.mod h1:Y0RJ/Y5g5wJpkTisOtqwDSo4HwhGmLB4VQSw2sQJLHk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -228,6 +204,7 @@ github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -264,76 +241,80 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector v0.102.1 h1:M/ciCcReQsSDYG9bJ2Qwqk7pQILDJ2bM/l0MdeCAvJE= -go.opentelemetry.io/collector v0.102.1/go.mod h1:yF1lDRgL/Eksb4/LUnkMjvLvHHpi6wqBVlzp+dACnPM= -go.opentelemetry.io/collector/component v0.102.1 h1:66z+LN5dVCXhvuVKD1b56/3cYLK+mtYSLIwlskYA9IQ= -go.opentelemetry.io/collector/component v0.102.1/go.mod h1:XfkiSeImKYaewT2DavA80l0VZ3JjvGndZ8ayPXfp8d0= -go.opentelemetry.io/collector/config/configauth v0.102.1 h1:LuzijaZulMu4xmAUG8WA00ZKDlampH+ERjxclb40Q9g= -go.opentelemetry.io/collector/config/configauth v0.102.1/go.mod h1:kTzfI5fnbMJpm2wycVtQeWxFAtb7ns4HksSb66NIhX8= -go.opentelemetry.io/collector/config/configcompression v1.9.0 h1:B2q6XMO6xiF2s+14XjqAQHGY5UefR+PtkZ0WAlmSqpU= -go.opentelemetry.io/collector/config/configcompression v1.9.0/go.mod h1:6+m0GKCv7JKzaumn7u80A2dLNCuYf5wdR87HWreoBO0= -go.opentelemetry.io/collector/config/configgrpc v0.102.1 h1:6Plnfx+xw/JH8k11MkljGoysPfn1u7hHbO2evteOTeE= -go.opentelemetry.io/collector/config/configgrpc v0.102.1/go.mod h1:Kk3XOSar3QTzGDS8N8M38DVlOzUD7STS2obczO9q43I= -go.opentelemetry.io/collector/config/confighttp v0.102.1 h1:tPw1Xf2PfDdrXoBKLY5Sd4Dh8FNm5i+6DKuky9XraIM= -go.opentelemetry.io/collector/config/confighttp v0.102.1/go.mod h1:k4qscfjxuaDQmcAzioxmPujui9VSgW6oal3WLxp9CzI= -go.opentelemetry.io/collector/config/confignet v0.102.1 h1:nSiAFQMzNCO4sDBztUxY73qFw4Vh0hVePq8+3wXUHtU= -go.opentelemetry.io/collector/config/confignet v0.102.1/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= -go.opentelemetry.io/collector/config/configopaque v1.9.0 h1:jocenLdK/rVG9UoGlnpiBxXLXgH5NhIXCrVSTyKVYuA= -go.opentelemetry.io/collector/config/configopaque v1.9.0/go.mod h1:8v1yaH4iYjcigbbyEaP/tzVXeFm4AaAsKBF9SBeqaG4= -go.opentelemetry.io/collector/config/configretry v0.102.1 h1:J5/tXBL8P7d7HT5dxsp2H+//SkwDXR66Z9UTgRgtAzk= -go.opentelemetry.io/collector/config/configretry v0.102.1/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= -go.opentelemetry.io/collector/config/configtelemetry v0.102.1 h1:f/CYcrOkaHd+COIJ2lWnEgBCHfhEycpbow4ZhrGwAlA= -go.opentelemetry.io/collector/config/configtelemetry v0.102.1/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= -go.opentelemetry.io/collector/config/configtls v0.102.1 h1:7fr+PU9BRg0HRc1Pn3WmDW/4WBHRjuo7o1CdG2vQKoA= -go.opentelemetry.io/collector/config/configtls v0.102.1/go.mod h1:KHdrvo3cwosgDxclyiLWmtbovIwqvaIGeTXr3p5721A= -go.opentelemetry.io/collector/config/internal v0.102.1 h1:HFsFD3xpHUuNHb8/UTz5crJw1cMHzsJQf/86sgD44hw= -go.opentelemetry.io/collector/config/internal v0.102.1/go.mod h1:Vig3dfeJJnuRe1kBNpszBzPoj5eYnR51wXbeq36Zfpg= -go.opentelemetry.io/collector/confmap v0.102.1 h1:wZuH+d/P11Suz8wbp+xQCJ0BPE9m5pybtUe74c+rU7E= -go.opentelemetry.io/collector/confmap v0.102.1/go.mod h1:KgpS7UxH5rkd69CzAzlY2I1heH8Z7eNCZlHmwQBMxNg= -go.opentelemetry.io/collector/consumer v0.102.1 h1:0CkgHhxwx4lI/m+hWjh607xyjooW5CObZ8hFQy5vvo0= -go.opentelemetry.io/collector/consumer v0.102.1/go.mod h1:HoXqmrRV13jLnP3/Gg3fYNdRkDPoO7UW58hKiLyFF60= -go.opentelemetry.io/collector/exporter v0.102.1 h1:4VURYgBNJscxfMhZWitzcwA1cig5a6pH0xZSpdECDnM= -go.opentelemetry.io/collector/exporter v0.102.1/go.mod h1:1pmNxvrvvbWDW6PiGObICdj0eOSGV4Fzwpm5QA1GU54= -go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 h1:bOXE7u1iy0SKwH2mnVyIMKkvFIR9bn9iIm1Cf/CJlZU= -go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1/go.mod h1:4ya6xaUYvcXq9MQW0TbsR4QWkOJI02d/2Vt8plwdozA= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1 h1:9TaxHrkVtEdssDAHqV5yU9PARkFph7CvfLqC1wS6m+c= -go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1/go.mod h1:auKlkLfuUriyZ2CmV2dudJaVGB7ycZ+tTpypy2JNFEc= -go.opentelemetry.io/collector/extension v0.102.1 h1:gAvE3w15q+Vv0Tj100jzcDpeMTyc8dAiemHRtJbspLg= -go.opentelemetry.io/collector/extension v0.102.1/go.mod h1:XBxUOXjZpwYLZYOK5u3GWlbBTOKmzStY5eU1R/aXkIo= -go.opentelemetry.io/collector/extension/auth v0.102.1 h1:GP6oBmpFJjxuVruPb9X40bdf6PNu9779i8anxa+wW6U= -go.opentelemetry.io/collector/extension/auth v0.102.1/go.mod h1:U2JWz8AW1QXX2Ap3ofzo5Dn2fZU/Lglld97Vbh8BZS0= -go.opentelemetry.io/collector/featuregate v1.9.0 h1:mC4/HnR5cx/kkG1RKOQAvHxxg5Ktmd9gpFdttPEXQtA= -go.opentelemetry.io/collector/featuregate v1.9.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= -go.opentelemetry.io/collector/pdata v1.9.0 h1:qyXe3HEVYYxerIYu0rzgo1Tx2d1Zs6iF+TCckbHLFOw= -go.opentelemetry.io/collector/pdata v1.9.0/go.mod h1:vk7LrfpyVpGZrRWcpjyy0DDZzL3SZiYMQxfap25551w= -go.opentelemetry.io/collector/pdata/testdata v0.102.1 h1:S3idZaJxy8M7mCC4PG4EegmtiSaOuh6wXWatKIui8xU= -go.opentelemetry.io/collector/pdata/testdata v0.102.1/go.mod h1:JEoSJTMgeTKyGxoMRy48RMYyhkA5vCCq/abJq9B6vXs= -go.opentelemetry.io/collector/receiver v0.102.1 h1:353t4U3o0RdU007JcQ4sRRzl72GHCJZwXDr8cCOcEbI= -go.opentelemetry.io/collector/receiver v0.102.1/go.mod h1:pYjMzUkvUlxJ8xt+VbI1to8HMtVlv8AW/K/2GQQOTB0= +go.opentelemetry.io/collector v0.104.0 h1:R3zjM4O3K3+ttzsjPV75P80xalxRbwYTURlK0ys7uyo= +go.opentelemetry.io/collector v0.104.0/go.mod h1:Tm6F3na9ajnOm6I5goU9dURKxq1fSBK1yA94nvUix3k= +go.opentelemetry.io/collector/component v0.104.0 h1:jqu/X9rnv8ha0RNZ1a9+x7OU49KwSMsPbOuIEykHuQE= +go.opentelemetry.io/collector/component v0.104.0/go.mod h1:1C7C0hMVSbXyY1ycCmaMUAR9fVwpgyiNQqxXtEWhVpw= +go.opentelemetry.io/collector/config/configauth v0.104.0 h1:ULtjugImijpKuLgGVt0E0HwiZT7+uDUEtMquh1ODB24= +go.opentelemetry.io/collector/config/configauth v0.104.0/go.mod h1:Til+nLLrQwwhgmfcGTX4ZRcNuMhdaWhBW1jH9DLTabQ= +go.opentelemetry.io/collector/config/configcompression v1.11.0 h1:oTwbcLh7mWHSDUIZXkRJVdNAMoBGS39XF68goTMOQq8= +go.opentelemetry.io/collector/config/configcompression v1.11.0/go.mod h1:6+m0GKCv7JKzaumn7u80A2dLNCuYf5wdR87HWreoBO0= +go.opentelemetry.io/collector/config/configgrpc v0.104.0 h1:E3RtqryQPOm/trJmhlJZj6cCqJNKgv9fOEQvSEpzsFM= +go.opentelemetry.io/collector/config/configgrpc v0.104.0/go.mod h1:tu3ifnJ5pv+4rZcaqNWfvVLjNKb8icSPoClN3THN8PU= +go.opentelemetry.io/collector/config/confighttp v0.104.0 h1:KSY0FSHSjuPyrR6iA2g5oFTozYFpYcy0ssJny8gTNTQ= +go.opentelemetry.io/collector/config/confighttp v0.104.0/go.mod h1:YgSXwuMYHANzzv+IBjHXaBMG/4G2mrseIpICHj+LB3U= +go.opentelemetry.io/collector/config/confignet v0.104.0 h1:i7AOTJf4EQox3SEt1YtQFQR+BwXr3v5D9x3Ai9/ovy8= +go.opentelemetry.io/collector/config/confignet v0.104.0/go.mod h1:pfOrCTfSZEB6H2rKtx41/3RN4dKs+X2EKQbw3MGRh0E= +go.opentelemetry.io/collector/config/configopaque v1.11.0 h1:Pt06PXWVmRaiSX63mzwT8Z9SV/hOc6VHNZbfZ10YY4o= +go.opentelemetry.io/collector/config/configopaque v1.11.0/go.mod h1:0xURn2sOy5j4fbaocpEYfM97HPGsiffkkVudSPyTJlM= +go.opentelemetry.io/collector/config/configretry v1.11.0 h1:UdEDD0ThxPU7+n2EiKJxVTvDCGygXu9hTfT6LOQv9DY= +go.opentelemetry.io/collector/config/configretry v1.11.0/go.mod h1:P+RA0IA+QoxnDn4072uyeAk1RIoYiCbxYsjpKX5eFC4= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0 h1:eHv98XIhapZA8MgTiipvi+FDOXoFhCYOwyKReOt+E4E= +go.opentelemetry.io/collector/config/configtelemetry v0.104.0/go.mod h1:WxWKNVAQJg/Io1nA3xLgn/DWLE/W1QOB2+/Js3ACi40= +go.opentelemetry.io/collector/config/configtls v0.104.0 h1:bMmLz2+r+REpO7cDOR+srOJHfitqTZfSZCffDpKfwWk= +go.opentelemetry.io/collector/config/configtls v0.104.0/go.mod h1:e33o7TWcKfe4ToLFyGISEPGMgp6ezf3yHRGY4gs9nKk= +go.opentelemetry.io/collector/config/internal v0.104.0 h1:h3OkxTfXWWrHRyPEGMpJb4fH+54puSBuzm6GQbuEZ2o= +go.opentelemetry.io/collector/config/internal v0.104.0/go.mod h1:KjH43jsAUFyZPeTOz7GrPORMQCK13wRMCyQpWk99gMo= +go.opentelemetry.io/collector/confmap v0.104.0 h1:d3yuwX+CHpoyCh0iMv3rqb/vwAekjSm4ZDL6UK1nZSA= +go.opentelemetry.io/collector/confmap v0.104.0/go.mod h1:F8Lue+tPPn2oldXcfqI75PPMJoyzgUsKVtM/uHZLA4w= +go.opentelemetry.io/collector/consumer v0.104.0 h1:Z1ZjapFp5mUcbkGEL96ljpqLIUMhRgQQpYKkDRtxy+4= +go.opentelemetry.io/collector/consumer v0.104.0/go.mod h1:60zcIb0W9GW0z9uJCv6NmjpSbCfBOeRUyrtEwqK6Hzo= +go.opentelemetry.io/collector/exporter v0.104.0 h1:C2HmnfBa05IQ2T+p9T7K7gXVxjrBLd+JxEtAWo7JNbg= +go.opentelemetry.io/collector/exporter v0.104.0/go.mod h1:Rx0oB0E4Ccg1JuAnEWwhtrq1ygRBkfx4mco1DpR3WaQ= +go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 h1:EFOdhnc2yGhqou0Tud1HsM7fsgWo/H3tdQhYYytDprQ= +go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0/go.mod h1:fAF7Q3Xh0OkxYWUycdrNNDXkyz3nhHIRKDkez0aQ6zg= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 h1:JkNCOj7DdyJhcYIaRqtS/X+YtAPRjE4pcruyY6LoM7c= +go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0/go.mod h1:6rs4Xugs7tIC3IFbAC+fj56zLiVc7osXC5UTjk/Mkw4= +go.opentelemetry.io/collector/extension v0.104.0 h1:bftkgFMKya/QIwK+bOxEAPVs/TvTez+s1mlaiUznJkA= +go.opentelemetry.io/collector/extension v0.104.0/go.mod h1:x7K0KyM1JGrtLbafEbRoVp0VpGBHpyx9hu87bsja6S4= +go.opentelemetry.io/collector/extension/auth v0.104.0 h1:SelhccGCrqLThPlkbv6lbAowHsjgOTAWcAPz085IEC4= +go.opentelemetry.io/collector/extension/auth v0.104.0/go.mod h1:s3/C7LTSfa91QK0JPMTRIvH/gCv+a4DGiiNeTAX9OhI= +go.opentelemetry.io/collector/featuregate v1.11.0 h1:Z7puIymKoQRm3oNM/NH8reWc2zRPz2PNaJvuokh0lQY= +go.opentelemetry.io/collector/featuregate v1.11.0/go.mod h1:PsOINaGgTiFc+Tzu2K/X2jP+Ngmlp7YKGV1XrnBkH7U= +go.opentelemetry.io/collector/pdata v1.11.0 h1:rzYyV1zfTQQz1DI9hCiaKyyaczqawN75XO9mdXmR/hE= +go.opentelemetry.io/collector/pdata v1.11.0/go.mod h1:IHxHsp+Jq/xfjORQMDJjSH6jvedOSTOyu3nbxqhWSYE= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0 h1:MYOIHvPlKEJbWLiBKFQWGD0xd2u22xGVLt4jPbdxP4Y= +go.opentelemetry.io/collector/pdata/pprofile v0.104.0/go.mod h1:7WpyHk2wJZRx70CGkBio8klrYTTXASbyIhf+rH4FKnA= +go.opentelemetry.io/collector/pdata/testdata v0.104.0 h1:BKTZ7hIyAX5DMPecrXkVB2e86HwWtJyOlXn/5vSVXNw= +go.opentelemetry.io/collector/pdata/testdata v0.104.0/go.mod h1:3SnYKu8gLfxURJMWS/cFEUFs+jEKS6jvfqKXnOZsdkQ= +go.opentelemetry.io/collector/receiver v0.104.0 h1:URL1ExkYYd+qbndm7CdGvI2mxzsv/pNfmwJ+1QSQ9/o= +go.opentelemetry.io/collector/receiver v0.104.0/go.mod h1:+enTCZQLf6dRRANWvykXEzrlRw2JDppXJtoYWd/Dd54= go.opentelemetry.io/contrib/config v0.7.0 h1:b1rK5tGTuhhPirJiMxOcyQfZs76j2VapY6ODn3b2Dbs= go.opentelemetry.io/contrib/config v0.7.0/go.mod h1:8tdiFd8N5etOi3XzBmAoMxplEzI3TcL8dU5rM5/xcOQ= +go.opentelemetry.io/contrib/detectors/aws/eks v1.28.0 h1:446exEE2fdXqNttY+oHB54NMGXRAmQBaMz2fXkL77bc= +go.opentelemetry.io/contrib/detectors/aws/eks v1.28.0/go.mod h1:L2UOyaTFvypCAHW69TwGnce7YgKhSI9n8kAzQjyNbJk= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 h1:vS1Ao/R55RNV4O7TA2Qopok8yN+X0LIP6RVWLFkprck= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0/go.mod h1:BMsdeOxN04K0L5FNUBfjFdvwWGNe/rkmSwH4Aelu/X0= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0 h1:9l89oX4ba9kHbBol3Xin3leYJ+252h0zszDtBwyKe2A= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.52.0/go.mod h1:XLZfZboOJWHNKUv7eH0inh0E9VV6eWDFB/9yJyTLPp0= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 h1:bFgvUr3/O4PHj3VQcFEuYKvRZJX1SJDQ+11JXuSB3/w= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0/go.mod h1:xJntEd2KL6Qdg5lwp97HMLQDVeAhrYxmzFseAMDPQ8I= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 h1:CIHWikMsN3wO+wq1Tp5VGdVRTcON+DmOJSfDjXypKOc= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0/go.mod h1:TNupZ6cxqyFEpLXAZW7On+mLFL0/g0TE3unIYL91xWc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 h1:R9DE4kQ4k+YtfLI2ULwX82VtNQ2J8yZmA7ZIF/D+7Mc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0/go.mod h1:OQFyQVrDlbe+R7xrEyDr/2Wr67Ol0hRUgsfA+V5A95s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 h1:qFffATk0X+HD+f1Z8lswGiOQYKHRlzfmdJm0wEaVrFA= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0/go.mod h1:MOiCmryaYtc+V0Ei+Tx9o5S1ZjA7kzLucuVuyzBZloQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 h1:QY7/0NeRPKlzusf40ZE4t1VlMKbqSNT7cJRYzWuja0s= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0/go.mod h1:HVkSiDhTM9BoUJU8qE6j2eSWLLXvi1USXjyd2BXT8PY= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 h1:U2guen0GhqH8o/G2un8f/aG/y++OuW6MyCo6hT9prXk= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0/go.mod h1:yeGZANgEcpdx/WK0IvvRFC+2oLiMS2u4L/0Rj2M2Qr0= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 h1:aLmmtjRke7LPDQ3lvpFz+kNEH43faFhzW7v8BFIEydg= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0/go.mod h1:TC1pyCt6G9Sjb4bQpShH+P5R53pO6ZuGnHuuln9xMeE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 h1:3Q/xZUyC1BBkualc9ROb4G8qkH90LXEIICcs5zv1OYY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0/go.mod h1:s75jGIWA9OfCMzF0xr+ZgfrB5FEbbV7UuYo32ahUiFI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 h1:R3X6ZXmNPRR8ul6i3WgFURCHzaXjHdm0karRG/+dj3s= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0/go.mod h1:QWFXnDavXWwMx2EEcZsf3yxgEKAqsxQ+Syjp+seyInw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 h1:j9+03ymgYhPKmeXGk5Zu+cIZOlVzd9Zv7QIiyItjFBU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0/go.mod h1:Y5+XiUG4Emn1hTfciPzGPJaSI+RpDts6BnCIir0SLqk= go.opentelemetry.io/otel/exporters/prometheus v0.49.0 h1:Er5I1g/YhfYv9Affk9nJLfH/+qCCVVg1f2R9AbJfqDQ= go.opentelemetry.io/otel/exporters/prometheus v0.49.0/go.mod h1:KfQ1wpjf3zsHjzP149P4LyAwWRupc6c7t1ZJ9eXpKQM= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0 h1:/jlt1Y8gXWiHG9FBx6cJaIC5hYx5Fe64nC8w5Cylt/0= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v1.27.0/go.mod h1:bmToOGOBZ4hA9ghphIc1PAf66VA8KOtsuy3+ScStG20= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0 h1:/0YaXu3755A/cFbtXp+21lkXgI0QE5avTWA2HjU9/WE= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.27.0/go.mod h1:m7SFxp0/7IxmJPLIY3JhOcU9CoFzDaCPL6xxQIxhA+o= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= +go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0= +go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -346,22 +327,22 @@ golang.org/x/arch v0.7.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= +golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 h1:Jvc7gsqn21cJHCmAWx0LiimpP18LZmUxkT5Mp7EZ1mI= golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8= -golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= -golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= -golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= +golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= +golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -376,36 +357,36 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= +golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= +golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= -golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gomodules.xyz/jsonpatch/v2 v2.3.0 h1:8NFhfS6gzxNqjLIYnZxg319wZ5Qjnx4m/CcX+Klzazc= gomodules.xyz/jsonpatch/v2 v2.3.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 h1:P8OJ/WCl/Xo4E4zoe4/bifHpSmmKwARqyqE4nW6J2GQ= -google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:RGnPtTG7r4i8sPlNyDeikXF99hMM+hN6QMm4ooG9g2g= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 h1:Q2RxlXqh1cgzzUgV261vBO2jI5R/3DD1J2pM0nI4NhU= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 h1:0+ozOGcrp+Y8Aq8TLNN2Aliibms5LEzsq99ZZmAGYm0= +google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094/go.mod h1:fJ/e3If/Q67Mj99hin0hMhiNyCRmt6BQ2aWIJshUSJw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 h1:BwIjyKYGsK9dMCBOorzRri8MQwmi7mT9rGHsCEinZkA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -418,20 +399,20 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -k8s.io/api v0.29.3 h1:2ORfZ7+bGC3YJqGpV0KSDDEVf8hdGQ6A03/50vj8pmw= -k8s.io/api v0.29.3/go.mod h1:y2yg2NTyHUUkIoTC+phinTnEa3KFM6RZ3szxt014a80= +k8s.io/api v0.29.4 h1:WEnF/XdxuCxdG3ayHNRR8yH3cI1B/llkWBma6bq4R3w= +k8s.io/api v0.29.4/go.mod h1:DetSv0t4FBTcEpfA84NJV3g9a7+rSzlUHk5ADAYHUv0= k8s.io/apiextensions-apiserver v0.27.2 h1:iwhyoeS4xj9Y7v8YExhUwbVuBhMr3Q4bd/laClBV6Bo= k8s.io/apiextensions-apiserver v0.27.2/go.mod h1:Oz9UdvGguL3ULgRdY9QMUzL2RZImotgxvGjdWRq6ZXQ= -k8s.io/apimachinery v0.29.3 h1:2tbx+5L7RNvqJjn7RIuIKu9XTsIZ9Z5wX2G22XAa5EU= -k8s.io/apimachinery v0.29.3/go.mod h1:hx/S4V2PNW4OMg3WizRrHutyB5la0iCUbZym+W0EQIU= -k8s.io/client-go v0.29.3 h1:R/zaZbEAxqComZ9FHeQwOh3Y1ZUs7FaHKZdQtIc2WZg= -k8s.io/client-go v0.29.3/go.mod h1:tkDisCvgPfiRpxGnOORfkljmS+UrW+WtXAy2fTvXJB0= -k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= -k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= -k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/apimachinery v0.29.4 h1:RaFdJiDmuKs/8cm1M6Dh1Kvyh59YQFDcFuFTSmXes6Q= +k8s.io/apimachinery v0.29.4/go.mod h1:i3FJVwhvSp/6n8Fl4K97PJEP8C+MM+aoDq4+ZJBf70Y= +k8s.io/client-go v0.29.4 h1:79ytIedxVfyXV8rpH3jCBW0u+un0fxHDwX5F9K8dPR8= +k8s.io/client-go v0.29.4/go.mod h1:kC1thZQ4zQWYwldsfI088BbK6RkxK+aF5ebV8y9Q4tk= +k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= +k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= +k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b h1:Q9xmGWBvOGd8UJyccgpYlLosk/JlfP3xQLNkQlHJeXw= +k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b/go.mod h1:UxDHUPsUwTOOxSU+oXURfFBcAS6JwiRXTYqYwfuGowc= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCIXHaathvJg1C3ak= +k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= sigs.k8s.io/controller-runtime v0.15.1 h1:9UvgKD4ZJGcj24vefUFgZFP3xej/3igL9BsOUTb/+4c= sigs.k8s.io/controller-runtime v0.15.1/go.mod h1:7ngYvp1MLT+9GeZ+6lH3LOlcHkp/+tzA/fmHa4iq9kk= @@ -441,5 +422,5 @@ sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMm sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/grafana/dashboard.json b/grafana/dashboard.json index 55036524a..2077eda62 100644 --- a/grafana/dashboard.json +++ b/grafana/dashboard.json @@ -16,7 +16,7 @@ ] }, "description": "HTTP and gRPC RED metrics visualization for Grafana Beyla", - "editable": true, + "editable": false, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 38, diff --git a/pkg/components/beyla.go b/pkg/components/beyla.go index a3d8faf89..9350a434a 100644 --- a/pkg/components/beyla.go +++ b/pkg/components/beyla.go @@ -4,14 +4,12 @@ import ( "context" "fmt" "log/slog" - "slices" "sync" "github.com/grafana/beyla/pkg/beyla" "github.com/grafana/beyla/pkg/internal/appolly" "github.com/grafana/beyla/pkg/internal/connector" "github.com/grafana/beyla/pkg/internal/export/attributes" - "github.com/grafana/beyla/pkg/internal/export/otel" "github.com/grafana/beyla/pkg/internal/imetrics" "github.com/grafana/beyla/pkg/internal/kube" "github.com/grafana/beyla/pkg/internal/netolly/agent" @@ -94,17 +92,8 @@ func setupNetO11y(ctx context.Context, ctxInfo *global.ContextInfo, cfg *beyla.C } func mustSkip(cfg *beyla.Config) string { - otelEnabled := cfg.Metrics.Enabled() - otelFeature := slices.Contains(cfg.Metrics.Features, otel.FeatureNetwork) - promEnabled := cfg.Prometheus.Enabled() - promFeature := slices.Contains(cfg.Prometheus.Features, otel.FeatureNetwork) - if otelEnabled && !otelFeature && !promEnabled { - return "network not present in BEYLA_OTEL_METRICS_FEATURES" - } - if promEnabled && !promFeature && !otelEnabled { - return "network not present in BEYLA_PROMETHEUS_FEATURES" - } - if promEnabled && !promFeature && otelEnabled && !otelFeature { + enabled := cfg.Enabled(beyla.FeatureNetO11y) + if !enabled { return "network not present neither in BEYLA_PROMETHEUS_FEATURES nor BEYLA_OTEL_METRICS_FEATURES" } return "" diff --git a/pkg/components/beyla_test.go b/pkg/components/beyla_test.go index 351be37f3..65f21898a 100644 --- a/pkg/components/beyla_test.go +++ b/pkg/components/beyla_test.go @@ -3,9 +3,12 @@ package components import ( + "bytes" "context" + "os" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/grafana/beyla/pkg/beyla" @@ -71,3 +74,10 @@ func TestRun_DontPanic(t *testing.T) { }) } } + +func Test_NetworkEnabled(t *testing.T) { + require.NoError(t, os.Setenv("BEYLA_NETWORK_METRICS", "true")) + cfg, err := beyla.LoadConfig(bytes.NewReader(nil)) + assert.NoError(t, err) + assert.Equal(t, mustSkip(cfg), "") +} diff --git a/pkg/internal/ebpf/common/common.go b/pkg/internal/ebpf/common/common.go index 843faf61b..be008592c 100644 --- a/pkg/internal/ebpf/common/common.go +++ b/pkg/internal/ebpf/common/common.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "io" "log/slog" + "net" "os" "strings" "time" @@ -227,3 +228,23 @@ func cstr(chars []uint8) string { return string(chars[:addrLen]) } + +func (connInfo *BPFConnInfo) reqHostInfo() (source, target string) { + src := make(net.IP, net.IPv6len) + dst := make(net.IP, net.IPv6len) + copy(src, connInfo.S_addr[:]) + copy(dst, connInfo.D_addr[:]) + + srcStr := src.String() + dstStr := dst.String() + + if src.IsUnspecified() { + srcStr = "" + } + + if dst.IsUnspecified() { + dstStr = "" + } + + return srcStr, dstStr +} diff --git a/pkg/internal/ebpf/common/http2grpc_transform.go b/pkg/internal/ebpf/common/http2grpc_transform.go index 5613a8db6..0115b7dc9 100644 --- a/pkg/internal/ebpf/common/http2grpc_transform.go +++ b/pkg/internal/ebpf/common/http2grpc_transform.go @@ -3,9 +3,9 @@ package ebpfcommon import ( "bytes" "encoding/binary" - "net" "strconv" "strings" + "unsafe" "github.com/cilium/ebpf/ringbuf" lru "github.com/hashicorp/golang-lru/v2" @@ -260,15 +260,6 @@ func (event *BPFHTTP2Info) eventType(protocol Protocol) request.EventType { return 0 } -func (event *BPFHTTP2Info) hostInfo() (source, target string) { - src := make(net.IP, net.IPv6len) - dst := make(net.IP, net.IPv6len) - copy(src, event.ConnInfo.S_addr[:]) - copy(dst, event.ConnInfo.D_addr[:]) - - return src.String(), dst.String() -} - // nolint:cyclop func http2FromBuffers(event *BPFHTTP2Info) (request.Span, bool, error) { bLen := len(event.Data) @@ -333,7 +324,7 @@ func http2FromBuffers(event *BPFHTTP2Info) (request.Span, bool, error) { peer := "" host := "" if event.ConnInfo.S_port != 0 || event.ConnInfo.D_port != 0 { - source, target := event.hostInfo() + source, target := (*BPFConnInfo)(unsafe.Pointer(&event.ConnInfo)).reqHostInfo() host = target peer = source } diff --git a/pkg/internal/ebpf/common/httpfltr_test.go b/pkg/internal/ebpf/common/httpfltr_test.go index 1b1c3e324..42e5eedd9 100644 --- a/pkg/internal/ebpf/common/httpfltr_test.go +++ b/pkg/internal/ebpf/common/httpfltr_test.go @@ -4,6 +4,7 @@ import ( "bytes" "encoding/binary" "testing" + "unsafe" "github.com/cilium/ebpf/ringbuf" "github.com/stretchr/testify/assert" @@ -41,7 +42,7 @@ func TestHostInfo(t *testing.T) { }, } - source, target := event.hostInfo() + source, target := (*BPFConnInfo)(unsafe.Pointer(&event.ConnInfo)).reqHostInfo() assert.Equal(t, "192.168.0.1", source) assert.Equal(t, "8.8.8.8", target) @@ -53,7 +54,7 @@ func TestHostInfo(t *testing.T) { }, } - source, target = event.hostInfo() + source, target = (*BPFConnInfo)(unsafe.Pointer(&event.ConnInfo)).reqHostInfo() assert.Equal(t, "100::ffff:c0a8:1", source) assert.Equal(t, "100::ffff:808:808", target) @@ -62,10 +63,10 @@ func TestHostInfo(t *testing.T) { ConnInfo: bpfConnectionInfoT{}, } - source, target = event.hostInfo() + source, target = (*BPFConnInfo)(unsafe.Pointer(&event.ConnInfo)).reqHostInfo() - assert.Equal(t, "::", source) - assert.Equal(t, "::", target) + assert.Equal(t, "", source) + assert.Equal(t, "", target) } func TestCstr(t *testing.T) { diff --git a/pkg/internal/ebpf/common/httpfltr_transform.go b/pkg/internal/ebpf/common/httpfltr_transform.go index 3fd1ee7d9..018e6b420 100644 --- a/pkg/internal/ebpf/common/httpfltr_transform.go +++ b/pkg/internal/ebpf/common/httpfltr_transform.go @@ -8,6 +8,7 @@ import ( "path/filepath" "strconv" "strings" + "unsafe" "github.com/cilium/ebpf/ringbuf" "go.opentelemetry.io/otel/trace" @@ -81,7 +82,7 @@ func HTTPInfoEventToSpan(event BPFHTTPInfo) (request.Span, bool, error) { // When we can't find the connection info, we signal that through making the // source and destination ports equal to max short. E.g. async SSL if event.ConnInfo.S_port != 0 || event.ConnInfo.D_port != 0 { - source, target := event.hostInfo() + source, target := (*BPFConnInfo)(unsafe.Pointer(&event.ConnInfo)).reqHostInfo() result.Host = target result.Peer = source } else { @@ -168,15 +169,6 @@ func (event *BPFHTTPInfo) hostFromBuf() (string, int) { return host, port } -func (event *BPFHTTPInfo) hostInfo() (source, target string) { - src := make(net.IP, net.IPv6len) - dst := make(net.IP, net.IPv6len) - copy(src, event.ConnInfo.S_addr[:]) - copy(dst, event.ConnInfo.D_addr[:]) - - return src.String(), dst.String() -} - func commName(pid uint32) string { procPath := filepath.Join("/proc", strconv.FormatUint(uint64(pid), 10), "comm") _, err := os.Stat(procPath) diff --git a/pkg/internal/ebpf/common/spanner.go b/pkg/internal/ebpf/common/spanner.go index ded448a07..0866ee254 100644 --- a/pkg/internal/ebpf/common/spanner.go +++ b/pkg/internal/ebpf/common/spanner.go @@ -5,8 +5,8 @@ import ( "debug/gosym" "fmt" "log/slog" - "net" "strings" + "unsafe" trace2 "go.opentelemetry.io/otel/trace" @@ -38,7 +38,8 @@ func HTTPRequestTraceToSpan(trace *HTTPRequestTrace, filter ServiceFilter) reque hostPort := 0 if trace.Conn.S_port != 0 || trace.Conn.D_port != 0 { - peer, hostname = trace.hostInfo() + peer, hostname = (*BPFConnInfo)(unsafe.Pointer(&trace.Conn)).reqHostInfo() + hostPort = int(trace.Conn.D_port) } @@ -69,15 +70,6 @@ func HTTPRequestTraceToSpan(trace *HTTPRequestTrace, filter ServiceFilter) reque } } -func (trace *HTTPRequestTrace) hostInfo() (source, target string) { - src := make(net.IP, net.IPv6len) - dst := make(net.IP, net.IPv6len) - copy(src, trace.Conn.S_addr[:]) - copy(dst, trace.Conn.D_addr[:]) - - return src.String(), dst.String() -} - func extractErrorStacktrace(trace *HTTPRequestTrace, symTab *gosym.Table) string { var stacktrace strings.Builder if symTab != nil && trace.Error.UstackSz > 0 { diff --git a/pkg/internal/ebpf/common/spanner_test.go b/pkg/internal/ebpf/common/spanner_test.go index 2525a7c21..4062f5e3b 100644 --- a/pkg/internal/ebpf/common/spanner_test.go +++ b/pkg/internal/ebpf/common/spanner_test.go @@ -2,6 +2,7 @@ package ebpfcommon import ( "testing" + "unsafe" "github.com/stretchr/testify/assert" @@ -117,3 +118,11 @@ func TestSpanNesting(t *testing.T) { b = makeSpanWithTimings(10000, 30000, 30000) assert.False(t, (&a).Inside(&b)) } + +func Test_EmptyHostInfo(t *testing.T) { + tr := HTTPRequestTrace{} + src, dest := (*BPFConnInfo)(unsafe.Pointer(&tr.Conn)).reqHostInfo() + + assert.Equal(t, src, "") + assert.Equal(t, dest, "") +} diff --git a/pkg/internal/ebpf/common/tcp_detect_transform.go b/pkg/internal/ebpf/common/tcp_detect_transform.go index e5d5fac62..7f6ddc5ae 100644 --- a/pkg/internal/ebpf/common/tcp_detect_transform.go +++ b/pkg/internal/ebpf/common/tcp_detect_transform.go @@ -3,7 +3,6 @@ package ebpfcommon import ( "bytes" "encoding/binary" - "net" "github.com/cilium/ebpf/ringbuf" @@ -76,15 +75,6 @@ func ReadTCPRequestIntoSpan(record *ringbuf.Record, filter ServiceFilter) (reque return request.Span{}, true, nil // ignore if we couldn't parse it } -func (connInfo *BPFConnInfo) reqHostInfo() (source, target string) { - src := make(net.IP, net.IPv6len) - dst := make(net.IP, net.IPv6len) - copy(src, connInfo.S_addr[:]) - copy(dst, connInfo.D_addr[:]) - - return src.String(), dst.String() -} - func reverseTCPEvent(trace *TCPRequestInfo) { if trace.Direction == 0 { trace.Direction = 1 diff --git a/pkg/internal/ebpf/goredis/bpf_bpfel_arm64.o b/pkg/internal/ebpf/goredis/bpf_bpfel_arm64.o index e4b03f7d8..944e161fe 100644 Binary files a/pkg/internal/ebpf/goredis/bpf_bpfel_arm64.o and b/pkg/internal/ebpf/goredis/bpf_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/goredis/bpf_bpfel_x86.o b/pkg/internal/ebpf/goredis/bpf_bpfel_x86.o index 0412e3148..e0a27c9f7 100644 Binary files a/pkg/internal/ebpf/goredis/bpf_bpfel_x86.o and b/pkg/internal/ebpf/goredis/bpf_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/goredis/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/goredis/bpf_debug_bpfel_arm64.o index f19c8e1b1..9eca2ec74 100644 Binary files a/pkg/internal/ebpf/goredis/bpf_debug_bpfel_arm64.o and b/pkg/internal/ebpf/goredis/bpf_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/goredis/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/goredis/bpf_debug_bpfel_x86.o index 7e7b3f29d..7ed4d7eb8 100644 Binary files a/pkg/internal/ebpf/goredis/bpf_debug_bpfel_x86.o and b/pkg/internal/ebpf/goredis/bpf_debug_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o index b36fbe5a5..31761b921 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o and b/pkg/internal/ebpf/grpc/bpf_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o index b2ae7a456..a1a3189da 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o and b/pkg/internal/ebpf/grpc/bpf_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o index 7d2a28e28..f8a6944cc 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o and b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o index dab16bde6..42a5bb625 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o and b/pkg/internal/ebpf/grpc/bpf_debug_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o index 01a603cec..c4e05336e 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o and b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o index bc4dc26ef..7d6985c94 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o and b/pkg/internal/ebpf/grpc/bpf_tp_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o index ccdf764b7..ec4973eef 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o and b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o index 80512b06b..5b7295ce1 100644 Binary files a/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o and b/pkg/internal/ebpf/grpc/bpf_tp_debug_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/kafkago/bpf_bpfel_arm64.o b/pkg/internal/ebpf/kafkago/bpf_bpfel_arm64.o index 2a3257e0f..5bb31683a 100644 Binary files a/pkg/internal/ebpf/kafkago/bpf_bpfel_arm64.o and b/pkg/internal/ebpf/kafkago/bpf_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/kafkago/bpf_bpfel_x86.o b/pkg/internal/ebpf/kafkago/bpf_bpfel_x86.o index 013a332cc..9038a4f29 100644 Binary files a/pkg/internal/ebpf/kafkago/bpf_bpfel_x86.o and b/pkg/internal/ebpf/kafkago/bpf_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_arm64.o index 4bbf4f4e8..facd2fad5 100644 Binary files a/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_arm64.o and b/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_x86.o index c4d709b79..e9b5cbd38 100644 Binary files a/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_x86.o and b/pkg/internal/ebpf/kafkago/bpf_debug_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o index 8ef055aa5..1fac51409 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o and b/pkg/internal/ebpf/nethttp/bpf_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o index 214f6f60f..3e5ab2c97 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o and b/pkg/internal/ebpf/nethttp/bpf_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o index 8375e44e6..c06d3b7ce 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o and b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o index 09da4cd22..9b40cbaac 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o and b/pkg/internal/ebpf/nethttp/bpf_debug_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o index 195194944..cd772e86d 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o and b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o index 6f77277f4..7a826f046 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o and b/pkg/internal/ebpf/nethttp/bpf_tp_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o index cfa87d73b..a7792295e 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o and b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o index 71d2bac87..351180293 100644 Binary files a/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o and b/pkg/internal/ebpf/nethttp/bpf_tp_debug_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/sarama/bpf_bpfel_arm64.o b/pkg/internal/ebpf/sarama/bpf_bpfel_arm64.o index de95d9dfc..accc01385 100644 Binary files a/pkg/internal/ebpf/sarama/bpf_bpfel_arm64.o and b/pkg/internal/ebpf/sarama/bpf_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/sarama/bpf_bpfel_x86.o b/pkg/internal/ebpf/sarama/bpf_bpfel_x86.o index 4926978c8..11dbae467 100644 Binary files a/pkg/internal/ebpf/sarama/bpf_bpfel_x86.o and b/pkg/internal/ebpf/sarama/bpf_bpfel_x86.o differ diff --git a/pkg/internal/ebpf/sarama/bpf_debug_bpfel_arm64.o b/pkg/internal/ebpf/sarama/bpf_debug_bpfel_arm64.o index 66299b005..1720a2285 100644 Binary files a/pkg/internal/ebpf/sarama/bpf_debug_bpfel_arm64.o and b/pkg/internal/ebpf/sarama/bpf_debug_bpfel_arm64.o differ diff --git a/pkg/internal/ebpf/sarama/bpf_debug_bpfel_x86.o b/pkg/internal/ebpf/sarama/bpf_debug_bpfel_x86.o index d13aa40c3..0a98278f2 100644 Binary files a/pkg/internal/ebpf/sarama/bpf_debug_bpfel_x86.o and b/pkg/internal/ebpf/sarama/bpf_debug_bpfel_x86.o differ diff --git a/pkg/internal/export/attributes/attr_defs.go b/pkg/internal/export/attributes/attr_defs.go index 09182110b..078658668 100644 --- a/pkg/internal/export/attributes/attr_defs.go +++ b/pkg/internal/export/attributes/attr_defs.go @@ -204,6 +204,8 @@ func getDefinitions(groups AttrGroups) map[Section]AttrReportGroup { attr.DstPort: false, attr.SrcName: false, attr.DstName: false, + attr.ServerPort: false, + attr.ClientPort: false, attr.Direction: Default(ifaceDirEnabled), attr.Iface: Default(ifaceDirEnabled), }, @@ -234,9 +236,6 @@ func getDefinitions(groups AttrGroups) map[Section]AttrReportGroup { attr.RPCMethod: true, attr.RPCSystem: true, attr.RPCGRPCStatusCode: true, - // Overriding default serverInfo configuration because we want - // to report it by default - attr.ClientAddr: true, }, }, DBClientDuration.Section: { diff --git a/pkg/internal/export/attributes/attr_selector_test.go b/pkg/internal/export/attributes/attr_selector_test.go index 66852321a..2e04091fe 100644 --- a/pkg/internal/export/attributes/attr_selector_test.go +++ b/pkg/internal/export/attributes/attr_selector_test.go @@ -108,7 +108,9 @@ func TestFor_GlobEntries_Order(t *testing.T) { require.NoError(t, err) assert.Equal(t, []attr.Name{ "beyla.ip", + "client.port", "dst.name", + "server.port", "src.address", "src.name", "src.port", diff --git a/pkg/internal/export/attributes/names/attrs.go b/pkg/internal/export/attributes/names/attrs.go index ec03e5095..d58afd9c8 100644 --- a/pkg/internal/export/attributes/names/attrs.go +++ b/pkg/internal/export/attributes/names/attrs.go @@ -81,6 +81,8 @@ const ( SrcCIDR = Name("src.cidr") DstCIDR = Name("dst.cidr") + ClientPort = Name("client.port") + K8sSrcOwnerName = Name("k8s.src.owner.name") K8sSrcNamespace = Name("k8s.src.namespace") K8sDstOwnerName = Name("k8s.dst.owner.name") diff --git a/pkg/internal/export/otel/traces.go b/pkg/internal/export/otel/traces.go index addcf5d33..07bc9d142 100644 --- a/pkg/internal/export/otel/traces.go +++ b/pkg/internal/export/otel/traces.go @@ -323,7 +323,7 @@ func traceProviderWithInternalMetrics(ctxInfo *global.ContextInfo, cfg TracesCon ) } -func getTraceSettings(ctxInfo *global.ContextInfo, cfg TracesConfig, in trace.SpanExporter) exporter.CreateSettings { +func getTraceSettings(ctxInfo *global.ContextInfo, cfg TracesConfig, in trace.SpanExporter) exporter.Settings { var traceProvider trace2.TracerProvider telemetryLevel := configtelemetry.LevelNone @@ -345,7 +345,7 @@ func getTraceSettings(ctxInfo *global.ContextInfo, cfg TracesConfig, in trace.Sp } }, } - return exporter.CreateSettings{ + return exporter.Settings{ ID: component.NewIDWithName(component.DataTypeMetrics, "beyla"), TelemetrySettings: telemetrySettings, } diff --git a/pkg/internal/netolly/ebpf/net_bpfel_arm64.go b/pkg/internal/netolly/ebpf/net_bpfel_arm64.go index 4cc37f16e..7ede6d0d6 100644 --- a/pkg/internal/netolly/ebpf/net_bpfel_arm64.go +++ b/pkg/internal/netolly/ebpf/net_bpfel_arm64.go @@ -12,6 +12,13 @@ import ( "github.com/cilium/ebpf" ) +type NetConnInitiatorKey struct { + LowIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + HighIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + LowIpPort uint16 + HighIpPort uint16 +} + type NetFlowId NetFlowIdT type NetFlowIdT struct { @@ -33,6 +40,7 @@ type NetFlowMetricsT struct { EndMonoTimeNs uint64 Flags uint16 Direction uint8 + Initiator uint8 Errno uint8 } @@ -91,6 +99,7 @@ type NetProgramSpecs struct { // It can be passed ebpf.CollectionSpec.Assign. type NetMapSpecs struct { AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` } @@ -115,6 +124,7 @@ func (o *NetObjects) Close() error { // It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. type NetMaps struct { AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` DirectFlows *ebpf.Map `ebpf:"direct_flows"` FlowDirections *ebpf.Map `ebpf:"flow_directions"` } @@ -122,6 +132,7 @@ type NetMaps struct { func (m *NetMaps) Close() error { return _NetClose( m.AggregatedFlows, + m.ConnInitiators, m.DirectFlows, m.FlowDirections, ) diff --git a/pkg/internal/netolly/ebpf/net_bpfel_arm64.o b/pkg/internal/netolly/ebpf/net_bpfel_arm64.o index e9142547d..272c9dd70 100644 Binary files a/pkg/internal/netolly/ebpf/net_bpfel_arm64.o and b/pkg/internal/netolly/ebpf/net_bpfel_arm64.o differ diff --git a/pkg/internal/netolly/ebpf/net_bpfel_x86.go b/pkg/internal/netolly/ebpf/net_bpfel_x86.go index 4f1ff12c6..093b4e82c 100644 --- a/pkg/internal/netolly/ebpf/net_bpfel_x86.go +++ b/pkg/internal/netolly/ebpf/net_bpfel_x86.go @@ -12,6 +12,13 @@ import ( "github.com/cilium/ebpf" ) +type NetConnInitiatorKey struct { + LowIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + HighIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + LowIpPort uint16 + HighIpPort uint16 +} + type NetFlowId NetFlowIdT type NetFlowIdT struct { @@ -33,6 +40,7 @@ type NetFlowMetricsT struct { EndMonoTimeNs uint64 Flags uint16 Direction uint8 + Initiator uint8 Errno uint8 } @@ -91,6 +99,7 @@ type NetProgramSpecs struct { // It can be passed ebpf.CollectionSpec.Assign. type NetMapSpecs struct { AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` } @@ -115,6 +124,7 @@ func (o *NetObjects) Close() error { // It can be passed to LoadNetObjects or ebpf.CollectionSpec.LoadAndAssign. type NetMaps struct { AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` DirectFlows *ebpf.Map `ebpf:"direct_flows"` FlowDirections *ebpf.Map `ebpf:"flow_directions"` } @@ -122,6 +132,7 @@ type NetMaps struct { func (m *NetMaps) Close() error { return _NetClose( m.AggregatedFlows, + m.ConnInitiators, m.DirectFlows, m.FlowDirections, ) diff --git a/pkg/internal/netolly/ebpf/net_bpfel_x86.o b/pkg/internal/netolly/ebpf/net_bpfel_x86.o index 840ce9b68..4dbaf4aab 100644 Binary files a/pkg/internal/netolly/ebpf/net_bpfel_x86.o and b/pkg/internal/netolly/ebpf/net_bpfel_x86.o differ diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go b/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go index 78e210d38..a790a4d31 100644 --- a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go +++ b/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.go @@ -12,6 +12,13 @@ import ( "github.com/cilium/ebpf" ) +type NetSkConnInitiatorKey struct { + LowIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + HighIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + LowIpPort uint16 + HighIpPort uint16 +} + type NetSkFlowId NetSkFlowIdT type NetSkFlowIdT struct { @@ -33,6 +40,7 @@ type NetSkFlowMetricsT struct { EndMonoTimeNs uint64 Flags uint16 Direction uint8 + Initiator uint8 Errno uint8 } @@ -90,6 +98,7 @@ type NetSkProgramSpecs struct { // It can be passed ebpf.CollectionSpec.Assign. type NetSkMapSpecs struct { AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` } @@ -114,6 +123,7 @@ func (o *NetSkObjects) Close() error { // It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. type NetSkMaps struct { AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` DirectFlows *ebpf.Map `ebpf:"direct_flows"` FlowDirections *ebpf.Map `ebpf:"flow_directions"` } @@ -121,6 +131,7 @@ type NetSkMaps struct { func (m *NetSkMaps) Close() error { return _NetSkClose( m.AggregatedFlows, + m.ConnInitiators, m.DirectFlows, m.FlowDirections, ) diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o b/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o index 4f313a47a..b5ac6afb1 100644 Binary files a/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o and b/pkg/internal/netolly/ebpf/netsk_bpfel_arm64.o differ diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go b/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go index 2886a268c..c1b5493e5 100644 --- a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go +++ b/pkg/internal/netolly/ebpf/netsk_bpfel_x86.go @@ -12,6 +12,13 @@ import ( "github.com/cilium/ebpf" ) +type NetSkConnInitiatorKey struct { + LowIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + HighIp struct{ In6U struct{ U6Addr8 [16]uint8 } } + LowIpPort uint16 + HighIpPort uint16 +} + type NetSkFlowId NetSkFlowIdT type NetSkFlowIdT struct { @@ -33,6 +40,7 @@ type NetSkFlowMetricsT struct { EndMonoTimeNs uint64 Flags uint16 Direction uint8 + Initiator uint8 Errno uint8 } @@ -90,6 +98,7 @@ type NetSkProgramSpecs struct { // It can be passed ebpf.CollectionSpec.Assign. type NetSkMapSpecs struct { AggregatedFlows *ebpf.MapSpec `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.MapSpec `ebpf:"conn_initiators"` DirectFlows *ebpf.MapSpec `ebpf:"direct_flows"` FlowDirections *ebpf.MapSpec `ebpf:"flow_directions"` } @@ -114,6 +123,7 @@ func (o *NetSkObjects) Close() error { // It can be passed to LoadNetSkObjects or ebpf.CollectionSpec.LoadAndAssign. type NetSkMaps struct { AggregatedFlows *ebpf.Map `ebpf:"aggregated_flows"` + ConnInitiators *ebpf.Map `ebpf:"conn_initiators"` DirectFlows *ebpf.Map `ebpf:"direct_flows"` FlowDirections *ebpf.Map `ebpf:"flow_directions"` } @@ -121,6 +131,7 @@ type NetSkMaps struct { func (m *NetSkMaps) Close() error { return _NetSkClose( m.AggregatedFlows, + m.ConnInitiators, m.DirectFlows, m.FlowDirections, ) diff --git a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o b/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o index 044aefd29..a4a634e33 100644 Binary files a/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o and b/pkg/internal/netolly/ebpf/netsk_bpfel_x86.o differ diff --git a/pkg/internal/netolly/ebpf/record.go b/pkg/internal/netolly/ebpf/record.go index f92408268..211095086 100644 --- a/pkg/internal/netolly/ebpf/record.go +++ b/pkg/internal/netolly/ebpf/record.go @@ -75,6 +75,7 @@ func (fm *NetFlowMetrics) Accumulate(src *NetFlowMetrics) { fm.StartMonoTimeNs = src.StartMonoTimeNs // set Direction here, because the correct value is in the first packet only fm.Direction = src.Direction + fm.Initiator = src.Initiator } if fm.EndMonoTimeNs == 0 || fm.EndMonoTimeNs < src.EndMonoTimeNs { fm.EndMonoTimeNs = src.EndMonoTimeNs diff --git a/pkg/internal/netolly/ebpf/record_getters.go b/pkg/internal/netolly/ebpf/record_getters.go index 5703f732c..36b8106e0 100644 --- a/pkg/internal/netolly/ebpf/record_getters.go +++ b/pkg/internal/netolly/ebpf/record_getters.go @@ -10,6 +10,7 @@ import ( // RecordGetters returns the attributes.Getter function that returns the string value of a given // attribute name. +// nolint:cyclop func RecordGetters(name attr.Name) (attributes.Getter[*Record, attribute.KeyValue], bool) { var getter attributes.Getter[*Record, attribute.KeyValue] switch name { @@ -41,6 +42,34 @@ func RecordGetters(name attr.Name) (attributes.Getter[*Record, attribute.KeyValu } case attr.Iface: getter = func(r *Record) attribute.KeyValue { return attribute.String(string(attr.Iface), r.Attrs.Interface) } + case attr.ClientPort: + getter = func(r *Record) attribute.KeyValue { + var clientPort uint16 + switch r.Metrics.Initiator { + case InitiatorDst: + clientPort = r.Id.DstPort + case InitiatorSrc: + clientPort = r.Id.SrcPort + default: + // guess it, assuming that ephemeral ports for clients would be usually higher + clientPort = max(r.Id.DstPort, r.Id.SrcPort) + } + return attribute.Int(string(attr.ClientPort), int(clientPort)) + } + case attr.ServerPort: + getter = func(r *Record) attribute.KeyValue { + var serverPort uint16 + switch r.Metrics.Initiator { + case InitiatorDst: + serverPort = r.Id.SrcPort + case InitiatorSrc: + serverPort = r.Id.DstPort + default: + // guess it, assuming that ephemeral ports for clients would be usually higher + serverPort = min(r.Id.DstPort, r.Id.SrcPort) + } + return attribute.Int(string(attr.ServerPort), int(serverPort)) + } default: getter = func(r *Record) attribute.KeyValue { return attribute.String(string(name), r.Attrs.Metadata[name]) } } diff --git a/pkg/internal/netolly/ebpf/sock_tracer.go b/pkg/internal/netolly/ebpf/sock_tracer.go index fe9c52544..2899f26ac 100644 --- a/pkg/internal/netolly/ebpf/sock_tracer.go +++ b/pkg/internal/netolly/ebpf/sock_tracer.go @@ -66,6 +66,7 @@ func NewSockFlowFetcher( // Resize aggregated flows and flow directions maps according to user-provided configuration spec.Maps[aggregatedFlowsMap].MaxEntries = uint32(cacheMaxSize) spec.Maps[flowDirectionsMap].MaxEntries = uint32(cacheMaxSize) + spec.Maps[connInitiatorsMap].MaxEntries = uint32(cacheMaxSize) traceMsgs := 0 if tlog.Enabled(context.TODO(), slog.LevelDebug) { diff --git a/pkg/internal/netolly/ebpf/tracer.go b/pkg/internal/netolly/ebpf/tracer.go index aea472047..31050be60 100644 --- a/pkg/internal/netolly/ebpf/tracer.go +++ b/pkg/internal/netolly/ebpf/tracer.go @@ -45,6 +45,7 @@ const ( constSampling = "sampling" constTraceMessages = "trace_messages" aggregatedFlowsMap = "aggregated_flows" + connInitiatorsMap = "conn_initiators" flowDirectionsMap = "flow_directions" ) @@ -86,6 +87,7 @@ func NewFlowFetcher( // Resize aggregated flows and flow directions maps according to user-provided configuration spec.Maps[aggregatedFlowsMap].MaxEntries = uint32(cacheMaxSize) spec.Maps[flowDirectionsMap].MaxEntries = uint32(cacheMaxSize) + spec.Maps[connInitiatorsMap].MaxEntries = uint32(cacheMaxSize) traceMsgs := 0 if tlog.Enabled(context.TODO(), slog.LevelDebug) { diff --git a/pkg/internal/netolly/ebpf/tracer_common.go b/pkg/internal/netolly/ebpf/tracer_common.go index fe5e82405..6bb09a3f7 100644 --- a/pkg/internal/netolly/ebpf/tracer_common.go +++ b/pkg/internal/netolly/ebpf/tracer_common.go @@ -7,5 +7,9 @@ const ( DirectionIngress = 0 DirectionEgress = 1 + // InitiatorSrc and InitiatorDst values set accordingly to flows_common.h definition + InitiatorSrc = 1 + InitiatorDst = 2 + InterfaceUnset = 0xFFFFFFFF ) diff --git a/pkg/internal/pipe/instrumenter_test.go b/pkg/internal/pipe/instrumenter_test.go index 1a145c308..03e685b74 100644 --- a/pkg/internal/pipe/instrumenter_test.go +++ b/pkg/internal/pipe/instrumenter_test.go @@ -44,7 +44,7 @@ func gctx(groups attributes.AttrGroups) *global.ContextInfo { } var allMetrics = attributes.Selection{ - attributes.HTTPServerDuration.Section: attributes.InclusionLists{Include: []string{"*"}}, + "*": attributes.InclusionLists{Include: []string{"*"}}, } func allMetricsBut(patterns ...string) attributes.Selection { diff --git a/pkg/transform/clustername.go b/pkg/transform/clustername.go index 81a6328a2..e1356abec 100644 --- a/pkg/transform/clustername.go +++ b/pkg/transform/clustername.go @@ -7,27 +7,20 @@ package transform import ( "bytes" "context" - "encoding/json" - "errors" "fmt" "io" "net/http" "strings" "time" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials" - "github.com/aws/aws-sdk-go-v2/service/ec2" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" + "go.opentelemetry.io/contrib/detectors/aws/eks" + + attr2 "github.com/grafana/beyla/pkg/internal/export/attributes/names" ) const ( gcpMetadataURL = "http://metadata.google.internal/computeMetadata/v1/instance/attributes/cluster-name" azureMetadataURL = "http://169.254.169.254/metadata/instance/compute/resourceGroupName?api-version=2017-08-01&format=text" - - ec2MetadataURL = "http://169.254.169.254/latest/meta-data" - ec2SecurityCredsURL = ec2MetadataURL + "/iam/security-credentials/" - ec2InstanceIdentityURL = "http://169.254.169.254/latest/dynamic/instance-identity/document/" ) var ( @@ -45,7 +38,7 @@ type clusterNameFetcher func(context.Context) (string, error) func fetchClusterName(ctx context.Context) string { log := klog().With("func", "fetchClusterName") var clusterNameFetchers = map[string]clusterNameFetcher{ - "EC2": ec2ClusterNameFetcher, + "EC2": eksClusterNameFetcher, "GCP": gcpClusterNameFetcher, "Azure": azureClusterNameFetcher, } @@ -105,103 +98,17 @@ func azureClusterNameFetcher(ctx context.Context) (string, error) { return splitAll[len(splitAll)-2], nil } -type ec2Identity struct { - Region string - InstanceID string - AccountID string -} - -func getInstanceIdentity(ctx context.Context) (*ec2Identity, error) { - instanceIdentity := &ec2Identity{} - - res, err := httpGet(ctx, ec2InstanceIdentityURL, nil) - if err != nil { - return instanceIdentity, fmt.Errorf("unable to fetch EC2 API to get identity: %w", err) - } - - err = json.Unmarshal([]byte(res), &instanceIdentity) - if err != nil { - return instanceIdentity, fmt.Errorf("unable to unmarshall json, %w", err) - } - - return instanceIdentity, nil -} - -type ec2SecurityCred struct { - AccessKeyID string - SecretAccessKey string - Token string -} - -func getSecurityCreds(ctx context.Context) (*ec2SecurityCred, error) { - iamParams := &ec2SecurityCred{} - - iamRole, err := getIAMRole(ctx) - if err != nil { - return iamParams, err - } - - res, err := httpGet(ctx, ec2SecurityCredsURL+iamRole, nil) - if err != nil { - return iamParams, fmt.Errorf("unable to fetch EC2 API to get iam role: %w", err) - } - - err = json.Unmarshal([]byte(res), &iamParams) - if err != nil { - return iamParams, fmt.Errorf("unable to unmarshall json, %w", err) - } - return iamParams, nil -} - -func getIAMRole(ctx context.Context) (string, error) { - res, err := httpGet(ctx, ec2SecurityCredsURL, nil) - if err != nil { - return "", fmt.Errorf("unable to fetch EC2 API to get security credentials: %w", err) - } - - return res, nil -} - -func ec2ClusterNameFetcher(ctx context.Context) (string, error) { - instanceIdentity, err := getInstanceIdentity(ctx) +func eksClusterNameFetcher(ctx context.Context) (string, error) { + // Instantiate a new EKS Resource detector + eksResourceDetector := eks.NewResourceDetector() + resource, err := eksResourceDetector.Detect(ctx) if err != nil { return "", err } - - secCreds, err := getSecurityCreds(ctx) - if err != nil { - return "", err - } - awsCreds := credentials.NewStaticCredentialsProvider(secCreds.AccessKeyID, secCreds.SecretAccessKey, secCreds.Token) - - connection := ec2.New(ec2.Options{ - Region: instanceIdentity.Region, - Credentials: awsCreds, - }) - - ec2Tags, err := connection.DescribeTags(ctx, - &ec2.DescribeTagsInput{ - Filters: []types.Filter{{ - Name: aws.String("resource-id"), - Values: []string{ - instanceIdentity.InstanceID, - }, - }}, - }, - ) - if err != nil { - return "", fmt.Errorf("retrieving EC2 tags: %w", err) - } - - // tagsStr is a newline-separated list of strings containing tag keys - for _, tag := range ec2Tags.Tags { - if tag.Key == nil { - continue - } - // tag key format: kubernetes.io/cluster/clustername" - if strings.HasPrefix(*tag.Key, "kubernetes.io/cluster/") { - return strings.Split(*tag.Key, "/")[2], nil + for _, attr := range resource.Attributes() { + if string(attr.Key) == string(attr2.K8sClusterName) { + return attr.Value.Emit(), nil } } - return "", errors.New("did not find any kubernetes.io/cluster/... tag") + return "", fmt.Errorf("did not find any cluster attribute in %+v", resource.Attributes()) } diff --git a/test/integration/configs/instrumenter-config-netolly-direction.yml b/test/integration/configs/instrumenter-config-netolly-direction.yml index e35249900..be4899a3f 100644 --- a/test/integration/configs/instrumenter-config-netolly-direction.yml +++ b/test/integration/configs/instrumenter-config-netolly-direction.yml @@ -15,3 +15,5 @@ attributes: - dst.cidr - iface - direction + - client.port + - server.port diff --git a/test/integration/k8s/manifests/06-beyla-netolly-sk-promexport.yml b/test/integration/k8s/manifests/06-beyla-netolly-tc-promexport.yml similarity index 98% rename from test/integration/k8s/manifests/06-beyla-netolly-sk-promexport.yml rename to test/integration/k8s/manifests/06-beyla-netolly-tc-promexport.yml index 789c6ccd3..82240346c 100644 --- a/test/integration/k8s/manifests/06-beyla-netolly-sk-promexport.yml +++ b/test/integration/k8s/manifests/06-beyla-netolly-tc-promexport.yml @@ -89,7 +89,7 @@ spec: - name: BEYLA_NETWORK_METRICS value: "true" - name: BEYLA_NETWORK_SOURCE - value: "socket_filter" + value: "tc" - name: BEYLA_NETWORK_CACHE_ACTIVE_TIMEOUT value: "100ms" - name: BEYLA_NETWORK_CACHE_MAX_FLOWS diff --git a/test/integration/k8s/netolly/k8s_netolly_network_metrics.go b/test/integration/k8s/netolly/k8s_netolly_network_metrics.go index 0af0c44d7..57d93cec5 100644 --- a/test/integration/k8s/netolly/k8s_netolly_network_metrics.go +++ b/test/integration/k8s/netolly/k8s_netolly_network_metrics.go @@ -56,6 +56,8 @@ func DoTestNetFlowBytesForExistingConnections(ctx context.Context, t *testing.T, assert.Equal(t, "Service", metric["k8s_dst_type"]) assert.Contains(t, podSubnets, metric["src_cidr"], metric) assert.Contains(t, svcSubnets, metric["dst_cidr"], metric) + assert.Equal(t, "8080", metric["server_port"]) + assert.NotEqual(t, "8080", metric["client_port"]) // services don't have host IP or name }) // testing request flows (to testserver as Pod) @@ -89,6 +91,8 @@ func DoTestNetFlowBytesForExistingConnections(ctx context.Context, t *testing.T, assertIsIP(t, metric["k8s_dst_node_ip"]) assert.Contains(t, podSubnets, metric["src_cidr"], metric) assert.Contains(t, podSubnets, metric["dst_cidr"], metric) + assert.Equal(t, "8080", metric["server_port"]) + assert.NotEqual(t, "8080", metric["client_port"]) }) // testing response flows (from testserver Pod) @@ -122,6 +126,8 @@ func DoTestNetFlowBytesForExistingConnections(ctx context.Context, t *testing.T, assert.Contains(t, podSubnets, metric["src_cidr"], metric) assert.Contains(t, podSubnets, metric["dst_cidr"], metric) assert.Equal(t, "TCP", metric["transport"]) + assert.Equal(t, "8080", metric["server_port"]) + assert.NotEqual(t, "8080", metric["client_port"]) }) // testing response flows (from testserver Service) @@ -151,6 +157,8 @@ func DoTestNetFlowBytesForExistingConnections(ctx context.Context, t *testing.T, assertIsIP(t, metric["k8s_dst_node_ip"]) assert.Contains(t, svcSubnets, metric["src_cidr"], metric) assert.Contains(t, podSubnets, metric["dst_cidr"], metric) + assert.Equal(t, "8080", metric["server_port"]) + assert.NotEqual(t, "8080", metric["client_port"]) }) // check that there aren't captured flows if there is no communication diff --git a/test/integration/k8s/netolly_sk_promexport/k8s_netolly_prom_main_test.go b/test/integration/k8s/netolly_tc_promexport/k8s_netolly_prom_main_test.go similarity index 97% rename from test/integration/k8s/netolly_sk_promexport/k8s_netolly_prom_main_test.go rename to test/integration/k8s/netolly_tc_promexport/k8s_netolly_prom_main_test.go index 1347633d0..c48fa2858 100644 --- a/test/integration/k8s/netolly_sk_promexport/k8s_netolly_prom_main_test.go +++ b/test/integration/k8s/netolly_tc_promexport/k8s_netolly_prom_main_test.go @@ -42,7 +42,7 @@ func TestMain(m *testing.M) { kube.Deploy(k8s.PathManifests+"/01-serviceaccount.yml"), kube.Deploy(k8s.PathManifests+"/02-prometheus-promscrape.yml"), kube.Deploy(k8s.PathManifests+"/05-uninstrumented-service.yml"), - kube.Deploy(k8s.PathManifests+"/06-beyla-netolly-sk-promexport.yml"), + kube.Deploy(k8s.PathManifests+"/06-beyla-netolly-tc-promexport.yml"), ) cluster.Run(m) diff --git a/test/integration/suites_network_test.go b/test/integration/suites_network_test.go index 15e96d900..439193789 100644 --- a/test/integration/suites_network_test.go +++ b/test/integration/suites_network_test.go @@ -94,7 +94,7 @@ func TestNetwork_AllowedAttributes(t *testing.T) { func TestNetwork_Direction(t *testing.T) { compose, err := docker.ComposeSuite("docker-compose-netolly-direction.yml", path.Join(pathOutput, "test-suite-netolly-direction.log")) - compose.Env = append(compose.Env, "BEYLA_NETWORK_DEDUPER=first_come", "BEYLA_EXECUTABLE_NAME=", `BEYLA_CONFIG_SUFFIX=-direction`) + compose.Env = append(compose.Env, "BEYLA_NETWORK_DEDUPER=first_come", "BEYLA_NETWORK_SOURCE=tc", "BEYLA_EXECUTABLE_NAME=", `BEYLA_CONFIG_SUFFIX=-direction`) require.NoError(t, err) require.NoError(t, compose.Up()) @@ -103,11 +103,16 @@ func TestNetwork_Direction(t *testing.T) { require.Contains(t, f.Metric, "direction") } - // test correct direction labels + // test correct direction labels and client/server ports client := results[slices.IndexFunc(results, func(result prom.Result) bool { return result.Metric["dst_port"] == "8080" })] - require.Equal(t, client.Metric["direction"], "egress") + require.Equal(t, "egress", client.Metric["direction"]) + require.Equal(t, "7000", client.Metric["client_port"]) + require.Equal(t, "8080", client.Metric["server_port"]) + server := results[slices.IndexFunc(results, func(result prom.Result) bool { return result.Metric["src_port"] == "8080" })] - require.Equal(t, server.Metric["direction"], "ingress") + require.Equal(t, "ingress", server.Metric["direction"], "ingress") + require.Equal(t, "7000", client.Metric["client_port"]) + require.Equal(t, "8080", client.Metric["server_port"]) require.NoError(t, compose.Close()) } @@ -123,11 +128,17 @@ func TestNetwork_Direction_Use_Socket_Filter(t *testing.T) { require.Contains(t, f.Metric, "direction") } - // test correct direction labels + // test correct direction labels and client/server ports client := results[slices.IndexFunc(results, func(result prom.Result) bool { return result.Metric["dst_port"] == "8080" })] - require.Equal(t, client.Metric["direction"], "egress") + require.Equal(t, "egress", client.Metric["direction"]) + require.Equal(t, "7000", client.Metric["client_port"]) + require.Equal(t, "8080", client.Metric["server_port"]) + server := results[slices.IndexFunc(results, func(result prom.Result) bool { return result.Metric["src_port"] == "8080" })] require.Equal(t, server.Metric["direction"], "ingress") + require.Equal(t, "ingress", server.Metric["direction"], "ingress") + require.Equal(t, "7000", client.Metric["client_port"]) + require.Equal(t, "8080", client.Metric["server_port"]) require.NoError(t, compose.Close()) } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt deleted file mode 100644 index 899129ecc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt +++ /dev/null @@ -1,3 +0,0 @@ -AWS SDK for Go -Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright 2014-2015 Stripe, Inc. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go deleted file mode 100644 index 2264200c1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go +++ /dev/null @@ -1,208 +0,0 @@ -package aws - -import ( - "net/http" - - smithybearer "github.com/aws/smithy-go/auth/bearer" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// HTTPClient provides the interface to provide custom HTTPClients. Generally -// *http.Client is sufficient for most use cases. The HTTPClient should not -// follow 301 or 302 redirects. -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// A Config provides service configuration for service clients. -type Config struct { - // The region to send requests to. This parameter is required and must - // be configured globally or on a per-client basis unless otherwise - // noted. A full list of regions is found in the "Regions and Endpoints" - // document. - // - // See http://docs.aws.amazon.com/general/latest/gr/rande.html for - // information on AWS regions. - Region string - - // The credentials object to use when signing requests. - // Use the LoadDefaultConfig to load configuration from all the SDK's supported - // sources, and resolve credentials using the SDK's default credential chain. - Credentials CredentialsProvider - - // The Bearer Authentication token provider to use for authenticating API - // operation calls with a Bearer Authentication token. The API clients and - // operation must support Bearer Authentication scheme in order for the - // token provider to be used. API clients created with NewFromConfig will - // automatically be configured with this option, if the API client support - // Bearer Authentication. - // - // The SDK's config.LoadDefaultConfig can automatically populate this - // option for external configuration options such as SSO session. - // https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html - BearerAuthTokenProvider smithybearer.TokenProvider - - // The HTTP Client the SDK's API clients will use to invoke HTTP requests. - // The SDK defaults to a BuildableClient allowing API clients to create - // copies of the HTTP Client for service specific customizations. - // - // Use a (*http.Client) for custom behavior. Using a custom http.Client - // will prevent the SDK from modifying the HTTP client. - HTTPClient HTTPClient - - // An endpoint resolver that can be used to provide or override an endpoint - // for the given service and region. - // - // See the `aws.EndpointResolver` documentation for additional usage - // information. - // - // Deprecated: See Config.EndpointResolverWithOptions - EndpointResolver EndpointResolver - - // An endpoint resolver that can be used to provide or override an endpoint - // for the given service and region. - // - // When EndpointResolverWithOptions is specified, it will be used by a - // service client rather than using EndpointResolver if also specified. - // - // See the `aws.EndpointResolverWithOptions` documentation for additional - // usage information. - // - // Deprecated: with the release of endpoint resolution v2 in API clients, - // EndpointResolver and EndpointResolverWithOptions are deprecated. - // Providing a value for this field will likely prevent you from using - // newer endpoint-related service features. See API client options - // EndpointResolverV2 and BaseEndpoint. - EndpointResolverWithOptions EndpointResolverWithOptions - - // RetryMaxAttempts specifies the maximum number attempts an API client - // will call an operation that fails with a retryable error. - // - // API Clients will only use this value to construct a retryer if the - // Config.Retryer member is not nil. This value will be ignored if - // Retryer is not nil. - RetryMaxAttempts int - - // RetryMode specifies the retry model the API client will be created with. - // - // API Clients will only use this value to construct a retryer if the - // Config.Retryer member is not nil. This value will be ignored if - // Retryer is not nil. - RetryMode RetryMode - - // Retryer is a function that provides a Retryer implementation. A Retryer - // guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. - // - // In general, the provider function should return a new instance of a - // Retryer if you are attempting to provide a consistent Retryer - // configuration across all clients. This will ensure that each client will - // be provided a new instance of the Retryer implementation, and will avoid - // issues such as sharing the same retry token bucket across services. - // - // If not nil, RetryMaxAttempts, and RetryMode will be ignored by API - // clients. - Retryer func() Retryer - - // ConfigSources are the sources that were used to construct the Config. - // Allows for additional configuration to be loaded by clients. - ConfigSources []interface{} - - // APIOptions provides the set of middleware mutations modify how the API - // client requests will be handled. This is useful for adding additional - // tracing data to a request, or changing behavior of the SDK's client. - APIOptions []func(*middleware.Stack) error - - // The logger writer interface to write logging messages to. Defaults to - // standard error. - Logger logging.Logger - - // Configures the events that will be sent to the configured logger. This - // can be used to configure the logging of signing, retries, request, and - // responses of the SDK clients. - // - // See the ClientLogMode type documentation for the complete set of logging - // modes and available configuration. - ClientLogMode ClientLogMode - - // The configured DefaultsMode. If not specified, service clients will - // default to legacy. - // - // Supported modes are: auto, cross-region, in-region, legacy, mobile, - // standard - DefaultsMode DefaultsMode - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode - // is set to DefaultsModeAuto and is initialized by - // `config.LoadDefaultConfig`. You should not populate this structure - // programmatically, or rely on the values here within your applications. - RuntimeEnvironment RuntimeEnvironment - - // AppId is an optional application specific identifier that can be set. - // When set it will be appended to the User-Agent header of every request - // in the form of App/{AppId}. This variable is sourced from environment - // variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id. - // See https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html for - // more information on environment variables and shared config settings. - AppID string - - // BaseEndpoint is an intermediary transfer location to a service specific - // BaseEndpoint on a service's Options. - BaseEndpoint *string - - // DisableRequestCompression toggles if an operation request could be - // compressed or not. Will be set to false by default. This variable is sourced from - // environment variable AWS_DISABLE_REQUEST_COMPRESSION or the shared config profile attribute - // disable_request_compression - DisableRequestCompression bool - - // RequestMinCompressSizeBytes sets the inclusive min bytes of a request body that could be - // compressed. Will be set to 10240 by default and must be within 0 and 10485760 bytes inclusively. - // This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or - // the shared config profile attribute request_min_compression_size_bytes - RequestMinCompressSizeBytes int64 -} - -// NewConfig returns a new Config pointer that can be chained with builder -// methods to set multiple configuration values inline without using pointers. -func NewConfig() *Config { - return &Config{} -} - -// Copy will return a shallow copy of the Config object. -func (c Config) Copy() Config { - cp := c - return cp -} - -// EndpointDiscoveryEnableState indicates if endpoint discovery is -// enabled, disabled, auto or unset state. -// -// Default behavior (Auto or Unset) indicates operations that require endpoint -// discovery will use Endpoint Discovery by default. Operations that -// optionally use Endpoint Discovery will not use Endpoint Discovery -// unless EndpointDiscovery is explicitly enabled. -type EndpointDiscoveryEnableState uint - -// Enumeration values for EndpointDiscoveryEnableState -const ( - // EndpointDiscoveryUnset represents EndpointDiscoveryEnableState is unset. - // Users do not need to use this value explicitly. The behavior for unset - // is the same as for EndpointDiscoveryAuto. - EndpointDiscoveryUnset EndpointDiscoveryEnableState = iota - - // EndpointDiscoveryAuto represents an AUTO state that allows endpoint - // discovery only when required by the api. This is the default - // configuration resolved by the client if endpoint discovery is neither - // enabled or disabled. - EndpointDiscoveryAuto // default state - - // EndpointDiscoveryDisabled indicates client MUST not perform endpoint - // discovery even when required. - EndpointDiscoveryDisabled - - // EndpointDiscoveryEnabled indicates client MUST always perform endpoint - // discovery if supported for the operation. - EndpointDiscoveryEnabled -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go deleted file mode 100644 index 4d8e26ef3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go +++ /dev/null @@ -1,22 +0,0 @@ -package aws - -import ( - "context" - "time" -) - -type suppressedContext struct { - context.Context -} - -func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) { - return time.Time{}, false -} - -func (s *suppressedContext) Done() <-chan struct{} { - return nil -} - -func (s *suppressedContext) Err() error { - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go deleted file mode 100644 index 781ac0ae2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go +++ /dev/null @@ -1,224 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "sync/atomic" - "time" - - sdkrand "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/sync/singleflight" -) - -// CredentialsCacheOptions are the options -type CredentialsCacheOptions struct { - - // ExpiryWindow will allow the credentials to trigger refreshing prior to - // the credentials actually expiring. This is beneficial so race conditions - // with expiring credentials do not cause request to fail unexpectedly - // due to ExpiredTokenException exceptions. - // - // An ExpiryWindow of 10s would cause calls to IsExpired() to return true - // 10 seconds before the credentials are actually expired. This can cause an - // increased number of requests to refresh the credentials to occur. - // - // If ExpiryWindow is 0 or less it will be ignored. - ExpiryWindow time.Duration - - // ExpiryWindowJitterFrac provides a mechanism for randomizing the - // expiration of credentials within the configured ExpiryWindow by a random - // percentage. Valid values are between 0.0 and 1.0. - // - // As an example if ExpiryWindow is 60 seconds and ExpiryWindowJitterFrac - // is 0.5 then credentials will be set to expire between 30 to 60 seconds - // prior to their actual expiration time. - // - // If ExpiryWindow is 0 or less then ExpiryWindowJitterFrac is ignored. - // If ExpiryWindowJitterFrac is 0 then no randomization will be applied to the window. - // If ExpiryWindowJitterFrac < 0 the value will be treated as 0. - // If ExpiryWindowJitterFrac > 1 the value will be treated as 1. - ExpiryWindowJitterFrac float64 -} - -// CredentialsCache provides caching and concurrency safe credentials retrieval -// via the provider's retrieve method. -// -// CredentialsCache will look for optional interfaces on the Provider to adjust -// how the credential cache handles credentials caching. -// -// - HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle -// credential refresh failures. This could return an updated Credentials -// value, or attempt another means of retrieving credentials. -// -// - AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how -// credentials Expires is modified. This could modify how the Credentials -// Expires is adjusted based on the CredentialsCache ExpiryWindow option. -// Such as providing a floor not to reduce the Expires below. -type CredentialsCache struct { - provider CredentialsProvider - - options CredentialsCacheOptions - creds atomic.Value - sf singleflight.Group -} - -// NewCredentialsCache returns a CredentialsCache that wraps provider. Provider -// is expected to not be nil. A variadic list of one or more functions can be -// provided to modify the CredentialsCache configuration. This allows for -// configuration of credential expiry window and jitter. -func NewCredentialsCache(provider CredentialsProvider, optFns ...func(options *CredentialsCacheOptions)) *CredentialsCache { - options := CredentialsCacheOptions{} - - for _, fn := range optFns { - fn(&options) - } - - if options.ExpiryWindow < 0 { - options.ExpiryWindow = 0 - } - - if options.ExpiryWindowJitterFrac < 0 { - options.ExpiryWindowJitterFrac = 0 - } else if options.ExpiryWindowJitterFrac > 1 { - options.ExpiryWindowJitterFrac = 1 - } - - return &CredentialsCache{ - provider: provider, - options: options, - } -} - -// Retrieve returns the credentials. If the credentials have already been -// retrieved, and not expired the cached credentials will be returned. If the -// credentials have not been retrieved yet, or expired the provider's Retrieve -// method will be called. -// -// Returns and error if the provider's retrieve method returns an error. -func (p *CredentialsCache) Retrieve(ctx context.Context) (Credentials, error) { - if creds, ok := p.getCreds(); ok && !creds.Expired() { - return creds, nil - } - - resCh := p.sf.DoChan("", func() (interface{}, error) { - return p.singleRetrieve(&suppressedContext{ctx}) - }) - select { - case res := <-resCh: - return res.Val.(Credentials), res.Err - case <-ctx.Done(): - return Credentials{}, &RequestCanceledError{Err: ctx.Err()} - } -} - -func (p *CredentialsCache) singleRetrieve(ctx context.Context) (interface{}, error) { - currCreds, ok := p.getCreds() - if ok && !currCreds.Expired() { - return currCreds, nil - } - - newCreds, err := p.provider.Retrieve(ctx) - if err != nil { - handleFailToRefresh := defaultHandleFailToRefresh - if cs, ok := p.provider.(HandleFailRefreshCredentialsCacheStrategy); ok { - handleFailToRefresh = cs.HandleFailToRefresh - } - newCreds, err = handleFailToRefresh(ctx, currCreds, err) - if err != nil { - return Credentials{}, fmt.Errorf("failed to refresh cached credentials, %w", err) - } - } - - if newCreds.CanExpire && p.options.ExpiryWindow > 0 { - adjustExpiresBy := defaultAdjustExpiresBy - if cs, ok := p.provider.(AdjustExpiresByCredentialsCacheStrategy); ok { - adjustExpiresBy = cs.AdjustExpiresBy - } - - randFloat64, err := sdkrand.CryptoRandFloat64() - if err != nil { - return Credentials{}, fmt.Errorf("failed to get random provider, %w", err) - } - - var jitter time.Duration - if p.options.ExpiryWindowJitterFrac > 0 { - jitter = time.Duration(randFloat64 * - p.options.ExpiryWindowJitterFrac * float64(p.options.ExpiryWindow)) - } - - newCreds, err = adjustExpiresBy(newCreds, -(p.options.ExpiryWindow - jitter)) - if err != nil { - return Credentials{}, fmt.Errorf("failed to adjust credentials expires, %w", err) - } - } - - p.creds.Store(&newCreds) - return newCreds, nil -} - -// getCreds returns the currently stored credentials and true. Returning false -// if no credentials were stored. -func (p *CredentialsCache) getCreds() (Credentials, bool) { - v := p.creds.Load() - if v == nil { - return Credentials{}, false - } - - c := v.(*Credentials) - if c == nil || !c.HasKeys() { - return Credentials{}, false - } - - return *c, true -} - -// Invalidate will invalidate the cached credentials. The next call to Retrieve -// will cause the provider's Retrieve method to be called. -func (p *CredentialsCache) Invalidate() { - p.creds.Store((*Credentials)(nil)) -} - -// IsCredentialsProvider returns whether credential provider wrapped by CredentialsCache -// matches the target provider type. -func (p *CredentialsCache) IsCredentialsProvider(target CredentialsProvider) bool { - return IsCredentialsProvider(p.provider, target) -} - -// HandleFailRefreshCredentialsCacheStrategy is an interface for -// CredentialsCache to allow CredentialsProvider how failed to refresh -// credentials is handled. -type HandleFailRefreshCredentialsCacheStrategy interface { - // Given the previously cached Credentials, if any, and refresh error, may - // returns new or modified set of Credentials, or error. - // - // Credential caches may use default implementation if nil. - HandleFailToRefresh(context.Context, Credentials, error) (Credentials, error) -} - -// defaultHandleFailToRefresh returns the passed in error. -func defaultHandleFailToRefresh(ctx context.Context, _ Credentials, err error) (Credentials, error) { - return Credentials{}, err -} - -// AdjustExpiresByCredentialsCacheStrategy is an interface for CredentialCache -// to allow CredentialsProvider to intercept adjustments to Credentials expiry -// based on expectations and use cases of CredentialsProvider. -// -// Credential caches may use default implementation if nil. -type AdjustExpiresByCredentialsCacheStrategy interface { - // Given a Credentials as input, applying any mutations and - // returning the potentially updated Credentials, or error. - AdjustExpiresBy(Credentials, time.Duration) (Credentials, error) -} - -// defaultAdjustExpiresBy adds the duration to the passed in credentials Expires, -// and returns the updated credentials value. If Credentials value's CanExpire -// is false, the passed in credentials are returned unchanged. -func defaultAdjustExpiresBy(creds Credentials, dur time.Duration) (Credentials, error) { - if !creds.CanExpire { - return creds, nil - } - - creds.Expires = creds.Expires.Add(dur) - return creds, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go deleted file mode 100644 index 714d4ad85..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go +++ /dev/null @@ -1,170 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "reflect" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/sdk" -) - -// AnonymousCredentials provides a sentinel CredentialsProvider that should be -// used to instruct the SDK's signing middleware to not sign the request. -// -// Using `nil` credentials when configuring an API client will achieve the same -// result. The AnonymousCredentials type allows you to configure the SDK's -// external config loading to not attempt to source credentials from the shared -// config or environment. -// -// For example you can use this CredentialsProvider with an API client's -// Options to instruct the client not to sign a request for accessing public -// S3 bucket objects. -// -// The following example demonstrates using the AnonymousCredentials to prevent -// SDK's external config loading attempt to resolve credentials. -// -// cfg, err := config.LoadDefaultConfig(context.TODO(), -// config.WithCredentialsProvider(aws.AnonymousCredentials{}), -// ) -// if err != nil { -// log.Fatalf("failed to load config, %v", err) -// } -// -// client := s3.NewFromConfig(cfg) -// -// Alternatively you can leave the API client Option's `Credential` member to -// nil. If using the `NewFromConfig` constructor you'll need to explicitly set -// the `Credentials` member to nil, if the external config resolved a -// credential provider. -// -// client := s3.New(s3.Options{ -// // Credentials defaults to a nil value. -// }) -// -// This can also be configured for specific operations calls too. -// -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// log.Fatalf("failed to load config, %v", err) -// } -// -// client := s3.NewFromConfig(config) -// -// result, err := client.GetObject(context.TODO(), s3.GetObject{ -// Bucket: aws.String("example-bucket"), -// Key: aws.String("example-key"), -// }, func(o *s3.Options) { -// o.Credentials = nil -// // Or -// o.Credentials = aws.AnonymousCredentials{} -// }) -type AnonymousCredentials struct{} - -// Retrieve implements the CredentialsProvider interface, but will always -// return error, and cannot be used to sign a request. The AnonymousCredentials -// type is used as a sentinel type instructing the AWS request signing -// middleware to not sign a request. -func (AnonymousCredentials) Retrieve(context.Context) (Credentials, error) { - return Credentials{Source: "AnonymousCredentials"}, - fmt.Errorf("the AnonymousCredentials is not a valid credential provider, and cannot be used to sign AWS requests with") -} - -// A Credentials is the AWS credentials value for individual credential fields. -type Credentials struct { - // AWS Access key ID - AccessKeyID string - - // AWS Secret Access Key - SecretAccessKey string - - // AWS Session Token - SessionToken string - - // Source of the credentials - Source string - - // States if the credentials can expire or not. - CanExpire bool - - // The time the credentials will expire at. Should be ignored if CanExpire - // is false. - Expires time.Time -} - -// Expired returns if the credentials have expired. -func (v Credentials) Expired() bool { - if v.CanExpire { - // Calling Round(0) on the current time will truncate the monotonic - // reading only. Ensures credential expiry time is always based on - // reported wall-clock time. - return !v.Expires.After(sdk.NowTime().Round(0)) - } - - return false -} - -// HasKeys returns if the credentials keys are set. -func (v Credentials) HasKeys() bool { - return len(v.AccessKeyID) > 0 && len(v.SecretAccessKey) > 0 -} - -// A CredentialsProvider is the interface for any component which will provide -// credentials Credentials. A CredentialsProvider is required to manage its own -// Expired state, and what to be expired means. -// -// A credentials provider implementation can be wrapped with a CredentialCache -// to cache the credential value retrieved. Without the cache the SDK will -// attempt to retrieve the credentials for every request. -type CredentialsProvider interface { - // Retrieve returns nil if it successfully retrieved the value. - // Error is returned if the value were not obtainable, or empty. - Retrieve(ctx context.Context) (Credentials, error) -} - -// CredentialsProviderFunc provides a helper wrapping a function value to -// satisfy the CredentialsProvider interface. -type CredentialsProviderFunc func(context.Context) (Credentials, error) - -// Retrieve delegates to the function value the CredentialsProviderFunc wraps. -func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) { - return fn(ctx) -} - -type isCredentialsProvider interface { - IsCredentialsProvider(CredentialsProvider) bool -} - -// IsCredentialsProvider returns whether the target CredentialProvider is the same type as provider when comparing the -// implementation type. -// -// If provider has a method IsCredentialsProvider(CredentialsProvider) bool it will be responsible for validating -// whether target matches the credential provider type. -// -// When comparing the CredentialProvider implementations provider and target for equality, the following rules are used: -// -// If provider is of type T and target is of type V, true if type *T is the same as type *V, otherwise false -// If provider is of type *T and target is of type V, true if type *T is the same as type *V, otherwise false -// If provider is of type T and target is of type *V, true if type *T is the same as type *V, otherwise false -// If provider is of type *T and target is of type *V,true if type *T is the same as type *V, otherwise false -func IsCredentialsProvider(provider, target CredentialsProvider) bool { - if target == nil || provider == nil { - return provider == target - } - - if x, ok := provider.(isCredentialsProvider); ok { - return x.IsCredentialsProvider(target) - } - - targetType := reflect.TypeOf(target) - if targetType.Kind() != reflect.Ptr { - targetType = reflect.PtrTo(targetType) - } - - providerType := reflect.TypeOf(provider) - if providerType.Kind() != reflect.Ptr { - providerType = reflect.PtrTo(providerType) - } - - return targetType.AssignableTo(providerType) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go deleted file mode 100644 index fd408e518..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go +++ /dev/null @@ -1,38 +0,0 @@ -package defaults - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - "runtime" - "strings" -) - -var getGOOS = func() string { - return runtime.GOOS -} - -// ResolveDefaultsModeAuto is used to determine the effective aws.DefaultsMode when the mode -// is set to aws.DefaultsModeAuto. -func ResolveDefaultsModeAuto(region string, environment aws.RuntimeEnvironment) aws.DefaultsMode { - goos := getGOOS() - if goos == "android" || goos == "ios" { - return aws.DefaultsModeMobile - } - - var currentRegion string - if len(environment.EnvironmentIdentifier) > 0 { - currentRegion = environment.Region - } - - if len(currentRegion) == 0 && len(environment.EC2InstanceMetadataRegion) > 0 { - currentRegion = environment.EC2InstanceMetadataRegion - } - - if len(region) > 0 && len(currentRegion) > 0 { - if strings.EqualFold(region, currentRegion) { - return aws.DefaultsModeInRegion - } - return aws.DefaultsModeCrossRegion - } - - return aws.DefaultsModeStandard -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go deleted file mode 100644 index 8b7e01fa2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go +++ /dev/null @@ -1,43 +0,0 @@ -package defaults - -import ( - "time" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// Configuration is the set of SDK configuration options that are determined based -// on the configured DefaultsMode. -type Configuration struct { - // RetryMode is the configuration's default retry mode API clients should - // use for constructing a Retryer. - RetryMode aws.RetryMode - - // ConnectTimeout is the maximum amount of time a dial will wait for - // a connect to complete. - // - // See https://pkg.go.dev/net#Dialer.Timeout - ConnectTimeout *time.Duration - - // TLSNegotiationTimeout specifies the maximum amount of time waiting to - // wait for a TLS handshake. - // - // See https://pkg.go.dev/net/http#Transport.TLSHandshakeTimeout - TLSNegotiationTimeout *time.Duration -} - -// GetConnectTimeout returns the ConnectTimeout value, returns false if the value is not set. -func (c *Configuration) GetConnectTimeout() (time.Duration, bool) { - if c.ConnectTimeout == nil { - return 0, false - } - return *c.ConnectTimeout, true -} - -// GetTLSNegotiationTimeout returns the TLSNegotiationTimeout value, returns false if the value is not set. -func (c *Configuration) GetTLSNegotiationTimeout() (time.Duration, bool) { - if c.TLSNegotiationTimeout == nil { - return 0, false - } - return *c.TLSNegotiationTimeout, true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go deleted file mode 100644 index dbaa873dc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by github.com/aws/aws-sdk-go-v2/internal/codegen/cmd/defaultsconfig. DO NOT EDIT. - -package defaults - -import ( - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "time" -) - -// GetModeConfiguration returns the default Configuration descriptor for the given mode. -// -// Supports the following modes: cross-region, in-region, mobile, standard -func GetModeConfiguration(mode aws.DefaultsMode) (Configuration, error) { - var mv aws.DefaultsMode - mv.SetFromString(string(mode)) - - switch mv { - case aws.DefaultsModeCrossRegion: - settings := Configuration{ - ConnectTimeout: aws.Duration(3100 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond), - } - return settings, nil - case aws.DefaultsModeInRegion: - settings := Configuration{ - ConnectTimeout: aws.Duration(1100 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(1100 * time.Millisecond), - } - return settings, nil - case aws.DefaultsModeMobile: - settings := Configuration{ - ConnectTimeout: aws.Duration(30000 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(30000 * time.Millisecond), - } - return settings, nil - case aws.DefaultsModeStandard: - settings := Configuration{ - ConnectTimeout: aws.Duration(3100 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond), - } - return settings, nil - default: - return Configuration{}, fmt.Errorf("unsupported defaults mode: %v", mode) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go deleted file mode 100644 index 2d90011b4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package defaults provides recommended configuration values for AWS SDKs and CLIs. -package defaults diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go deleted file mode 100644 index fcf9387c2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by github.com/aws/aws-sdk-go-v2/internal/codegen/cmd/defaultsmode. DO NOT EDIT. - -package aws - -import ( - "strings" -) - -// DefaultsMode is the SDK defaults mode setting. -type DefaultsMode string - -// The DefaultsMode constants. -const ( - // DefaultsModeAuto is an experimental mode that builds on the standard mode. - // The SDK will attempt to discover the execution environment to determine the - // appropriate settings automatically. - // - // Note that the auto detection is heuristics-based and does not guarantee 100% - // accuracy. STANDARD mode will be used if the execution environment cannot - // be determined. The auto detection might query EC2 Instance Metadata service - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html), - // which might introduce latency. Therefore we recommend choosing an explicit - // defaults_mode instead if startup latency is critical to your application - DefaultsModeAuto DefaultsMode = "auto" - - // DefaultsModeCrossRegion builds on the standard mode and includes optimization - // tailored for applications which call AWS services in a different region - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeCrossRegion DefaultsMode = "cross-region" - - // DefaultsModeInRegion builds on the standard mode and includes optimization - // tailored for applications which call AWS services from within the same AWS - // region - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeInRegion DefaultsMode = "in-region" - - // DefaultsModeLegacy provides default settings that vary per SDK and were used - // prior to establishment of defaults_mode - DefaultsModeLegacy DefaultsMode = "legacy" - - // DefaultsModeMobile builds on the standard mode and includes optimization - // tailored for mobile applications - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeMobile DefaultsMode = "mobile" - - // DefaultsModeStandard provides the latest recommended default values that - // should be safe to run in most scenarios - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeStandard DefaultsMode = "standard" -) - -// SetFromString sets the DefaultsMode value to one of the pre-defined constants that matches -// the provided string when compared using EqualFold. If the value does not match a known -// constant it will be set to as-is and the function will return false. As a special case, if the -// provided value is a zero-length string, the mode will be set to LegacyDefaultsMode. -func (d *DefaultsMode) SetFromString(v string) (ok bool) { - switch { - case strings.EqualFold(v, string(DefaultsModeAuto)): - *d = DefaultsModeAuto - ok = true - case strings.EqualFold(v, string(DefaultsModeCrossRegion)): - *d = DefaultsModeCrossRegion - ok = true - case strings.EqualFold(v, string(DefaultsModeInRegion)): - *d = DefaultsModeInRegion - ok = true - case strings.EqualFold(v, string(DefaultsModeLegacy)): - *d = DefaultsModeLegacy - ok = true - case strings.EqualFold(v, string(DefaultsModeMobile)): - *d = DefaultsModeMobile - ok = true - case strings.EqualFold(v, string(DefaultsModeStandard)): - *d = DefaultsModeStandard - ok = true - case len(v) == 0: - *d = DefaultsModeLegacy - ok = true - default: - *d = DefaultsMode(v) - } - return ok -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go deleted file mode 100644 index d8b6e09e5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go +++ /dev/null @@ -1,62 +0,0 @@ -// Package aws provides the core SDK's utilities and shared types. Use this package's -// utilities to simplify setting and reading API operations parameters. -// -// # Value and Pointer Conversion Utilities -// -// This package includes a helper conversion utility for each scalar type the SDK's -// API use. These utilities make getting a pointer of the scalar, and dereferencing -// a pointer easier. -// -// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value. -// The Pointer to value will safely dereference the pointer and return its value. -// If the pointer was nil, the scalar's zero value will be returned. -// -// The value to pointer functions will be named after the scalar type. So get a -// *string from a string value use the "String" function. This makes it easy to -// to get pointer of a literal string value, because getting the address of a -// literal requires assigning the value to a variable first. -// -// var strPtr *string -// -// // Without the SDK's conversion functions -// str := "my string" -// strPtr = &str -// -// // With the SDK's conversion functions -// strPtr = aws.String("my string") -// -// // Convert *string to string value -// str = aws.ToString(strPtr) -// -// In addition to scalars the aws package also includes conversion utilities for -// map and slice for commonly types used in API parameters. The map and slice -// conversion functions use similar naming pattern as the scalar conversion -// functions. -// -// var strPtrs []*string -// var strs []string = []string{"Go", "Gophers", "Go"} -// -// // Convert []string to []*string -// strPtrs = aws.StringSlice(strs) -// -// // Convert []*string to []string -// strs = aws.ToStringSlice(strPtrs) -// -// # SDK Default HTTP Client -// -// The SDK will use the http.DefaultClient if a HTTP client is not provided to -// the SDK's Session, or service client constructor. This means that if the -// http.DefaultClient is modified by other components of your application the -// modifications will be picked up by the SDK as well. -// -// In some cases this might be intended, but it is a better practice to create -// a custom HTTP Client to share explicitly through your application. You can -// configure the SDK to use the custom HTTP Client by setting the HTTPClient -// value of the SDK's Config type when creating a Session or service client. -package aws - -// generate.go uses a build tag of "ignore", go run doesn't need to specify -// this because go run ignores all build flags when running a go file directly. -//go:generate go run -tags codegen generate.go -//go:generate go run -tags codegen logging_generate.go -//go:generate gofmt -w -s . diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go deleted file mode 100644 index aa10a9b40..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go +++ /dev/null @@ -1,229 +0,0 @@ -package aws - -import ( - "fmt" -) - -// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution behavior. -type DualStackEndpointState uint - -const ( - // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint resolution. - DualStackEndpointStateUnset DualStackEndpointState = iota - - // DualStackEndpointStateEnabled enables dual-stack endpoint resolution for service endpoints. - DualStackEndpointStateEnabled - - // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints. - DualStackEndpointStateDisabled -) - -// GetUseDualStackEndpoint takes a service's EndpointResolverOptions and returns the UseDualStackEndpoint value. -// Returns boolean false if the provided options does not have a method to retrieve the DualStackEndpointState. -func GetUseDualStackEndpoint(options ...interface{}) (value DualStackEndpointState, found bool) { - type iface interface { - GetUseDualStackEndpoint() DualStackEndpointState - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetUseDualStackEndpoint() - found = true - break - } - } - return value, found -} - -// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior. -type FIPSEndpointState uint - -const ( - // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution. - FIPSEndpointStateUnset FIPSEndpointState = iota - - // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints. - FIPSEndpointStateEnabled - - // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints. - FIPSEndpointStateDisabled -) - -// GetUseFIPSEndpoint takes a service's EndpointResolverOptions and returns the UseDualStackEndpoint value. -// Returns boolean false if the provided options does not have a method to retrieve the DualStackEndpointState. -func GetUseFIPSEndpoint(options ...interface{}) (value FIPSEndpointState, found bool) { - type iface interface { - GetUseFIPSEndpoint() FIPSEndpointState - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetUseFIPSEndpoint() - found = true - break - } - } - return value, found -} - -// Endpoint represents the endpoint a service client should make API operation -// calls to. -// -// The SDK will automatically resolve these endpoints per API client using an -// internal endpoint resolvers. If you'd like to provide custom endpoint -// resolving behavior you can implement the EndpointResolver interface. -type Endpoint struct { - // The base URL endpoint the SDK API clients will use to make API calls to. - // The SDK will suffix URI path and query elements to this endpoint. - URL string - - // Specifies if the endpoint's hostname can be modified by the SDK's API - // client. - // - // If the hostname is mutable the SDK API clients may modify any part of - // the hostname based on the requirements of the API, (e.g. adding, or - // removing content in the hostname). Such as, Amazon S3 API client - // prefixing "bucketname" to the hostname, or changing the - // hostname service name component from "s3." to "s3-accesspoint.dualstack." - // for the dualstack endpoint of an S3 Accesspoint resource. - // - // Care should be taken when providing a custom endpoint for an API. If the - // endpoint hostname is mutable, and the client cannot modify the endpoint - // correctly, the operation call will most likely fail, or have undefined - // behavior. - // - // If hostname is immutable, the SDK API clients will not modify the - // hostname of the URL. This may cause the API client not to function - // correctly if the API requires the operation specific hostname values - // to be used by the client. - // - // This flag does not modify the API client's behavior if this endpoint - // will be used instead of Endpoint Discovery, or if the endpoint will be - // used to perform Endpoint Discovery. That behavior is configured via the - // API Client's Options. - HostnameImmutable bool - - // The AWS partition the endpoint belongs to. - PartitionID string - - // The service name that should be used for signing the requests to the - // endpoint. - SigningName string - - // The region that should be used for signing the request to the endpoint. - SigningRegion string - - // The signing method that should be used for signing the requests to the - // endpoint. - SigningMethod string - - // The source of the Endpoint. By default, this will be EndpointSourceServiceMetadata. - // When providing a custom endpoint, you should set the source as EndpointSourceCustom. - // If source is not provided when providing a custom endpoint, the SDK may not - // perform required host mutations correctly. Source should be used along with - // HostnameImmutable property as per the usage requirement. - Source EndpointSource -} - -// EndpointSource is the endpoint source type. -type EndpointSource int - -const ( - // EndpointSourceServiceMetadata denotes service modeled endpoint metadata is used as Endpoint Source. - EndpointSourceServiceMetadata EndpointSource = iota - - // EndpointSourceCustom denotes endpoint is a custom endpoint. This source should be used when - // user provides a custom endpoint to be used by the SDK. - EndpointSourceCustom -) - -// EndpointNotFoundError is a sentinel error to indicate that the -// EndpointResolver implementation was unable to resolve an endpoint for the -// given service and region. Resolvers should use this to indicate that an API -// client should fallback and attempt to use it's internal default resolver to -// resolve the endpoint. -type EndpointNotFoundError struct { - Err error -} - -// Error is the error message. -func (e *EndpointNotFoundError) Error() string { - return fmt.Sprintf("endpoint not found, %v", e.Err) -} - -// Unwrap returns the underlying error. -func (e *EndpointNotFoundError) Unwrap() error { - return e.Err -} - -// EndpointResolver is an endpoint resolver that can be used to provide or -// override an endpoint for the given service and region. API clients will -// attempt to use the EndpointResolver first to resolve an endpoint if -// available. If the EndpointResolver returns an EndpointNotFoundError error, -// API clients will fallback to attempting to resolve the endpoint using its -// internal default endpoint resolver. -// -// Deprecated: See EndpointResolverWithOptions -type EndpointResolver interface { - ResolveEndpoint(service, region string) (Endpoint, error) -} - -// EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface. -// -// Deprecated: See EndpointResolverWithOptionsFunc -type EndpointResolverFunc func(service, region string) (Endpoint, error) - -// ResolveEndpoint calls the wrapped function and returns the results. -// -// Deprecated: See EndpointResolverWithOptions.ResolveEndpoint -func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) { - return e(service, region) -} - -// EndpointResolverWithOptions is an endpoint resolver that can be used to provide or -// override an endpoint for the given service, region, and the service client's EndpointOptions. API clients will -// attempt to use the EndpointResolverWithOptions first to resolve an endpoint if -// available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error, -// API clients will fallback to attempting to resolve the endpoint using its -// internal default endpoint resolver. -type EndpointResolverWithOptions interface { - ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error) -} - -// EndpointResolverWithOptionsFunc wraps a function to satisfy the EndpointResolverWithOptions interface. -type EndpointResolverWithOptionsFunc func(service, region string, options ...interface{}) (Endpoint, error) - -// ResolveEndpoint calls the wrapped function and returns the results. -func (e EndpointResolverWithOptionsFunc) ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error) { - return e(service, region, options...) -} - -// GetDisableHTTPS takes a service's EndpointResolverOptions and returns the DisableHTTPS value. -// Returns boolean false if the provided options does not have a method to retrieve the DisableHTTPS. -func GetDisableHTTPS(options ...interface{}) (value bool, found bool) { - type iface interface { - GetDisableHTTPS() bool - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetDisableHTTPS() - found = true - break - } - } - return value, found -} - -// GetResolvedRegion takes a service's EndpointResolverOptions and returns the ResolvedRegion value. -// Returns boolean false if the provided options does not have a method to retrieve the ResolvedRegion. -func GetResolvedRegion(options ...interface{}) (value string, found bool) { - type iface interface { - GetResolvedRegion() string - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetResolvedRegion() - found = true - break - } - } - return value, found -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go deleted file mode 100644 index f390a08f9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go +++ /dev/null @@ -1,9 +0,0 @@ -package aws - -// MissingRegionError is an error that is returned if region configuration -// value was not found. -type MissingRegionError struct{} - -func (*MissingRegionError) Error() string { - return "an AWS region is required, but was not found" -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go deleted file mode 100644 index 2394418e9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by aws/generate.go DO NOT EDIT. - -package aws - -import ( - "github.com/aws/smithy-go/ptr" - "time" -) - -// ToBool returns bool value dereferenced if the passed -// in pointer was not nil. Returns a bool zero value if the -// pointer was nil. -func ToBool(p *bool) (v bool) { - return ptr.ToBool(p) -} - -// ToBoolSlice returns a slice of bool values, that are -// dereferenced if the passed in pointer was not nil. Returns a bool -// zero value if the pointer was nil. -func ToBoolSlice(vs []*bool) []bool { - return ptr.ToBoolSlice(vs) -} - -// ToBoolMap returns a map of bool values, that are -// dereferenced if the passed in pointer was not nil. The bool -// zero value is used if the pointer was nil. -func ToBoolMap(vs map[string]*bool) map[string]bool { - return ptr.ToBoolMap(vs) -} - -// ToByte returns byte value dereferenced if the passed -// in pointer was not nil. Returns a byte zero value if the -// pointer was nil. -func ToByte(p *byte) (v byte) { - return ptr.ToByte(p) -} - -// ToByteSlice returns a slice of byte values, that are -// dereferenced if the passed in pointer was not nil. Returns a byte -// zero value if the pointer was nil. -func ToByteSlice(vs []*byte) []byte { - return ptr.ToByteSlice(vs) -} - -// ToByteMap returns a map of byte values, that are -// dereferenced if the passed in pointer was not nil. The byte -// zero value is used if the pointer was nil. -func ToByteMap(vs map[string]*byte) map[string]byte { - return ptr.ToByteMap(vs) -} - -// ToString returns string value dereferenced if the passed -// in pointer was not nil. Returns a string zero value if the -// pointer was nil. -func ToString(p *string) (v string) { - return ptr.ToString(p) -} - -// ToStringSlice returns a slice of string values, that are -// dereferenced if the passed in pointer was not nil. Returns a string -// zero value if the pointer was nil. -func ToStringSlice(vs []*string) []string { - return ptr.ToStringSlice(vs) -} - -// ToStringMap returns a map of string values, that are -// dereferenced if the passed in pointer was not nil. The string -// zero value is used if the pointer was nil. -func ToStringMap(vs map[string]*string) map[string]string { - return ptr.ToStringMap(vs) -} - -// ToInt returns int value dereferenced if the passed -// in pointer was not nil. Returns a int zero value if the -// pointer was nil. -func ToInt(p *int) (v int) { - return ptr.ToInt(p) -} - -// ToIntSlice returns a slice of int values, that are -// dereferenced if the passed in pointer was not nil. Returns a int -// zero value if the pointer was nil. -func ToIntSlice(vs []*int) []int { - return ptr.ToIntSlice(vs) -} - -// ToIntMap returns a map of int values, that are -// dereferenced if the passed in pointer was not nil. The int -// zero value is used if the pointer was nil. -func ToIntMap(vs map[string]*int) map[string]int { - return ptr.ToIntMap(vs) -} - -// ToInt8 returns int8 value dereferenced if the passed -// in pointer was not nil. Returns a int8 zero value if the -// pointer was nil. -func ToInt8(p *int8) (v int8) { - return ptr.ToInt8(p) -} - -// ToInt8Slice returns a slice of int8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int8 -// zero value if the pointer was nil. -func ToInt8Slice(vs []*int8) []int8 { - return ptr.ToInt8Slice(vs) -} - -// ToInt8Map returns a map of int8 values, that are -// dereferenced if the passed in pointer was not nil. The int8 -// zero value is used if the pointer was nil. -func ToInt8Map(vs map[string]*int8) map[string]int8 { - return ptr.ToInt8Map(vs) -} - -// ToInt16 returns int16 value dereferenced if the passed -// in pointer was not nil. Returns a int16 zero value if the -// pointer was nil. -func ToInt16(p *int16) (v int16) { - return ptr.ToInt16(p) -} - -// ToInt16Slice returns a slice of int16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int16 -// zero value if the pointer was nil. -func ToInt16Slice(vs []*int16) []int16 { - return ptr.ToInt16Slice(vs) -} - -// ToInt16Map returns a map of int16 values, that are -// dereferenced if the passed in pointer was not nil. The int16 -// zero value is used if the pointer was nil. -func ToInt16Map(vs map[string]*int16) map[string]int16 { - return ptr.ToInt16Map(vs) -} - -// ToInt32 returns int32 value dereferenced if the passed -// in pointer was not nil. Returns a int32 zero value if the -// pointer was nil. -func ToInt32(p *int32) (v int32) { - return ptr.ToInt32(p) -} - -// ToInt32Slice returns a slice of int32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int32 -// zero value if the pointer was nil. -func ToInt32Slice(vs []*int32) []int32 { - return ptr.ToInt32Slice(vs) -} - -// ToInt32Map returns a map of int32 values, that are -// dereferenced if the passed in pointer was not nil. The int32 -// zero value is used if the pointer was nil. -func ToInt32Map(vs map[string]*int32) map[string]int32 { - return ptr.ToInt32Map(vs) -} - -// ToInt64 returns int64 value dereferenced if the passed -// in pointer was not nil. Returns a int64 zero value if the -// pointer was nil. -func ToInt64(p *int64) (v int64) { - return ptr.ToInt64(p) -} - -// ToInt64Slice returns a slice of int64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int64 -// zero value if the pointer was nil. -func ToInt64Slice(vs []*int64) []int64 { - return ptr.ToInt64Slice(vs) -} - -// ToInt64Map returns a map of int64 values, that are -// dereferenced if the passed in pointer was not nil. The int64 -// zero value is used if the pointer was nil. -func ToInt64Map(vs map[string]*int64) map[string]int64 { - return ptr.ToInt64Map(vs) -} - -// ToUint returns uint value dereferenced if the passed -// in pointer was not nil. Returns a uint zero value if the -// pointer was nil. -func ToUint(p *uint) (v uint) { - return ptr.ToUint(p) -} - -// ToUintSlice returns a slice of uint values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint -// zero value if the pointer was nil. -func ToUintSlice(vs []*uint) []uint { - return ptr.ToUintSlice(vs) -} - -// ToUintMap returns a map of uint values, that are -// dereferenced if the passed in pointer was not nil. The uint -// zero value is used if the pointer was nil. -func ToUintMap(vs map[string]*uint) map[string]uint { - return ptr.ToUintMap(vs) -} - -// ToUint8 returns uint8 value dereferenced if the passed -// in pointer was not nil. Returns a uint8 zero value if the -// pointer was nil. -func ToUint8(p *uint8) (v uint8) { - return ptr.ToUint8(p) -} - -// ToUint8Slice returns a slice of uint8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint8 -// zero value if the pointer was nil. -func ToUint8Slice(vs []*uint8) []uint8 { - return ptr.ToUint8Slice(vs) -} - -// ToUint8Map returns a map of uint8 values, that are -// dereferenced if the passed in pointer was not nil. The uint8 -// zero value is used if the pointer was nil. -func ToUint8Map(vs map[string]*uint8) map[string]uint8 { - return ptr.ToUint8Map(vs) -} - -// ToUint16 returns uint16 value dereferenced if the passed -// in pointer was not nil. Returns a uint16 zero value if the -// pointer was nil. -func ToUint16(p *uint16) (v uint16) { - return ptr.ToUint16(p) -} - -// ToUint16Slice returns a slice of uint16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint16 -// zero value if the pointer was nil. -func ToUint16Slice(vs []*uint16) []uint16 { - return ptr.ToUint16Slice(vs) -} - -// ToUint16Map returns a map of uint16 values, that are -// dereferenced if the passed in pointer was not nil. The uint16 -// zero value is used if the pointer was nil. -func ToUint16Map(vs map[string]*uint16) map[string]uint16 { - return ptr.ToUint16Map(vs) -} - -// ToUint32 returns uint32 value dereferenced if the passed -// in pointer was not nil. Returns a uint32 zero value if the -// pointer was nil. -func ToUint32(p *uint32) (v uint32) { - return ptr.ToUint32(p) -} - -// ToUint32Slice returns a slice of uint32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint32 -// zero value if the pointer was nil. -func ToUint32Slice(vs []*uint32) []uint32 { - return ptr.ToUint32Slice(vs) -} - -// ToUint32Map returns a map of uint32 values, that are -// dereferenced if the passed in pointer was not nil. The uint32 -// zero value is used if the pointer was nil. -func ToUint32Map(vs map[string]*uint32) map[string]uint32 { - return ptr.ToUint32Map(vs) -} - -// ToUint64 returns uint64 value dereferenced if the passed -// in pointer was not nil. Returns a uint64 zero value if the -// pointer was nil. -func ToUint64(p *uint64) (v uint64) { - return ptr.ToUint64(p) -} - -// ToUint64Slice returns a slice of uint64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint64 -// zero value if the pointer was nil. -func ToUint64Slice(vs []*uint64) []uint64 { - return ptr.ToUint64Slice(vs) -} - -// ToUint64Map returns a map of uint64 values, that are -// dereferenced if the passed in pointer was not nil. The uint64 -// zero value is used if the pointer was nil. -func ToUint64Map(vs map[string]*uint64) map[string]uint64 { - return ptr.ToUint64Map(vs) -} - -// ToFloat32 returns float32 value dereferenced if the passed -// in pointer was not nil. Returns a float32 zero value if the -// pointer was nil. -func ToFloat32(p *float32) (v float32) { - return ptr.ToFloat32(p) -} - -// ToFloat32Slice returns a slice of float32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float32 -// zero value if the pointer was nil. -func ToFloat32Slice(vs []*float32) []float32 { - return ptr.ToFloat32Slice(vs) -} - -// ToFloat32Map returns a map of float32 values, that are -// dereferenced if the passed in pointer was not nil. The float32 -// zero value is used if the pointer was nil. -func ToFloat32Map(vs map[string]*float32) map[string]float32 { - return ptr.ToFloat32Map(vs) -} - -// ToFloat64 returns float64 value dereferenced if the passed -// in pointer was not nil. Returns a float64 zero value if the -// pointer was nil. -func ToFloat64(p *float64) (v float64) { - return ptr.ToFloat64(p) -} - -// ToFloat64Slice returns a slice of float64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float64 -// zero value if the pointer was nil. -func ToFloat64Slice(vs []*float64) []float64 { - return ptr.ToFloat64Slice(vs) -} - -// ToFloat64Map returns a map of float64 values, that are -// dereferenced if the passed in pointer was not nil. The float64 -// zero value is used if the pointer was nil. -func ToFloat64Map(vs map[string]*float64) map[string]float64 { - return ptr.ToFloat64Map(vs) -} - -// ToTime returns time.Time value dereferenced if the passed -// in pointer was not nil. Returns a time.Time zero value if the -// pointer was nil. -func ToTime(p *time.Time) (v time.Time) { - return ptr.ToTime(p) -} - -// ToTimeSlice returns a slice of time.Time values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Time -// zero value if the pointer was nil. -func ToTimeSlice(vs []*time.Time) []time.Time { - return ptr.ToTimeSlice(vs) -} - -// ToTimeMap returns a map of time.Time values, that are -// dereferenced if the passed in pointer was not nil. The time.Time -// zero value is used if the pointer was nil. -func ToTimeMap(vs map[string]*time.Time) map[string]time.Time { - return ptr.ToTimeMap(vs) -} - -// ToDuration returns time.Duration value dereferenced if the passed -// in pointer was not nil. Returns a time.Duration zero value if the -// pointer was nil. -func ToDuration(p *time.Duration) (v time.Duration) { - return ptr.ToDuration(p) -} - -// ToDurationSlice returns a slice of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Duration -// zero value if the pointer was nil. -func ToDurationSlice(vs []*time.Duration) []time.Duration { - return ptr.ToDurationSlice(vs) -} - -// ToDurationMap returns a map of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. The time.Duration -// zero value is used if the pointer was nil. -func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration { - return ptr.ToDurationMap(vs) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go deleted file mode 100644 index 12a331499..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package aws - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.25.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go deleted file mode 100644 index 91c94d987..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by aws/logging_generate.go DO NOT EDIT. - -package aws - -// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where -// each bit is a flag that describes the logging behavior for one or more client components. -// The entire 64-bit group is reserved for later expansion by the SDK. -// -// Example: Setting ClientLogMode to enable logging of retries and requests -// -// clientLogMode := aws.LogRetries | aws.LogRequest -// -// Example: Adding an additional log mode to an existing ClientLogMode value -// -// clientLogMode |= aws.LogResponse -type ClientLogMode uint64 - -// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events. -const ( - LogSigning ClientLogMode = 1 << (64 - 1 - iota) - LogRetries - LogRequest - LogRequestWithBody - LogResponse - LogResponseWithBody - LogDeprecatedUsage - LogRequestEventMessage - LogResponseEventMessage -) - -// IsSigning returns whether the Signing logging mode bit is set -func (m ClientLogMode) IsSigning() bool { - return m&LogSigning != 0 -} - -// IsRetries returns whether the Retries logging mode bit is set -func (m ClientLogMode) IsRetries() bool { - return m&LogRetries != 0 -} - -// IsRequest returns whether the Request logging mode bit is set -func (m ClientLogMode) IsRequest() bool { - return m&LogRequest != 0 -} - -// IsRequestWithBody returns whether the RequestWithBody logging mode bit is set -func (m ClientLogMode) IsRequestWithBody() bool { - return m&LogRequestWithBody != 0 -} - -// IsResponse returns whether the Response logging mode bit is set -func (m ClientLogMode) IsResponse() bool { - return m&LogResponse != 0 -} - -// IsResponseWithBody returns whether the ResponseWithBody logging mode bit is set -func (m ClientLogMode) IsResponseWithBody() bool { - return m&LogResponseWithBody != 0 -} - -// IsDeprecatedUsage returns whether the DeprecatedUsage logging mode bit is set -func (m ClientLogMode) IsDeprecatedUsage() bool { - return m&LogDeprecatedUsage != 0 -} - -// IsRequestEventMessage returns whether the RequestEventMessage logging mode bit is set -func (m ClientLogMode) IsRequestEventMessage() bool { - return m&LogRequestEventMessage != 0 -} - -// IsResponseEventMessage returns whether the ResponseEventMessage logging mode bit is set -func (m ClientLogMode) IsResponseEventMessage() bool { - return m&LogResponseEventMessage != 0 -} - -// ClearSigning clears the Signing logging mode bit -func (m *ClientLogMode) ClearSigning() { - *m &^= LogSigning -} - -// ClearRetries clears the Retries logging mode bit -func (m *ClientLogMode) ClearRetries() { - *m &^= LogRetries -} - -// ClearRequest clears the Request logging mode bit -func (m *ClientLogMode) ClearRequest() { - *m &^= LogRequest -} - -// ClearRequestWithBody clears the RequestWithBody logging mode bit -func (m *ClientLogMode) ClearRequestWithBody() { - *m &^= LogRequestWithBody -} - -// ClearResponse clears the Response logging mode bit -func (m *ClientLogMode) ClearResponse() { - *m &^= LogResponse -} - -// ClearResponseWithBody clears the ResponseWithBody logging mode bit -func (m *ClientLogMode) ClearResponseWithBody() { - *m &^= LogResponseWithBody -} - -// ClearDeprecatedUsage clears the DeprecatedUsage logging mode bit -func (m *ClientLogMode) ClearDeprecatedUsage() { - *m &^= LogDeprecatedUsage -} - -// ClearRequestEventMessage clears the RequestEventMessage logging mode bit -func (m *ClientLogMode) ClearRequestEventMessage() { - *m &^= LogRequestEventMessage -} - -// ClearResponseEventMessage clears the ResponseEventMessage logging mode bit -func (m *ClientLogMode) ClearResponseEventMessage() { - *m &^= LogResponseEventMessage -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go deleted file mode 100644 index 6ecc2231a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build clientlogmode -// +build clientlogmode - -package main - -import ( - "fmt" - "log" - "os" - "strings" - "text/template" -) - -var config = struct { - ModeBits []string -}{ - // Items should be appended only to keep bit-flag positions stable - ModeBits: []string{ - "Signing", - "Retries", - "Request", - "RequestWithBody", - "Response", - "ResponseWithBody", - "DeprecatedUsage", - "RequestEventMessage", - "ResponseEventMessage", - }, -} - -func bitName(name string) string { - return strings.ToUpper(name[:1]) + name[1:] -} - -var tmpl = template.Must(template.New("ClientLogMode").Funcs(map[string]interface{}{ - "symbolName": func(name string) string { - return "Log" + bitName(name) - }, - "bitName": bitName, -}).Parse(`// Code generated by aws/logging_generate.go DO NOT EDIT. - -package aws - -// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where -// each bit is a flag that describes the logging behavior for one or more client components. -// The entire 64-bit group is reserved for later expansion by the SDK. -// -// Example: Setting ClientLogMode to enable logging of retries and requests -// clientLogMode := aws.LogRetries | aws.LogRequest -// -// Example: Adding an additional log mode to an existing ClientLogMode value -// clientLogMode |= aws.LogResponse -type ClientLogMode uint64 - -// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events. -const ( -{{- range $index, $field := .ModeBits }} - {{ (symbolName $field) }}{{- if (eq 0 $index) }} ClientLogMode = 1 << (64 - 1 - iota){{- end }} -{{- end }} -) -{{ range $_, $field := .ModeBits }} -// Is{{- bitName $field }} returns whether the {{ bitName $field }} logging mode bit is set -func (m ClientLogMode) Is{{- bitName $field }}() bool { - return m&{{- (symbolName $field) }} != 0 -} -{{ end }} -{{- range $_, $field := .ModeBits }} -// Clear{{- bitName $field }} clears the {{ bitName $field }} logging mode bit -func (m *ClientLogMode) Clear{{- bitName $field }}() { - *m &^= {{ (symbolName $field) }} -} -{{ end -}} -`)) - -func main() { - uniqueBitFields := make(map[string]struct{}) - - for _, bitName := range config.ModeBits { - if _, ok := uniqueBitFields[strings.ToLower(bitName)]; ok { - panic(fmt.Sprintf("duplicate bit field: %s", bitName)) - } - uniqueBitFields[bitName] = struct{}{} - } - - file, err := os.Create("logging.go") - if err != nil { - log.Fatal(err) - } - defer file.Close() - - err = tmpl.Execute(file, config) - if err != nil { - log.Fatal(err) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go deleted file mode 100644 index d66f0960a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go +++ /dev/null @@ -1,213 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/aws/aws-sdk-go-v2/aws" - - "github.com/aws/smithy-go/middleware" -) - -// RegisterServiceMetadata registers metadata about the service and operation into the middleware context -// so that it is available at runtime for other middleware to introspect. -type RegisterServiceMetadata struct { - ServiceID string - SigningName string - Region string - OperationName string -} - -// ID returns the middleware identifier. -func (s *RegisterServiceMetadata) ID() string { - return "RegisterServiceMetadata" -} - -// HandleInitialize registers service metadata information into the middleware context, allowing for introspection. -func (s RegisterServiceMetadata) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) (out middleware.InitializeOutput, metadata middleware.Metadata, err error) { - if len(s.ServiceID) > 0 { - ctx = SetServiceID(ctx, s.ServiceID) - } - if len(s.SigningName) > 0 { - ctx = SetSigningName(ctx, s.SigningName) - } - if len(s.Region) > 0 { - ctx = setRegion(ctx, s.Region) - } - if len(s.OperationName) > 0 { - ctx = setOperationName(ctx, s.OperationName) - } - return next.HandleInitialize(ctx, in) -} - -// service metadata keys for storing and lookup of runtime stack information. -type ( - serviceIDKey struct{} - signingNameKey struct{} - signingRegionKey struct{} - regionKey struct{} - operationNameKey struct{} - partitionIDKey struct{} - requiresLegacyEndpointsKey struct{} -) - -// GetServiceID retrieves the service id from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetServiceID(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, serviceIDKey{}).(string) - return v -} - -// GetSigningName retrieves the service signing name from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. The resolved signing name is available -// in the signer properties object passed to the signer. -func GetSigningName(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, signingNameKey{}).(string) - return v -} - -// GetSigningRegion retrieves the region from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. The resolved signing region is available -// in the signer properties object passed to the signer. -func GetSigningRegion(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, signingRegionKey{}).(string) - return v -} - -// GetRegion retrieves the endpoint region from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetRegion(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, regionKey{}).(string) - return v -} - -// GetOperationName retrieves the service operation metadata from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetOperationName(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, operationNameKey{}).(string) - return v -} - -// GetPartitionID retrieves the endpoint partition id from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetPartitionID(ctx context.Context) string { - v, _ := middleware.GetStackValue(ctx, partitionIDKey{}).(string) - return v -} - -// GetRequiresLegacyEndpoints the flag used to indicate if legacy endpoint -// customizations need to be executed. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetRequiresLegacyEndpoints(ctx context.Context) bool { - v, _ := middleware.GetStackValue(ctx, requiresLegacyEndpointsKey{}).(bool) - return v -} - -// SetRequiresLegacyEndpoints set or modifies the flag indicated that -// legacy endpoint customizations are needed. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetRequiresLegacyEndpoints(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, requiresLegacyEndpointsKey{}, value) -} - -// SetSigningName set or modifies the sigv4 or sigv4a signing name on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. Use WithSigV4SigningName client option -// funcs instead. -func SetSigningName(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, signingNameKey{}, value) -} - -// SetSigningRegion sets or modifies the region on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. Use WithSigV4SigningRegion client option -// funcs instead. -func SetSigningRegion(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, signingRegionKey{}, value) -} - -// SetServiceID sets the service id on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetServiceID(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, serviceIDKey{}, value) -} - -// setRegion sets the endpoint region on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func setRegion(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, regionKey{}, value) -} - -// setOperationName sets the service operation on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func setOperationName(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, operationNameKey{}, value) -} - -// SetPartitionID sets the partition id of a resolved region on the context -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetPartitionID(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, partitionIDKey{}, value) -} - -// EndpointSource key -type endpointSourceKey struct{} - -// GetEndpointSource returns an endpoint source if set on context -func GetEndpointSource(ctx context.Context) (v aws.EndpointSource) { - v, _ = middleware.GetStackValue(ctx, endpointSourceKey{}).(aws.EndpointSource) - return v -} - -// SetEndpointSource sets endpoint source on context -func SetEndpointSource(ctx context.Context, value aws.EndpointSource) context.Context { - return middleware.WithStackValue(ctx, endpointSourceKey{}, value) -} - -type signingCredentialsKey struct{} - -// GetSigningCredentials returns the credentials that were used for signing if set on context. -func GetSigningCredentials(ctx context.Context) (v aws.Credentials) { - v, _ = middleware.GetStackValue(ctx, signingCredentialsKey{}).(aws.Credentials) - return v -} - -// SetSigningCredentials sets the credentails used for signing on the context. -func SetSigningCredentials(ctx context.Context, value aws.Credentials) context.Context { - return middleware.WithStackValue(ctx, signingCredentialsKey{}, value) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go deleted file mode 100644 index 6d5f0079c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go +++ /dev/null @@ -1,168 +0,0 @@ -package middleware - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// ClientRequestID is a Smithy BuildMiddleware that will generate a unique ID for logical API operation -// invocation. -type ClientRequestID struct{} - -// ID the identifier for the ClientRequestID -func (r *ClientRequestID) ID() string { - return "ClientRequestID" -} - -// HandleBuild attaches a unique operation invocation id for the operation to the request -func (r ClientRequestID) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", req) - } - - invocationID, err := smithyrand.NewUUID(rand.Reader).GetUUID() - if err != nil { - return out, metadata, err - } - - const invocationIDHeader = "Amz-Sdk-Invocation-Id" - req.Header[invocationIDHeader] = append(req.Header[invocationIDHeader][:0], invocationID) - - return next.HandleBuild(ctx, in) -} - -// RecordResponseTiming records the response timing for the SDK client requests. -type RecordResponseTiming struct{} - -// ID is the middleware identifier -func (a *RecordResponseTiming) ID() string { - return "RecordResponseTiming" -} - -// HandleDeserialize calculates response metadata and clock skew -func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - responseAt := sdk.NowTime() - setResponseAt(&metadata, responseAt) - - var serverTime time.Time - - switch resp := out.RawResponse.(type) { - case *smithyhttp.Response: - respDateHeader := resp.Header.Get("Date") - if len(respDateHeader) == 0 { - break - } - var parseErr error - serverTime, parseErr = smithyhttp.ParseTime(respDateHeader) - if parseErr != nil { - logger := middleware.GetLogger(ctx) - logger.Logf(logging.Warn, "failed to parse response Date header value, got %v", - parseErr.Error()) - break - } - setServerTime(&metadata, serverTime) - } - - if !serverTime.IsZero() { - attemptSkew := serverTime.Sub(responseAt) - setAttemptSkew(&metadata, attemptSkew) - } - - return out, metadata, err -} - -type responseAtKey struct{} - -// GetResponseAt returns the time response was received at. -func GetResponseAt(metadata middleware.Metadata) (v time.Time, ok bool) { - v, ok = metadata.Get(responseAtKey{}).(time.Time) - return v, ok -} - -// setResponseAt sets the response time on the metadata. -func setResponseAt(metadata *middleware.Metadata, v time.Time) { - metadata.Set(responseAtKey{}, v) -} - -type serverTimeKey struct{} - -// GetServerTime returns the server time for response. -func GetServerTime(metadata middleware.Metadata) (v time.Time, ok bool) { - v, ok = metadata.Get(serverTimeKey{}).(time.Time) - return v, ok -} - -// setServerTime sets the server time on the metadata. -func setServerTime(metadata *middleware.Metadata, v time.Time) { - metadata.Set(serverTimeKey{}, v) -} - -type attemptSkewKey struct{} - -// GetAttemptSkew returns Attempt clock skew for response from metadata. -func GetAttemptSkew(metadata middleware.Metadata) (v time.Duration, ok bool) { - v, ok = metadata.Get(attemptSkewKey{}).(time.Duration) - return v, ok -} - -// setAttemptSkew sets the attempt clock skew on the metadata. -func setAttemptSkew(metadata *middleware.Metadata, v time.Duration) { - metadata.Set(attemptSkewKey{}, v) -} - -// AddClientRequestIDMiddleware adds ClientRequestID to the middleware stack -func AddClientRequestIDMiddleware(stack *middleware.Stack) error { - return stack.Build.Add(&ClientRequestID{}, middleware.After) -} - -// AddRecordResponseTiming adds RecordResponseTiming middleware to the -// middleware stack. -func AddRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&RecordResponseTiming{}, middleware.After) -} - -// rawResponseKey is the accessor key used to store and access the -// raw response within the response metadata. -type rawResponseKey struct{} - -// AddRawResponse middleware adds raw response on to the metadata -type AddRawResponse struct{} - -// ID the identifier for the ClientRequestID -func (m *AddRawResponse) ID() string { - return "AddRawResponseToMetadata" -} - -// HandleDeserialize adds raw response on the middleware metadata -func (m AddRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - metadata.Set(rawResponseKey{}, out.RawResponse) - return out, metadata, err -} - -// AddRawResponseToMetadata adds middleware to the middleware stack that -// store raw response on to the metadata. -func AddRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&AddRawResponse{}, middleware.Before) -} - -// GetRawResponse returns raw response set on metadata -func GetRawResponse(metadata middleware.Metadata) interface{} { - return metadata.Get(rawResponseKey{}) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go deleted file mode 100644 index ba262dadc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -package middleware - -import "runtime" - -func getNormalizedOSName() (os string) { - switch runtime.GOOS { - case "android": - os = "android" - case "linux": - os = "linux" - case "windows": - os = "windows" - case "darwin": - os = "macos" - case "ios": - os = "ios" - default: - os = "other" - } - return os -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go deleted file mode 100644 index e14a1e4ec..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build !go1.16 -// +build !go1.16 - -package middleware - -import "runtime" - -func getNormalizedOSName() (os string) { - switch runtime.GOOS { - case "android": - os = "android" - case "linux": - os = "linux" - case "windows": - os = "windows" - case "darwin": - // Due to Apple M1 we can't distinguish between macOS and iOS when GOOS/GOARCH is darwin/amd64 - // For now declare this as "other" until we have a better detection mechanism. - fallthrough - default: - os = "other" - } - return os -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go deleted file mode 100644 index b0133f4c8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics/metrics.go +++ /dev/null @@ -1,319 +0,0 @@ -// Package metrics implements metrics gathering for SDK development purposes. -// -// This package is designated as private and is intended for use only by the -// AWS client runtime. The exported API therein is not considered stable and -// is subject to breaking changes without notice. -package metrics - -import ( - "context" - "encoding/json" - "fmt" - "sync" - "time" - - "github.com/aws/smithy-go/middleware" -) - -const ( - // ServiceIDKey is the key for the service ID metric. - ServiceIDKey = "ServiceId" - // OperationNameKey is the key for the operation name metric. - OperationNameKey = "OperationName" - // ClientRequestIDKey is the key for the client request ID metric. - ClientRequestIDKey = "ClientRequestId" - // APICallDurationKey is the key for the API call duration metric. - APICallDurationKey = "ApiCallDuration" - // APICallSuccessfulKey is the key for the API call successful metric. - APICallSuccessfulKey = "ApiCallSuccessful" - // MarshallingDurationKey is the key for the marshalling duration metric. - MarshallingDurationKey = "MarshallingDuration" - // InThroughputKey is the key for the input throughput metric. - InThroughputKey = "InThroughput" - // OutThroughputKey is the key for the output throughput metric. - OutThroughputKey = "OutThroughput" - // RetryCountKey is the key for the retry count metric. - RetryCountKey = "RetryCount" - // HTTPStatusCodeKey is the key for the HTTP status code metric. - HTTPStatusCodeKey = "HttpStatusCode" - // AWSExtendedRequestIDKey is the key for the AWS extended request ID metric. - AWSExtendedRequestIDKey = "AwsExtendedRequestId" - // AWSRequestIDKey is the key for the AWS request ID metric. - AWSRequestIDKey = "AwsRequestId" - // BackoffDelayDurationKey is the key for the backoff delay duration metric. - BackoffDelayDurationKey = "BackoffDelayDuration" - // StreamThroughputKey is the key for the stream throughput metric. - StreamThroughputKey = "Throughput" - // ConcurrencyAcquireDurationKey is the key for the concurrency acquire duration metric. - ConcurrencyAcquireDurationKey = "ConcurrencyAcquireDuration" - // PendingConcurrencyAcquiresKey is the key for the pending concurrency acquires metric. - PendingConcurrencyAcquiresKey = "PendingConcurrencyAcquires" - // SigningDurationKey is the key for the signing duration metric. - SigningDurationKey = "SigningDuration" - // UnmarshallingDurationKey is the key for the unmarshalling duration metric. - UnmarshallingDurationKey = "UnmarshallingDuration" - // TimeToFirstByteKey is the key for the time to first byte metric. - TimeToFirstByteKey = "TimeToFirstByte" - // ServiceCallDurationKey is the key for the service call duration metric. - ServiceCallDurationKey = "ServiceCallDuration" - // EndpointResolutionDurationKey is the key for the endpoint resolution duration metric. - EndpointResolutionDurationKey = "EndpointResolutionDuration" - // AttemptNumberKey is the key for the attempt number metric. - AttemptNumberKey = "AttemptNumber" - // MaxConcurrencyKey is the key for the max concurrency metric. - MaxConcurrencyKey = "MaxConcurrency" - // AvailableConcurrencyKey is the key for the available concurrency metric. - AvailableConcurrencyKey = "AvailableConcurrency" -) - -// MetricPublisher provides the interface to provide custom MetricPublishers. -// PostRequestMetrics will be invoked by the MetricCollection middleware to post request. -// PostStreamMetrics will be invoked by ReadCloserWithMetrics to post stream metrics. -type MetricPublisher interface { - PostRequestMetrics(*MetricData) error - PostStreamMetrics(*MetricData) error -} - -// Serializer provides the interface to provide custom Serializers. -// Serialize will transform any input object in its corresponding string representation. -type Serializer interface { - Serialize(obj interface{}) (string, error) -} - -// DefaultSerializer is an implementation of the Serializer interface. -type DefaultSerializer struct{} - -// Serialize uses the default JSON serializer to obtain the string representation of an object. -func (DefaultSerializer) Serialize(obj interface{}) (string, error) { - bytes, err := json.Marshal(obj) - if err != nil { - return "", err - } - return string(bytes), nil -} - -type metricContextKey struct{} - -// MetricContext contains fields to store metric-related information. -type MetricContext struct { - connectionCounter *SharedConnectionCounter - publisher MetricPublisher - data *MetricData -} - -// MetricData stores the collected metric data. -type MetricData struct { - RequestStartTime time.Time - RequestEndTime time.Time - APICallDuration time.Duration - SerializeStartTime time.Time - SerializeEndTime time.Time - MarshallingDuration time.Duration - ResolveEndpointStartTime time.Time - ResolveEndpointEndTime time.Time - EndpointResolutionDuration time.Duration - InThroughput float64 - OutThroughput float64 - RetryCount int - Success uint8 - StatusCode int - ClientRequestID string - ServiceID string - OperationName string - PartitionID string - Region string - RequestContentLength int64 - Stream StreamMetrics - Attempts []AttemptMetrics -} - -// StreamMetrics stores metrics related to streaming data. -type StreamMetrics struct { - ReadDuration time.Duration - ReadBytes int64 - Throughput float64 -} - -// AttemptMetrics stores metrics related to individual attempts. -type AttemptMetrics struct { - ServiceCallStart time.Time - ServiceCallEnd time.Time - ServiceCallDuration time.Duration - FirstByteTime time.Time - TimeToFirstByte time.Duration - ConnRequestedTime time.Time - ConnObtainedTime time.Time - ConcurrencyAcquireDuration time.Duration - CredentialFetchStartTime time.Time - CredentialFetchEndTime time.Time - SignStartTime time.Time - SignEndTime time.Time - SigningDuration time.Duration - DeserializeStartTime time.Time - DeserializeEndTime time.Time - UnMarshallingDuration time.Duration - RetryDelay time.Duration - ResponseContentLength int64 - StatusCode int - RequestID string - ExtendedRequestID string - HTTPClient string - MaxConcurrency int - PendingConnectionAcquires int - AvailableConcurrency int - ActiveRequests int - ReusedConnection bool -} - -// Data returns the MetricData associated with the MetricContext. -func (mc *MetricContext) Data() *MetricData { - return mc.data -} - -// ConnectionCounter returns the SharedConnectionCounter associated with the MetricContext. -func (mc *MetricContext) ConnectionCounter() *SharedConnectionCounter { - return mc.connectionCounter -} - -// Publisher returns the MetricPublisher associated with the MetricContext. -func (mc *MetricContext) Publisher() MetricPublisher { - return mc.publisher -} - -// ComputeRequestMetrics calculates and populates derived metrics based on the collected data. -func (md *MetricData) ComputeRequestMetrics() { - - for idx := range md.Attempts { - attempt := &md.Attempts[idx] - attempt.ConcurrencyAcquireDuration = attempt.ConnObtainedTime.Sub(attempt.ConnRequestedTime) - attempt.SigningDuration = attempt.SignEndTime.Sub(attempt.SignStartTime) - attempt.UnMarshallingDuration = attempt.DeserializeEndTime.Sub(attempt.DeserializeStartTime) - attempt.TimeToFirstByte = attempt.FirstByteTime.Sub(attempt.ServiceCallStart) - attempt.ServiceCallDuration = attempt.ServiceCallEnd.Sub(attempt.ServiceCallStart) - } - - md.APICallDuration = md.RequestEndTime.Sub(md.RequestStartTime) - md.MarshallingDuration = md.SerializeEndTime.Sub(md.SerializeStartTime) - md.EndpointResolutionDuration = md.ResolveEndpointEndTime.Sub(md.ResolveEndpointStartTime) - - md.RetryCount = len(md.Attempts) - 1 - - latestAttempt, err := md.LatestAttempt() - - if err != nil { - fmt.Printf("error retrieving attempts data due to: %s. Skipping Throughput metrics", err.Error()) - } else { - - md.StatusCode = latestAttempt.StatusCode - - if md.Success == 1 { - if latestAttempt.ResponseContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { - md.InThroughput = float64(latestAttempt.ResponseContentLength) / latestAttempt.ServiceCallDuration.Seconds() - } - if md.RequestContentLength > 0 && latestAttempt.ServiceCallDuration > 0 { - md.OutThroughput = float64(md.RequestContentLength) / latestAttempt.ServiceCallDuration.Seconds() - } - } - } -} - -// LatestAttempt returns the latest attempt metrics. -// It returns an error if no attempts are initialized. -func (md *MetricData) LatestAttempt() (*AttemptMetrics, error) { - if md.Attempts == nil || len(md.Attempts) == 0 { - return nil, fmt.Errorf("no attempts initialized. NewAttempt() should be called first") - } - return &md.Attempts[len(md.Attempts)-1], nil -} - -// NewAttempt initializes new attempt metrics. -func (md *MetricData) NewAttempt() { - if md.Attempts == nil { - md.Attempts = []AttemptMetrics{} - } - md.Attempts = append(md.Attempts, AttemptMetrics{}) -} - -// SharedConnectionCounter is a counter shared across API calls. -type SharedConnectionCounter struct { - mu sync.Mutex - - activeRequests int - pendingConnectionAcquire int -} - -// ActiveRequests returns the count of active requests. -func (cc *SharedConnectionCounter) ActiveRequests() int { - cc.mu.Lock() - defer cc.mu.Unlock() - - return cc.activeRequests -} - -// PendingConnectionAcquire returns the count of pending connection acquires. -func (cc *SharedConnectionCounter) PendingConnectionAcquire() int { - cc.mu.Lock() - defer cc.mu.Unlock() - - return cc.pendingConnectionAcquire -} - -// AddActiveRequest increments the count of active requests. -func (cc *SharedConnectionCounter) AddActiveRequest() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.activeRequests++ -} - -// RemoveActiveRequest decrements the count of active requests. -func (cc *SharedConnectionCounter) RemoveActiveRequest() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.activeRequests-- -} - -// AddPendingConnectionAcquire increments the count of pending connection acquires. -func (cc *SharedConnectionCounter) AddPendingConnectionAcquire() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.pendingConnectionAcquire++ -} - -// RemovePendingConnectionAcquire decrements the count of pending connection acquires. -func (cc *SharedConnectionCounter) RemovePendingConnectionAcquire() { - cc.mu.Lock() - defer cc.mu.Unlock() - - cc.pendingConnectionAcquire-- -} - -// InitMetricContext initializes the metric context with the provided counter and publisher. -// It returns the updated context. -func InitMetricContext( - ctx context.Context, counter *SharedConnectionCounter, publisher MetricPublisher, -) context.Context { - if middleware.GetStackValue(ctx, metricContextKey{}) == nil { - ctx = middleware.WithStackValue(ctx, metricContextKey{}, &MetricContext{ - connectionCounter: counter, - publisher: publisher, - data: &MetricData{ - Attempts: []AttemptMetrics{}, - Stream: StreamMetrics{}, - }, - }) - } - return ctx -} - -// Context returns the metric context from the given context. -// It returns nil if the metric context is not found. -func Context(ctx context.Context) *MetricContext { - mctx := middleware.GetStackValue(ctx, metricContextKey{}) - if mctx == nil { - return nil - } - return mctx.(*MetricContext) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go deleted file mode 100644 index 3f6aaf231..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go +++ /dev/null @@ -1,94 +0,0 @@ -package middleware - -import ( - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "os" -) - -const envAwsLambdaFunctionName = "AWS_LAMBDA_FUNCTION_NAME" -const envAmznTraceID = "_X_AMZN_TRACE_ID" -const amznTraceIDHeader = "X-Amzn-Trace-Id" - -// AddRecursionDetection adds recursionDetection to the middleware stack -func AddRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&RecursionDetection{}, middleware.After) -} - -// RecursionDetection detects Lambda environment and sets its X-Ray trace ID to request header if absent -// to avoid recursion invocation in Lambda -type RecursionDetection struct{} - -// ID returns the middleware identifier -func (m *RecursionDetection) ID() string { - return "RecursionDetection" -} - -// HandleBuild detects Lambda environment and adds its trace ID to request header if absent -func (m *RecursionDetection) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - _, hasLambdaEnv := os.LookupEnv(envAwsLambdaFunctionName) - xAmznTraceID, hasTraceID := os.LookupEnv(envAmznTraceID) - value := req.Header.Get(amznTraceIDHeader) - // only set the X-Amzn-Trace-Id header when it is not set initially, the - // current environment is Lambda and the _X_AMZN_TRACE_ID env variable exists - if value != "" || !hasLambdaEnv || !hasTraceID { - return next.HandleBuild(ctx, in) - } - - req.Header.Set(amznTraceIDHeader, percentEncode(xAmznTraceID)) - return next.HandleBuild(ctx, in) -} - -func percentEncode(s string) string { - upperhex := "0123456789ABCDEF" - hexCount := 0 - for i := 0; i < len(s); i++ { - c := s[i] - if shouldEncode(c) { - hexCount++ - } - } - - if hexCount == 0 { - return s - } - - required := len(s) + 2*hexCount - t := make([]byte, required) - j := 0 - for i := 0; i < len(s); i++ { - if c := s[i]; shouldEncode(c) { - t[j] = '%' - t[j+1] = upperhex[c>>4] - t[j+2] = upperhex[c&15] - j += 3 - } else { - t[j] = c - j++ - } - } - return string(t) -} - -func shouldEncode(c byte) bool { - if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' { - return false - } - switch c { - case '-', '=', ';', ':', '+', '&', '[', ']', '{', '}', '"', '\'', ',': - return false - default: - return true - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go deleted file mode 100644 index dd3391fe4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go +++ /dev/null @@ -1,27 +0,0 @@ -package middleware - -import ( - "github.com/aws/smithy-go/middleware" -) - -// requestIDKey is used to retrieve request id from response metadata -type requestIDKey struct{} - -// SetRequestIDMetadata sets the provided request id over middleware metadata -func SetRequestIDMetadata(metadata *middleware.Metadata, id string) { - metadata.Set(requestIDKey{}, id) -} - -// GetRequestIDMetadata retrieves the request id from middleware metadata -// returns string and bool indicating value of request id, whether request id was set. -func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) { - if !metadata.Has(requestIDKey{}) { - return "", false - } - - v, ok := metadata.Get(requestIDKey{}).(string) - if !ok { - return "", true - } - return v, true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go deleted file mode 100644 index e7d268c3d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go +++ /dev/null @@ -1,53 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddRequestIDRetrieverMiddleware adds request id retriever middleware -func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - // add error wrapper middleware before operation deserializers so that it can wrap the error response - // returned by operation deserializers - return stack.Deserialize.Insert(&RequestIDRetriever{}, "OperationDeserializer", middleware.Before) -} - -// RequestIDRetriever middleware captures the AWS service request ID from the -// raw response. -type RequestIDRetriever struct { -} - -// ID returns the middleware identifier -func (m *RequestIDRetriever) ID() string { - return "RequestIDRetriever" -} - -// HandleDeserialize pulls the AWS request ID from the response, storing it in -// operation metadata. -func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - - resp, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - // No raw response to wrap with. - return out, metadata, err - } - - // Different header which can map to request id - requestIDHeaderList := []string{"X-Amzn-Requestid", "X-Amz-RequestId"} - - for _, h := range requestIDHeaderList { - // check for headers known to contain Request id - if v := resp.Header.Get(h); len(v) != 0 { - // set reqID on metadata for successful responses. - SetRequestIDMetadata(&metadata, v) - break - } - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go deleted file mode 100644 index db7cda42d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go +++ /dev/null @@ -1,261 +0,0 @@ -package middleware - -import ( - "context" - "fmt" - "os" - "runtime" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -var languageVersion = strings.TrimPrefix(runtime.Version(), "go") - -// SDKAgentKeyType is the metadata type to add to the SDK agent string -type SDKAgentKeyType int - -// The set of valid SDKAgentKeyType constants. If an unknown value is assigned for SDKAgentKeyType it will -// be mapped to AdditionalMetadata. -const ( - _ SDKAgentKeyType = iota - APIMetadata - OperatingSystemMetadata - LanguageMetadata - EnvironmentMetadata - FeatureMetadata - ConfigMetadata - FrameworkMetadata - AdditionalMetadata - ApplicationIdentifier -) - -func (k SDKAgentKeyType) string() string { - switch k { - case APIMetadata: - return "api" - case OperatingSystemMetadata: - return "os" - case LanguageMetadata: - return "lang" - case EnvironmentMetadata: - return "exec-env" - case FeatureMetadata: - return "ft" - case ConfigMetadata: - return "cfg" - case FrameworkMetadata: - return "lib" - case ApplicationIdentifier: - return "app" - case AdditionalMetadata: - fallthrough - default: - return "md" - } -} - -const execEnvVar = `AWS_EXECUTION_ENV` - -var validChars = map[rune]bool{ - '!': true, '#': true, '$': true, '%': true, '&': true, '\'': true, '*': true, '+': true, - '-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true, -} - -// RequestUserAgent is a build middleware that set the User-Agent for the request. -type RequestUserAgent struct { - sdkAgent, userAgent *smithyhttp.UserAgentBuilder -} - -// NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the -// request. -// -// User-Agent example: -// -// aws-sdk-go-v2/1.2.3 -// -// X-Amz-User-Agent example: -// -// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15 -func NewRequestUserAgent() *RequestUserAgent { - userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder() - addProductName(userAgent) - addProductName(sdkAgent) - - r := &RequestUserAgent{ - sdkAgent: sdkAgent, - userAgent: userAgent, - } - - addSDKMetadata(r) - - return r -} - -func addSDKMetadata(r *RequestUserAgent) { - r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName()) - r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion) - r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS) - r.AddSDKAgentKeyValue(AdditionalMetadata, "GOARCH", runtime.GOARCH) - if ev := os.Getenv(execEnvVar); len(ev) > 0 { - r.AddSDKAgentKey(EnvironmentMetadata, ev) - } -} - -func addProductName(builder *smithyhttp.UserAgentBuilder) { - builder.AddKeyValue(aws.SDKName, aws.SDKVersion) -} - -// AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one. -func AddUserAgentKey(key string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddUserAgentKey(key) - return nil - } -} - -// AddUserAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one. -func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddUserAgentKeyValue(key, value) - return nil - } -} - -// AddSDKAgentKey retrieves a requestUserAgent from the provided stack, or initializes one. -func AddSDKAgentKey(keyType SDKAgentKeyType, key string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddSDKAgentKey(keyType, key) - return nil - } -} - -// AddSDKAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one. -func AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddSDKAgentKeyValue(keyType, key, value) - return nil - } -} - -// AddRequestUserAgentMiddleware registers a requestUserAgent middleware on the stack if not present. -func AddRequestUserAgentMiddleware(stack *middleware.Stack) error { - _, err := getOrAddRequestUserAgent(stack) - return err -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*RequestUserAgent, error) { - id := (*RequestUserAgent)(nil).ID() - bm, ok := stack.Build.Get(id) - if !ok { - bm = NewRequestUserAgent() - err := stack.Build.Add(bm, middleware.After) - if err != nil { - return nil, err - } - } - - requestUserAgent, ok := bm.(*RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id) - } - - return requestUserAgent, nil -} - -// AddUserAgentKey adds the component identified by name to the User-Agent string. -func (u *RequestUserAgent) AddUserAgentKey(key string) { - u.userAgent.AddKey(strings.Map(rules, key)) -} - -// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string. -func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) { - u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value)) -} - -// AddSDKAgentKey adds the component identified by name to the User-Agent string. -func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) { - // TODO: should target sdkAgent - u.userAgent.AddKey(keyType.string() + "/" + strings.Map(rules, key)) -} - -// AddSDKAgentKeyValue adds the key identified by the given name and value to the User-Agent string. -func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) { - // TODO: should target sdkAgent - u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value)) -} - -// ID the name of the middleware. -func (u *RequestUserAgent) ID() string { - return "UserAgent" -} - -// HandleBuild adds or appends the constructed user agent to the request. -func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - switch req := in.Request.(type) { - case *smithyhttp.Request: - u.addHTTPUserAgent(req) - // TODO: To be re-enabled - // u.addHTTPSDKAgent(req) - default: - return out, metadata, fmt.Errorf("unknown transport type %T", in) - } - - return next.HandleBuild(ctx, in) -} - -func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) { - const userAgent = "User-Agent" - updateHTTPHeader(request, userAgent, u.userAgent.Build()) -} - -func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) { - const sdkAgent = "X-Amz-User-Agent" - updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build()) -} - -func updateHTTPHeader(request *smithyhttp.Request, header string, value string) { - var current string - if v := request.Header[header]; len(v) > 0 { - current = v[0] - } - if len(current) > 0 { - current = value + " " + current - } else { - current = value - } - request.Header[header] = append(request.Header[header][:0], current) -} - -func rules(r rune) rune { - switch { - case r >= '0' && r <= '9': - return r - case r >= 'A' && r <= 'Z' || r >= 'a' && r <= 'z': - return r - case validChars[r]: - return r - default: - return '-' - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query/error_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query/error_utils.go deleted file mode 100644 index 12a2c77a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query/error_utils.go +++ /dev/null @@ -1,24 +0,0 @@ -package ec2query - -import ( - "encoding/xml" - "fmt" - "io" -) - -// ErrorComponents represents the error response fields -// that will be deserialized from a ec2query error response body -type ErrorComponents struct { - Code string `xml:"Errors>Error>Code"` - Message string `xml:"Errors>Error>Message"` - RequestID string `xml:"RequestID"` -} - -// GetErrorResponseComponents returns the error components from a ec2query error response body -func GetErrorResponseComponents(r io.Reader) (ErrorComponents, error) { - var er ErrorComponents - if err := xml.NewDecoder(r).Decode(&er); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while fetching xml error response code: %w", err) - } - return er, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go deleted file mode 100644 index 47ebc0f54..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go +++ /dev/null @@ -1,72 +0,0 @@ -package query - -import ( - "fmt" - "net/url" -) - -// Array represents the encoding of Query lists and sets. A Query array is a -// representation of a list of values of a fixed type. A serialized array might -// look like the following: -// -// ListName.member.1=foo -// &ListName.member.2=bar -// &Listname.member.3=baz -type Array struct { - // The query values to add the array to. - values url.Values - // The array's prefix, which includes the names of all parent structures - // and ends with the name of the list. For example, the prefix might be - // "ParentStructure.ListName". This prefix will be used to form the full - // keys for each element in the list. For example, an entry might have the - // key "ParentStructure.ListName.member.MemberName.1". - // - // While this is currently represented as a string that gets added to, it - // could also be represented as a stack that only gets condensed into a - // string when a finalized key is created. This could potentially reduce - // allocations. - prefix string - // Whether the list is flat or not. A list that is not flat will produce the - // following entry to the url.Values for a given entry: - // ListName.MemberName.1=value - // A list that is flat will produce the following: - // ListName.1=value - flat bool - // The location name of the member. In most cases this should be "member". - memberName string - // Elements are stored in values, so we keep track of the list size here. - size int32 - // Empty lists are encoded as "=", if we add a value later we will - // remove this encoding - emptyValue Value -} - -func newArray(values url.Values, prefix string, flat bool, memberName string) *Array { - emptyValue := newValue(values, prefix, flat) - emptyValue.String("") - - return &Array{ - values: values, - prefix: prefix, - flat: flat, - memberName: memberName, - emptyValue: emptyValue, - } -} - -// Value adds a new element to the Query Array. Returns a Value type used to -// encode the array element. -func (a *Array) Value() Value { - if a.size == 0 { - delete(a.values, a.emptyValue.key) - } - - // Query lists start a 1, so adjust the size first - a.size++ - prefix := a.prefix - if !a.flat { - prefix = fmt.Sprintf("%s.%s", prefix, a.memberName) - } - // Lists can't have flat members - return newValue(a.values, fmt.Sprintf("%s.%d", prefix, a.size), false) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go deleted file mode 100644 index 2ecf9241c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go +++ /dev/null @@ -1,80 +0,0 @@ -package query - -import ( - "io" - "net/url" - "sort" -) - -// Encoder is a Query encoder that supports construction of Query body -// values using methods. -type Encoder struct { - // The query values that will be built up to manage encoding. - values url.Values - // The writer that the encoded body will be written to. - writer io.Writer - Value -} - -// NewEncoder returns a new Query body encoder -func NewEncoder(writer io.Writer) *Encoder { - values := url.Values{} - return &Encoder{ - values: values, - writer: writer, - Value: newBaseValue(values), - } -} - -// Encode returns the []byte slice representing the current -// state of the Query encoder. -func (e Encoder) Encode() error { - ws, ok := e.writer.(interface{ WriteString(string) (int, error) }) - if !ok { - // Fall back to less optimal byte slice casting if WriteString isn't available. - ws = &wrapWriteString{writer: e.writer} - } - - // Get the keys and sort them to have a stable output - keys := make([]string, 0, len(e.values)) - for k := range e.values { - keys = append(keys, k) - } - sort.Strings(keys) - isFirstEntry := true - for _, key := range keys { - queryValues := e.values[key] - escapedKey := url.QueryEscape(key) - for _, value := range queryValues { - if !isFirstEntry { - if _, err := ws.WriteString(`&`); err != nil { - return err - } - } else { - isFirstEntry = false - } - if _, err := ws.WriteString(escapedKey); err != nil { - return err - } - if _, err := ws.WriteString(`=`); err != nil { - return err - } - if _, err := ws.WriteString(url.QueryEscape(value)); err != nil { - return err - } - } - } - return nil -} - -// wrapWriteString wraps an io.Writer to provide a WriteString method -// where one is not available. -type wrapWriteString struct { - writer io.Writer -} - -// WriteString writes a string to the wrapped writer by casting it to -// a byte array first. -func (w wrapWriteString) WriteString(v string) (int, error) { - return w.writer.Write([]byte(v)) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go deleted file mode 100644 index dea242b8b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go +++ /dev/null @@ -1,78 +0,0 @@ -package query - -import ( - "fmt" - "net/url" -) - -// Map represents the encoding of Query maps. A Query map is a representation -// of a mapping of arbitrary string keys to arbitrary values of a fixed type. -// A Map differs from an Object in that the set of keys is not fixed, in that -// the values must all be of the same type, and that map entries are ordered. -// A serialized map might look like the following: -// -// MapName.entry.1.key=Foo -// &MapName.entry.1.value=spam -// &MapName.entry.2.key=Bar -// &MapName.entry.2.value=eggs -type Map struct { - // The query values to add the map to. - values url.Values - // The map's prefix, which includes the names of all parent structures - // and ends with the name of the object. For example, the prefix might be - // "ParentStructure.MapName". This prefix will be used to form the full - // keys for each key-value pair of the map. For example, a value might have - // the key "ParentStructure.MapName.1.value". - // - // While this is currently represented as a string that gets added to, it - // could also be represented as a stack that only gets condensed into a - // string when a finalized key is created. This could potentially reduce - // allocations. - prefix string - // Whether the map is flat or not. A map that is not flat will produce the - // following entries to the url.Values for a given key-value pair: - // MapName.entry.1.KeyLocationName=mykey - // MapName.entry.1.ValueLocationName=myvalue - // A map that is flat will produce the following: - // MapName.1.KeyLocationName=mykey - // MapName.1.ValueLocationName=myvalue - flat bool - // The location name of the key. In most cases this should be "key". - keyLocationName string - // The location name of the value. In most cases this should be "value". - valueLocationName string - // Elements are stored in values, so we keep track of the list size here. - size int32 -} - -func newMap(values url.Values, prefix string, flat bool, keyLocationName string, valueLocationName string) *Map { - return &Map{ - values: values, - prefix: prefix, - flat: flat, - keyLocationName: keyLocationName, - valueLocationName: valueLocationName, - } -} - -// Key adds the given named key to the Query map. -// Returns a Value encoder that should be used to encode a Query value type. -func (m *Map) Key(name string) Value { - // Query lists start a 1, so adjust the size first - m.size++ - var key string - var value string - if m.flat { - key = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.keyLocationName) - value = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.valueLocationName) - } else { - key = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.keyLocationName) - value = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.valueLocationName) - } - - // The key can only be a string, so we just go ahead and set it here - newValue(m.values, key, false).String(name) - - // Maps can't have flat members - return newValue(m.values, value, false) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go deleted file mode 100644 index 360344791..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go +++ /dev/null @@ -1,62 +0,0 @@ -package query - -import ( - "context" - "fmt" - "io/ioutil" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddAsGetRequestMiddleware adds a middleware to the Serialize stack after the -// operation serializer that will convert the query request body to a GET -// operation with the query message in the HTTP request querystring. -func AddAsGetRequestMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&asGetRequest{}, "OperationSerializer", middleware.After) -} - -type asGetRequest struct{} - -func (*asGetRequest) ID() string { return "Query:AsGetRequest" } - -func (m *asGetRequest) HandleSerialize( - ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("expect smithy HTTP Request, got %T", input.Request) - } - - req.Method = "GET" - - // If the stream is not set, nothing else to do. - stream := req.GetStream() - if stream == nil { - return next.HandleSerialize(ctx, input) - } - - // Clear the stream since there will not be any body. - req.Header.Del("Content-Type") - req, err = req.SetStream(nil) - if err != nil { - return out, metadata, fmt.Errorf("unable update request body %w", err) - } - input.Request = req - - // Update request query with the body's query string value. - delim := "" - if len(req.URL.RawQuery) != 0 { - delim = "&" - } - - b, err := ioutil.ReadAll(stream) - if err != nil { - return out, metadata, fmt.Errorf("unable to get request body %w", err) - } - req.URL.RawQuery += delim + string(b) - - return next.HandleSerialize(ctx, input) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go deleted file mode 100644 index 455b92515..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go +++ /dev/null @@ -1,69 +0,0 @@ -package query - -import ( - "fmt" - "net/url" -) - -// Object represents the encoding of Query structures and unions. A Query -// object is a representation of a mapping of string keys to arbitrary -// values where there is a fixed set of keys whose values each have their -// own known type. A serialized object might look like the following: -// -// ObjectName.Foo=value -// &ObjectName.Bar=5 -type Object struct { - // The query values to add the object to. - values url.Values - // The object's prefix, which includes the names of all parent structures - // and ends with the name of the object. For example, the prefix might be - // "ParentStructure.ObjectName". This prefix will be used to form the full - // keys for each member of the object. For example, a member might have the - // key "ParentStructure.ObjectName.MemberName". - // - // While this is currently represented as a string that gets added to, it - // could also be represented as a stack that only gets condensed into a - // string when a finalized key is created. This could potentially reduce - // allocations. - prefix string -} - -func newObject(values url.Values, prefix string) *Object { - return &Object{ - values: values, - prefix: prefix, - } -} - -// Key adds the given named key to the Query object. -// Returns a Value encoder that should be used to encode a Query value type. -func (o *Object) Key(name string) Value { - return o.key(name, false) -} - -// KeyWithValues adds the given named key to the Query object. -// Returns a Value encoder that should be used to encode a Query list of values. -func (o *Object) KeyWithValues(name string) Value { - return o.keyWithValues(name, false) -} - -// FlatKey adds the given named key to the Query object. -// Returns a Value encoder that should be used to encode a Query value type. The -// value will be flattened if it is a map or array. -func (o *Object) FlatKey(name string) Value { - return o.key(name, true) -} - -func (o *Object) key(name string, flatValue bool) Value { - if o.prefix != "" { - return newValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue) - } - return newValue(o.values, name, flatValue) -} - -func (o *Object) keyWithValues(name string, flatValue bool) Value { - if o.prefix != "" { - return newAppendValue(o.values, fmt.Sprintf("%s.%s", o.prefix, name), flatValue) - } - return newAppendValue(o.values, name, flatValue) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go deleted file mode 100644 index a9251521f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go +++ /dev/null @@ -1,115 +0,0 @@ -package query - -import ( - "math/big" - "net/url" - - "github.com/aws/smithy-go/encoding/httpbinding" -) - -// Value represents a Query Value type. -type Value struct { - // The query values to add the value to. - values url.Values - // The value's key, which will form the prefix for complex types. - key string - // Whether the value should be flattened or not if it's a flattenable type. - flat bool - queryValue httpbinding.QueryValue -} - -func newValue(values url.Values, key string, flat bool) Value { - return Value{ - values: values, - key: key, - flat: flat, - queryValue: httpbinding.NewQueryValue(values, key, false), - } -} - -func newAppendValue(values url.Values, key string, flat bool) Value { - return Value{ - values: values, - key: key, - flat: flat, - queryValue: httpbinding.NewQueryValue(values, key, true), - } -} - -func newBaseValue(values url.Values) Value { - return Value{ - values: values, - queryValue: httpbinding.NewQueryValue(nil, "", false), - } -} - -// Array returns a new Array encoder. -func (qv Value) Array(locationName string) *Array { - return newArray(qv.values, qv.key, qv.flat, locationName) -} - -// Object returns a new Object encoder. -func (qv Value) Object() *Object { - return newObject(qv.values, qv.key) -} - -// Map returns a new Map encoder. -func (qv Value) Map(keyLocationName string, valueLocationName string) *Map { - return newMap(qv.values, qv.key, qv.flat, keyLocationName, valueLocationName) -} - -// Base64EncodeBytes encodes v as a base64 query string value. -// This is intended to enable compatibility with the JSON encoder. -func (qv Value) Base64EncodeBytes(v []byte) { - qv.queryValue.Blob(v) -} - -// Boolean encodes v as a query string value -func (qv Value) Boolean(v bool) { - qv.queryValue.Boolean(v) -} - -// String encodes v as a query string value -func (qv Value) String(v string) { - qv.queryValue.String(v) -} - -// Byte encodes v as a query string value -func (qv Value) Byte(v int8) { - qv.queryValue.Byte(v) -} - -// Short encodes v as a query string value -func (qv Value) Short(v int16) { - qv.queryValue.Short(v) -} - -// Integer encodes v as a query string value -func (qv Value) Integer(v int32) { - qv.queryValue.Integer(v) -} - -// Long encodes v as a query string value -func (qv Value) Long(v int64) { - qv.queryValue.Long(v) -} - -// Float encodes v as a query string value -func (qv Value) Float(v float32) { - qv.queryValue.Float(v) -} - -// Double encodes v as a query string value -func (qv Value) Double(v float64) { - qv.queryValue.Double(v) -} - -// BigInteger encodes v as a query string value -func (qv Value) BigInteger(v *big.Int) { - qv.queryValue.BigInteger(v) -} - -// BigDecimal encodes v as a query string value -func (qv Value) BigDecimal(v *big.Float) { - qv.queryValue.BigDecimal(v) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go deleted file mode 100644 index 974ef594f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go +++ /dev/null @@ -1,96 +0,0 @@ -package ratelimit - -import ( - "sync" -) - -// TokenBucket provides a concurrency safe utility for adding and removing -// tokens from the available token bucket. -type TokenBucket struct { - remainingTokens uint - maxCapacity uint - minCapacity uint - mu sync.Mutex -} - -// NewTokenBucket returns an initialized TokenBucket with the capacity -// specified. -func NewTokenBucket(i uint) *TokenBucket { - return &TokenBucket{ - remainingTokens: i, - maxCapacity: i, - minCapacity: 1, - } -} - -// Retrieve attempts to reduce the available tokens by the amount requested. If -// there are tokens available true will be returned along with the number of -// available tokens remaining. If amount requested is larger than the available -// capacity, false will be returned along with the available capacity. If the -// amount is less than the available capacity, the capacity will be reduced by -// that amount, and the remaining capacity and true will be returned. -func (t *TokenBucket) Retrieve(amount uint) (available uint, retrieved bool) { - t.mu.Lock() - defer t.mu.Unlock() - - if amount > t.remainingTokens { - return t.remainingTokens, false - } - - t.remainingTokens -= amount - return t.remainingTokens, true -} - -// Refund returns the amount of tokens back to the available token bucket, up -// to the initial capacity. -func (t *TokenBucket) Refund(amount uint) { - t.mu.Lock() - defer t.mu.Unlock() - - // Capacity cannot exceed max capacity. - t.remainingTokens = uintMin(t.remainingTokens+amount, t.maxCapacity) -} - -// Capacity returns the maximum capacity of tokens that the bucket could -// contain. -func (t *TokenBucket) Capacity() uint { - t.mu.Lock() - defer t.mu.Unlock() - - return t.maxCapacity -} - -// Remaining returns the number of tokens that remaining in the bucket. -func (t *TokenBucket) Remaining() uint { - t.mu.Lock() - defer t.mu.Unlock() - - return t.remainingTokens -} - -// Resize adjusts the size of the token bucket. Returns the capacity remaining. -func (t *TokenBucket) Resize(size uint) uint { - t.mu.Lock() - defer t.mu.Unlock() - - t.maxCapacity = uintMax(size, t.minCapacity) - - // Capacity needs to be capped at max capacity, if max size reduced. - t.remainingTokens = uintMin(t.remainingTokens, t.maxCapacity) - - return t.remainingTokens -} - -func uintMin(a, b uint) uint { - if a < b { - return a - } - return b -} - -func uintMax(a, b uint) uint { - if a > b { - return a - } - return b -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go deleted file mode 100644 index d89090ad3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go +++ /dev/null @@ -1,83 +0,0 @@ -package ratelimit - -import ( - "context" - "fmt" -) - -type rateToken struct { - tokenCost uint - bucket *TokenBucket -} - -func (t rateToken) release() error { - t.bucket.Refund(t.tokenCost) - return nil -} - -// TokenRateLimit provides a Token Bucket RateLimiter implementation -// that limits the overall number of retry attempts that can be made across -// operation invocations. -type TokenRateLimit struct { - bucket *TokenBucket -} - -// NewTokenRateLimit returns an TokenRateLimit with default values. -// Functional options can configure the retry rate limiter. -func NewTokenRateLimit(tokens uint) *TokenRateLimit { - return &TokenRateLimit{ - bucket: NewTokenBucket(tokens), - } -} - -type canceledError struct { - Err error -} - -func (c canceledError) CanceledError() bool { return true } -func (c canceledError) Unwrap() error { return c.Err } -func (c canceledError) Error() string { - return fmt.Sprintf("canceled, %v", c.Err) -} - -// GetToken may cause a available pool of retry quota to be -// decremented. Will return an error if the decremented value can not be -// reduced from the retry quota. -func (l *TokenRateLimit) GetToken(ctx context.Context, cost uint) (func() error, error) { - select { - case <-ctx.Done(): - return nil, canceledError{Err: ctx.Err()} - default: - } - if avail, ok := l.bucket.Retrieve(cost); !ok { - return nil, QuotaExceededError{Available: avail, Requested: cost} - } - - return rateToken{ - tokenCost: cost, - bucket: l.bucket, - }.release, nil -} - -// AddTokens increments the token bucket by a fixed amount. -func (l *TokenRateLimit) AddTokens(v uint) error { - l.bucket.Refund(v) - return nil -} - -// Remaining returns the number of remaining tokens in the bucket. -func (l *TokenRateLimit) Remaining() uint { - return l.bucket.Remaining() -} - -// QuotaExceededError provides the SDK error when the retries for a given -// token bucket have been exhausted. -type QuotaExceededError struct { - Available uint - Requested uint -} - -func (e QuotaExceededError) Error() string { - return fmt.Sprintf("retry quota exceeded, %d available, %d requested", - e.Available, e.Requested) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go deleted file mode 100644 index d8d00e615..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go +++ /dev/null @@ -1,25 +0,0 @@ -package aws - -import ( - "fmt" -) - -// TODO remove replace with smithy.CanceledError - -// RequestCanceledError is the error that will be returned by an API request -// that was canceled. Requests given a Context may return this error when -// canceled. -type RequestCanceledError struct { - Err error -} - -// CanceledError returns true to satisfy interfaces checking for canceled errors. -func (*RequestCanceledError) CanceledError() bool { return true } - -// Unwrap returns the underlying error, if there was one. -func (e *RequestCanceledError) Unwrap() error { - return e.Err -} -func (e *RequestCanceledError) Error() string { - return fmt.Sprintf("request canceled, %v", e.Err) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go deleted file mode 100644 index 4dfde8573..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go +++ /dev/null @@ -1,156 +0,0 @@ -package retry - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/internal/sdk" -) - -const ( - // DefaultRequestCost is the cost of a single request from the adaptive - // rate limited token bucket. - DefaultRequestCost uint = 1 -) - -// DefaultThrottles provides the set of errors considered throttle errors that -// are checked by default. -var DefaultThrottles = []IsErrorThrottle{ - ThrottleErrorCode{ - Codes: DefaultThrottleErrorCodes, - }, -} - -// AdaptiveModeOptions provides the functional options for configuring the -// adaptive retry mode, and delay behavior. -type AdaptiveModeOptions struct { - // If the adaptive token bucket is empty, when an attempt will be made - // AdaptiveMode will sleep until a token is available. This can occur when - // attempts fail with throttle errors. Use this option to disable the sleep - // until token is available, and return error immediately. - FailOnNoAttemptTokens bool - - // The cost of an attempt from the AdaptiveMode's adaptive token bucket. - RequestCost uint - - // Set of strategies to determine if the attempt failed due to a throttle - // error. - // - // It is safe to append to this list in NewAdaptiveMode's functional options. - Throttles []IsErrorThrottle - - // Set of options for standard retry mode that AdaptiveMode is built on top - // of. AdaptiveMode may apply its own defaults to Standard retry mode that - // are different than the defaults of NewStandard. Use these options to - // override the default options. - StandardOptions []func(*StandardOptions) -} - -// AdaptiveMode provides an experimental retry strategy that expands on the -// Standard retry strategy, adding client attempt rate limits. The attempt rate -// limit is initially unrestricted, but becomes restricted when the attempt -// fails with for a throttle error. When restricted AdaptiveMode may need to -// sleep before an attempt is made, if too many throttles have been received. -// AdaptiveMode's sleep can be canceled with context cancel. Set -// AdaptiveModeOptions FailOnNoAttemptTokens to change the behavior from sleep, -// to fail fast. -// -// Eventually unrestricted attempt rate limit will be restored once attempts no -// longer are failing due to throttle errors. -type AdaptiveMode struct { - options AdaptiveModeOptions - throttles IsErrorThrottles - - retryer aws.RetryerV2 - rateLimit *adaptiveRateLimit -} - -// NewAdaptiveMode returns an initialized AdaptiveMode retry strategy. -func NewAdaptiveMode(optFns ...func(*AdaptiveModeOptions)) *AdaptiveMode { - o := AdaptiveModeOptions{ - RequestCost: DefaultRequestCost, - Throttles: append([]IsErrorThrottle{}, DefaultThrottles...), - } - for _, fn := range optFns { - fn(&o) - } - - return &AdaptiveMode{ - options: o, - throttles: IsErrorThrottles(o.Throttles), - retryer: NewStandard(o.StandardOptions...), - rateLimit: newAdaptiveRateLimit(), - } -} - -// IsErrorRetryable returns if the failed attempt is retryable. This check -// should determine if the error can be retried, or if the error is -// terminal. -func (a *AdaptiveMode) IsErrorRetryable(err error) bool { - return a.retryer.IsErrorRetryable(err) -} - -// MaxAttempts returns the maximum number of attempts that can be made for -// an attempt before failing. A value of 0 implies that the attempt should -// be retried until it succeeds if the errors are retryable. -func (a *AdaptiveMode) MaxAttempts() int { - return a.retryer.MaxAttempts() -} - -// RetryDelay returns the delay that should be used before retrying the -// attempt. Will return error if the if the delay could not be determined. -func (a *AdaptiveMode) RetryDelay(attempt int, opErr error) ( - time.Duration, error, -) { - return a.retryer.RetryDelay(attempt, opErr) -} - -// GetRetryToken attempts to deduct the retry cost from the retry token pool. -// Returning the token release function, or error. -func (a *AdaptiveMode) GetRetryToken(ctx context.Context, opErr error) ( - releaseToken func(error) error, err error, -) { - return a.retryer.GetRetryToken(ctx, opErr) -} - -// GetInitialToken returns the initial attempt token that can increment the -// retry token pool if the attempt is successful. -// -// Deprecated: This method does not provide a way to block using Context, -// nor can it return an error. Use RetryerV2, and GetAttemptToken instead. Only -// present to implement Retryer interface. -func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) { - return nopRelease -} - -// GetAttemptToken returns the attempt token that can be used to rate limit -// attempt calls. Will be used by the SDK's retry package's Attempt -// middleware to get an attempt token prior to calling the temp and releasing -// the attempt token after the attempt has been made. -func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) { - for { - acquiredToken, waitTryAgain := a.rateLimit.AcquireToken(a.options.RequestCost) - if acquiredToken { - break - } - if a.options.FailOnNoAttemptTokens { - return nil, fmt.Errorf( - "unable to get attempt token, and FailOnNoAttemptTokens enables") - } - - if err := sdk.SleepWithContext(ctx, waitTryAgain); err != nil { - return nil, fmt.Errorf("failed to wait for token to be available, %w", err) - } - } - - return a.handleResponse, nil -} - -func (a *AdaptiveMode) handleResponse(opErr error) error { - throttled := a.throttles.IsErrorThrottle(opErr).Bool() - - a.rateLimit.Update(throttled) - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go deleted file mode 100644 index ad96d9b8c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go +++ /dev/null @@ -1,158 +0,0 @@ -package retry - -import ( - "math" - "sync" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/sdk" -) - -type adaptiveRateLimit struct { - tokenBucketEnabled bool - - smooth float64 - beta float64 - scaleConstant float64 - minFillRate float64 - - fillRate float64 - calculatedRate float64 - lastRefilled time.Time - measuredTxRate float64 - lastTxRateBucket float64 - requestCount int64 - lastMaxRate float64 - lastThrottleTime time.Time - timeWindow float64 - - tokenBucket *adaptiveTokenBucket - - mu sync.Mutex -} - -func newAdaptiveRateLimit() *adaptiveRateLimit { - now := sdk.NowTime() - return &adaptiveRateLimit{ - smooth: 0.8, - beta: 0.7, - scaleConstant: 0.4, - - minFillRate: 0.5, - - lastTxRateBucket: math.Floor(timeFloat64Seconds(now)), - lastThrottleTime: now, - - tokenBucket: newAdaptiveTokenBucket(0), - } -} - -func (a *adaptiveRateLimit) Enable(v bool) { - a.mu.Lock() - defer a.mu.Unlock() - - a.tokenBucketEnabled = v -} - -func (a *adaptiveRateLimit) AcquireToken(amount uint) ( - tokenAcquired bool, waitTryAgain time.Duration, -) { - a.mu.Lock() - defer a.mu.Unlock() - - if !a.tokenBucketEnabled { - return true, 0 - } - - a.tokenBucketRefill() - - available, ok := a.tokenBucket.Retrieve(float64(amount)) - if !ok { - waitDur := float64Seconds((float64(amount) - available) / a.fillRate) - return false, waitDur - } - - return true, 0 -} - -func (a *adaptiveRateLimit) Update(throttled bool) { - a.mu.Lock() - defer a.mu.Unlock() - - a.updateMeasuredRate() - - if throttled { - rateToUse := a.measuredTxRate - if a.tokenBucketEnabled { - rateToUse = math.Min(a.measuredTxRate, a.fillRate) - } - - a.lastMaxRate = rateToUse - a.calculateTimeWindow() - a.lastThrottleTime = sdk.NowTime() - a.calculatedRate = a.cubicThrottle(rateToUse) - a.tokenBucketEnabled = true - } else { - a.calculateTimeWindow() - a.calculatedRate = a.cubicSuccess(sdk.NowTime()) - } - - newRate := math.Min(a.calculatedRate, 2*a.measuredTxRate) - a.tokenBucketUpdateRate(newRate) -} - -func (a *adaptiveRateLimit) cubicSuccess(t time.Time) float64 { - dt := secondsFloat64(t.Sub(a.lastThrottleTime)) - return (a.scaleConstant * math.Pow(dt-a.timeWindow, 3)) + a.lastMaxRate -} - -func (a *adaptiveRateLimit) cubicThrottle(rateToUse float64) float64 { - return rateToUse * a.beta -} - -func (a *adaptiveRateLimit) calculateTimeWindow() { - a.timeWindow = math.Pow((a.lastMaxRate*(1.-a.beta))/a.scaleConstant, 1./3.) -} - -func (a *adaptiveRateLimit) tokenBucketUpdateRate(newRPS float64) { - a.tokenBucketRefill() - a.fillRate = math.Max(newRPS, a.minFillRate) - a.tokenBucket.Resize(newRPS) -} - -func (a *adaptiveRateLimit) updateMeasuredRate() { - now := sdk.NowTime() - timeBucket := math.Floor(timeFloat64Seconds(now)*2.) / 2. - a.requestCount++ - - if timeBucket > a.lastTxRateBucket { - currentRate := float64(a.requestCount) / (timeBucket - a.lastTxRateBucket) - a.measuredTxRate = (currentRate * a.smooth) + (a.measuredTxRate * (1. - a.smooth)) - a.requestCount = 0 - a.lastTxRateBucket = timeBucket - } -} - -func (a *adaptiveRateLimit) tokenBucketRefill() { - now := sdk.NowTime() - if a.lastRefilled.IsZero() { - a.lastRefilled = now - return - } - - fillAmount := secondsFloat64(now.Sub(a.lastRefilled)) * a.fillRate - a.tokenBucket.Refund(fillAmount) - a.lastRefilled = now -} - -func float64Seconds(v float64) time.Duration { - return time.Duration(v * float64(time.Second)) -} - -func secondsFloat64(v time.Duration) float64 { - return float64(v) / float64(time.Second) -} - -func timeFloat64Seconds(v time.Time) float64 { - return float64(v.UnixNano()) / float64(time.Second) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go deleted file mode 100644 index 052723e8e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go +++ /dev/null @@ -1,83 +0,0 @@ -package retry - -import ( - "math" - "sync" -) - -// adaptiveTokenBucket provides a concurrency safe utility for adding and -// removing tokens from the available token bucket. -type adaptiveTokenBucket struct { - remainingTokens float64 - maxCapacity float64 - minCapacity float64 - mu sync.Mutex -} - -// newAdaptiveTokenBucket returns an initialized adaptiveTokenBucket with the -// capacity specified. -func newAdaptiveTokenBucket(i float64) *adaptiveTokenBucket { - return &adaptiveTokenBucket{ - remainingTokens: i, - maxCapacity: i, - minCapacity: 1, - } -} - -// Retrieve attempts to reduce the available tokens by the amount requested. If -// there are tokens available true will be returned along with the number of -// available tokens remaining. If amount requested is larger than the available -// capacity, false will be returned along with the available capacity. If the -// amount is less than the available capacity, the capacity will be reduced by -// that amount, and the remaining capacity and true will be returned. -func (t *adaptiveTokenBucket) Retrieve(amount float64) (available float64, retrieved bool) { - t.mu.Lock() - defer t.mu.Unlock() - - if amount > t.remainingTokens { - return t.remainingTokens, false - } - - t.remainingTokens -= amount - return t.remainingTokens, true -} - -// Refund returns the amount of tokens back to the available token bucket, up -// to the initial capacity. -func (t *adaptiveTokenBucket) Refund(amount float64) { - t.mu.Lock() - defer t.mu.Unlock() - - // Capacity cannot exceed max capacity. - t.remainingTokens = math.Min(t.remainingTokens+amount, t.maxCapacity) -} - -// Capacity returns the maximum capacity of tokens that the bucket could -// contain. -func (t *adaptiveTokenBucket) Capacity() float64 { - t.mu.Lock() - defer t.mu.Unlock() - - return t.maxCapacity -} - -// Remaining returns the number of tokens that remaining in the bucket. -func (t *adaptiveTokenBucket) Remaining() float64 { - t.mu.Lock() - defer t.mu.Unlock() - - return t.remainingTokens -} - -// Resize adjusts the size of the token bucket. Returns the capacity remaining. -func (t *adaptiveTokenBucket) Resize(size float64) float64 { - t.mu.Lock() - defer t.mu.Unlock() - - t.maxCapacity = math.Max(size, t.minCapacity) - - // Capacity needs to be capped at max capacity, if max size reduced. - t.remainingTokens = math.Min(t.remainingTokens, t.maxCapacity) - - return t.remainingTokens -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go deleted file mode 100644 index 3a08ebe0a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go +++ /dev/null @@ -1,80 +0,0 @@ -// Package retry provides interfaces and implementations for SDK request retry behavior. -// -// # Retryer Interface and Implementations -// -// This package defines Retryer interface that is used to either implement custom retry behavior -// or to extend the existing retry implementations provided by the SDK. This package provides a single -// retry implementation: Standard. -// -// # Standard -// -// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited -// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs. -// In addition, the retryer uses a configurable token bucket to rate limit the retry attempts across the client, -// and uses an additional delay policy to limit the time between a requests subsequent attempts. -// -// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether -// a given error is retryable. By default this list of retryables includes the following: -// - Retrying errors that implement the RetryableError method, and return true. -// - Connection Errors -// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true. -// - Connection Reset Errors. -// - net.OpErr types that are dialing errors or are temporary. -// - HTTP Status Codes: 500, 502, 503, and 504. -// - API Error Codes -// - RequestTimeout, RequestTimeoutException -// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException, -// RequestThrottled, SlowDown, EC2ThrottledException -// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException -// - TransactionInProgressException, PriorRequestNotComplete -// -// The standard retryer will not retry a request in the event if the context associated with the request -// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context -// value. -// -// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer -// using the NewStandard function, and providing one more functional argument that mutate the StandardOptions -// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions, -// and the retry delay policy. -// -// For example to modify the default retry attempts for the standard retryer: -// -// // configure the custom retryer -// customRetry := retry.NewStandard(func(o *retry.StandardOptions) { -// o.MaxAttempts = 5 -// }) -// -// // create a service client with the retryer -// s3.NewFromConfig(cfg, func(o *s3.Options) { -// o.Retryer = customRetry -// }) -// -// # Utilities -// -// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic -// way. These are: -// -// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable -// in addition to those considered retryable by the provided retryer. -// -// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping -// a retryer implementation. -// -// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a -// request by wrapping a retryer implementation. -// -// The following package functions have been provided to easily satisfy different retry interfaces to further customize -// a given retryer's behavior: -// -// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example, -// you can use this method to easily create custom back off policies to be used with the -// standard retryer. -// -// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example, -// this can be used to extend the standard retryer to add additional logic to determine if an -// error should be retried. -// -// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example, -// this can be used to extend the standard retryer to add additional logic to determine if an -// error should be considered a timeout. -package retry diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go deleted file mode 100644 index 3e432eefe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go +++ /dev/null @@ -1,20 +0,0 @@ -package retry - -import "fmt" - -// MaxAttemptsError provides the error when the maximum number of attempts have -// been exceeded. -type MaxAttemptsError struct { - Attempt int - Err error -} - -func (e *MaxAttemptsError) Error() string { - return fmt.Sprintf("exceeded maximum number of attempts, %d, %v", e.Attempt, e.Err) -} - -// Unwrap returns the nested error causing the max attempts error. Provides the -// implementation for errors.Is and errors.As to unwrap nested errors. -func (e *MaxAttemptsError) Unwrap() error { - return e.Err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go deleted file mode 100644 index c266996de..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go +++ /dev/null @@ -1,49 +0,0 @@ -package retry - -import ( - "math" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/timeconv" -) - -// ExponentialJitterBackoff provides backoff delays with jitter based on the -// number of attempts. -type ExponentialJitterBackoff struct { - maxBackoff time.Duration - // precomputed number of attempts needed to reach max backoff. - maxBackoffAttempts float64 - - randFloat64 func() (float64, error) -} - -// NewExponentialJitterBackoff returns an ExponentialJitterBackoff configured -// for the max backoff. -func NewExponentialJitterBackoff(maxBackoff time.Duration) *ExponentialJitterBackoff { - return &ExponentialJitterBackoff{ - maxBackoff: maxBackoff, - maxBackoffAttempts: math.Log2( - float64(maxBackoff) / float64(time.Second)), - randFloat64: rand.CryptoRandFloat64, - } -} - -// BackoffDelay returns the duration to wait before the next attempt should be -// made. Returns an error if unable get a duration. -func (j *ExponentialJitterBackoff) BackoffDelay(attempt int, err error) (time.Duration, error) { - if attempt > int(j.maxBackoffAttempts) { - return j.maxBackoff, nil - } - - b, err := j.randFloat64() - if err != nil { - return 0, err - } - - // [0.0, 1.0) * 2 ^ attempts - ri := int64(1 << uint64(attempt)) - delaySeconds := b * float64(ri) - - return timeconv.FloatSecondsDur(delaySeconds), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go deleted file mode 100644 index 7a3f18301..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go +++ /dev/null @@ -1,52 +0,0 @@ -package retry - -import ( - awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" -) - -// attemptResultsKey is a metadata accessor key to retrieve metadata -// for all request attempts. -type attemptResultsKey struct { -} - -// GetAttemptResults retrieves attempts results from middleware metadata. -func GetAttemptResults(metadata middleware.Metadata) (AttemptResults, bool) { - m, ok := metadata.Get(attemptResultsKey{}).(AttemptResults) - return m, ok -} - -// AttemptResults represents struct containing metadata returned by all request attempts. -type AttemptResults struct { - - // Results is a slice consisting attempt result from all request attempts. - // Results are stored in order request attempt is made. - Results []AttemptResult -} - -// AttemptResult represents attempt result returned by a single request attempt. -type AttemptResult struct { - - // Err is the error if received for the request attempt. - Err error - - // Retryable denotes if request may be retried. This states if an - // error is considered retryable. - Retryable bool - - // Retried indicates if this request was retried. - Retried bool - - // ResponseMetadata is any existing metadata passed via the response middlewares. - ResponseMetadata middleware.Metadata -} - -// addAttemptResults adds attempt results to middleware metadata -func addAttemptResults(metadata *middleware.Metadata, v AttemptResults) { - metadata.Set(attemptResultsKey{}, v) -} - -// GetRawResponse returns raw response recorded for the attempt result -func (a AttemptResult) GetRawResponse() interface{} { - return awsmiddle.GetRawResponse(a.ResponseMetadata) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go deleted file mode 100644 index dc703d482..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ /dev/null @@ -1,340 +0,0 @@ -package retry - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/logging" - smithymiddle "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/transport/http" -) - -// RequestCloner is a function that can take an input request type and clone -// the request for use in a subsequent retry attempt. -type RequestCloner func(interface{}) interface{} - -type retryMetadata struct { - AttemptNum int - AttemptTime time.Time - MaxAttempts int - AttemptClockSkew time.Duration -} - -// Attempt is a Smithy Finalize middleware that handles retry attempts using -// the provided Retryer implementation. -type Attempt struct { - // Enable the logging of retry attempts performed by the SDK. This will - // include logging retry attempts, unretryable errors, and when max - // attempts are reached. - LogAttempts bool - - retryer aws.RetryerV2 - requestCloner RequestCloner -} - -// NewAttemptMiddleware returns a new Attempt retry middleware. -func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt { - m := &Attempt{ - retryer: wrapAsRetryerV2(retryer), - requestCloner: requestCloner, - } - for _, fn := range optFns { - fn(m) - } - return m -} - -// ID returns the middleware identifier -func (r *Attempt) ID() string { return "Retry" } - -func (r Attempt) logf(logger logging.Logger, classification logging.Classification, format string, v ...interface{}) { - if !r.LogAttempts { - return - } - logger.Logf(classification, format, v...) -} - -// HandleFinalize utilizes the provider Retryer implementation to attempt -// retries over the next handler -func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) ( - out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error, -) { - var attemptNum int - var attemptClockSkew time.Duration - var attemptResults AttemptResults - - maxAttempts := r.retryer.MaxAttempts() - releaseRetryToken := nopRelease - - for { - attemptNum++ - attemptInput := in - attemptInput.Request = r.requestCloner(attemptInput.Request) - - // Record the metadata for the for attempt being started. - attemptCtx := setRetryMetadata(ctx, retryMetadata{ - AttemptNum: attemptNum, - AttemptTime: sdk.NowTime().UTC(), - MaxAttempts: maxAttempts, - AttemptClockSkew: attemptClockSkew, - }) - - var attemptResult AttemptResult - out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next) - attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata) - - // AttemptResult Retried states that the attempt was not successful, and - // should be retried. - shouldRetry := attemptResult.Retried - - // Add attempt metadata to list of all attempt metadata - attemptResults.Results = append(attemptResults.Results, attemptResult) - - if !shouldRetry { - // Ensure the last response's metadata is used as the bases for result - // metadata returned by the stack. The Slice of attempt results - // will be added to this cloned metadata. - metadata = attemptResult.ResponseMetadata.Clone() - - break - } - } - - addAttemptResults(&metadata, attemptResults) - return out, metadata, err -} - -// handleAttempt handles an individual request attempt. -func (r *Attempt) handleAttempt( - ctx context.Context, in smithymiddle.FinalizeInput, releaseRetryToken func(error) error, next smithymiddle.FinalizeHandler, -) ( - out smithymiddle.FinalizeOutput, attemptResult AttemptResult, _ func(error) error, err error, -) { - defer func() { - attemptResult.Err = err - }() - - // Short circuit if this attempt never can succeed because the context is - // canceled. This reduces the chance of token pools being modified for - // attempts that will not be made - select { - case <-ctx.Done(): - return out, attemptResult, nopRelease, ctx.Err() - default: - } - - //------------------------------ - // Get Attempt Token - //------------------------------ - releaseAttemptToken, err := r.retryer.GetAttemptToken(ctx) - if err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to get retry Send token, %w", err) - } - - //------------------------------ - // Send Attempt - //------------------------------ - logger := smithymiddle.GetLogger(ctx) - service, operation := awsmiddle.GetServiceID(ctx), awsmiddle.GetOperationName(ctx) - retryMetadata, _ := getRetryMetadata(ctx) - attemptNum := retryMetadata.AttemptNum - maxAttempts := retryMetadata.MaxAttempts - - // Following attempts must ensure the request payload stream starts in a - // rewound state. - if attemptNum > 1 { - if rewindable, ok := in.Request.(interface{ RewindStream() error }); ok { - if rewindErr := rewindable.RewindStream(); rewindErr != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to rewind transport stream for retry, %w", rewindErr) - } - } - - r.logf(logger, logging.Debug, "retrying request %s/%s, attempt %d", - service, operation, attemptNum) - } - - var metadata smithymiddle.Metadata - out, metadata, err = next.HandleFinalize(ctx, in) - attemptResult.ResponseMetadata = metadata - - //------------------------------ - // Bookkeeping - //------------------------------ - // Release the retry token based on the state of the attempt's error (if any). - if releaseError := releaseRetryToken(err); releaseError != nil && err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to release retry token after request error, %w", err) - } - // Release the attempt token based on the state of the attempt's error (if any). - if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to release initial token after request error, %w", err) - } - // If there was no error making the attempt, nothing further to do. There - // will be nothing to retry. - if err == nil { - return out, attemptResult, nopRelease, err - } - - //------------------------------ - // Is Retryable and Should Retry - //------------------------------ - // If the attempt failed with an unretryable error, nothing further to do - // but return, and inform the caller about the terminal failure. - retryable := r.retryer.IsErrorRetryable(err) - if !retryable { - r.logf(logger, logging.Debug, "request failed with unretryable error %v", err) - return out, attemptResult, nopRelease, err - } - - // set retryable to true - attemptResult.Retryable = true - - // Once the maximum number of attempts have been exhausted there is nothing - // further to do other than inform the caller about the terminal failure. - if maxAttempts > 0 && attemptNum >= maxAttempts { - r.logf(logger, logging.Debug, "max retry attempts exhausted, max %d", maxAttempts) - err = &MaxAttemptsError{ - Attempt: attemptNum, - Err: err, - } - return out, attemptResult, nopRelease, err - } - - //------------------------------ - // Get Retry (aka Retry Quota) Token - //------------------------------ - // Get a retry token that will be released after the - releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err) - if retryTokenErr != nil { - return out, attemptResult, nopRelease, retryTokenErr - } - - //------------------------------ - // Retry Delay and Sleep - //------------------------------ - // Get the retry delay before another attempt can be made, and sleep for - // that time. Potentially early exist if the sleep is canceled via the - // context. - retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) - mctx := metrics.Context(ctx) - if mctx != nil { - attempt, err := mctx.Data().LatestAttempt() - if err != nil { - attempt.RetryDelay = retryDelay - } - } - if reqErr != nil { - return out, attemptResult, releaseRetryToken, reqErr - } - if reqErr = sdk.SleepWithContext(ctx, retryDelay); reqErr != nil { - err = &aws.RequestCanceledError{Err: reqErr} - return out, attemptResult, releaseRetryToken, err - } - - // The request should be re-attempted. - attemptResult.Retried = true - - return out, attemptResult, releaseRetryToken, err -} - -// MetricsHeader attaches SDK request metric header for retries to the transport -type MetricsHeader struct{} - -// ID returns the middleware identifier -func (r *MetricsHeader) ID() string { - return "RetryMetricsHeader" -} - -// HandleFinalize attaches the SDK request metric header to the transport layer -func (r MetricsHeader) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) ( - out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error, -) { - retryMetadata, _ := getRetryMetadata(ctx) - - const retryMetricHeader = "Amz-Sdk-Request" - var parts []string - - parts = append(parts, "attempt="+strconv.Itoa(retryMetadata.AttemptNum)) - if retryMetadata.MaxAttempts != 0 { - parts = append(parts, "max="+strconv.Itoa(retryMetadata.MaxAttempts)) - } - - var ttl time.Time - if deadline, ok := ctx.Deadline(); ok { - ttl = deadline - } - - // Only append the TTL if it can be determined. - if !ttl.IsZero() && retryMetadata.AttemptClockSkew > 0 { - const unixTimeFormat = "20060102T150405Z" - ttl = ttl.Add(retryMetadata.AttemptClockSkew) - parts = append(parts, "ttl="+ttl.Format(unixTimeFormat)) - } - - switch req := in.Request.(type) { - case *http.Request: - req.Header[retryMetricHeader] = append(req.Header[retryMetricHeader][:0], strings.Join(parts, "; ")) - default: - return out, metadata, fmt.Errorf("unknown transport type %T", req) - } - - return next.HandleFinalize(ctx, in) -} - -type retryMetadataKey struct{} - -// getRetryMetadata retrieves retryMetadata from the context and a bool -// indicating if it was set. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) { - metadata, ok = smithymiddle.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata) - return metadata, ok -} - -// setRetryMetadata sets the retryMetadata on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Context { - return smithymiddle.WithStackValue(ctx, retryMetadataKey{}, metadata) -} - -// AddRetryMiddlewaresOptions is the set of options that can be passed to -// AddRetryMiddlewares for configuring retry associated middleware. -type AddRetryMiddlewaresOptions struct { - Retryer aws.Retryer - - // Enable the logging of retry attempts performed by the SDK. This will - // include logging retry attempts, unretryable errors, and when max - // attempts are reached. - LogRetryAttempts bool -} - -// AddRetryMiddlewares adds retry middleware to operation middleware stack -func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresOptions) error { - attempt := NewAttemptMiddleware(options.Retryer, http.RequestCloner, func(middleware *Attempt) { - middleware.LogAttempts = options.LogRetryAttempts - }) - - // index retry to before signing, if signing exists - if err := stack.Finalize.Insert(attempt, "Signing", smithymiddle.Before); err != nil { - return err - } - - if err := stack.Finalize.Insert(&MetricsHeader{}, attempt.ID(), smithymiddle.After); err != nil { - return err - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go deleted file mode 100644 index af81635b3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go +++ /dev/null @@ -1,90 +0,0 @@ -package retry - -import ( - "context" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// AddWithErrorCodes returns a Retryer with additional error codes considered -// for determining if the error should be retried. -func AddWithErrorCodes(r aws.Retryer, codes ...string) aws.Retryer { - retryable := &RetryableErrorCode{ - Codes: map[string]struct{}{}, - } - for _, c := range codes { - retryable.Codes[c] = struct{}{} - } - - return &withIsErrorRetryable{ - RetryerV2: wrapAsRetryerV2(r), - Retryable: retryable, - } -} - -type withIsErrorRetryable struct { - aws.RetryerV2 - Retryable IsErrorRetryable -} - -func (r *withIsErrorRetryable) IsErrorRetryable(err error) bool { - if v := r.Retryable.IsErrorRetryable(err); v != aws.UnknownTernary { - return v.Bool() - } - return r.RetryerV2.IsErrorRetryable(err) -} - -// AddWithMaxAttempts returns a Retryer with MaxAttempts set to the value -// specified. -func AddWithMaxAttempts(r aws.Retryer, max int) aws.Retryer { - return &withMaxAttempts{ - RetryerV2: wrapAsRetryerV2(r), - Max: max, - } -} - -type withMaxAttempts struct { - aws.RetryerV2 - Max int -} - -func (w *withMaxAttempts) MaxAttempts() int { - return w.Max -} - -// AddWithMaxBackoffDelay returns a retryer wrapping the passed in retryer -// overriding the RetryDelay behavior for a alternate minimum initial backoff -// delay. -func AddWithMaxBackoffDelay(r aws.Retryer, delay time.Duration) aws.Retryer { - return &withMaxBackoffDelay{ - RetryerV2: wrapAsRetryerV2(r), - backoff: NewExponentialJitterBackoff(delay), - } -} - -type withMaxBackoffDelay struct { - aws.RetryerV2 - backoff *ExponentialJitterBackoff -} - -func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) { - return r.backoff.BackoffDelay(attempt, err) -} - -type wrappedAsRetryerV2 struct { - aws.Retryer -} - -func wrapAsRetryerV2(r aws.Retryer) aws.RetryerV2 { - v, ok := r.(aws.RetryerV2) - if !ok { - v = wrappedAsRetryerV2{Retryer: r} - } - - return v -} - -func (w wrappedAsRetryerV2) GetAttemptToken(context.Context) (func(error) error, error) { - return w.Retryer.GetInitialToken(), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go deleted file mode 100644 index 987affdde..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go +++ /dev/null @@ -1,201 +0,0 @@ -package retry - -import ( - "errors" - "net" - "net/url" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// IsErrorRetryable provides the interface of an implementation to determine if -// a error as the result of an operation is retryable. -type IsErrorRetryable interface { - IsErrorRetryable(error) aws.Ternary -} - -// IsErrorRetryables is a collection of checks to determine of the error is -// retryable. Iterates through the checks and returns the state of retryable -// if any check returns something other than unknown. -type IsErrorRetryables []IsErrorRetryable - -// IsErrorRetryable returns if the error is retryable if any of the checks in -// the list return a value other than unknown. -func (r IsErrorRetryables) IsErrorRetryable(err error) aws.Ternary { - for _, re := range r { - if v := re.IsErrorRetryable(err); v != aws.UnknownTernary { - return v - } - } - return aws.UnknownTernary -} - -// IsErrorRetryableFunc wraps a function with the IsErrorRetryable interface. -type IsErrorRetryableFunc func(error) aws.Ternary - -// IsErrorRetryable returns if the error is retryable. -func (fn IsErrorRetryableFunc) IsErrorRetryable(err error) aws.Ternary { - return fn(err) -} - -// RetryableError is an IsErrorRetryable implementation which uses the -// optional interface Retryable on the error value to determine if the error is -// retryable. -type RetryableError struct{} - -// IsErrorRetryable returns if the error is retryable if it satisfies the -// Retryable interface, and returns if the attempt should be retried. -func (RetryableError) IsErrorRetryable(err error) aws.Ternary { - var v interface{ RetryableError() bool } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - return aws.BoolTernary(v.RetryableError()) -} - -// NoRetryCanceledError detects if the error was an request canceled error and -// returns if so. -type NoRetryCanceledError struct{} - -// IsErrorRetryable returns the error is not retryable if the request was -// canceled. -func (NoRetryCanceledError) IsErrorRetryable(err error) aws.Ternary { - var v interface{ CanceledError() bool } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - if v.CanceledError() { - return aws.FalseTernary - } - return aws.UnknownTernary -} - -// RetryableConnectionError determines if the underlying error is an HTTP -// connection and returns if it should be retried. -// -// Includes errors such as connection reset, connection refused, net dial, -// temporary, and timeout errors. -type RetryableConnectionError struct{} - -// IsErrorRetryable returns if the error is caused by and HTTP connection -// error, and should be retried. -func (r RetryableConnectionError) IsErrorRetryable(err error) aws.Ternary { - if err == nil { - return aws.UnknownTernary - } - var retryable bool - - var conErr interface{ ConnectionError() bool } - var tempErr interface{ Temporary() bool } - var timeoutErr interface{ Timeout() bool } - var urlErr *url.Error - var netOpErr *net.OpError - var dnsError *net.DNSError - - if errors.As(err, &dnsError) { - // NXDOMAIN errors should not be retried - if dnsError.IsNotFound { - return aws.BoolTernary(false) - } - - // if !dnsError.Temporary(), error may or may not be temporary, - // (i.e. !Temporary() =/=> !retryable) so we should fall through to - // remaining checks - if dnsError.Temporary() { - return aws.BoolTernary(true) - } - } - - switch { - case errors.As(err, &conErr) && conErr.ConnectionError(): - retryable = true - - case strings.Contains(err.Error(), "connection reset"): - retryable = true - - case errors.As(err, &urlErr): - // Refused connections should be retried as the service may not yet be - // running on the port. Go TCP dial considers refused connections as - // not temporary. - if strings.Contains(urlErr.Error(), "connection refused") { - retryable = true - } else { - return r.IsErrorRetryable(errors.Unwrap(urlErr)) - } - - case errors.As(err, &netOpErr): - // Network dial, or temporary network errors are always retryable. - if strings.EqualFold(netOpErr.Op, "dial") || netOpErr.Temporary() { - retryable = true - } else { - return r.IsErrorRetryable(errors.Unwrap(netOpErr)) - } - - case errors.As(err, &tempErr) && tempErr.Temporary(): - // Fallback to the generic temporary check, with temporary errors - // retryable. - retryable = true - - case errors.As(err, &timeoutErr) && timeoutErr.Timeout(): - // Fallback to the generic timeout check, with timeout errors - // retryable. - retryable = true - - default: - return aws.UnknownTernary - } - - return aws.BoolTernary(retryable) - -} - -// RetryableHTTPStatusCode provides a IsErrorRetryable based on HTTP status -// codes. -type RetryableHTTPStatusCode struct { - Codes map[int]struct{} -} - -// IsErrorRetryable return if the passed in error is retryable based on the -// HTTP status code. -func (r RetryableHTTPStatusCode) IsErrorRetryable(err error) aws.Ternary { - var v interface{ HTTPStatusCode() int } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - _, ok := r.Codes[v.HTTPStatusCode()] - if !ok { - return aws.UnknownTernary - } - - return aws.TrueTernary -} - -// RetryableErrorCode determines if an attempt should be retried based on the -// API error code. -type RetryableErrorCode struct { - Codes map[string]struct{} -} - -// IsErrorRetryable return if the error is retryable based on the error codes. -// Returns unknown if the error doesn't have a code or it is unknown. -func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary { - var v interface{ ErrorCode() string } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - _, ok := r.Codes[v.ErrorCode()] - if !ok { - return aws.UnknownTernary - } - - return aws.TrueTernary -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go deleted file mode 100644 index 25abffc81..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go +++ /dev/null @@ -1,258 +0,0 @@ -package retry - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws/ratelimit" -) - -// BackoffDelayer provides the interface for determining the delay to before -// another request attempt, that previously failed. -type BackoffDelayer interface { - BackoffDelay(attempt int, err error) (time.Duration, error) -} - -// BackoffDelayerFunc provides a wrapper around a function to determine the -// backoff delay of an attempt retry. -type BackoffDelayerFunc func(int, error) (time.Duration, error) - -// BackoffDelay returns the delay before attempt to retry a request. -func (fn BackoffDelayerFunc) BackoffDelay(attempt int, err error) (time.Duration, error) { - return fn(attempt, err) -} - -const ( - // DefaultMaxAttempts is the maximum of attempts for an API request - DefaultMaxAttempts int = 3 - - // DefaultMaxBackoff is the maximum back off delay between attempts - DefaultMaxBackoff time.Duration = 20 * time.Second -) - -// Default retry token quota values. -const ( - DefaultRetryRateTokens uint = 500 - DefaultRetryCost uint = 5 - DefaultRetryTimeoutCost uint = 10 - DefaultNoRetryIncrement uint = 1 -) - -// DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK -// should consider as retryable errors. -var DefaultRetryableHTTPStatusCodes = map[int]struct{}{ - 500: {}, - 502: {}, - 503: {}, - 504: {}, -} - -// DefaultRetryableErrorCodes provides the set of API error codes that should -// be retried. -var DefaultRetryableErrorCodes = map[string]struct{}{ - "RequestTimeout": {}, - "RequestTimeoutException": {}, -} - -// DefaultThrottleErrorCodes provides the set of API error codes that are -// considered throttle errors. -var DefaultThrottleErrorCodes = map[string]struct{}{ - "Throttling": {}, - "ThrottlingException": {}, - "ThrottledException": {}, - "RequestThrottledException": {}, - "TooManyRequestsException": {}, - "ProvisionedThroughputExceededException": {}, - "TransactionInProgressException": {}, - "RequestLimitExceeded": {}, - "BandwidthLimitExceeded": {}, - "LimitExceededException": {}, - "RequestThrottled": {}, - "SlowDown": {}, - "PriorRequestNotComplete": {}, - "EC2ThrottledException": {}, -} - -// DefaultRetryables provides the set of retryable checks that are used by -// default. -var DefaultRetryables = []IsErrorRetryable{ - NoRetryCanceledError{}, - RetryableError{}, - RetryableConnectionError{}, - RetryableHTTPStatusCode{ - Codes: DefaultRetryableHTTPStatusCodes, - }, - RetryableErrorCode{ - Codes: DefaultRetryableErrorCodes, - }, - RetryableErrorCode{ - Codes: DefaultThrottleErrorCodes, - }, -} - -// DefaultTimeouts provides the set of timeout checks that are used by default. -var DefaultTimeouts = []IsErrorTimeout{ - TimeouterError{}, -} - -// StandardOptions provides the functional options for configuring the standard -// retryable, and delay behavior. -type StandardOptions struct { - // Maximum number of attempts that should be made. - MaxAttempts int - - // MaxBackoff duration between retried attempts. - MaxBackoff time.Duration - - // Provides the backoff strategy the retryer will use to determine the - // delay between retry attempts. - Backoff BackoffDelayer - - // Set of strategies to determine if the attempt should be retried based on - // the error response received. - // - // It is safe to append to this list in NewStandard's functional options. - Retryables []IsErrorRetryable - - // Set of strategies to determine if the attempt failed due to a timeout - // error. - // - // It is safe to append to this list in NewStandard's functional options. - Timeouts []IsErrorTimeout - - // Provides the rate limiting strategy for rate limiting attempt retries - // across all attempts the retryer is being used with. - RateLimiter RateLimiter - - // The cost to deduct from the RateLimiter's token bucket per retry. - RetryCost uint - - // The cost to deduct from the RateLimiter's token bucket per retry caused - // by timeout error. - RetryTimeoutCost uint - - // The cost to payback to the RateLimiter's token bucket for successful - // attempts. - NoRetryIncrement uint -} - -// RateLimiter provides the interface for limiting the rate of attempt retries -// allowed by the retryer. -type RateLimiter interface { - GetToken(ctx context.Context, cost uint) (releaseToken func() error, err error) - AddTokens(uint) error -} - -// Standard is the standard retry pattern for the SDK. It uses a set of -// retryable checks to determine of the failed attempt should be retried, and -// what retry delay should be used. -type Standard struct { - options StandardOptions - - timeout IsErrorTimeout - retryable IsErrorRetryable - backoff BackoffDelayer -} - -// NewStandard initializes a standard retry behavior with defaults that can be -// overridden via functional options. -func NewStandard(fnOpts ...func(*StandardOptions)) *Standard { - o := StandardOptions{ - MaxAttempts: DefaultMaxAttempts, - MaxBackoff: DefaultMaxBackoff, - Retryables: append([]IsErrorRetryable{}, DefaultRetryables...), - Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), - - RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), - RetryCost: DefaultRetryCost, - RetryTimeoutCost: DefaultRetryTimeoutCost, - NoRetryIncrement: DefaultNoRetryIncrement, - } - for _, fn := range fnOpts { - fn(&o) - } - if o.MaxAttempts <= 0 { - o.MaxAttempts = DefaultMaxAttempts - } - - backoff := o.Backoff - if backoff == nil { - backoff = NewExponentialJitterBackoff(o.MaxBackoff) - } - - return &Standard{ - options: o, - backoff: backoff, - retryable: IsErrorRetryables(o.Retryables), - timeout: IsErrorTimeouts(o.Timeouts), - } -} - -// MaxAttempts returns the maximum number of attempts that can be made for a -// request before failing. -func (s *Standard) MaxAttempts() int { - return s.options.MaxAttempts -} - -// IsErrorRetryable returns if the error is can be retried or not. Should not -// consider the number of attempts made. -func (s *Standard) IsErrorRetryable(err error) bool { - return s.retryable.IsErrorRetryable(err).Bool() -} - -// RetryDelay returns the delay to use before another request attempt is made. -func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) { - return s.backoff.BackoffDelay(attempt, err) -} - -// GetAttemptToken returns the token to be released after then attempt completes. -// The release token will add NoRetryIncrement to the RateLimiter token pool if -// the attempt was successful. If the attempt failed, nothing will be done. -func (s *Standard) GetAttemptToken(context.Context) (func(error) error, error) { - return s.GetInitialToken(), nil -} - -// GetInitialToken returns a token for adding the NoRetryIncrement to the -// RateLimiter token if the attempt completed successfully without error. -// -// InitialToken applies to result of the each attempt, including the first. -// Whereas the RetryToken applies to the result of subsequent attempts. -// -// Deprecated: use GetAttemptToken instead. -func (s *Standard) GetInitialToken() func(error) error { - return releaseToken(s.noRetryIncrement).release -} - -func (s *Standard) noRetryIncrement() error { - return s.options.RateLimiter.AddTokens(s.options.NoRetryIncrement) -} - -// GetRetryToken attempts to deduct the retry cost from the retry token pool. -// Returning the token release function, or error. -func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) { - cost := s.options.RetryCost - - if s.timeout.IsErrorTimeout(opErr).Bool() { - cost = s.options.RetryTimeoutCost - } - - fn, err := s.options.RateLimiter.GetToken(ctx, cost) - if err != nil { - return nil, fmt.Errorf("failed to get rate limit token, %w", err) - } - - return releaseToken(fn).release, nil -} - -func nopRelease(error) error { return nil } - -type releaseToken func() error - -func (f releaseToken) release(err error) error { - if err != nil { - return nil - } - - return f() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go deleted file mode 100644 index c4b844d15..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go +++ /dev/null @@ -1,60 +0,0 @@ -package retry - -import ( - "errors" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// IsErrorThrottle provides the interface of an implementation to determine if -// a error response from an operation is a throttling error. -type IsErrorThrottle interface { - IsErrorThrottle(error) aws.Ternary -} - -// IsErrorThrottles is a collection of checks to determine of the error a -// throttle error. Iterates through the checks and returns the state of -// throttle if any check returns something other than unknown. -type IsErrorThrottles []IsErrorThrottle - -// IsErrorThrottle returns if the error is a throttle error if any of the -// checks in the list return a value other than unknown. -func (r IsErrorThrottles) IsErrorThrottle(err error) aws.Ternary { - for _, re := range r { - if v := re.IsErrorThrottle(err); v != aws.UnknownTernary { - return v - } - } - return aws.UnknownTernary -} - -// IsErrorThrottleFunc wraps a function with the IsErrorThrottle interface. -type IsErrorThrottleFunc func(error) aws.Ternary - -// IsErrorThrottle returns if the error is a throttle error. -func (fn IsErrorThrottleFunc) IsErrorThrottle(err error) aws.Ternary { - return fn(err) -} - -// ThrottleErrorCode determines if an attempt should be retried based on the -// API error code. -type ThrottleErrorCode struct { - Codes map[string]struct{} -} - -// IsErrorThrottle return if the error is a throttle error based on the error -// codes. Returns unknown if the error doesn't have a code or it is unknown. -func (r ThrottleErrorCode) IsErrorThrottle(err error) aws.Ternary { - var v interface{ ErrorCode() string } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - _, ok := r.Codes[v.ErrorCode()] - if !ok { - return aws.UnknownTernary - } - - return aws.TrueTernary -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go deleted file mode 100644 index 3d47870d2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go +++ /dev/null @@ -1,52 +0,0 @@ -package retry - -import ( - "errors" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// IsErrorTimeout provides the interface of an implementation to determine if -// a error matches. -type IsErrorTimeout interface { - IsErrorTimeout(err error) aws.Ternary -} - -// IsErrorTimeouts is a collection of checks to determine of the error is -// retryable. Iterates through the checks and returns the state of retryable -// if any check returns something other than unknown. -type IsErrorTimeouts []IsErrorTimeout - -// IsErrorTimeout returns if the error is retryable if any of the checks in -// the list return a value other than unknown. -func (ts IsErrorTimeouts) IsErrorTimeout(err error) aws.Ternary { - for _, t := range ts { - if v := t.IsErrorTimeout(err); v != aws.UnknownTernary { - return v - } - } - return aws.UnknownTernary -} - -// IsErrorTimeoutFunc wraps a function with the IsErrorTimeout interface. -type IsErrorTimeoutFunc func(error) aws.Ternary - -// IsErrorTimeout returns if the error is retryable. -func (fn IsErrorTimeoutFunc) IsErrorTimeout(err error) aws.Ternary { - return fn(err) -} - -// TimeouterError provides the IsErrorTimeout implementation for determining if -// an error is a timeout based on type with the Timeout method. -type TimeouterError struct{} - -// IsErrorTimeout returns if the error is a timeout error. -func (t TimeouterError) IsErrorTimeout(err error) aws.Ternary { - var v interface{ Timeout() bool } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - return aws.BoolTernary(v.Timeout()) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go deleted file mode 100644 index b0ba4cb2f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go +++ /dev/null @@ -1,127 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "time" -) - -// RetryMode provides the mode the API client will use to create a retryer -// based on. -type RetryMode string - -const ( - // RetryModeStandard model provides rate limited retry attempts with - // exponential backoff delay. - RetryModeStandard RetryMode = "standard" - - // RetryModeAdaptive model provides attempt send rate limiting on throttle - // responses in addition to standard mode's retry rate limiting. - // - // Adaptive retry mode is experimental and is subject to change in the - // future. - RetryModeAdaptive RetryMode = "adaptive" -) - -// ParseRetryMode attempts to parse a RetryMode from the given string. -// Returning error if the value is not a known RetryMode. -func ParseRetryMode(v string) (mode RetryMode, err error) { - switch v { - case "standard": - return RetryModeStandard, nil - case "adaptive": - return RetryModeAdaptive, nil - default: - return mode, fmt.Errorf("unknown RetryMode, %v", v) - } -} - -func (m RetryMode) String() string { return string(m) } - -// Retryer is an interface to determine if a given error from a -// attempt should be retried, and if so what backoff delay to apply. The -// default implementation used by most services is the retry package's Standard -// type. Which contains basic retry logic using exponential backoff. -type Retryer interface { - // IsErrorRetryable returns if the failed attempt is retryable. This check - // should determine if the error can be retried, or if the error is - // terminal. - IsErrorRetryable(error) bool - - // MaxAttempts returns the maximum number of attempts that can be made for - // an attempt before failing. A value of 0 implies that the attempt should - // be retried until it succeeds if the errors are retryable. - MaxAttempts() int - - // RetryDelay returns the delay that should be used before retrying the - // attempt. Will return error if the delay could not be determined. - RetryDelay(attempt int, opErr error) (time.Duration, error) - - // GetRetryToken attempts to deduct the retry cost from the retry token pool. - // Returning the token release function, or error. - GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error) - - // GetInitialToken returns the initial attempt token that can increment the - // retry token pool if the attempt is successful. - GetInitialToken() (releaseToken func(error) error) -} - -// RetryerV2 is an interface to determine if a given error from an attempt -// should be retried, and if so what backoff delay to apply. The default -// implementation used by most services is the retry package's Standard type. -// Which contains basic retry logic using exponential backoff. -// -// RetryerV2 replaces the Retryer interface, deprecating the GetInitialToken -// method in favor of GetAttemptToken which takes a context, and can return an error. -// -// The SDK's retry package's Attempt middleware, and utilities will always -// wrap a Retryer as a RetryerV2. Delegating to GetInitialToken, only if -// GetAttemptToken is not implemented. -type RetryerV2 interface { - Retryer - - // GetInitialToken returns the initial attempt token that can increment the - // retry token pool if the attempt is successful. - // - // Deprecated: This method does not provide a way to block using Context, - // nor can it return an error. Use RetryerV2, and GetAttemptToken instead. - GetInitialToken() (releaseToken func(error) error) - - // GetAttemptToken returns the send token that can be used to rate limit - // attempt calls. Will be used by the SDK's retry package's Attempt - // middleware to get a send token prior to calling the temp and releasing - // the send token after the attempt has been made. - GetAttemptToken(context.Context) (func(error) error, error) -} - -// NopRetryer provides a RequestRetryDecider implementation that will flag -// all attempt errors as not retryable, with a max attempts of 1. -type NopRetryer struct{} - -// IsErrorRetryable returns false for all error values. -func (NopRetryer) IsErrorRetryable(error) bool { return false } - -// MaxAttempts always returns 1 for the original attempt. -func (NopRetryer) MaxAttempts() int { return 1 } - -// RetryDelay is not valid for the NopRetryer. Will always return error. -func (NopRetryer) RetryDelay(int, error) (time.Duration, error) { - return 0, fmt.Errorf("not retrying any attempt errors") -} - -// GetRetryToken returns a stub function that does nothing. -func (NopRetryer) GetRetryToken(context.Context, error) (func(error) error, error) { - return nopReleaseToken, nil -} - -// GetInitialToken returns a stub function that does nothing. -func (NopRetryer) GetInitialToken() func(error) error { - return nopReleaseToken -} - -// GetAttemptToken returns a stub function that does nothing. -func (NopRetryer) GetAttemptToken(context.Context) (func(error) error, error) { - return nopReleaseToken, nil -} - -func nopReleaseToken(error) error { return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go deleted file mode 100644 index 3af9b2b33..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go +++ /dev/null @@ -1,14 +0,0 @@ -package aws - -// ExecutionEnvironmentID is the AWS execution environment runtime identifier. -type ExecutionEnvironmentID string - -// RuntimeEnvironment is a collection of values that are determined at runtime -// based on the environment that the SDK is executing in. Some of these values -// may or may not be present based on the executing environment and certain SDK -// configuration properties that drive whether these values are populated.. -type RuntimeEnvironment struct { - EnvironmentIdentifier ExecutionEnvironmentID - Region string - EC2InstanceMetadataRegion string -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go deleted file mode 100644 index cbf22f1d0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go +++ /dev/null @@ -1,115 +0,0 @@ -package v4 - -import ( - "strings" - "sync" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -func lookupKey(service, region string) string { - var s strings.Builder - s.Grow(len(region) + len(service) + 3) - s.WriteString(region) - s.WriteRune('/') - s.WriteString(service) - return s.String() -} - -type derivedKey struct { - AccessKey string - Date time.Time - Credential []byte -} - -type derivedKeyCache struct { - values map[string]derivedKey - mutex sync.RWMutex -} - -func newDerivedKeyCache() derivedKeyCache { - return derivedKeyCache{ - values: make(map[string]derivedKey), - } -} - -func (s *derivedKeyCache) Get(credentials aws.Credentials, service, region string, signingTime SigningTime) []byte { - key := lookupKey(service, region) - s.mutex.RLock() - if cred, ok := s.get(key, credentials, signingTime.Time); ok { - s.mutex.RUnlock() - return cred - } - s.mutex.RUnlock() - - s.mutex.Lock() - if cred, ok := s.get(key, credentials, signingTime.Time); ok { - s.mutex.Unlock() - return cred - } - cred := deriveKey(credentials.SecretAccessKey, service, region, signingTime) - entry := derivedKey{ - AccessKey: credentials.AccessKeyID, - Date: signingTime.Time, - Credential: cred, - } - s.values[key] = entry - s.mutex.Unlock() - - return cred -} - -func (s *derivedKeyCache) get(key string, credentials aws.Credentials, signingTime time.Time) ([]byte, bool) { - cacheEntry, ok := s.retrieveFromCache(key) - if ok && cacheEntry.AccessKey == credentials.AccessKeyID && isSameDay(signingTime, cacheEntry.Date) { - return cacheEntry.Credential, true - } - return nil, false -} - -func (s *derivedKeyCache) retrieveFromCache(key string) (derivedKey, bool) { - if v, ok := s.values[key]; ok { - return v, true - } - return derivedKey{}, false -} - -// SigningKeyDeriver derives a signing key from a set of credentials -type SigningKeyDeriver struct { - cache derivedKeyCache -} - -// NewSigningKeyDeriver returns a new SigningKeyDeriver -func NewSigningKeyDeriver() *SigningKeyDeriver { - return &SigningKeyDeriver{ - cache: newDerivedKeyCache(), - } -} - -// DeriveKey returns a derived signing key from the given credentials to be used with SigV4 signing. -func (k *SigningKeyDeriver) DeriveKey(credential aws.Credentials, service, region string, signingTime SigningTime) []byte { - return k.cache.Get(credential, service, region, signingTime) -} - -func deriveKey(secret, service, region string, t SigningTime) []byte { - hmacDate := HMACSHA256([]byte("AWS4"+secret), []byte(t.ShortTimeFormat())) - hmacRegion := HMACSHA256(hmacDate, []byte(region)) - hmacService := HMACSHA256(hmacRegion, []byte(service)) - return HMACSHA256(hmacService, []byte("aws4_request")) -} - -func isSameDay(x, y time.Time) bool { - xYear, xMonth, xDay := x.Date() - yYear, yMonth, yDay := y.Date() - - if xYear != yYear { - return false - } - - if xMonth != yMonth { - return false - } - - return xDay == yDay -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go deleted file mode 100644 index a23cb003b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go +++ /dev/null @@ -1,40 +0,0 @@ -package v4 - -// Signature Version 4 (SigV4) Constants -const ( - // EmptyStringSHA256 is the hex encoded sha256 value of an empty string - EmptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` - - // UnsignedPayload indicates that the request payload body is unsigned - UnsignedPayload = "UNSIGNED-PAYLOAD" - - // AmzAlgorithmKey indicates the signing algorithm - AmzAlgorithmKey = "X-Amz-Algorithm" - - // AmzSecurityTokenKey indicates the security token to be used with temporary credentials - AmzSecurityTokenKey = "X-Amz-Security-Token" - - // AmzDateKey is the UTC timestamp for the request in the format YYYYMMDD'T'HHMMSS'Z' - AmzDateKey = "X-Amz-Date" - - // AmzCredentialKey is the access key ID and credential scope - AmzCredentialKey = "X-Amz-Credential" - - // AmzSignedHeadersKey is the set of headers signed for the request - AmzSignedHeadersKey = "X-Amz-SignedHeaders" - - // AmzSignatureKey is the query parameter to store the SigV4 signature - AmzSignatureKey = "X-Amz-Signature" - - // TimeFormat is the time format to be used in the X-Amz-Date header or query parameter - TimeFormat = "20060102T150405Z" - - // ShortTimeFormat is the shorten time format used in the credential scope - ShortTimeFormat = "20060102" - - // ContentSHAKey is the SHA256 of request body - ContentSHAKey = "X-Amz-Content-Sha256" - - // StreamingEventsPayload indicates that the request payload body is a signed event stream. - StreamingEventsPayload = "STREAMING-AWS4-HMAC-SHA256-EVENTS" -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go deleted file mode 100644 index c61955ad5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go +++ /dev/null @@ -1,82 +0,0 @@ -package v4 - -import ( - sdkstrings "github.com/aws/aws-sdk-go-v2/internal/strings" -) - -// Rules houses a set of Rule needed for validation of a -// string value -type Rules []Rule - -// Rule interface allows for more flexible rules and just simply -// checks whether or not a value adheres to that Rule -type Rule interface { - IsValid(value string) bool -} - -// IsValid will iterate through all rules and see if any rules -// apply to the value and supports nested rules -func (r Rules) IsValid(value string) bool { - for _, rule := range r { - if rule.IsValid(value) { - return true - } - } - return false -} - -// MapRule generic Rule for maps -type MapRule map[string]struct{} - -// IsValid for the map Rule satisfies whether it exists in the map -func (m MapRule) IsValid(value string) bool { - _, ok := m[value] - return ok -} - -// AllowList is a generic Rule for include listing -type AllowList struct { - Rule -} - -// IsValid for AllowList checks if the value is within the AllowList -func (w AllowList) IsValid(value string) bool { - return w.Rule.IsValid(value) -} - -// ExcludeList is a generic Rule for exclude listing -type ExcludeList struct { - Rule -} - -// IsValid for AllowList checks if the value is within the AllowList -func (b ExcludeList) IsValid(value string) bool { - return !b.Rule.IsValid(value) -} - -// Patterns is a list of strings to match against -type Patterns []string - -// IsValid for Patterns checks each pattern and returns if a match has -// been found -func (p Patterns) IsValid(value string) bool { - for _, pattern := range p { - if sdkstrings.HasPrefixFold(value, pattern) { - return true - } - } - return false -} - -// InclusiveRules rules allow for rules to depend on one another -type InclusiveRules []Rule - -// IsValid will return true if all rules are true -func (r InclusiveRules) IsValid(value string) bool { - for _, rule := range r { - if !rule.IsValid(value) { - return false - } - } - return true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go deleted file mode 100644 index ca738f234..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go +++ /dev/null @@ -1,71 +0,0 @@ -package v4 - -// IgnoredHeaders is a list of headers that are ignored during signing -var IgnoredHeaders = Rules{ - ExcludeList{ - MapRule{ - "Authorization": struct{}{}, - "User-Agent": struct{}{}, - "X-Amzn-Trace-Id": struct{}{}, - "Expect": struct{}{}, - }, - }, -} - -// RequiredSignedHeaders is a allow list for Build canonical headers. -var RequiredSignedHeaders = Rules{ - AllowList{ - MapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, - "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, - "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, - "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, - "X-Amz-Expected-Bucket-Owner": struct{}{}, - "X-Amz-Grant-Full-control": struct{}{}, - "X-Amz-Grant-Read": struct{}{}, - "X-Amz-Grant-Read-Acp": struct{}{}, - "X-Amz-Grant-Write": struct{}{}, - "X-Amz-Grant-Write-Acp": struct{}{}, - "X-Amz-Metadata-Directive": struct{}{}, - "X-Amz-Mfa": struct{}{}, - "X-Amz-Request-Payer": struct{}{}, - "X-Amz-Server-Side-Encryption": struct{}{}, - "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{}, - "X-Amz-Server-Side-Encryption-Context": struct{}{}, - "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{}, - "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{}, - "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, - "X-Amz-Storage-Class": struct{}{}, - "X-Amz-Website-Redirect-Location": struct{}{}, - "X-Amz-Content-Sha256": struct{}{}, - "X-Amz-Tagging": struct{}{}, - }, - }, - Patterns{"X-Amz-Object-Lock-"}, - Patterns{"X-Amz-Meta-"}, -} - -// AllowedQueryHoisting is a allowed list for Build query headers. The boolean value -// represents whether or not it is a pattern. -var AllowedQueryHoisting = InclusiveRules{ - ExcludeList{RequiredSignedHeaders}, - Patterns{"X-Amz-"}, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go deleted file mode 100644 index e7fa7a1b1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go +++ /dev/null @@ -1,13 +0,0 @@ -package v4 - -import ( - "crypto/hmac" - "crypto/sha256" -) - -// HMACSHA256 computes a HMAC-SHA256 of data given the provided key. -func HMACSHA256(key []byte, data []byte) []byte { - hash := hmac.New(sha256.New, key) - hash.Write(data) - return hash.Sum(nil) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go deleted file mode 100644 index bf93659a4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go +++ /dev/null @@ -1,75 +0,0 @@ -package v4 - -import ( - "net/http" - "strings" -) - -// SanitizeHostForHeader removes default port from host and updates request.Host -func SanitizeHostForHeader(r *http.Request) { - host := getHost(r) - port := portOnly(host) - if port != "" && isDefaultPort(r.URL.Scheme, port) { - r.Host = stripPort(host) - } -} - -// Returns host from request -func getHost(r *http.Request) string { - if r.Host != "" { - return r.Host - } - - return r.URL.Host -} - -// Hostname returns u.Host, without any port number. -// -// If Host is an IPv6 literal with a port number, Hostname returns the -// IPv6 literal without the square brackets. IPv6 literals may include -// a zone identifier. -// -// Copied from the Go 1.8 standard library (net/url) -func stripPort(hostport string) string { - colon := strings.IndexByte(hostport, ':') - if colon == -1 { - return hostport - } - if i := strings.IndexByte(hostport, ']'); i != -1 { - return strings.TrimPrefix(hostport[:i], "[") - } - return hostport[:colon] -} - -// Port returns the port part of u.Host, without the leading colon. -// If u.Host doesn't contain a port, Port returns an empty string. -// -// Copied from the Go 1.8 standard library (net/url) -func portOnly(hostport string) string { - colon := strings.IndexByte(hostport, ':') - if colon == -1 { - return "" - } - if i := strings.Index(hostport, "]:"); i != -1 { - return hostport[i+len("]:"):] - } - if strings.Contains(hostport, "]") { - return "" - } - return hostport[colon+len(":"):] -} - -// Returns true if the specified URI is using the standard port -// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs) -func isDefaultPort(scheme, port string) bool { - if port == "" { - return true - } - - lowerCaseScheme := strings.ToLower(scheme) - if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") { - return true - } - - return false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go deleted file mode 100644 index fc7887909..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go +++ /dev/null @@ -1,13 +0,0 @@ -package v4 - -import "strings" - -// BuildCredentialScope builds the Signature Version 4 (SigV4) signing scope -func BuildCredentialScope(signingTime SigningTime, region, service string) string { - return strings.Join([]string{ - signingTime.ShortTimeFormat(), - region, - service, - "aws4_request", - }, "/") -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go deleted file mode 100644 index 1de06a765..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go +++ /dev/null @@ -1,36 +0,0 @@ -package v4 - -import "time" - -// SigningTime provides a wrapper around a time.Time which provides cached values for SigV4 signing. -type SigningTime struct { - time.Time - timeFormat string - shortTimeFormat string -} - -// NewSigningTime creates a new SigningTime given a time.Time -func NewSigningTime(t time.Time) SigningTime { - return SigningTime{ - Time: t, - } -} - -// TimeFormat provides a time formatted in the X-Amz-Date format. -func (m *SigningTime) TimeFormat() string { - return m.format(&m.timeFormat, TimeFormat) -} - -// ShortTimeFormat provides a time formatted of 20060102. -func (m *SigningTime) ShortTimeFormat() string { - return m.format(&m.shortTimeFormat, ShortTimeFormat) -} - -func (m *SigningTime) format(target *string, format string) string { - if len(*target) > 0 { - return *target - } - v := m.Time.Format(format) - *target = v - return v -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go deleted file mode 100644 index d025dbaa0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go +++ /dev/null @@ -1,80 +0,0 @@ -package v4 - -import ( - "net/url" - "strings" -) - -const doubleSpace = " " - -// StripExcessSpaces will rewrite the passed in slice's string values to not -// contain multiple side-by-side spaces. -func StripExcessSpaces(str string) string { - var j, k, l, m, spaces int - // Trim trailing spaces - for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- { - } - - // Trim leading spaces - for k = 0; k < j && str[k] == ' '; k++ { - } - str = str[k : j+1] - - // Strip multiple spaces. - j = strings.Index(str, doubleSpace) - if j < 0 { - return str - } - - buf := []byte(str) - for k, m, l = j, j, len(buf); k < l; k++ { - if buf[k] == ' ' { - if spaces == 0 { - // First space. - buf[m] = buf[k] - m++ - } - spaces++ - } else { - // End of multiple spaces. - spaces = 0 - buf[m] = buf[k] - m++ - } - } - - return string(buf[:m]) -} - -// GetURIPath returns the escaped URI component from the provided URL. -func GetURIPath(u *url.URL) string { - var uriPath string - - if len(u.Opaque) > 0 { - const schemeSep, pathSep, queryStart = "//", "/", "?" - - opaque := u.Opaque - // Cut off the query string if present. - if idx := strings.Index(opaque, queryStart); idx >= 0 { - opaque = opaque[:idx] - } - - // Cutout the scheme separator if present. - if strings.Index(opaque, schemeSep) == 0 { - opaque = opaque[len(schemeSep):] - } - - // capture URI path starting with first path separator. - if idx := strings.Index(opaque, pathSep); idx >= 0 { - uriPath = opaque[idx:] - } - } else { - uriPath = u.EscapedPath() - } - - if len(uriPath) == 0 { - uriPath = "/" - } - - return uriPath -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go deleted file mode 100644 index febeb0482..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go +++ /dev/null @@ -1,443 +0,0 @@ -package v4 - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "net/http" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics" - v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const computePayloadHashMiddlewareID = "ComputePayloadHash" - -// HashComputationError indicates an error occurred while computing the signing hash -type HashComputationError struct { - Err error -} - -// Error is the error message -func (e *HashComputationError) Error() string { - return fmt.Sprintf("failed to compute payload hash: %v", e.Err) -} - -// Unwrap returns the underlying error if one is set -func (e *HashComputationError) Unwrap() error { - return e.Err -} - -// SigningError indicates an error condition occurred while performing SigV4 signing -type SigningError struct { - Err error -} - -func (e *SigningError) Error() string { - return fmt.Sprintf("failed to sign request: %v", e.Err) -} - -// Unwrap returns the underlying error cause -func (e *SigningError) Unwrap() error { - return e.Err -} - -// UseDynamicPayloadSigningMiddleware swaps the compute payload sha256 middleware with a resolver middleware that -// switches between unsigned and signed payload based on TLS state for request. -// This middleware should not be used for AWS APIs that do not support unsigned payload signing auth. -// By default, SDK uses this middleware for known AWS APIs that support such TLS based auth selection . -// -// Usage example - -// S3 PutObject API allows unsigned payload signing auth usage when TLS is enabled, and uses this middleware to -// dynamically switch between unsigned and signed payload based on TLS state for request. -func UseDynamicPayloadSigningMiddleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &dynamicPayloadSigningMiddleware{}) - return err -} - -// dynamicPayloadSigningMiddleware dynamically resolves the middleware that computes and set payload sha256 middleware. -type dynamicPayloadSigningMiddleware struct { -} - -// ID returns the resolver identifier -func (m *dynamicPayloadSigningMiddleware) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize delegates SHA256 computation according to whether the request -// is TLS-enabled. -func (m *dynamicPayloadSigningMiddleware) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if req.IsHTTPS() { - return (&UnsignedPayload{}).HandleFinalize(ctx, in, next) - } - return (&ComputePayloadSHA256{}).HandleFinalize(ctx, in, next) -} - -// UnsignedPayload sets the SigV4 request payload hash to unsigned. -// -// Will not set the Unsigned Payload magic SHA value, if a SHA has already been -// stored in the context. (e.g. application pre-computed SHA256 before making -// API call). -// -// This middleware does not check the X-Amz-Content-Sha256 header, if that -// header is serialized a middleware must translate it into the context. -type UnsignedPayload struct{} - -// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation -// middleware stack -func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -// ID returns the unsignedPayload identifier -func (m *UnsignedPayload) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize sets the payload hash magic value to the unsigned sentinel. -func (m *UnsignedPayload) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if GetPayloadHash(ctx) == "" { - ctx = SetPayloadHash(ctx, v4Internal.UnsignedPayload) - } - return next.HandleFinalize(ctx, in) -} - -// ComputePayloadSHA256 computes SHA256 payload hash to sign. -// -// Will not set the Unsigned Payload magic SHA value, if a SHA has already been -// stored in the context. (e.g. application pre-computed SHA256 before making -// API call). -// -// This middleware does not check the X-Amz-Content-Sha256 header, if that -// header is serialized a middleware must translate it into the context. -type ComputePayloadSHA256 struct{} - -// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the -// operation middleware stack -func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the -// operation middleware stack -func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Remove(computePayloadHashMiddlewareID) - return err -} - -// ID is the middleware name -func (m *ComputePayloadSHA256) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize computes the payload hash for the request, storing it to the -// context. This is a no-op if a caller has previously set that value. -func (m *ComputePayloadSHA256) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if GetPayloadHash(ctx) != "" { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &HashComputationError{ - Err: fmt.Errorf("unexpected request middleware type %T", in.Request), - } - } - - hash := sha256.New() - if stream := req.GetStream(); stream != nil { - _, err = io.Copy(hash, stream) - if err != nil { - return out, metadata, &HashComputationError{ - Err: fmt.Errorf("failed to compute payload hash, %w", err), - } - } - - if err := req.RewindStream(); err != nil { - return out, metadata, &HashComputationError{ - Err: fmt.Errorf("failed to seek body to start, %w", err), - } - } - } - - ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil))) - - return next.HandleFinalize(ctx, in) -} - -// SwapComputePayloadSHA256ForUnsignedPayloadMiddleware replaces the -// ComputePayloadSHA256 middleware with the UnsignedPayload middleware. -// -// Use this to disable computing the Payload SHA256 checksum and instead use -// UNSIGNED-PAYLOAD for the SHA256 value. -func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &UnsignedPayload{}) - return err -} - -// ContentSHA256Header sets the X-Amz-Content-Sha256 header value to -// the Payload hash stored in the context. -type ContentSHA256Header struct{} - -// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the -// operation middleware stack -func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&ContentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After) -} - -// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware -// from the operation middleware stack -func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Remove((*ContentSHA256Header)(nil).ID()) - return err -} - -// ID returns the ContentSHA256HeaderMiddleware identifier -func (m *ContentSHA256Header) ID() string { - return "SigV4ContentSHA256Header" -} - -// HandleFinalize sets the X-Amz-Content-Sha256 header value to the Payload hash -// stored in the context. -func (m *ContentSHA256Header) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &HashComputationError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)} - } - - req.Header.Set(v4Internal.ContentSHAKey, GetPayloadHash(ctx)) - return next.HandleFinalize(ctx, in) -} - -// SignHTTPRequestMiddlewareOptions is the configuration options for -// [SignHTTPRequestMiddleware]. -// -// Deprecated: [SignHTTPRequestMiddleware] is deprecated. -type SignHTTPRequestMiddlewareOptions struct { - CredentialsProvider aws.CredentialsProvider - Signer HTTPSigner - LogSigning bool -} - -// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation for SigV4 -// HTTP Signing. -// -// Deprecated: AWS service clients no longer use this middleware. Signing as an -// SDK operation is now performed through an internal per-service middleware -// which opaquely selects and uses the signer from the resolved auth scheme. -type SignHTTPRequestMiddleware struct { - credentialsProvider aws.CredentialsProvider - signer HTTPSigner - logSigning bool -} - -// NewSignHTTPRequestMiddleware constructs a [SignHTTPRequestMiddleware] using -// the given [Signer] for signing requests. -// -// Deprecated: SignHTTPRequestMiddleware is deprecated. -func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware { - return &SignHTTPRequestMiddleware{ - credentialsProvider: options.CredentialsProvider, - signer: options.Signer, - logSigning: options.LogSigning, - } -} - -// ID is the SignHTTPRequestMiddleware identifier. -// -// Deprecated: SignHTTPRequestMiddleware is deprecated. -func (s *SignHTTPRequestMiddleware) ID() string { - return "Signing" -} - -// HandleFinalize will take the provided input and sign the request using the -// SigV4 authentication scheme. -// -// Deprecated: SignHTTPRequestMiddleware is deprecated. -func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if !haveCredentialProvider(s.credentialsProvider) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &SigningError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)} - } - - signingName, signingRegion := awsmiddleware.GetSigningName(ctx), awsmiddleware.GetSigningRegion(ctx) - payloadHash := GetPayloadHash(ctx) - if len(payloadHash) == 0 { - return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")} - } - - mctx := metrics.Context(ctx) - - if mctx != nil { - if attempt, err := mctx.Data().LatestAttempt(); err == nil { - attempt.CredentialFetchStartTime = sdk.NowTime() - } - } - - credentials, err := s.credentialsProvider.Retrieve(ctx) - - if mctx != nil { - if attempt, err := mctx.Data().LatestAttempt(); err == nil { - attempt.CredentialFetchEndTime = sdk.NowTime() - } - } - - if err != nil { - return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)} - } - - signerOptions := []func(o *SignerOptions){ - func(o *SignerOptions) { - o.Logger = middleware.GetLogger(ctx) - o.LogSigning = s.logSigning - }, - } - - // existing DisableURIPathEscaping is equivalent in purpose - // to authentication scheme property DisableDoubleEncoding - disableDoubleEncoding, overridden := internalauth.GetDisableDoubleEncoding(ctx) - if overridden { - signerOptions = append(signerOptions, func(o *SignerOptions) { - o.DisableURIPathEscaping = disableDoubleEncoding - }) - } - - if mctx != nil { - if attempt, err := mctx.Data().LatestAttempt(); err == nil { - attempt.SignStartTime = sdk.NowTime() - } - } - - err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...) - - if mctx != nil { - if attempt, err := mctx.Data().LatestAttempt(); err == nil { - attempt.SignEndTime = sdk.NowTime() - } - } - - if err != nil { - return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)} - } - - ctx = awsmiddleware.SetSigningCredentials(ctx, credentials) - - return next.HandleFinalize(ctx, in) -} - -// StreamingEventsPayload signs input event stream messages. -type StreamingEventsPayload struct{} - -// AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack. -func AddStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&StreamingEventsPayload{}, middleware.Before) -} - -// ID identifies the middleware. -func (s *StreamingEventsPayload) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize marks the input stream to be signed with SigV4. -func (s *StreamingEventsPayload) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - contentSHA := GetPayloadHash(ctx) - if len(contentSHA) == 0 { - contentSHA = v4Internal.StreamingEventsPayload - } - - ctx = SetPayloadHash(ctx, contentSHA) - - return next.HandleFinalize(ctx, in) -} - -// GetSignedRequestSignature attempts to extract the signature of the request. -// Returning an error if the request is unsigned, or unable to extract the -// signature. -func GetSignedRequestSignature(r *http.Request) ([]byte, error) { - const authHeaderSignatureElem = "Signature=" - - if auth := r.Header.Get(authorizationHeader); len(auth) != 0 { - ps := strings.Split(auth, ", ") - for _, p := range ps { - if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 { - sig := p[len(authHeaderSignatureElem):] - if len(sig) == 0 { - return nil, fmt.Errorf("invalid request signature authorization header") - } - return hex.DecodeString(sig) - } - } - } - - if sig := r.URL.Query().Get("X-Amz-Signature"); len(sig) != 0 { - return hex.DecodeString(sig) - } - - return nil, fmt.Errorf("request not signed") -} - -func haveCredentialProvider(p aws.CredentialsProvider) bool { - if p == nil { - return false - } - - return !aws.IsCredentialsProvider(p, (*aws.AnonymousCredentials)(nil)) -} - -type payloadHashKey struct{} - -// GetPayloadHash retrieves the payload hash to use for signing -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetPayloadHash(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, payloadHashKey{}).(string) - return v -} - -// SetPayloadHash sets the payload hash to be used for signing the request -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetPayloadHash(ctx context.Context, hash string) context.Context { - return middleware.WithStackValue(ctx, payloadHashKey{}, hash) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go deleted file mode 100644 index e1a066512..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go +++ /dev/null @@ -1,127 +0,0 @@ -package v4 - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/middleware" - smithyHTTP "github.com/aws/smithy-go/transport/http" -) - -// HTTPPresigner is an interface to a SigV4 signer that can sign create a -// presigned URL for a HTTP requests. -type HTTPPresigner interface { - PresignHTTP( - ctx context.Context, credentials aws.Credentials, r *http.Request, - payloadHash string, service string, region string, signingTime time.Time, - optFns ...func(*SignerOptions), - ) (url string, signedHeader http.Header, err error) -} - -// PresignedHTTPRequest provides the URL and signed headers that are included -// in the presigned URL. -type PresignedHTTPRequest struct { - URL string - Method string - SignedHeader http.Header -} - -// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware. -type PresignHTTPRequestMiddlewareOptions struct { - CredentialsProvider aws.CredentialsProvider - Presigner HTTPPresigner - LogSigning bool -} - -// PresignHTTPRequestMiddleware provides the Finalize middleware for creating a -// presigned URL for an HTTP request. -// -// Will short circuit the middleware stack and not forward onto the next -// Finalize handler. -type PresignHTTPRequestMiddleware struct { - credentialsProvider aws.CredentialsProvider - presigner HTTPPresigner - logSigning bool -} - -// NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware -// initialized with the presigner. -func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware { - return &PresignHTTPRequestMiddleware{ - credentialsProvider: options.CredentialsProvider, - presigner: options.Presigner, - logSigning: options.LogSigning, - } -} - -// ID provides the middleware ID. -func (*PresignHTTPRequestMiddleware) ID() string { return "PresignHTTPRequest" } - -// HandleFinalize will take the provided input and create a presigned url for -// the http request using the SigV4 presign authentication scheme. -// -// Since the signed request is not a valid HTTP request -func (s *PresignHTTPRequestMiddleware) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyHTTP.Request) - if !ok { - return out, metadata, &SigningError{ - Err: fmt.Errorf("unexpected request middleware type %T", in.Request), - } - } - - httpReq := req.Build(ctx) - if !haveCredentialProvider(s.credentialsProvider) { - out.Result = &PresignedHTTPRequest{ - URL: httpReq.URL.String(), - Method: httpReq.Method, - SignedHeader: http.Header{}, - } - - return out, metadata, nil - } - - signingName := awsmiddleware.GetSigningName(ctx) - signingRegion := awsmiddleware.GetSigningRegion(ctx) - payloadHash := GetPayloadHash(ctx) - if len(payloadHash) == 0 { - return out, metadata, &SigningError{ - Err: fmt.Errorf("computed payload hash missing from context"), - } - } - - credentials, err := s.credentialsProvider.Retrieve(ctx) - if err != nil { - return out, metadata, &SigningError{ - Err: fmt.Errorf("failed to retrieve credentials: %w", err), - } - } - - u, h, err := s.presigner.PresignHTTP(ctx, credentials, - httpReq, payloadHash, signingName, signingRegion, sdk.NowTime(), - func(o *SignerOptions) { - o.Logger = middleware.GetLogger(ctx) - o.LogSigning = s.logSigning - }) - if err != nil { - return out, metadata, &SigningError{ - Err: fmt.Errorf("failed to sign http request, %w", err), - } - } - - out.Result = &PresignedHTTPRequest{ - URL: u, - Method: httpReq.Method, - SignedHeader: h, - } - - return out, metadata, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go deleted file mode 100644 index 66aa2bd6a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go +++ /dev/null @@ -1,86 +0,0 @@ -package v4 - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "github.com/aws/aws-sdk-go-v2/aws" - v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" - "strings" - "time" -) - -// EventStreamSigner is an AWS EventStream protocol signer. -type EventStreamSigner interface { - GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*StreamSignerOptions)) ([]byte, error) -} - -// StreamSignerOptions is the configuration options for StreamSigner. -type StreamSignerOptions struct{} - -// StreamSigner implements Signature Version 4 (SigV4) signing of event stream encoded payloads. -type StreamSigner struct { - options StreamSignerOptions - - credentials aws.Credentials - service string - region string - - prevSignature []byte - - signingKeyDeriver *v4Internal.SigningKeyDeriver -} - -// NewStreamSigner returns a new AWS EventStream protocol signer. -func NewStreamSigner(credentials aws.Credentials, service, region string, seedSignature []byte, optFns ...func(*StreamSignerOptions)) *StreamSigner { - o := StreamSignerOptions{} - - for _, fn := range optFns { - fn(&o) - } - - return &StreamSigner{ - options: o, - credentials: credentials, - service: service, - region: region, - signingKeyDeriver: v4Internal.NewSigningKeyDeriver(), - prevSignature: seedSignature, - } -} - -// GetSignature signs the provided header and payload bytes. -func (s *StreamSigner) GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*StreamSignerOptions)) ([]byte, error) { - options := s.options - - for _, fn := range optFns { - fn(&options) - } - - prevSignature := s.prevSignature - - st := v4Internal.NewSigningTime(signingTime) - - sigKey := s.signingKeyDeriver.DeriveKey(s.credentials, s.service, s.region, st) - - scope := v4Internal.BuildCredentialScope(st, s.region, s.service) - - stringToSign := s.buildEventStreamStringToSign(headers, payload, prevSignature, scope, &st) - - signature := v4Internal.HMACSHA256(sigKey, []byte(stringToSign)) - s.prevSignature = signature - - return signature, nil -} - -func (s *StreamSigner) buildEventStreamStringToSign(headers, payload, previousSignature []byte, credentialScope string, signingTime *v4Internal.SigningTime) string { - hash := sha256.New() - return strings.Join([]string{ - "AWS4-HMAC-SHA256-PAYLOAD", - signingTime.TimeFormat(), - credentialScope, - hex.EncodeToString(previousSignature), - hex.EncodeToString(makeHash(hash, headers)), - hex.EncodeToString(makeHash(hash, payload)), - }, "\n") -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go deleted file mode 100644 index bb61904e1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go +++ /dev/null @@ -1,560 +0,0 @@ -// Package v4 implements signing for AWS V4 signer -// -// Provides request signing for request that need to be signed with -// AWS V4 Signatures. -// -// # Standalone Signer -// -// Generally using the signer outside of the SDK should not require any additional -// -// The signer does this by taking advantage of the URL.EscapedPath method. If your request URI requires -// -// additional escaping you many need to use the URL.Opaque to define what the raw URI should be sent -// to the service as. -// -// The signer will first check the URL.Opaque field, and use its value if set. -// The signer does require the URL.Opaque field to be set in the form of: -// -// "///" -// -// // e.g. -// "//example.com/some/path" -// -// The leading "//" and hostname are required or the URL.Opaque escaping will -// not work correctly. -// -// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath() -// method and using the returned value. -// -// AWS v4 signature validation requires that the canonical string's URI path -// element must be the URI escaped form of the HTTP request's path. -// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html -// -// The Go HTTP client will perform escaping automatically on the request. Some -// of these escaping may cause signature validation errors because the HTTP -// request differs from the URI path or query that the signature was generated. -// https://golang.org/pkg/net/url/#URL.EscapedPath -// -// Because of this, it is recommended that when using the signer outside of the -// SDK that explicitly escaping the request prior to being signed is preferable, -// and will help prevent signature validation errors. This can be done by setting -// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then -// call URL.EscapedPath() if Opaque is not set. -// -// Test `TestStandaloneSign` provides a complete example of using the signer -// outside of the SDK and pre-escaping the URI path. -package v4 - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "fmt" - "hash" - "net/http" - "net/textproto" - "net/url" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" - "github.com/aws/smithy-go/encoding/httpbinding" - "github.com/aws/smithy-go/logging" -) - -const ( - signingAlgorithm = "AWS4-HMAC-SHA256" - authorizationHeader = "Authorization" - - // Version of signing v4 - Version = "SigV4" -) - -// HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests -type HTTPSigner interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*SignerOptions)) error -} - -type keyDerivator interface { - DeriveKey(credential aws.Credentials, service, region string, signingTime v4Internal.SigningTime) []byte -} - -// SignerOptions is the SigV4 Signer options. -type SignerOptions struct { - // Disables the Signer's moving HTTP header key/value pairs from the HTTP - // request header to the request's query string. This is most commonly used - // with pre-signed requests preventing headers from being added to the - // request's query string. - DisableHeaderHoisting bool - - // Disables the automatic escaping of the URI path of the request for the - // siganture's canonical string's path. For services that do not need additional - // escaping then use this to disable the signer escaping the path. - // - // S3 is an example of a service that does not need additional escaping. - // - // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html - DisableURIPathEscaping bool - - // The logger to send log messages to. - Logger logging.Logger - - // Enable logging of signed requests. - // This will enable logging of the canonical request, the string to sign, and for presigning the subsequent - // presigned URL. - LogSigning bool - - // Disables setting the session token on the request as part of signing - // through X-Amz-Security-Token. This is needed for variations of v4 that - // present the token elsewhere. - DisableSessionToken bool -} - -// Signer applies AWS v4 signing to given request. Use this to sign requests -// that need to be signed with AWS V4 Signatures. -type Signer struct { - options SignerOptions - keyDerivator keyDerivator -} - -// NewSigner returns a new SigV4 Signer -func NewSigner(optFns ...func(signer *SignerOptions)) *Signer { - options := SignerOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &Signer{options: options, keyDerivator: v4Internal.NewSigningKeyDeriver()} -} - -type httpSigner struct { - Request *http.Request - ServiceName string - Region string - Time v4Internal.SigningTime - Credentials aws.Credentials - KeyDerivator keyDerivator - IsPreSign bool - - PayloadHash string - - DisableHeaderHoisting bool - DisableURIPathEscaping bool - DisableSessionToken bool -} - -func (s *httpSigner) Build() (signedRequest, error) { - req := s.Request - - query := req.URL.Query() - headers := req.Header - - s.setRequiredSigningFields(headers, query) - - // Sort Each Query Key's Values - for key := range query { - sort.Strings(query[key]) - } - - v4Internal.SanitizeHostForHeader(req) - - credentialScope := s.buildCredentialScope() - credentialStr := s.Credentials.AccessKeyID + "/" + credentialScope - if s.IsPreSign { - query.Set(v4Internal.AmzCredentialKey, credentialStr) - } - - unsignedHeaders := headers - if s.IsPreSign && !s.DisableHeaderHoisting { - var urlValues url.Values - urlValues, unsignedHeaders = buildQuery(v4Internal.AllowedQueryHoisting, headers) - for k := range urlValues { - query[k] = urlValues[k] - } - } - - host := req.URL.Host - if len(req.Host) > 0 { - host = req.Host - } - - signedHeaders, signedHeadersStr, canonicalHeaderStr := s.buildCanonicalHeaders(host, v4Internal.IgnoredHeaders, unsignedHeaders, s.Request.ContentLength) - - if s.IsPreSign { - query.Set(v4Internal.AmzSignedHeadersKey, signedHeadersStr) - } - - var rawQuery strings.Builder - rawQuery.WriteString(strings.Replace(query.Encode(), "+", "%20", -1)) - - canonicalURI := v4Internal.GetURIPath(req.URL) - if !s.DisableURIPathEscaping { - canonicalURI = httpbinding.EscapePath(canonicalURI, false) - } - - canonicalString := s.buildCanonicalString( - req.Method, - canonicalURI, - rawQuery.String(), - signedHeadersStr, - canonicalHeaderStr, - ) - - strToSign := s.buildStringToSign(credentialScope, canonicalString) - signingSignature, err := s.buildSignature(strToSign) - if err != nil { - return signedRequest{}, err - } - - if s.IsPreSign { - rawQuery.WriteString("&X-Amz-Signature=") - rawQuery.WriteString(signingSignature) - } else { - headers[authorizationHeader] = append(headers[authorizationHeader][:0], buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature)) - } - - req.URL.RawQuery = rawQuery.String() - - return signedRequest{ - Request: req, - SignedHeaders: signedHeaders, - CanonicalString: canonicalString, - StringToSign: strToSign, - PreSigned: s.IsPreSign, - }, nil -} - -func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature string) string { - const credential = "Credential=" - const signedHeaders = "SignedHeaders=" - const signature = "Signature=" - const commaSpace = ", " - - var parts strings.Builder - parts.Grow(len(signingAlgorithm) + 1 + - len(credential) + len(credentialStr) + 2 + - len(signedHeaders) + len(signedHeadersStr) + 2 + - len(signature) + len(signingSignature), - ) - parts.WriteString(signingAlgorithm) - parts.WriteRune(' ') - parts.WriteString(credential) - parts.WriteString(credentialStr) - parts.WriteString(commaSpace) - parts.WriteString(signedHeaders) - parts.WriteString(signedHeadersStr) - parts.WriteString(commaSpace) - parts.WriteString(signature) - parts.WriteString(signingSignature) - return parts.String() -} - -// SignHTTP signs AWS v4 requests with the provided payload hash, service name, region the -// request is made to, and time the request is signed at. The signTime allows -// you to specify that a request is signed for the future, and cannot be -// used until then. -// -// The payloadHash is the hex encoded SHA-256 hash of the request payload, and -// must be provided. Even if the request has no payload (aka body). If the -// request has no payload you should use the hex encoded SHA-256 of an empty -// string as the payloadHash value. -// -// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -// -// Some services such as Amazon S3 accept alternative values for the payload -// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be -// included in the request signature. -// -// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html -// -// Sign differs from Presign in that it will sign the request using HTTP -// header values. This type of signing is intended for http.Request values that -// will not be shared, or are shared in a way the header values on the request -// will not be lost. -// -// The passed in request will be modified in place. -func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(options *SignerOptions)) error { - options := s.options - - for _, fn := range optFns { - fn(&options) - } - - signer := &httpSigner{ - Request: r, - PayloadHash: payloadHash, - ServiceName: service, - Region: region, - Credentials: credentials, - Time: v4Internal.NewSigningTime(signingTime.UTC()), - DisableHeaderHoisting: options.DisableHeaderHoisting, - DisableURIPathEscaping: options.DisableURIPathEscaping, - DisableSessionToken: options.DisableSessionToken, - KeyDerivator: s.keyDerivator, - } - - signedRequest, err := signer.Build() - if err != nil { - return err - } - - logSigningInfo(ctx, options, &signedRequest, false) - - return nil -} - -// PresignHTTP signs AWS v4 requests with the payload hash, service name, region -// the request is made to, and time the request is signed at. The signTime -// allows you to specify that a request is signed for the future, and cannot -// be used until then. -// -// Returns the signed URL and the map of HTTP headers that were included in the -// signature or an error if signing the request failed. For presigned requests -// these headers and their values must be included on the HTTP request when it -// is made. This is helpful to know what header values need to be shared with -// the party the presigned request will be distributed to. -// -// The payloadHash is the hex encoded SHA-256 hash of the request payload, and -// must be provided. Even if the request has no payload (aka body). If the -// request has no payload you should use the hex encoded SHA-256 of an empty -// string as the payloadHash value. -// -// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -// -// Some services such as Amazon S3 accept alternative values for the payload -// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be -// included in the request signature. -// -// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html -// -// PresignHTTP differs from SignHTTP in that it will sign the request using -// query string instead of header values. This allows you to share the -// Presigned Request's URL with third parties, or distribute it throughout your -// system with minimal dependencies. -// -// PresignHTTP will not set the expires time of the presigned request -// automatically. To specify the expire duration for a request add the -// "X-Amz-Expires" query parameter on the request with the value as the -// duration in seconds the presigned URL should be considered valid for. This -// parameter is not used by all AWS services, and is most notable used by -// Amazon S3 APIs. -// -// expires := 20 * time.Minute -// query := req.URL.Query() -// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)) -// req.URL.RawQuery = query.Encode() -// -// This method does not modify the provided request. -func (s *Signer) PresignHTTP( - ctx context.Context, credentials aws.Credentials, r *http.Request, - payloadHash string, service string, region string, signingTime time.Time, - optFns ...func(*SignerOptions), -) (signedURI string, signedHeaders http.Header, err error) { - options := s.options - - for _, fn := range optFns { - fn(&options) - } - - signer := &httpSigner{ - Request: r.Clone(r.Context()), - PayloadHash: payloadHash, - ServiceName: service, - Region: region, - Credentials: credentials, - Time: v4Internal.NewSigningTime(signingTime.UTC()), - IsPreSign: true, - DisableHeaderHoisting: options.DisableHeaderHoisting, - DisableURIPathEscaping: options.DisableURIPathEscaping, - DisableSessionToken: options.DisableSessionToken, - KeyDerivator: s.keyDerivator, - } - - signedRequest, err := signer.Build() - if err != nil { - return "", nil, err - } - - logSigningInfo(ctx, options, &signedRequest, true) - - signedHeaders = make(http.Header) - - // For the signed headers we canonicalize the header keys in the returned map. - // This avoids situations where can standard library double headers like host header. For example the standard - // library will set the Host header, even if it is present in lower-case form. - for k, v := range signedRequest.SignedHeaders { - key := textproto.CanonicalMIMEHeaderKey(k) - signedHeaders[key] = append(signedHeaders[key], v...) - } - - return signedRequest.Request.URL.String(), signedHeaders, nil -} - -func (s *httpSigner) buildCredentialScope() string { - return v4Internal.BuildCredentialScope(s.Time, s.Region, s.ServiceName) -} - -func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) { - query := url.Values{} - unsignedHeaders := http.Header{} - for k, h := range header { - if r.IsValid(k) { - query[k] = h - } else { - unsignedHeaders[k] = h - } - } - - return query, unsignedHeaders -} - -func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, header http.Header, length int64) (signed http.Header, signedHeaders, canonicalHeadersStr string) { - signed = make(http.Header) - - var headers []string - const hostHeader = "host" - headers = append(headers, hostHeader) - signed[hostHeader] = append(signed[hostHeader], host) - - const contentLengthHeader = "content-length" - if length > 0 { - headers = append(headers, contentLengthHeader) - signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10)) - } - - for k, v := range header { - if !rule.IsValid(k) { - continue // ignored header - } - if strings.EqualFold(k, contentLengthHeader) { - // prevent signing already handled content-length header. - continue - } - - lowerCaseKey := strings.ToLower(k) - if _, ok := signed[lowerCaseKey]; ok { - // include additional values - signed[lowerCaseKey] = append(signed[lowerCaseKey], v...) - continue - } - - headers = append(headers, lowerCaseKey) - signed[lowerCaseKey] = v - } - sort.Strings(headers) - - signedHeaders = strings.Join(headers, ";") - - var canonicalHeaders strings.Builder - n := len(headers) - const colon = ':' - for i := 0; i < n; i++ { - if headers[i] == hostHeader { - canonicalHeaders.WriteString(hostHeader) - canonicalHeaders.WriteRune(colon) - canonicalHeaders.WriteString(v4Internal.StripExcessSpaces(host)) - } else { - canonicalHeaders.WriteString(headers[i]) - canonicalHeaders.WriteRune(colon) - // Trim out leading, trailing, and dedup inner spaces from signed header values. - values := signed[headers[i]] - for j, v := range values { - cleanedValue := strings.TrimSpace(v4Internal.StripExcessSpaces(v)) - canonicalHeaders.WriteString(cleanedValue) - if j < len(values)-1 { - canonicalHeaders.WriteRune(',') - } - } - } - canonicalHeaders.WriteRune('\n') - } - canonicalHeadersStr = canonicalHeaders.String() - - return signed, signedHeaders, canonicalHeadersStr -} - -func (s *httpSigner) buildCanonicalString(method, uri, query, signedHeaders, canonicalHeaders string) string { - return strings.Join([]string{ - method, - uri, - query, - canonicalHeaders, - signedHeaders, - s.PayloadHash, - }, "\n") -} - -func (s *httpSigner) buildStringToSign(credentialScope, canonicalRequestString string) string { - return strings.Join([]string{ - signingAlgorithm, - s.Time.TimeFormat(), - credentialScope, - hex.EncodeToString(makeHash(sha256.New(), []byte(canonicalRequestString))), - }, "\n") -} - -func makeHash(hash hash.Hash, b []byte) []byte { - hash.Reset() - hash.Write(b) - return hash.Sum(nil) -} - -func (s *httpSigner) buildSignature(strToSign string) (string, error) { - key := s.KeyDerivator.DeriveKey(s.Credentials, s.ServiceName, s.Region, s.Time) - return hex.EncodeToString(v4Internal.HMACSHA256(key, []byte(strToSign))), nil -} - -func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Values) { - amzDate := s.Time.TimeFormat() - - if s.IsPreSign { - query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm) - sessionToken := s.Credentials.SessionToken - if !s.DisableSessionToken && len(sessionToken) > 0 { - query.Set("X-Amz-Security-Token", sessionToken) - } - - query.Set(v4Internal.AmzDateKey, amzDate) - return - } - - headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate) - - if !s.DisableSessionToken && len(s.Credentials.SessionToken) > 0 { - headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken) - } -} - -func logSigningInfo(ctx context.Context, options SignerOptions, request *signedRequest, isPresign bool) { - if !options.LogSigning { - return - } - signedURLMsg := "" - if isPresign { - signedURLMsg = fmt.Sprintf(logSignedURLMsg, request.Request.URL.String()) - } - logger := logging.WithContext(ctx, options.Logger) - logger.Logf(logging.Debug, logSignInfoMsg, request.CanonicalString, request.StringToSign, signedURLMsg) -} - -type signedRequest struct { - Request *http.Request - SignedHeaders http.Header - CanonicalString string - StringToSign string - PreSigned bool -} - -const logSignInfoMsg = `Request Signature: ----[ CANONICAL STRING ]----------------------------- -%s ----[ STRING TO SIGN ]-------------------------------- -%s%s ------------------------------------------------------` -const logSignedURLMsg = ` ----[ SIGNED URL ]------------------------------------ -%s` diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go deleted file mode 100644 index f3fc4d610..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by aws/generate.go DO NOT EDIT. - -package aws - -import ( - "github.com/aws/smithy-go/ptr" - "time" -) - -// Bool returns a pointer value for the bool value passed in. -func Bool(v bool) *bool { - return ptr.Bool(v) -} - -// BoolSlice returns a slice of bool pointers from the values -// passed in. -func BoolSlice(vs []bool) []*bool { - return ptr.BoolSlice(vs) -} - -// BoolMap returns a map of bool pointers from the values -// passed in. -func BoolMap(vs map[string]bool) map[string]*bool { - return ptr.BoolMap(vs) -} - -// Byte returns a pointer value for the byte value passed in. -func Byte(v byte) *byte { - return ptr.Byte(v) -} - -// ByteSlice returns a slice of byte pointers from the values -// passed in. -func ByteSlice(vs []byte) []*byte { - return ptr.ByteSlice(vs) -} - -// ByteMap returns a map of byte pointers from the values -// passed in. -func ByteMap(vs map[string]byte) map[string]*byte { - return ptr.ByteMap(vs) -} - -// String returns a pointer value for the string value passed in. -func String(v string) *string { - return ptr.String(v) -} - -// StringSlice returns a slice of string pointers from the values -// passed in. -func StringSlice(vs []string) []*string { - return ptr.StringSlice(vs) -} - -// StringMap returns a map of string pointers from the values -// passed in. -func StringMap(vs map[string]string) map[string]*string { - return ptr.StringMap(vs) -} - -// Int returns a pointer value for the int value passed in. -func Int(v int) *int { - return ptr.Int(v) -} - -// IntSlice returns a slice of int pointers from the values -// passed in. -func IntSlice(vs []int) []*int { - return ptr.IntSlice(vs) -} - -// IntMap returns a map of int pointers from the values -// passed in. -func IntMap(vs map[string]int) map[string]*int { - return ptr.IntMap(vs) -} - -// Int8 returns a pointer value for the int8 value passed in. -func Int8(v int8) *int8 { - return ptr.Int8(v) -} - -// Int8Slice returns a slice of int8 pointers from the values -// passed in. -func Int8Slice(vs []int8) []*int8 { - return ptr.Int8Slice(vs) -} - -// Int8Map returns a map of int8 pointers from the values -// passed in. -func Int8Map(vs map[string]int8) map[string]*int8 { - return ptr.Int8Map(vs) -} - -// Int16 returns a pointer value for the int16 value passed in. -func Int16(v int16) *int16 { - return ptr.Int16(v) -} - -// Int16Slice returns a slice of int16 pointers from the values -// passed in. -func Int16Slice(vs []int16) []*int16 { - return ptr.Int16Slice(vs) -} - -// Int16Map returns a map of int16 pointers from the values -// passed in. -func Int16Map(vs map[string]int16) map[string]*int16 { - return ptr.Int16Map(vs) -} - -// Int32 returns a pointer value for the int32 value passed in. -func Int32(v int32) *int32 { - return ptr.Int32(v) -} - -// Int32Slice returns a slice of int32 pointers from the values -// passed in. -func Int32Slice(vs []int32) []*int32 { - return ptr.Int32Slice(vs) -} - -// Int32Map returns a map of int32 pointers from the values -// passed in. -func Int32Map(vs map[string]int32) map[string]*int32 { - return ptr.Int32Map(vs) -} - -// Int64 returns a pointer value for the int64 value passed in. -func Int64(v int64) *int64 { - return ptr.Int64(v) -} - -// Int64Slice returns a slice of int64 pointers from the values -// passed in. -func Int64Slice(vs []int64) []*int64 { - return ptr.Int64Slice(vs) -} - -// Int64Map returns a map of int64 pointers from the values -// passed in. -func Int64Map(vs map[string]int64) map[string]*int64 { - return ptr.Int64Map(vs) -} - -// Uint returns a pointer value for the uint value passed in. -func Uint(v uint) *uint { - return ptr.Uint(v) -} - -// UintSlice returns a slice of uint pointers from the values -// passed in. -func UintSlice(vs []uint) []*uint { - return ptr.UintSlice(vs) -} - -// UintMap returns a map of uint pointers from the values -// passed in. -func UintMap(vs map[string]uint) map[string]*uint { - return ptr.UintMap(vs) -} - -// Uint8 returns a pointer value for the uint8 value passed in. -func Uint8(v uint8) *uint8 { - return ptr.Uint8(v) -} - -// Uint8Slice returns a slice of uint8 pointers from the values -// passed in. -func Uint8Slice(vs []uint8) []*uint8 { - return ptr.Uint8Slice(vs) -} - -// Uint8Map returns a map of uint8 pointers from the values -// passed in. -func Uint8Map(vs map[string]uint8) map[string]*uint8 { - return ptr.Uint8Map(vs) -} - -// Uint16 returns a pointer value for the uint16 value passed in. -func Uint16(v uint16) *uint16 { - return ptr.Uint16(v) -} - -// Uint16Slice returns a slice of uint16 pointers from the values -// passed in. -func Uint16Slice(vs []uint16) []*uint16 { - return ptr.Uint16Slice(vs) -} - -// Uint16Map returns a map of uint16 pointers from the values -// passed in. -func Uint16Map(vs map[string]uint16) map[string]*uint16 { - return ptr.Uint16Map(vs) -} - -// Uint32 returns a pointer value for the uint32 value passed in. -func Uint32(v uint32) *uint32 { - return ptr.Uint32(v) -} - -// Uint32Slice returns a slice of uint32 pointers from the values -// passed in. -func Uint32Slice(vs []uint32) []*uint32 { - return ptr.Uint32Slice(vs) -} - -// Uint32Map returns a map of uint32 pointers from the values -// passed in. -func Uint32Map(vs map[string]uint32) map[string]*uint32 { - return ptr.Uint32Map(vs) -} - -// Uint64 returns a pointer value for the uint64 value passed in. -func Uint64(v uint64) *uint64 { - return ptr.Uint64(v) -} - -// Uint64Slice returns a slice of uint64 pointers from the values -// passed in. -func Uint64Slice(vs []uint64) []*uint64 { - return ptr.Uint64Slice(vs) -} - -// Uint64Map returns a map of uint64 pointers from the values -// passed in. -func Uint64Map(vs map[string]uint64) map[string]*uint64 { - return ptr.Uint64Map(vs) -} - -// Float32 returns a pointer value for the float32 value passed in. -func Float32(v float32) *float32 { - return ptr.Float32(v) -} - -// Float32Slice returns a slice of float32 pointers from the values -// passed in. -func Float32Slice(vs []float32) []*float32 { - return ptr.Float32Slice(vs) -} - -// Float32Map returns a map of float32 pointers from the values -// passed in. -func Float32Map(vs map[string]float32) map[string]*float32 { - return ptr.Float32Map(vs) -} - -// Float64 returns a pointer value for the float64 value passed in. -func Float64(v float64) *float64 { - return ptr.Float64(v) -} - -// Float64Slice returns a slice of float64 pointers from the values -// passed in. -func Float64Slice(vs []float64) []*float64 { - return ptr.Float64Slice(vs) -} - -// Float64Map returns a map of float64 pointers from the values -// passed in. -func Float64Map(vs map[string]float64) map[string]*float64 { - return ptr.Float64Map(vs) -} - -// Time returns a pointer value for the time.Time value passed in. -func Time(v time.Time) *time.Time { - return ptr.Time(v) -} - -// TimeSlice returns a slice of time.Time pointers from the values -// passed in. -func TimeSlice(vs []time.Time) []*time.Time { - return ptr.TimeSlice(vs) -} - -// TimeMap returns a map of time.Time pointers from the values -// passed in. -func TimeMap(vs map[string]time.Time) map[string]*time.Time { - return ptr.TimeMap(vs) -} - -// Duration returns a pointer value for the time.Duration value passed in. -func Duration(v time.Duration) *time.Duration { - return ptr.Duration(v) -} - -// DurationSlice returns a slice of time.Duration pointers from the values -// passed in. -func DurationSlice(vs []time.Duration) []*time.Duration { - return ptr.DurationSlice(vs) -} - -// DurationMap returns a map of time.Duration pointers from the values -// passed in. -func DurationMap(vs map[string]time.Duration) map[string]*time.Duration { - return ptr.DurationMap(vs) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go deleted file mode 100644 index 26d90719b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go +++ /dev/null @@ -1,310 +0,0 @@ -package http - -import ( - "crypto/tls" - "github.com/aws/aws-sdk-go-v2/aws" - "net" - "net/http" - "reflect" - "sync" - "time" -) - -// Defaults for the HTTPTransportBuilder. -var ( - // Default connection pool options - DefaultHTTPTransportMaxIdleConns = 100 - DefaultHTTPTransportMaxIdleConnsPerHost = 10 - - // Default connection timeouts - DefaultHTTPTransportIdleConnTimeout = 90 * time.Second - DefaultHTTPTransportTLSHandleshakeTimeout = 10 * time.Second - DefaultHTTPTransportExpectContinueTimeout = 1 * time.Second - - // Default to TLS 1.2 for all HTTPS requests. - DefaultHTTPTransportTLSMinVersion uint16 = tls.VersionTLS12 -) - -// Timeouts for net.Dialer's network connection. -var ( - DefaultDialConnectTimeout = 30 * time.Second - DefaultDialKeepAliveTimeout = 30 * time.Second -) - -// BuildableClient provides a HTTPClient implementation with options to -// create copies of the HTTPClient when additional configuration is provided. -// -// The client's methods will not share the http.Transport value between copies -// of the BuildableClient. Only exported member values of the Transport and -// optional Dialer will be copied between copies of BuildableClient. -type BuildableClient struct { - transport *http.Transport - dialer *net.Dialer - - initOnce sync.Once - - clientTimeout time.Duration - client *http.Client -} - -// NewBuildableClient returns an initialized client for invoking HTTP -// requests. -func NewBuildableClient() *BuildableClient { - return &BuildableClient{} -} - -// Do implements the HTTPClient interface's Do method to invoke a HTTP request, -// and receive the response. Uses the BuildableClient's current -// configuration to invoke the http.Request. -// -// If connection pooling is enabled (aka HTTP KeepAlive) the client will only -// share pooled connections with its own instance. Copies of the -// BuildableClient will have their own connection pools. -// -// Redirect (3xx) responses will not be followed, the HTTP response received -// will returned instead. -func (b *BuildableClient) Do(req *http.Request) (*http.Response, error) { - b.initOnce.Do(b.build) - - return b.client.Do(req) -} - -// Freeze returns a frozen aws.HTTPClient implementation that is no longer a BuildableClient. -// Use this to prevent the SDK from applying DefaultMode configuration values to a buildable client. -func (b *BuildableClient) Freeze() aws.HTTPClient { - cpy := b.clone() - cpy.build() - return cpy.client -} - -func (b *BuildableClient) build() { - b.client = wrapWithLimitedRedirect(&http.Client{ - Timeout: b.clientTimeout, - Transport: b.GetTransport(), - }) -} - -func (b *BuildableClient) clone() *BuildableClient { - cpy := NewBuildableClient() - cpy.transport = b.GetTransport() - cpy.dialer = b.GetDialer() - cpy.clientTimeout = b.clientTimeout - - return cpy -} - -// WithTransportOptions copies the BuildableClient and returns it with the -// http.Transport options applied. -// -// If a non (*http.Transport) was set as the round tripper, the round tripper -// will be replaced with a default Transport value before invoking the option -// functions. -func (b *BuildableClient) WithTransportOptions(opts ...func(*http.Transport)) *BuildableClient { - cpy := b.clone() - - tr := cpy.GetTransport() - for _, opt := range opts { - opt(tr) - } - cpy.transport = tr - - return cpy -} - -// WithDialerOptions copies the BuildableClient and returns it with the -// net.Dialer options applied. Will set the client's http.Transport DialContext -// member. -func (b *BuildableClient) WithDialerOptions(opts ...func(*net.Dialer)) *BuildableClient { - cpy := b.clone() - - dialer := cpy.GetDialer() - for _, opt := range opts { - opt(dialer) - } - cpy.dialer = dialer - - tr := cpy.GetTransport() - tr.DialContext = cpy.dialer.DialContext - cpy.transport = tr - - return cpy -} - -// WithTimeout Sets the timeout used by the client for all requests. -func (b *BuildableClient) WithTimeout(timeout time.Duration) *BuildableClient { - cpy := b.clone() - cpy.clientTimeout = timeout - return cpy -} - -// GetTransport returns a copy of the client's HTTP Transport. -func (b *BuildableClient) GetTransport() *http.Transport { - var tr *http.Transport - if b.transport != nil { - tr = b.transport.Clone() - } else { - tr = defaultHTTPTransport() - } - - return tr -} - -// GetDialer returns a copy of the client's network dialer. -func (b *BuildableClient) GetDialer() *net.Dialer { - var dialer *net.Dialer - if b.dialer != nil { - dialer = shallowCopyStruct(b.dialer).(*net.Dialer) - } else { - dialer = defaultDialer() - } - - return dialer -} - -// GetTimeout returns a copy of the client's timeout to cancel requests with. -func (b *BuildableClient) GetTimeout() time.Duration { - return b.clientTimeout -} - -func defaultDialer() *net.Dialer { - return &net.Dialer{ - Timeout: DefaultDialConnectTimeout, - KeepAlive: DefaultDialKeepAliveTimeout, - DualStack: true, - } -} - -func defaultHTTPTransport() *http.Transport { - dialer := defaultDialer() - - tr := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: dialer.DialContext, - TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout, - MaxIdleConns: DefaultHTTPTransportMaxIdleConns, - MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost, - IdleConnTimeout: DefaultHTTPTransportIdleConnTimeout, - ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout, - ForceAttemptHTTP2: true, - TLSClientConfig: &tls.Config{ - MinVersion: DefaultHTTPTransportTLSMinVersion, - }, - } - - return tr -} - -// shallowCopyStruct creates a shallow copy of the passed in source struct, and -// returns that copy of the same struct type. -func shallowCopyStruct(src interface{}) interface{} { - srcVal := reflect.ValueOf(src) - srcValType := srcVal.Type() - - var returnAsPtr bool - if srcValType.Kind() == reflect.Ptr { - srcVal = srcVal.Elem() - srcValType = srcValType.Elem() - returnAsPtr = true - } - dstVal := reflect.New(srcValType).Elem() - - for i := 0; i < srcValType.NumField(); i++ { - ft := srcValType.Field(i) - if len(ft.PkgPath) != 0 { - // unexported fields have a PkgPath - continue - } - - dstVal.Field(i).Set(srcVal.Field(i)) - } - - if returnAsPtr { - dstVal = dstVal.Addr() - } - - return dstVal.Interface() -} - -// wrapWithLimitedRedirect updates the Client's Transport and CheckRedirect to -// not follow any redirect other than 307 and 308. No other redirect will be -// followed. -// -// If the client does not have a Transport defined will use a new SDK default -// http.Transport configuration. -func wrapWithLimitedRedirect(c *http.Client) *http.Client { - tr := c.Transport - if tr == nil { - tr = defaultHTTPTransport() - } - - cc := *c - cc.CheckRedirect = limitedRedirect - cc.Transport = suppressBadHTTPRedirectTransport{ - tr: tr, - } - - return &cc -} - -// limitedRedirect is a CheckRedirect that prevents the client from following -// any non 307/308 HTTP status code redirects. -// -// The 307 and 308 redirects are allowed because the client must use the -// original HTTP method for the redirected to location. Whereas 301 and 302 -// allow the client to switch to GET for the redirect. -// -// Suppresses all redirect requests with a URL of badHTTPRedirectLocation. -func limitedRedirect(r *http.Request, via []*http.Request) error { - // Request.Response, in CheckRedirect is the response that is triggering - // the redirect. - resp := r.Response - if r.URL.String() == badHTTPRedirectLocation { - resp.Header.Del(badHTTPRedirectLocation) - return http.ErrUseLastResponse - } - - switch resp.StatusCode { - case 307, 308: - // Only allow 307 and 308 redirects as they preserve the method. - return nil - } - - return http.ErrUseLastResponse -} - -// suppressBadHTTPRedirectTransport provides an http.RoundTripper -// implementation that wraps another http.RoundTripper to prevent HTTP client -// receiving 301 and 302 HTTP responses redirects without the required location -// header. -// -// Clients using this utility must have a CheckRedirect, e.g. limitedRedirect, -// that check for responses with having a URL of baseHTTPRedirectLocation, and -// suppress the redirect. -type suppressBadHTTPRedirectTransport struct { - tr http.RoundTripper -} - -const badHTTPRedirectLocation = `https://amazonaws.com/badhttpredirectlocation` - -// RoundTrip backfills a stub location when a 301/302 response is received -// without a location. This stub location is used by limitedRedirect to prevent -// the HTTP client from failing attempting to use follow a redirect without a -// location value. -func (t suppressBadHTTPRedirectTransport) RoundTrip(r *http.Request) (*http.Response, error) { - resp, err := t.tr.RoundTrip(r) - if err != nil { - return resp, err - } - - // S3 is the only known service to return 301 without location header. - // The Go standard library HTTP client will return an opaque error if it - // tries to follow a 301/302 response missing the location header. - switch resp.StatusCode { - case 301, 302: - if v := resp.Header.Get("Location"); len(v) == 0 { - resp.Header.Set("Location", badHTTPRedirectLocation) - } - } - - return resp, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go deleted file mode 100644 index 556f54a7f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go +++ /dev/null @@ -1,42 +0,0 @@ -package http - -import ( - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// removeContentTypeHeader is a build middleware that removes -// content type header if content-length header is unset or -// is set to zero, -type removeContentTypeHeader struct { -} - -// ID the name of the middleware. -func (m *removeContentTypeHeader) ID() string { - return "RemoveContentTypeHeader" -} - -// HandleBuild adds or appends the constructed user agent to the request. -func (m *removeContentTypeHeader) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in) - } - - // remove contentTypeHeader when content-length is zero - if req.ContentLength == 0 { - req.Header.Del("content-type") - } - - return next.HandleBuild(ctx, in) -} - -// RemoveContentTypeHeader removes content-type header if -// content length is unset or equal to zero. -func RemoveContentTypeHeader(stack *middleware.Stack) error { - return stack.Build.Add(&removeContentTypeHeader{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go deleted file mode 100644 index 44651c990..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go +++ /dev/null @@ -1,33 +0,0 @@ -package http - -import ( - "errors" - "fmt" - - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// ResponseError provides the HTTP centric error type wrapping the underlying error -// with the HTTP response value and the deserialized RequestID. -type ResponseError struct { - *smithyhttp.ResponseError - - // RequestID associated with response error - RequestID string -} - -// ServiceRequestID returns the request id associated with Response Error -func (e *ResponseError) ServiceRequestID() string { return e.RequestID } - -// Error returns the formatted error -func (e *ResponseError) Error() string { - return fmt.Sprintf( - "https response error StatusCode: %d, RequestID: %s, %v", - e.Response.StatusCode, e.RequestID, e.Err) -} - -// As populates target and returns true if the type of target is a error type that -// the ResponseError embeds, (e.g.AWS HTTP ResponseError) -func (e *ResponseError) As(target interface{}) bool { - return errors.As(e.ResponseError, target) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go deleted file mode 100644 index a1ad20fe3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go +++ /dev/null @@ -1,56 +0,0 @@ -package http - -import ( - "context" - - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddResponseErrorMiddleware adds response error wrapper middleware -func AddResponseErrorMiddleware(stack *middleware.Stack) error { - // add error wrapper middleware before request id retriever middleware so that it can wrap the error response - // returned by operation deserializers - return stack.Deserialize.Insert(&ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) -} - -// ResponseErrorWrapper wraps operation errors with ResponseError. -type ResponseErrorWrapper struct { -} - -// ID returns the middleware identifier -func (m *ResponseErrorWrapper) ID() string { - return "ResponseErrorWrapper" -} - -// HandleDeserialize wraps the stack error with smithyhttp.ResponseError. -func (m *ResponseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err == nil { - // Nothing to do when there is no error. - return out, metadata, err - } - - resp, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - // No raw response to wrap with. - return out, metadata, err - } - - // look for request id in metadata - reqID, _ := awsmiddleware.GetRequestIDMetadata(metadata) - - // Wrap the returned smithy error with the request id retrieved from the metadata - err = &ResponseError{ - ResponseError: &smithyhttp.ResponseError{ - Response: resp, - Err: err, - }, - RequestID: reqID, - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go deleted file mode 100644 index 993929bd9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go +++ /dev/null @@ -1,104 +0,0 @@ -package http - -import ( - "context" - "fmt" - "io" - "time" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type readResult struct { - n int - err error -} - -// ResponseTimeoutError is an error when the reads from the response are -// delayed longer than the timeout the read was configured for. -type ResponseTimeoutError struct { - TimeoutDur time.Duration -} - -// Timeout returns that the error is was caused by a timeout, and can be -// retried. -func (*ResponseTimeoutError) Timeout() bool { return true } - -func (e *ResponseTimeoutError) Error() string { - return fmt.Sprintf("read on body reach timeout limit, %v", e.TimeoutDur) -} - -// timeoutReadCloser will handle body reads that take too long. -// We will return a ErrReadTimeout error if a timeout occurs. -type timeoutReadCloser struct { - reader io.ReadCloser - duration time.Duration -} - -// Read will spin off a goroutine to call the reader's Read method. We will -// select on the timer's channel or the read's channel. Whoever completes first -// will be returned. -func (r *timeoutReadCloser) Read(b []byte) (int, error) { - timer := time.NewTimer(r.duration) - c := make(chan readResult, 1) - - go func() { - n, err := r.reader.Read(b) - timer.Stop() - c <- readResult{n: n, err: err} - }() - - select { - case data := <-c: - return data.n, data.err - case <-timer.C: - return 0, &ResponseTimeoutError{TimeoutDur: r.duration} - } -} - -func (r *timeoutReadCloser) Close() error { - return r.reader.Close() -} - -// AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the -// response body so that a read that takes too long will return an error. -func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error { - return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After) -} - -// readTimeout wraps the response body with a timeoutReadCloser -type readTimeout struct { - duration time.Duration -} - -// ID returns the id of the middleware -func (*readTimeout) ID() string { - return "ReadResponseTimeout" -} - -// HandleDeserialize implements the DeserializeMiddleware interface -func (m *readTimeout) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - response.Body = &timeoutReadCloser{ - reader: response.Body, - duration: m.duration, - } - out.RawResponse = response - - return out, metadata, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go deleted file mode 100644 index cc3ae8114..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go +++ /dev/null @@ -1,42 +0,0 @@ -package aws - -import ( - "fmt" -) - -// Ternary is an enum allowing an unknown or none state in addition to a bool's -// true and false. -type Ternary int - -func (t Ternary) String() string { - switch t { - case UnknownTernary: - return "unknown" - case FalseTernary: - return "false" - case TrueTernary: - return "true" - default: - return fmt.Sprintf("unknown value, %d", int(t)) - } -} - -// Bool returns true if the value is TrueTernary, false otherwise. -func (t Ternary) Bool() bool { - return t == TrueTernary -} - -// Enumerations for the values of the Ternary type. -const ( - UnknownTernary Ternary = iota - FalseTernary - TrueTernary -) - -// BoolTernary returns a true or false Ternary value for the bool provided. -func BoolTernary(v bool) Ternary { - if v { - return TrueTernary - } - return FalseTernary -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go deleted file mode 100644 index 5f729d45e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go +++ /dev/null @@ -1,8 +0,0 @@ -// Package aws provides core functionality for making requests to AWS services. -package aws - -// SDKName is the name of this AWS SDK -const SDKName = "aws-sdk-go-v2" - -// SDKVersion is the version of this SDK -const SDKVersion = goModuleVersion diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md deleted file mode 100644 index 0f571bce7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ /dev/null @@ -1,498 +0,0 @@ -# v1.17.4 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.3 (2024-02-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.1 (2024-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.16 (2024-01-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.15 (2024-01-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.14 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.13 (2023-12-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.12 (2023-12-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.11 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.10 (2023-12-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.9 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.8 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.7 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.6 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.5 (2023-11-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.4 (2023-11-21) - -* **Bug Fix**: Don't expect error responses to have a JSON payload in the endpointcreds provider. - -# v1.16.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.2 (2023-11-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.1 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2023-11-14) - -* **Feature**: Add support for dynamic auth token from file and EKS container host in absolute/relative URIs in the HTTP credential provider. - -# v1.15.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2023-11-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.43 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.42 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.41 (2023-10-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.40 (2023-09-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.39 (2023-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.38 (2023-09-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.37 (2023-09-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.36 (2023-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.35 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.34 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.33 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.32 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.31 (2023-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.30 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.29 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.28 (2023-07-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.27 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.26 (2023-06-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.25 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.24 (2023-05-09) - -* No change notes available for this release. - -# v1.13.23 (2023-05-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.22 (2023-05-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.21 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.20 (2023-04-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.19 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.18 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.17 (2023-03-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.16 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.15 (2023-02-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.14 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.13 (2023-02-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.12 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.11 (2023-02-01) - -* No change notes available for this release. - -# v1.13.10 (2023-01-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.9 (2023-01-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2023-01-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.7 (2022-12-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2022-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2022-12-15) - -* **Bug Fix**: Unify logic between shared config and in finding home directory -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2022-11-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2022-11-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2022-11-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-11-11) - -* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 -* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider - -# v1.12.24 (2022-11-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.23 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.22 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.21 (2022-09-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.20 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.19 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.18 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.17 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.16 (2022-08-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.15 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.14 (2022-08-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.11 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.9 (2022-07-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2022-06-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2022-05-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-05-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-04-25) - -* **Feature**: Adds Duration and Policy options that can be used when creating stscreds.WebIdentityRoleProvider credentials provider. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.2 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-03-23) - -* **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-02-24) - -* **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575) -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.5 (2021-12-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.4 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.3 (2021-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.2 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-11-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.3 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-09-10) - -* **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders. - -# v1.4.0 (2021-08-27) - -* **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723 -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go deleted file mode 100644 index f6e2873ab..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package credentials provides types for retrieving credentials from credentials sources. -*/ -package credentials diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go deleted file mode 100644 index ca8e4d24e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package credentials - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.17.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go deleted file mode 100644 index d525cac09..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go +++ /dev/null @@ -1,53 +0,0 @@ -package credentials - -import ( - "context" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -const ( - // StaticCredentialsName provides a name of Static provider - StaticCredentialsName = "StaticCredentials" -) - -// StaticCredentialsEmptyError is emitted when static credentials are empty. -type StaticCredentialsEmptyError struct{} - -func (*StaticCredentialsEmptyError) Error() string { - return "static credentials are empty" -} - -// A StaticCredentialsProvider is a set of credentials which are set, and will -// never expire. -type StaticCredentialsProvider struct { - Value aws.Credentials -} - -// NewStaticCredentialsProvider return a StaticCredentialsProvider initialized with the AWS -// credentials passed in. -func NewStaticCredentialsProvider(key, secret, session string) StaticCredentialsProvider { - return StaticCredentialsProvider{ - Value: aws.Credentials{ - AccessKeyID: key, - SecretAccessKey: secret, - SessionToken: session, - }, - } -} - -// Retrieve returns the credentials or error if the credentials are invalid. -func (s StaticCredentialsProvider) Retrieve(_ context.Context) (aws.Credentials, error) { - v := s.Value - if v.AccessKeyID == "" || v.SecretAccessKey == "" { - return aws.Credentials{ - Source: StaticCredentialsName, - }, &StaticCredentialsEmptyError{} - } - - if len(v.Source) == 0 { - v.Source = StaticCredentialsName - } - - return v, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go deleted file mode 100644 index 0b81db548..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go +++ /dev/null @@ -1,45 +0,0 @@ -package auth - -import ( - "github.com/aws/smithy-go/auth" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// HTTPAuthScheme is the SDK's internal implementation of smithyhttp.AuthScheme -// for pre-existing implementations where the signer was added to client -// config. SDK clients will key off of this type and ensure per-operation -// updates to those signers persist on the scheme itself. -type HTTPAuthScheme struct { - schemeID string - signer smithyhttp.Signer -} - -var _ smithyhttp.AuthScheme = (*HTTPAuthScheme)(nil) - -// NewHTTPAuthScheme returns an auth scheme instance with the given config. -func NewHTTPAuthScheme(schemeID string, signer smithyhttp.Signer) *HTTPAuthScheme { - return &HTTPAuthScheme{ - schemeID: schemeID, - signer: signer, - } -} - -// SchemeID identifies the auth scheme. -func (s *HTTPAuthScheme) SchemeID() string { - return s.schemeID -} - -// IdentityResolver gets the identity resolver for the auth scheme. -func (s *HTTPAuthScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver { - return o.GetIdentityResolver(s.schemeID) -} - -// Signer gets the signer for the auth scheme. -func (s *HTTPAuthScheme) Signer() smithyhttp.Signer { - return s.signer -} - -// WithSigner returns a new instance of the auth scheme with the updated signer. -func (s *HTTPAuthScheme) WithSigner(signer smithyhttp.Signer) *HTTPAuthScheme { - return NewHTTPAuthScheme(s.schemeID, signer) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go deleted file mode 100644 index bbc2ec06e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go +++ /dev/null @@ -1,191 +0,0 @@ -package auth - -import ( - "context" - "fmt" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -// SigV4 is a constant representing -// Authentication Scheme Signature Version 4 -const SigV4 = "sigv4" - -// SigV4A is a constant representing -// Authentication Scheme Signature Version 4A -const SigV4A = "sigv4a" - -// SigV4S3Express identifies the S3 S3Express auth scheme. -const SigV4S3Express = "sigv4-s3express" - -// None is a constant representing the -// None Authentication Scheme -const None = "none" - -// SupportedSchemes is a data structure -// that indicates the list of supported AWS -// authentication schemes -var SupportedSchemes = map[string]bool{ - SigV4: true, - SigV4A: true, - SigV4S3Express: true, - None: true, -} - -// AuthenticationScheme is a representation of -// AWS authentication schemes -type AuthenticationScheme interface { - isAuthenticationScheme() -} - -// AuthenticationSchemeV4 is a AWS SigV4 representation -type AuthenticationSchemeV4 struct { - Name string - SigningName *string - SigningRegion *string - DisableDoubleEncoding *bool -} - -func (a *AuthenticationSchemeV4) isAuthenticationScheme() {} - -// AuthenticationSchemeV4A is a AWS SigV4A representation -type AuthenticationSchemeV4A struct { - Name string - SigningName *string - SigningRegionSet []string - DisableDoubleEncoding *bool -} - -func (a *AuthenticationSchemeV4A) isAuthenticationScheme() {} - -// AuthenticationSchemeNone is a representation for the none auth scheme -type AuthenticationSchemeNone struct{} - -func (a *AuthenticationSchemeNone) isAuthenticationScheme() {} - -// NoAuthenticationSchemesFoundError is used in signaling -// that no authentication schemes have been specified. -type NoAuthenticationSchemesFoundError struct{} - -func (e *NoAuthenticationSchemesFoundError) Error() string { - return fmt.Sprint("No authentication schemes specified.") -} - -// UnSupportedAuthenticationSchemeSpecifiedError is used in -// signaling that only unsupported authentication schemes -// were specified. -type UnSupportedAuthenticationSchemeSpecifiedError struct { - UnsupportedSchemes []string -} - -func (e *UnSupportedAuthenticationSchemeSpecifiedError) Error() string { - return fmt.Sprint("Unsupported authentication scheme specified.") -} - -// GetAuthenticationSchemes extracts the relevant authentication scheme data -// into a custom strongly typed Go data structure. -func GetAuthenticationSchemes(p *smithy.Properties) ([]AuthenticationScheme, error) { - var result []AuthenticationScheme - if !p.Has("authSchemes") { - return nil, &NoAuthenticationSchemesFoundError{} - } - - authSchemes, _ := p.Get("authSchemes").([]interface{}) - - var unsupportedSchemes []string - for _, scheme := range authSchemes { - authScheme, _ := scheme.(map[string]interface{}) - - version := authScheme["name"].(string) - switch version { - case SigV4, SigV4S3Express: - v4Scheme := AuthenticationSchemeV4{ - Name: version, - SigningName: getSigningName(authScheme), - SigningRegion: getSigningRegion(authScheme), - DisableDoubleEncoding: getDisableDoubleEncoding(authScheme), - } - result = append(result, AuthenticationScheme(&v4Scheme)) - case SigV4A: - v4aScheme := AuthenticationSchemeV4A{ - Name: SigV4A, - SigningName: getSigningName(authScheme), - SigningRegionSet: getSigningRegionSet(authScheme), - DisableDoubleEncoding: getDisableDoubleEncoding(authScheme), - } - result = append(result, AuthenticationScheme(&v4aScheme)) - case None: - noneScheme := AuthenticationSchemeNone{} - result = append(result, AuthenticationScheme(&noneScheme)) - default: - unsupportedSchemes = append(unsupportedSchemes, authScheme["name"].(string)) - continue - } - } - - if len(result) == 0 { - return nil, &UnSupportedAuthenticationSchemeSpecifiedError{ - UnsupportedSchemes: unsupportedSchemes, - } - } - - return result, nil -} - -type disableDoubleEncoding struct{} - -// SetDisableDoubleEncoding sets or modifies the disable double encoding option -// on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetDisableDoubleEncoding(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, disableDoubleEncoding{}, value) -} - -// GetDisableDoubleEncoding retrieves the disable double encoding option -// from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetDisableDoubleEncoding(ctx context.Context) (value bool, ok bool) { - value, ok = middleware.GetStackValue(ctx, disableDoubleEncoding{}).(bool) - return value, ok -} - -func getSigningName(authScheme map[string]interface{}) *string { - signingName, ok := authScheme["signingName"].(string) - if !ok || signingName == "" { - return nil - } - return &signingName -} - -func getSigningRegionSet(authScheme map[string]interface{}) []string { - untypedSigningRegionSet, ok := authScheme["signingRegionSet"].([]interface{}) - if !ok { - return nil - } - signingRegionSet := []string{} - for _, item := range untypedSigningRegionSet { - signingRegionSet = append(signingRegionSet, item.(string)) - } - return signingRegionSet -} - -func getSigningRegion(authScheme map[string]interface{}) *string { - signingRegion, ok := authScheme["signingRegion"].(string) - if !ok || signingRegion == "" { - return nil - } - return &signingRegion -} - -func getDisableDoubleEncoding(authScheme map[string]interface{}) *bool { - disableDoubleEncoding, ok := authScheme["disableDoubleEncoding"].(bool) - if !ok { - return nil - } - return &disableDoubleEncoding -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go deleted file mode 100644 index f059b5d39..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go +++ /dev/null @@ -1,43 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - "time" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/auth/bearer" -) - -// BearerTokenAdapter adapts smithy bearer.Token to smithy auth.Identity. -type BearerTokenAdapter struct { - Token bearer.Token -} - -var _ auth.Identity = (*BearerTokenAdapter)(nil) - -// Expiration returns the time of expiration for the token. -func (v *BearerTokenAdapter) Expiration() time.Time { - return v.Token.Expires -} - -// BearerTokenProviderAdapter adapts smithy bearer.TokenProvider to smithy -// auth.IdentityResolver. -type BearerTokenProviderAdapter struct { - Provider bearer.TokenProvider -} - -var _ (auth.IdentityResolver) = (*BearerTokenProviderAdapter)(nil) - -// GetIdentity retrieves a bearer token using the underlying provider. -func (v *BearerTokenProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) ( - auth.Identity, error, -) { - token, err := v.Provider.RetrieveBearerToken(ctx) - if err != nil { - return nil, fmt.Errorf("get token: %w", err) - } - - return &BearerTokenAdapter{Token: token}, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go deleted file mode 100644 index a88281527..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go +++ /dev/null @@ -1,35 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/auth/bearer" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// BearerTokenSignerAdapter adapts smithy bearer.Signer to smithy http -// auth.Signer. -type BearerTokenSignerAdapter struct { - Signer bearer.Signer -} - -var _ (smithyhttp.Signer) = (*BearerTokenSignerAdapter)(nil) - -// SignRequest signs the request with the provided bearer token. -func (v *BearerTokenSignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, _ smithy.Properties) error { - ca, ok := identity.(*BearerTokenAdapter) - if !ok { - return fmt.Errorf("unexpected identity type: %T", identity) - } - - signed, err := v.Signer.SignWithBearerToken(ctx, ca.Token, r) - if err != nil { - return fmt.Errorf("sign request: %w", err) - } - - *r = *signed.(*smithyhttp.Request) - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go deleted file mode 100644 index f926c4aaa..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go +++ /dev/null @@ -1,46 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" -) - -// CredentialsAdapter adapts aws.Credentials to auth.Identity. -type CredentialsAdapter struct { - Credentials aws.Credentials -} - -var _ auth.Identity = (*CredentialsAdapter)(nil) - -// Expiration returns the time of expiration for the credentials. -func (v *CredentialsAdapter) Expiration() time.Time { - return v.Credentials.Expires -} - -// CredentialsProviderAdapter adapts aws.CredentialsProvider to auth.IdentityResolver. -type CredentialsProviderAdapter struct { - Provider aws.CredentialsProvider -} - -var _ (auth.IdentityResolver) = (*CredentialsProviderAdapter)(nil) - -// GetIdentity retrieves AWS credentials using the underlying provider. -func (v *CredentialsProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) ( - auth.Identity, error, -) { - if v.Provider == nil { - return &CredentialsAdapter{Credentials: aws.Credentials{}}, nil - } - - creds, err := v.Provider.Retrieve(ctx) - if err != nil { - return nil, fmt.Errorf("get credentials: %w", err) - } - - return &CredentialsAdapter{Credentials: creds}, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go deleted file mode 100644 index 42b458673..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package smithy adapts concrete AWS auth and signing types to the generic smithy versions. -package smithy diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go deleted file mode 100644 index 0c5a2d40c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go +++ /dev/null @@ -1,53 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - - v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// V4SignerAdapter adapts v4.HTTPSigner to smithy http.Signer. -type V4SignerAdapter struct { - Signer v4.HTTPSigner - Logger logging.Logger - LogSigning bool -} - -var _ (smithyhttp.Signer) = (*V4SignerAdapter)(nil) - -// SignRequest signs the request with the provided identity. -func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, props smithy.Properties) error { - ca, ok := identity.(*CredentialsAdapter) - if !ok { - return fmt.Errorf("unexpected identity type: %T", identity) - } - - name, ok := smithyhttp.GetSigV4SigningName(&props) - if !ok { - return fmt.Errorf("sigv4 signing name is required") - } - - region, ok := smithyhttp.GetSigV4SigningRegion(&props) - if !ok { - return fmt.Errorf("sigv4 signing region is required") - } - - hash := v4.GetPayloadHash(ctx) - err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, sdk.NowTime(), func(o *v4.SignerOptions) { - o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props) - - o.Logger = v.Logger - o.LogSigning = v.LogSigning - }) - if err != nil { - return fmt.Errorf("sign http: %w", err) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md deleted file mode 100644 index b62d57cb5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ /dev/null @@ -1,268 +0,0 @@ -# v1.3.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.10 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.9 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.8 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.7 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.6 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.3 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.43 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.42 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.41 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.40 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.39 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.38 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.37 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.36 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.35 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.34 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.33 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.32 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.31 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.30 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.29 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.28 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.27 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.26 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.25 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.24 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.23 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.22 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.21 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.20 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.19 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.18 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.17 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.16 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.15 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.14 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.13 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.12 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.11 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.10 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.9 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.8 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.7 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.6 (2022-03-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.5 (2022-02-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.4 (2022-01-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.3 (2022-01-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.7 (2021-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.6 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.5 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.4 (2021-08-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.2 (2021-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.1 (2021-07-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.0 (2021-06-25) - -* **Release**: Release new modules -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go deleted file mode 100644 index cd4d19b89..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go +++ /dev/null @@ -1,65 +0,0 @@ -package configsources - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" -) - -// EnableEndpointDiscoveryProvider is an interface for retrieving external configuration value -// for Enable Endpoint Discovery -type EnableEndpointDiscoveryProvider interface { - GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, found bool, err error) -} - -// ResolveEnableEndpointDiscovery extracts the first instance of a EnableEndpointDiscoveryProvider from the config slice. -// Additionally returns a aws.EndpointDiscoveryEnableState to indicate if the value was found in provided configs, -// and error if one is encountered. -func ResolveEnableEndpointDiscovery(ctx context.Context, configs []interface{}) (value aws.EndpointDiscoveryEnableState, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(EnableEndpointDiscoveryProvider); ok { - value, found, err = p.GetEnableEndpointDiscovery(ctx) - if err != nil || found { - break - } - } - } - return -} - -// UseDualStackEndpointProvider is an interface for retrieving external configuration values for UseDualStackEndpoint -type UseDualStackEndpointProvider interface { - GetUseDualStackEndpoint(context.Context) (value aws.DualStackEndpointState, found bool, err error) -} - -// ResolveUseDualStackEndpoint extracts the first instance of a UseDualStackEndpoint from the config slice. -// Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseDualStackEndpoint(ctx context.Context, configs []interface{}) (value aws.DualStackEndpointState, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(UseDualStackEndpointProvider); ok { - value, found, err = p.GetUseDualStackEndpoint(ctx) - if err != nil || found { - break - } - } - } - return -} - -// UseFIPSEndpointProvider is an interface for retrieving external configuration values for UseFIPSEndpoint -type UseFIPSEndpointProvider interface { - GetUseFIPSEndpoint(context.Context) (value aws.FIPSEndpointState, found bool, err error) -} - -// ResolveUseFIPSEndpoint extracts the first instance of a UseFIPSEndpointProvider from the config slice. -// Additionally, returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseFIPSEndpoint(ctx context.Context, configs []interface{}) (value aws.FIPSEndpointState, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(UseFIPSEndpointProvider); ok { - value, found, err = p.GetUseFIPSEndpoint(ctx) - if err != nil || found { - break - } - } - } - return -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go deleted file mode 100644 index e7835f852..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go +++ /dev/null @@ -1,57 +0,0 @@ -package configsources - -import ( - "context" -) - -// ServiceBaseEndpointProvider is needed to search for all providers -// that provide a configured service endpoint -type ServiceBaseEndpointProvider interface { - GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) -} - -// IgnoreConfiguredEndpointsProvider is needed to search for all providers -// that provide a flag to disable configured endpoints. -// -// Currently duplicated from github.com/aws/aws-sdk-go-v2/config because -// service packages cannot import github.com/aws/aws-sdk-go-v2/config -// due to result import cycle error. -type IgnoreConfiguredEndpointsProvider interface { - GetIgnoreConfiguredEndpoints(ctx context.Context) (bool, bool, error) -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -// -// Currently duplicated from github.com/aws/aws-sdk-go-v2/config because -// service packages cannot import github.com/aws/aws-sdk-go-v2/config -// due to result import cycle error. -func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok { - value, found, err = p.GetIgnoreConfiguredEndpoints(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ResolveServiceBaseEndpoint is used to retrieve service endpoints from configured sources -// while allowing for configured endpoints to be disabled -func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []interface{}) (value string, found bool, err error) { - if val, found, _ := GetIgnoreConfiguredEndpoints(ctx, configs); found && val { - return "", false, nil - } - - for _, cs := range configs { - if p, ok := cs.(ServiceBaseEndpointProvider); ok { - value, found, err = p.GetServiceBaseEndpoint(context.Background(), sdkID) - if err != nil || found { - break - } - } - } - return -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go deleted file mode 100644 index a99e10d8a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package configsources - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.3.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go deleted file mode 100644 index e6223dd3b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go +++ /dev/null @@ -1,94 +0,0 @@ -package awsrulesfn - -import ( - "strings" -) - -// ARN provides AWS ARN components broken out into a data structure. -type ARN struct { - Partition string - Service string - Region string - AccountId string - ResourceId OptionalStringSlice -} - -const ( - arnDelimiters = ":" - resourceDelimiters = "/:" - arnSections = 6 - arnPrefix = "arn:" - - // zero-indexed - sectionPartition = 1 - sectionService = 2 - sectionRegion = 3 - sectionAccountID = 4 - sectionResource = 5 -) - -// ParseARN returns an [ARN] value parsed from the input string provided. If -// the ARN cannot be parsed nil will be returned, and error added to -// [ErrorCollector]. -func ParseARN(input string) *ARN { - if !strings.HasPrefix(input, arnPrefix) { - return nil - } - - sections := strings.SplitN(input, arnDelimiters, arnSections) - if numSections := len(sections); numSections != arnSections { - return nil - } - - if sections[sectionPartition] == "" { - return nil - } - if sections[sectionService] == "" { - return nil - } - if sections[sectionResource] == "" { - return nil - } - - return &ARN{ - Partition: sections[sectionPartition], - Service: sections[sectionService], - Region: sections[sectionRegion], - AccountId: sections[sectionAccountID], - ResourceId: splitResource(sections[sectionResource]), - } -} - -// splitResource splits the resource components by the ARN resource delimiters. -func splitResource(v string) []string { - var parts []string - var offset int - - for offset <= len(v) { - idx := strings.IndexAny(v[offset:], "/:") - if idx < 0 { - parts = append(parts, v[offset:]) - break - } - parts = append(parts, v[offset:idx+offset]) - offset += idx + 1 - } - - return parts -} - -// OptionalStringSlice provides a helper to safely get the index of a string -// slice that may be out of bounds. Returns pointer to string if index is -// valid. Otherwise returns nil. -type OptionalStringSlice []string - -// Get returns a string pointer of the string at index i if the index is valid. -// Otherwise returns nil. -func (s OptionalStringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go deleted file mode 100644 index d5a365853..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package awsrulesfn provides AWS focused endpoint rule functions for -// evaluating endpoint resolution rules. -package awsrulesfn diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go deleted file mode 100644 index df72da97c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build codegen -// +build codegen - -package awsrulesfn - -//go:generate go run -tags codegen ./internal/partition/codegen.go -model partitions.json -output partitions.go -//go:generate gofmt -w -s . diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go deleted file mode 100644 index 637e5fc18..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go +++ /dev/null @@ -1,51 +0,0 @@ -package awsrulesfn - -import ( - "net" - "strings" - - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// IsVirtualHostableS3Bucket returns if the input is a DNS compatible bucket -// name and can be used with Amazon S3 virtual hosted style addressing. Similar -// to [rulesfn.IsValidHostLabel] with the added restriction that the length of label -// must be [3:63] characters long, all lowercase, and not formatted as an IP -// address. -func IsVirtualHostableS3Bucket(input string, allowSubDomains bool) bool { - // input should not be formatted as an IP address - // NOTE: this will technically trip up on IPv6 hosts with zone IDs, but - // validation further down will catch that anyway (it's guaranteed to have - // unfriendly characters % and : if that's the case) - if net.ParseIP(input) != nil { - return false - } - - var labels []string - if allowSubDomains { - labels = strings.Split(input, ".") - } else { - labels = []string{input} - } - - for _, label := range labels { - // validate special length constraints - if l := len(label); l < 3 || l > 63 { - return false - } - - // Validate no capital letters - for _, r := range label { - if r >= 'A' && r <= 'Z' { - return false - } - } - - // Validate valid host label - if !smithyhttp.ValidHostLabel(label) { - return false - } - } - - return true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go deleted file mode 100644 index ba6032758..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go +++ /dev/null @@ -1,75 +0,0 @@ -package awsrulesfn - -import "regexp" - -// Partition provides the metadata describing an AWS partition. -type Partition struct { - ID string `json:"id"` - Regions map[string]RegionOverrides `json:"regions"` - RegionRegex string `json:"regionRegex"` - DefaultConfig PartitionConfig `json:"outputs"` -} - -// PartitionConfig provides the endpoint metadata for an AWS region or partition. -type PartitionConfig struct { - Name string `json:"name"` - DnsSuffix string `json:"dnsSuffix"` - DualStackDnsSuffix string `json:"dualStackDnsSuffix"` - SupportsFIPS bool `json:"supportsFIPS"` - SupportsDualStack bool `json:"supportsDualStack"` -} - -type RegionOverrides struct { - Name *string `json:"name"` - DnsSuffix *string `json:"dnsSuffix"` - DualStackDnsSuffix *string `json:"dualStackDnsSuffix"` - SupportsFIPS *bool `json:"supportsFIPS"` - SupportsDualStack *bool `json:"supportsDualStack"` -} - -const defaultPartition = "aws" - -func getPartition(partitions []Partition, region string) *PartitionConfig { - for _, partition := range partitions { - if v, ok := partition.Regions[region]; ok { - p := mergeOverrides(partition.DefaultConfig, v) - return &p - } - } - - for _, partition := range partitions { - regionRegex := regexp.MustCompile(partition.RegionRegex) - if regionRegex.MatchString(region) { - v := partition.DefaultConfig - return &v - } - } - - for _, partition := range partitions { - if partition.ID == defaultPartition { - v := partition.DefaultConfig - return &v - } - } - - return nil -} - -func mergeOverrides(into PartitionConfig, from RegionOverrides) PartitionConfig { - if from.Name != nil { - into.Name = *from.Name - } - if from.DnsSuffix != nil { - into.DnsSuffix = *from.DnsSuffix - } - if from.DualStackDnsSuffix != nil { - into.DualStackDnsSuffix = *from.DualStackDnsSuffix - } - if from.SupportsFIPS != nil { - into.SupportsFIPS = *from.SupportsFIPS - } - if from.SupportsDualStack != nil { - into.SupportsDualStack = *from.SupportsDualStack - } - return into -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go deleted file mode 100644 index 849beffd7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ /dev/null @@ -1,381 +0,0 @@ -// Code generated by endpoint/awsrulesfn/internal/partition. DO NOT EDIT. - -package awsrulesfn - -// GetPartition returns an AWS [Partition] for the region provided. If the -// partition cannot be determined nil will be returned. -func GetPartition(region string) *PartitionConfig { - return getPartition(partitions, region) -} - -var partitions = []Partition{ - { - ID: "aws", - RegionRegex: "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", - SupportsFIPS: true, - SupportsDualStack: true, - }, - Regions: map[string]RegionOverrides{ - "af-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-northeast-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-northeast-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-northeast-3": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-south-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-3": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-4": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "aws-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ca-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-central-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-north-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-south-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-west-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-west-3": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "il-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "me-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "me-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "sa-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-east-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-west-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-cn", - RegionRegex: "^cn\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-cn", - DnsSuffix: "amazonaws.com.cn", - DualStackDnsSuffix: "api.amazonwebservices.com.cn", - SupportsFIPS: true, - SupportsDualStack: true, - }, - Regions: map[string]RegionOverrides{ - "aws-cn-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "cn-north-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "cn-northwest-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-us-gov", - RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-us-gov", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", - SupportsFIPS: true, - SupportsDualStack: true, - }, - Regions: map[string]RegionOverrides{ - "aws-us-gov-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso", - RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso", - DnsSuffix: "c2s.ic.gov", - DualStackDnsSuffix: "c2s.ic.gov", - SupportsFIPS: true, - SupportsDualStack: false, - }, - Regions: map[string]RegionOverrides{ - "aws-iso-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-iso-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-iso-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso-b", - RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso-b", - DnsSuffix: "sc2s.sgov.gov", - DualStackDnsSuffix: "sc2s.sgov.gov", - SupportsFIPS: true, - SupportsDualStack: false, - }, - Regions: map[string]RegionOverrides{ - "aws-iso-b-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-isob-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso-e", - RegionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso-e", - DnsSuffix: "cloud.adc-e.uk", - DualStackDnsSuffix: "cloud.adc-e.uk", - SupportsFIPS: true, - SupportsDualStack: false, - }, - Regions: map[string]RegionOverrides{}, - }, - { - ID: "aws-iso-f", - RegionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso-f", - DnsSuffix: "csp.hci.ic.gov", - DualStackDnsSuffix: "csp.hci.ic.gov", - SupportsFIPS: true, - SupportsDualStack: false, - }, - Regions: map[string]RegionOverrides{}, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json deleted file mode 100644 index f376f6908..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "partitions" : [ { - "id" : "aws", - "outputs" : { - "dnsSuffix" : "amazonaws.com", - "dualStackDnsSuffix" : "api.aws", - "implicitGlobalRegion" : "us-east-1", - "name" : "aws", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$", - "regions" : { - "af-south-1" : { - "description" : "Africa (Cape Town)" - }, - "ap-east-1" : { - "description" : "Asia Pacific (Hong Kong)" - }, - "ap-northeast-1" : { - "description" : "Asia Pacific (Tokyo)" - }, - "ap-northeast-2" : { - "description" : "Asia Pacific (Seoul)" - }, - "ap-northeast-3" : { - "description" : "Asia Pacific (Osaka)" - }, - "ap-south-1" : { - "description" : "Asia Pacific (Mumbai)" - }, - "ap-south-2" : { - "description" : "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1" : { - "description" : "Asia Pacific (Singapore)" - }, - "ap-southeast-2" : { - "description" : "Asia Pacific (Sydney)" - }, - "ap-southeast-3" : { - "description" : "Asia Pacific (Jakarta)" - }, - "ap-southeast-4" : { - "description" : "Asia Pacific (Melbourne)" - }, - "aws-global" : { - "description" : "AWS Standard global region" - }, - "ca-central-1" : { - "description" : "Canada (Central)" - }, - "ca-west-1" : { - "description" : "Canada West (Calgary)" - }, - "eu-central-1" : { - "description" : "Europe (Frankfurt)" - }, - "eu-central-2" : { - "description" : "Europe (Zurich)" - }, - "eu-north-1" : { - "description" : "Europe (Stockholm)" - }, - "eu-south-1" : { - "description" : "Europe (Milan)" - }, - "eu-south-2" : { - "description" : "Europe (Spain)" - }, - "eu-west-1" : { - "description" : "Europe (Ireland)" - }, - "eu-west-2" : { - "description" : "Europe (London)" - }, - "eu-west-3" : { - "description" : "Europe (Paris)" - }, - "il-central-1" : { - "description" : "Israel (Tel Aviv)" - }, - "me-central-1" : { - "description" : "Middle East (UAE)" - }, - "me-south-1" : { - "description" : "Middle East (Bahrain)" - }, - "sa-east-1" : { - "description" : "South America (Sao Paulo)" - }, - "us-east-1" : { - "description" : "US East (N. Virginia)" - }, - "us-east-2" : { - "description" : "US East (Ohio)" - }, - "us-west-1" : { - "description" : "US West (N. California)" - }, - "us-west-2" : { - "description" : "US West (Oregon)" - } - } - }, { - "id" : "aws-cn", - "outputs" : { - "dnsSuffix" : "amazonaws.com.cn", - "dualStackDnsSuffix" : "api.amazonwebservices.com.cn", - "implicitGlobalRegion" : "cn-northwest-1", - "name" : "aws-cn", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^cn\\-\\w+\\-\\d+$", - "regions" : { - "aws-cn-global" : { - "description" : "AWS China global region" - }, - "cn-north-1" : { - "description" : "China (Beijing)" - }, - "cn-northwest-1" : { - "description" : "China (Ningxia)" - } - } - }, { - "id" : "aws-us-gov", - "outputs" : { - "dnsSuffix" : "amazonaws.com", - "dualStackDnsSuffix" : "api.aws", - "implicitGlobalRegion" : "us-gov-west-1", - "name" : "aws-us-gov", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$", - "regions" : { - "aws-us-gov-global" : { - "description" : "AWS GovCloud (US) global region" - }, - "us-gov-east-1" : { - "description" : "AWS GovCloud (US-East)" - }, - "us-gov-west-1" : { - "description" : "AWS GovCloud (US-West)" - } - } - }, { - "id" : "aws-iso", - "outputs" : { - "dnsSuffix" : "c2s.ic.gov", - "dualStackDnsSuffix" : "c2s.ic.gov", - "implicitGlobalRegion" : "us-iso-east-1", - "name" : "aws-iso", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-global" : { - "description" : "AWS ISO (US) global region" - }, - "us-iso-east-1" : { - "description" : "US ISO East" - }, - "us-iso-west-1" : { - "description" : "US ISO WEST" - } - } - }, { - "id" : "aws-iso-b", - "outputs" : { - "dnsSuffix" : "sc2s.sgov.gov", - "dualStackDnsSuffix" : "sc2s.sgov.gov", - "implicitGlobalRegion" : "us-isob-east-1", - "name" : "aws-iso-b", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-b-global" : { - "description" : "AWS ISOB (US) global region" - }, - "us-isob-east-1" : { - "description" : "US ISOB East (Ohio)" - } - } - }, { - "id" : "aws-iso-e", - "outputs" : { - "dnsSuffix" : "cloud.adc-e.uk", - "dualStackDnsSuffix" : "cloud.adc-e.uk", - "implicitGlobalRegion" : "eu-isoe-west-1", - "name" : "aws-iso-e", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$", - "regions" : { } - }, { - "id" : "aws-iso-f", - "outputs" : { - "dnsSuffix" : "csp.hci.ic.gov", - "dualStackDnsSuffix" : "csp.hci.ic.gov", - "implicitGlobalRegion" : "us-isof-south-1", - "name" : "aws-iso-f", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$", - "regions" : { } - } ], - "version" : "1.1" -} \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go deleted file mode 100644 index 67950ca36..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go +++ /dev/null @@ -1,201 +0,0 @@ -package endpoints - -import ( - "fmt" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -const ( - defaultProtocol = "https" - defaultSigner = "v4" -) - -var ( - protocolPriority = []string{"https", "http"} - signerPriority = []string{"v4"} -) - -// Options provide configuration needed to direct how endpoints are resolved. -type Options struct { - // Disable usage of HTTPS (TLS / SSL) - DisableHTTPS bool -} - -// Partitions is a slice of partition -type Partitions []Partition - -// ResolveEndpoint resolves a service endpoint for the given region and options. -func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) { - if len(ps) == 0 { - return aws.Endpoint{}, fmt.Errorf("no partitions found") - } - - for i := 0; i < len(ps); i++ { - if !ps[i].canResolveEndpoint(region) { - continue - } - - return ps[i].ResolveEndpoint(region, opts) - } - - // fallback to first partition format to use when resolving the endpoint. - return ps[0].ResolveEndpoint(region, opts) -} - -// Partition is an AWS partition description for a service and its' region endpoints. -type Partition struct { - ID string - RegionRegex *regexp.Regexp - PartitionEndpoint string - IsRegionalized bool - Defaults Endpoint - Endpoints Endpoints -} - -func (p Partition) canResolveEndpoint(region string) bool { - _, ok := p.Endpoints[region] - return ok || p.RegionRegex.MatchString(region) -} - -// ResolveEndpoint resolves and service endpoint for the given region and options. -func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) { - if len(region) == 0 && len(p.PartitionEndpoint) != 0 { - region = p.PartitionEndpoint - } - - e, _ := p.endpointForRegion(region) - - return e.resolve(p.ID, region, p.Defaults, options), nil -} - -func (p Partition) endpointForRegion(region string) (Endpoint, bool) { - if e, ok := p.Endpoints[region]; ok { - return e, true - } - - if !p.IsRegionalized { - return p.Endpoints[p.PartitionEndpoint], region == p.PartitionEndpoint - } - - // Unable to find any matching endpoint, return - // blank that will be used for generic endpoint creation. - return Endpoint{}, false -} - -// Endpoints is a map of service config regions to endpoints -type Endpoints map[string]Endpoint - -// CredentialScope is the credential scope of a region and service -type CredentialScope struct { - Region string - Service string -} - -// Endpoint is a service endpoint description -type Endpoint struct { - // True if the endpoint cannot be resolved for this partition/region/service - Unresolveable aws.Ternary - - Hostname string - Protocols []string - - CredentialScope CredentialScope - - SignatureVersions []string `json:"signatureVersions"` -} - -func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) aws.Endpoint { - var merged Endpoint - merged.mergeIn(def) - merged.mergeIn(e) - e = merged - - var u string - if e.Unresolveable != aws.TrueTernary { - // Only attempt to resolve the endpoint if it can be resolved. - hostname := strings.Replace(e.Hostname, "{region}", region, 1) - - scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS) - u = scheme + "://" + hostname - } - - signingRegion := e.CredentialScope.Region - if len(signingRegion) == 0 { - signingRegion = region - } - signingName := e.CredentialScope.Service - - return aws.Endpoint{ - URL: u, - PartitionID: partition, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), - } -} - -func (e *Endpoint) mergeIn(other Endpoint) { - if other.Unresolveable != aws.UnknownTernary { - e.Unresolveable = other.Unresolveable - } - if len(other.Hostname) > 0 { - e.Hostname = other.Hostname - } - if len(other.Protocols) > 0 { - e.Protocols = other.Protocols - } - if len(other.CredentialScope.Region) > 0 { - e.CredentialScope.Region = other.CredentialScope.Region - } - if len(other.CredentialScope.Service) > 0 { - e.CredentialScope.Service = other.CredentialScope.Service - } - if len(other.SignatureVersions) > 0 { - e.SignatureVersions = other.SignatureVersions - } -} - -func getEndpointScheme(protocols []string, disableHTTPS bool) string { - if disableHTTPS { - return "http" - } - - return getByPriority(protocols, protocolPriority, defaultProtocol) -} - -func getByPriority(s []string, p []string, def string) string { - if len(s) == 0 { - return def - } - - for i := 0; i < len(p); i++ { - for j := 0; j < len(s); j++ { - if s[j] == p[i] { - return s[j] - } - } - } - - return s[0] -} - -// MapFIPSRegion extracts the intrinsic AWS region from one that may have an -// embedded FIPS microformat. -func MapFIPSRegion(region string) string { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(region, fipsInfix) || - strings.Contains(region, fipsPrefix) || - strings.Contains(region, fipsSuffix) { - region = strings.ReplaceAll(region, fipsInfix, "-") - region = strings.ReplaceAll(region, fipsPrefix, "") - region = strings.ReplaceAll(region, fipsSuffix, "") - } - - return region -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md deleted file mode 100644 index b95cd39f4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ /dev/null @@ -1,241 +0,0 @@ -# v2.6.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.10 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.9 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.8 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.7 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.6 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.3 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.37 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.36 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.35 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.34 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.33 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.32 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.31 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.30 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.29 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.28 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.27 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.26 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.25 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.24 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.23 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.22 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.21 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.20 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.19 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.18 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.17 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.16 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.3.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.2.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.1.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.0.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.0.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.0.0 (2021-11-06) - -* **Release**: Endpoint Variant Model Support -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go deleted file mode 100644 index 32251a7e3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go +++ /dev/null @@ -1,302 +0,0 @@ -package endpoints - -import ( - "fmt" - "github.com/aws/smithy-go/logging" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// DefaultKey is a compound map key of a variant and other values. -type DefaultKey struct { - Variant EndpointVariant - ServiceVariant ServiceVariant -} - -// EndpointKey is a compound map key of a region and associated variant value. -type EndpointKey struct { - Region string - Variant EndpointVariant - ServiceVariant ServiceVariant -} - -// EndpointVariant is a bit field to describe the endpoints attributes. -type EndpointVariant uint64 - -const ( - // FIPSVariant indicates that the endpoint is FIPS capable. - FIPSVariant EndpointVariant = 1 << (64 - 1 - iota) - - // DualStackVariant indicates that the endpoint is DualStack capable. - DualStackVariant -) - -// ServiceVariant is a bit field to describe the service endpoint attributes. -type ServiceVariant uint64 - -const ( - defaultProtocol = "https" - defaultSigner = "v4" -) - -var ( - protocolPriority = []string{"https", "http"} - signerPriority = []string{"v4", "s3v4"} -) - -// Options provide configuration needed to direct how endpoints are resolved. -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the provided logger. - LogDeprecated bool - - // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority - // over the region name passed to the ResolveEndpoint call. - ResolvedRegion string - - // Disable usage of HTTPS (TLS / SSL) - DisableHTTPS bool - - // Instruct the resolver to use a service endpoint that supports dual-stack. - // If a service does not have a dual-stack endpoint an error will be returned by the resolver. - UseDualStackEndpoint aws.DualStackEndpointState - - // Instruct the resolver to use a service endpoint that supports FIPS. - // If a service does not have a FIPS endpoint an error will be returned by the resolver. - UseFIPSEndpoint aws.FIPSEndpointState - - // ServiceVariant is a bitfield of service specified endpoint variant data. - ServiceVariant ServiceVariant -} - -// GetEndpointVariant returns the EndpointVariant for the variant associated options. -func (o Options) GetEndpointVariant() (v EndpointVariant) { - if o.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled { - v |= DualStackVariant - } - if o.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled { - v |= FIPSVariant - } - return v -} - -// Partitions is a slice of partition -type Partitions []Partition - -// ResolveEndpoint resolves a service endpoint for the given region and options. -func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) { - if len(ps) == 0 { - return aws.Endpoint{}, fmt.Errorf("no partitions found") - } - - if opts.Logger == nil { - opts.Logger = logging.Nop{} - } - - if len(opts.ResolvedRegion) > 0 { - region = opts.ResolvedRegion - } - - for i := 0; i < len(ps); i++ { - if !ps[i].canResolveEndpoint(region, opts) { - continue - } - - return ps[i].ResolveEndpoint(region, opts) - } - - // fallback to first partition format to use when resolving the endpoint. - return ps[0].ResolveEndpoint(region, opts) -} - -// Partition is an AWS partition description for a service and its' region endpoints. -type Partition struct { - ID string - RegionRegex *regexp.Regexp - PartitionEndpoint string - IsRegionalized bool - Defaults map[DefaultKey]Endpoint - Endpoints Endpoints -} - -func (p Partition) canResolveEndpoint(region string, opts Options) bool { - _, ok := p.Endpoints[EndpointKey{ - Region: region, - Variant: opts.GetEndpointVariant(), - }] - return ok || p.RegionRegex.MatchString(region) -} - -// ResolveEndpoint resolves and service endpoint for the given region and options. -func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) { - if len(region) == 0 && len(p.PartitionEndpoint) != 0 { - region = p.PartitionEndpoint - } - - endpoints := p.Endpoints - - variant := options.GetEndpointVariant() - serviceVariant := options.ServiceVariant - - defaults := p.Defaults[DefaultKey{ - Variant: variant, - ServiceVariant: serviceVariant, - }] - - return p.endpointForRegion(region, variant, serviceVariant, endpoints).resolve(p.ID, region, defaults, options) -} - -func (p Partition) endpointForRegion(region string, variant EndpointVariant, serviceVariant ServiceVariant, endpoints Endpoints) Endpoint { - key := EndpointKey{ - Region: region, - Variant: variant, - } - - if e, ok := endpoints[key]; ok { - return e - } - - if !p.IsRegionalized { - return endpoints[EndpointKey{ - Region: p.PartitionEndpoint, - Variant: variant, - ServiceVariant: serviceVariant, - }] - } - - // Unable to find any matching endpoint, return - // blank that will be used for generic endpoint creation. - return Endpoint{} -} - -// Endpoints is a map of service config regions to endpoints -type Endpoints map[EndpointKey]Endpoint - -// CredentialScope is the credential scope of a region and service -type CredentialScope struct { - Region string - Service string -} - -// Endpoint is a service endpoint description -type Endpoint struct { - // True if the endpoint cannot be resolved for this partition/region/service - Unresolveable aws.Ternary - - Hostname string - Protocols []string - - CredentialScope CredentialScope - - SignatureVersions []string - - // Indicates that this endpoint is deprecated. - Deprecated aws.Ternary -} - -// IsZero returns whether the endpoint structure is an empty (zero) value. -func (e Endpoint) IsZero() bool { - switch { - case e.Unresolveable != aws.UnknownTernary: - return false - case len(e.Hostname) != 0: - return false - case len(e.Protocols) != 0: - return false - case e.CredentialScope != (CredentialScope{}): - return false - case len(e.SignatureVersions) != 0: - return false - } - return true -} - -func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) (aws.Endpoint, error) { - var merged Endpoint - merged.mergeIn(def) - merged.mergeIn(e) - e = merged - - if e.IsZero() { - return aws.Endpoint{}, fmt.Errorf("unable to resolve endpoint for region: %v", region) - } - - var u string - if e.Unresolveable != aws.TrueTernary { - // Only attempt to resolve the endpoint if it can be resolved. - hostname := strings.Replace(e.Hostname, "{region}", region, 1) - - scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS) - u = scheme + "://" + hostname - } - - signingRegion := e.CredentialScope.Region - if len(signingRegion) == 0 { - signingRegion = region - } - signingName := e.CredentialScope.Service - - if e.Deprecated == aws.TrueTernary && options.LogDeprecated { - options.Logger.Logf(logging.Warn, "endpoint identifier %q, url %q marked as deprecated", region, u) - } - - return aws.Endpoint{ - URL: u, - PartitionID: partition, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), - }, nil -} - -func (e *Endpoint) mergeIn(other Endpoint) { - if other.Unresolveable != aws.UnknownTernary { - e.Unresolveable = other.Unresolveable - } - if len(other.Hostname) > 0 { - e.Hostname = other.Hostname - } - if len(other.Protocols) > 0 { - e.Protocols = other.Protocols - } - if len(other.CredentialScope.Region) > 0 { - e.CredentialScope.Region = other.CredentialScope.Region - } - if len(other.CredentialScope.Service) > 0 { - e.CredentialScope.Service = other.CredentialScope.Service - } - if len(other.SignatureVersions) > 0 { - e.SignatureVersions = other.SignatureVersions - } - if other.Deprecated != aws.UnknownTernary { - e.Deprecated = other.Deprecated - } -} - -func getEndpointScheme(protocols []string, disableHTTPS bool) string { - if disableHTTPS { - return "http" - } - - return getByPriority(protocols, protocolPriority, defaultProtocol) -} - -func getByPriority(s []string, p []string, def string) string { - if len(s) == 0 { - return def - } - - for i := 0; i < len(p); i++ { - for j := 0; j < len(s); j++ { - if s[j] == p[i] { - return s[j] - } - } - } - - return s[0] -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go deleted file mode 100644 index 833b91157..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package endpoints - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "2.6.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go deleted file mode 100644 index c8484dcd7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go +++ /dev/null @@ -1,33 +0,0 @@ -package rand - -import ( - "crypto/rand" - "fmt" - "io" - "math/big" -) - -func init() { - Reader = rand.Reader -} - -// Reader provides a random reader that can reset during testing. -var Reader io.Reader - -var floatMaxBigInt = big.NewInt(1 << 53) - -// Float64 returns a float64 read from an io.Reader source. The returned float will be between [0.0, 1.0). -func Float64(reader io.Reader) (float64, error) { - bi, err := rand.Int(reader, floatMaxBigInt) - if err != nil { - return 0, fmt.Errorf("failed to read random value, %v", err) - } - - return float64(bi.Int64()) / (1 << 53), nil -} - -// CryptoRandFloat64 returns a random float64 obtained from the crypto rand -// source. -func CryptoRandFloat64() (float64, error) { - return Float64(Reader) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go deleted file mode 100644 index 2b42cbe64..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go +++ /dev/null @@ -1,9 +0,0 @@ -package sdk - -// Invalidator provides access to a type's invalidate method to make it -// invalidate it cache. -// -// e.g aws.SafeCredentialsProvider's Invalidate method. -type Invalidator interface { - Invalidate() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go deleted file mode 100644 index 8e8dabad5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go +++ /dev/null @@ -1,74 +0,0 @@ -package sdk - -import ( - "context" - "time" -) - -func init() { - NowTime = time.Now - Sleep = time.Sleep - SleepWithContext = sleepWithContext -} - -// NowTime is a value for getting the current time. This value can be overridden -// for testing mocking out current time. -var NowTime func() time.Time - -// Sleep is a value for sleeping for a duration. This value can be overridden -// for testing and mocking out sleep duration. -var Sleep func(time.Duration) - -// SleepWithContext will wait for the timer duration to expire, or the context -// is canceled. Which ever happens first. If the context is canceled the Context's -// error will be returned. -// -// This value can be overridden for testing and mocking out sleep duration. -var SleepWithContext func(context.Context, time.Duration) error - -// sleepWithContext will wait for the timer duration to expire, or the context -// is canceled. Which ever happens first. If the context is canceled the -// Context's error will be returned. -func sleepWithContext(ctx context.Context, dur time.Duration) error { - t := time.NewTimer(dur) - defer t.Stop() - - select { - case <-t.C: - break - case <-ctx.Done(): - return ctx.Err() - } - - return nil -} - -// noOpSleepWithContext does nothing, returns immediately. -func noOpSleepWithContext(context.Context, time.Duration) error { - return nil -} - -func noOpSleep(time.Duration) {} - -// TestingUseNopSleep is a utility for disabling sleep across the SDK for -// testing. -func TestingUseNopSleep() func() { - SleepWithContext = noOpSleepWithContext - Sleep = noOpSleep - - return func() { - SleepWithContext = sleepWithContext - Sleep = time.Sleep - } -} - -// TestingUseReferenceTime is a utility for swapping the time function across the SDK to return a specific reference time -// for testing purposes. -func TestingUseReferenceTime(referenceTime time.Time) func() { - NowTime = func() time.Time { - return referenceTime - } - return func() { - NowTime = time.Now - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go deleted file mode 100644 index d008ae27c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go +++ /dev/null @@ -1,11 +0,0 @@ -package strings - -import ( - "strings" -) - -// HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings, -// under Unicode case-folding. -func HasPrefixFold(s, prefix string) bool { - return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE deleted file mode 100644 index fe6a62006..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go deleted file mode 100644 index cb70616e8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go +++ /dev/null @@ -1,7 +0,0 @@ -// Package singleflight provides a duplicate function call suppression -// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight -// package. The package is forked, because the package a part of the unstable -// and unversioned golang.org/x/sync module. -// -// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight -package singleflight diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go deleted file mode 100644 index e8a1b17d5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package singleflight - -import ( - "bytes" - "errors" - "fmt" - "runtime" - "runtime/debug" - "sync" -) - -// errGoexit indicates the runtime.Goexit was called in -// the user given function. -var errGoexit = errors.New("runtime.Goexit was called") - -// A panicError is an arbitrary value recovered from a panic -// with the stack trace during the execution of given function. -type panicError struct { - value interface{} - stack []byte -} - -// Error implements error interface. -func (p *panicError) Error() string { - return fmt.Sprintf("%v\n\n%s", p.value, p.stack) -} - -func newPanicError(v interface{}) error { - stack := debug.Stack() - - // The first line of the stack trace is of the form "goroutine N [status]:" - // but by the time the panic reaches Do the goroutine may no longer exist - // and its status will have changed. Trim out the misleading line. - if line := bytes.IndexByte(stack[:], '\n'); line >= 0 { - stack = stack[line+1:] - } - return &panicError{value: v, stack: stack} -} - -// call is an in-flight or completed singleflight.Do call -type call struct { - wg sync.WaitGroup - - // These fields are written once before the WaitGroup is done - // and are only read after the WaitGroup is done. - val interface{} - err error - - // forgotten indicates whether Forget was called with this call's key - // while the call was still in flight. - forgotten bool - - // These fields are read and written with the singleflight - // mutex held before the WaitGroup is done, and are read but - // not written after the WaitGroup is done. - dups int - chans []chan<- Result -} - -// Group represents a class of work and forms a namespace in -// which units of work can be executed with duplicate suppression. -type Group struct { - mu sync.Mutex // protects m - m map[string]*call // lazily initialized -} - -// Result holds the results of Do, so they can be passed -// on a channel. -type Result struct { - Val interface{} - Err error - Shared bool -} - -// Do executes and returns the results of the given function, making -// sure that only one execution is in-flight for a given key at a -// time. If a duplicate comes in, the duplicate caller waits for the -// original to complete and receives the same results. -// The return value shared indicates whether v was given to multiple callers. -func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) { - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - g.mu.Unlock() - c.wg.Wait() - - if e, ok := c.err.(*panicError); ok { - panic(e) - } else if c.err == errGoexit { - runtime.Goexit() - } - return c.val, c.err, true - } - c := new(call) - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - g.doCall(c, key, fn) - return c.val, c.err, c.dups > 0 -} - -// DoChan is like Do but returns a channel that will receive the -// results when they are ready. -// -// The returned channel will not be closed. -func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result { - ch := make(chan Result, 1) - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - c.chans = append(c.chans, ch) - g.mu.Unlock() - return ch - } - c := &call{chans: []chan<- Result{ch}} - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - go g.doCall(c, key, fn) - - return ch -} - -// doCall handles the single call for a key. -func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) { - normalReturn := false - recovered := false - - // use double-defer to distinguish panic from runtime.Goexit, - // more details see https://golang.org/cl/134395 - defer func() { - // the given function invoked runtime.Goexit - if !normalReturn && !recovered { - c.err = errGoexit - } - - c.wg.Done() - g.mu.Lock() - defer g.mu.Unlock() - if !c.forgotten { - delete(g.m, key) - } - - if e, ok := c.err.(*panicError); ok { - // In order to prevent the waiting channels from being blocked forever, - // needs to ensure that this panic cannot be recovered. - if len(c.chans) > 0 { - go panic(e) - select {} // Keep this goroutine around so that it will appear in the crash dump. - } else { - panic(e) - } - } else if c.err == errGoexit { - // Already in the process of goexit, no need to call again - } else { - // Normal return - for _, ch := range c.chans { - ch <- Result{c.val, c.err, c.dups > 0} - } - } - }() - - func() { - defer func() { - if !normalReturn { - // Ideally, we would wait to take a stack trace until we've determined - // whether this is a panic or a runtime.Goexit. - // - // Unfortunately, the only way we can distinguish the two is to see - // whether the recover stopped the goroutine from terminating, and by - // the time we know that, the part of the stack trace relevant to the - // panic has been discarded. - if r := recover(); r != nil { - c.err = newPanicError(r) - } - } - }() - - c.val, c.err = fn() - normalReturn = true - }() - - if !normalReturn { - recovered = true - } -} - -// Forget tells the singleflight to forget about a key. Future calls -// to Do for this key will call the function rather than waiting for -// an earlier call to complete. -func (g *Group) Forget(key string) { - g.mu.Lock() - if c, ok := g.m[key]; ok { - c.forgotten = true - } - delete(g.m, key) - g.mu.Unlock() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go deleted file mode 100644 index 5d69db5f2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go +++ /dev/null @@ -1,13 +0,0 @@ -package timeconv - -import "time" - -// FloatSecondsDur converts a fractional seconds to duration. -func FloatSecondsDur(v float64) time.Duration { - return time.Duration(v * float64(time.Second)) -} - -// DurSecondsFloat converts a duration into fractional seconds. -func DurSecondsFloat(d time.Duration) float64 { - return float64(d) / float64(time.Second) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md deleted file mode 100644 index 85be32632..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/CHANGELOG.md +++ /dev/null @@ -1,842 +0,0 @@ -# v1.149.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.149.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.148.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.148.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.148.0 (2024-02-16) - -* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. - -# v1.147.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.146.0 (2024-01-29) - -* **Feature**: EC2 Fleet customers who use attribute based instance-type selection can now intuitively define their Spot instances price protection limit as a percentage of the lowest priced On-Demand instance type. - -# v1.145.0 (2024-01-24) - -* **Feature**: Introduced a new clientToken request parameter on CreateNetworkAcl and CreateRouteTable APIs. The clientToken parameter allows idempotent operations on the APIs. - -# v1.144.1 (2024-01-22) - -* **Documentation**: Documentation updates for Amazon EC2. - -# v1.144.0 (2024-01-11) - -* **Feature**: This release adds support for adding an ElasticBlockStorage volume configurations in ECS RunTask/StartTask/CreateService/UpdateService APIs. The configuration allows for attaching EBS volumes to ECS Tasks. - -# v1.143.0 (2024-01-08) - -* **Feature**: Amazon EC2 R7iz bare metal instances are powered by custom 4th generation Intel Xeon Scalable processors. - -# v1.142.1 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.142.0 (2023-12-19) - -* **Feature**: Provision BYOIPv4 address ranges and advertise them by specifying the network border groups option in Los Angeles, Phoenix and Dallas AWS Local Zones. - -# v1.141.0 (2023-12-08) - -* **Feature**: M2 Mac instances are built on Apple M2 Mac mini computers. I4i instances are powered by 3rd generation Intel Xeon Scalable processors. C7i compute optimized, M7i general purpose and R7i memory optimized instances are powered by custom 4th Generation Intel Xeon Scalable processors. -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.140.1 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.140.0 (2023-12-06) - -* **Feature**: Releasing the new cpuManufacturer attribute within the DescribeInstanceTypes API response which notifies our customers with information on who the Manufacturer is for the processor attached to the instance, for example: Intel. -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.139.0 (2023-12-05) - -* **Feature**: Adds A10G, T4G, and H100 as accelerator name options and Habana as an accelerator manufacturer option for attribute based selection - -# v1.138.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.138.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.138.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.137.3 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.137.2 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.137.1 (2023-11-21) - -* **Documentation**: Documentation updates for Amazon EC2. - -# v1.137.0 (2023-11-20) - -* **Feature**: This release adds support for Security group referencing over Transit gateways, enabling you to simplify Security group management and control of instance-to-instance traffic across VPCs that are connected by Transit gateway. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.136.0 (2023-11-17) - -* **Feature**: This release adds new features for Amazon VPC IP Address Manager (IPAM) Allowing a choice between Free and Advanced Tiers, viewing public IP address insights across regions and in Amazon Cloudwatch, use IPAM to plan your subnet IPs within a VPC and bring your own autonomous system number to IPAM. - -# v1.135.0 (2023-11-16) - -* **Feature**: Enable use of tenant-specific PublicSigningKeyUrl from device trust providers and onboard jumpcloud as a new device trust provider. - -# v1.134.0 (2023-11-15) - -* **Feature**: AWS EBS now supports Snapshot Lock, giving users the ability to lock an EBS Snapshot to prohibit deletion of the snapshot. This release introduces the LockSnapshot, UnlockSnapshot & DescribeLockedSnapshots APIs to manage lock configuration for snapshots. The release also includes the dl2q_24xlarge. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.133.0 (2023-11-13) - -* **Feature**: Adds the new EC2 DescribeInstanceTopology API, which you can use to retrieve the network topology of your running instances on select platform types to determine their relative proximity to each other. - -# v1.132.0 (2023-11-10) - -* **Feature**: EC2 adds API updates to enable ENA Express at instance launch time. - -# v1.131.0 (2023-11-09.2) - -* **Feature**: AWS EBS now supports Block Public Access for EBS Snapshots. This release introduces the EnableSnapshotBlockPublicAccess, DisableSnapshotBlockPublicAccess and GetSnapshotBlockPublicAccessState APIs to manage account-level public access settings for EBS Snapshots in an AWS Region. - -# v1.130.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.130.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.129.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Feature**: Capacity Blocks for ML are a new EC2 purchasing option for reserving GPU instances on a future date to support short duration machine learning (ML) workloads. Capacity Blocks automatically place instances close together inside Amazon EC2 UltraClusters for low-latency, high-throughput networking. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.128.0 (2023-10-26) - -* **Feature**: Launching GetSecurityGroupsForVpc API. This API gets security groups that can be associated by the AWS account making the request with network interfaces in the specified VPC. - -# v1.127.0 (2023-10-24) - -* **Feature**: This release updates the documentation for InstanceInterruptionBehavior and HibernationOptionsRequest to more accurately describe the behavior of these two parameters when using Spot hibernation. - -# v1.126.0 (2023-10-19) - -* **Feature**: Amazon EC2 C7a instances, powered by 4th generation AMD EPYC processors, are ideal for high performance, compute-intensive workloads such as high performance computing. Amazon EC2 R7i instances are next-generation memory optimized and powered by custom 4th Generation Intel Xeon Scalable processors. - -# v1.125.0 (2023-10-12) - -* **Feature**: This release adds Ubuntu Pro as a supported platform for On-Demand Capacity Reservations and adds support for setting an Amazon Machine Image (AMI) to disabled state. Disabling the AMI makes it private if it was previously shared, and prevents new EC2 instance launches from it. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.124.0 (2023-10-06) - -* **Feature**: Documentation updates for Elastic Compute Cloud (EC2). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.123.0 (2023-10-02) - -* **Feature**: Introducing Amazon EC2 R7iz instances with 3.9 GHz sustained all-core turbo frequency and deliver up to 20% better performance than previous generation z1d instances. - -# v1.122.0 (2023-09-28) - -* **Feature**: Adds support for Customer Managed Key encryption for Amazon Verified Access resources - -# v1.121.0 (2023-09-26) - -* **Feature**: The release includes AWS verified access to support FIPs compliance in North America regions - -# v1.120.0 (2023-09-22) - -* **Feature**: EC2 M2 Pro Mac instances are powered by Apple M2 Pro Mac Mini computers featuring 12 core CPU, 19 core GPU, 32 GiB of memory, and 16 core Apple Neural Engine and uniquely enabled by the AWS Nitro System through high-speed Thunderbolt connections. - -# v1.119.0 (2023-09-19) - -* **Feature**: This release adds support for C7i, and R7a instance types. - -# v1.118.0 (2023-09-12) - -* **Feature**: This release adds support for restricting public sharing of AMIs through AMI Block Public Access - -# v1.117.0 (2023-09-06) - -* **Feature**: This release adds 'outpost' location type to the DescribeInstanceTypeOfferings API, allowing customers that have been allowlisted for outpost to query their offerings in the API. - -# v1.116.0 (2023-09-05) - -* **Feature**: Introducing Amazon EC2 C7gd, M7gd, and R7gd Instances with up to 3.8 TB of local NVMe-based SSD block-level storage. These instances are powered by AWS Graviton3 processors, delivering up to 25% better performance over Graviton2-based instances. - -# v1.115.0 (2023-08-24) - -* **Feature**: Amazon EC2 M7a instances, powered by 4th generation AMD EPYC processors, deliver up to 50% higher performance compared to M6a instances. Amazon EC2 Hpc7a instances, powered by 4th Gen AMD EPYC processors, deliver up to 2.5x better performance compared to Amazon EC2 Hpc6a instances. - -# v1.114.0 (2023-08-21) - -* **Feature**: The DeleteKeyPair API has been updated to return the keyPairId when an existing key pair is deleted. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.113.1 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.113.0 (2023-08-17) - -* **Feature**: Adds support for SubnetConfigurations to allow users to select their own IPv4 and IPv6 addresses for Interface VPC endpoints -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.112.0 (2023-08-15) - -* **Feature**: Documentation updates for Elastic Compute Cloud (EC2). - -# v1.111.0 (2023-08-11) - -* **Feature**: Amazon EC2 P5 instances, powered by the latest NVIDIA H100 Tensor Core GPUs, deliver the highest performance in EC2 for deep learning (DL) and HPC applications. M7i-flex and M7i instances are next-generation general purpose instances powered by custom 4th Generation Intel Xeon Scalable processors. - -# v1.110.1 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.110.0 (2023-08-03) - -* **Feature**: This release adds new parameter isPrimaryIPv6 to allow assigning an IPv6 address as a primary IPv6 address to a network interface which cannot be changed to give equivalent functionality available for network interfaces with primary IPv4 address. - -# v1.109.1 (2023-08-01) - -* No change notes available for this release. - -# v1.109.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.108.1 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.108.0 (2023-07-27) - -* **Feature**: SDK and documentation updates for Amazon Elastic Block Store APIs - -# v1.107.0 (2023-07-25) - -* **Feature**: This release adds an instance's peak and baseline network bandwidth as well as the memory sizes of an instance's inference accelerators to DescribeInstanceTypes. - -# v1.106.0 (2023-07-24) - -* **Feature**: Add "disabled" enum value to SpotInstanceState. - -# v1.105.1 (2023-07-19) - -* **Documentation**: Amazon EC2 documentation updates. - -# v1.105.0 (2023-07-17) - -* **Feature**: Add Nitro TPM support on DescribeInstanceTypes - -# v1.104.0 (2023-07-13) - -* **Feature**: This release adds support for the C7gn and Hpc7g instances. C7gn instances are powered by AWS Graviton3 processors and the fifth-generation AWS Nitro Cards. Hpc7g instances are powered by AWS Graviton 3E processors and provide up to 200 Gbps network bandwidth. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.103.0 (2023-07-06) - -* **Feature**: Add Nitro Enclaves support on DescribeInstanceTypes - -# v1.102.0 (2023-06-20) - -* **Feature**: Adds support for targeting Dedicated Host allocations by assetIds in AWS Outposts - -# v1.101.0 (2023-06-19) - -* **Feature**: API changes to AWS Verified Access to include data from trust providers in logs - -# v1.100.1 (2023-06-15) - -* No change notes available for this release. - -# v1.100.0 (2023-06-13) - -* **Feature**: This release introduces a new feature, EC2 Instance Connect Endpoint, that enables you to connect to a resource over TCP, without requiring the resource to have a public IPv4 address. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.99.0 (2023-06-05) - -* **Feature**: Making InstanceTagAttribute as the required parameter for the DeregisterInstanceEventNotificationAttributes and RegisterInstanceEventNotificationAttributes APIs. - -# v1.98.0 (2023-05-18) - -* **Feature**: Add support for i4g.large, i4g.xlarge, i4g.2xlarge, i4g.4xlarge, i4g.8xlarge and i4g.16xlarge instances powered by AWS Graviton2 processors that deliver up to 15% better compute performance than our other storage-optimized instances. - -# v1.97.0 (2023-05-05) - -* **Feature**: This release adds support the inf2 and trn1n instances. inf2 instances are purpose built for deep learning inference while trn1n instances are powered by AWS Trainium accelerators and they build on the capabilities of Trainium-powered trn1 instances. - -# v1.96.1 (2023-05-04) - -* No change notes available for this release. - -# v1.96.0 (2023-05-03) - -* **Feature**: Adds an SDK paginator for GetNetworkInsightsAccessScopeAnalysisFindings - -# v1.95.0 (2023-04-27) - -* **Feature**: This release adds support for AMD SEV-SNP on EC2 instances. - -# v1.94.0 (2023-04-24) - -* **Feature**: API changes to AWS Verified Access related to identity providers' information. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.93.2 (2023-04-10) - -* No change notes available for this release. - -# v1.93.1 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.93.0 (2023-04-04) - -* **Feature**: C6in, M6in, M6idn, R6in and R6idn bare metal instances are powered by 3rd Generation Intel Xeon Scalable processors and offer up to 200 Gbps of network bandwidth. - -# v1.92.1 (2023-03-31) - -* **Documentation**: Documentation updates for EC2 On Demand Capacity Reservations - -# v1.92.0 (2023-03-30) - -* **Feature**: This release adds support for Tunnel Endpoint Lifecycle control, a new feature that provides Site-to-Site VPN customers with better visibility and control of their VPN tunnel maintenance updates. - -# v1.91.0 (2023-03-21) - -* **Feature**: This release adds support for AWS Network Firewall, AWS PrivateLink, and Gateway Load Balancers to Amazon VPC Reachability Analyzer, and it makes the path destination optional as long as a destination address in the filter at source is provided. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.90.0 (2023-03-14) - -* **Feature**: This release adds a new DnsOptions key (PrivateDnsOnlyForInboundResolverEndpoint) to CreateVpcEndpoint and ModifyVpcEndpoint APIs. - -# v1.89.1 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.89.0 (2023-03-08) - -* **Feature**: Introducing Amazon EC2 C7g, M7g and R7g instances, powered by the latest generation AWS Graviton3 processors and deliver up to 25% better performance over Graviton2-based instances. - -# v1.88.0 (2023-03-03) - -* **Feature**: This release adds support for a new boot mode for EC2 instances called 'UEFI Preferred'. - -# v1.87.0 (2023-02-28) - -* **Feature**: This release allows IMDS support to be set to v2-only on an existing AMI, so that all future instances launched from that AMI will use IMDSv2 by default. - -# v1.86.1 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.86.0 (2023-02-14) - -* **Feature**: With this release customers can turn host maintenance on or off when allocating or modifying a supported dedicated host. Host maintenance is turned on by default for supported hosts. - -# v1.85.0 (2023-02-10) - -* **Feature**: Adds support for waiters that automatically poll for an imported snapshot until it reaches the completed state. - -# v1.84.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade smithy to 1.27.2 and correct empty query list serialization. - -# v1.84.0 (2023-02-02) - -* **Feature**: Documentation updates for EC2. - -# v1.83.0 (2023-01-31) - -* **Feature**: This launch allows customers to associate up to 8 IP addresses to their NAT Gateways to increase the limit on concurrent connections to a single destination by eight times from 55K to 440K. - -# v1.82.0 (2023-01-30) - -* **Feature**: We add Prefix Lists as a new route destination option for LocalGatewayRoutes. This will allow customers to create routes to Prefix Lists. Prefix List routes will allow customers to group individual CIDR routes with the same target into a single route. - -# v1.81.0 (2023-01-25) - -* **Feature**: This release adds new functionality that allows customers to provision IPv6 CIDR blocks through Amazon VPC IP Address Manager (IPAM) as well as allowing customers to utilize IPAM Resource Discovery APIs. - -# v1.80.1 (2023-01-23) - -* No change notes available for this release. - -# v1.80.0 (2023-01-20) - -* **Feature**: C6in, M6in, M6idn, R6in and R6idn instances are powered by 3rd Generation Intel Xeon Scalable processors (code named Ice Lake) with an all-core turbo frequency of 3.5 GHz. - -# v1.79.0 (2023-01-19) - -* **Feature**: Adds SSM Parameter Resource Aliasing support to EC2 Launch Templates. Launch Templates can now store parameter aliases in place of AMI Resource IDs. CreateLaunchTemplateVersion and DescribeLaunchTemplateVersions now support a convenience flag, ResolveAlias, to return the resolved parameter value. - -# v1.78.0 (2023-01-13) - -* **Feature**: Documentation updates for EC2. - -# v1.77.0 (2022-12-20) - -* **Feature**: Adds support for pagination in the EC2 DescribeImages API. - -# v1.76.1 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.76.0 (2022-12-12) - -* **Feature**: This release updates DescribeFpgaImages to show supported instance types of AFIs in its response. - -# v1.75.0 (2022-12-05) - -* **Feature**: Documentation updates for EC2. - -# v1.74.1 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.74.0 (2022-11-29.2) - -* **Feature**: This release adds support for AWS Verified Access and the Hpc6id Amazon EC2 compute optimized instance type, which features 3rd generation Intel Xeon Scalable processors. - -# v1.73.0 (2022-11-29) - -* **Feature**: Introduces ENA Express, which uses AWS SRD and dynamic routing to increase throughput and minimize latency, adds support for trust relationships between Reachability Analyzer and AWS Organizations to enable cross-account analysis, and adds support for Infrastructure Performance metric subscriptions. - -# v1.72.1 (2022-11-22) - -* No change notes available for this release. - -# v1.72.0 (2022-11-18) - -* **Feature**: This release adds support for copying an Amazon Machine Image's tags when copying an AMI. - -# v1.71.0 (2022-11-17) - -* **Feature**: This release adds a new optional parameter "privateIpAddress" for the CreateNatGateway API. PrivateIPAddress will allow customers to select a custom Private IPv4 address instead of having it be auto-assigned. - -# v1.70.1 (2022-11-16) - -* No change notes available for this release. - -# v1.70.0 (2022-11-10) - -* **Feature**: This release adds a new price capacity optimized allocation strategy for Spot Instances to help customers optimize provisioning of Spot Instances via EC2 Auto Scaling, EC2 Fleet, and Spot Fleet. It allocates Spot Instances based on both spare capacity availability and Spot Instance price. - -# v1.69.0 (2022-11-09) - -* **Feature**: Amazon EC2 Trn1 instances, powered by AWS Trainium chips, are purpose built for high-performance deep learning training. u-24tb1.112xlarge and u-18tb1.112xlarge High Memory instances are purpose-built to run large in-memory databases. - -# v1.68.0 (2022-11-08) - -* **Feature**: This release enables sharing of EC2 Placement Groups across accounts and within AWS Organizations using Resource Access Manager - -# v1.67.0 (2022-11-07) - -* **Feature**: This release adds support for two new attributes for attribute-based instance type selection - NetworkBandwidthGbps and AllowedInstanceTypes. - -# v1.66.0 (2022-11-04) - -* **Feature**: This release adds API support for the recipient of an AMI account share to remove shared AMI launch permissions. - -# v1.65.0 (2022-10-31) - -* **Feature**: Elastic IP transfer is a new Amazon VPC feature that allows you to transfer your Elastic IP addresses from one AWS Account to another. - -# v1.64.0 (2022-10-27) - -* **Feature**: Feature supports the replacement of instance root volume using an updated AMI without requiring customers to stop their instance. - -# v1.63.3 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.63.2 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.63.1 (2022-10-06) - -* No change notes available for this release. - -# v1.63.0 (2022-10-04) - -* **Feature**: Added EnableNetworkAddressUsageMetrics flag for ModifyVpcAttribute, DescribeVpcAttribute APIs. - -# v1.62.0 (2022-10-03) - -* **Feature**: Adding an imdsSupport attribute to EC2 AMIs - -# v1.61.0 (2022-09-29) - -* **Feature**: u-3tb1 instances are powered by Intel Xeon Platinum 8176M (Skylake) processors and are purpose-built to run large in-memory databases. - -# v1.60.0 (2022-09-23) - -* **Feature**: Letting external AWS customers provide ImageId as a Launch Template override in FleetLaunchTemplateOverridesRequest - -# v1.59.0 (2022-09-22) - -* **Feature**: Documentation updates for Amazon EC2. - -# v1.58.0 (2022-09-20) - -* **Feature**: This release adds support for blocked paths to Amazon VPC Reachability Analyzer. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.57.0 (2022-09-19) - -* **Feature**: This release adds CapacityAllocations field to DescribeCapacityReservations - -# v1.56.0 (2022-09-15) - -* **Feature**: This feature allows customers to create tags for vpc-endpoint-connections and vpc-endpoint-service-permissions. - -# v1.55.0 (2022-09-14) - -* **Feature**: Documentation updates for Amazon EC2. -* **Feature**: This release adds support to send VPC Flow Logs to kinesis-data-firehose as new destination type -* **Feature**: This update introduces API operations to manage and create local gateway route tables, CoIP pools, and VIF group associations. -* **Feature**: Two new features for local gateway route tables: support for static routes targeting Elastic Network Interfaces and direct VPC routing. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.54.4 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.54.3 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.54.2 (2022-08-30) - -* No change notes available for this release. - -# v1.54.1 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.54.0 (2022-08-22) - -* **Feature**: R6a instances are powered by 3rd generation AMD EPYC (Milan) processors delivering all-core turbo frequency of 3.6 GHz. C6id, M6id, and R6id instances are powered by 3rd generation Intel Xeon Scalable processor (Ice Lake) delivering all-core turbo frequency of 3.5 GHz. - -# v1.53.0 (2022-08-18) - -* **Feature**: This release adds support for VPN log options , a new feature allowing S2S VPN connections to send IKE activity logs to CloudWatch Logs - -# v1.52.1 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.52.0 (2022-08-10) - -* **Feature**: This release adds support for excluding specific data (non-root) volumes from multi-volume snapshot sets created from instances. - -# v1.51.3 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.51.2 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.51.1 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.51.0 (2022-07-29) - -* **Feature**: Documentation updates for Amazon EC2. - -# v1.50.1 (2022-07-28) - -* **Documentation**: Documentation updates for VM Import/Export. - -# v1.50.0 (2022-07-22) - -* **Feature**: Added support for EC2 M1 Mac instances. For more information, please visit aws.amazon.com/mac. - -# v1.49.1 (2022-07-18) - -* **Documentation**: Documentation updates for Amazon EC2. - -# v1.49.0 (2022-07-14) - -* **Feature**: This release adds flow logs for Transit Gateway to allow customers to gain deeper visibility and insights into network traffic through their Transit Gateways. - -# v1.48.0 (2022-07-11) - -* **Feature**: Build, manage, and monitor a unified global network that connects resources running across your cloud and on-premises environments using the AWS Cloud WAN APIs. - -# v1.47.2 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.47.1 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.47.0 (2022-06-28) - -* **Feature**: This release adds a new spread placement group to EC2 Placement Groups: host level spread, which spread instances between physical hosts, available to Outpost customers only. CreatePlacementGroup and DescribePlacementGroups APIs were updated with a new parameter: SpreadLevel to support this feature. - -# v1.46.0 (2022-06-21) - -* **Feature**: This release adds support for Private IP VPNs, a new feature allowing S2S VPN connections to use private ip addresses as the tunnel outside ip address over Direct Connect as transport. - -# v1.45.1 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.45.0 (2022-05-26) - -* **Feature**: C7g instances, powered by the latest generation AWS Graviton3 processors, provide the best price performance in Amazon EC2 for compute-intensive workloads. - -# v1.44.0 (2022-05-24) - -* **Feature**: Stop Protection feature enables customers to protect their instances from accidental stop actions. - -# v1.43.1 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.43.0 (2022-05-12) - -* **Feature**: This release introduces a target type Gateway Load Balancer Endpoint for mirrored traffic. Customers can now specify GatewayLoadBalancerEndpoint option during the creation of a traffic mirror target. - -# v1.42.0 (2022-05-11) - -* **Feature**: This release updates AWS PrivateLink APIs to support IPv6 for PrivateLink Services and Endpoints of type 'Interface'. - -# v1.41.0 (2022-05-10) - -* **Feature**: Added support for using NitroTPM and UEFI Secure Boot on EC2 instances. - -# v1.40.0 (2022-05-06) - -* **Feature**: Add new state values for IPAMs, IPAM Scopes, and IPAM Pools. - -# v1.39.0 (2022-05-05) - -* **Feature**: Amazon EC2 I4i instances are powered by 3rd generation Intel Xeon Scalable processors and feature up to 30 TB of local AWS Nitro SSD storage - -# v1.38.0 (2022-05-03) - -* **Feature**: Adds support for allocating Dedicated Hosts on AWS Outposts. The AllocateHosts API now accepts an OutpostArn request parameter, and the DescribeHosts API now includes an OutpostArn response parameter. - -# v1.37.0 (2022-04-28) - -* **Feature**: This release adds support to query the public key and creation date of EC2 Key Pairs. Additionally, the format (pem or ppk) of a key pair can be specified when creating a new key pair. - -# v1.36.1 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.36.0 (2022-04-22) - -* **Feature**: Adds support for waiters that automatically poll for a deleted NAT Gateway until it reaches the deleted state. - -# v1.35.1 (2022-04-14) - -* **Documentation**: Documentation updates for Amazon EC2. - -# v1.35.0 (2022-04-12) - -* **Feature**: X2idn and X2iedn instances are powered by 3rd generation Intel Xeon Scalable processors with an all-core turbo frequency up to 3.5 GHzAmazon EC2. C6a instances are powered by 3rd generation AMD EPYC processors. - -# v1.34.0 (2022-03-30) - -* **Feature**: This release simplifies the auto-recovery configuration process enabling customers to set the recovery behavior to disabled or default -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.0 (2022-03-25) - -* **Feature**: This is release adds support for Amazon VPC Reachability Analyzer to analyze path through a Transit Gateway. - -# v1.32.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.0 (2022-03-15) - -* **Feature**: Adds the Cascade parameter to the DeleteIpam API. Customers can use this parameter to automatically delete their IPAM, including non-default scopes, pools, cidrs, and allocations. There mustn't be any pools provisioned in the default public scope to use this parameter. - -# v1.31.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Feature**: Updated service client model to latest release. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.0 (2022-01-28) - -* **Feature**: Updated to latest API model. - -# v1.28.0 (2022-01-14) - -* **Feature**: Updated API models -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.0 (2022-01-07) - -* **Feature**: API client updated -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2021-12-21) - -* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. -* **Feature**: API client updated -* **Feature**: Updated to latest service endpoints - -# v1.25.0 (2021-12-02) - -* **Feature**: API client updated -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.0 (2021-11-30) - -* **Feature**: API client updated - -# v1.23.0 (2021-11-19) - -* **Feature**: API client updated -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.0 (2021-11-12) - -* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. -* **Feature**: Updated service to latest API model. -* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. - -# v1.21.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Feature**: Updated service to latest API model. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2021-10-21) - -* **Feature**: API client updated -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2021-10-11) - -* **Feature**: API client updated -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2021-09-24) - -* **Feature**: API client updated - -# v1.17.0 (2021-09-17) - -* **Feature**: Updated API client and endpoints to latest revision. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2021-09-02) - -* **Feature**: API client updated - -# v1.15.0 (2021-08-27) - -* **Feature**: Updated API model to latest revision. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2021-08-19) - -* **Feature**: API client updated -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2021-08-04) - -* **Feature**: Updated to latest API model. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2021-07-15) - -* **Feature**: Updated service model to latest version. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2021-07-01) - -* **Feature**: API client updated - -# v1.10.0 (2021-06-25) - -* **Feature**: API client updated -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2021-06-04) - -* **Feature**: Updated service client to latest API model. - -# v1.8.0 (2021-05-25) - -* **Feature**: API client updated - -# v1.7.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Feature**: Updated to latest service API model. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/LICENSE.txt deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go deleted file mode 100644 index d3fd49ffe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_client.go +++ /dev/null @@ -1,705 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - cryptorand "crypto/rand" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/protocol/query" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" - presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url" - smithy "github.com/aws/smithy-go" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "time" -) - -const ServiceID = "EC2" -const ServiceAPIVersion = "2016-11-15" - -// Client provides the API client to make operations call for Amazon Elastic -// Compute Cloud. -type Client struct { - options Options -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveIdempotencyTokenProvider(&options) - - resolveEndpointResolverV2(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { - ctx = middleware.ClearStackValues(ctx) - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) - if err != nil { - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, optFns...) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ec2", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - }) - if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -// HTTPPresignerV4 represents presigner interface used by presign url client -type HTTPPresignerV4 interface { - PresignHTTP( - ctx context.Context, credentials aws.Credentials, r *http.Request, - payloadHash string, service string, region string, signingTime time.Time, - optFns ...func(*v4.SignerOptions), - ) (url string, signedHeader http.Header, err error) -} - -// PresignOptions represents the presign client options -type PresignOptions struct { - - // ClientOptions are list of functional options to mutate client options used by - // the presign client. - ClientOptions []func(*Options) - - // Presigner is the presigner used by the presign url client - Presigner HTTPPresignerV4 -} - -func (o PresignOptions) copy() PresignOptions { - clientOptions := make([]func(*Options), len(o.ClientOptions)) - copy(clientOptions, o.ClientOptions) - o.ClientOptions = clientOptions - return o -} - -// WithPresignClientFromClientOptions is a helper utility to retrieve a function -// that takes PresignOption as input -func WithPresignClientFromClientOptions(optFns ...func(*Options)) func(*PresignOptions) { - return withPresignClientFromClientOptions(optFns).options -} - -type withPresignClientFromClientOptions []func(*Options) - -func (w withPresignClientFromClientOptions) options(o *PresignOptions) { - o.ClientOptions = append(o.ClientOptions, w...) -} - -// PresignClient represents the presign url client -type PresignClient struct { - client *Client - options PresignOptions -} - -// NewPresignClient generates a presign client using provided API Client and -// presign options -func NewPresignClient(c *Client, optFns ...func(*PresignOptions)) *PresignClient { - var options PresignOptions - for _, fn := range optFns { - fn(&options) - } - if len(options.ClientOptions) != 0 { - c = New(c.options, options.ClientOptions...) - } - - if options.Presigner == nil { - options.Presigner = newDefaultV4Signer(c.options) - } - - return &PresignClient{ - client: c, - options: options, - } -} - -func withNopHTTPClientAPIOption(o *Options) { - o.HTTPClient = smithyhttp.NopClient{} -} - -type presignContextPolyfillMiddleware struct { -} - -func (*presignContextPolyfillMiddleware) ID() string { - return "presignContextPolyfill" -} - -func (m *presignContextPolyfillMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - schemeID := rscheme.Scheme.SchemeID() - - if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" { - if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningName(ctx, sn) - } - if sr, ok := smithyhttp.GetSigV4SigningRegion(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningRegion(ctx, sr) - } - } else if schemeID == "aws.auth#sigv4a" { - if sn, ok := smithyhttp.GetSigV4ASigningName(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningName(ctx, sn) - } - if sr, ok := smithyhttp.GetSigV4ASigningRegions(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningRegion(ctx, sr[0]) - } - } - - return next.HandleFinalize(ctx, in) -} - -type presignConverter PresignOptions - -func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) { - if _, ok := stack.Finalize.Get((*acceptencodingcust.DisableGzip)(nil).ID()); ok { - stack.Finalize.Remove((*acceptencodingcust.DisableGzip)(nil).ID()) - } - if _, ok := stack.Finalize.Get((*retry.Attempt)(nil).ID()); ok { - stack.Finalize.Remove((*retry.Attempt)(nil).ID()) - } - if _, ok := stack.Finalize.Get((*retry.MetricsHeader)(nil).ID()); ok { - stack.Finalize.Remove((*retry.MetricsHeader)(nil).ID()) - } - stack.Deserialize.Clear() - stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID()) - stack.Build.Remove("UserAgent") - if err := stack.Finalize.Insert(&presignContextPolyfillMiddleware{}, "Signing", middleware.Before); err != nil { - return err - } - - pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{ - CredentialsProvider: options.Credentials, - Presigner: c.Presigner, - LogSigning: options.ClientLogMode.IsSigning(), - }) - if _, err := stack.Finalize.Swap("Signing", pmw); err != nil { - return err - } - if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { - return err - } - // convert request to a GET request - err = query.AddAsGetRequestMiddleware(stack) - if err != nil { - return err - } - err = presignedurlcust.AddAsIsPresigingMiddleware(stack) - if err != nil { - return err - } - return nil -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptAddressTransfer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptAddressTransfer.go deleted file mode 100644 index 89554466f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptAddressTransfer.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accepts an Elastic IP address transfer. For more information, see Accept a -// transferred Elastic IP address (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#using-instance-addressing-eips-transfer-accept) -// in the Amazon Virtual Private Cloud User Guide. -func (c *Client) AcceptAddressTransfer(ctx context.Context, params *AcceptAddressTransferInput, optFns ...func(*Options)) (*AcceptAddressTransferOutput, error) { - if params == nil { - params = &AcceptAddressTransferInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptAddressTransfer", params, optFns, c.addOperationAcceptAddressTransferMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptAddressTransferOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptAddressTransferInput struct { - - // The Elastic IP address you are accepting for transfer. - // - // This member is required. - Address *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // tag : - The key/value combination of a tag assigned to the resource. Use the tag - // key in the filter name and the tag value as the filter value. For example, to - // find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type AcceptAddressTransferOutput struct { - - // An Elastic IP address transfer. - AddressTransfer *types.AddressTransfer - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptAddressTransferMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptAddressTransfer{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptAddressTransfer{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptAddressTransfer"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAcceptAddressTransferValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptAddressTransfer(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptAddressTransfer(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptAddressTransfer", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go deleted file mode 100644 index e39977c00..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptReservedInstancesExchangeQuote.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accepts the Convertible Reserved Instance exchange quote described in the -// GetReservedInstancesExchangeQuote call. -func (c *Client) AcceptReservedInstancesExchangeQuote(ctx context.Context, params *AcceptReservedInstancesExchangeQuoteInput, optFns ...func(*Options)) (*AcceptReservedInstancesExchangeQuoteOutput, error) { - if params == nil { - params = &AcceptReservedInstancesExchangeQuoteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptReservedInstancesExchangeQuote", params, optFns, c.addOperationAcceptReservedInstancesExchangeQuoteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptReservedInstancesExchangeQuoteOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for accepting the quote. -type AcceptReservedInstancesExchangeQuoteInput struct { - - // The IDs of the Convertible Reserved Instances to exchange for another - // Convertible Reserved Instance of the same or higher value. - // - // This member is required. - ReservedInstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The configuration of the target Convertible Reserved Instance to exchange for - // your current Convertible Reserved Instances. - TargetConfigurations []types.TargetConfigurationRequest - - noSmithyDocumentSerde -} - -// The result of the exchange and whether it was successful . -type AcceptReservedInstancesExchangeQuoteOutput struct { - - // The ID of the successful exchange. - ExchangeId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptReservedInstancesExchangeQuoteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptReservedInstancesExchangeQuote"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAcceptReservedInstancesExchangeQuoteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptReservedInstancesExchangeQuote(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptReservedInstancesExchangeQuote(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptReservedInstancesExchangeQuote", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go deleted file mode 100644 index 8d9b5aa16..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayMulticastDomainAssociations.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accepts a request to associate subnets with a transit gateway multicast domain. -func (c *Client) AcceptTransitGatewayMulticastDomainAssociations(ctx context.Context, params *AcceptTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*Options)) (*AcceptTransitGatewayMulticastDomainAssociationsOutput, error) { - if params == nil { - params = &AcceptTransitGatewayMulticastDomainAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptTransitGatewayMulticastDomainAssociations", params, optFns, c.addOperationAcceptTransitGatewayMulticastDomainAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptTransitGatewayMulticastDomainAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptTransitGatewayMulticastDomainAssociationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of the subnets to associate with the transit gateway multicast domain. - SubnetIds []string - - // The ID of the transit gateway attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -type AcceptTransitGatewayMulticastDomainAssociationsOutput struct { - - // Information about the multicast domain associations. - Associations *types.TransitGatewayMulticastDomainAssociations - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptTransitGatewayMulticastDomainAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptTransitGatewayMulticastDomainAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptTransitGatewayMulticastDomainAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go deleted file mode 100644 index 82cfe12a2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayPeeringAttachment.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accepts a transit gateway peering attachment request. The peering attachment -// must be in the pendingAcceptance state. -func (c *Client) AcceptTransitGatewayPeeringAttachment(ctx context.Context, params *AcceptTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*AcceptTransitGatewayPeeringAttachmentOutput, error) { - if params == nil { - params = &AcceptTransitGatewayPeeringAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptTransitGatewayPeeringAttachment", params, optFns, c.addOperationAcceptTransitGatewayPeeringAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptTransitGatewayPeeringAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptTransitGatewayPeeringAttachmentInput struct { - - // The ID of the transit gateway attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AcceptTransitGatewayPeeringAttachmentOutput struct { - - // The transit gateway peering attachment. - TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptTransitGatewayPeeringAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAcceptTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptTransitGatewayPeeringAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptTransitGatewayPeeringAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go deleted file mode 100644 index dbb03c91e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptTransitGatewayVpcAttachment.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accepts a request to attach a VPC to a transit gateway. The VPC attachment must -// be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to -// view your pending VPC attachment requests. Use RejectTransitGatewayVpcAttachment -// to reject a VPC attachment request. -func (c *Client) AcceptTransitGatewayVpcAttachment(ctx context.Context, params *AcceptTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*AcceptTransitGatewayVpcAttachmentOutput, error) { - if params == nil { - params = &AcceptTransitGatewayVpcAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptTransitGatewayVpcAttachment", params, optFns, c.addOperationAcceptTransitGatewayVpcAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptTransitGatewayVpcAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptTransitGatewayVpcAttachmentInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AcceptTransitGatewayVpcAttachmentOutput struct { - - // The VPC attachment. - TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptTransitGatewayVpcAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAcceptTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptTransitGatewayVpcAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptTransitGatewayVpcAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcEndpointConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcEndpointConnections.go deleted file mode 100644 index 5005bec1f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcEndpointConnections.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accepts connection requests to your VPC endpoint service. -func (c *Client) AcceptVpcEndpointConnections(ctx context.Context, params *AcceptVpcEndpointConnectionsInput, optFns ...func(*Options)) (*AcceptVpcEndpointConnectionsOutput, error) { - if params == nil { - params = &AcceptVpcEndpointConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptVpcEndpointConnections", params, optFns, c.addOperationAcceptVpcEndpointConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptVpcEndpointConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptVpcEndpointConnectionsInput struct { - - // The ID of the VPC endpoint service. - // - // This member is required. - ServiceId *string - - // The IDs of the interface VPC endpoints. - // - // This member is required. - VpcEndpointIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AcceptVpcEndpointConnectionsOutput struct { - - // Information about the interface endpoints that were not accepted, if applicable. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptVpcEndpointConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptVpcEndpointConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptVpcEndpointConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptVpcEndpointConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAcceptVpcEndpointConnectionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptVpcEndpointConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptVpcEndpointConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcPeeringConnection.go deleted file mode 100644 index 6f9cb58d9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AcceptVpcPeeringConnection.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Accept a VPC peering connection request. To accept a request, the VPC peering -// connection must be in the pending-acceptance state, and you must be the owner -// of the peer VPC. Use DescribeVpcPeeringConnections to view your outstanding VPC -// peering connection requests. For an inter-Region VPC peering connection request, -// you must accept the VPC peering connection in the Region of the accepter VPC. -func (c *Client) AcceptVpcPeeringConnection(ctx context.Context, params *AcceptVpcPeeringConnectionInput, optFns ...func(*Options)) (*AcceptVpcPeeringConnectionOutput, error) { - if params == nil { - params = &AcceptVpcPeeringConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AcceptVpcPeeringConnection", params, optFns, c.addOperationAcceptVpcPeeringConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AcceptVpcPeeringConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AcceptVpcPeeringConnectionInput struct { - - // The ID of the VPC peering connection. You must specify this parameter in the - // request. - // - // This member is required. - VpcPeeringConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AcceptVpcPeeringConnectionOutput struct { - - // Information about the VPC peering connection. - VpcPeeringConnection *types.VpcPeeringConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAcceptVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAcceptVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAcceptVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptVpcPeeringConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAcceptVpcPeeringConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptVpcPeeringConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAcceptVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AcceptVpcPeeringConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AdvertiseByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AdvertiseByoipCidr.go deleted file mode 100644 index a292612a1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AdvertiseByoipCidr.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Advertises an IPv4 or IPv6 address range that is provisioned for use with your -// Amazon Web Services resources through bring your own IP addresses (BYOIP). You -// can perform this operation at most once every 10 seconds, even if you specify -// different address ranges each time. We recommend that you stop advertising the -// BYOIP CIDR from other locations when you advertise it from Amazon Web Services. -// To minimize down time, you can configure your Amazon Web Services resources to -// use an address from a BYOIP CIDR before it is advertised, and then -// simultaneously stop advertising it from the current location and start -// advertising it through Amazon Web Services. It can take a few minutes before -// traffic to the specified addresses starts routing to Amazon Web Services because -// of BGP propagation delays. To stop advertising the BYOIP CIDR, use -// WithdrawByoipCidr . -func (c *Client) AdvertiseByoipCidr(ctx context.Context, params *AdvertiseByoipCidrInput, optFns ...func(*Options)) (*AdvertiseByoipCidrOutput, error) { - if params == nil { - params = &AdvertiseByoipCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AdvertiseByoipCidr", params, optFns, c.addOperationAdvertiseByoipCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AdvertiseByoipCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AdvertiseByoipCidrInput struct { - - // The address range, in CIDR notation. This must be the exact range that you - // provisioned. You can't advertise only a portion of the provisioned range. - // - // This member is required. - Cidr *string - - // The public 2-byte or 4-byte ASN that you want to advertise. - Asn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // If you have Local Zones (https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html) - // enabled, you can choose a network border group for Local Zones when you - // provision and advertise a BYOIPv4 CIDR. Choose the network border group - // carefully as the EIP and the Amazon Web Services resource it is associated with - // must reside in the same network border group. You can provision BYOIP address - // ranges to and advertise them in the following Local Zone network border groups: - // - us-east-1-dfw-2 - // - us-west-2-lax-1 - // - us-west-2-phx-2 - // You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this - // time. - NetworkBorderGroup *string - - noSmithyDocumentSerde -} - -type AdvertiseByoipCidrOutput struct { - - // Information about the address range. - ByoipCidr *types.ByoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAdvertiseByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAdvertiseByoipCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAdvertiseByoipCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AdvertiseByoipCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAdvertiseByoipCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAdvertiseByoipCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAdvertiseByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AdvertiseByoipCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go deleted file mode 100644 index 08ef056cd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateAddress.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Allocates an Elastic IP address to your Amazon Web Services account. After you -// allocate the Elastic IP address you can associate it with an instance or network -// interface. After you release an Elastic IP address, it is released to the IP -// address pool and can be allocated to a different Amazon Web Services account. -// You can allocate an Elastic IP address from an address pool owned by Amazon Web -// Services or from an address pool created from a public IPv4 address range that -// you have brought to Amazon Web Services for use with your Amazon Web Services -// resources using bring your own IP addresses (BYOIP). For more information, see -// Bring Your Own IP Addresses (BYOIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) -// in the Amazon Elastic Compute Cloud User Guide. If you release an Elastic IP -// address, you might be able to recover it. You cannot recover an Elastic IP -// address that you released after it is allocated to another Amazon Web Services -// account. To attempt to recover an Elastic IP address that you released, specify -// it in this operation. For more information, see Elastic IP Addresses (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. You can allocate a carrier IP -// address which is a public IP address from a telecommunication carrier, to a -// network interface which resides in a subnet in a Wavelength Zone (for example an -// EC2 instance). -func (c *Client) AllocateAddress(ctx context.Context, params *AllocateAddressInput, optFns ...func(*Options)) (*AllocateAddressOutput, error) { - if params == nil { - params = &AllocateAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AllocateAddress", params, optFns, c.addOperationAllocateAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AllocateAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AllocateAddressInput struct { - - // The Elastic IP address to recover or an IPv4 address from an address pool. - Address *string - - // The ID of a customer-owned address pool. Use this parameter to let Amazon EC2 - // select an address from the address pool. Alternatively, specify a specific - // address from the address pool. - CustomerOwnedIpv4Pool *string - - // The network ( vpc ). - Domain types.DomainType - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // A unique set of Availability Zones, Local Zones, or Wavelength Zones from which - // Amazon Web Services advertises IP addresses. Use this parameter to limit the IP - // address to this location. IP addresses cannot move between network border - // groups. Use DescribeAvailabilityZones (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) - // to view the network border groups. - NetworkBorderGroup *string - - // The ID of an address pool that you own. Use this parameter to let Amazon EC2 - // select an address from the address pool. To specify a specific address from the - // address pool, use the Address parameter instead. - PublicIpv4Pool *string - - // The tags to assign to the Elastic IP address. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type AllocateAddressOutput struct { - - // The ID that represents the allocation of the Elastic IP address. - AllocationId *string - - // The carrier IP address. This option is only available for network interfaces - // that reside in a subnet in a Wavelength Zone. - CarrierIp *string - - // The customer-owned IP address. - CustomerOwnedIp *string - - // The ID of the customer-owned address pool. - CustomerOwnedIpv4Pool *string - - // The network ( vpc ). - Domain types.DomainType - - // The set of Availability Zones, Local Zones, or Wavelength Zones from which - // Amazon Web Services advertises IP addresses. - NetworkBorderGroup *string - - // The Elastic IP address. - PublicIp *string - - // The ID of an address pool. - PublicIpv4Pool *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAllocateAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAllocateAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAllocateAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AllocateAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllocateAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAllocateAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AllocateAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateHosts.go deleted file mode 100644 index d4976b031..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateHosts.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Allocates a Dedicated Host to your account. At a minimum, specify the supported -// instance type or instance family, the Availability Zone in which to allocate the -// host, and the number of hosts to allocate. -func (c *Client) AllocateHosts(ctx context.Context, params *AllocateHostsInput, optFns ...func(*Options)) (*AllocateHostsOutput, error) { - if params == nil { - params = &AllocateHostsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AllocateHosts", params, optFns, c.addOperationAllocateHostsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AllocateHostsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AllocateHostsInput struct { - - // The Availability Zone in which to allocate the Dedicated Host. - // - // This member is required. - AvailabilityZone *string - - // The IDs of the Outpost hardware assets on which to allocate the Dedicated - // Hosts. Targeting specific hardware assets on an Outpost can help to minimize - // latency between your workloads. This parameter is supported only if you specify - // OutpostArn. If you are allocating the Dedicated Hosts in a Region, omit this - // parameter. - // - If you specify this parameter, you can omit Quantity. In this case, Amazon - // EC2 allocates a Dedicated Host on each specified hardware asset. - // - If you specify both AssetIds and Quantity, then the value for Quantity must - // be equal to the number of asset IDs specified. - AssetIds []string - - // Indicates whether the host accepts any untargeted instance launches that match - // its instance type configuration, or if it only accepts Host tenancy instance - // launches that specify its unique host ID. For more information, see - // Understanding auto-placement and affinity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding) - // in the Amazon EC2 User Guide. Default: on - AutoPlacement types.AutoPlacement - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Indicates whether to enable or disable host maintenance for the Dedicated Host. - // For more information, see Host maintenance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html) - // in the Amazon EC2 User Guide. - HostMaintenance types.HostMaintenance - - // Indicates whether to enable or disable host recovery for the Dedicated Host. - // Host recovery is disabled by default. For more information, see Host recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) - // in the Amazon EC2 User Guide. Default: off - HostRecovery types.HostRecovery - - // Specifies the instance family to be supported by the Dedicated Hosts. If you - // specify an instance family, the Dedicated Hosts support multiple instance types - // within that instance family. If you want the Dedicated Hosts to support a - // specific instance type only, omit this parameter and specify InstanceType - // instead. You cannot specify InstanceFamily and InstanceType in the same request. - InstanceFamily *string - - // Specifies the instance type to be supported by the Dedicated Hosts. If you - // specify an instance type, the Dedicated Hosts support instances of the specified - // instance type only. If you want the Dedicated Hosts to support multiple instance - // types in a specific instance family, omit this parameter and specify - // InstanceFamily instead. You cannot specify InstanceType and InstanceFamily in - // the same request. - InstanceType *string - - // The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which to - // allocate the Dedicated Host. If you specify OutpostArn, you can optionally - // specify AssetIds. If you are allocating the Dedicated Host in a Region, omit - // this parameter. - OutpostArn *string - - // The number of Dedicated Hosts to allocate to your account with these - // parameters. If you are allocating the Dedicated Hosts on an Outpost, and you - // specify AssetIds, you can omit this parameter. In this case, Amazon EC2 - // allocates a Dedicated Host on each specified hardware asset. If you specify both - // AssetIds and Quantity, then the value that you specify for Quantity must be - // equal to the number of asset IDs specified. - Quantity *int32 - - // The tags to apply to the Dedicated Host during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -// Contains the output of AllocateHosts. -type AllocateHostsOutput struct { - - // The ID of the allocated Dedicated Host. This is used to launch an instance onto - // a specific host. - HostIds []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAllocateHostsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAllocateHosts{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAllocateHosts{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AllocateHosts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAllocateHostsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllocateHosts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAllocateHosts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AllocateHosts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateIpamPoolCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateIpamPoolCidr.go deleted file mode 100644 index c3d7694c9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AllocateIpamPoolCidr.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Allocate a CIDR from an IPAM pool. The Region you use should be the IPAM pool -// locale. The locale is the Amazon Web Services Region where this IPAM pool is -// available for allocations. In IPAM, an allocation is a CIDR assignment from an -// IPAM pool to another IPAM pool or to a resource. For more information, see -// Allocate CIDRs (https://docs.aws.amazon.com/vpc/latest/ipam/allocate-cidrs-ipam.html) -// in the Amazon VPC IPAM User Guide. This action creates an allocation with strong -// consistency. The returned CIDR will not overlap with any other allocations from -// the same pool. -func (c *Client) AllocateIpamPoolCidr(ctx context.Context, params *AllocateIpamPoolCidrInput, optFns ...func(*Options)) (*AllocateIpamPoolCidrOutput, error) { - if params == nil { - params = &AllocateIpamPoolCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AllocateIpamPoolCidr", params, optFns, c.addOperationAllocateIpamPoolCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AllocateIpamPoolCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AllocateIpamPoolCidrInput struct { - - // The ID of the IPAM pool from which you would like to allocate a CIDR. - // - // This member is required. - IpamPoolId *string - - // Include a particular CIDR range that can be returned by the pool. Allowed CIDRs - // are only allowed if using netmask length for allocation. - AllowedCidrs []string - - // The CIDR you would like to allocate from the IPAM pool. Note the following: - // - If there is no DefaultNetmaskLength allocation rule set on the pool, you - // must specify either the NetmaskLength or the CIDR. - // - If the DefaultNetmaskLength allocation rule is set on the pool, you can - // specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength - // allocation rule will be ignored. - // Possible values: Any available IPv4 or IPv6 CIDR. - Cidr *string - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the allocation. - Description *string - - // Exclude a particular CIDR range from being returned by the pool. Disallowed - // CIDRs are only allowed if using netmask length for allocation. - DisallowedCidrs []string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The netmask length of the CIDR you would like to allocate from the IPAM pool. - // Note the following: - // - If there is no DefaultNetmaskLength allocation rule set on the pool, you - // must specify either the NetmaskLength or the CIDR. - // - If the DefaultNetmaskLength allocation rule is set on the pool, you can - // specify either the NetmaskLength or the CIDR and the DefaultNetmaskLength - // allocation rule will be ignored. - // Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask - // lengths for IPv6 addresses are 0 - 128. - NetmaskLength *int32 - - // A preview of the next available CIDR in a pool. - PreviewNextCidr *bool - - noSmithyDocumentSerde -} - -type AllocateIpamPoolCidrOutput struct { - - // Information about the allocation created. - IpamPoolAllocation *types.IpamPoolAllocation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAllocateIpamPoolCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAllocateIpamPoolCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAllocateIpamPoolCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AllocateIpamPoolCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opAllocateIpamPoolCidrMiddleware(stack, options); err != nil { - return err - } - if err = addOpAllocateIpamPoolCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAllocateIpamPoolCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAllocateIpamPoolCidr struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAllocateIpamPoolCidr) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAllocateIpamPoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AllocateIpamPoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AllocateIpamPoolCidrInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAllocateIpamPoolCidrMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAllocateIpamPoolCidr{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAllocateIpamPoolCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AllocateIpamPoolCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go deleted file mode 100644 index 338da6c85..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Applies a security group to the association between the target network and the -// Client VPN endpoint. This action replaces the existing security groups with the -// specified security groups. -func (c *Client) ApplySecurityGroupsToClientVpnTargetNetwork(ctx context.Context, params *ApplySecurityGroupsToClientVpnTargetNetworkInput, optFns ...func(*Options)) (*ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) { - if params == nil { - params = &ApplySecurityGroupsToClientVpnTargetNetworkInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ApplySecurityGroupsToClientVpnTargetNetwork", params, optFns, c.addOperationApplySecurityGroupsToClientVpnTargetNetworkMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ApplySecurityGroupsToClientVpnTargetNetworkOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ApplySecurityGroupsToClientVpnTargetNetworkInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // The IDs of the security groups to apply to the associated target network. Up to - // 5 security groups can be applied to an associated target network. - // - // This member is required. - SecurityGroupIds []string - - // The ID of the VPC in which the associated target network is located. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ApplySecurityGroupsToClientVpnTargetNetworkOutput struct { - - // The IDs of the applied security groups. - SecurityGroupIds []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationApplySecurityGroupsToClientVpnTargetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ApplySecurityGroupsToClientVpnTargetNetwork"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpApplySecurityGroupsToClientVpnTargetNetworkValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opApplySecurityGroupsToClientVpnTargetNetwork(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opApplySecurityGroupsToClientVpnTargetNetwork(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ApplySecurityGroupsToClientVpnTargetNetwork", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignIpv6Addresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignIpv6Addresses.go deleted file mode 100644 index 1f4dd2982..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignIpv6Addresses.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Assigns one or more IPv6 addresses to the specified network interface. You can -// specify one or more specific IPv6 addresses, or you can specify the number of -// IPv6 addresses to be automatically assigned from within the subnet's IPv6 CIDR -// block range. You can assign as many IPv6 addresses to a network interface as you -// can assign private IPv4 addresses, and the limit varies per instance type. For -// information, see IP Addresses Per Network Interface Per Instance Type (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) -// in the Amazon Elastic Compute Cloud User Guide. You must specify either the IPv6 -// addresses or the IPv6 address count in the request. You can optionally use -// Prefix Delegation on the network interface. You must specify either the IPV6 -// Prefix Delegation prefixes, or the IPv6 Prefix Delegation count. For -// information, see Assigning prefixes to Amazon EC2 network interfaces (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) AssignIpv6Addresses(ctx context.Context, params *AssignIpv6AddressesInput, optFns ...func(*Options)) (*AssignIpv6AddressesOutput, error) { - if params == nil { - params = &AssignIpv6AddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssignIpv6Addresses", params, optFns, c.addOperationAssignIpv6AddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssignIpv6AddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssignIpv6AddressesInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // The number of additional IPv6 addresses to assign to the network interface. The - // specified number of IPv6 addresses are assigned in addition to the existing IPv6 - // addresses that are already assigned to the network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't use - // this option if specifying specific IPv6 addresses. - Ipv6AddressCount *int32 - - // The IPv6 addresses to be assigned to the network interface. You can't use this - // option if you're specifying a number of IPv6 addresses. - Ipv6Addresses []string - - // The number of IPv6 prefixes that Amazon Web Services automatically assigns to - // the network interface. You cannot use this option if you use the Ipv6Prefixes - // option. - Ipv6PrefixCount *int32 - - // One or more IPv6 prefixes assigned to the network interface. You cannot use - // this option if you use the Ipv6PrefixCount option. - Ipv6Prefixes []string - - noSmithyDocumentSerde -} - -type AssignIpv6AddressesOutput struct { - - // The new IPv6 addresses assigned to the network interface. Existing IPv6 - // addresses that were assigned to the network interface before the request are not - // included. - AssignedIpv6Addresses []string - - // The IPv6 prefixes that are assigned to the network interface. - AssignedIpv6Prefixes []string - - // The ID of the network interface. - NetworkInterfaceId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssignIpv6AddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssignIpv6Addresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssignIpv6Addresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssignIpv6Addresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssignIpv6AddressesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssignIpv6Addresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssignIpv6Addresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssignIpv6Addresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateIpAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateIpAddresses.go deleted file mode 100644 index 4ca7798ca..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateIpAddresses.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Assigns one or more secondary private IP addresses to the specified network -// interface. You can specify one or more specific secondary IP addresses, or you -// can specify the number of secondary IP addresses to be automatically assigned -// within the subnet's CIDR block range. The number of secondary IP addresses that -// you can assign to an instance varies by instance type. For information about -// instance types, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) -// in the Amazon Elastic Compute Cloud User Guide. For more information about -// Elastic IP addresses, see Elastic IP Addresses (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html) -// in the Amazon Elastic Compute Cloud User Guide. When you move a secondary -// private IP address to another network interface, any Elastic IP address that is -// associated with the IP address is also moved. Remapping an IP address is an -// asynchronous operation. When you move an IP address from one network interface -// to another, check network/interfaces/macs/mac/local-ipv4s in the instance -// metadata to confirm that the remapping is complete. You must specify either the -// IP addresses or the IP address count in the request. You can optionally use -// Prefix Delegation on the network interface. You must specify either the IPv4 -// Prefix Delegation prefixes, or the IPv4 Prefix Delegation count. For -// information, see Assigning prefixes to Amazon EC2 network interfaces (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) AssignPrivateIpAddresses(ctx context.Context, params *AssignPrivateIpAddressesInput, optFns ...func(*Options)) (*AssignPrivateIpAddressesOutput, error) { - if params == nil { - params = &AssignPrivateIpAddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssignPrivateIpAddresses", params, optFns, c.addOperationAssignPrivateIpAddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssignPrivateIpAddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for AssignPrivateIpAddresses. -type AssignPrivateIpAddressesInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // Indicates whether to allow an IP address that is already assigned to another - // network interface or instance to be reassigned to the specified network - // interface. - AllowReassignment *bool - - // The number of IPv4 prefixes that Amazon Web Services automatically assigns to - // the network interface. You cannot use this option if you use the Ipv4 Prefixes - // option. - Ipv4PrefixCount *int32 - - // One or more IPv4 prefixes assigned to the network interface. You cannot use - // this option if you use the Ipv4PrefixCount option. - Ipv4Prefixes []string - - // The IP addresses to be assigned as a secondary private IP address to the - // network interface. You can't specify this parameter when also specifying a - // number of secondary IP addresses. If you don't specify an IP address, Amazon EC2 - // automatically selects an IP address within the subnet range. - PrivateIpAddresses []string - - // The number of secondary IP addresses to assign to the network interface. You - // can't specify this parameter when also specifying private IP addresses. - SecondaryPrivateIpAddressCount *int32 - - noSmithyDocumentSerde -} - -type AssignPrivateIpAddressesOutput struct { - - // The IPv4 prefixes that are assigned to the network interface. - AssignedIpv4Prefixes []types.Ipv4PrefixSpecification - - // The private IP addresses assigned to the network interface. - AssignedPrivateIpAddresses []types.AssignedPrivateIpAddress - - // The ID of the network interface. - NetworkInterfaceId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssignPrivateIpAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssignPrivateIpAddresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssignPrivateIpAddresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssignPrivateIpAddresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssignPrivateIpAddressesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssignPrivateIpAddresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssignPrivateIpAddresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssignPrivateIpAddresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go deleted file mode 100644 index 711237e03..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssignPrivateNatGatewayAddress.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Assigns one or more private IPv4 addresses to a private NAT gateway. For more -// information, see Work with NAT gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-working-with) -// in the Amazon VPC User Guide. -func (c *Client) AssignPrivateNatGatewayAddress(ctx context.Context, params *AssignPrivateNatGatewayAddressInput, optFns ...func(*Options)) (*AssignPrivateNatGatewayAddressOutput, error) { - if params == nil { - params = &AssignPrivateNatGatewayAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssignPrivateNatGatewayAddress", params, optFns, c.addOperationAssignPrivateNatGatewayAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssignPrivateNatGatewayAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssignPrivateNatGatewayAddressInput struct { - - // The ID of the NAT gateway. - // - // This member is required. - NatGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The number of private IP addresses to assign to the NAT gateway. You can't - // specify this parameter when also specifying private IP addresses. - PrivateIpAddressCount *int32 - - // The private IPv4 addresses you want to assign to the private NAT gateway. - PrivateIpAddresses []string - - noSmithyDocumentSerde -} - -type AssignPrivateNatGatewayAddressOutput struct { - - // NAT gateway IP addresses. - NatGatewayAddresses []types.NatGatewayAddress - - // The ID of the NAT gateway. - NatGatewayId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssignPrivateNatGatewayAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssignPrivateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssignPrivateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssignPrivateNatGatewayAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssignPrivateNatGatewayAddressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssignPrivateNatGatewayAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssignPrivateNatGatewayAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssignPrivateNatGatewayAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateAddress.go deleted file mode 100644 index b298b04be..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateAddress.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates an Elastic IP address, or carrier IP address (for instances that are -// in subnets in Wavelength Zones) with an instance or a network interface. Before -// you can use an Elastic IP address, you must allocate it to your account. If the -// Elastic IP address is already associated with a different instance, it is -// disassociated from that instance and associated with the specified instance. If -// you associate an Elastic IP address with an instance that has an existing -// Elastic IP address, the existing address is disassociated from the instance, but -// remains allocated to your account. [Subnets in Wavelength Zones] You can -// associate an IP address from the telecommunication carrier to the instance or -// network interface. You cannot associate an Elastic IP address with an interface -// in a different network border group. This is an idempotent operation. If you -// perform the operation more than once, Amazon EC2 doesn't return an error, and -// you may be charged for each time the Elastic IP address is remapped to the same -// instance. For more information, see the Elastic IP Addresses section of Amazon -// EC2 Pricing (http://aws.amazon.com/ec2/pricing/) . -func (c *Client) AssociateAddress(ctx context.Context, params *AssociateAddressInput, optFns ...func(*Options)) (*AssociateAddressOutput, error) { - if params == nil { - params = &AssociateAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateAddress", params, optFns, c.addOperationAssociateAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateAddressInput struct { - - // The allocation ID. This is required. - AllocationId *string - - // Reassociation is automatic, but you can specify false to ensure the operation - // fails if the Elastic IP address is already associated with another resource. - AllowReassociation *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the instance. The instance must have exactly one attached network - // interface. You can specify either the instance ID or the network interface ID, - // but not both. - InstanceId *string - - // The ID of the network interface. If the instance has more than one network - // interface, you must specify a network interface ID. You can specify either the - // instance ID or the network interface ID, but not both. - NetworkInterfaceId *string - - // The primary or secondary private IP address to associate with the Elastic IP - // address. If no private IP address is specified, the Elastic IP address is - // associated with the primary private IP address. - PrivateIpAddress *string - - // Deprecated. - PublicIp *string - - noSmithyDocumentSerde -} - -type AssociateAddressOutput struct { - - // The ID that represents the association of the Elastic IP address with an - // instance. - AssociationId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateClientVpnTargetNetwork.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateClientVpnTargetNetwork.go deleted file mode 100644 index 1df789763..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateClientVpnTargetNetwork.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates a target network with a Client VPN endpoint. A target network is a -// subnet in a VPC. You can associate multiple subnets from the same VPC with a -// Client VPN endpoint. You can associate only one subnet in each Availability -// Zone. We recommend that you associate at least two subnets to provide -// Availability Zone redundancy. If you specified a VPC when you created the Client -// VPN endpoint or if you have previous subnet associations, the specified subnet -// must be in the same VPC. To specify a subnet that's in a different VPC, you must -// first modify the Client VPN endpoint ( ModifyClientVpnEndpoint ) and change the -// VPC that's associated with it. -func (c *Client) AssociateClientVpnTargetNetwork(ctx context.Context, params *AssociateClientVpnTargetNetworkInput, optFns ...func(*Options)) (*AssociateClientVpnTargetNetworkOutput, error) { - if params == nil { - params = &AssociateClientVpnTargetNetworkInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateClientVpnTargetNetwork", params, optFns, c.addOperationAssociateClientVpnTargetNetworkMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateClientVpnTargetNetworkOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateClientVpnTargetNetworkInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // The ID of the subnet to associate with the Client VPN endpoint. - // - // This member is required. - SubnetId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateClientVpnTargetNetworkOutput struct { - - // The unique ID of the target network association. - AssociationId *string - - // The current state of the target network association. - Status *types.AssociationStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateClientVpnTargetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateClientVpnTargetNetwork{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateClientVpnTargetNetwork{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateClientVpnTargetNetwork"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opAssociateClientVpnTargetNetworkMiddleware(stack, options); err != nil { - return err - } - if err = addOpAssociateClientVpnTargetNetworkValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateClientVpnTargetNetwork(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAssociateClientVpnTargetNetwork struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAssociateClientVpnTargetNetwork) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAssociateClientVpnTargetNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AssociateClientVpnTargetNetworkInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateClientVpnTargetNetworkInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAssociateClientVpnTargetNetworkMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateClientVpnTargetNetwork{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAssociateClientVpnTargetNetwork(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateClientVpnTargetNetwork", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateDhcpOptions.go deleted file mode 100644 index 844e2ee9f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateDhcpOptions.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates a set of DHCP options (that you've previously created) with the -// specified VPC, or associates no DHCP options with the VPC. After you associate -// the options with the VPC, any existing instances and all new instances that you -// launch in that VPC use the options. You don't need to restart or relaunch the -// instances. They automatically pick up the changes within a few hours, depending -// on how frequently the instance renews its DHCP lease. You can explicitly renew -// the lease using the operating system on the instance. For more information, see -// DHCP options sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) -// in the Amazon VPC User Guide. -func (c *Client) AssociateDhcpOptions(ctx context.Context, params *AssociateDhcpOptionsInput, optFns ...func(*Options)) (*AssociateDhcpOptionsOutput, error) { - if params == nil { - params = &AssociateDhcpOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateDhcpOptions", params, optFns, c.addOperationAssociateDhcpOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateDhcpOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateDhcpOptionsInput struct { - - // The ID of the DHCP options set, or default to associate no DHCP options with - // the VPC. - // - // This member is required. - DhcpOptionsId *string - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateDhcpOptionsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateDhcpOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateDhcpOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateDhcpOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateDhcpOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateDhcpOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateDhcpOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go deleted file mode 100644 index 75b563253..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateEnclaveCertificateIamRole.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates an Identity and Access Management (IAM) role with an Certificate -// Manager (ACM) certificate. This enables the certificate to be used by the ACM -// for Nitro Enclaves application inside an enclave. For more information, see -// Certificate Manager for Nitro Enclaves (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html) -// in the Amazon Web Services Nitro Enclaves User Guide. When the IAM role is -// associated with the ACM certificate, the certificate, certificate chain, and -// encrypted private key are placed in an Amazon S3 location that only the -// associated IAM role can access. The private key of the certificate is encrypted -// with an Amazon Web Services managed key that has an attached attestation-based -// key policy. To enable the IAM role to access the Amazon S3 object, you must -// grant it permission to call s3:GetObject on the Amazon S3 bucket returned by -// the command. To enable the IAM role to access the KMS key, you must grant it -// permission to call kms:Decrypt on the KMS key returned by the command. For more -// information, see Grant the role permission to access the certificate and -// encryption key (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html#add-policy) -// in the Amazon Web Services Nitro Enclaves User Guide. -func (c *Client) AssociateEnclaveCertificateIamRole(ctx context.Context, params *AssociateEnclaveCertificateIamRoleInput, optFns ...func(*Options)) (*AssociateEnclaveCertificateIamRoleOutput, error) { - if params == nil { - params = &AssociateEnclaveCertificateIamRoleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateEnclaveCertificateIamRole", params, optFns, c.addOperationAssociateEnclaveCertificateIamRoleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateEnclaveCertificateIamRoleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateEnclaveCertificateIamRoleInput struct { - - // The ARN of the ACM certificate with which to associate the IAM role. - // - // This member is required. - CertificateArn *string - - // The ARN of the IAM role to associate with the ACM certificate. You can - // associate up to 16 IAM roles with an ACM certificate. - // - // This member is required. - RoleArn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateEnclaveCertificateIamRoleOutput struct { - - // The name of the Amazon S3 bucket to which the certificate was uploaded. - CertificateS3BucketName *string - - // The Amazon S3 object key where the certificate, certificate chain, and - // encrypted private key bundle are stored. The object key is formatted as follows: - // role_arn / certificate_arn . - CertificateS3ObjectKey *string - - // The ID of the KMS key used to encrypt the private key of the certificate. - EncryptionKmsKeyId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateEnclaveCertificateIamRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateEnclaveCertificateIamRole{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateEnclaveCertificateIamRole"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateEnclaveCertificateIamRoleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateEnclaveCertificateIamRole(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateEnclaveCertificateIamRole(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateEnclaveCertificateIamRole", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIamInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIamInstanceProfile.go deleted file mode 100644 index 93a7d9f81..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIamInstanceProfile.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates an IAM instance profile with a running or stopped instance. You -// cannot associate more than one IAM instance profile with an instance. -func (c *Client) AssociateIamInstanceProfile(ctx context.Context, params *AssociateIamInstanceProfileInput, optFns ...func(*Options)) (*AssociateIamInstanceProfileOutput, error) { - if params == nil { - params = &AssociateIamInstanceProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateIamInstanceProfile", params, optFns, c.addOperationAssociateIamInstanceProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateIamInstanceProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateIamInstanceProfileInput struct { - - // The IAM instance profile. - // - // This member is required. - IamInstanceProfile *types.IamInstanceProfileSpecification - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - noSmithyDocumentSerde -} - -type AssociateIamInstanceProfileOutput struct { - - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *types.IamInstanceProfileAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateIamInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateIamInstanceProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateIamInstanceProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateIamInstanceProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateIamInstanceProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIamInstanceProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateIamInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateIamInstanceProfile", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateInstanceEventWindow.go deleted file mode 100644 index 866621932..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateInstanceEventWindow.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates one or more targets with an event window. Only one type of target -// (instance IDs, Dedicated Host IDs, or tags) can be specified with an event -// window. For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) -// in the Amazon EC2 User Guide. -func (c *Client) AssociateInstanceEventWindow(ctx context.Context, params *AssociateInstanceEventWindowInput, optFns ...func(*Options)) (*AssociateInstanceEventWindowOutput, error) { - if params == nil { - params = &AssociateInstanceEventWindowInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateInstanceEventWindow", params, optFns, c.addOperationAssociateInstanceEventWindowMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateInstanceEventWindowOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateInstanceEventWindowInput struct { - - // One or more targets associated with the specified event window. - // - // This member is required. - AssociationTarget *types.InstanceEventWindowAssociationRequest - - // The ID of the event window. - // - // This member is required. - InstanceEventWindowId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateInstanceEventWindowOutput struct { - - // Information about the event window. - InstanceEventWindow *types.InstanceEventWindow - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateInstanceEventWindow"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateInstanceEventWindowValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateInstanceEventWindow(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateInstanceEventWindow", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIpamByoasn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIpamByoasn.go deleted file mode 100644 index 00a979393..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIpamByoasn.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates your Autonomous System Number (ASN) with a BYOIP CIDR that you own -// in the same Amazon Web Services Region. For more information, see Tutorial: -// Bring your ASN to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html) -// in the Amazon VPC IPAM guide. After the association succeeds, the ASN is -// eligible for advertisement. You can view the association with DescribeByoipCidrs (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeByoipCidrs.html) -// . You can advertise the CIDR with AdvertiseByoipCidr (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AdvertiseByoipCidr.html) -// . -func (c *Client) AssociateIpamByoasn(ctx context.Context, params *AssociateIpamByoasnInput, optFns ...func(*Options)) (*AssociateIpamByoasnOutput, error) { - if params == nil { - params = &AssociateIpamByoasnInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateIpamByoasn", params, optFns, c.addOperationAssociateIpamByoasnMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateIpamByoasnOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateIpamByoasnInput struct { - - // A public 2-byte or 4-byte ASN. - // - // This member is required. - Asn *string - - // The BYOIP CIDR you want to associate with an ASN. - // - // This member is required. - Cidr *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateIpamByoasnOutput struct { - - // The ASN and BYOIP CIDR association. - AsnAssociation *types.AsnAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateIpamByoasnMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateIpamByoasn{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateIpamByoasn{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateIpamByoasn"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateIpamByoasnValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIpamByoasn(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateIpamByoasn(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateIpamByoasn", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIpamResourceDiscovery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIpamResourceDiscovery.go deleted file mode 100644 index 6781766be..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateIpamResourceDiscovery.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates an IPAM resource discovery with an Amazon VPC IPAM. A resource -// discovery is an IPAM component that enables IPAM to manage and monitor resources -// that belong to the owning account. -func (c *Client) AssociateIpamResourceDiscovery(ctx context.Context, params *AssociateIpamResourceDiscoveryInput, optFns ...func(*Options)) (*AssociateIpamResourceDiscoveryOutput, error) { - if params == nil { - params = &AssociateIpamResourceDiscoveryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateIpamResourceDiscovery", params, optFns, c.addOperationAssociateIpamResourceDiscoveryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateIpamResourceDiscoveryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateIpamResourceDiscoveryInput struct { - - // An IPAM ID. - // - // This member is required. - IpamId *string - - // A resource discovery ID. - // - // This member is required. - IpamResourceDiscoveryId *string - - // A client token. - ClientToken *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Tag specifications. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type AssociateIpamResourceDiscoveryOutput struct { - - // A resource discovery association. An associated resource discovery is a - // resource discovery that has been associated with an IPAM. - IpamResourceDiscoveryAssociation *types.IpamResourceDiscoveryAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateIpamResourceDiscoveryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateIpamResourceDiscovery"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opAssociateIpamResourceDiscoveryMiddleware(stack, options); err != nil { - return err - } - if err = addOpAssociateIpamResourceDiscoveryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateIpamResourceDiscovery(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAssociateIpamResourceDiscovery struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAssociateIpamResourceDiscovery) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAssociateIpamResourceDiscovery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AssociateIpamResourceDiscoveryInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateIpamResourceDiscoveryInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAssociateIpamResourceDiscoveryMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateIpamResourceDiscovery{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAssociateIpamResourceDiscovery(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateIpamResourceDiscovery", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go deleted file mode 100644 index c77df6472..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateNatGatewayAddress.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates Elastic IP addresses (EIPs) and private IPv4 addresses with a public -// NAT gateway. For more information, see Work with NAT gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-working-with) -// in the Amazon VPC User Guide. By default, you can associate up to 2 Elastic IP -// addresses per public NAT gateway. You can increase the limit by requesting a -// quota adjustment. For more information, see Elastic IP address quotas (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html#vpc-limits-eips) -// in the Amazon VPC User Guide. When you associate an EIP or secondary EIPs with a -// public NAT gateway, the network border group of the EIPs must match the network -// border group of the Availability Zone (AZ) that the public NAT gateway is in. If -// it's not the same, the EIP will fail to associate. You can see the network -// border group for the subnet's AZ by viewing the details of the subnet. -// Similarly, you can view the network border group of an EIP by viewing the -// details of the EIP address. For more information about network border groups and -// EIPs, see Allocate an Elastic IP address (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#allocate-eip) -// in the Amazon VPC User Guide. -func (c *Client) AssociateNatGatewayAddress(ctx context.Context, params *AssociateNatGatewayAddressInput, optFns ...func(*Options)) (*AssociateNatGatewayAddressOutput, error) { - if params == nil { - params = &AssociateNatGatewayAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateNatGatewayAddress", params, optFns, c.addOperationAssociateNatGatewayAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateNatGatewayAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateNatGatewayAddressInput struct { - - // The allocation IDs of EIPs that you want to associate with your NAT gateway. - // - // This member is required. - AllocationIds []string - - // The ID of the NAT gateway. - // - // This member is required. - NatGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The private IPv4 addresses that you want to assign to the NAT gateway. - PrivateIpAddresses []string - - noSmithyDocumentSerde -} - -type AssociateNatGatewayAddressOutput struct { - - // The IP addresses. - NatGatewayAddresses []types.NatGatewayAddress - - // The ID of the NAT gateway. - NatGatewayId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateNatGatewayAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateNatGatewayAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateNatGatewayAddressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateNatGatewayAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateNatGatewayAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateNatGatewayAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateRouteTable.go deleted file mode 100644 index 2700a5a26..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateRouteTable.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates a subnet in your VPC or an internet gateway or virtual private -// gateway attached to your VPC with a route table in your VPC. This association -// causes traffic from the subnet or gateway to be routed according to the routes -// in the route table. The action returns an association ID, which you need in -// order to disassociate the route table later. A route table can be associated -// with multiple subnets. For more information, see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. -func (c *Client) AssociateRouteTable(ctx context.Context, params *AssociateRouteTableInput, optFns ...func(*Options)) (*AssociateRouteTableOutput, error) { - if params == nil { - params = &AssociateRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateRouteTable", params, optFns, c.addOperationAssociateRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateRouteTableInput struct { - - // The ID of the route table. - // - // This member is required. - RouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the internet gateway or virtual private gateway. - GatewayId *string - - // The ID of the subnet. - SubnetId *string - - noSmithyDocumentSerde -} - -type AssociateRouteTableOutput struct { - - // The route table association ID. This ID is required for disassociating the - // route table. - AssociationId *string - - // The state of the association. - AssociationState *types.RouteTableAssociationState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateSubnetCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateSubnetCidrBlock.go deleted file mode 100644 index c38e0ac10..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateSubnetCidrBlock.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates a CIDR block with your subnet. You can only associate a single IPv6 -// CIDR block with your subnet. -func (c *Client) AssociateSubnetCidrBlock(ctx context.Context, params *AssociateSubnetCidrBlockInput, optFns ...func(*Options)) (*AssociateSubnetCidrBlockOutput, error) { - if params == nil { - params = &AssociateSubnetCidrBlockInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateSubnetCidrBlock", params, optFns, c.addOperationAssociateSubnetCidrBlockMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateSubnetCidrBlockOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateSubnetCidrBlockInput struct { - - // The ID of your subnet. - // - // This member is required. - SubnetId *string - - // The IPv6 CIDR block for your subnet. - Ipv6CidrBlock *string - - // An IPv6 IPAM pool ID. - Ipv6IpamPoolId *string - - // An IPv6 netmask length. - Ipv6NetmaskLength *int32 - - noSmithyDocumentSerde -} - -type AssociateSubnetCidrBlockOutput struct { - - // Information about the IPv6 association. - Ipv6CidrBlockAssociation *types.SubnetIpv6CidrBlockAssociation - - // The ID of the subnet. - SubnetId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateSubnetCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateSubnetCidrBlock{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateSubnetCidrBlock{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateSubnetCidrBlock"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateSubnetCidrBlockValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateSubnetCidrBlock(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateSubnetCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateSubnetCidrBlock", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go deleted file mode 100644 index 2ded73bf5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayMulticastDomain.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates the specified subnets and transit gateway attachments with the -// specified transit gateway multicast domain. The transit gateway attachment must -// be in the available state before you can add a resource. Use -// DescribeTransitGatewayAttachments (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGatewayAttachments.html) -// to see the state of the attachment. -func (c *Client) AssociateTransitGatewayMulticastDomain(ctx context.Context, params *AssociateTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*AssociateTransitGatewayMulticastDomainOutput, error) { - if params == nil { - params = &AssociateTransitGatewayMulticastDomainInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateTransitGatewayMulticastDomain", params, optFns, c.addOperationAssociateTransitGatewayMulticastDomainMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateTransitGatewayMulticastDomainOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateTransitGatewayMulticastDomainInput struct { - - // The IDs of the subnets to associate with the transit gateway multicast domain. - // - // This member is required. - SubnetIds []string - - // The ID of the transit gateway attachment to associate with the transit gateway - // multicast domain. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateTransitGatewayMulticastDomainOutput struct { - - // Information about the transit gateway multicast domain associations. - Associations *types.TransitGatewayMulticastDomainAssociations - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateTransitGatewayMulticastDomain"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTransitGatewayMulticastDomain(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateTransitGatewayMulticastDomain", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go deleted file mode 100644 index 846c1cf72..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayPolicyTable.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates the specified transit gateway attachment with a transit gateway -// policy table. -func (c *Client) AssociateTransitGatewayPolicyTable(ctx context.Context, params *AssociateTransitGatewayPolicyTableInput, optFns ...func(*Options)) (*AssociateTransitGatewayPolicyTableOutput, error) { - if params == nil { - params = &AssociateTransitGatewayPolicyTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateTransitGatewayPolicyTable", params, optFns, c.addOperationAssociateTransitGatewayPolicyTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateTransitGatewayPolicyTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateTransitGatewayPolicyTableInput struct { - - // The ID of the transit gateway attachment to associate with the policy table. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway policy table to associate with the transit - // gateway attachment. - // - // This member is required. - TransitGatewayPolicyTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateTransitGatewayPolicyTableOutput struct { - - // Describes the association of a transit gateway and a transit gateway policy - // table. - Association *types.TransitGatewayPolicyTableAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateTransitGatewayPolicyTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateTransitGatewayPolicyTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTransitGatewayPolicyTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateTransitGatewayPolicyTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateTransitGatewayPolicyTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayRouteTable.go deleted file mode 100644 index 51ab2760b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTransitGatewayRouteTable.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates the specified attachment with the specified transit gateway route -// table. You can associate only one route table with an attachment. -func (c *Client) AssociateTransitGatewayRouteTable(ctx context.Context, params *AssociateTransitGatewayRouteTableInput, optFns ...func(*Options)) (*AssociateTransitGatewayRouteTableOutput, error) { - if params == nil { - params = &AssociateTransitGatewayRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateTransitGatewayRouteTable", params, optFns, c.addOperationAssociateTransitGatewayRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateTransitGatewayRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateTransitGatewayRouteTableInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AssociateTransitGatewayRouteTableOutput struct { - - // The ID of the association. - Association *types.TransitGatewayAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateTransitGatewayRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateTransitGatewayRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTransitGatewayRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateTransitGatewayRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTrunkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTrunkInterface.go deleted file mode 100644 index 29b32e5cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateTrunkInterface.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates a branch network interface with a trunk network interface. Before -// you create the association, run the create-network-interface (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html) -// command and set --interface-type to trunk . You must also create a network -// interface for each branch network interface that you want to associate with the -// trunk network interface. -func (c *Client) AssociateTrunkInterface(ctx context.Context, params *AssociateTrunkInterfaceInput, optFns ...func(*Options)) (*AssociateTrunkInterfaceOutput, error) { - if params == nil { - params = &AssociateTrunkInterfaceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateTrunkInterface", params, optFns, c.addOperationAssociateTrunkInterfaceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateTrunkInterfaceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateTrunkInterfaceInput struct { - - // The ID of the branch network interface. - // - // This member is required. - BranchInterfaceId *string - - // The ID of the trunk network interface. - // - // This member is required. - TrunkInterfaceId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The application key. This applies to the GRE protocol. - GreKey *int32 - - // The ID of the VLAN. This applies to the VLAN protocol. - VlanId *int32 - - noSmithyDocumentSerde -} - -type AssociateTrunkInterfaceOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Information about the association between the trunk network interface and - // branch network interface. - InterfaceAssociation *types.TrunkInterfaceAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateTrunkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateTrunkInterface{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateTrunkInterface{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateTrunkInterface"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opAssociateTrunkInterfaceMiddleware(stack, options); err != nil { - return err - } - if err = addOpAssociateTrunkInterfaceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTrunkInterface(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAssociateTrunkInterface struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAssociateTrunkInterface) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAssociateTrunkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AssociateTrunkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AssociateTrunkInterfaceInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAssociateTrunkInterfaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAssociateTrunkInterface{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAssociateTrunkInterface(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateTrunkInterface", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateVpcCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateVpcCidrBlock.go deleted file mode 100644 index a5b3d506e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AssociateVpcCidrBlock.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates a CIDR block with your VPC. You can associate a secondary IPv4 CIDR -// block, an Amazon-provided IPv6 CIDR block, or an IPv6 CIDR block from an IPv6 -// address pool that you provisioned through bring your own IP addresses ( BYOIP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) -// ). You must specify one of the following in the request: an IPv4 CIDR block, an -// IPv6 pool, or an Amazon-provided IPv6 CIDR block. For more information about -// associating CIDR blocks with your VPC and applicable restrictions, see IP -// addressing for your VPCs and subnets (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-ip-addressing.html) -// in the Amazon VPC User Guide. -func (c *Client) AssociateVpcCidrBlock(ctx context.Context, params *AssociateVpcCidrBlockInput, optFns ...func(*Options)) (*AssociateVpcCidrBlockOutput, error) { - if params == nil { - params = &AssociateVpcCidrBlockInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateVpcCidrBlock", params, optFns, c.addOperationAssociateVpcCidrBlockMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateVpcCidrBlockOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateVpcCidrBlockInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the - // VPC. You cannot specify the range of IPv6 addresses or the size of the CIDR - // block. - AmazonProvidedIpv6CidrBlock *bool - - // An IPv4 CIDR block to associate with the VPC. - CidrBlock *string - - // Associate a CIDR allocated from an IPv4 IPAM pool to a VPC. For more - // information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) - // in the Amazon VPC IPAM User Guide. - Ipv4IpamPoolId *string - - // The netmask length of the IPv4 CIDR you would like to associate from an Amazon - // VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What - // is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) in - // the Amazon VPC IPAM User Guide. - Ipv4NetmaskLength *int32 - - // An IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool - // in the request. To let Amazon choose the IPv6 CIDR block for you, omit this - // parameter. - Ipv6CidrBlock *string - - // The name of the location from which we advertise the IPV6 CIDR block. Use this - // parameter to limit the CIDR block to this location. You must set - // AmazonProvidedIpv6CidrBlock to true to use this parameter. You can have one - // IPv6 CIDR block association per network border group. - Ipv6CidrBlockNetworkBorderGroup *string - - // Associates a CIDR allocated from an IPv6 IPAM pool to a VPC. For more - // information about Amazon VPC IP Address Manager (IPAM), see What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) - // in the Amazon VPC IPAM User Guide. - Ipv6IpamPoolId *string - - // The netmask length of the IPv6 CIDR you would like to associate from an Amazon - // VPC IP Address Manager (IPAM) pool. For more information about IPAM, see What - // is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) in - // the Amazon VPC IPAM User Guide. - Ipv6NetmaskLength *int32 - - // The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block. - Ipv6Pool *string - - noSmithyDocumentSerde -} - -type AssociateVpcCidrBlockOutput struct { - - // Information about the IPv4 CIDR block association. - CidrBlockAssociation *types.VpcCidrBlockAssociation - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *types.VpcIpv6CidrBlockAssociation - - // The ID of the VPC. - VpcId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateVpcCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAssociateVpcCidrBlock{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAssociateVpcCidrBlock{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateVpcCidrBlock"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAssociateVpcCidrBlockValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateVpcCidrBlock(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateVpcCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateVpcCidrBlock", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachClassicLinkVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachClassicLinkVpc.go deleted file mode 100644 index 9565104b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachClassicLinkVpc.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Links an EC2-Classic instance to a -// ClassicLink-enabled VPC through one or more of the VPC security groups. You -// cannot link an EC2-Classic instance to more than one VPC at a time. You can only -// link an instance that's in the running state. An instance is automatically -// unlinked from a VPC when it's stopped - you can link it to the VPC again when -// you restart it. After you've linked an instance, you cannot change the VPC -// security groups that are associated with it. To change the security groups, you -// must first unlink the instance, and then link it again. Linking your instance to -// a VPC is sometimes referred to as attaching your instance. -func (c *Client) AttachClassicLinkVpc(ctx context.Context, params *AttachClassicLinkVpcInput, optFns ...func(*Options)) (*AttachClassicLinkVpcOutput, error) { - if params == nil { - params = &AttachClassicLinkVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AttachClassicLinkVpc", params, optFns, c.addOperationAttachClassicLinkVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AttachClassicLinkVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AttachClassicLinkVpcInput struct { - - // The IDs of the security groups. You cannot specify security groups from a - // different VPC. - // - // This member is required. - Groups []string - - // The ID of the EC2-Classic instance. - // - // This member is required. - InstanceId *string - - // The ID of the ClassicLink-enabled VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AttachClassicLinkVpcOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAttachClassicLinkVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAttachClassicLinkVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachClassicLinkVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AttachClassicLinkVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAttachClassicLinkVpcValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachClassicLinkVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAttachClassicLinkVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AttachClassicLinkVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachInternetGateway.go deleted file mode 100644 index e442d326c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachInternetGateway.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches an internet gateway or a virtual private gateway to a VPC, enabling -// connectivity between the internet and the VPC. For more information, see -// Internet gateways (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html) -// in the Amazon VPC User Guide. -func (c *Client) AttachInternetGateway(ctx context.Context, params *AttachInternetGatewayInput, optFns ...func(*Options)) (*AttachInternetGatewayOutput, error) { - if params == nil { - params = &AttachInternetGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AttachInternetGateway", params, optFns, c.addOperationAttachInternetGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AttachInternetGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AttachInternetGatewayInput struct { - - // The ID of the internet gateway. - // - // This member is required. - InternetGatewayId *string - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AttachInternetGatewayOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAttachInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAttachInternetGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachInternetGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AttachInternetGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAttachInternetGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachInternetGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAttachInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AttachInternetGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachNetworkInterface.go deleted file mode 100644 index 6fce926b7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachNetworkInterface.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches a network interface to an instance. -func (c *Client) AttachNetworkInterface(ctx context.Context, params *AttachNetworkInterfaceInput, optFns ...func(*Options)) (*AttachNetworkInterfaceOutput, error) { - if params == nil { - params = &AttachNetworkInterfaceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AttachNetworkInterface", params, optFns, c.addOperationAttachNetworkInterfaceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AttachNetworkInterfaceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for AttachNetworkInterface. -type AttachNetworkInterfaceInput struct { - - // The index of the device for the network interface attachment. - // - // This member is required. - DeviceIndex *int32 - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Configures ENA Express for the network interface that this action attaches to - // the instance. - EnaSrdSpecification *types.EnaSrdSpecification - - // The index of the network card. Some instance types support multiple network - // cards. The primary network interface must be assigned to network card index 0. - // The default is network card index 0. - NetworkCardIndex *int32 - - noSmithyDocumentSerde -} - -// Contains the output of AttachNetworkInterface. -type AttachNetworkInterfaceOutput struct { - - // The ID of the network interface attachment. - AttachmentId *string - - // The index of the network card. - NetworkCardIndex *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAttachNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAttachNetworkInterface{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachNetworkInterface{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AttachNetworkInterface"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAttachNetworkInterfaceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachNetworkInterface(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAttachNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AttachNetworkInterface", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go deleted file mode 100644 index d48cb5b17..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVerifiedAccessTrustProvider.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches the specified Amazon Web Services Verified Access trust provider to -// the specified Amazon Web Services Verified Access instance. -func (c *Client) AttachVerifiedAccessTrustProvider(ctx context.Context, params *AttachVerifiedAccessTrustProviderInput, optFns ...func(*Options)) (*AttachVerifiedAccessTrustProviderOutput, error) { - if params == nil { - params = &AttachVerifiedAccessTrustProviderInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AttachVerifiedAccessTrustProvider", params, optFns, c.addOperationAttachVerifiedAccessTrustProviderMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AttachVerifiedAccessTrustProviderOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AttachVerifiedAccessTrustProviderInput struct { - - // The ID of the Verified Access instance. - // - // This member is required. - VerifiedAccessInstanceId *string - - // The ID of the Verified Access trust provider. - // - // This member is required. - VerifiedAccessTrustProviderId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AttachVerifiedAccessTrustProviderOutput struct { - - // Details about the Verified Access instance. - VerifiedAccessInstance *types.VerifiedAccessInstance - - // Details about the Verified Access trust provider. - VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAttachVerifiedAccessTrustProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAttachVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AttachVerifiedAccessTrustProvider"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opAttachVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { - return err - } - if err = addOpAttachVerifiedAccessTrustProviderValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachVerifiedAccessTrustProvider(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAttachVerifiedAccessTrustProvider struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAttachVerifiedAccessTrustProvider) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAttachVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AttachVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AttachVerifiedAccessTrustProviderInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAttachVerifiedAccessTrustProviderMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAttachVerifiedAccessTrustProvider{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAttachVerifiedAccessTrustProvider(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AttachVerifiedAccessTrustProvider", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVolume.go deleted file mode 100644 index 92efcf83b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVolume.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Attaches an EBS volume to a running or stopped instance and exposes it to the -// instance with the specified device name. Encrypted EBS volumes must be attached -// to instances that support Amazon EBS encryption. For more information, see -// Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. After you attach an EBS volume, -// you must make it available. For more information, see Make an EBS volume -// available for use (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html) -// . If a volume has an Amazon Web Services Marketplace product code: -// - The volume can be attached only to a stopped instance. -// - Amazon Web Services Marketplace product codes are copied from the volume to -// the instance. -// - You must be subscribed to the product. -// - The instance type and operating system of the instance must support the -// product. For example, you can't detach a volume from a Windows instance and -// attach it to a Linux instance. -// -// For more information, see Attach an Amazon EBS volume to an instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) AttachVolume(ctx context.Context, params *AttachVolumeInput, optFns ...func(*Options)) (*AttachVolumeOutput, error) { - if params == nil { - params = &AttachVolumeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AttachVolume", params, optFns, c.addOperationAttachVolumeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AttachVolumeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AttachVolumeInput struct { - - // The device name (for example, /dev/sdh or xvdh ). - // - // This member is required. - Device *string - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // The ID of the EBS volume. The volume and instance must be within the same - // Availability Zone. - // - // This member is required. - VolumeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Describes volume attachment details. -type AttachVolumeOutput struct { - - // The ARN of the Amazon ECS or Fargate task to which the volume is attached. - AssociatedResource *string - - // The time stamp when the attachment initiated. - AttachTime *time.Time - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool - - // The device name. If the volume is attached to a Fargate task, this parameter - // returns null . - Device *string - - // The ID of the instance. If the volume is attached to a Fargate task, this - // parameter returns null . - InstanceId *string - - // The service principal of Amazon Web Services service that owns the underlying - // instance to which the volume is attached. This parameter is returned only for - // volumes that are attached to Fargate tasks. - InstanceOwningService *string - - // The attachment state of the volume. - State types.VolumeAttachmentState - - // The ID of the volume. - VolumeId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAttachVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAttachVolume{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachVolume{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AttachVolume"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAttachVolumeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachVolume(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAttachVolume(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AttachVolume", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go deleted file mode 100644 index ed7f0cc46..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AttachVpnGateway.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches a virtual private gateway to a VPC. You can attach one virtual private -// gateway to one VPC at a time. For more information, see Amazon Web Services -// Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in -// the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) AttachVpnGateway(ctx context.Context, params *AttachVpnGatewayInput, optFns ...func(*Options)) (*AttachVpnGatewayOutput, error) { - if params == nil { - params = &AttachVpnGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AttachVpnGateway", params, optFns, c.addOperationAttachVpnGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AttachVpnGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for AttachVpnGateway. -type AttachVpnGatewayInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // The ID of the virtual private gateway. - // - // This member is required. - VpnGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of AttachVpnGateway. -type AttachVpnGatewayOutput struct { - - // Information about the attachment. - VpcAttachment *types.VpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAttachVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAttachVpnGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAttachVpnGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AttachVpnGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAttachVpnGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAttachVpnGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAttachVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AttachVpnGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeClientVpnIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeClientVpnIngress.go deleted file mode 100644 index cb8c9033f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeClientVpnIngress.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds an ingress authorization rule to a Client VPN endpoint. Ingress -// authorization rules act as firewall rules that grant access to networks. You -// must configure ingress authorization rules to enable clients to access resources -// in Amazon Web Services or on-premises networks. -func (c *Client) AuthorizeClientVpnIngress(ctx context.Context, params *AuthorizeClientVpnIngressInput, optFns ...func(*Options)) (*AuthorizeClientVpnIngressOutput, error) { - if params == nil { - params = &AuthorizeClientVpnIngressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AuthorizeClientVpnIngress", params, optFns, c.addOperationAuthorizeClientVpnIngressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AuthorizeClientVpnIngressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AuthorizeClientVpnIngressInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // The IPv4 address range, in CIDR notation, of the network for which access is - // being authorized. - // - // This member is required. - TargetNetworkCidr *string - - // The ID of the group to grant access to, for example, the Active Directory group - // or identity provider (IdP) group. Required if AuthorizeAllGroups is false or - // not specified. - AccessGroupId *string - - // Indicates whether to grant access to all clients. Specify true to grant all - // clients who successfully establish a VPN connection access to the network. Must - // be set to true if AccessGroupId is not specified. - AuthorizeAllGroups *bool - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A brief description of the authorization rule. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type AuthorizeClientVpnIngressOutput struct { - - // The current state of the authorization rule. - Status *types.ClientVpnAuthorizationRuleStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAuthorizeClientVpnIngressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAuthorizeClientVpnIngress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAuthorizeClientVpnIngress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AuthorizeClientVpnIngress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opAuthorizeClientVpnIngressMiddleware(stack, options); err != nil { - return err - } - if err = addOpAuthorizeClientVpnIngressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeClientVpnIngress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpAuthorizeClientVpnIngress struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpAuthorizeClientVpnIngress) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpAuthorizeClientVpnIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*AuthorizeClientVpnIngressInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *AuthorizeClientVpnIngressInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opAuthorizeClientVpnIngressMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpAuthorizeClientVpnIngress{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opAuthorizeClientVpnIngress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AuthorizeClientVpnIngress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupEgress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupEgress.go deleted file mode 100644 index 5a4ab24fd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupEgress.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds the specified outbound (egress) rules to a security group for use with a -// VPC. An outbound rule permits instances to send traffic to the specified IPv4 or -// IPv6 CIDR address ranges, or to the instances that are associated with the -// specified source security groups. When specifying an outbound rule for your -// security group in a VPC, the IpPermissions must include a destination for the -// traffic. You specify a protocol for each rule (for example, TCP). For the TCP -// and UDP protocols, you must also specify the destination port or port range. For -// the ICMP protocol, you must also specify the ICMP type and code. You can use -1 -// for the type or code to mean all types or all codes. Rule changes are propagated -// to affected instances as quickly as possible. However, a small delay might -// occur. For information about VPC security group quotas, see Amazon VPC quotas (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html) -// . If you want to reference a security group across VPCs attached to a transit -// gateway using the security group referencing feature (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-transit-gateways.html#create-tgw) -// , note that you can only reference security groups for ingress rules. You cannot -// reference a security group for egress rules. -func (c *Client) AuthorizeSecurityGroupEgress(ctx context.Context, params *AuthorizeSecurityGroupEgressInput, optFns ...func(*Options)) (*AuthorizeSecurityGroupEgressOutput, error) { - if params == nil { - params = &AuthorizeSecurityGroupEgressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AuthorizeSecurityGroupEgress", params, optFns, c.addOperationAuthorizeSecurityGroupEgressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AuthorizeSecurityGroupEgressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AuthorizeSecurityGroupEgressInput struct { - - // The ID of the security group. - // - // This member is required. - GroupId *string - - // Not supported. Use a set of IP permissions to specify the CIDR. - CidrIp *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Not supported. Use a set of IP permissions to specify the port. - FromPort *int32 - - // The sets of IP permissions. You can't specify a destination security group and - // a CIDR IP address range in the same set of permissions. - IpPermissions []types.IpPermission - - // Not supported. Use a set of IP permissions to specify the protocol name or - // number. - IpProtocol *string - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupName *string - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupOwnerId *string - - // The tags applied to the security group rule. - TagSpecifications []types.TagSpecification - - // Not supported. Use a set of IP permissions to specify the port. - ToPort *int32 - - noSmithyDocumentSerde -} - -type AuthorizeSecurityGroupEgressOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // Information about the outbound (egress) security group rules that were added. - SecurityGroupRules []types.SecurityGroupRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAuthorizeSecurityGroupEgressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAuthorizeSecurityGroupEgress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAuthorizeSecurityGroupEgress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AuthorizeSecurityGroupEgress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpAuthorizeSecurityGroupEgressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeSecurityGroupEgress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAuthorizeSecurityGroupEgress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AuthorizeSecurityGroupEgress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupIngress.go deleted file mode 100644 index ef96f5034..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_AuthorizeSecurityGroupIngress.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds the specified inbound (ingress) rules to a security group. An inbound rule -// permits instances to receive traffic from the specified IPv4 or IPv6 CIDR -// address range, or from the instances that are associated with the specified -// destination security groups. When specifying an inbound rule for your security -// group in a VPC, the IpPermissions must include a source for the traffic. You -// specify a protocol for each rule (for example, TCP). For TCP and UDP, you must -// also specify the destination port or port range. For ICMP/ICMPv6, you must also -// specify the ICMP/ICMPv6 type and code. You can use -1 to mean all types or all -// codes. Rule changes are propagated to instances within the security group as -// quickly as possible. However, a small delay might occur. For more information -// about VPC security group quotas, see Amazon VPC quotas (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html) -// . -func (c *Client) AuthorizeSecurityGroupIngress(ctx context.Context, params *AuthorizeSecurityGroupIngressInput, optFns ...func(*Options)) (*AuthorizeSecurityGroupIngressOutput, error) { - if params == nil { - params = &AuthorizeSecurityGroupIngressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AuthorizeSecurityGroupIngress", params, optFns, c.addOperationAuthorizeSecurityGroupIngressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AuthorizeSecurityGroupIngressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AuthorizeSecurityGroupIngressInput struct { - - // The IPv4 address range, in CIDR format. You can't specify this parameter when - // specifying a source security group. To specify an IPv6 address range, use a set - // of IP permissions. Alternatively, use a set of IP permissions to specify - // multiple rules and a description for the rule. - CidrIp *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // If the protocol is TCP or UDP, this is the start of the port range. If the - // protocol is ICMP, this is the type number. A value of -1 indicates all ICMP - // types. If you specify all ICMP types, you must specify all ICMP codes. - // Alternatively, use a set of IP permissions to specify multiple rules and a - // description for the rule. - FromPort *int32 - - // The ID of the security group. You must specify either the security group ID or - // the security group name in the request. For security groups in a nondefault VPC, - // you must specify the security group ID. - GroupId *string - - // [Default VPC] The name of the security group. You must specify either the - // security group ID or the security group name in the request. For security groups - // in a nondefault VPC, you must specify the security group ID. - GroupName *string - - // The sets of IP permissions. - IpPermissions []types.IpPermission - - // The IP protocol name ( tcp , udp , icmp ) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // ). To specify icmpv6 , use a set of IP permissions. Use -1 to specify all - // protocols. If you specify -1 or a protocol other than tcp , udp , or icmp , - // traffic on all ports is allowed, regardless of any ports you specify. - // Alternatively, use a set of IP permissions to specify multiple rules and a - // description for the rule. - IpProtocol *string - - // [Default VPC] The name of the source security group. You can't specify this - // parameter in combination with the following parameters: the CIDR IP address - // range, the start of the port range, the IP protocol, and the end of the port - // range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule - // with a specific IP protocol and port range, use a set of IP permissions instead. - // The source security group must be in the same VPC. - SourceSecurityGroupName *string - - // [Nondefault VPC] The Amazon Web Services account ID for the source security - // group, if the source security group is in a different account. You can't specify - // this parameter in combination with the following parameters: the CIDR IP address - // range, the IP protocol, the start of the port range, and the end of the port - // range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule - // with a specific IP protocol and port range, use a set of IP permissions instead. - SourceSecurityGroupOwnerId *string - - // [VPC Only] The tags applied to the security group rule. - TagSpecifications []types.TagSpecification - - // If the protocol is TCP or UDP, this is the end of the port range. If the - // protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes. If - // you specify all ICMP types, you must specify all ICMP codes. Alternatively, use - // a set of IP permissions to specify multiple rules and a description for the - // rule. - ToPort *int32 - - noSmithyDocumentSerde -} - -type AuthorizeSecurityGroupIngressOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // Information about the inbound (ingress) security group rules that were added. - SecurityGroupRules []types.SecurityGroupRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAuthorizeSecurityGroupIngressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpAuthorizeSecurityGroupIngress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpAuthorizeSecurityGroupIngress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AuthorizeSecurityGroupIngress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAuthorizeSecurityGroupIngress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAuthorizeSecurityGroupIngress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AuthorizeSecurityGroupIngress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_BundleInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_BundleInstance.go deleted file mode 100644 index d8133b54c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_BundleInstance.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Bundles an Amazon instance store-backed Windows instance. During bundling, only -// the root device volume (C:\) is bundled. Data on other instance store volumes is -// not preserved. This action is not applicable for Linux/Unix instances or Windows -// instances that are backed by Amazon EBS. -func (c *Client) BundleInstance(ctx context.Context, params *BundleInstanceInput, optFns ...func(*Options)) (*BundleInstanceOutput, error) { - if params == nil { - params = &BundleInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BundleInstance", params, optFns, c.addOperationBundleInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BundleInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for BundleInstance. -type BundleInstanceInput struct { - - // The ID of the instance to bundle. Type: String Default: None Required: Yes - // - // This member is required. - InstanceId *string - - // The bucket in which to store the AMI. You can specify a bucket that you already - // own or a new bucket that Amazon EC2 creates on your behalf. If you specify a - // bucket that belongs to someone else, Amazon EC2 returns an error. - // - // This member is required. - Storage *types.Storage - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of BundleInstance. -type BundleInstanceOutput struct { - - // Information about the bundle task. - BundleTask *types.BundleTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBundleInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpBundleInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpBundleInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BundleInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpBundleInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBundleInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opBundleInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BundleInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelBundleTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelBundleTask.go deleted file mode 100644 index c0bfd4cb6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelBundleTask.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels a bundling operation for an instance store-backed Windows instance. -func (c *Client) CancelBundleTask(ctx context.Context, params *CancelBundleTaskInput, optFns ...func(*Options)) (*CancelBundleTaskOutput, error) { - if params == nil { - params = &CancelBundleTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelBundleTask", params, optFns, c.addOperationCancelBundleTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelBundleTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CancelBundleTask. -type CancelBundleTaskInput struct { - - // The ID of the bundle task. - // - // This member is required. - BundleId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of CancelBundleTask. -type CancelBundleTaskOutput struct { - - // Information about the bundle task. - BundleTask *types.BundleTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelBundleTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelBundleTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelBundleTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelBundleTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelBundleTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelBundleTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelBundleTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelBundleTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservation.go deleted file mode 100644 index c85607f19..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservation.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels the specified Capacity Reservation, releases the reserved capacity, and -// changes the Capacity Reservation's state to cancelled . Instances running in the -// reserved capacity continue running until you stop them. Stopped instances that -// target the Capacity Reservation can no longer launch. Modify these instances to -// either target a different Capacity Reservation, launch On-Demand Instance -// capacity, or run in any open Capacity Reservation that has matching attributes -// and sufficient capacity. -func (c *Client) CancelCapacityReservation(ctx context.Context, params *CancelCapacityReservationInput, optFns ...func(*Options)) (*CancelCapacityReservationOutput, error) { - if params == nil { - params = &CancelCapacityReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelCapacityReservation", params, optFns, c.addOperationCancelCapacityReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelCapacityReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelCapacityReservationInput struct { - - // The ID of the Capacity Reservation to be cancelled. - // - // This member is required. - CapacityReservationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CancelCapacityReservationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelCapacityReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelCapacityReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelCapacityReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelCapacityReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelCapacityReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelCapacityReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservationFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservationFleets.go deleted file mode 100644 index 196303771..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelCapacityReservationFleets.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels one or more Capacity Reservation Fleets. When you cancel a Capacity -// Reservation Fleet, the following happens: -// - The Capacity Reservation Fleet's status changes to cancelled . -// - The individual Capacity Reservations in the Fleet are cancelled. Instances -// running in the Capacity Reservations at the time of cancelling the Fleet -// continue to run in shared capacity. -// - The Fleet stops creating new Capacity Reservations. -func (c *Client) CancelCapacityReservationFleets(ctx context.Context, params *CancelCapacityReservationFleetsInput, optFns ...func(*Options)) (*CancelCapacityReservationFleetsOutput, error) { - if params == nil { - params = &CancelCapacityReservationFleetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelCapacityReservationFleets", params, optFns, c.addOperationCancelCapacityReservationFleetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelCapacityReservationFleetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelCapacityReservationFleetsInput struct { - - // The IDs of the Capacity Reservation Fleets to cancel. - // - // This member is required. - CapacityReservationFleetIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CancelCapacityReservationFleetsOutput struct { - - // Information about the Capacity Reservation Fleets that could not be cancelled. - FailedFleetCancellations []types.FailedCapacityReservationFleetCancellationResult - - // Information about the Capacity Reservation Fleets that were successfully - // cancelled. - SuccessfulFleetCancellations []types.CapacityReservationFleetCancellationState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelCapacityReservationFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelCapacityReservationFleets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelCapacityReservationFleets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelCapacityReservationFleets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelCapacityReservationFleetsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelCapacityReservationFleets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelCapacityReservationFleets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelCapacityReservationFleets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelConversionTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelConversionTask.go deleted file mode 100644 index 713645177..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelConversionTask.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels an active conversion task. The task can be the import of an instance or -// volume. The action removes all artifacts of the conversion, including a -// partially uploaded volume or instance. If the conversion is complete or is in -// the process of transferring the final disk image, the command fails and returns -// an exception. For more information, see Importing a Virtual Machine Using the -// Amazon EC2 CLI (https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html) -// . -func (c *Client) CancelConversionTask(ctx context.Context, params *CancelConversionTaskInput, optFns ...func(*Options)) (*CancelConversionTaskOutput, error) { - if params == nil { - params = &CancelConversionTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelConversionTask", params, optFns, c.addOperationCancelConversionTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelConversionTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelConversionTaskInput struct { - - // The ID of the conversion task. - // - // This member is required. - ConversionTaskId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The reason for canceling the conversion task. - ReasonMessage *string - - noSmithyDocumentSerde -} - -type CancelConversionTaskOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelConversionTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelConversionTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelConversionTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelConversionTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelConversionTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelConversionTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelConversionTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelConversionTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go deleted file mode 100644 index d4060fe01..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelExportTask.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels an active export task. The request removes all artifacts of the export, -// including any partially-created Amazon S3 objects. If the export task is -// complete or is in the process of transferring the final disk image, the command -// fails and returns an error. -func (c *Client) CancelExportTask(ctx context.Context, params *CancelExportTaskInput, optFns ...func(*Options)) (*CancelExportTaskOutput, error) { - if params == nil { - params = &CancelExportTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelExportTask", params, optFns, c.addOperationCancelExportTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelExportTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelExportTaskInput struct { - - // The ID of the export task. This is the ID returned by the - // CreateInstanceExportTask and ExportImage operations. - // - // This member is required. - ExportTaskId *string - - noSmithyDocumentSerde -} - -type CancelExportTaskOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelExportTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelExportTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelExportTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelExportTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelExportTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelExportTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelExportTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImageLaunchPermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImageLaunchPermission.go deleted file mode 100644 index 488de3d4c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImageLaunchPermission.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes your Amazon Web Services account from the launch permissions for the -// specified AMI. For more information, see Cancel having an AMI shared with your -// Amazon Web Services account (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cancel-sharing-an-AMI.html) -// in the Amazon EC2 User Guide. -func (c *Client) CancelImageLaunchPermission(ctx context.Context, params *CancelImageLaunchPermissionInput, optFns ...func(*Options)) (*CancelImageLaunchPermissionOutput, error) { - if params == nil { - params = &CancelImageLaunchPermissionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelImageLaunchPermission", params, optFns, c.addOperationCancelImageLaunchPermissionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelImageLaunchPermissionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelImageLaunchPermissionInput struct { - - // The ID of the AMI that was shared with your Amazon Web Services account. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CancelImageLaunchPermissionOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelImageLaunchPermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelImageLaunchPermission{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelImageLaunchPermission{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelImageLaunchPermission"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelImageLaunchPermissionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelImageLaunchPermission(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelImageLaunchPermission(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelImageLaunchPermission", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImportTask.go deleted file mode 100644 index f8ea2dfae..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelImportTask.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels an in-process import virtual machine or import snapshot task. -func (c *Client) CancelImportTask(ctx context.Context, params *CancelImportTaskInput, optFns ...func(*Options)) (*CancelImportTaskOutput, error) { - if params == nil { - params = &CancelImportTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelImportTask", params, optFns, c.addOperationCancelImportTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelImportTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelImportTaskInput struct { - - // The reason for canceling the task. - CancelReason *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the import image or import snapshot task to be canceled. - ImportTaskId *string - - noSmithyDocumentSerde -} - -type CancelImportTaskOutput struct { - - // The ID of the task being canceled. - ImportTaskId *string - - // The current state of the task being canceled. - PreviousState *string - - // The current state of the task being canceled. - State *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelImportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelImportTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelImportTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelImportTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelImportTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelImportTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelImportTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelReservedInstancesListing.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelReservedInstancesListing.go deleted file mode 100644 index 5e58bdeb7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelReservedInstancesListing.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels the specified Reserved Instance listing in the Reserved Instance -// Marketplace. For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon EC2 User Guide. -func (c *Client) CancelReservedInstancesListing(ctx context.Context, params *CancelReservedInstancesListingInput, optFns ...func(*Options)) (*CancelReservedInstancesListingOutput, error) { - if params == nil { - params = &CancelReservedInstancesListingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelReservedInstancesListing", params, optFns, c.addOperationCancelReservedInstancesListingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelReservedInstancesListingOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CancelReservedInstancesListing. -type CancelReservedInstancesListingInput struct { - - // The ID of the Reserved Instance listing. - // - // This member is required. - ReservedInstancesListingId *string - - noSmithyDocumentSerde -} - -// Contains the output of CancelReservedInstancesListing. -type CancelReservedInstancesListingOutput struct { - - // The Reserved Instance listing. - ReservedInstancesListings []types.ReservedInstancesListing - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelReservedInstancesListingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelReservedInstancesListing{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelReservedInstancesListing{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelReservedInstancesListing"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelReservedInstancesListingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelReservedInstancesListing(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelReservedInstancesListing(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelReservedInstancesListing", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotFleetRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotFleetRequests.go deleted file mode 100644 index c7403b2cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotFleetRequests.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels the specified Spot Fleet requests. After you cancel a Spot Fleet -// request, the Spot Fleet launches no new instances. You must also specify whether -// a canceled Spot Fleet request should terminate its instances. If you choose to -// terminate the instances, the Spot Fleet request enters the cancelled_terminating -// state. Otherwise, the Spot Fleet request enters the cancelled_running state and -// the instances continue to run until they are interrupted or you terminate them -// manually. -func (c *Client) CancelSpotFleetRequests(ctx context.Context, params *CancelSpotFleetRequestsInput, optFns ...func(*Options)) (*CancelSpotFleetRequestsOutput, error) { - if params == nil { - params = &CancelSpotFleetRequestsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelSpotFleetRequests", params, optFns, c.addOperationCancelSpotFleetRequestsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelSpotFleetRequestsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CancelSpotFleetRequests. -type CancelSpotFleetRequestsInput struct { - - // The IDs of the Spot Fleet requests. - // - // This member is required. - SpotFleetRequestIds []string - - // Indicates whether to terminate the associated instances when the Spot Fleet - // request is canceled. The default is to terminate the instances. To let the - // instances continue to run after the Spot Fleet request is canceled, specify - // no-terminate-instances . - // - // This member is required. - TerminateInstances *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of CancelSpotFleetRequests. -type CancelSpotFleetRequestsOutput struct { - - // Information about the Spot Fleet requests that are successfully canceled. - SuccessfulFleetRequests []types.CancelSpotFleetRequestsSuccessItem - - // Information about the Spot Fleet requests that are not successfully canceled. - UnsuccessfulFleetRequests []types.CancelSpotFleetRequestsErrorItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelSpotFleetRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelSpotFleetRequests{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelSpotFleetRequests{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelSpotFleetRequests"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelSpotFleetRequestsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelSpotFleetRequests(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelSpotFleetRequests(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelSpotFleetRequests", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotInstanceRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotInstanceRequests.go deleted file mode 100644 index 2b438e989..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CancelSpotInstanceRequests.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels one or more Spot Instance requests. Canceling a Spot Instance request -// does not terminate running Spot Instances associated with the request. -func (c *Client) CancelSpotInstanceRequests(ctx context.Context, params *CancelSpotInstanceRequestsInput, optFns ...func(*Options)) (*CancelSpotInstanceRequestsOutput, error) { - if params == nil { - params = &CancelSpotInstanceRequestsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelSpotInstanceRequests", params, optFns, c.addOperationCancelSpotInstanceRequestsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelSpotInstanceRequestsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CancelSpotInstanceRequests. -type CancelSpotInstanceRequestsInput struct { - - // The IDs of the Spot Instance requests. - // - // This member is required. - SpotInstanceRequestIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of CancelSpotInstanceRequests. -type CancelSpotInstanceRequestsOutput struct { - - // The Spot Instance requests. - CancelledSpotInstanceRequests []types.CancelledSpotInstanceRequest - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelSpotInstanceRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCancelSpotInstanceRequests{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCancelSpotInstanceRequests{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelSpotInstanceRequests"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCancelSpotInstanceRequestsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelSpotInstanceRequests(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelSpotInstanceRequests(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelSpotInstanceRequests", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go deleted file mode 100644 index 79678a876..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ConfirmProductInstance.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Determines whether a product code is associated with an instance. This action -// can only be used by the owner of the product code. It is useful when a product -// code owner must verify whether another user's instance is eligible for support. -func (c *Client) ConfirmProductInstance(ctx context.Context, params *ConfirmProductInstanceInput, optFns ...func(*Options)) (*ConfirmProductInstanceOutput, error) { - if params == nil { - params = &ConfirmProductInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ConfirmProductInstance", params, optFns, c.addOperationConfirmProductInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ConfirmProductInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ConfirmProductInstanceInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // The product code. This must be a product code that you own. - // - // This member is required. - ProductCode *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ConfirmProductInstanceOutput struct { - - // The Amazon Web Services account ID of the instance owner. This is only present - // if the product code is attached to the instance. - OwnerId *string - - // The return value of the request. Returns true if the specified product code is - // owned by the requester and associated with the specified instance. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationConfirmProductInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpConfirmProductInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpConfirmProductInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ConfirmProductInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpConfirmProductInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConfirmProductInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opConfirmProductInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ConfirmProductInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyFpgaImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyFpgaImage.go deleted file mode 100644 index b73cf5220..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyFpgaImage.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Copies the specified Amazon FPGA Image (AFI) to the current Region. -func (c *Client) CopyFpgaImage(ctx context.Context, params *CopyFpgaImageInput, optFns ...func(*Options)) (*CopyFpgaImageOutput, error) { - if params == nil { - params = &CopyFpgaImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CopyFpgaImage", params, optFns, c.addOperationCopyFpgaImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CopyFpgaImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CopyFpgaImageInput struct { - - // The ID of the source AFI. - // - // This member is required. - SourceFpgaImageId *string - - // The Region that contains the source AFI. - // - // This member is required. - SourceRegion *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The description for the new AFI. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name for the new AFI. The default is the name of the source AFI. - Name *string - - noSmithyDocumentSerde -} - -type CopyFpgaImageOutput struct { - - // The ID of the new AFI. - FpgaImageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCopyFpgaImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCopyFpgaImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCopyFpgaImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CopyFpgaImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCopyFpgaImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyFpgaImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCopyFpgaImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CopyFpgaImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go deleted file mode 100644 index 301ad0259..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopyImage.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Initiates the copy of an AMI. You can copy an AMI from one Region to another, -// or from a Region to an Outpost. You can't copy an AMI from an Outpost to a -// Region, from one Outpost to another, or within the same Outpost. To copy an AMI -// to another partition, see CreateStoreImageTask (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html) -// . To copy an AMI from one Region to another, specify the source Region using the -// SourceRegion parameter, and specify the destination Region using its endpoint. -// Copies of encrypted backing snapshots for the AMI are encrypted. Copies of -// unencrypted backing snapshots remain unencrypted, unless you set Encrypted -// during the copy operation. You cannot create an unencrypted copy of an encrypted -// backing snapshot. To copy an AMI from a Region to an Outpost, specify the source -// Region using the SourceRegion parameter, and specify the ARN of the destination -// Outpost using DestinationOutpostArn. Backing snapshots copied to an Outpost are -// encrypted by default using the default encryption key for the Region, or a -// different key that you specify in the request using KmsKeyId. Outposts do not -// support unencrypted snapshots. For more information, Amazon EBS local snapshots -// on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami) -// in the Amazon EC2 User Guide. For more information about the prerequisites and -// limits when copying an AMI, see Copy an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) -// in the Amazon EC2 User Guide. -func (c *Client) CopyImage(ctx context.Context, params *CopyImageInput, optFns ...func(*Options)) (*CopyImageOutput, error) { - if params == nil { - params = &CopyImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CopyImage", params, optFns, c.addOperationCopyImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CopyImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CopyImage. -type CopyImageInput struct { - - // The name of the new AMI in the destination Region. - // - // This member is required. - Name *string - - // The ID of the AMI to copy. - // - // This member is required. - SourceImageId *string - - // The name of the Region that contains the AMI to copy. - // - // This member is required. - SourceRegion *string - - // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // in the Amazon EC2 API Reference. - ClientToken *string - - // Indicates whether to include your user-defined AMI tags when copying the AMI. - // The following tags will not be copied: - // - System tags (prefixed with aws: ) - // - For public and shared AMIs, user-defined tags that are attached by other - // Amazon Web Services accounts - // Default: Your user-defined AMI tags are not copied. - CopyImageTags *bool - - // A description for the new AMI in the destination Region. - Description *string - - // The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only - // specify this parameter when copying an AMI from an Amazon Web Services Region to - // an Outpost. The AMI must be in the Region of the destination Outpost. You cannot - // copy an AMI from an Outpost to a Region, from one Outpost to another, or within - // the same Outpost. For more information, see Copy AMIs from an Amazon Web - // Services Region to an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis) - // in the Amazon EC2 User Guide. - DestinationOutpostArn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specifies whether the destination snapshots of the copied image should be - // encrypted. You can encrypt a copy of an unencrypted snapshot, but you cannot - // create an unencrypted copy of an encrypted snapshot. The default KMS key for - // Amazon EBS is used unless you specify a non-default Key Management Service (KMS) - // KMS key using KmsKeyId . For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon EC2 User Guide. - Encrypted *bool - - // The identifier of the symmetric Key Management Service (KMS) KMS key to use - // when creating encrypted volumes. If this parameter is not specified, your Amazon - // Web Services managed KMS key for Amazon EBS is used. If you specify a KMS key, - // you must also set the encrypted state to true . You can specify a KMS key using - // any of the following: - // - Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. - // - Key alias. For example, alias/ExampleAlias. - // - Key ARN. For example, - // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - Alias ARN. For example, - // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you - // specify an identifier that is not valid, the action can appear to complete, but - // eventually fails. The specified KMS key must exist in the destination Region. - // Amazon EBS does not support asymmetric KMS keys. - KmsKeyId *string - - noSmithyDocumentSerde -} - -// Contains the output of CopyImage. -type CopyImageOutput struct { - - // The ID of the new AMI. - ImageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCopyImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCopyImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCopyImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CopyImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCopyImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopyImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCopyImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CopyImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopySnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopySnapshot.go deleted file mode 100644 index 4478fd0e4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CopySnapshot.go +++ /dev/null @@ -1,332 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Copies a point-in-time snapshot of an EBS volume and stores it in Amazon S3. -// You can copy a snapshot within the same Region, from one Region to another, or -// from a Region to an Outpost. You can't copy a snapshot from an Outpost to a -// Region, from one Outpost to another, or within the same Outpost. You can use the -// snapshot to create EBS volumes or Amazon Machine Images (AMIs). When copying -// snapshots to a Region, copies of encrypted EBS snapshots remain encrypted. -// Copies of unencrypted snapshots remain unencrypted, unless you enable encryption -// for the snapshot copy operation. By default, encrypted snapshot copies use the -// default Key Management Service (KMS) KMS key; however, you can specify a -// different KMS key. To copy an encrypted snapshot that has been shared from -// another account, you must have permissions for the KMS key used to encrypt the -// snapshot. Snapshots copied to an Outpost are encrypted by default using the -// default encryption key for the Region, or a different key that you specify in -// the request using KmsKeyId. Outposts do not support unencrypted snapshots. For -// more information, Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami) -// in the Amazon Elastic Compute Cloud User Guide. Snapshots created by copying -// another snapshot have an arbitrary volume ID that should not be used for any -// purpose. For more information, see Copy an Amazon EBS snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CopySnapshot(ctx context.Context, params *CopySnapshotInput, optFns ...func(*Options)) (*CopySnapshotOutput, error) { - if params == nil { - params = &CopySnapshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CopySnapshot", params, optFns, c.addOperationCopySnapshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CopySnapshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CopySnapshotInput struct { - - // The ID of the Region that contains the snapshot to be copied. - // - // This member is required. - SourceRegion *string - - // The ID of the EBS snapshot to copy. - // - // This member is required. - SourceSnapshotId *string - - // A description for the EBS snapshot. - Description *string - - // The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. - // Only specify this parameter when copying a snapshot from an Amazon Web Services - // Region to an Outpost. The snapshot must be in the Region for the destination - // Outpost. You cannot copy a snapshot from an Outpost to a Region, from one - // Outpost to another, or within the same Outpost. For more information, see Copy - // snapshots from an Amazon Web Services Region to an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-snapshots) - // in the Amazon Elastic Compute Cloud User Guide. - DestinationOutpostArn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // To encrypt a copy of an unencrypted snapshot if encryption by default is not - // enabled, enable encryption using this parameter. Otherwise, omit this parameter. - // Encrypted snapshots are encrypted, even if you omit this parameter and - // encryption by default is not enabled. You cannot set this parameter to false. - // For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool - - // The identifier of the Key Management Service (KMS) KMS key to use for Amazon - // EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS - // is used. If KmsKeyId is specified, the encrypted state must be true . You can - // specify the KMS key using any of the following: - // - Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. - // - Key alias. For example, alias/ExampleAlias. - // - Key ARN. For example, - // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - Alias ARN. For example, - // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you - // specify an ID, alias, or ARN that is not valid, the action can appear to - // complete, but eventually fails. - KmsKeyId *string - - // When you copy an encrypted source snapshot using the Amazon EC2 Query API, you - // must supply a pre-signed URL. This parameter is optional for unencrypted - // snapshots. For more information, see Query requests (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html) - // . The PresignedUrl should use the snapshot source endpoint, the CopySnapshot - // action, and include the SourceRegion , SourceSnapshotId , and DestinationRegion - // parameters. The PresignedUrl must be signed using Amazon Web Services Signature - // Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm - // for this parameter uses the same logic that is described in Authenticating - // Requests: Using Query Parameters (Amazon Web Services Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) - // in the Amazon Simple Storage Service API Reference. An invalid or improperly - // signed PresignedUrl will cause the copy operation to fail asynchronously, and - // the snapshot will move to an error state. - PresignedUrl *string - - // The tags to apply to the new snapshot. - TagSpecifications []types.TagSpecification - - // Used by the SDK's PresignURL autofill customization to specify the region the - // of the client's request. - destinationRegion *string - - noSmithyDocumentSerde -} - -type CopySnapshotOutput struct { - - // The ID of the new snapshot. - SnapshotId *string - - // Any tags applied to the new snapshot. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCopySnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCopySnapshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCopySnapshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CopySnapshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addCopySnapshotPresignURLMiddleware(stack, options); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCopySnapshotValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCopySnapshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func copyCopySnapshotInputForPresign(params interface{}) (interface{}, error) { - input, ok := params.(*CopySnapshotInput) - if !ok { - return nil, fmt.Errorf("expect *CopySnapshotInput type, got %T", params) - } - cpy := *input - return &cpy, nil -} -func getCopySnapshotPresignedUrl(params interface{}) (string, bool, error) { - input, ok := params.(*CopySnapshotInput) - if !ok { - return ``, false, fmt.Errorf("expect *CopySnapshotInput type, got %T", params) - } - if input.PresignedUrl == nil || len(*input.PresignedUrl) == 0 { - return ``, false, nil - } - return *input.PresignedUrl, true, nil -} -func getCopySnapshotSourceRegion(params interface{}) (string, bool, error) { - input, ok := params.(*CopySnapshotInput) - if !ok { - return ``, false, fmt.Errorf("expect *CopySnapshotInput type, got %T", params) - } - if input.SourceRegion == nil || len(*input.SourceRegion) == 0 { - return ``, false, nil - } - return *input.SourceRegion, true, nil -} -func setCopySnapshotPresignedUrl(params interface{}, value string) error { - input, ok := params.(*CopySnapshotInput) - if !ok { - return fmt.Errorf("expect *CopySnapshotInput type, got %T", params) - } - input.PresignedUrl = &value - return nil -} -func setCopySnapshotdestinationRegion(params interface{}, value string) error { - input, ok := params.(*CopySnapshotInput) - if !ok { - return fmt.Errorf("expect *CopySnapshotInput type, got %T", params) - } - input.destinationRegion = &value - return nil -} -func addCopySnapshotPresignURLMiddleware(stack *middleware.Stack, options Options) error { - return presignedurlcust.AddMiddleware(stack, presignedurlcust.Options{ - Accessor: presignedurlcust.ParameterAccessor{ - GetPresignedURL: getCopySnapshotPresignedUrl, - - GetSourceRegion: getCopySnapshotSourceRegion, - - CopyInput: copyCopySnapshotInputForPresign, - - SetDestinationRegion: setCopySnapshotdestinationRegion, - - SetPresignedURL: setCopySnapshotPresignedUrl, - }, - Presigner: &presignAutoFillCopySnapshotClient{client: NewPresignClient(New(options))}, - }) -} - -type presignAutoFillCopySnapshotClient struct { - client *PresignClient -} - -// PresignURL is a middleware accessor that satisfies URLPresigner interface. -func (c *presignAutoFillCopySnapshotClient) PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error) { - input, ok := params.(*CopySnapshotInput) - if !ok { - return nil, fmt.Errorf("expect *CopySnapshotInput type, got %T", params) - } - optFn := func(o *Options) { - o.Region = srcRegion - o.APIOptions = append(o.APIOptions, presignedurlcust.RemoveMiddleware) - } - presignOptFn := WithPresignClientFromClientOptions(optFn) - return c.client.PresignCopySnapshot(ctx, input, presignOptFn) -} - -func newServiceMetadataMiddleware_opCopySnapshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CopySnapshot", - } -} - -// PresignCopySnapshot is used to generate a presigned HTTP Request which contains -// presigned URL, signed headers and HTTP method used. -func (c *PresignClient) PresignCopySnapshot(ctx context.Context, params *CopySnapshotInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) { - if params == nil { - params = &CopySnapshotInput{} - } - options := c.options.copy() - for _, fn := range optFns { - fn(&options) - } - clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption) - - result, _, err := c.client.invokeOperation(ctx, "CopySnapshot", params, clientOptFns, - c.client.addOperationCopySnapshotMiddlewares, - presignConverter(options).convertToPresignMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*v4.PresignedHTTPRequest) - return out, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservation.go deleted file mode 100644 index c3bef2a38..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservation.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates a new Capacity Reservation with the specified attributes. Capacity -// Reservations enable you to reserve capacity for your Amazon EC2 instances in a -// specific Availability Zone for any duration. This gives you the flexibility to -// selectively add capacity reservations and still get the Regional RI discounts -// for that usage. By creating Capacity Reservations, you ensure that you always -// have access to Amazon EC2 capacity when you need it, for as long as you need it. -// For more information, see Capacity Reservations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon EC2 User Guide. Your request to create a Capacity Reservation -// could fail if Amazon EC2 does not have sufficient capacity to fulfill the -// request. If your request fails due to Amazon EC2 capacity constraints, either -// try again at a later time, try in a different Availability Zone, or request a -// smaller capacity reservation. If your application is flexible across instance -// types and sizes, try to create a Capacity Reservation with different instance -// attributes. Your request could also fail if the requested quantity exceeds your -// On-Demand Instance limit for the selected instance type. If your request fails -// due to limit constraints, increase your On-Demand Instance limit for the -// required instance type and try again. For more information about increasing your -// instance limits, see Amazon EC2 Service Quotas (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateCapacityReservation(ctx context.Context, params *CreateCapacityReservationInput, optFns ...func(*Options)) (*CreateCapacityReservationOutput, error) { - if params == nil { - params = &CreateCapacityReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCapacityReservation", params, optFns, c.addOperationCreateCapacityReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCapacityReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateCapacityReservationInput struct { - - // The number of instances for which to reserve capacity. Valid range: 1 - 1000 - // - // This member is required. - InstanceCount *int32 - - // The type of operating system for which to reserve capacity. - // - // This member is required. - InstancePlatform types.CapacityReservationInstancePlatform - - // The instance type for which to reserve capacity. For more information, see - // Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - // - // This member is required. - InstanceType *string - - // The Availability Zone in which to create the Capacity Reservation. - AvailabilityZone *string - - // The ID of the Availability Zone in which to create the Capacity Reservation. - AvailabilityZoneId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether the Capacity Reservation supports EBS-optimized instances. - // This optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using an - // EBS- optimized instance. - EbsOptimized *bool - - // The date and time at which the Capacity Reservation expires. When a Capacity - // Reservation expires, the reserved capacity is released and you can no longer - // launch instances into it. The Capacity Reservation's state changes to expired - // when it reaches its end date and time. You must provide an EndDate value if - // EndDateType is limited . Omit EndDate if EndDateType is unlimited . If the - // EndDateType is limited , the Capacity Reservation is cancelled within an hour - // from the specified time. For example, if you specify 5/31/2019, 13:30:55, the - // Capacity Reservation is guaranteed to end between 13:30:55 and 14:30:55 on - // 5/31/2019. - EndDate *time.Time - - // Indicates the way in which the Capacity Reservation ends. A Capacity - // Reservation can have one of the following end types: - // - unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. Do not provide an EndDate if the EndDateType is unlimited . - // - limited - The Capacity Reservation expires automatically at a specified date - // and time. You must provide an EndDate value if the EndDateType value is - // limited . - EndDateType types.EndDateType - - // Deprecated. - EphemeralStorage *bool - - // Indicates the type of instance launches that the Capacity Reservation accepts. - // The options include: - // - open - The Capacity Reservation automatically matches all instances that - // have matching attributes (instance type, platform, and Availability Zone). - // Instances that have matching attributes run in the Capacity Reservation - // automatically without specifying any additional parameters. - // - targeted - The Capacity Reservation only accepts instances that have - // matching attributes (instance type, platform, and Availability Zone), and - // explicitly target the Capacity Reservation. This ensures that only permitted - // instances can use the reserved capacity. - // Default: open - InstanceMatchCriteria types.InstanceMatchCriteria - - // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity - // Reservation. - OutpostArn *string - - // The Amazon Resource Name (ARN) of the cluster placement group in which to - // create the Capacity Reservation. For more information, see Capacity - // Reservations for cluster placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html) - // in the Amazon EC2 User Guide. - PlacementGroupArn *string - - // The tags to apply to the Capacity Reservation during launch. - TagSpecifications []types.TagSpecification - - // Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can - // have one of the following tenancy settings: - // - default - The Capacity Reservation is created on hardware that is shared - // with other Amazon Web Services accounts. - // - dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single Amazon Web Services account. - Tenancy types.CapacityReservationTenancy - - noSmithyDocumentSerde -} - -type CreateCapacityReservationOutput struct { - - // Information about the Capacity Reservation. - CapacityReservation *types.CapacityReservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCapacityReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCapacityReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCapacityReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateCapacityReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCapacityReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCapacityReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservationFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservationFleet.go deleted file mode 100644 index 05da75a4e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCapacityReservationFleet.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates a Capacity Reservation Fleet. For more information, see Create a -// Capacity Reservation Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-cr-fleets.html#create-crfleet) -// in the Amazon EC2 User Guide. -func (c *Client) CreateCapacityReservationFleet(ctx context.Context, params *CreateCapacityReservationFleetInput, optFns ...func(*Options)) (*CreateCapacityReservationFleetOutput, error) { - if params == nil { - params = &CreateCapacityReservationFleetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCapacityReservationFleet", params, optFns, c.addOperationCreateCapacityReservationFleetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCapacityReservationFleetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateCapacityReservationFleetInput struct { - - // Information about the instance types for which to reserve the capacity. - // - // This member is required. - InstanceTypeSpecifications []types.ReservationFleetInstanceSpecification - - // The total number of capacity units to be reserved by the Capacity Reservation - // Fleet. This value, together with the instance type weights that you assign to - // each instance type used by the Fleet determine the number of instances for which - // the Fleet reserves capacity. Both values are based on units that make sense for - // your workload. For more information, see Total target capacity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) - // in the Amazon EC2 User Guide. - // - // This member is required. - TotalTargetCapacity *int32 - - // The strategy used by the Capacity Reservation Fleet to determine which of the - // specified instance types to use. Currently, only the prioritized allocation - // strategy is supported. For more information, see Allocation strategy (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy) - // in the Amazon EC2 User Guide. Valid values: prioritized - AllocationStrategy *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The date and time at which the Capacity Reservation Fleet expires. When the - // Capacity Reservation Fleet expires, its state changes to expired and all of the - // Capacity Reservations in the Fleet expire. The Capacity Reservation Fleet - // expires within an hour after the specified time. For example, if you specify - // 5/31/2019 , 13:30:55 , the Capacity Reservation Fleet is guaranteed to expire - // between 13:30:55 and 14:30:55 on 5/31/2019 . - EndDate *time.Time - - // Indicates the type of instance launches that the Capacity Reservation Fleet - // accepts. All Capacity Reservations in the Fleet inherit this instance matching - // criteria. Currently, Capacity Reservation Fleets support open instance matching - // criteria only. This means that instances that have matching attributes (instance - // type, platform, and Availability Zone) run in the Capacity Reservations - // automatically. Instances do not need to explicitly target a Capacity Reservation - // Fleet to use its reserved capacity. - InstanceMatchCriteria types.FleetInstanceMatchCriteria - - // The tags to assign to the Capacity Reservation Fleet. The tags are - // automatically assigned to the Capacity Reservations in the Fleet. - TagSpecifications []types.TagSpecification - - // Indicates the tenancy of the Capacity Reservation Fleet. All Capacity - // Reservations in the Fleet inherit this tenancy. The Capacity Reservation Fleet - // can have one of the following tenancy settings: - // - default - The Capacity Reservation Fleet is created on hardware that is - // shared with other Amazon Web Services accounts. - // - dedicated - The Capacity Reservations are created on single-tenant hardware - // that is dedicated to a single Amazon Web Services account. - Tenancy types.FleetCapacityReservationTenancy - - noSmithyDocumentSerde -} - -type CreateCapacityReservationFleetOutput struct { - - // The allocation strategy used by the Capacity Reservation Fleet. - AllocationStrategy *string - - // The ID of the Capacity Reservation Fleet. - CapacityReservationFleetId *string - - // The date and time at which the Capacity Reservation Fleet was created. - CreateTime *time.Time - - // The date and time at which the Capacity Reservation Fleet expires. - EndDate *time.Time - - // Information about the individual Capacity Reservations in the Capacity - // Reservation Fleet. - FleetCapacityReservations []types.FleetCapacityReservation - - // The instance matching criteria for the Capacity Reservation Fleet. - InstanceMatchCriteria types.FleetInstanceMatchCriteria - - // The status of the Capacity Reservation Fleet. - State types.CapacityReservationFleetState - - // The tags assigned to the Capacity Reservation Fleet. - Tags []types.Tag - - // Indicates the tenancy of Capacity Reservation Fleet. - Tenancy types.FleetCapacityReservationTenancy - - // The requested capacity units that have been successfully reserved. - TotalFulfilledCapacity *float64 - - // The total number of capacity units for which the Capacity Reservation Fleet - // reserves capacity. - TotalTargetCapacity *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCapacityReservationFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCapacityReservationFleet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCapacityReservationFleet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCapacityReservationFleet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateCapacityReservationFleetMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateCapacityReservationFleetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCapacityReservationFleet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateCapacityReservationFleet struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateCapacityReservationFleet) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateCapacityReservationFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateCapacityReservationFleetInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCapacityReservationFleetInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateCapacityReservationFleetMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCapacityReservationFleet{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateCapacityReservationFleet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCapacityReservationFleet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCarrierGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCarrierGateway.go deleted file mode 100644 index 9cbfde83c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCarrierGateway.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a carrier gateway. For more information about carrier gateways, see -// Carrier gateways (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#wavelength-carrier-gateway) -// in the Amazon Web Services Wavelength Developer Guide. -func (c *Client) CreateCarrierGateway(ctx context.Context, params *CreateCarrierGatewayInput, optFns ...func(*Options)) (*CreateCarrierGatewayOutput, error) { - if params == nil { - params = &CreateCarrierGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCarrierGateway", params, optFns, c.addOperationCreateCarrierGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCarrierGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateCarrierGatewayInput struct { - - // The ID of the VPC to associate with the carrier gateway. - // - // This member is required. - VpcId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to associate with the carrier gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateCarrierGatewayOutput struct { - - // Information about the carrier gateway. - CarrierGateway *types.CarrierGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCarrierGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCarrierGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCarrierGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCarrierGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateCarrierGatewayMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateCarrierGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCarrierGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateCarrierGateway struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateCarrierGateway) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateCarrierGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateCarrierGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateCarrierGatewayInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateCarrierGatewayMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateCarrierGateway{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateCarrierGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCarrierGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnEndpoint.go deleted file mode 100644 index 87ff490be..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnEndpoint.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Client VPN endpoint. A Client VPN endpoint is the resource you create -// and configure to enable and manage client VPN sessions. It is the destination -// endpoint at which all client VPN sessions are terminated. -func (c *Client) CreateClientVpnEndpoint(ctx context.Context, params *CreateClientVpnEndpointInput, optFns ...func(*Options)) (*CreateClientVpnEndpointOutput, error) { - if params == nil { - params = &CreateClientVpnEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateClientVpnEndpoint", params, optFns, c.addOperationCreateClientVpnEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateClientVpnEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateClientVpnEndpointInput struct { - - // Information about the authentication method to be used to authenticate clients. - // - // This member is required. - AuthenticationOptions []types.ClientVpnAuthenticationRequest - - // The IPv4 address range, in CIDR notation, from which to assign client IP - // addresses. The address range cannot overlap with the local CIDR of the VPC in - // which the associated subnet is located, or the routes that you add manually. The - // address range cannot be changed after the Client VPN endpoint has been created. - // Client CIDR range must have a size of at least /22 and must not be greater than - // /12. - // - // This member is required. - ClientCidrBlock *string - - // Information about the client connection logging options. If you enable client - // connection logging, data about client connections is sent to a Cloudwatch Logs - // log stream. The following information is logged: - // - Client connection requests - // - Client connection results (successful and unsuccessful) - // - Reasons for unsuccessful client connection requests - // - Client connection termination time - // - // This member is required. - ConnectionLogOptions *types.ConnectionLogOptions - - // The ARN of the server certificate. For more information, see the Certificate - // Manager User Guide (https://docs.aws.amazon.com/acm/latest/userguide/) . - // - // This member is required. - ServerCertificateArn *string - - // The options for managing connection authorization for new client connections. - ClientConnectOptions *types.ClientConnectOptions - - // Options for enabling a customizable text banner that will be displayed on - // Amazon Web Services provided clients when a VPN session is established. - ClientLoginBannerOptions *types.ClientLoginBannerOptions - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A brief description of the Client VPN endpoint. - Description *string - - // Information about the DNS servers to be used for DNS resolution. A Client VPN - // endpoint can have up to two DNS servers. If no DNS server is specified, the DNS - // address configured on the device is used for the DNS server. - DnsServers []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of one or more security groups to apply to the target network. You must - // also specify the ID of the VPC that contains the security groups. - SecurityGroupIds []string - - // Specify whether to enable the self-service portal for the Client VPN endpoint. - // Default Value: enabled - SelfServicePortal types.SelfServicePortal - - // The maximum VPN session duration time in hours. Valid values: 8 | 10 | 12 | 24 - // Default value: 24 - SessionTimeoutHours *int32 - - // Indicates whether split-tunnel is enabled on the Client VPN endpoint. By - // default, split-tunnel on a VPN endpoint is disabled. For information about - // split-tunnel VPN endpoints, see Split-tunnel Client VPN endpoint (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) - // in the Client VPN Administrator Guide. - SplitTunnel *bool - - // The tags to apply to the Client VPN endpoint during creation. - TagSpecifications []types.TagSpecification - - // The transport protocol to be used by the VPN session. Default value: udp - TransportProtocol types.TransportProtocol - - // The ID of the VPC to associate with the Client VPN endpoint. If no security - // group IDs are specified in the request, the default security group for the VPC - // is applied. - VpcId *string - - // The port number to assign to the Client VPN endpoint for TCP and UDP traffic. - // Valid Values: 443 | 1194 Default Value: 443 - VpnPort *int32 - - noSmithyDocumentSerde -} - -type CreateClientVpnEndpointOutput struct { - - // The ID of the Client VPN endpoint. - ClientVpnEndpointId *string - - // The DNS name to be used by clients when establishing their VPN session. - DnsName *string - - // The current state of the Client VPN endpoint. - Status *types.ClientVpnEndpointStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateClientVpnEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateClientVpnEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateClientVpnEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateClientVpnEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateClientVpnEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateClientVpnEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateClientVpnEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateClientVpnEndpoint struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateClientVpnEndpoint) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateClientVpnEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateClientVpnEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateClientVpnEndpointInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateClientVpnEndpointMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateClientVpnEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateClientVpnEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateClientVpnEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnRoute.go deleted file mode 100644 index d93112f8d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateClientVpnRoute.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds a route to a network to a Client VPN endpoint. Each Client VPN endpoint -// has a route table that describes the available destination network routes. Each -// route in the route table specifies the path for traffic to specific resources or -// networks. -func (c *Client) CreateClientVpnRoute(ctx context.Context, params *CreateClientVpnRouteInput, optFns ...func(*Options)) (*CreateClientVpnRouteOutput, error) { - if params == nil { - params = &CreateClientVpnRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateClientVpnRoute", params, optFns, c.addOperationCreateClientVpnRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateClientVpnRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateClientVpnRouteInput struct { - - // The ID of the Client VPN endpoint to which to add the route. - // - // This member is required. - ClientVpnEndpointId *string - - // The IPv4 address range, in CIDR notation, of the route destination. For - // example: - // - To add a route for Internet access, enter 0.0.0.0/0 - // - To add a route for a peered VPC, enter the peered VPC's IPv4 CIDR range - // - To add a route for an on-premises network, enter the Amazon Web Services - // Site-to-Site VPN connection's IPv4 CIDR range - // - To add a route for the local network, enter the client CIDR range - // - // This member is required. - DestinationCidrBlock *string - - // The ID of the subnet through which you want to route traffic. The specified - // subnet must be an existing target network of the Client VPN endpoint. - // Alternatively, if you're adding a route for the local network, specify local . - // - // This member is required. - TargetVpcSubnetId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A brief description of the route. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CreateClientVpnRouteOutput struct { - - // The current state of the route. - Status *types.ClientVpnRouteStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateClientVpnRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateClientVpnRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateClientVpnRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateClientVpnRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateClientVpnRouteMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateClientVpnRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateClientVpnRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateClientVpnRoute struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateClientVpnRoute) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateClientVpnRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateClientVpnRouteInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateClientVpnRouteInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateClientVpnRouteMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateClientVpnRoute{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateClientVpnRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateClientVpnRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCoipCidr.go deleted file mode 100644 index 24d38e46e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCoipCidr.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a range of customer-owned IP addresses. -func (c *Client) CreateCoipCidr(ctx context.Context, params *CreateCoipCidrInput, optFns ...func(*Options)) (*CreateCoipCidrOutput, error) { - if params == nil { - params = &CreateCoipCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCoipCidr", params, optFns, c.addOperationCreateCoipCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCoipCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateCoipCidrInput struct { - - // A customer-owned IP address range to create. - // - // This member is required. - Cidr *string - - // The ID of the address pool. - // - // This member is required. - CoipPoolId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CreateCoipCidrOutput struct { - - // Information about a range of customer-owned IP addresses. - CoipCidr *types.CoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCoipCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCoipCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCoipCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateCoipCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCoipCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateCoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCoipCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCoipPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCoipPool.go deleted file mode 100644 index 7e3bc08c9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCoipPool.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a pool of customer-owned IP (CoIP) addresses. -func (c *Client) CreateCoipPool(ctx context.Context, params *CreateCoipPoolInput, optFns ...func(*Options)) (*CreateCoipPoolOutput, error) { - if params == nil { - params = &CreateCoipPoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCoipPool", params, optFns, c.addOperationCreateCoipPoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCoipPoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateCoipPoolInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the CoIP address pool. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateCoipPoolOutput struct { - - // Information about the CoIP address pool. - CoipPool *types.CoipPool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCoipPoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCoipPool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCoipPool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCoipPool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateCoipPoolValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCoipPool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateCoipPool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCoipPool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCustomerGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCustomerGateway.go deleted file mode 100644 index 6b76ad115..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateCustomerGateway.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Provides information to Amazon Web Services about your customer gateway device. -// The customer gateway device is the appliance at your end of the VPN connection. -// You must provide the IP address of the customer gateway device’s external -// interface. The IP address must be static and can be behind a device performing -// network address translation (NAT). For devices that use Border Gateway Protocol -// (BGP), you can also provide the device's BGP Autonomous System Number (ASN). You -// can use an existing ASN assigned to your network. If you don't have an ASN -// already, you can use a private ASN. For more information, see Customer gateway -// options for your Site-to-Site VPN connection (https://docs.aws.amazon.com/vpn/latest/s2svpn/cgw-options.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. To create more than one -// customer gateway with the same VPN type, IP address, and BGP ASN, specify a -// unique device name for each customer gateway. An identical request returns -// information about the existing customer gateway; it doesn't create a new -// customer gateway. -func (c *Client) CreateCustomerGateway(ctx context.Context, params *CreateCustomerGatewayInput, optFns ...func(*Options)) (*CreateCustomerGatewayOutput, error) { - if params == nil { - params = &CreateCustomerGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCustomerGateway", params, optFns, c.addOperationCreateCustomerGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCustomerGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateCustomerGateway. -type CreateCustomerGatewayInput struct { - - // The type of VPN connection that this customer gateway supports ( ipsec.1 ). - // - // This member is required. - Type types.GatewayType - - // For devices that support BGP, the customer gateway's BGP ASN. Default: 65000 - BgpAsn *int32 - - // The Amazon Resource Name (ARN) for the customer gateway certificate. - CertificateArn *string - - // A name for the customer gateway device. Length Constraints: Up to 255 - // characters. - DeviceName *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // IPv4 address for the customer gateway device's outside interface. The address - // must be static. - IpAddress *string - - // This member has been deprecated. The Internet-routable IP address for the - // customer gateway's outside interface. The address must be static. - PublicIp *string - - // The tags to apply to the customer gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -// Contains the output of CreateCustomerGateway. -type CreateCustomerGatewayOutput struct { - - // Information about the customer gateway. - CustomerGateway *types.CustomerGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCustomerGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateCustomerGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateCustomerGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCustomerGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateCustomerGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomerGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateCustomerGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCustomerGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go deleted file mode 100644 index 4294b69de..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultSubnet.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a default subnet with a size /20 IPv4 CIDR block in the specified -// Availability Zone in your default VPC. You can have only one default subnet per -// Availability Zone. For more information, see Create a default subnet (https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html#create-default-subnet) -// in the Amazon VPC User Guide. -func (c *Client) CreateDefaultSubnet(ctx context.Context, params *CreateDefaultSubnetInput, optFns ...func(*Options)) (*CreateDefaultSubnetOutput, error) { - if params == nil { - params = &CreateDefaultSubnetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateDefaultSubnet", params, optFns, c.addOperationCreateDefaultSubnetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateDefaultSubnetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateDefaultSubnetInput struct { - - // The Availability Zone in which to create the default subnet. - // - // This member is required. - AvailabilityZone *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether to create an IPv6 only subnet. If you already have a default - // subnet for this Availability Zone, you must delete it before you can create an - // IPv6 only subnet. - Ipv6Native *bool - - noSmithyDocumentSerde -} - -type CreateDefaultSubnetOutput struct { - - // Information about the subnet. - Subnet *types.Subnet - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateDefaultSubnetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateDefaultSubnet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateDefaultSubnet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDefaultSubnet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateDefaultSubnetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDefaultSubnet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateDefaultSubnet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateDefaultSubnet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultVpc.go deleted file mode 100644 index ec5bca3ec..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDefaultVpc.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a default VPC with a size /16 IPv4 CIDR block and a default subnet in -// each Availability Zone. For more information about the components of a default -// VPC, see Default VPCs (https://docs.aws.amazon.com/vpc/latest/userguide/default-vpc.html) -// in the Amazon VPC User Guide. You cannot specify the components of the default -// VPC yourself. If you deleted your previous default VPC, you can create a default -// VPC. You cannot have more than one default VPC per Region. -func (c *Client) CreateDefaultVpc(ctx context.Context, params *CreateDefaultVpcInput, optFns ...func(*Options)) (*CreateDefaultVpcOutput, error) { - if params == nil { - params = &CreateDefaultVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateDefaultVpc", params, optFns, c.addOperationCreateDefaultVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateDefaultVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateDefaultVpcInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CreateDefaultVpcOutput struct { - - // Information about the VPC. - Vpc *types.Vpc - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateDefaultVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateDefaultVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateDefaultVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDefaultVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDefaultVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateDefaultVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateDefaultVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDhcpOptions.go deleted file mode 100644 index 71cac933d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateDhcpOptions.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a set of DHCP options for your VPC. After creating the set, you must -// associate it with the VPC, causing all existing and new instances that you -// launch in the VPC to use this set of DHCP options. The following are the -// individual DHCP options you can specify. For more information about the options, -// see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt) . -// - domain-name-servers - The IP addresses of up to four domain name servers, or -// AmazonProvidedDNS. The default DHCP option set specifies AmazonProvidedDNS. If -// specifying more than one domain name server, specify the IP addresses in a -// single parameter, separated by commas. To have your instance receive a custom -// DNS hostname as specified in domain-name , you must set domain-name-servers to -// a custom DNS server. -// - domain-name - If you're using AmazonProvidedDNS in us-east-1 , specify -// ec2.internal . If you're using AmazonProvidedDNS in another Region, specify -// region.compute.internal (for example, ap-northeast-1.compute.internal ). -// Otherwise, specify a domain name (for example, ExampleCompany.com ). This -// value is used to complete unqualified DNS hostnames. Important: Some Linux -// operating systems accept multiple domain names separated by spaces. However, -// Windows and other Linux operating systems treat the value as a single domain, -// which results in unexpected behavior. If your DHCP options set is associated -// with a VPC that has instances with multiple operating systems, specify only one -// domain name. -// - ntp-servers - The IP addresses of up to four Network Time Protocol (NTP) -// servers. -// - netbios-name-servers - The IP addresses of up to four NetBIOS name servers. -// - netbios-node-type - The NetBIOS node type (1, 2, 4, or 8). We recommend that -// you specify 2 (broadcast and multicast are not currently supported). For more -// information about these node types, see RFC 2132 (http://www.ietf.org/rfc/rfc2132.txt) -// . -// -// Your VPC automatically starts out with a set of DHCP options that includes only -// a DNS server that we provide (AmazonProvidedDNS). If you create a set of -// options, and if your VPC has an internet gateway, make sure to set the -// domain-name-servers option either to AmazonProvidedDNS or to a domain name -// server of your choice. For more information, see DHCP options sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateDhcpOptions(ctx context.Context, params *CreateDhcpOptionsInput, optFns ...func(*Options)) (*CreateDhcpOptionsOutput, error) { - if params == nil { - params = &CreateDhcpOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateDhcpOptions", params, optFns, c.addOperationCreateDhcpOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateDhcpOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateDhcpOptionsInput struct { - - // A DHCP configuration option. - // - // This member is required. - DhcpConfigurations []types.NewDhcpConfiguration - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the DHCP option. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateDhcpOptionsOutput struct { - - // A set of DHCP options. - DhcpOptions *types.DhcpOptions - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateDhcpOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateDhcpOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateDhcpOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateDhcpOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateDhcpOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateDhcpOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateEgressOnlyInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateEgressOnlyInternetGateway.go deleted file mode 100644 index d8c1795f4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateEgressOnlyInternetGateway.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// [IPv6 only] Creates an egress-only internet gateway for your VPC. An -// egress-only internet gateway is used to enable outbound communication over IPv6 -// from instances in your VPC to the internet, and prevents hosts outside of your -// VPC from initiating an IPv6 connection with your instance. -func (c *Client) CreateEgressOnlyInternetGateway(ctx context.Context, params *CreateEgressOnlyInternetGatewayInput, optFns ...func(*Options)) (*CreateEgressOnlyInternetGatewayOutput, error) { - if params == nil { - params = &CreateEgressOnlyInternetGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateEgressOnlyInternetGateway", params, optFns, c.addOperationCreateEgressOnlyInternetGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateEgressOnlyInternetGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateEgressOnlyInternetGatewayInput struct { - - // The ID of the VPC for which to create the egress-only internet gateway. - // - // This member is required. - VpcId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the egress-only internet gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateEgressOnlyInternetGatewayOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. - ClientToken *string - - // Information about the egress-only internet gateway. - EgressOnlyInternetGateway *types.EgressOnlyInternetGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateEgressOnlyInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateEgressOnlyInternetGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateEgressOnlyInternetGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEgressOnlyInternetGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateEgressOnlyInternetGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEgressOnlyInternetGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateEgressOnlyInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateEgressOnlyInternetGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go deleted file mode 100644 index f54ee8fc1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFleet.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates an EC2 Fleet that contains the configuration information for On-Demand -// Instances and Spot Instances. Instances are launched immediately if there is -// available capacity. A single EC2 Fleet can include multiple launch -// specifications that vary by instance type, AMI, Availability Zone, or subnet. -// For more information, see EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateFleet(ctx context.Context, params *CreateFleetInput, optFns ...func(*Options)) (*CreateFleetOutput, error) { - if params == nil { - params = &CreateFleetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateFleet", params, optFns, c.addOperationCreateFleetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateFleetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateFleetInput struct { - - // The configuration for the EC2 Fleet. - // - // This member is required. - LaunchTemplateConfigs []types.FleetLaunchTemplateConfigRequest - - // The number of units to request. - // - // This member is required. - TargetCapacitySpecification *types.TargetCapacitySpecificationRequest - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Reserved. - Context *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether running instances should be terminated if the total target - // capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet. - // Supported only for fleets of type maintain . - ExcessCapacityTerminationPolicy types.FleetExcessCapacityTerminationPolicy - - // Describes the configuration of On-Demand Instances in an EC2 Fleet. - OnDemandOptions *types.OnDemandOptionsRequest - - // Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported - // only for fleets of type maintain . For more information, see EC2 Fleet health - // checks (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) - // in the Amazon EC2 User Guide. - ReplaceUnhealthyInstances *bool - - // Describes the configuration of Spot Instances in an EC2 Fleet. - SpotOptions *types.SpotOptionsRequest - - // The key-value pair for tagging the EC2 Fleet request on creation. For more - // information, see Tag your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) - // . If the fleet type is instant , specify a resource type of fleet to tag the - // fleet or instance to tag the instances at launch. If the fleet type is maintain - // or request , specify a resource type of fleet to tag the fleet. You cannot - // specify a resource type of instance . To tag instances at launch, specify the - // tags in a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) - // . - TagSpecifications []types.TagSpecification - - // Indicates whether running instances should be terminated when the EC2 Fleet - // expires. - TerminateInstancesWithExpiration *bool - - // The fleet type. The default value is maintain . - // - maintain - The EC2 Fleet places an asynchronous request for your desired - // capacity, and continues to maintain your desired Spot capacity by replenishing - // interrupted Spot Instances. - // - request - The EC2 Fleet places an asynchronous one-time request for your - // desired capacity, but does submit Spot requests in alternative capacity pools if - // Spot capacity is unavailable, and does not maintain Spot capacity if Spot - // Instances are interrupted. - // - instant - The EC2 Fleet places a synchronous one-time request for your - // desired capacity, and returns errors for any instances that could not be - // launched. - // For more information, see EC2 Fleet request types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-request-type.html) - // in the Amazon EC2 User Guide. - Type types.FleetType - - // The start date and time of the request, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request - // immediately. - ValidFrom *time.Time - - // The end date and time of the request, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). At this point, no new EC2 Fleet requests are placed or - // able to fulfill the request. If no value is specified, the request remains until - // you cancel it. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -type CreateFleetOutput struct { - - // Information about the instances that could not be launched by the fleet. - // Supported only for fleets of type instant . - Errors []types.CreateFleetError - - // The ID of the EC2 Fleet. - FleetId *string - - // Information about the instances that were launched by the fleet. Supported only - // for fleets of type instant . - Instances []types.CreateFleetInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateFleet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateFleet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFleet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateFleetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFleet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateFleet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateFleet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go deleted file mode 100644 index f81a0780d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFlowLogs.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates one or more flow logs to capture information about IP traffic for a -// specific network interface, subnet, or VPC. Flow log data for a monitored -// network interface is recorded as flow log records, which are log events -// consisting of fields that describe the traffic flow. For more information, see -// Flow log records (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records) -// in the Amazon Virtual Private Cloud User Guide. When publishing to CloudWatch -// Logs, flow log records are published to a log group, and each network interface -// has a unique log stream in the log group. When publishing to Amazon S3, flow log -// records for all of the monitored network interfaces are published to a single -// log file object that is stored in the specified bucket. For more information, -// see VPC Flow Logs (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html) -// in the Amazon Virtual Private Cloud User Guide. -func (c *Client) CreateFlowLogs(ctx context.Context, params *CreateFlowLogsInput, optFns ...func(*Options)) (*CreateFlowLogsOutput, error) { - if params == nil { - params = &CreateFlowLogsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateFlowLogs", params, optFns, c.addOperationCreateFlowLogsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateFlowLogsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateFlowLogsInput struct { - - // The IDs of the resources to monitor. For example, if the resource type is VPC , - // specify the IDs of the VPCs. Constraints: Maximum of 25 for transit gateway - // resource types. Maximum of 1000 for the other resource types. - // - // This member is required. - ResourceIds []string - - // The type of resource to monitor. - // - // This member is required. - ResourceType types.FlowLogsResourceType - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The ARN of the IAM role that allows Amazon EC2 to publish flow logs across - // accounts. - DeliverCrossAccountRole *string - - // The ARN of the IAM role that allows Amazon EC2 to publish flow logs to a - // CloudWatch Logs log group in your account. This parameter is required if the - // destination type is cloud-watch-logs and unsupported otherwise. - DeliverLogsPermissionArn *string - - // The destination options. - DestinationOptions *types.DestinationOptionsRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The destination for the flow log data. The meaning of this parameter depends on - // the destination type. - // - If the destination type is cloud-watch-logs , specify the ARN of a - // CloudWatch Logs log group. For example: - // arn:aws:logs:region:account_id:log-group:my_group Alternatively, use the - // LogGroupName parameter. - // - If the destination type is s3 , specify the ARN of an S3 bucket. For - // example: arn:aws:s3:::my_bucket/my_subfolder/ The subfolder is optional. Note - // that you can't use AWSLogs as a subfolder name. - // - If the destination type is kinesis-data-firehose , specify the ARN of a - // Kinesis Data Firehose delivery stream. For example: - // arn:aws:firehose:region:account_id:deliverystream:my_stream - LogDestination *string - - // The type of destination for the flow log data. Default: cloud-watch-logs - LogDestinationType types.LogDestinationType - - // The fields to include in the flow log record. List the fields in the order in - // which they should appear. If you omit this parameter, the flow log is created - // using the default format. If you specify this parameter, you must include at - // least one field. For more information about the available fields, see Flow log - // records (https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html#flow-log-records) - // in the Amazon VPC User Guide or Transit Gateway Flow Log records (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-flow-logs.html#flow-log-records) - // in the Amazon Web Services Transit Gateway Guide. Specify the fields using the - // ${field-id} format, separated by spaces. - LogFormat *string - - // The name of a new or existing CloudWatch Logs log group where Amazon EC2 - // publishes your flow logs. This parameter is valid only if the destination type - // is cloud-watch-logs . - LogGroupName *string - - // The maximum interval of time during which a flow of packets is captured and - // aggregated into a flow log record. The possible values are 60 seconds (1 minute) - // or 600 seconds (10 minutes). This parameter must be 60 seconds for transit - // gateway resource types. When a network interface is attached to a Nitro-based - // instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // , the aggregation interval is always 60 seconds or less, regardless of the value - // that you specify. Default: 600 - MaxAggregationInterval *int32 - - // The tags to apply to the flow logs. - TagSpecifications []types.TagSpecification - - // The type of traffic to monitor (accepted traffic, rejected traffic, or all - // traffic). This parameter is not supported for transit gateway resource types. It - // is required for the other resource types. - TrafficType types.TrafficType - - noSmithyDocumentSerde -} - -type CreateFlowLogsOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. - ClientToken *string - - // The IDs of the flow logs. - FlowLogIds []string - - // Information about the flow logs that could not be created successfully. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateFlowLogsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateFlowLogs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateFlowLogs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFlowLogs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateFlowLogsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFlowLogs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateFlowLogs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFpgaImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFpgaImage.go deleted file mode 100644 index 6294a9619..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateFpgaImage.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an Amazon FPGA Image (AFI) from the specified design checkpoint (DCP). -// The create operation is asynchronous. To verify that the AFI is ready for use, -// check the output logs. An AFI contains the FPGA bitstream that is ready to -// download to an FPGA. You can securely deploy an AFI on multiple FPGA-accelerated -// instances. For more information, see the Amazon Web Services FPGA Hardware -// Development Kit (https://github.com/aws/aws-fpga/) . -func (c *Client) CreateFpgaImage(ctx context.Context, params *CreateFpgaImageInput, optFns ...func(*Options)) (*CreateFpgaImageOutput, error) { - if params == nil { - params = &CreateFpgaImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateFpgaImage", params, optFns, c.addOperationCreateFpgaImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateFpgaImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateFpgaImageInput struct { - - // The location of the encrypted design checkpoint in Amazon S3. The input must be - // a tarball. - // - // This member is required. - InputStorageLocation *types.StorageLocation - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the AFI. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The location in Amazon S3 for the output logs. - LogsStorageLocation *types.StorageLocation - - // A name for the AFI. - Name *string - - // The tags to apply to the FPGA image during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateFpgaImageOutput struct { - - // The global FPGA image identifier (AGFI ID). - FpgaImageGlobalId *string - - // The FPGA image identifier (AFI ID). - FpgaImageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateFpgaImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateFpgaImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateFpgaImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFpgaImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateFpgaImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFpgaImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateFpgaImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateFpgaImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go deleted file mode 100644 index 2d57f4880..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateImage.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is -// either running or stopped. If you customized your instance with instance store -// volumes or Amazon EBS volumes in addition to the root device volume, the new AMI -// contains block device mapping information for those volumes. When you launch an -// instance from this new AMI, the instance automatically launches with those -// additional volumes. For more information, see Create an Amazon EBS-backed Linux -// AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateImage(ctx context.Context, params *CreateImageInput, optFns ...func(*Options)) (*CreateImageOutput, error) { - if params == nil { - params = &CreateImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateImage", params, optFns, c.addOperationCreateImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateImageInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // A name for the new image. Constraints: 3-128 alphanumeric characters, - // parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), - // dashes (-), single quotes ('), at-signs (@), or underscores(_) - // - // This member is required. - Name *string - - // The block device mappings. When using the CreateImage action: - // - You can't change the volume size using the VolumeSize parameter. If you - // want a different volume size, you must first change the volume size of the - // source instance. - // - You can't modify the encryption status of existing volumes or snapshots. To - // create an AMI with volumes or snapshots that have a different encryption status - // (for example, where the source volume and snapshots are unencrypted, and you - // want to create an AMI with encrypted volumes or snapshots), use the CopyImage - // action. - // - The only option that can be changed for existing mappings or snapshots is - // DeleteOnTermination . - BlockDeviceMappings []types.BlockDeviceMapping - - // A description for the new image. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether or not the instance should be automatically rebooted before - // creating the image. Specify one of the following values: - // - true - The instance is not rebooted before creating the image. This creates - // crash-consistent snapshots that include only the data that has been written to - // the volumes at the time the snapshots are created. Buffered data and data in - // memory that has not yet been written to the volumes is not included in the - // snapshots. - // - false - The instance is rebooted before creating the image. This ensures - // that all buffered data and data in memory is written to the volumes before the - // snapshots are created. - // Default: false - NoReboot *bool - - // The tags to apply to the AMI and snapshots on creation. You can tag the AMI, - // the snapshots, or both. - // - To tag the AMI, the value for ResourceType must be image . - // - To tag the snapshots that are created of the root volume and of other - // Amazon EBS volumes that are attached to the instance, the value for - // ResourceType must be snapshot . The same tag is applied to all of the - // snapshots that are created. - // If you specify other values for ResourceType , the request fails. To tag an AMI - // or snapshot after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html) - // . - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateImageOutput struct { - - // The ID of the new AMI. - ImageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceConnectEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceConnectEndpoint.go deleted file mode 100644 index 091b7e56f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceConnectEndpoint.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an EC2 Instance Connect Endpoint. An EC2 Instance Connect Endpoint -// allows you to connect to an instance, without requiring the instance to have a -// public IPv4 address. For more information, see Connect to your instances -// without requiring a public IPv4 address using EC2 Instance Connect Endpoint (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect-Endpoint.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateInstanceConnectEndpoint(ctx context.Context, params *CreateInstanceConnectEndpointInput, optFns ...func(*Options)) (*CreateInstanceConnectEndpointOutput, error) { - if params == nil { - params = &CreateInstanceConnectEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateInstanceConnectEndpoint", params, optFns, c.addOperationCreateInstanceConnectEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateInstanceConnectEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateInstanceConnectEndpointInput struct { - - // The ID of the subnet in which to create the EC2 Instance Connect Endpoint. - // - // This member is required. - SubnetId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether your client's IP address is preserved as the source. The - // value is true or false . - // - If true , your client's IP address is used when you connect to a resource. - // - If false , the elastic network interface IP address is used when you connect - // to a resource. - // Default: true - PreserveClientIp *bool - - // One or more security groups to associate with the endpoint. If you don't - // specify a security group, the default security group for your VPC will be - // associated with the endpoint. - SecurityGroupIds []string - - // The tags to apply to the EC2 Instance Connect Endpoint during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateInstanceConnectEndpointOutput struct { - - // Unique, case-sensitive idempotency token provided by the client in the the - // request. - ClientToken *string - - // Information about the EC2 Instance Connect Endpoint. - InstanceConnectEndpoint *types.Ec2InstanceConnectEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateInstanceConnectEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInstanceConnectEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInstanceConnectEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInstanceConnectEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateInstanceConnectEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateInstanceConnectEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceConnectEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateInstanceConnectEndpoint struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateInstanceConnectEndpoint) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateInstanceConnectEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateInstanceConnectEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateInstanceConnectEndpointInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateInstanceConnectEndpointMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateInstanceConnectEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateInstanceConnectEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateInstanceConnectEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceEventWindow.go deleted file mode 100644 index 32c3693b7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceEventWindow.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an event window in which scheduled events for the associated Amazon EC2 -// instances can run. You can define either a set of time ranges or a cron -// expression when creating the event window, but not both. All event window times -// are in UTC. You can create up to 200 event windows per Amazon Web Services -// Region. When you create the event window, targets (instance IDs, Dedicated Host -// IDs, or tags) are not yet associated with it. To ensure that the event window -// can be used, you must associate one or more targets with it by using the -// AssociateInstanceEventWindow API. Event windows are applicable only for -// scheduled events that stop, reboot, or terminate instances. Event windows are -// not applicable for: -// - Expedited scheduled events and network maintenance events. -// - Unscheduled maintenance such as AutoRecovery and unplanned reboots. -// -// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateInstanceEventWindow(ctx context.Context, params *CreateInstanceEventWindowInput, optFns ...func(*Options)) (*CreateInstanceEventWindowOutput, error) { - if params == nil { - params = &CreateInstanceEventWindowInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateInstanceEventWindow", params, optFns, c.addOperationCreateInstanceEventWindowMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateInstanceEventWindowOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateInstanceEventWindowInput struct { - - // The cron expression for the event window, for example, * 0-4,20-23 * * 1,5 . If - // you specify a cron expression, you can't specify a time range. Constraints: - // - Only hour and day of the week values are supported. - // - For day of the week values, you can specify either integers 0 through 6 , or - // alternative single values SUN through SAT . - // - The minute, month, and year must be specified by * . - // - The hour value must be one or a multiple range, for example, 0-4 or - // 0-4,20-23 . - // - Each hour range must be >= 2 hours, for example, 0-2 or 20-23 . - // - The event window must be >= 4 hours. The combined total time ranges in the - // event window must be >= 4 hours. - // For more information about cron expressions, see cron (https://en.wikipedia.org/wiki/Cron) - // on the Wikipedia website. - CronExpression *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name of the event window. - Name *string - - // The tags to apply to the event window. - TagSpecifications []types.TagSpecification - - // The time range for the event window. If you specify a time range, you can't - // specify a cron expression. - TimeRanges []types.InstanceEventWindowTimeRangeRequest - - noSmithyDocumentSerde -} - -type CreateInstanceEventWindowOutput struct { - - // Information about the event window. - InstanceEventWindow *types.InstanceEventWindow - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInstanceEventWindow"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceEventWindow(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateInstanceEventWindow", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceExportTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceExportTask.go deleted file mode 100644 index 936c31fa7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInstanceExportTask.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Exports a running or stopped instance to an Amazon S3 bucket. For information -// about the prerequisites for your Amazon S3 bucket, supported operating systems, -// image formats, and known limitations for the types of instances you can export, -// see Exporting an instance as a VM Using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html) -// in the VM Import/Export User Guide. -func (c *Client) CreateInstanceExportTask(ctx context.Context, params *CreateInstanceExportTaskInput, optFns ...func(*Options)) (*CreateInstanceExportTaskOutput, error) { - if params == nil { - params = &CreateInstanceExportTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateInstanceExportTask", params, optFns, c.addOperationCreateInstanceExportTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateInstanceExportTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateInstanceExportTaskInput struct { - - // The format and location for an export instance task. - // - // This member is required. - ExportToS3Task *types.ExportToS3TaskSpecification - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // The target virtualization environment. - // - // This member is required. - TargetEnvironment types.ExportEnvironment - - // A description for the conversion task or the resource being exported. The - // maximum length is 255 characters. - Description *string - - // The tags to apply to the export instance task during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateInstanceExportTaskOutput struct { - - // Information about the export instance task. - ExportTask *types.ExportTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateInstanceExportTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInstanceExportTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInstanceExportTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInstanceExportTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateInstanceExportTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInstanceExportTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateInstanceExportTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateInstanceExportTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInternetGateway.go deleted file mode 100644 index 4d93c43b8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateInternetGateway.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an internet gateway for use with a VPC. After creating the internet -// gateway, you attach it to a VPC using AttachInternetGateway . For more -// information, see Internet gateways (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Internet_Gateway.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateInternetGateway(ctx context.Context, params *CreateInternetGatewayInput, optFns ...func(*Options)) (*CreateInternetGatewayOutput, error) { - if params == nil { - params = &CreateInternetGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateInternetGateway", params, optFns, c.addOperationCreateInternetGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateInternetGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateInternetGatewayInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the internet gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateInternetGatewayOutput struct { - - // Information about the internet gateway. - InternetGateway *types.InternetGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateInternetGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateInternetGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateInternetGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateInternetGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateInternetGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpam.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpam.go deleted file mode 100644 index 4cdf8449d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpam.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Create an IPAM. Amazon VPC IP Address Manager (IPAM) is a VPC feature that you -// can use to automate your IP address management workflows including assigning, -// tracking, troubleshooting, and auditing IP addresses across Amazon Web Services -// Regions and accounts throughout your Amazon Web Services Organization. For more -// information, see Create an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) CreateIpam(ctx context.Context, params *CreateIpamInput, optFns ...func(*Options)) (*CreateIpamOutput, error) { - if params == nil { - params = &CreateIpamInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateIpam", params, optFns, c.addOperationCreateIpamMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateIpamOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateIpamInput struct { - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the IPAM. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The operating Regions for the IPAM. Operating Regions are Amazon Web Services - // Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only - // discovers and monitors resources in the Amazon Web Services Regions you select - // as operating Regions. For more information about operating Regions, see Create - // an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) in the - // Amazon VPC IPAM User Guide. - OperatingRegions []types.AddIpamOperatingRegion - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - TagSpecifications []types.TagSpecification - - // IPAM is offered in a Free Tier and an Advanced Tier. For more information about - // the features available in each tier and the costs associated with the tiers, see - // Amazon VPC pricing > IPAM tab (http://aws.amazon.com/vpc/pricing/) . - Tier types.IpamTier - - noSmithyDocumentSerde -} - -type CreateIpamOutput struct { - - // Information about the IPAM created. - Ipam *types.Ipam - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateIpamMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateIpam{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateIpam{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIpam"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateIpamMiddleware(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIpam(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateIpam struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateIpam) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateIpam) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateIpamInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateIpamInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateIpamMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateIpam{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateIpam(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateIpam", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go deleted file mode 100644 index cdb8144d5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamPool.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Create an IP address pool for Amazon VPC IP Address Manager (IPAM). In IPAM, a -// pool is a collection of contiguous IP addresses CIDRs. Pools enable you to -// organize your IP addresses according to your routing and security needs. For -// example, if you have separate routing and security needs for development and -// production applications, you can create a pool for each. For more information, -// see Create a top-level pool (https://docs.aws.amazon.com/vpc/latest/ipam/create-top-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) CreateIpamPool(ctx context.Context, params *CreateIpamPoolInput, optFns ...func(*Options)) (*CreateIpamPoolOutput, error) { - if params == nil { - params = &CreateIpamPoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateIpamPool", params, optFns, c.addOperationCreateIpamPoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateIpamPoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateIpamPoolInput struct { - - // The IP protocol assigned to this IPAM pool. You must choose either IPv4 or IPv6 - // protocol for a pool. - // - // This member is required. - AddressFamily types.AddressFamily - - // The ID of the scope in which you would like to create the IPAM pool. - // - // This member is required. - IpamScopeId *string - - // The default netmask length for allocations added to this pool. If, for example, - // the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new - // allocations will default to 10.0.0.0/16. - AllocationDefaultNetmaskLength *int32 - - // The maximum netmask length possible for CIDR allocations in this IPAM pool to - // be compliant. The maximum netmask length must be greater than the minimum - // netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible - // netmask lengths for IPv6 addresses are 0 - 128. - AllocationMaxNetmaskLength *int32 - - // The minimum netmask length required for CIDR allocations in this IPAM pool to - // be compliant. The minimum netmask length must be less than the maximum netmask - // length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask - // lengths for IPv6 addresses are 0 - 128. - AllocationMinNetmaskLength *int32 - - // Tags that are required for resources that use CIDRs from this IPAM pool. - // Resources that do not have these tags will not be allowed to allocate space from - // the pool. If the resources have their tags changed after they have allocated - // space or if the allocation tagging requirements are changed on the pool, the - // resource may be marked as noncompliant. - AllocationResourceTags []types.RequestIpamResourceTag - - // If selected, IPAM will continuously look for resources within the CIDR range of - // this pool and automatically import them as allocations into your IPAM. The CIDRs - // that will be allocated for these resources must not already be allocated to - // other resources in order for the import to succeed. IPAM will import a CIDR - // regardless of its compliance with the pool's allocation rules, so a resource - // might be imported and subsequently marked as noncompliant. If IPAM discovers - // multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM - // discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of - // them only. A locale must be set on the pool for this feature to work. - AutoImport *bool - - // Limits which service in Amazon Web Services that the pool can be used in. - // "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. - AwsService types.IpamPoolAwsService - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the IPAM pool. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // In IPAM, the locale is the Amazon Web Services Region where you want to make an - // IPAM pool available for allocations. Only resources in the same Region as the - // locale of the pool can get IP address allocations from the pool. You can only - // allocate a CIDR for a VPC, for example, from an IPAM pool that shares a locale - // with the VPC’s Region. Note that once you choose a Locale for a pool, you cannot - // modify it. If you do not choose a locale, resources in Regions others than the - // IPAM's home region cannot use CIDRs from this pool. Possible values: Any Amazon - // Web Services Region, such as us-east-1. - Locale *string - - // The IP address source for pools in the public scope. Only used for provisioning - // IP address CIDRs to pools in the public scope. Default is byoip . For more - // information, see Create IPv6 pools (https://docs.aws.amazon.com/vpc/latest/ipam/intro-create-ipv6-pools.html) - // in the Amazon VPC IPAM User Guide. By default, you can add only one - // Amazon-provided IPv6 CIDR block to a top-level IPv6 pool if PublicIpSource is - // amazon . For information on increasing the default limit, see Quotas for your - // IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html) in the - // Amazon VPC IPAM User Guide. - PublicIpSource types.IpamPoolPublicIpSource - - // Determines if the pool is publicly advertisable. This option is not available - // for pools with AddressFamily set to ipv4 . - PubliclyAdvertisable *bool - - // The ID of the source IPAM pool. Use this option to create a pool within an - // existing pool. Note that the CIDR you provision for the pool within the source - // pool must be available in the source pool's CIDR range. - SourceIpamPoolId *string - - // The resource used to provision CIDRs to a resource planning pool. - SourceResource *types.IpamPoolSourceResourceRequest - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateIpamPoolOutput struct { - - // Information about the IPAM pool created. - IpamPool *types.IpamPool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateIpamPoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateIpamPool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateIpamPool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIpamPool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateIpamPoolMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateIpamPoolValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIpamPool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateIpamPool struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateIpamPool) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateIpamPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateIpamPoolInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateIpamPoolInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateIpamPoolMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateIpamPool{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateIpamPool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateIpamPool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamResourceDiscovery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamResourceDiscovery.go deleted file mode 100644 index ed56fe645..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamResourceDiscovery.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an IPAM resource discovery. A resource discovery is an IPAM component -// that enables IPAM to manage and monitor resources that belong to the owning -// account. -func (c *Client) CreateIpamResourceDiscovery(ctx context.Context, params *CreateIpamResourceDiscoveryInput, optFns ...func(*Options)) (*CreateIpamResourceDiscoveryOutput, error) { - if params == nil { - params = &CreateIpamResourceDiscoveryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateIpamResourceDiscovery", params, optFns, c.addOperationCreateIpamResourceDiscoveryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateIpamResourceDiscoveryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateIpamResourceDiscoveryInput struct { - - // A client token for the IPAM resource discovery. - ClientToken *string - - // A description for the IPAM resource discovery. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Operating Regions for the IPAM resource discovery. Operating Regions are Amazon - // Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM - // only discovers and monitors resources in the Amazon Web Services Regions you - // select as operating Regions. - OperatingRegions []types.AddIpamOperatingRegion - - // Tag specifications for the IPAM resource discovery. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateIpamResourceDiscoveryOutput struct { - - // An IPAM resource discovery. - IpamResourceDiscovery *types.IpamResourceDiscovery - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateIpamResourceDiscoveryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIpamResourceDiscovery"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateIpamResourceDiscoveryMiddleware(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIpamResourceDiscovery(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateIpamResourceDiscovery struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateIpamResourceDiscovery) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateIpamResourceDiscovery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateIpamResourceDiscoveryInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateIpamResourceDiscoveryInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateIpamResourceDiscoveryMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateIpamResourceDiscovery{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateIpamResourceDiscovery(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateIpamResourceDiscovery", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamScope.go deleted file mode 100644 index b50c229b7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateIpamScope.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Create an IPAM scope. In IPAM, a scope is the highest-level container within -// IPAM. An IPAM contains two default scopes. Each scope represents the IP space -// for a single network. The private scope is intended for all private IP address -// space. The public scope is intended for all public IP address space. Scopes -// enable you to reuse IP addresses across multiple unconnected networks without -// causing IP address overlap or conflict. For more information, see Add a scope (https://docs.aws.amazon.com/vpc/latest/ipam/add-scope-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) CreateIpamScope(ctx context.Context, params *CreateIpamScopeInput, optFns ...func(*Options)) (*CreateIpamScopeOutput, error) { - if params == nil { - params = &CreateIpamScopeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateIpamScope", params, optFns, c.addOperationCreateIpamScopeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateIpamScopeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateIpamScopeInput struct { - - // The ID of the IPAM for which you're creating this scope. - // - // This member is required. - IpamId *string - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the scope you're creating. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateIpamScopeOutput struct { - - // Information about the created scope. - IpamScope *types.IpamScope - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateIpamScopeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateIpamScope{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateIpamScope{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateIpamScope"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateIpamScopeMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateIpamScopeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateIpamScope(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateIpamScope struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateIpamScope) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateIpamScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateIpamScopeInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateIpamScopeInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateIpamScopeMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateIpamScope{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateIpamScope(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateIpamScope", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateKeyPair.go deleted file mode 100644 index 701563031..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateKeyPair.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an ED25519 or 2048-bit RSA key pair with the specified name and in the -// specified PEM or PPK format. Amazon EC2 stores the public key and displays the -// private key for you to save to a file. The private key is returned as an -// unencrypted PEM encoded PKCS#1 private key or an unencrypted PPK formatted -// private key for use with PuTTY. If a key with the specified name already exists, -// Amazon EC2 returns an error. The key pair returned to you is available only in -// the Amazon Web Services Region in which you create it. If you prefer, you can -// create your own key pair using a third-party tool and upload it to any Region -// using ImportKeyPair . You can have up to 5,000 key pairs per Amazon Web Services -// Region. For more information, see Amazon EC2 key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateKeyPair(ctx context.Context, params *CreateKeyPairInput, optFns ...func(*Options)) (*CreateKeyPairOutput, error) { - if params == nil { - params = &CreateKeyPairInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateKeyPair", params, optFns, c.addOperationCreateKeyPairMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateKeyPairOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateKeyPairInput struct { - - // A unique name for the key pair. Constraints: Up to 255 ASCII characters - // - // This member is required. - KeyName *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The format of the key pair. Default: pem - KeyFormat types.KeyFormat - - // The type of key pair. Note that ED25519 keys are not supported for Windows - // instances. Default: rsa - KeyType types.KeyType - - // The tags to apply to the new key pair. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -// Describes a key pair. -type CreateKeyPairOutput struct { - - // - For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER - // encoded private key. - // - For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 - // digest, which is the default for OpenSSH, starting with OpenSSH 6.8. - KeyFingerprint *string - - // An unencrypted PEM encoded RSA or ED25519 private key. - KeyMaterial *string - - // The name of the key pair. - KeyName *string - - // The ID of the key pair. - KeyPairId *string - - // Any tags applied to the key pair. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateKeyPair{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateKeyPair{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateKeyPair"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateKeyPairValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeyPair(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateKeyPair(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateKeyPair", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplate.go deleted file mode 100644 index 00c6864cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplate.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a launch template. A launch template contains the parameters to launch -// an instance. When you launch an instance using RunInstances , you can specify a -// launch template instead of providing the launch parameters in the request. For -// more information, see Launch an instance from a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) -// in the Amazon Elastic Compute Cloud User Guide. If you want to clone an existing -// launch template as the basis for creating a new launch template, you can use the -// Amazon EC2 console. The API, SDKs, and CLI do not support cloning a template. -// For more information, see Create a launch template from an existing launch -// template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateLaunchTemplate(ctx context.Context, params *CreateLaunchTemplateInput, optFns ...func(*Options)) (*CreateLaunchTemplateOutput, error) { - if params == nil { - params = &CreateLaunchTemplateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLaunchTemplate", params, optFns, c.addOperationCreateLaunchTemplateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLaunchTemplateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLaunchTemplateInput struct { - - // The information for the launch template. - // - // This member is required. - LaunchTemplateData *types.RequestLaunchTemplateData - - // A name for the launch template. - // - // This member is required. - LaunchTemplateName *string - - // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraint: Maximum 128 ASCII characters. - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the launch template on creation. To tag the launch - // template, the resource type must be launch-template . To specify the tags for - // the resources that are created when an instance is launched, you must use the - // TagSpecifications parameter in the launch template data (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestLaunchTemplateData.html) - // structure. - TagSpecifications []types.TagSpecification - - // A description for the first version of the launch template. - VersionDescription *string - - noSmithyDocumentSerde -} - -type CreateLaunchTemplateOutput struct { - - // Information about the launch template. - LaunchTemplate *types.LaunchTemplate - - // If the launch template contains parameters or parameter combinations that are - // not valid, an error code and an error message are returned for each issue that's - // found. - Warning *types.ValidationWarning - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLaunchTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLaunchTemplate{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLaunchTemplate{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLaunchTemplate"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateLaunchTemplateValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchTemplate(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateLaunchTemplate(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLaunchTemplate", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplateVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplateVersion.go deleted file mode 100644 index 223576bd8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLaunchTemplateVersion.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new version of a launch template. You can specify an existing version -// of launch template from which to base the new version. Launch template versions -// are numbered in the order in which they are created. You cannot specify, change, -// or replace the numbering of launch template versions. Launch templates are -// immutable; after you create a launch template, you can't modify it. Instead, you -// can create a new version of the launch template that includes any changes you -// require. For more information, see Modify a launch template (manage launch -// template versions) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateLaunchTemplateVersion(ctx context.Context, params *CreateLaunchTemplateVersionInput, optFns ...func(*Options)) (*CreateLaunchTemplateVersionOutput, error) { - if params == nil { - params = &CreateLaunchTemplateVersionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLaunchTemplateVersion", params, optFns, c.addOperationCreateLaunchTemplateVersionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLaunchTemplateVersionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLaunchTemplateVersionInput struct { - - // The information for the launch template. - // - // This member is required. - LaunchTemplateData *types.RequestLaunchTemplateData - - // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraint: Maximum 128 ASCII characters. - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the launch template. You must specify either the LaunchTemplateId or - // the LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify the LaunchTemplateName or the - // LaunchTemplateId , but not both. - LaunchTemplateName *string - - // If true , and if a Systems Manager parameter is specified for ImageId , the AMI - // ID is displayed in the response for imageID . For more information, see Use a - // Systems Manager parameter instead of an AMI ID (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id) - // in the Amazon Elastic Compute Cloud User Guide. Default: false - ResolveAlias *bool - - // The version number of the launch template version on which to base the new - // version. The new version inherits the same launch parameters as the source - // version, except for parameters that you specify in LaunchTemplateData . - // Snapshots applied to the block device mapping are ignored when creating a new - // version unless they are explicitly included. - SourceVersion *string - - // A description for the version of the launch template. - VersionDescription *string - - noSmithyDocumentSerde -} - -type CreateLaunchTemplateVersionOutput struct { - - // Information about the launch template version. - LaunchTemplateVersion *types.LaunchTemplateVersion - - // If the new version of the launch template contains parameters or parameter - // combinations that are not valid, an error code and an error message are returned - // for each issue that's found. - Warning *types.ValidationWarning - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLaunchTemplateVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLaunchTemplateVersion{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLaunchTemplateVersion{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLaunchTemplateVersion"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateLaunchTemplateVersionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLaunchTemplateVersion(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateLaunchTemplateVersion(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLaunchTemplateVersion", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRoute.go deleted file mode 100644 index 926e5e241..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRoute.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a static route for the specified local gateway route table. You must -// specify one of the following targets: -// - LocalGatewayVirtualInterfaceGroupId -// - NetworkInterfaceId -func (c *Client) CreateLocalGatewayRoute(ctx context.Context, params *CreateLocalGatewayRouteInput, optFns ...func(*Options)) (*CreateLocalGatewayRouteOutput, error) { - if params == nil { - params = &CreateLocalGatewayRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLocalGatewayRoute", params, optFns, c.addOperationCreateLocalGatewayRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLocalGatewayRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLocalGatewayRouteInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // The CIDR range used for destination matches. Routing decisions are based on the - // most specific match. - DestinationCidrBlock *string - - // The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock . - // You cannot use DestinationPrefixListId and DestinationCidrBlock in the same - // request. - DestinationPrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the virtual interface group. - LocalGatewayVirtualInterfaceGroupId *string - - // The ID of the network interface. - NetworkInterfaceId *string - - noSmithyDocumentSerde -} - -type CreateLocalGatewayRouteOutput struct { - - // Information about the route. - Route *types.LocalGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLocalGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLocalGatewayRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLocalGatewayRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLocalGatewayRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateLocalGatewayRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocalGatewayRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateLocalGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLocalGatewayRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTable.go deleted file mode 100644 index 7e7880971..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTable.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a local gateway route table. -func (c *Client) CreateLocalGatewayRouteTable(ctx context.Context, params *CreateLocalGatewayRouteTableInput, optFns ...func(*Options)) (*CreateLocalGatewayRouteTableOutput, error) { - if params == nil { - params = &CreateLocalGatewayRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLocalGatewayRouteTable", params, optFns, c.addOperationCreateLocalGatewayRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLocalGatewayRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLocalGatewayRouteTableInput struct { - - // The ID of the local gateway. - // - // This member is required. - LocalGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The mode of the local gateway route table. - Mode types.LocalGatewayRouteTableMode - - // The tags assigned to the local gateway route table. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateLocalGatewayRouteTableOutput struct { - - // Information about the local gateway route table. - LocalGatewayRouteTable *types.LocalGatewayRouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLocalGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLocalGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLocalGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLocalGatewayRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateLocalGatewayRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocalGatewayRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateLocalGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLocalGatewayRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go deleted file mode 100644 index c529d69cd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a local gateway route table virtual interface group association. -func (c *Client) CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation(ctx context.Context, params *CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput, optFns ...func(*Options)) (*CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput, error) { - if params == nil { - params = &CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation", params, optFns, c.addOperationCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // The ID of the local gateway route table virtual interface group association. - // - // This member is required. - LocalGatewayVirtualInterfaceGroupId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags assigned to the local gateway route table virtual interface group - // association. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput struct { - - // Information about the local gateway route table virtual interface group - // association. - LocalGatewayRouteTableVirtualInterfaceGroupAssociation *types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go deleted file mode 100644 index 2c3ae45dc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateLocalGatewayRouteTableVpcAssociation.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates the specified VPC with the specified local gateway route table. -func (c *Client) CreateLocalGatewayRouteTableVpcAssociation(ctx context.Context, params *CreateLocalGatewayRouteTableVpcAssociationInput, optFns ...func(*Options)) (*CreateLocalGatewayRouteTableVpcAssociationOutput, error) { - if params == nil { - params = &CreateLocalGatewayRouteTableVpcAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateLocalGatewayRouteTableVpcAssociation", params, optFns, c.addOperationCreateLocalGatewayRouteTableVpcAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateLocalGatewayRouteTableVpcAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateLocalGatewayRouteTableVpcAssociationInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the local gateway route table VPC association. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateLocalGatewayRouteTableVpcAssociationOutput struct { - - // Information about the association. - LocalGatewayRouteTableVpcAssociation *types.LocalGatewayRouteTableVpcAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateLocalGatewayRouteTableVpcAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateLocalGatewayRouteTableVpcAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLocalGatewayRouteTableVpcAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateLocalGatewayRouteTableVpcAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateLocalGatewayRouteTableVpcAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateManagedPrefixList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateManagedPrefixList.go deleted file mode 100644 index 9ddae065a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateManagedPrefixList.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a managed prefix list. You can specify one or more entries for the -// prefix list. Each entry consists of a CIDR block and an optional description. -func (c *Client) CreateManagedPrefixList(ctx context.Context, params *CreateManagedPrefixListInput, optFns ...func(*Options)) (*CreateManagedPrefixListOutput, error) { - if params == nil { - params = &CreateManagedPrefixListInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateManagedPrefixList", params, optFns, c.addOperationCreateManagedPrefixListMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateManagedPrefixListOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateManagedPrefixListInput struct { - - // The IP address type. Valid Values: IPv4 | IPv6 - // - // This member is required. - AddressFamily *string - - // The maximum number of entries for the prefix list. - // - // This member is required. - MaxEntries *int32 - - // A name for the prefix list. Constraints: Up to 255 characters in length. The - // name cannot start with com.amazonaws . - // - // This member is required. - PrefixListName *string - - // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraints: Up to 255 UTF-8 characters in length. - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more entries for the prefix list. - Entries []types.AddPrefixListEntry - - // The tags to apply to the prefix list during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateManagedPrefixListOutput struct { - - // Information about the prefix list. - PrefixList *types.ManagedPrefixList - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateManagedPrefixListMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateManagedPrefixList{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateManagedPrefixList{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateManagedPrefixList"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateManagedPrefixListMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateManagedPrefixListValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateManagedPrefixList(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateManagedPrefixList struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateManagedPrefixList) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateManagedPrefixList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateManagedPrefixListInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateManagedPrefixListInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateManagedPrefixListMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateManagedPrefixList{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateManagedPrefixList(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateManagedPrefixList", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go deleted file mode 100644 index 0fcb55cb3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNatGateway.go +++ /dev/null @@ -1,238 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a NAT gateway in the specified subnet. This action creates a network -// interface in the specified subnet with a private IP address from the IP address -// range of the subnet. You can create either a public NAT gateway or a private NAT -// gateway. With a public NAT gateway, internet-bound traffic from a private subnet -// can be routed to the NAT gateway, so that instances in a private subnet can -// connect to the internet. With a private NAT gateway, private communication is -// routed across VPCs and on-premises networks through a transit gateway or virtual -// private gateway. Common use cases include running large workloads behind a small -// pool of allowlisted IPv4 addresses, preserving private IPv4 addresses, and -// communicating between overlapping networks. For more information, see NAT -// gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) -// in the Amazon VPC User Guide. When you create a public NAT gateway and assign it -// an EIP or secondary EIPs, the network border group of the EIPs must match the -// network border group of the Availability Zone (AZ) that the public NAT gateway -// is in. If it's not the same, the NAT gateway will fail to launch. You can see -// the network border group for the subnet's AZ by viewing the details of the -// subnet. Similarly, you can view the network border group of an EIP by viewing -// the details of the EIP address. For more information about network border groups -// and EIPs, see Allocate an Elastic IP address (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#allocate-eip) -// in the Amazon VPC User Guide. -func (c *Client) CreateNatGateway(ctx context.Context, params *CreateNatGatewayInput, optFns ...func(*Options)) (*CreateNatGatewayOutput, error) { - if params == nil { - params = &CreateNatGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNatGateway", params, optFns, c.addOperationCreateNatGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNatGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateNatGatewayInput struct { - - // The ID of the subnet in which to create the NAT gateway. - // - // This member is required. - SubnetId *string - - // [Public NAT gateways only] The allocation ID of an Elastic IP address to - // associate with the NAT gateway. You cannot specify an Elastic IP address with a - // private NAT gateway. If the Elastic IP address is associated with another - // resource, you must first disassociate it. - AllocationId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraint: Maximum 64 ASCII characters. - ClientToken *string - - // Indicates whether the NAT gateway supports public or private connectivity. The - // default is public connectivity. - ConnectivityType types.ConnectivityType - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The private IPv4 address to assign to the NAT gateway. If you don't provide an - // address, a private IPv4 address will be automatically assigned. - PrivateIpAddress *string - - // Secondary EIP allocation IDs. For more information, see Create a NAT gateway (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating) - // in the Amazon VPC User Guide. - SecondaryAllocationIds []string - - // [Private NAT gateway only] The number of secondary private IPv4 addresses you - // want to assign to the NAT gateway. For more information about secondary - // addresses, see Create a NAT gateway (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating) - // in the Amazon VPC User Guide. - SecondaryPrivateIpAddressCount *int32 - - // Secondary private IPv4 addresses. For more information about secondary - // addresses, see Create a NAT gateway (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-creating) - // in the Amazon VPC User Guide. - SecondaryPrivateIpAddresses []string - - // The tags to assign to the NAT gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateNatGatewayOutput struct { - - // Unique, case-sensitive identifier to ensure the idempotency of the request. - // Only returned if a client token was provided in the request. - ClientToken *string - - // Information about the NAT gateway. - NatGateway *types.NatGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNatGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNatGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNatGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNatGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateNatGatewayMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateNatGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNatGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateNatGateway struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateNatGateway) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateNatGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateNatGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNatGatewayInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateNatGatewayMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNatGateway{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateNatGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNatGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAcl.go deleted file mode 100644 index 5cad2b52a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAcl.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a network ACL in a VPC. Network ACLs provide an optional layer of -// security (in addition to security groups) for the instances in your VPC. For -// more information, see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateNetworkAcl(ctx context.Context, params *CreateNetworkAclInput, optFns ...func(*Options)) (*CreateNetworkAclOutput, error) { - if params == nil { - params = &CreateNetworkAclInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNetworkAcl", params, optFns, c.addOperationCreateNetworkAclMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNetworkAclOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateNetworkAclInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the network ACL. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateNetworkAclOutput struct { - - // Unique, case-sensitive identifier to ensure the idempotency of the request. - // Only returned if a client token was provided in the request. - ClientToken *string - - // Information about the network ACL. - NetworkAcl *types.NetworkAcl - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNetworkAclMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkAcl{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkAcl{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNetworkAcl"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateNetworkAclMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateNetworkAclValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkAcl(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateNetworkAcl struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateNetworkAcl) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateNetworkAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateNetworkAclInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNetworkAclInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateNetworkAclMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNetworkAcl{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateNetworkAcl(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNetworkAcl", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAclEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAclEntry.go deleted file mode 100644 index 920d41f62..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkAclEntry.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an entry (a rule) in a network ACL with the specified rule number. Each -// network ACL has a set of numbered ingress rules and a separate set of numbered -// egress rules. When determining whether a packet should be allowed in or out of a -// subnet associated with the ACL, we process the entries in the ACL according to -// the rule numbers, in ascending order. Each network ACL has a set of ingress -// rules and a separate set of egress rules. We recommend that you leave room -// between the rule numbers (for example, 100, 110, 120, ...), and not number them -// one right after the other (for example, 101, 102, 103, ...). This makes it -// easier to add a rule between existing ones without having to renumber the rules. -// After you add an entry, you can't modify it; you must either replace it, or -// create an entry and delete the old one. For more information about network ACLs, -// see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateNetworkAclEntry(ctx context.Context, params *CreateNetworkAclEntryInput, optFns ...func(*Options)) (*CreateNetworkAclEntryOutput, error) { - if params == nil { - params = &CreateNetworkAclEntryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNetworkAclEntry", params, optFns, c.addOperationCreateNetworkAclEntryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNetworkAclEntryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateNetworkAclEntryInput struct { - - // Indicates whether this is an egress rule (rule is applied to traffic leaving - // the subnet). - // - // This member is required. - Egress *bool - - // The ID of the network ACL. - // - // This member is required. - NetworkAclId *string - - // The protocol number. A value of "-1" means all protocols. If you specify "-1" - // or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on - // all ports is allowed, regardless of any ports or ICMP types or codes that you - // specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, - // traffic for all ICMP types and codes allowed, regardless of any that you - // specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, - // you must specify an ICMP type and code. - // - // This member is required. - Protocol *string - - // Indicates whether to allow or deny the traffic that matches the rule. - // - // This member is required. - RuleAction types.RuleAction - - // The rule number for the entry (for example, 100). ACL entries are processed in - // ascending order by rule number. Constraints: Positive integer from 1 to 32766. - // The range 32767 to 65535 is reserved for internal use. - // - // This member is required. - RuleNumber *int32 - - // The IPv4 network range to allow or deny, in CIDR notation (for example - // 172.16.0.0/24 ). We modify the specified CIDR block to its canonical form; for - // example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 . - CidrBlock *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying - // protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. - IcmpTypeCode *types.IcmpTypeCode - - // The IPv6 network range to allow or deny, in CIDR notation (for example - // 2001:db8:1234:1a00::/64 ). - Ipv6CidrBlock *string - - // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying protocol 6 (TCP) or 17 (UDP). - PortRange *types.PortRange - - noSmithyDocumentSerde -} - -type CreateNetworkAclEntryOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNetworkAclEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkAclEntry{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkAclEntry{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNetworkAclEntry"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateNetworkAclEntryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkAclEntry(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateNetworkAclEntry(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNetworkAclEntry", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsAccessScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsAccessScope.go deleted file mode 100644 index 41289ca62..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsAccessScope.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Network Access Scope. Amazon Web Services Network Access Analyzer -// enables cloud networking and cloud operations teams to verify that their -// networks on Amazon Web Services conform to their network security and governance -// objectives. For more information, see the Amazon Web Services Network Access -// Analyzer Guide (https://docs.aws.amazon.com/vpc/latest/network-access-analyzer/) -// . -func (c *Client) CreateNetworkInsightsAccessScope(ctx context.Context, params *CreateNetworkInsightsAccessScopeInput, optFns ...func(*Options)) (*CreateNetworkInsightsAccessScopeOutput, error) { - if params == nil { - params = &CreateNetworkInsightsAccessScopeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInsightsAccessScope", params, optFns, c.addOperationCreateNetworkInsightsAccessScopeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNetworkInsightsAccessScopeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateNetworkInsightsAccessScopeInput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - // - // This member is required. - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The paths to exclude. - ExcludePaths []types.AccessScopePathRequest - - // The paths to match. - MatchPaths []types.AccessScopePathRequest - - // The tags to apply. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateNetworkInsightsAccessScopeOutput struct { - - // The Network Access Scope. - NetworkInsightsAccessScope *types.NetworkInsightsAccessScope - - // The Network Access Scope content. - NetworkInsightsAccessScopeContent *types.NetworkInsightsAccessScopeContent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNetworkInsightsAccessScopeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInsightsAccessScope{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInsightsAccessScope{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNetworkInsightsAccessScope"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateNetworkInsightsAccessScopeMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateNetworkInsightsAccessScopeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInsightsAccessScope(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateNetworkInsightsAccessScope struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateNetworkInsightsAccessScope) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateNetworkInsightsAccessScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateNetworkInsightsAccessScopeInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNetworkInsightsAccessScopeInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateNetworkInsightsAccessScopeMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNetworkInsightsAccessScope{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateNetworkInsightsAccessScope(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNetworkInsightsAccessScope", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsPath.go deleted file mode 100644 index 5d3ebe745..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInsightsPath.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a path to analyze for reachability. Reachability Analyzer enables you -// to analyze and debug network reachability between two resources in your virtual -// private cloud (VPC). For more information, see the Reachability Analyzer Guide (https://docs.aws.amazon.com/vpc/latest/reachability/) -// . -func (c *Client) CreateNetworkInsightsPath(ctx context.Context, params *CreateNetworkInsightsPathInput, optFns ...func(*Options)) (*CreateNetworkInsightsPathOutput, error) { - if params == nil { - params = &CreateNetworkInsightsPathInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInsightsPath", params, optFns, c.addOperationCreateNetworkInsightsPathMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNetworkInsightsPathOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateNetworkInsightsPathInput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - // - // This member is required. - ClientToken *string - - // The protocol. - // - // This member is required. - Protocol types.Protocol - - // The ID or ARN of the source. If the resource is in another account, you must - // specify an ARN. - // - // This member is required. - Source *string - - // The ID or ARN of the destination. If the resource is in another account, you - // must specify an ARN. - Destination *string - - // The IP address of the destination. - DestinationIp *string - - // The destination port. - DestinationPort *int32 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Scopes the analysis to network paths that match specific filters at the - // destination. If you specify this parameter, you can't specify the parameter for - // the destination IP address. - FilterAtDestination *types.PathRequestFilter - - // Scopes the analysis to network paths that match specific filters at the source. - // If you specify this parameter, you can't specify the parameters for the source - // IP address or the destination port. - FilterAtSource *types.PathRequestFilter - - // The IP address of the source. - SourceIp *string - - // The tags to add to the path. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateNetworkInsightsPathOutput struct { - - // Information about the path. - NetworkInsightsPath *types.NetworkInsightsPath - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNetworkInsightsPathMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInsightsPath{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInsightsPath{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNetworkInsightsPath"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateNetworkInsightsPathMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateNetworkInsightsPathValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInsightsPath(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateNetworkInsightsPath struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateNetworkInsightsPath) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateNetworkInsightsPath) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateNetworkInsightsPathInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNetworkInsightsPathInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateNetworkInsightsPathMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNetworkInsightsPath{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateNetworkInsightsPath(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNetworkInsightsPath", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterface.go deleted file mode 100644 index ecbdf37a2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterface.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a network interface in the specified subnet. The number of IP addresses -// you can assign to a network interface varies by instance type. For more -// information, see IP Addresses Per ENI Per Instance Type (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html#AvailableIpPerENI) -// in the Amazon Virtual Private Cloud User Guide. For more information about -// network interfaces, see Elastic network interfaces (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-eni.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateNetworkInterface(ctx context.Context, params *CreateNetworkInterfaceInput, optFns ...func(*Options)) (*CreateNetworkInterfaceOutput, error) { - if params == nil { - params = &CreateNetworkInterfaceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInterface", params, optFns, c.addOperationCreateNetworkInterfaceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNetworkInterfaceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateNetworkInterfaceInput struct { - - // The ID of the subnet to associate with the network interface. - // - // This member is required. - SubnetId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A connection tracking specification for the network interface. - ConnectionTrackingSpecification *types.ConnectionTrackingSpecificationRequest - - // A description for the network interface. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // If you’re creating a network interface in a dual-stack or IPv6-only subnet, you - // have the option to assign a primary IPv6 IP address. A primary IPv6 address is - // an IPv6 GUA address associated with an ENI that you have enabled to use a - // primary IPv6 address. Use this option if the instance that this ENI will be - // attached to relies on its IPv6 address not changing. Amazon Web Services will - // automatically assign an IPv6 address associated with the ENI attached to your - // instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to - // be a primary IPv6, you cannot disable it. When you enable an IPv6 GUA address to - // be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address - // until the instance is terminated or the network interface is detached. If you - // have multiple IPv6 addresses associated with an ENI attached to your instance - // and you enable a primary IPv6 address, the first IPv6 GUA address associated - // with the ENI becomes the primary IPv6 address. - EnablePrimaryIpv6 *bool - - // The IDs of one or more security groups. - Groups []string - - // The type of network interface. The default is interface . The only supported - // values are interface , efa , and trunk . - InterfaceType types.NetworkInterfaceCreationType - - // The number of IPv4 prefixes that Amazon Web Services automatically assigns to - // the network interface. You can't specify a count of IPv4 prefixes if you've - // specified one of the following: specific IPv4 prefixes, specific private IPv4 - // addresses, or a count of private IPv4 addresses. - Ipv4PrefixCount *int32 - - // The IPv4 prefixes assigned to the network interface. You can't specify IPv4 - // prefixes if you've specified one of the following: a count of IPv4 prefixes, - // specific private IPv4 addresses, or a count of private IPv4 addresses. - Ipv4Prefixes []types.Ipv4PrefixSpecificationRequest - - // The number of IPv6 addresses to assign to a network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't - // specify a count of IPv6 addresses using this parameter if you've specified one - // of the following: specific IPv6 addresses, specific IPv6 prefixes, or a count of - // IPv6 prefixes. If your subnet has the AssignIpv6AddressOnCreation attribute - // set, you can override that setting by specifying 0 as the IPv6 address count. - Ipv6AddressCount *int32 - - // The IPv6 addresses from the IPv6 CIDR block range of your subnet. You can't - // specify IPv6 addresses using this parameter if you've specified one of the - // following: a count of IPv6 addresses, specific IPv6 prefixes, or a count of IPv6 - // prefixes. - Ipv6Addresses []types.InstanceIpv6Address - - // The number of IPv6 prefixes that Amazon Web Services automatically assigns to - // the network interface. You can't specify a count of IPv6 prefixes if you've - // specified one of the following: specific IPv6 prefixes, specific IPv6 addresses, - // or a count of IPv6 addresses. - Ipv6PrefixCount *int32 - - // The IPv6 prefixes assigned to the network interface. You can't specify IPv6 - // prefixes if you've specified one of the following: a count of IPv6 prefixes, - // specific IPv6 addresses, or a count of IPv6 addresses. - Ipv6Prefixes []types.Ipv6PrefixSpecificationRequest - - // The primary private IPv4 address of the network interface. If you don't specify - // an IPv4 address, Amazon EC2 selects one for you from the subnet's IPv4 CIDR - // range. If you specify an IP address, you cannot indicate any IP addresses - // specified in privateIpAddresses as primary (only one IP address can be - // designated as primary). - PrivateIpAddress *string - - // The private IPv4 addresses. You can't specify private IPv4 addresses if you've - // specified one of the following: a count of private IPv4 addresses, specific IPv4 - // prefixes, or a count of IPv4 prefixes. - PrivateIpAddresses []types.PrivateIpAddressSpecification - - // The number of secondary private IPv4 addresses to assign to a network - // interface. When you specify a number of secondary IPv4 addresses, Amazon EC2 - // selects these IP addresses within the subnet's IPv4 CIDR range. You can't - // specify this option and specify more than one private IP address using - // privateIpAddresses . You can't specify a count of private IPv4 addresses if - // you've specified one of the following: specific private IPv4 addresses, specific - // IPv4 prefixes, or a count of IPv4 prefixes. - SecondaryPrivateIpAddressCount *int32 - - // The tags to apply to the new network interface. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateNetworkInterfaceOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - ClientToken *string - - // Information about the network interface. - NetworkInterface *types.NetworkInterface - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInterface{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInterface{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNetworkInterface"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateNetworkInterfaceMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateNetworkInterfaceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInterface(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateNetworkInterface struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateNetworkInterface) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateNetworkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateNetworkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateNetworkInterfaceInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateNetworkInterfaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateNetworkInterface{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNetworkInterface", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterfacePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterfacePermission.go deleted file mode 100644 index e7e8e1cbb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateNetworkInterfacePermission.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Grants an Amazon Web Services-authorized account permission to attach the -// specified network interface to an instance in their account. You can grant -// permission to a single Amazon Web Services account only, and only one account at -// a time. -func (c *Client) CreateNetworkInterfacePermission(ctx context.Context, params *CreateNetworkInterfacePermissionInput, optFns ...func(*Options)) (*CreateNetworkInterfacePermissionOutput, error) { - if params == nil { - params = &CreateNetworkInterfacePermissionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateNetworkInterfacePermission", params, optFns, c.addOperationCreateNetworkInterfacePermissionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateNetworkInterfacePermissionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateNetworkInterfacePermission. -type CreateNetworkInterfacePermissionInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // The type of permission to grant. - // - // This member is required. - Permission types.InterfacePermissionType - - // The Amazon Web Services account ID. - AwsAccountId *string - - // The Amazon Web Service. Currently not supported. - AwsService *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of CreateNetworkInterfacePermission. -type CreateNetworkInterfacePermissionOutput struct { - - // Information about the permission for the network interface. - InterfacePermission *types.NetworkInterfacePermission - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateNetworkInterfacePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateNetworkInterfacePermission{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateNetworkInterfacePermission{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateNetworkInterfacePermission"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateNetworkInterfacePermissionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateNetworkInterfacePermission(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateNetworkInterfacePermission(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateNetworkInterfacePermission", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go deleted file mode 100644 index 09bd1f695..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePlacementGroup.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a placement group in which to launch instances. The strategy of the -// placement group determines how the instances are organized within the group. A -// cluster placement group is a logical grouping of instances within a single -// Availability Zone that benefit from low network latency, high network -// throughput. A spread placement group places instances on distinct hardware. A -// partition placement group places groups of instances in different partitions, -// where instances in one partition do not share the same hardware with instances -// in another partition. For more information, see Placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreatePlacementGroup(ctx context.Context, params *CreatePlacementGroupInput, optFns ...func(*Options)) (*CreatePlacementGroupOutput, error) { - if params == nil { - params = &CreatePlacementGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreatePlacementGroup", params, optFns, c.addOperationCreatePlacementGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreatePlacementGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreatePlacementGroupInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // A name for the placement group. Must be unique within the scope of your account - // for the Region. Constraints: Up to 255 ASCII characters - GroupName *string - - // The number of partitions. Valid only when Strategy is set to partition . - PartitionCount *int32 - - // Determines how placement groups spread instances. - // - Host – You can use host only with Outpost placement groups. - // - Rack – No usage restrictions. - SpreadLevel types.SpreadLevel - - // The placement strategy. - Strategy types.PlacementStrategy - - // The tags to apply to the new placement group. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreatePlacementGroupOutput struct { - - // Information about the placement group. - PlacementGroup *types.PlacementGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreatePlacementGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreatePlacementGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreatePlacementGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePlacementGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePlacementGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreatePlacementGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreatePlacementGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePublicIpv4Pool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePublicIpv4Pool.go deleted file mode 100644 index 5ba26ed1c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreatePublicIpv4Pool.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a public IPv4 address pool. A public IPv4 pool is an EC2 IP address -// pool required for the public IPv4 CIDRs that you own and bring to Amazon Web -// Services to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, -// however, use IPAM pools only. To monitor the status of pool creation, use -// DescribePublicIpv4Pools (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribePublicIpv4Pools.html) -// . -func (c *Client) CreatePublicIpv4Pool(ctx context.Context, params *CreatePublicIpv4PoolInput, optFns ...func(*Options)) (*CreatePublicIpv4PoolOutput, error) { - if params == nil { - params = &CreatePublicIpv4PoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreatePublicIpv4Pool", params, optFns, c.addOperationCreatePublicIpv4PoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreatePublicIpv4PoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreatePublicIpv4PoolInput struct { - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreatePublicIpv4PoolOutput struct { - - // The ID of the public IPv4 pool. - PoolId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreatePublicIpv4PoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreatePublicIpv4Pool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreatePublicIpv4Pool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreatePublicIpv4Pool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreatePublicIpv4Pool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreatePublicIpv4Pool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreatePublicIpv4Pool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReplaceRootVolumeTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReplaceRootVolumeTask.go deleted file mode 100644 index 9811a4e30..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReplaceRootVolumeTask.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Replaces the EBS-backed root volume for a running instance with a new volume -// that is restored to the original root volume's launch state, that is restored to -// a specific snapshot taken from the original root volume, or that is restored -// from an AMI that has the same key characteristics as that of the instance. For -// more information, see Replace a root volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/replace-root.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateReplaceRootVolumeTask(ctx context.Context, params *CreateReplaceRootVolumeTaskInput, optFns ...func(*Options)) (*CreateReplaceRootVolumeTaskOutput, error) { - if params == nil { - params = &CreateReplaceRootVolumeTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateReplaceRootVolumeTask", params, optFns, c.addOperationCreateReplaceRootVolumeTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateReplaceRootVolumeTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateReplaceRootVolumeTaskInput struct { - - // The ID of the instance for which to replace the root volume. - // - // This member is required. - InstanceId *string - - // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. If you do not specify a client token, a randomly generated token is - // used for the request to ensure idempotency. For more information, see Ensuring - // idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Indicates whether to automatically delete the original root volume after the - // root volume replacement task completes. To delete the original root volume, - // specify true . If you choose to keep the original root volume after the - // replacement task completes, you must manually delete it when you no longer need - // it. - DeleteReplacedRootVolume *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the AMI to use to restore the root volume. The specified AMI must - // have the same product code, billing information, architecture type, and - // virtualization type as that of the instance. If you want to restore the - // replacement volume from a specific snapshot, or if you want to restore it to its - // launch state, omit this parameter. - ImageId *string - - // The ID of the snapshot from which to restore the replacement root volume. The - // specified snapshot must be a snapshot that you previously created from the - // original root volume. If you want to restore the replacement root volume to the - // initial launch state, or if you want to restore the replacement root volume from - // an AMI, omit this parameter. - SnapshotId *string - - // The tags to apply to the root volume replacement task. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateReplaceRootVolumeTaskOutput struct { - - // Information about the root volume replacement task. - ReplaceRootVolumeTask *types.ReplaceRootVolumeTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateReplaceRootVolumeTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateReplaceRootVolumeTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateReplaceRootVolumeTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateReplaceRootVolumeTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateReplaceRootVolumeTaskMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateReplaceRootVolumeTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReplaceRootVolumeTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateReplaceRootVolumeTask struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateReplaceRootVolumeTask) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateReplaceRootVolumeTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateReplaceRootVolumeTaskInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateReplaceRootVolumeTaskInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateReplaceRootVolumeTaskMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateReplaceRootVolumeTask{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateReplaceRootVolumeTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateReplaceRootVolumeTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReservedInstancesListing.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReservedInstancesListing.go deleted file mode 100644 index 7b0747ce6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateReservedInstancesListing.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a listing for Amazon EC2 Standard Reserved Instances to be sold in the -// Reserved Instance Marketplace. You can submit one Standard Reserved Instance -// listing at a time. To get a list of your Standard Reserved Instances, you can -// use the DescribeReservedInstances operation. Only Standard Reserved Instances -// can be sold in the Reserved Instance Marketplace. Convertible Reserved Instances -// cannot be sold. The Reserved Instance Marketplace matches sellers who want to -// resell Standard Reserved Instance capacity that they no longer need with buyers -// who want to purchase additional capacity. Reserved Instances bought and sold -// through the Reserved Instance Marketplace work like any other Reserved -// Instances. To sell your Standard Reserved Instances, you must first register as -// a seller in the Reserved Instance Marketplace. After completing the registration -// process, you can create a Reserved Instance Marketplace listing of some or all -// of your Standard Reserved Instances, and specify the upfront price to receive -// for them. Your Standard Reserved Instance listings then become available for -// purchase. To view the details of your Standard Reserved Instance listing, you -// can use the DescribeReservedInstancesListings operation. For more information, -// see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateReservedInstancesListing(ctx context.Context, params *CreateReservedInstancesListingInput, optFns ...func(*Options)) (*CreateReservedInstancesListingOutput, error) { - if params == nil { - params = &CreateReservedInstancesListingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateReservedInstancesListing", params, optFns, c.addOperationCreateReservedInstancesListingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateReservedInstancesListingOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateReservedInstancesListing. -type CreateReservedInstancesListingInput struct { - - // Unique, case-sensitive identifier you provide to ensure idempotency of your - // listings. This helps avoid duplicate listings. For more information, see - // Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - // - // This member is required. - ClientToken *string - - // The number of instances that are a part of a Reserved Instance account to be - // listed in the Reserved Instance Marketplace. This number should be less than or - // equal to the instance count associated with the Reserved Instance ID specified - // in this call. - // - // This member is required. - InstanceCount *int32 - - // A list specifying the price of the Standard Reserved Instance for each month - // remaining in the Reserved Instance term. - // - // This member is required. - PriceSchedules []types.PriceScheduleSpecification - - // The ID of the active Standard Reserved Instance. - // - // This member is required. - ReservedInstancesId *string - - noSmithyDocumentSerde -} - -// Contains the output of CreateReservedInstancesListing. -type CreateReservedInstancesListingOutput struct { - - // Information about the Standard Reserved Instance listing. - ReservedInstancesListings []types.ReservedInstancesListing - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateReservedInstancesListingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateReservedInstancesListing{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateReservedInstancesListing{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateReservedInstancesListing"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateReservedInstancesListingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReservedInstancesListing(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateReservedInstancesListing(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateReservedInstancesListing", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go deleted file mode 100644 index 4bea73f6d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRestoreImageTask.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Starts a task that restores an AMI from an Amazon S3 object that was previously -// created by using CreateStoreImageTask (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html) -// . To use this API, you must have the required permissions. For more information, -// see Permissions for storing and restoring AMIs using Amazon S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions) -// in the Amazon EC2 User Guide. For more information, see Store and restore an -// AMI using Amazon S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateRestoreImageTask(ctx context.Context, params *CreateRestoreImageTaskInput, optFns ...func(*Options)) (*CreateRestoreImageTaskOutput, error) { - if params == nil { - params = &CreateRestoreImageTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateRestoreImageTask", params, optFns, c.addOperationCreateRestoreImageTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateRestoreImageTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateRestoreImageTaskInput struct { - - // The name of the Amazon S3 bucket that contains the stored AMI object. - // - // This member is required. - Bucket *string - - // The name of the stored AMI object in the bucket. - // - // This member is required. - ObjectKey *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name for the restored AMI. The name must be unique for AMIs in the Region - // for this account. If you do not provide a name, the new AMI gets the same name - // as the original AMI. - Name *string - - // The tags to apply to the AMI and snapshots on restoration. You can tag the AMI, - // the snapshots, or both. - // - To tag the AMI, the value for ResourceType must be image . - // - To tag the snapshots, the value for ResourceType must be snapshot . The same - // tag is applied to all of the snapshots that are created. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateRestoreImageTaskOutput struct { - - // The AMI ID. - ImageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateRestoreImageTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateRestoreImageTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateRestoreImageTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRestoreImageTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateRestoreImageTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRestoreImageTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateRestoreImageTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateRestoreImageTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRoute.go deleted file mode 100644 index fbfce5b3c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRoute.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a route in a route table within a VPC. You must specify either a -// destination CIDR block or a prefix list ID. You must also specify exactly one of -// the resources from the parameter list. When determining how to route traffic, we -// use the route with the most specific match. For example, traffic is destined for -// the IPv4 address 192.0.2.3 , and the route table includes the following two IPv4 -// routes: -// - 192.0.2.0/24 (goes to some target A) -// - 192.0.2.0/28 (goes to some target B) -// -// Both routes apply to the traffic destined for 192.0.2.3 . However, the second -// route in the list covers a smaller number of IP addresses and is therefore more -// specific, so we use that route to determine where to target the traffic. For -// more information about route tables, see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateRoute(ctx context.Context, params *CreateRouteInput, optFns ...func(*Options)) (*CreateRouteOutput, error) { - if params == nil { - params = &CreateRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateRoute", params, optFns, c.addOperationCreateRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateRouteInput struct { - - // The ID of the route table for the route. - // - // This member is required. - RouteTableId *string - - // The ID of the carrier gateway. You can only use this option when the VPC - // contains a subnet which is associated with a Wavelength Zone. - CarrierGatewayId *string - - // The Amazon Resource Name (ARN) of the core network. - CoreNetworkArn *string - - // The IPv4 CIDR address block used for the destination match. Routing decisions - // are based on the most specific match. We modify the specified CIDR block to its - // canonical form; for example, if you specify 100.68.0.18/18 , we modify it to - // 100.68.0.0/18 . - DestinationCidrBlock *string - - // The IPv6 CIDR block used for the destination match. Routing decisions are based - // on the most specific match. - DestinationIpv6CidrBlock *string - - // The ID of a prefix list used for the destination match. - DestinationPrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // [IPv6 traffic only] The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string - - // The ID of an internet gateway or virtual private gateway attached to your VPC. - GatewayId *string - - // The ID of a NAT instance in your VPC. The operation fails if you specify an - // instance ID unless exactly one network interface is attached. - InstanceId *string - - // The ID of the local gateway. - LocalGatewayId *string - - // [IPv4 traffic only] The ID of a NAT gateway. - NatGatewayId *string - - // The ID of a network interface. - NetworkInterfaceId *string - - // The ID of a transit gateway. - TransitGatewayId *string - - // The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only. - VpcEndpointId *string - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -type CreateRouteOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRouteTable.go deleted file mode 100644 index 112caf86d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateRouteTable.go +++ /dev/null @@ -1,193 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a route table for the specified VPC. After you create a route table, -// you can add routes and associate the table with a subnet. For more information, -// see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateRouteTable(ctx context.Context, params *CreateRouteTableInput, optFns ...func(*Options)) (*CreateRouteTableOutput, error) { - if params == nil { - params = &CreateRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateRouteTable", params, optFns, c.addOperationCreateRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateRouteTableInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the route table. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateRouteTableOutput struct { - - // Unique, case-sensitive identifier to ensure the idempotency of the request. - // Only returned if a client token was provided in the request. - ClientToken *string - - // Information about the route table. - RouteTable *types.RouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateRouteTableMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateRouteTable struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateRouteTable) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateRouteTableInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateRouteTableMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateRouteTable{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSecurityGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSecurityGroup.go deleted file mode 100644 index 3ae9ad015..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSecurityGroup.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a security group. A security group acts as a virtual firewall for your -// instance to control inbound and outbound traffic. For more information, see -// Amazon EC2 security groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) -// in the Amazon Elastic Compute Cloud User Guide and Security groups for your VPC (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) -// in the Amazon Virtual Private Cloud User Guide. When you create a security -// group, you specify a friendly name of your choice. You can't have two security -// groups for the same VPC with the same name. You have a default security group -// for use in your VPC. If you don't specify a security group when you launch an -// instance, the instance is launched into the appropriate default security group. -// A default security group includes a default rule that grants instances -// unrestricted network access to each other. You can add or remove rules from your -// security groups using AuthorizeSecurityGroupIngress , -// AuthorizeSecurityGroupEgress , RevokeSecurityGroupIngress , and -// RevokeSecurityGroupEgress . For more information about VPC security group -// limits, see Amazon VPC Limits (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html) -// . -func (c *Client) CreateSecurityGroup(ctx context.Context, params *CreateSecurityGroupInput, optFns ...func(*Options)) (*CreateSecurityGroupOutput, error) { - if params == nil { - params = &CreateSecurityGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSecurityGroup", params, optFns, c.addOperationCreateSecurityGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSecurityGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSecurityGroupInput struct { - - // A description for the security group. Constraints: Up to 255 characters in - // length Valid characters: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* - // - // This member is required. - Description *string - - // The name of the security group. Constraints: Up to 255 characters in length. - // Cannot start with sg- . Valid characters: a-z, A-Z, 0-9, spaces, and - // ._-:/()#,@[]+=&;{}!$* - // - // This member is required. - GroupName *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the security group. - TagSpecifications []types.TagSpecification - - // The ID of the VPC. Required for a nondefault VPC. - VpcId *string - - noSmithyDocumentSerde -} - -type CreateSecurityGroupOutput struct { - - // The ID of the security group. - GroupId *string - - // The tags assigned to the security group. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSecurityGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSecurityGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSecurityGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSecurityGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateSecurityGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSecurityGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSecurityGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSecurityGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshot.go deleted file mode 100644 index b5b1618b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshot.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates a snapshot of an EBS volume and stores it in Amazon S3. You can use -// snapshots for backups, to make copies of EBS volumes, and to save data before -// shutting down an instance. You can create snapshots of volumes in a Region and -// volumes on an Outpost. If you create a snapshot of a volume in a Region, the -// snapshot must be stored in the same Region as the volume. If you create a -// snapshot of a volume on an Outpost, the snapshot can be stored on the same -// Outpost as the volume, or in the Region for that Outpost. When a snapshot is -// created, any Amazon Web Services Marketplace product codes that are associated -// with the source volume are propagated to the snapshot. You can take a snapshot -// of an attached volume that is in use. However, snapshots only capture data that -// has been written to your Amazon EBS volume at the time the snapshot command is -// issued; this might exclude any data that has been cached by any applications or -// the operating system. If you can pause any file systems on the volume long -// enough to take a snapshot, your snapshot should be complete. However, if you -// cannot pause all file writes to the volume, you should unmount the volume from -// within the instance, issue the snapshot command, and then remount the volume to -// ensure a consistent and complete snapshot. You may remount and use your volume -// while the snapshot status is pending . When you create a snapshot for an EBS -// volume that serves as a root device, we recommend that you stop the instance -// before taking the snapshot. Snapshots that are taken from encrypted volumes are -// automatically encrypted. Volumes that are created from encrypted snapshots are -// also automatically encrypted. Your encrypted volumes and any associated -// snapshots always remain protected. You can tag your snapshots during creation. -// For more information, see Tag your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. For more information, see -// Amazon Elastic Block Store (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) -// and Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateSnapshot(ctx context.Context, params *CreateSnapshotInput, optFns ...func(*Options)) (*CreateSnapshotOutput, error) { - if params == nil { - params = &CreateSnapshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSnapshot", params, optFns, c.addOperationCreateSnapshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSnapshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSnapshotInput struct { - - // The ID of the Amazon EBS volume. - // - // This member is required. - VolumeId *string - - // A description for the snapshot. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Amazon Resource Name (ARN) of the Outpost on which to create a local - // snapshot. - // - To create a snapshot of a volume in a Region, omit this parameter. The - // snapshot is created in the same Region as the volume. - // - To create a snapshot of a volume on an Outpost and store the snapshot in - // the Region, omit this parameter. The snapshot is created in the Region for the - // Outpost. - // - To create a snapshot of a volume on an Outpost and store the snapshot on an - // Outpost, specify the ARN of the destination Outpost. The snapshot must be - // created on the same Outpost as the volume. - // For more information, see Create local snapshots from volumes on an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-snapshot) - // in the Amazon Elastic Compute Cloud User Guide. - OutpostArn *string - - // The tags to apply to the snapshot during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -// Describes a snapshot. -type CreateSnapshotOutput struct { - - // The data encryption key identifier for the snapshot. This value is a unique - // identifier that corresponds to the data encryption key that was used to encrypt - // the original volume or snapshot copy. Because data encryption keys are inherited - // by volumes created from snapshots, and vice versa, if snapshots share the same - // data encryption key identifier, then they belong to the same volume/snapshot - // lineage. This parameter is only returned by DescribeSnapshots . - DataEncryptionKeyId *string - - // The description for the snapshot. - Description *string - - // Indicates whether the snapshot is encrypted. - Encrypted *bool - - // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that - // was used to protect the volume encryption key for the parent volume. - KmsKeyId *string - - // The ARN of the Outpost on which the snapshot is stored. For more information, - // see Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) - // in the Amazon Elastic Compute Cloud User Guide. - OutpostArn *string - - // The Amazon Web Services owner alias, from an Amazon-maintained list ( amazon ). - // This is not the user-configured Amazon Web Services account alias set using the - // IAM console. - OwnerAlias *string - - // The ID of the Amazon Web Services account that owns the EBS snapshot. - OwnerId *string - - // The progress of the snapshot, as a percentage. - Progress *string - - // Only for archived snapshots that are temporarily restored. Indicates the date - // and time when a temporarily restored snapshot will be automatically re-archived. - RestoreExpiryTime *time.Time - - // The ID of the snapshot. Each snapshot receives a unique identifier when it is - // created. - SnapshotId *string - - // Reserved for future use. - SseType types.SSEType - - // The time stamp when the snapshot was initiated. - StartTime *time.Time - - // The snapshot state. - State types.SnapshotState - - // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy - // operation fails (for example, if the proper Key Management Service (KMS) - // permissions are not obtained) this field displays error state details to help - // you diagnose why the error occurred. This parameter is only returned by - // DescribeSnapshots . - StateMessage *string - - // The storage tier in which the snapshot is stored. standard indicates that the - // snapshot is stored in the standard snapshot storage tier and that it is ready - // for use. archive indicates that the snapshot is currently archived and that it - // must be restored before it can be used. - StorageTier types.StorageTier - - // Any tags assigned to the snapshot. - Tags []types.Tag - - // The ID of the volume that was used to create the snapshot. Snapshots created by - // the CopySnapshot action have an arbitrary volume ID that should not be used for - // any purpose. - VolumeId *string - - // The size of the volume, in GiB. - VolumeSize *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSnapshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSnapshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSnapshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateSnapshotValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSnapshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSnapshot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshots.go deleted file mode 100644 index a398070a2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSnapshots.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates crash-consistent snapshots of multiple EBS volumes and stores the data -// in S3. Volumes are chosen by specifying an instance. Any attached volumes will -// produce one snapshot each that is crash-consistent across the instance. You can -// include all of the volumes currently attached to the instance, or you can -// exclude the root volume or specific data (non-root) volumes from the -// multi-volume snapshot set. You can create multi-volume snapshots of instances in -// a Region and instances on an Outpost. If you create snapshots from an instance -// in a Region, the snapshots must be stored in the same Region as the instance. If -// you create snapshots from an instance on an Outpost, the snapshots can be stored -// on the same Outpost as the instance, or in the Region for that Outpost. -func (c *Client) CreateSnapshots(ctx context.Context, params *CreateSnapshotsInput, optFns ...func(*Options)) (*CreateSnapshotsOutput, error) { - if params == nil { - params = &CreateSnapshotsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSnapshots", params, optFns, c.addOperationCreateSnapshotsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSnapshotsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSnapshotsInput struct { - - // The instance to specify which volumes should be included in the snapshots. - // - // This member is required. - InstanceSpecification *types.InstanceSpecification - - // Copies the tags from the specified volume to corresponding snapshot. - CopyTagsFromSource types.CopyTagsFromSource - - // A description propagated to every snapshot specified by the instance. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Amazon Resource Name (ARN) of the Outpost on which to create the local - // snapshots. - // - To create snapshots from an instance in a Region, omit this parameter. The - // snapshots are created in the same Region as the instance. - // - To create snapshots from an instance on an Outpost and store the snapshots - // in the Region, omit this parameter. The snapshots are created in the Region for - // the Outpost. - // - To create snapshots from an instance on an Outpost and store the snapshots - // on an Outpost, specify the ARN of the destination Outpost. The snapshots must be - // created on the same Outpost as the instance. - // For more information, see Create multi-volume local snapshots from instances - // on an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-multivol-snapshot) - // in the Amazon Elastic Compute Cloud User Guide. - OutpostArn *string - - // Tags to apply to every snapshot specified by the instance. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateSnapshotsOutput struct { - - // List of snapshots. - Snapshots []types.SnapshotInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSnapshots{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSnapshots{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSnapshots"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateSnapshotsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSnapshots(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSnapshots", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go deleted file mode 100644 index d0e993f0f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSpotDatafeedSubscription.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a data feed for Spot Instances, enabling you to view Spot Instance -// usage logs. You can create one data feed per Amazon Web Services account. For -// more information, see Spot Instance data feed (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon EC2 User Guide for Linux Instances. -func (c *Client) CreateSpotDatafeedSubscription(ctx context.Context, params *CreateSpotDatafeedSubscriptionInput, optFns ...func(*Options)) (*CreateSpotDatafeedSubscriptionOutput, error) { - if params == nil { - params = &CreateSpotDatafeedSubscriptionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSpotDatafeedSubscription", params, optFns, c.addOperationCreateSpotDatafeedSubscriptionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSpotDatafeedSubscriptionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateSpotDatafeedSubscription. -type CreateSpotDatafeedSubscriptionInput struct { - - // The name of the Amazon S3 bucket in which to store the Spot Instance data feed. - // For more information about bucket names, see Rules for bucket naming (https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html#bucketnamingrules) - // in the Amazon S3 Developer Guide. - // - // This member is required. - Bucket *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The prefix for the data feed file names. - Prefix *string - - noSmithyDocumentSerde -} - -// Contains the output of CreateSpotDatafeedSubscription. -type CreateSpotDatafeedSubscriptionOutput struct { - - // The Spot Instance data feed subscription. - SpotDatafeedSubscription *types.SpotDatafeedSubscription - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSpotDatafeedSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSpotDatafeedSubscription{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSpotDatafeedSubscription{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSpotDatafeedSubscription"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateSpotDatafeedSubscriptionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSpotDatafeedSubscription(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSpotDatafeedSubscription(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSpotDatafeedSubscription", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go deleted file mode 100644 index 3694a6382..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateStoreImageTask.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Stores an AMI as a single object in an Amazon S3 bucket. To use this API, you -// must have the required permissions. For more information, see Permissions for -// storing and restoring AMIs using Amazon S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions) -// in the Amazon EC2 User Guide. For more information, see Store and restore an -// AMI using Amazon S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateStoreImageTask(ctx context.Context, params *CreateStoreImageTaskInput, optFns ...func(*Options)) (*CreateStoreImageTaskOutput, error) { - if params == nil { - params = &CreateStoreImageTaskInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateStoreImageTask", params, optFns, c.addOperationCreateStoreImageTaskMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateStoreImageTaskOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateStoreImageTaskInput struct { - - // The name of the Amazon S3 bucket in which the AMI object will be stored. The - // bucket must be in the Region in which the request is being made. The AMI object - // appears in the bucket only after the upload task has completed. - // - // This member is required. - Bucket *string - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the AMI object that will be stored in the Amazon S3 bucket. - S3ObjectTags []types.S3ObjectTag - - noSmithyDocumentSerde -} - -type CreateStoreImageTaskOutput struct { - - // The name of the stored AMI object in the S3 bucket. - ObjectKey *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateStoreImageTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateStoreImageTask{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateStoreImageTask{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStoreImageTask"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateStoreImageTaskValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStoreImageTask(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateStoreImageTask(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateStoreImageTask", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnet.go deleted file mode 100644 index 0b02049ee..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnet.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a subnet in the specified VPC. For an IPv4 only subnet, specify an IPv4 -// CIDR block. If the VPC has an IPv6 CIDR block, you can create an IPv6 only -// subnet or a dual stack subnet instead. For an IPv6 only subnet, specify an IPv6 -// CIDR block. For a dual stack subnet, specify both an IPv4 CIDR block and an IPv6 -// CIDR block. A subnet CIDR block must not overlap the CIDR block of an existing -// subnet in the VPC. After you create a subnet, you can't change its CIDR block. -// The allowed size for an IPv4 subnet is between a /28 netmask (16 IP addresses) -// and a /16 netmask (65,536 IP addresses). Amazon Web Services reserves both the -// first four and the last IPv4 address in each subnet's CIDR block. They're not -// available for your use. If you've associated an IPv6 CIDR block with your VPC, -// you can associate an IPv6 CIDR block with a subnet when you create it. If you -// add more than one subnet to a VPC, they're set up in a star topology with a -// logical router in the middle. When you stop an instance in a subnet, it retains -// its private IPv4 address. It's therefore possible to have a subnet with no -// running instances (they're all stopped), but no remaining IP addresses -// available. For more information, see Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html) -// in the Amazon VPC User Guide. -func (c *Client) CreateSubnet(ctx context.Context, params *CreateSubnetInput, optFns ...func(*Options)) (*CreateSubnetOutput, error) { - if params == nil { - params = &CreateSubnetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSubnet", params, optFns, c.addOperationCreateSubnetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSubnetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSubnetInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // The Availability Zone or Local Zone for the subnet. Default: Amazon Web - // Services selects one for you. If you create more than one subnet in your VPC, we - // do not necessarily select a different zone for each subnet. To create a subnet - // in a Local Zone, set this value to the Local Zone ID, for example - // us-west-2-lax-1a . For information about the Regions that support Local Zones, - // see Local Zones locations (http://aws.amazon.com/about-aws/global-infrastructure/localzones/locations/) - // . To create a subnet in an Outpost, set this value to the Availability Zone for - // the Outpost and specify the Outpost ARN. - AvailabilityZone *string - - // The AZ ID or the Local Zone ID of the subnet. - AvailabilityZoneId *string - - // The IPv4 network range for the subnet, in CIDR notation. For example, - // 10.0.0.0/24 . We modify the specified CIDR block to its canonical form; for - // example, if you specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 . This - // parameter is not supported for an IPv6 only subnet. - CidrBlock *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // An IPv4 IPAM pool ID for the subnet. - Ipv4IpamPoolId *string - - // An IPv4 netmask length for the subnet. - Ipv4NetmaskLength *int32 - - // The IPv6 network range for the subnet, in CIDR notation. This parameter is - // required for an IPv6 only subnet. - Ipv6CidrBlock *string - - // An IPv6 IPAM pool ID for the subnet. - Ipv6IpamPoolId *string - - // Indicates whether to create an IPv6 only subnet. - Ipv6Native *bool - - // An IPv6 netmask length for the subnet. - Ipv6NetmaskLength *int32 - - // The Amazon Resource Name (ARN) of the Outpost. If you specify an Outpost ARN, - // you must also specify the Availability Zone of the Outpost subnet. - OutpostArn *string - - // The tags to assign to the subnet. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateSubnetOutput struct { - - // Information about the subnet. - Subnet *types.Subnet - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSubnetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSubnet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSubnet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSubnet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateSubnetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSubnet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSubnet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSubnet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go deleted file mode 100644 index 7696812e5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateSubnetCidrReservation.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a subnet CIDR reservation. For more information, see Subnet CIDR -// reservations (https://docs.aws.amazon.com/vpc/latest/userguide/subnet-cidr-reservation.html) -// in the Amazon Virtual Private Cloud User Guide and Assign prefixes to network -// interfaces (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateSubnetCidrReservation(ctx context.Context, params *CreateSubnetCidrReservationInput, optFns ...func(*Options)) (*CreateSubnetCidrReservationOutput, error) { - if params == nil { - params = &CreateSubnetCidrReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSubnetCidrReservation", params, optFns, c.addOperationCreateSubnetCidrReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSubnetCidrReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSubnetCidrReservationInput struct { - - // The IPv4 or IPV6 CIDR range to reserve. - // - // This member is required. - Cidr *string - - // The type of reservation. The reservation type determines how the reserved IP - // addresses are assigned to resources. - // - prefix - Amazon Web Services assigns the reserved IP addresses to network - // interfaces. - // - explicit - You assign the reserved IP addresses to network interfaces. - // - // This member is required. - ReservationType types.SubnetCidrReservationType - - // The ID of the subnet. - // - // This member is required. - SubnetId *string - - // The description to assign to the subnet CIDR reservation. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to the subnet CIDR reservation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateSubnetCidrReservationOutput struct { - - // Information about the created subnet CIDR reservation. - SubnetCidrReservation *types.SubnetCidrReservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSubnetCidrReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateSubnetCidrReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateSubnetCidrReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSubnetCidrReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateSubnetCidrReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSubnetCidrReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSubnetCidrReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSubnetCidrReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTags.go deleted file mode 100644 index 2d6541e62..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTags.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds or overwrites only the specified tags for the specified Amazon EC2 -// resource or resources. When you specify an existing tag key, the value is -// overwritten with the new value. Each resource can have a maximum of 50 tags. -// Each tag consists of a key and optional value. Tag keys must be unique per -// resource. For more information about tags, see Tag your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. For more information about -// creating IAM policies that control users' access to resources based on tags, see -// Supported resource-level permissions for Amazon EC2 API actions (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-iam-actions-resources.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateTags(ctx context.Context, params *CreateTagsInput, optFns ...func(*Options)) (*CreateTagsOutput, error) { - if params == nil { - params = &CreateTagsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTags", params, optFns, c.addOperationCreateTagsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTagsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTagsInput struct { - - // The IDs of the resources, separated by spaces. Constraints: Up to 1000 resource - // IDs. We recommend breaking up this request into smaller batches. - // - // This member is required. - Resources []string - - // The tags. The value parameter is required, but if you don't want the tag to - // have a value, specify the parameter with no value, and we set the value to an - // empty string. - // - // This member is required. - Tags []types.Tag - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type CreateTagsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTags{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTags{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTags"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTagsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTags(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTags(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTags", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilter.go deleted file mode 100644 index a48e078d9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilter.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Traffic Mirror filter. A Traffic Mirror filter is a set of rules that -// defines the traffic to mirror. By default, no traffic is mirrored. To mirror -// traffic, use CreateTrafficMirrorFilterRule (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilterRule.htm) -// to add Traffic Mirror rules to the filter. The rules you add define what traffic -// gets mirrored. You can also use ModifyTrafficMirrorFilterNetworkServices (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyTrafficMirrorFilterNetworkServices.html) -// to mirror supported network services. -func (c *Client) CreateTrafficMirrorFilter(ctx context.Context, params *CreateTrafficMirrorFilterInput, optFns ...func(*Options)) (*CreateTrafficMirrorFilterOutput, error) { - if params == nil { - params = &CreateTrafficMirrorFilterInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorFilter", params, optFns, c.addOperationCreateTrafficMirrorFilterMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficMirrorFilterOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTrafficMirrorFilterInput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The description of the Traffic Mirror filter. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to assign to a Traffic Mirror filter. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTrafficMirrorFilterOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Information about the Traffic Mirror filter. - TrafficMirrorFilter *types.TrafficMirrorFilter - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficMirrorFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorFilter{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorFilter{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficMirrorFilter"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateTrafficMirrorFilterMiddleware(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorFilter(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateTrafficMirrorFilter struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateTrafficMirrorFilter) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateTrafficMirrorFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateTrafficMirrorFilterInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorFilterInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateTrafficMirrorFilterMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorFilter{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateTrafficMirrorFilter(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficMirrorFilter", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilterRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilterRule.go deleted file mode 100644 index 2e338061c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorFilterRule.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Traffic Mirror filter rule. A Traffic Mirror rule defines the Traffic -// Mirror source traffic to mirror. You need the Traffic Mirror filter ID when you -// create the rule. -func (c *Client) CreateTrafficMirrorFilterRule(ctx context.Context, params *CreateTrafficMirrorFilterRuleInput, optFns ...func(*Options)) (*CreateTrafficMirrorFilterRuleOutput, error) { - if params == nil { - params = &CreateTrafficMirrorFilterRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorFilterRule", params, optFns, c.addOperationCreateTrafficMirrorFilterRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficMirrorFilterRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTrafficMirrorFilterRuleInput struct { - - // The destination CIDR block to assign to the Traffic Mirror rule. - // - // This member is required. - DestinationCidrBlock *string - - // The action to take on the filtered traffic. - // - // This member is required. - RuleAction types.TrafficMirrorRuleAction - - // The number of the Traffic Mirror rule. This number must be unique for each - // Traffic Mirror rule in a given direction. The rules are processed in ascending - // order by rule number. - // - // This member is required. - RuleNumber *int32 - - // The source CIDR block to assign to the Traffic Mirror rule. - // - // This member is required. - SourceCidrBlock *string - - // The type of traffic. - // - // This member is required. - TrafficDirection types.TrafficDirection - - // The ID of the filter that this rule is associated with. - // - // This member is required. - TrafficMirrorFilterId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The description of the Traffic Mirror rule. - Description *string - - // The destination port range. - DestinationPortRange *types.TrafficMirrorPortRangeRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The protocol, for example UDP, to assign to the Traffic Mirror rule. For - // information about the protocol value, see Protocol Numbers (https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // on the Internet Assigned Numbers Authority (IANA) website. - Protocol *int32 - - // The source port range. - SourcePortRange *types.TrafficMirrorPortRangeRequest - - noSmithyDocumentSerde -} - -type CreateTrafficMirrorFilterRuleOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The Traffic Mirror rule. - TrafficMirrorFilterRule *types.TrafficMirrorFilterRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficMirrorFilterRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorFilterRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorFilterRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficMirrorFilterRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateTrafficMirrorFilterRuleMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorFilterRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateTrafficMirrorFilterRule struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateTrafficMirrorFilterRule) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateTrafficMirrorFilterRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateTrafficMirrorFilterRuleInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorFilterRuleInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateTrafficMirrorFilterRuleMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorFilterRule{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateTrafficMirrorFilterRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficMirrorFilterRule", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorSession.go deleted file mode 100644 index 63803ec22..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorSession.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Traffic Mirror session. A Traffic Mirror session actively copies -// packets from a Traffic Mirror source to a Traffic Mirror target. Create a -// filter, and then assign it to the session to define a subset of the traffic to -// mirror, for example all TCP traffic. The Traffic Mirror source and the Traffic -// Mirror target (monitoring appliances) can be in the same VPC, or in a different -// VPC connected via VPC peering or a transit gateway. By default, no traffic is -// mirrored. Use CreateTrafficMirrorFilter (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorFilter.htm) -// to create filter rules that specify the traffic to mirror. -func (c *Client) CreateTrafficMirrorSession(ctx context.Context, params *CreateTrafficMirrorSessionInput, optFns ...func(*Options)) (*CreateTrafficMirrorSessionOutput, error) { - if params == nil { - params = &CreateTrafficMirrorSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorSession", params, optFns, c.addOperationCreateTrafficMirrorSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficMirrorSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTrafficMirrorSessionInput struct { - - // The ID of the source network interface. - // - // This member is required. - NetworkInterfaceId *string - - // The session number determines the order in which sessions are evaluated when an - // interface is used by multiple sessions. The first session with a matching filter - // is the one that mirrors the packets. Valid values are 1-32766. - // - // This member is required. - SessionNumber *int32 - - // The ID of the Traffic Mirror filter. - // - // This member is required. - TrafficMirrorFilterId *string - - // The ID of the Traffic Mirror target. - // - // This member is required. - TrafficMirrorTargetId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The description of the Traffic Mirror session. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The number of bytes in each packet to mirror. These are bytes after the VXLAN - // header. Do not specify this parameter when you want to mirror the entire packet. - // To mirror a subset of the packet, set this to the length (in bytes) that you - // want to mirror. For example, if you set this value to 100, then the first 100 - // bytes that meet the filter criteria are copied to the target. If you do not want - // to mirror the entire packet, use the PacketLength parameter to specify the - // number of bytes in each packet to mirror. For sessions with Network Load - // Balancer (NLB) Traffic Mirror targets the default PacketLength will be set to - // 8500. Valid values are 1-8500. Setting a PacketLength greater than 8500 will - // result in an error response. - PacketLength *int32 - - // The tags to assign to a Traffic Mirror session. - TagSpecifications []types.TagSpecification - - // The VXLAN ID for the Traffic Mirror session. For more information about the - // VXLAN protocol, see RFC 7348 (https://tools.ietf.org/html/rfc7348) . If you do - // not specify a VirtualNetworkId , an account-wide unique id is chosen at random. - VirtualNetworkId *int32 - - noSmithyDocumentSerde -} - -type CreateTrafficMirrorSessionOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Information about the Traffic Mirror session. - TrafficMirrorSession *types.TrafficMirrorSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficMirrorSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficMirrorSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateTrafficMirrorSessionMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateTrafficMirrorSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateTrafficMirrorSession struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateTrafficMirrorSession) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateTrafficMirrorSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateTrafficMirrorSessionInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorSessionInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateTrafficMirrorSessionMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorSession{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateTrafficMirrorSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficMirrorSession", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorTarget.go deleted file mode 100644 index 2df3740af..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTrafficMirrorTarget.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a target for your Traffic Mirror session. A Traffic Mirror target is -// the destination for mirrored traffic. The Traffic Mirror source and the Traffic -// Mirror target (monitoring appliances) can be in the same VPC, or in different -// VPCs connected via VPC peering or a transit gateway. A Traffic Mirror target can -// be a network interface, a Network Load Balancer, or a Gateway Load Balancer -// endpoint. To use the target in a Traffic Mirror session, use -// CreateTrafficMirrorSession (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTrafficMirrorSession.htm) -// . -func (c *Client) CreateTrafficMirrorTarget(ctx context.Context, params *CreateTrafficMirrorTargetInput, optFns ...func(*Options)) (*CreateTrafficMirrorTargetOutput, error) { - if params == nil { - params = &CreateTrafficMirrorTargetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficMirrorTarget", params, optFns, c.addOperationCreateTrafficMirrorTargetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficMirrorTargetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTrafficMirrorTargetInput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The description of the Traffic Mirror target. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the Gateway Load Balancer endpoint. - GatewayLoadBalancerEndpointId *string - - // The network interface ID that is associated with the target. - NetworkInterfaceId *string - - // The Amazon Resource Name (ARN) of the Network Load Balancer that is associated - // with the target. - NetworkLoadBalancerArn *string - - // The tags to assign to the Traffic Mirror target. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTrafficMirrorTargetOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Information about the Traffic Mirror target. - TrafficMirrorTarget *types.TrafficMirrorTarget - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficMirrorTargetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTrafficMirrorTarget{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTrafficMirrorTarget{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficMirrorTarget"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateTrafficMirrorTargetMiddleware(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficMirrorTarget(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateTrafficMirrorTarget struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateTrafficMirrorTarget) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateTrafficMirrorTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateTrafficMirrorTargetInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateTrafficMirrorTargetInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateTrafficMirrorTargetMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateTrafficMirrorTarget{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateTrafficMirrorTarget(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficMirrorTarget", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGateway.go deleted file mode 100644 index ee5add3cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGateway.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a transit gateway. You can use a transit gateway to interconnect your -// virtual private clouds (VPC) and on-premises networks. After the transit gateway -// enters the available state, you can attach your VPCs and VPN connections to the -// transit gateway. To attach your VPCs, use CreateTransitGatewayVpcAttachment . To -// attach a VPN connection, use CreateCustomerGateway to create a customer gateway -// and specify the ID of the customer gateway and the ID of the transit gateway in -// a call to CreateVpnConnection . When you create a transit gateway, we create a -// default transit gateway route table and use it as the default association route -// table and the default propagation route table. You can use -// CreateTransitGatewayRouteTable to create additional transit gateway route -// tables. If you disable automatic route propagation, we do not create a default -// transit gateway route table. You can use -// EnableTransitGatewayRouteTablePropagation to propagate routes from a resource -// attachment to a transit gateway route table. If you disable automatic -// associations, you can use AssociateTransitGatewayRouteTable to associate a -// resource attachment with a transit gateway route table. -func (c *Client) CreateTransitGateway(ctx context.Context, params *CreateTransitGatewayInput, optFns ...func(*Options)) (*CreateTransitGatewayOutput, error) { - if params == nil { - params = &CreateTransitGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGateway", params, optFns, c.addOperationCreateTransitGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayInput struct { - - // A description of the transit gateway. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The transit gateway options. - Options *types.TransitGatewayRequestOptions - - // The tags to apply to the transit gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayOutput struct { - - // Information about the transit gateway. - TransitGateway *types.TransitGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnect.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnect.go deleted file mode 100644 index b5f03bb2f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnect.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Connect attachment from a specified transit gateway attachment. A -// Connect attachment is a GRE-based tunnel attachment that you can use to -// establish a connection between a transit gateway and an appliance. A Connect -// attachment uses an existing VPC or Amazon Web Services Direct Connect attachment -// as the underlying transport mechanism. -func (c *Client) CreateTransitGatewayConnect(ctx context.Context, params *CreateTransitGatewayConnectInput, optFns ...func(*Options)) (*CreateTransitGatewayConnectOutput, error) { - if params == nil { - params = &CreateTransitGatewayConnectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayConnect", params, optFns, c.addOperationCreateTransitGatewayConnectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayConnectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayConnectInput struct { - - // The Connect attachment options. - // - // This member is required. - Options *types.CreateTransitGatewayConnectRequestOptions - - // The ID of the transit gateway attachment. You can specify a VPC attachment or - // Amazon Web Services Direct Connect attachment. - // - // This member is required. - TransportTransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the Connect attachment. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayConnectOutput struct { - - // Information about the Connect attachment. - TransitGatewayConnect *types.TransitGatewayConnect - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayConnectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayConnect{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayConnect{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayConnect"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayConnectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayConnect(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayConnect(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayConnect", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnectPeer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnectPeer.go deleted file mode 100644 index ecdcc570c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayConnectPeer.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Connect peer for a specified transit gateway Connect attachment -// between a transit gateway and an appliance. The peer address and transit gateway -// address must be the same IP address family (IPv4 or IPv6). For more information, -// see Connect peers (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-connect.html#tgw-connect-peer) -// in the Transit Gateways Guide. -func (c *Client) CreateTransitGatewayConnectPeer(ctx context.Context, params *CreateTransitGatewayConnectPeerInput, optFns ...func(*Options)) (*CreateTransitGatewayConnectPeerOutput, error) { - if params == nil { - params = &CreateTransitGatewayConnectPeerInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayConnectPeer", params, optFns, c.addOperationCreateTransitGatewayConnectPeerMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayConnectPeerOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayConnectPeerInput struct { - - // The range of inside IP addresses that are used for BGP peering. You must - // specify a size /29 IPv4 CIDR block from the 169.254.0.0/16 range. The first - // address from the range must be configured on the appliance as the BGP IP - // address. You can also optionally specify a size /125 IPv6 CIDR block from the - // fd00::/8 range. - // - // This member is required. - InsideCidrBlocks []string - - // The peer IP address (GRE outer IP address) on the appliance side of the Connect - // peer. - // - // This member is required. - PeerAddress *string - - // The ID of the Connect attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The BGP options for the Connect peer. - BgpOptions *types.TransitGatewayConnectRequestBgpOptions - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the Connect peer. - TagSpecifications []types.TagSpecification - - // The peer IP address (GRE outer IP address) on the transit gateway side of the - // Connect peer, which must be specified from a transit gateway CIDR block. If not - // specified, Amazon automatically assigns the first available IP address from the - // transit gateway CIDR block. - TransitGatewayAddress *string - - noSmithyDocumentSerde -} - -type CreateTransitGatewayConnectPeerOutput struct { - - // Information about the Connect peer. - TransitGatewayConnectPeer *types.TransitGatewayConnectPeer - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayConnectPeer{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayConnectPeer{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayConnectPeer"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayConnectPeer(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayConnectPeer", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go deleted file mode 100644 index 03e285c58..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayMulticastDomain.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a multicast domain using the specified transit gateway. The transit -// gateway must be in the available state before you create a domain. Use -// DescribeTransitGateways (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeTransitGateways.html) -// to see the state of transit gateway. -func (c *Client) CreateTransitGatewayMulticastDomain(ctx context.Context, params *CreateTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*CreateTransitGatewayMulticastDomainOutput, error) { - if params == nil { - params = &CreateTransitGatewayMulticastDomainInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayMulticastDomain", params, optFns, c.addOperationCreateTransitGatewayMulticastDomainMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayMulticastDomainOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayMulticastDomainInput struct { - - // The ID of the transit gateway. - // - // This member is required. - TransitGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The options for the transit gateway multicast domain. - Options *types.CreateTransitGatewayMulticastDomainRequestOptions - - // The tags for the transit gateway multicast domain. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayMulticastDomainOutput struct { - - // Information about the transit gateway multicast domain. - TransitGatewayMulticastDomain *types.TransitGatewayMulticastDomain - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayMulticastDomain"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayMulticastDomain(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayMulticastDomain", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go deleted file mode 100644 index c8565a9b4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPeeringAttachment.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Requests a transit gateway peering attachment between the specified transit -// gateway (requester) and a peer transit gateway (accepter). The peer transit -// gateway can be in your account or a different Amazon Web Services account. After -// you create the peering attachment, the owner of the accepter transit gateway -// must accept the attachment request. -func (c *Client) CreateTransitGatewayPeeringAttachment(ctx context.Context, params *CreateTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*CreateTransitGatewayPeeringAttachmentOutput, error) { - if params == nil { - params = &CreateTransitGatewayPeeringAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayPeeringAttachment", params, optFns, c.addOperationCreateTransitGatewayPeeringAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayPeeringAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayPeeringAttachmentInput struct { - - // The ID of the Amazon Web Services account that owns the peer transit gateway. - // - // This member is required. - PeerAccountId *string - - // The Region where the peer transit gateway is located. - // - // This member is required. - PeerRegion *string - - // The ID of the peer transit gateway with which to create the peering attachment. - // - // This member is required. - PeerTransitGatewayId *string - - // The ID of the transit gateway. - // - // This member is required. - TransitGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Requests a transit gateway peering attachment. - Options *types.CreateTransitGatewayPeeringAttachmentRequestOptions - - // The tags to apply to the transit gateway peering attachment. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayPeeringAttachmentOutput struct { - - // The transit gateway peering attachment. - TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayPeeringAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayPeeringAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayPeeringAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPolicyTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPolicyTable.go deleted file mode 100644 index 3332b7d63..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPolicyTable.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a transit gateway policy table. -func (c *Client) CreateTransitGatewayPolicyTable(ctx context.Context, params *CreateTransitGatewayPolicyTableInput, optFns ...func(*Options)) (*CreateTransitGatewayPolicyTableOutput, error) { - if params == nil { - params = &CreateTransitGatewayPolicyTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayPolicyTable", params, optFns, c.addOperationCreateTransitGatewayPolicyTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayPolicyTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayPolicyTableInput struct { - - // The ID of the transit gateway used for the policy table. - // - // This member is required. - TransitGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags specification for the transit gateway policy table created during the - // request. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayPolicyTableOutput struct { - - // Describes the created transit gateway policy table. - TransitGatewayPolicyTable *types.TransitGatewayPolicyTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayPolicyTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayPolicyTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayPolicyTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayPolicyTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayPolicyTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go deleted file mode 100644 index 330029dfe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayPrefixListReference.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a reference (route) to a prefix list in a specified transit gateway -// route table. -func (c *Client) CreateTransitGatewayPrefixListReference(ctx context.Context, params *CreateTransitGatewayPrefixListReferenceInput, optFns ...func(*Options)) (*CreateTransitGatewayPrefixListReferenceOutput, error) { - if params == nil { - params = &CreateTransitGatewayPrefixListReferenceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayPrefixListReference", params, optFns, c.addOperationCreateTransitGatewayPrefixListReferenceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayPrefixListReferenceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayPrefixListReferenceInput struct { - - // The ID of the prefix list that is used for destination matches. - // - // This member is required. - PrefixListId *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Indicates whether to drop traffic that matches this route. - Blackhole *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the attachment to which traffic is routed. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -type CreateTransitGatewayPrefixListReferenceOutput struct { - - // Information about the prefix list reference. - TransitGatewayPrefixListReference *types.TransitGatewayPrefixListReference - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayPrefixListReferenceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayPrefixListReference{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayPrefixListReference"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayPrefixListReference(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayPrefixListReference(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayPrefixListReference", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRoute.go deleted file mode 100644 index 61339f4ca..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRoute.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a static route for the specified transit gateway route table. -func (c *Client) CreateTransitGatewayRoute(ctx context.Context, params *CreateTransitGatewayRouteInput, optFns ...func(*Options)) (*CreateTransitGatewayRouteOutput, error) { - if params == nil { - params = &CreateTransitGatewayRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayRoute", params, optFns, c.addOperationCreateTransitGatewayRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayRouteInput struct { - - // The CIDR range used for destination matches. Routing decisions are based on the - // most specific match. - // - // This member is required. - DestinationCidrBlock *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Indicates whether to drop traffic that matches this route. - Blackhole *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -type CreateTransitGatewayRouteOutput struct { - - // Information about the route. - Route *types.TransitGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTable.go deleted file mode 100644 index 2cb856665..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTable.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a route table for the specified transit gateway. -func (c *Client) CreateTransitGatewayRouteTable(ctx context.Context, params *CreateTransitGatewayRouteTableInput, optFns ...func(*Options)) (*CreateTransitGatewayRouteTableOutput, error) { - if params == nil { - params = &CreateTransitGatewayRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayRouteTable", params, optFns, c.addOperationCreateTransitGatewayRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayRouteTableInput struct { - - // The ID of the transit gateway. - // - // This member is required. - TransitGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the transit gateway route table. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayRouteTableOutput struct { - - // Information about the transit gateway route table. - TransitGatewayRouteTable *types.TransitGatewayRouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go deleted file mode 100644 index df5bad54c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayRouteTableAnnouncement.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Advertises a new transit gateway route table. -func (c *Client) CreateTransitGatewayRouteTableAnnouncement(ctx context.Context, params *CreateTransitGatewayRouteTableAnnouncementInput, optFns ...func(*Options)) (*CreateTransitGatewayRouteTableAnnouncementOutput, error) { - if params == nil { - params = &CreateTransitGatewayRouteTableAnnouncementInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayRouteTableAnnouncement", params, optFns, c.addOperationCreateTransitGatewayRouteTableAnnouncementMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayRouteTableAnnouncementOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayRouteTableAnnouncementInput struct { - - // The ID of the peering attachment. - // - // This member is required. - PeeringAttachmentId *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags specifications applied to the transit gateway route table announcement. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayRouteTableAnnouncementOutput struct { - - // Provides details about the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncement *types.TransitGatewayRouteTableAnnouncement - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayRouteTableAnnouncementMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayRouteTableAnnouncement{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayRouteTableAnnouncement{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayRouteTableAnnouncement"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayRouteTableAnnouncementValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayRouteTableAnnouncement(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayRouteTableAnnouncement(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayRouteTableAnnouncement", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go deleted file mode 100644 index a5bc045d0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateTransitGatewayVpcAttachment.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches the specified VPC to the specified transit gateway. If you attach a -// VPC with a CIDR range that overlaps the CIDR range of a VPC that is already -// attached, the new VPC CIDR range is not propagated to the default propagation -// route table. To send VPC traffic to an attached transit gateway, add a route to -// the VPC route table using CreateRoute . -func (c *Client) CreateTransitGatewayVpcAttachment(ctx context.Context, params *CreateTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*CreateTransitGatewayVpcAttachmentOutput, error) { - if params == nil { - params = &CreateTransitGatewayVpcAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTransitGatewayVpcAttachment", params, optFns, c.addOperationCreateTransitGatewayVpcAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTransitGatewayVpcAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTransitGatewayVpcAttachmentInput struct { - - // The IDs of one or more subnets. You can specify only one subnet per - // Availability Zone. You must specify at least one subnet, but we recommend that - // you specify two subnets for better availability. The transit gateway uses one IP - // address from each specified subnet. - // - // This member is required. - SubnetIds []string - - // The ID of the transit gateway. - // - // This member is required. - TransitGatewayId *string - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The VPC attachment options. - Options *types.CreateTransitGatewayVpcAttachmentRequestOptions - - // The tags to apply to the VPC attachment. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateTransitGatewayVpcAttachmentOutput struct { - - // Information about the VPC attachment. - TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTransitGatewayVpcAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTransitGatewayVpcAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTransitGatewayVpcAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessEndpoint.go deleted file mode 100644 index 9f20f5751..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessEndpoint.go +++ /dev/null @@ -1,236 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// An Amazon Web Services Verified Access endpoint is where you define your -// application along with an optional endpoint-level access policy. -func (c *Client) CreateVerifiedAccessEndpoint(ctx context.Context, params *CreateVerifiedAccessEndpointInput, optFns ...func(*Options)) (*CreateVerifiedAccessEndpointOutput, error) { - if params == nil { - params = &CreateVerifiedAccessEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVerifiedAccessEndpoint", params, optFns, c.addOperationCreateVerifiedAccessEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVerifiedAccessEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVerifiedAccessEndpointInput struct { - - // The DNS name for users to reach your application. - // - // This member is required. - ApplicationDomain *string - - // The type of attachment. - // - // This member is required. - AttachmentType types.VerifiedAccessEndpointAttachmentType - - // The ARN of the public TLS/SSL certificate in Amazon Web Services Certificate - // Manager to associate with the endpoint. The CN in the certificate must match the - // DNS name your end users will use to reach your application. - // - // This member is required. - DomainCertificateArn *string - - // A custom identifier that is prepended to the DNS name that is generated for the - // endpoint. - // - // This member is required. - EndpointDomainPrefix *string - - // The type of Verified Access endpoint to create. - // - // This member is required. - EndpointType types.VerifiedAccessEndpointType - - // The ID of the Verified Access group to associate the endpoint with. - // - // This member is required. - VerifiedAccessGroupId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access endpoint. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The load balancer details. This parameter is required if the endpoint type is - // load-balancer . - LoadBalancerOptions *types.CreateVerifiedAccessEndpointLoadBalancerOptions - - // The network interface details. This parameter is required if the endpoint type - // is network-interface . - NetworkInterfaceOptions *types.CreateVerifiedAccessEndpointEniOptions - - // The Verified Access policy document. - PolicyDocument *string - - // The IDs of the security groups to associate with the Verified Access endpoint. - // Required if AttachmentType is set to vpc . - SecurityGroupIds []string - - // The options for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationRequest - - // The tags to assign to the Verified Access endpoint. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateVerifiedAccessEndpointOutput struct { - - // Details about the Verified Access endpoint. - VerifiedAccessEndpoint *types.VerifiedAccessEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVerifiedAccessEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVerifiedAccessEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVerifiedAccessEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVerifiedAccessEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateVerifiedAccessEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateVerifiedAccessEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVerifiedAccessEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateVerifiedAccessEndpoint struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVerifiedAccessEndpoint) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVerifiedAccessEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateVerifiedAccessEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVerifiedAccessEndpointInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateVerifiedAccessEndpointMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVerifiedAccessEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateVerifiedAccessEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVerifiedAccessEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessGroup.go deleted file mode 100644 index b9ed06238..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessGroup.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// An Amazon Web Services Verified Access group is a collection of Amazon Web -// Services Verified Access endpoints who's associated applications have similar -// security requirements. Each instance within a Verified Access group shares an -// Verified Access policy. For example, you can group all Verified Access instances -// associated with "sales" applications together and use one common Verified Access -// policy. -func (c *Client) CreateVerifiedAccessGroup(ctx context.Context, params *CreateVerifiedAccessGroupInput, optFns ...func(*Options)) (*CreateVerifiedAccessGroupOutput, error) { - if params == nil { - params = &CreateVerifiedAccessGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVerifiedAccessGroup", params, optFns, c.addOperationCreateVerifiedAccessGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVerifiedAccessGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVerifiedAccessGroupInput struct { - - // The ID of the Verified Access instance. - // - // This member is required. - VerifiedAccessInstanceId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access group. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Verified Access policy document. - PolicyDocument *string - - // The options for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationRequest - - // The tags to assign to the Verified Access group. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateVerifiedAccessGroupOutput struct { - - // Details about the Verified Access group. - VerifiedAccessGroup *types.VerifiedAccessGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVerifiedAccessGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVerifiedAccessGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVerifiedAccessGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVerifiedAccessGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateVerifiedAccessGroupMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateVerifiedAccessGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVerifiedAccessGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateVerifiedAccessGroup struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVerifiedAccessGroup) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVerifiedAccessGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateVerifiedAccessGroupInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVerifiedAccessGroupInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateVerifiedAccessGroupMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVerifiedAccessGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateVerifiedAccessGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVerifiedAccessGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessInstance.go deleted file mode 100644 index 679af5b0e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessInstance.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// An Amazon Web Services Verified Access instance is a regional entity that -// evaluates application requests and grants access only when your security -// requirements are met. -func (c *Client) CreateVerifiedAccessInstance(ctx context.Context, params *CreateVerifiedAccessInstanceInput, optFns ...func(*Options)) (*CreateVerifiedAccessInstanceOutput, error) { - if params == nil { - params = &CreateVerifiedAccessInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVerifiedAccessInstance", params, optFns, c.addOperationCreateVerifiedAccessInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVerifiedAccessInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVerifiedAccessInstanceInput struct { - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access instance. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Enable or disable support for Federal Information Processing Standards (FIPS) - // on the instance. - FIPSEnabled *bool - - // The tags to assign to the Verified Access instance. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateVerifiedAccessInstanceOutput struct { - - // Details about the Verified Access instance. - VerifiedAccessInstance *types.VerifiedAccessInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVerifiedAccessInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVerifiedAccessInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVerifiedAccessInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVerifiedAccessInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateVerifiedAccessInstanceMiddleware(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVerifiedAccessInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateVerifiedAccessInstance struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVerifiedAccessInstance) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVerifiedAccessInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateVerifiedAccessInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVerifiedAccessInstanceInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateVerifiedAccessInstanceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVerifiedAccessInstance{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateVerifiedAccessInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVerifiedAccessInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go deleted file mode 100644 index 5424e51a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVerifiedAccessTrustProvider.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// A trust provider is a third-party entity that creates, maintains, and manages -// identity information for users and devices. When an application request is made, -// the identity information sent by the trust provider is evaluated by Verified -// Access before allowing or denying the application request. -func (c *Client) CreateVerifiedAccessTrustProvider(ctx context.Context, params *CreateVerifiedAccessTrustProviderInput, optFns ...func(*Options)) (*CreateVerifiedAccessTrustProviderOutput, error) { - if params == nil { - params = &CreateVerifiedAccessTrustProviderInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVerifiedAccessTrustProvider", params, optFns, c.addOperationCreateVerifiedAccessTrustProviderMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVerifiedAccessTrustProviderOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVerifiedAccessTrustProviderInput struct { - - // The identifier to be used when working with policy rules. - // - // This member is required. - PolicyReferenceName *string - - // The type of trust provider. - // - // This member is required. - TrustProviderType types.TrustProviderType - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access trust provider. - Description *string - - // The options for a device-based trust provider. This parameter is required when - // the provider type is device . - DeviceOptions *types.CreateVerifiedAccessTrustProviderDeviceOptions - - // The type of device-based trust provider. This parameter is required when the - // provider type is device . - DeviceTrustProviderType types.DeviceTrustProviderType - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The options for a OpenID Connect-compatible user-identity trust provider. This - // parameter is required when the provider type is user . - OidcOptions *types.CreateVerifiedAccessTrustProviderOidcOptions - - // The options for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationRequest - - // The tags to assign to the Verified Access trust provider. - TagSpecifications []types.TagSpecification - - // The type of user-based trust provider. This parameter is required when the - // provider type is user . - UserTrustProviderType types.UserTrustProviderType - - noSmithyDocumentSerde -} - -type CreateVerifiedAccessTrustProviderOutput struct { - - // Details about the Verified Access trust provider. - VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVerifiedAccessTrustProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVerifiedAccessTrustProvider"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateVerifiedAccessTrustProviderValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVerifiedAccessTrustProvider(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateVerifiedAccessTrustProvider struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVerifiedAccessTrustProvider) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVerifiedAccessTrustProviderInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateVerifiedAccessTrustProviderMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVerifiedAccessTrustProvider{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateVerifiedAccessTrustProvider(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVerifiedAccessTrustProvider", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVolume.go deleted file mode 100644 index be4de42c1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVolume.go +++ /dev/null @@ -1,335 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates an EBS volume that can be attached to an instance in the same -// Availability Zone. You can create a new empty volume or restore a volume from an -// EBS snapshot. Any Amazon Web Services Marketplace product codes from the -// snapshot are propagated to the volume. You can create encrypted volumes. -// Encrypted volumes must be attached to instances that support Amazon EBS -// encryption. Volumes that are created from encrypted snapshots are also -// automatically encrypted. For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. You can tag your volumes during -// creation. For more information, see Tag your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. For more information, see -// Create an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) CreateVolume(ctx context.Context, params *CreateVolumeInput, optFns ...func(*Options)) (*CreateVolumeOutput, error) { - if params == nil { - params = &CreateVolumeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVolume", params, optFns, c.addOperationCreateVolumeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVolumeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVolumeInput struct { - - // The ID of the Availability Zone in which to create the volume. For example, - // us-east-1a . - // - // This member is required. - AvailabilityZone *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether the volume should be encrypted. The effect of setting the - // encryption state to true depends on the volume origin (new or from a snapshot), - // starting encryption state, ownership, and whether encryption by default is - // enabled. For more information, see Encryption by default (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default) - // in the Amazon Elastic Compute Cloud User Guide. Encrypted Amazon EBS volumes - // must be attached to instances that support Amazon EBS encryption. For more - // information, see Supported instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances) - // . - Encrypted *bool - - // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 - // volumes, this represents the number of IOPS that are provisioned for the volume. - // For gp2 volumes, this represents the baseline performance of the volume and the - // rate at which the volume accumulates I/O credits for bursting. The following are - // the supported values for each volume type: - // - gp3 : 3,000 - 16,000 IOPS - // - io1 : 100 - 64,000 IOPS - // - io2 : 100 - 256,000 IOPS - // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the - // Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // . On other instances, you can achieve performance up to 32,000 IOPS. This - // parameter is required for io1 and io2 volumes. The default for gp3 volumes is - // 3,000 IOPS. This parameter is not supported for gp2 , st1 , sc1 , or standard - // volumes. - Iops *int32 - - // The identifier of the Key Management Service (KMS) KMS key to use for Amazon - // EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS - // is used. If KmsKeyId is specified, the encrypted state must be true . You can - // specify the KMS key using any of the following: - // - Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. - // - Key alias. For example, alias/ExampleAlias. - // - Key ARN. For example, - // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - Alias ARN. For example, - // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you - // specify an ID, alias, or ARN that is not valid, the action can appear to - // complete, but eventually fails. - KmsKeyId *string - - // Indicates whether to enable Amazon EBS Multi-Attach. If you enable - // Multi-Attach, you can attach the volume to up to 16 Instances built on the - // Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // in the same Availability Zone. This parameter is supported with io1 and io2 - // volumes only. For more information, see Amazon EBS Multi-Attach (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) - // in the Amazon Elastic Compute Cloud User Guide. - MultiAttachEnabled *bool - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The size of the volume, in GiBs. You must specify either a snapshot ID or a - // volume size. If you specify a snapshot, the default is the snapshot size. You - // can specify a volume size that is equal to or larger than the snapshot size. The - // following are the supported volumes sizes for each volume type: - // - gp2 and gp3 : 1 - 16,384 GiB - // - io1 : 4 - 16,384 GiB - // - io2 : 4 - 65,536 GiB - // - st1 and sc1 : 125 - 16,384 GiB - // - standard : 1 - 1024 GiB - Size *int32 - - // The snapshot from which to create the volume. You must specify either a - // snapshot ID or a volume size. - SnapshotId *string - - // The tags to apply to the volume during creation. - TagSpecifications []types.TagSpecification - - // The throughput to provision for a volume, with a maximum of 1,000 MiB/s. This - // parameter is valid only for gp3 volumes. Valid Range: Minimum value of 125. - // Maximum value of 1000. - Throughput *int32 - - // The volume type. This parameter can be one of the following values: - // - General Purpose SSD: gp2 | gp3 - // - Provisioned IOPS SSD: io1 | io2 - // - Throughput Optimized HDD: st1 - // - Cold HDD: sc1 - // - Magnetic: standard - // Throughput Optimized HDD ( st1 ) and Cold HDD ( sc1 ) volumes can't be used as - // boot volumes. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. Default: gp2 - VolumeType types.VolumeType - - noSmithyDocumentSerde -} - -// Describes a volume. -type CreateVolumeOutput struct { - - // Information about the volume attachments. - Attachments []types.VolumeAttachment - - // The Availability Zone for the volume. - AvailabilityZone *string - - // The time stamp when volume creation was initiated. - CreateTime *time.Time - - // Indicates whether the volume is encrypted. - Encrypted *bool - - // Indicates whether the volume was created using fast snapshot restore. - FastRestored *bool - - // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 - // volumes, this represents the number of IOPS that are provisioned for the volume. - // For gp2 volumes, this represents the baseline performance of the volume and the - // rate at which the volume accumulates I/O credits for bursting. - Iops *int32 - - // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that - // was used to protect the volume encryption key for the volume. - KmsKeyId *string - - // Indicates whether Amazon EBS Multi-Attach is enabled. - MultiAttachEnabled *bool - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The size of the volume, in GiBs. - Size *int32 - - // The snapshot from which the volume was created, if applicable. - SnapshotId *string - - // Reserved for future use. - SseType types.SSEType - - // The volume state. - State types.VolumeState - - // Any tags assigned to the volume. - Tags []types.Tag - - // The throughput that the volume supports, in MiB/s. - Throughput *int32 - - // The ID of the volume. - VolumeId *string - - // The volume type. - VolumeType types.VolumeType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVolume{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVolume{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVolume"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateVolumeMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateVolumeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVolume(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateVolume struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateVolume) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateVolumeInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateVolumeMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateVolume{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateVolume(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVolume", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpc.go deleted file mode 100644 index dd27cd3c5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpc.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a VPC with the specified CIDR blocks. For more information, see IP -// addressing for your VPCs and subnets (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-ip-addressing.html) -// in the Amazon VPC User Guide. You can optionally request an IPv6 CIDR block for -// the VPC. You can request an Amazon-provided IPv6 CIDR block from Amazon's pool -// of IPv6 addresses or an IPv6 CIDR block from an IPv6 address pool that you -// provisioned through bring your own IP addresses ( BYOIP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) -// ). By default, each instance that you launch in the VPC has the default DHCP -// options, which include only a default DNS server that we provide -// (AmazonProvidedDNS). For more information, see DHCP option sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) -// in the Amazon VPC User Guide. You can specify the instance tenancy value for the -// VPC when you create it. You can't change this value for the VPC after you create -// it. For more information, see Dedicated Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) -// in the Amazon EC2 User Guide. -func (c *Client) CreateVpc(ctx context.Context, params *CreateVpcInput, optFns ...func(*Options)) (*CreateVpcOutput, error) { - if params == nil { - params = &CreateVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpc", params, optFns, c.addOperationCreateVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVpcInput struct { - - // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the - // VPC. You cannot specify the range of IP addresses, or the size of the CIDR - // block. - AmazonProvidedIpv6CidrBlock *bool - - // The IPv4 network range for the VPC, in CIDR notation. For example, 10.0.0.0/16 . - // We modify the specified CIDR block to its canonical form; for example, if you - // specify 100.68.0.18/18 , we modify it to 100.68.0.0/18 . - CidrBlock *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tenancy options for instances launched into the VPC. For default , instances - // are launched with shared tenancy by default. You can launch instances with any - // tenancy into a shared tenancy VPC. For dedicated , instances are launched as - // dedicated tenancy instances by default. You can only launch instances with a - // tenancy of dedicated or host into a dedicated tenancy VPC. Important: The host - // value cannot be used with this parameter. Use the default or dedicated values - // only. Default: default - InstanceTenancy types.Tenancy - - // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. For - // more information, see What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) - // in the Amazon VPC IPAM User Guide. - Ipv4IpamPoolId *string - - // The netmask length of the IPv4 CIDR you want to allocate to this VPC from an - // Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see - // What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) - // in the Amazon VPC IPAM User Guide. - Ipv4NetmaskLength *int32 - - // The IPv6 CIDR block from the IPv6 address pool. You must also specify Ipv6Pool - // in the request. To let Amazon choose the IPv6 CIDR block for you, omit this - // parameter. - Ipv6CidrBlock *string - - // The name of the location from which we advertise the IPV6 CIDR block. Use this - // parameter to limit the address to this location. You must set - // AmazonProvidedIpv6CidrBlock to true to use this parameter. - Ipv6CidrBlockNetworkBorderGroup *string - - // The ID of an IPv6 IPAM pool which will be used to allocate this VPC an IPv6 - // CIDR. IPAM is a VPC feature that you can use to automate your IP address - // management workflows including assigning, tracking, troubleshooting, and - // auditing IP addresses across Amazon Web Services Regions and accounts throughout - // your Amazon Web Services Organization. For more information, see What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) - // in the Amazon VPC IPAM User Guide. - Ipv6IpamPoolId *string - - // The netmask length of the IPv6 CIDR you want to allocate to this VPC from an - // Amazon VPC IP Address Manager (IPAM) pool. For more information about IPAM, see - // What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) - // in the Amazon VPC IPAM User Guide. - Ipv6NetmaskLength *int32 - - // The ID of an IPv6 address pool from which to allocate the IPv6 CIDR block. - Ipv6Pool *string - - // The tags to assign to the VPC. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateVpcOutput struct { - - // Information about the VPC. - Vpc *types.Vpc - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpoint.go deleted file mode 100644 index cd7e66930..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpoint.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a VPC endpoint. A VPC endpoint provides a private connection between -// the specified VPC and the specified endpoint service. You can use an endpoint -// service provided by Amazon Web Services, an Amazon Web Services Marketplace -// Partner, or another Amazon Web Services account. For more information, see the -// Amazon Web Services PrivateLink User Guide (https://docs.aws.amazon.com/vpc/latest/privatelink/) -// . -func (c *Client) CreateVpcEndpoint(ctx context.Context, params *CreateVpcEndpointInput, optFns ...func(*Options)) (*CreateVpcEndpointOutput, error) { - if params == nil { - params = &CreateVpcEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpcEndpoint", params, optFns, c.addOperationCreateVpcEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpcEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVpcEndpointInput struct { - - // The name of the endpoint service. - // - // This member is required. - ServiceName *string - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The DNS options for the endpoint. - DnsOptions *types.DnsOptionsSpecification - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IP address type for the endpoint. - IpAddressType types.IpAddressType - - // (Interface and gateway endpoints) A policy to attach to the endpoint that - // controls access to the service. The policy must be in valid JSON format. If this - // parameter is not specified, we attach a default policy that allows full access - // to the service. - PolicyDocument *string - - // (Interface endpoint) Indicates whether to associate a private hosted zone with - // the specified VPC. The private hosted zone contains a record set for the default - // public DNS name for the service for the Region (for example, - // kinesis.us-east-1.amazonaws.com ), which resolves to the private IP addresses of - // the endpoint network interfaces in the VPC. This enables you to make requests to - // the default public DNS name for the service instead of the public DNS names that - // are automatically generated by the VPC endpoint service. To use a private hosted - // zone, you must set the following VPC attributes to true : enableDnsHostnames - // and enableDnsSupport . Use ModifyVpcAttribute to set the VPC attributes. - // Default: true - PrivateDnsEnabled *bool - - // (Gateway endpoint) The route table IDs. - RouteTableIds []string - - // (Interface endpoint) The IDs of the security groups to associate with the - // endpoint network interfaces. If this parameter is not specified, we use the - // default security group for the VPC. - SecurityGroupIds []string - - // The subnet configurations for the endpoint. - SubnetConfigurations []types.SubnetConfiguration - - // (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which - // to create endpoint network interfaces. For a Gateway Load Balancer endpoint, you - // can specify only one subnet. - SubnetIds []string - - // The tags to associate with the endpoint. - TagSpecifications []types.TagSpecification - - // The type of endpoint. Default: Gateway - VpcEndpointType types.VpcEndpointType - - noSmithyDocumentSerde -} - -type CreateVpcEndpointOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. - ClientToken *string - - // Information about the endpoint. - VpcEndpoint *types.VpcEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpcEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpcEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateVpcEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpcEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpcEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go deleted file mode 100644 index b51a736cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointConnectionNotification.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a connection notification for a specified VPC endpoint or VPC endpoint -// service. A connection notification notifies you of specific endpoint events. You -// must create an SNS topic to receive notifications. For more information, see -// Create a Topic (https://docs.aws.amazon.com/sns/latest/dg/CreateTopic.html) in -// the Amazon Simple Notification Service Developer Guide. You can create a -// connection notification for interface endpoints only. -func (c *Client) CreateVpcEndpointConnectionNotification(ctx context.Context, params *CreateVpcEndpointConnectionNotificationInput, optFns ...func(*Options)) (*CreateVpcEndpointConnectionNotificationOutput, error) { - if params == nil { - params = &CreateVpcEndpointConnectionNotificationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpcEndpointConnectionNotification", params, optFns, c.addOperationCreateVpcEndpointConnectionNotificationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpcEndpointConnectionNotificationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVpcEndpointConnectionNotificationInput struct { - - // The endpoint events for which to receive notifications. Valid values are Accept - // , Connect , Delete , and Reject . - // - // This member is required. - ConnectionEvents []string - - // The ARN of the SNS topic for the notifications. - // - // This member is required. - ConnectionNotificationArn *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the endpoint service. - ServiceId *string - - // The ID of the endpoint. - VpcEndpointId *string - - noSmithyDocumentSerde -} - -type CreateVpcEndpointConnectionNotificationOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. - ClientToken *string - - // Information about the notification. - ConnectionNotification *types.ConnectionNotification - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpcEndpointConnectionNotificationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcEndpointConnectionNotification{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpcEndpointConnectionNotification"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateVpcEndpointConnectionNotificationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcEndpointConnectionNotification(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpcEndpointConnectionNotification(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpcEndpointConnectionNotification", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go deleted file mode 100644 index 0db5837b7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcEndpointServiceConfiguration.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a VPC endpoint service to which service consumers (Amazon Web Services -// accounts, users, and IAM roles) can connect. Before you create an endpoint -// service, you must create one of the following for your service: -// - A Network Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/) -// . Service consumers connect to your service using an interface endpoint. -// - A Gateway Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/) -// . Service consumers connect to your service using a Gateway Load Balancer -// endpoint. -// -// If you set the private DNS name, you must prove that you own the private DNS -// domain name. For more information, see the Amazon Web Services PrivateLink Guide (https://docs.aws.amazon.com/vpc/latest/privatelink/) -// . -func (c *Client) CreateVpcEndpointServiceConfiguration(ctx context.Context, params *CreateVpcEndpointServiceConfigurationInput, optFns ...func(*Options)) (*CreateVpcEndpointServiceConfigurationOutput, error) { - if params == nil { - params = &CreateVpcEndpointServiceConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpcEndpointServiceConfiguration", params, optFns, c.addOperationCreateVpcEndpointServiceConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpcEndpointServiceConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVpcEndpointServiceConfigurationInput struct { - - // Indicates whether requests from service consumers to create an endpoint to your - // service must be accepted manually. - AcceptanceRequired *bool - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Amazon Resource Names (ARNs) of the Gateway Load Balancers. - GatewayLoadBalancerArns []string - - // The Amazon Resource Names (ARNs) of the Network Load Balancers. - NetworkLoadBalancerArns []string - - // (Interface endpoint configuration) The private DNS name to assign to the VPC - // endpoint service. - PrivateDnsName *string - - // The supported IP address types. The possible values are ipv4 and ipv6 . - SupportedIpAddressTypes []string - - // The tags to associate with the service. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateVpcEndpointServiceConfigurationOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. - ClientToken *string - - // Information about the service configuration. - ServiceConfiguration *types.ServiceConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpcEndpointServiceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpcEndpointServiceConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcEndpointServiceConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpcEndpointServiceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpcEndpointServiceConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcPeeringConnection.go deleted file mode 100644 index bc14ea000..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpcPeeringConnection.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Requests a VPC peering connection between two VPCs: a requester VPC that you -// own and an accepter VPC with which to create the connection. The accepter VPC -// can belong to another Amazon Web Services account and can be in a different -// Region to the requester VPC. The requester VPC and accepter VPC cannot have -// overlapping CIDR blocks. Limitations and rules apply to a VPC peering -// connection. For more information, see the limitations (https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html#vpc-peering-limitations) -// section in the VPC Peering Guide. The owner of the accepter VPC must accept the -// peering request to activate the peering connection. The VPC peering connection -// request expires after 7 days, after which it cannot be accepted or rejected. If -// you create a VPC peering connection request between VPCs with overlapping CIDR -// blocks, the VPC peering connection has a status of failed . -func (c *Client) CreateVpcPeeringConnection(ctx context.Context, params *CreateVpcPeeringConnectionInput, optFns ...func(*Options)) (*CreateVpcPeeringConnectionOutput, error) { - if params == nil { - params = &CreateVpcPeeringConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpcPeeringConnection", params, optFns, c.addOperationCreateVpcPeeringConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpcPeeringConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVpcPeeringConnectionInput struct { - - // The ID of the requester VPC. You must specify this parameter in the request. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Amazon Web Services account ID of the owner of the accepter VPC. Default: - // Your Amazon Web Services account ID - PeerOwnerId *string - - // The Region code for the accepter VPC, if the accepter VPC is located in a - // Region other than the Region in which you make the request. Default: The Region - // in which you make the request. - PeerRegion *string - - // The ID of the VPC with which you are creating the VPC peering connection. You - // must specify this parameter in the request. - PeerVpcId *string - - // The tags to assign to the peering connection. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type CreateVpcPeeringConnectionOutput struct { - - // Information about the VPC peering connection. - VpcPeeringConnection *types.VpcPeeringConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpcPeeringConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateVpcPeeringConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpcPeeringConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpcPeeringConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go deleted file mode 100644 index 5286399c5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnection.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a VPN connection between an existing virtual private gateway or transit -// gateway and a customer gateway. The supported connection type is ipsec.1 . The -// response includes information that you need to give to your network -// administrator to configure your customer gateway. We strongly recommend that you -// use HTTPS when calling this operation because the response contains sensitive -// cryptographic information for configuring your customer gateway device. If you -// decide to shut down your VPN connection for any reason and later create a new -// VPN connection, you must reconfigure your customer gateway with the new -// information returned from this call. This is an idempotent operation. If you -// perform the operation more than once, Amazon EC2 doesn't return an error. For -// more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) CreateVpnConnection(ctx context.Context, params *CreateVpnConnectionInput, optFns ...func(*Options)) (*CreateVpnConnectionOutput, error) { - if params == nil { - params = &CreateVpnConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpnConnection", params, optFns, c.addOperationCreateVpnConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpnConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateVpnConnection. -type CreateVpnConnectionInput struct { - - // The ID of the customer gateway. - // - // This member is required. - CustomerGatewayId *string - - // The type of VPN connection ( ipsec.1 ). - // - // This member is required. - Type *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The options for the VPN connection. - Options *types.VpnConnectionOptionsSpecification - - // The tags to apply to the VPN connection. - TagSpecifications []types.TagSpecification - - // The ID of the transit gateway. If you specify a transit gateway, you cannot - // specify a virtual private gateway. - TransitGatewayId *string - - // The ID of the virtual private gateway. If you specify a virtual private - // gateway, you cannot specify a transit gateway. - VpnGatewayId *string - - noSmithyDocumentSerde -} - -// Contains the output of CreateVpnConnection. -type CreateVpnConnectionOutput struct { - - // Information about the VPN connection. - VpnConnection *types.VpnConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpnConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpnConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpnConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpnConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateVpnConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpnConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpnConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpnConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnectionRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnectionRoute.go deleted file mode 100644 index 9f93fc700..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnConnectionRoute.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a static route associated with a VPN connection between an existing -// virtual private gateway and a VPN customer gateway. The static route allows -// traffic to be routed from the virtual private gateway to the VPN customer -// gateway. For more information, see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) CreateVpnConnectionRoute(ctx context.Context, params *CreateVpnConnectionRouteInput, optFns ...func(*Options)) (*CreateVpnConnectionRouteOutput, error) { - if params == nil { - params = &CreateVpnConnectionRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpnConnectionRoute", params, optFns, c.addOperationCreateVpnConnectionRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpnConnectionRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateVpnConnectionRoute. -type CreateVpnConnectionRouteInput struct { - - // The CIDR block associated with the local subnet of the customer network. - // - // This member is required. - DestinationCidrBlock *string - - // The ID of the VPN connection. - // - // This member is required. - VpnConnectionId *string - - noSmithyDocumentSerde -} - -type CreateVpnConnectionRouteOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpnConnectionRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpnConnectionRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpnConnectionRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpnConnectionRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateVpnConnectionRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpnConnectionRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpnConnectionRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpnConnectionRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnGateway.go deleted file mode 100644 index 54ee23928..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_CreateVpnGateway.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a virtual private gateway. A virtual private gateway is the endpoint on -// the VPC side of your VPN connection. You can create a virtual private gateway -// before creating the VPC itself. For more information, see Amazon Web Services -// Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) in -// the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) CreateVpnGateway(ctx context.Context, params *CreateVpnGatewayInput, optFns ...func(*Options)) (*CreateVpnGatewayOutput, error) { - if params == nil { - params = &CreateVpnGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVpnGateway", params, optFns, c.addOperationCreateVpnGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVpnGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for CreateVpnGateway. -type CreateVpnGatewayInput struct { - - // The type of VPN connection this virtual private gateway supports. - // - // This member is required. - Type types.GatewayType - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // If you're using a 16-bit ASN, it must be in the 64512 to 65534 range. If you're - // using a 32-bit ASN, it must be in the 4200000000 to 4294967294 range. Default: - // 64512 - AmazonSideAsn *int64 - - // The Availability Zone for the virtual private gateway. - AvailabilityZone *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the virtual private gateway. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -// Contains the output of CreateVpnGateway. -type CreateVpnGatewayOutput struct { - - // Information about the virtual private gateway. - VpnGateway *types.VpnGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpCreateVpnGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpCreateVpnGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVpnGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpCreateVpnGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVpnGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVpnGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCarrierGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCarrierGateway.go deleted file mode 100644 index bc0cb92b9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCarrierGateway.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a carrier gateway. If you do not delete the route that contains the -// carrier gateway as the Target, the route is a blackhole route. For information -// about how to delete a route, see DeleteRoute (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeleteRoute.html) -// . -func (c *Client) DeleteCarrierGateway(ctx context.Context, params *DeleteCarrierGatewayInput, optFns ...func(*Options)) (*DeleteCarrierGatewayOutput, error) { - if params == nil { - params = &DeleteCarrierGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteCarrierGateway", params, optFns, c.addOperationDeleteCarrierGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteCarrierGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteCarrierGatewayInput struct { - - // The ID of the carrier gateway. - // - // This member is required. - CarrierGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteCarrierGatewayOutput struct { - - // Information about the carrier gateway. - CarrierGateway *types.CarrierGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteCarrierGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteCarrierGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteCarrierGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCarrierGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteCarrierGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCarrierGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteCarrierGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteCarrierGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnEndpoint.go deleted file mode 100644 index d9ae757bc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnEndpoint.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Client VPN endpoint. You must disassociate all target -// networks before you can delete a Client VPN endpoint. -func (c *Client) DeleteClientVpnEndpoint(ctx context.Context, params *DeleteClientVpnEndpointInput, optFns ...func(*Options)) (*DeleteClientVpnEndpointOutput, error) { - if params == nil { - params = &DeleteClientVpnEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteClientVpnEndpoint", params, optFns, c.addOperationDeleteClientVpnEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteClientVpnEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteClientVpnEndpointInput struct { - - // The ID of the Client VPN to be deleted. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteClientVpnEndpointOutput struct { - - // The current state of the Client VPN endpoint. - Status *types.ClientVpnEndpointStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteClientVpnEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteClientVpnEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteClientVpnEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteClientVpnEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteClientVpnEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteClientVpnEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteClientVpnEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteClientVpnEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnRoute.go deleted file mode 100644 index fbe5d320a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteClientVpnRoute.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a route from a Client VPN endpoint. You can only delete routes that you -// manually added using the CreateClientVpnRoute action. You cannot delete routes -// that were automatically added when associating a subnet. To remove routes that -// have been automatically added, disassociate the target subnet from the Client -// VPN endpoint. -func (c *Client) DeleteClientVpnRoute(ctx context.Context, params *DeleteClientVpnRouteInput, optFns ...func(*Options)) (*DeleteClientVpnRouteOutput, error) { - if params == nil { - params = &DeleteClientVpnRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteClientVpnRoute", params, optFns, c.addOperationDeleteClientVpnRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteClientVpnRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteClientVpnRouteInput struct { - - // The ID of the Client VPN endpoint from which the route is to be deleted. - // - // This member is required. - ClientVpnEndpointId *string - - // The IPv4 address range, in CIDR notation, of the route to be deleted. - // - // This member is required. - DestinationCidrBlock *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the target subnet used by the route. - TargetVpcSubnetId *string - - noSmithyDocumentSerde -} - -type DeleteClientVpnRouteOutput struct { - - // The current state of the route. - Status *types.ClientVpnRouteStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteClientVpnRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteClientVpnRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteClientVpnRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteClientVpnRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteClientVpnRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteClientVpnRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteClientVpnRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteClientVpnRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCoipCidr.go deleted file mode 100644 index cb4378c04..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCoipCidr.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a range of customer-owned IP addresses. -func (c *Client) DeleteCoipCidr(ctx context.Context, params *DeleteCoipCidrInput, optFns ...func(*Options)) (*DeleteCoipCidrOutput, error) { - if params == nil { - params = &DeleteCoipCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteCoipCidr", params, optFns, c.addOperationDeleteCoipCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteCoipCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteCoipCidrInput struct { - - // A customer-owned IP address range that you want to delete. - // - // This member is required. - Cidr *string - - // The ID of the customer-owned address pool. - // - // This member is required. - CoipPoolId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteCoipCidrOutput struct { - - // Information about a range of customer-owned IP addresses. - CoipCidr *types.CoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteCoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteCoipCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteCoipCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCoipCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteCoipCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCoipCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteCoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteCoipCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCoipPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCoipPool.go deleted file mode 100644 index ec6f5e513..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCoipPool.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a pool of customer-owned IP (CoIP) addresses. -func (c *Client) DeleteCoipPool(ctx context.Context, params *DeleteCoipPoolInput, optFns ...func(*Options)) (*DeleteCoipPoolOutput, error) { - if params == nil { - params = &DeleteCoipPoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteCoipPool", params, optFns, c.addOperationDeleteCoipPoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteCoipPoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteCoipPoolInput struct { - - // The ID of the CoIP pool that you want to delete. - // - // This member is required. - CoipPoolId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteCoipPoolOutput struct { - - // Information about the CoIP address pool. - CoipPool *types.CoipPool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteCoipPoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteCoipPool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteCoipPool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCoipPool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteCoipPoolValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCoipPool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteCoipPool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteCoipPool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCustomerGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCustomerGateway.go deleted file mode 100644 index 3ed62eb13..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteCustomerGateway.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified customer gateway. You must delete the VPN connection -// before you can delete the customer gateway. -func (c *Client) DeleteCustomerGateway(ctx context.Context, params *DeleteCustomerGatewayInput, optFns ...func(*Options)) (*DeleteCustomerGatewayOutput, error) { - if params == nil { - params = &DeleteCustomerGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteCustomerGateway", params, optFns, c.addOperationDeleteCustomerGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteCustomerGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteCustomerGateway. -type DeleteCustomerGatewayInput struct { - - // The ID of the customer gateway. - // - // This member is required. - CustomerGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteCustomerGatewayOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteCustomerGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteCustomerGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteCustomerGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCustomerGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteCustomerGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomerGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteCustomerGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteCustomerGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteDhcpOptions.go deleted file mode 100644 index c2f862c63..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteDhcpOptions.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified set of DHCP options. You must disassociate the set of -// DHCP options before you can delete it. You can disassociate the set of DHCP -// options by associating either a new set of options or the default set of options -// with the VPC. -func (c *Client) DeleteDhcpOptions(ctx context.Context, params *DeleteDhcpOptionsInput, optFns ...func(*Options)) (*DeleteDhcpOptionsOutput, error) { - if params == nil { - params = &DeleteDhcpOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteDhcpOptions", params, optFns, c.addOperationDeleteDhcpOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteDhcpOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteDhcpOptionsInput struct { - - // The ID of the DHCP options set. - // - // This member is required. - DhcpOptionsId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteDhcpOptionsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteDhcpOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteDhcpOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteDhcpOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteDhcpOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteDhcpOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteDhcpOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go deleted file mode 100644 index 24c62858b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteEgressOnlyInternetGateway.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes an egress-only internet gateway. -func (c *Client) DeleteEgressOnlyInternetGateway(ctx context.Context, params *DeleteEgressOnlyInternetGatewayInput, optFns ...func(*Options)) (*DeleteEgressOnlyInternetGatewayOutput, error) { - if params == nil { - params = &DeleteEgressOnlyInternetGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteEgressOnlyInternetGateway", params, optFns, c.addOperationDeleteEgressOnlyInternetGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteEgressOnlyInternetGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteEgressOnlyInternetGatewayInput struct { - - // The ID of the egress-only internet gateway. - // - // This member is required. - EgressOnlyInternetGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteEgressOnlyInternetGatewayOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnCode *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteEgressOnlyInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteEgressOnlyInternetGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEgressOnlyInternetGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteEgressOnlyInternetGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEgressOnlyInternetGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteEgressOnlyInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteEgressOnlyInternetGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFleets.go deleted file mode 100644 index 034ef48a8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFleets.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified EC2 Fleets. After you delete an EC2 Fleet, it launches no -// new instances. You must also specify whether a deleted EC2 Fleet should -// terminate its instances. If you choose to terminate the instances, the EC2 Fleet -// enters the deleted_terminating state. Otherwise, the EC2 Fleet enters the -// deleted_running state, and the instances continue to run until they are -// interrupted or you terminate them manually. For instant fleets, EC2 Fleet must -// terminate the instances when the fleet is deleted. A deleted instant fleet with -// running instances is not supported. Restrictions -// - You can delete up to 25 instant fleets in a single request. If you exceed -// this number, no instant fleets are deleted and an error is returned. There is -// no restriction on the number of fleets of type maintain or request that can be -// deleted in a single request. -// - Up to 1000 instances can be terminated in a single request to delete instant -// fleets. -// -// For more information, see Delete an EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#delete-fleet) -// in the Amazon EC2 User Guide. -func (c *Client) DeleteFleets(ctx context.Context, params *DeleteFleetsInput, optFns ...func(*Options)) (*DeleteFleetsOutput, error) { - if params == nil { - params = &DeleteFleetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteFleets", params, optFns, c.addOperationDeleteFleetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteFleetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteFleetsInput struct { - - // The IDs of the EC2 Fleets. - // - // This member is required. - FleetIds []string - - // Indicates whether to terminate the associated instances when the EC2 Fleet is - // deleted. The default is to terminate the instances. To let the instances - // continue to run after the EC2 Fleet is deleted, specify no-terminate-instances . - // Supported only for fleets of type maintain and request . For instant fleets, - // you cannot specify NoTerminateInstances . A deleted instant fleet with running - // instances is not supported. - // - // This member is required. - TerminateInstances *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteFleetsOutput struct { - - // Information about the EC2 Fleets that are successfully deleted. - SuccessfulFleetDeletions []types.DeleteFleetSuccessItem - - // Information about the EC2 Fleets that are not successfully deleted. - UnsuccessfulFleetDeletions []types.DeleteFleetErrorItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteFleets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteFleets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFleets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteFleetsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFleets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteFleets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteFleets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFlowLogs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFlowLogs.go deleted file mode 100644 index c18f837d6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFlowLogs.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes one or more flow logs. -func (c *Client) DeleteFlowLogs(ctx context.Context, params *DeleteFlowLogsInput, optFns ...func(*Options)) (*DeleteFlowLogsOutput, error) { - if params == nil { - params = &DeleteFlowLogsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteFlowLogs", params, optFns, c.addOperationDeleteFlowLogsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteFlowLogsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteFlowLogsInput struct { - - // One or more flow log IDs. Constraint: Maximum of 1000 flow log IDs. - // - // This member is required. - FlowLogIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteFlowLogsOutput struct { - - // Information about the flow logs that could not be deleted successfully. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteFlowLogsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteFlowLogs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteFlowLogs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFlowLogs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteFlowLogsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFlowLogs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteFlowLogs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFpgaImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFpgaImage.go deleted file mode 100644 index 5009b93ef..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteFpgaImage.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Amazon FPGA Image (AFI). -func (c *Client) DeleteFpgaImage(ctx context.Context, params *DeleteFpgaImageInput, optFns ...func(*Options)) (*DeleteFpgaImageOutput, error) { - if params == nil { - params = &DeleteFpgaImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteFpgaImage", params, optFns, c.addOperationDeleteFpgaImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteFpgaImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteFpgaImageInput struct { - - // The ID of the AFI. - // - // This member is required. - FpgaImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteFpgaImageOutput struct { - - // Is true if the request succeeds, and an error otherwise. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteFpgaImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteFpgaImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteFpgaImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFpgaImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteFpgaImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFpgaImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteFpgaImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteFpgaImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceConnectEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceConnectEndpoint.go deleted file mode 100644 index 8f693a6d7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceConnectEndpoint.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified EC2 Instance Connect Endpoint. -func (c *Client) DeleteInstanceConnectEndpoint(ctx context.Context, params *DeleteInstanceConnectEndpointInput, optFns ...func(*Options)) (*DeleteInstanceConnectEndpointOutput, error) { - if params == nil { - params = &DeleteInstanceConnectEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteInstanceConnectEndpoint", params, optFns, c.addOperationDeleteInstanceConnectEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteInstanceConnectEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteInstanceConnectEndpointInput struct { - - // The ID of the EC2 Instance Connect Endpoint to delete. - // - // This member is required. - InstanceConnectEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteInstanceConnectEndpointOutput struct { - - // Information about the EC2 Instance Connect Endpoint. - InstanceConnectEndpoint *types.Ec2InstanceConnectEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteInstanceConnectEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteInstanceConnectEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteInstanceConnectEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInstanceConnectEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteInstanceConnectEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstanceConnectEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteInstanceConnectEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteInstanceConnectEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceEventWindow.go deleted file mode 100644 index 3a3ac1109..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInstanceEventWindow.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified event window. For more information, see Define event -// windows for scheduled events (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) -// in the Amazon EC2 User Guide. -func (c *Client) DeleteInstanceEventWindow(ctx context.Context, params *DeleteInstanceEventWindowInput, optFns ...func(*Options)) (*DeleteInstanceEventWindowOutput, error) { - if params == nil { - params = &DeleteInstanceEventWindowInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteInstanceEventWindow", params, optFns, c.addOperationDeleteInstanceEventWindowMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteInstanceEventWindowOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteInstanceEventWindowInput struct { - - // The ID of the event window. - // - // This member is required. - InstanceEventWindowId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specify true to force delete the event window. Use the force delete parameter - // if the event window is currently associated with targets. - ForceDelete *bool - - noSmithyDocumentSerde -} - -type DeleteInstanceEventWindowOutput struct { - - // The state of the event window. - InstanceEventWindowState *types.InstanceEventWindowStateChange - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInstanceEventWindow"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteInstanceEventWindowValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInstanceEventWindow(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteInstanceEventWindow", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInternetGateway.go deleted file mode 100644 index 5ab7735f7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteInternetGateway.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified internet gateway. You must detach the internet gateway -// from the VPC before you can delete it. -func (c *Client) DeleteInternetGateway(ctx context.Context, params *DeleteInternetGatewayInput, optFns ...func(*Options)) (*DeleteInternetGatewayOutput, error) { - if params == nil { - params = &DeleteInternetGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteInternetGateway", params, optFns, c.addOperationDeleteInternetGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteInternetGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteInternetGatewayInput struct { - - // The ID of the internet gateway. - // - // This member is required. - InternetGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteInternetGatewayOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteInternetGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteInternetGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteInternetGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteInternetGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteInternetGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteInternetGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpam.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpam.go deleted file mode 100644 index de4e000f2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpam.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete an IPAM. Deleting an IPAM removes all monitored data associated with the -// IPAM including the historical data for CIDRs. For more information, see Delete -// an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/delete-ipam.html) in the -// Amazon VPC IPAM User Guide. -func (c *Client) DeleteIpam(ctx context.Context, params *DeleteIpamInput, optFns ...func(*Options)) (*DeleteIpamOutput, error) { - if params == nil { - params = &DeleteIpamInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteIpam", params, optFns, c.addOperationDeleteIpamMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteIpamOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteIpamInput struct { - - // The ID of the IPAM to delete. - // - // This member is required. - IpamId *string - - // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, - // and any allocations in the pools in private scopes. You cannot delete the IPAM - // with this option if there is a pool in your public scope. If you use this - // option, IPAM does the following: - // - Deallocates any CIDRs allocated to VPC resources (such as VPCs) in pools in - // private scopes. No VPC resources are deleted as a result of enabling this - // option. The CIDR associated with the resource will no longer be allocated from - // an IPAM pool, but the CIDR itself will remain unchanged. - // - Deprovisions all IPv4 CIDRs provisioned to IPAM pools in private scopes. - // - Deletes all IPAM pools in private scopes. - // - Deletes all non-default private scopes in the IPAM. - // - Deletes the default public and private scopes and the IPAM. - Cascade *bool - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteIpamOutput struct { - - // Information about the results of the deletion. - Ipam *types.Ipam - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteIpamMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteIpam{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteIpam{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIpam"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteIpamValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIpam(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteIpam(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteIpam", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamPool.go deleted file mode 100644 index e645e9f60..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamPool.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete an IPAM pool. You cannot delete an IPAM pool if there are allocations in -// it or CIDRs provisioned to it. To release allocations, see -// ReleaseIpamPoolAllocation (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReleaseIpamPoolAllocation.html) -// . To deprovision pool CIDRs, see DeprovisionIpamPoolCidr (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeprovisionIpamPoolCidr.html) -// . For more information, see Delete a pool (https://docs.aws.amazon.com/vpc/latest/ipam/delete-pool-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) DeleteIpamPool(ctx context.Context, params *DeleteIpamPoolInput, optFns ...func(*Options)) (*DeleteIpamPoolOutput, error) { - if params == nil { - params = &DeleteIpamPoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteIpamPool", params, optFns, c.addOperationDeleteIpamPoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteIpamPoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteIpamPoolInput struct { - - // The ID of the pool to delete. - // - // This member is required. - IpamPoolId *string - - // Enables you to quickly delete an IPAM pool and all resources within that pool, - // including provisioned CIDRs, allocations, and other pools. You can only use this - // option to delete pools in the private scope or pools in the public scope with a - // source resource. A source resource is a resource used to provision CIDRs to a - // resource planning pool. - Cascade *bool - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteIpamPoolOutput struct { - - // Information about the results of the deletion. - IpamPool *types.IpamPool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteIpamPoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteIpamPool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteIpamPool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIpamPool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteIpamPoolValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIpamPool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteIpamPool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteIpamPool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamResourceDiscovery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamResourceDiscovery.go deleted file mode 100644 index 5c8d8ff06..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamResourceDiscovery.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes an IPAM resource discovery. A resource discovery is an IPAM component -// that enables IPAM to manage and monitor resources that belong to the owning -// account. -func (c *Client) DeleteIpamResourceDiscovery(ctx context.Context, params *DeleteIpamResourceDiscoveryInput, optFns ...func(*Options)) (*DeleteIpamResourceDiscoveryOutput, error) { - if params == nil { - params = &DeleteIpamResourceDiscoveryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteIpamResourceDiscovery", params, optFns, c.addOperationDeleteIpamResourceDiscoveryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteIpamResourceDiscoveryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteIpamResourceDiscoveryInput struct { - - // The IPAM resource discovery ID. - // - // This member is required. - IpamResourceDiscoveryId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteIpamResourceDiscoveryOutput struct { - - // The IPAM resource discovery. - IpamResourceDiscovery *types.IpamResourceDiscovery - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteIpamResourceDiscoveryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIpamResourceDiscovery"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteIpamResourceDiscoveryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIpamResourceDiscovery(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteIpamResourceDiscovery(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteIpamResourceDiscovery", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamScope.go deleted file mode 100644 index f05e4bcff..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteIpamScope.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete the scope for an IPAM. You cannot delete the default scopes. For more -// information, see Delete a scope (https://docs.aws.amazon.com/vpc/latest/ipam/delete-scope-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) DeleteIpamScope(ctx context.Context, params *DeleteIpamScopeInput, optFns ...func(*Options)) (*DeleteIpamScopeOutput, error) { - if params == nil { - params = &DeleteIpamScopeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteIpamScope", params, optFns, c.addOperationDeleteIpamScopeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteIpamScopeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteIpamScopeInput struct { - - // The ID of the scope to delete. - // - // This member is required. - IpamScopeId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteIpamScopeOutput struct { - - // Information about the results of the deletion. - IpamScope *types.IpamScope - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteIpamScopeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteIpamScope{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteIpamScope{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteIpamScope"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteIpamScopeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteIpamScope(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteIpamScope(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteIpamScope", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteKeyPair.go deleted file mode 100644 index 44b857008..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteKeyPair.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified key pair, by removing the public key from Amazon EC2. -func (c *Client) DeleteKeyPair(ctx context.Context, params *DeleteKeyPairInput, optFns ...func(*Options)) (*DeleteKeyPairOutput, error) { - if params == nil { - params = &DeleteKeyPairInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteKeyPair", params, optFns, c.addOperationDeleteKeyPairMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteKeyPairOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteKeyPairInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name of the key pair. - KeyName *string - - // The ID of the key pair. - KeyPairId *string - - noSmithyDocumentSerde -} - -type DeleteKeyPairOutput struct { - - // The ID of the key pair. - KeyPairId *string - - // Is true if the request succeeds, and an error otherwise. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteKeyPair{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteKeyPair{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteKeyPair"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeyPair(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteKeyPair(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteKeyPair", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplate.go deleted file mode 100644 index b27fc612c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplate.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a launch template. Deleting a launch template deletes all of its -// versions. -func (c *Client) DeleteLaunchTemplate(ctx context.Context, params *DeleteLaunchTemplateInput, optFns ...func(*Options)) (*DeleteLaunchTemplateOutput, error) { - if params == nil { - params = &DeleteLaunchTemplateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchTemplate", params, optFns, c.addOperationDeleteLaunchTemplateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLaunchTemplateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLaunchTemplateInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the launch template. You must specify either the LaunchTemplateId or - // the LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify either the LaunchTemplateName - // or the LaunchTemplateId , but not both. - LaunchTemplateName *string - - noSmithyDocumentSerde -} - -type DeleteLaunchTemplateOutput struct { - - // Information about the launch template. - LaunchTemplate *types.LaunchTemplate - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLaunchTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLaunchTemplate{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLaunchTemplate{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLaunchTemplate"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchTemplate(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteLaunchTemplate(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLaunchTemplate", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplateVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplateVersions.go deleted file mode 100644 index 2e2e7e3cf..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLaunchTemplateVersions.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes one or more versions of a launch template. You can't delete the default -// version of a launch template; you must first assign a different version as the -// default. If the default version is the only version for the launch template, you -// must delete the entire launch template using DeleteLaunchTemplate . You can -// delete up to 200 launch template versions in a single request. To delete more -// than 200 versions in a single request, use DeleteLaunchTemplate , which deletes -// the launch template and all of its versions. For more information, see Delete a -// launch template version (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-launch-template-versions.html#delete-launch-template-version) -// in the EC2 User Guide. -func (c *Client) DeleteLaunchTemplateVersions(ctx context.Context, params *DeleteLaunchTemplateVersionsInput, optFns ...func(*Options)) (*DeleteLaunchTemplateVersionsOutput, error) { - if params == nil { - params = &DeleteLaunchTemplateVersionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLaunchTemplateVersions", params, optFns, c.addOperationDeleteLaunchTemplateVersionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLaunchTemplateVersionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLaunchTemplateVersionsInput struct { - - // The version numbers of one or more launch template versions to delete. You can - // specify up to 200 launch template version numbers. - // - // This member is required. - Versions []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the launch template. You must specify either the LaunchTemplateId or - // the LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify either the LaunchTemplateName - // or the LaunchTemplateId , but not both. - LaunchTemplateName *string - - noSmithyDocumentSerde -} - -type DeleteLaunchTemplateVersionsOutput struct { - - // Information about the launch template versions that were successfully deleted. - SuccessfullyDeletedLaunchTemplateVersions []types.DeleteLaunchTemplateVersionsResponseSuccessItem - - // Information about the launch template versions that could not be deleted. - UnsuccessfullyDeletedLaunchTemplateVersions []types.DeleteLaunchTemplateVersionsResponseErrorItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLaunchTemplateVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLaunchTemplateVersions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLaunchTemplateVersions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLaunchTemplateVersions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteLaunchTemplateVersionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLaunchTemplateVersions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteLaunchTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLaunchTemplateVersions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRoute.go deleted file mode 100644 index 0593dcea8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRoute.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified route from the specified local gateway route table. -func (c *Client) DeleteLocalGatewayRoute(ctx context.Context, params *DeleteLocalGatewayRouteInput, optFns ...func(*Options)) (*DeleteLocalGatewayRouteOutput, error) { - if params == nil { - params = &DeleteLocalGatewayRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLocalGatewayRoute", params, optFns, c.addOperationDeleteLocalGatewayRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLocalGatewayRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLocalGatewayRouteInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // The CIDR range for the route. This must match the CIDR for the route exactly. - DestinationCidrBlock *string - - // Use a prefix list in place of DestinationCidrBlock . You cannot use - // DestinationPrefixListId and DestinationCidrBlock in the same request. - DestinationPrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteLocalGatewayRouteOutput struct { - - // Information about the route. - Route *types.LocalGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLocalGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLocalGatewayRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLocalGatewayRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLocalGatewayRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteLocalGatewayRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLocalGatewayRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteLocalGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLocalGatewayRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTable.go deleted file mode 100644 index d17e253b0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTable.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a local gateway route table. -func (c *Client) DeleteLocalGatewayRouteTable(ctx context.Context, params *DeleteLocalGatewayRouteTableInput, optFns ...func(*Options)) (*DeleteLocalGatewayRouteTableOutput, error) { - if params == nil { - params = &DeleteLocalGatewayRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLocalGatewayRouteTable", params, optFns, c.addOperationDeleteLocalGatewayRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLocalGatewayRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLocalGatewayRouteTableInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteLocalGatewayRouteTableOutput struct { - - // Information about the local gateway route table. - LocalGatewayRouteTable *types.LocalGatewayRouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLocalGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLocalGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLocalGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLocalGatewayRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteLocalGatewayRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLocalGatewayRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go deleted file mode 100644 index 1b1833bb4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a local gateway route table virtual interface group association. -func (c *Client) DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation(ctx context.Context, params *DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput, optFns ...func(*Options)) (*DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput, error) { - if params == nil { - params = &DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation", params, optFns, c.addOperationDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput struct { - - // The ID of the local gateway route table virtual interface group association. - // - // This member is required. - LocalGatewayRouteTableVirtualInterfaceGroupAssociationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput struct { - - // Information about the association. - LocalGatewayRouteTableVirtualInterfaceGroupAssociation *types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go deleted file mode 100644 index 1276998f7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteLocalGatewayRouteTableVpcAssociation.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified association between a VPC and local gateway route table. -func (c *Client) DeleteLocalGatewayRouteTableVpcAssociation(ctx context.Context, params *DeleteLocalGatewayRouteTableVpcAssociationInput, optFns ...func(*Options)) (*DeleteLocalGatewayRouteTableVpcAssociationOutput, error) { - if params == nil { - params = &DeleteLocalGatewayRouteTableVpcAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteLocalGatewayRouteTableVpcAssociation", params, optFns, c.addOperationDeleteLocalGatewayRouteTableVpcAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteLocalGatewayRouteTableVpcAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteLocalGatewayRouteTableVpcAssociationInput struct { - - // The ID of the association. - // - // This member is required. - LocalGatewayRouteTableVpcAssociationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteLocalGatewayRouteTableVpcAssociationOutput struct { - - // Information about the association. - LocalGatewayRouteTableVpcAssociation *types.LocalGatewayRouteTableVpcAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteLocalGatewayRouteTableVpcAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteLocalGatewayRouteTableVpcAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTableVpcAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteLocalGatewayRouteTableVpcAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteLocalGatewayRouteTableVpcAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteManagedPrefixList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteManagedPrefixList.go deleted file mode 100644 index 821f87648..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteManagedPrefixList.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified managed prefix list. You must first remove all references -// to the prefix list in your resources. -func (c *Client) DeleteManagedPrefixList(ctx context.Context, params *DeleteManagedPrefixListInput, optFns ...func(*Options)) (*DeleteManagedPrefixListOutput, error) { - if params == nil { - params = &DeleteManagedPrefixListInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteManagedPrefixList", params, optFns, c.addOperationDeleteManagedPrefixListMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteManagedPrefixListOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteManagedPrefixListInput struct { - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteManagedPrefixListOutput struct { - - // Information about the prefix list. - PrefixList *types.ManagedPrefixList - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteManagedPrefixListMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteManagedPrefixList{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteManagedPrefixList{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteManagedPrefixList"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteManagedPrefixListValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteManagedPrefixList(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteManagedPrefixList(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteManagedPrefixList", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNatGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNatGateway.go deleted file mode 100644 index f024cfceb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNatGateway.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified NAT gateway. Deleting a public NAT gateway disassociates -// its Elastic IP address, but does not release the address from your account. -// Deleting a NAT gateway does not delete any NAT gateway routes in your route -// tables. -func (c *Client) DeleteNatGateway(ctx context.Context, params *DeleteNatGatewayInput, optFns ...func(*Options)) (*DeleteNatGatewayOutput, error) { - if params == nil { - params = &DeleteNatGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNatGateway", params, optFns, c.addOperationDeleteNatGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNatGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNatGatewayInput struct { - - // The ID of the NAT gateway. - // - // This member is required. - NatGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNatGatewayOutput struct { - - // The ID of the NAT gateway. - NatGatewayId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNatGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNatGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNatGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNatGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNatGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNatGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNatGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNatGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAcl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAcl.go deleted file mode 100644 index 16ec101fc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAcl.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified network ACL. You can't delete the ACL if it's associated -// with any subnets. You can't delete the default network ACL. -func (c *Client) DeleteNetworkAcl(ctx context.Context, params *DeleteNetworkAclInput, optFns ...func(*Options)) (*DeleteNetworkAclOutput, error) { - if params == nil { - params = &DeleteNetworkAclInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkAcl", params, optFns, c.addOperationDeleteNetworkAclMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkAclOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNetworkAclInput struct { - - // The ID of the network ACL. - // - // This member is required. - NetworkAclId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkAclOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkAclMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkAcl{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkAcl{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkAcl"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkAclValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkAcl(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkAcl(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkAcl", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAclEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAclEntry.go deleted file mode 100644 index 1257d95f6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkAclEntry.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified ingress or egress entry (rule) from the specified network -// ACL. -func (c *Client) DeleteNetworkAclEntry(ctx context.Context, params *DeleteNetworkAclEntryInput, optFns ...func(*Options)) (*DeleteNetworkAclEntryOutput, error) { - if params == nil { - params = &DeleteNetworkAclEntryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkAclEntry", params, optFns, c.addOperationDeleteNetworkAclEntryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkAclEntryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNetworkAclEntryInput struct { - - // Indicates whether the rule is an egress rule. - // - // This member is required. - Egress *bool - - // The ID of the network ACL. - // - // This member is required. - NetworkAclId *string - - // The rule number of the entry to delete. - // - // This member is required. - RuleNumber *int32 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkAclEntryOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkAclEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkAclEntry{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkAclEntry{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkAclEntry"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkAclEntryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkAclEntry(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkAclEntry(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkAclEntry", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go deleted file mode 100644 index addd6d854..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAccessScope.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Network Access Scope. -func (c *Client) DeleteNetworkInsightsAccessScope(ctx context.Context, params *DeleteNetworkInsightsAccessScopeInput, optFns ...func(*Options)) (*DeleteNetworkInsightsAccessScopeOutput, error) { - if params == nil { - params = &DeleteNetworkInsightsAccessScopeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInsightsAccessScope", params, optFns, c.addOperationDeleteNetworkInsightsAccessScopeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkInsightsAccessScopeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNetworkInsightsAccessScopeInput struct { - - // The ID of the Network Access Scope. - // - // This member is required. - NetworkInsightsAccessScopeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkInsightsAccessScopeOutput struct { - - // The ID of the Network Access Scope. - NetworkInsightsAccessScopeId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkInsightsAccessScopeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInsightsAccessScope{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInsightsAccessScope{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkInsightsAccessScope"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkInsightsAccessScopeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInsightsAccessScope(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkInsightsAccessScope(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkInsightsAccessScope", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go deleted file mode 100644 index aba236856..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAccessScopeAnalysis.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Network Access Scope analysis. -func (c *Client) DeleteNetworkInsightsAccessScopeAnalysis(ctx context.Context, params *DeleteNetworkInsightsAccessScopeAnalysisInput, optFns ...func(*Options)) (*DeleteNetworkInsightsAccessScopeAnalysisOutput, error) { - if params == nil { - params = &DeleteNetworkInsightsAccessScopeAnalysisInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInsightsAccessScopeAnalysis", params, optFns, c.addOperationDeleteNetworkInsightsAccessScopeAnalysisMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkInsightsAccessScopeAnalysisOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNetworkInsightsAccessScopeAnalysisInput struct { - - // The ID of the Network Access Scope analysis. - // - // This member is required. - NetworkInsightsAccessScopeAnalysisId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkInsightsAccessScopeAnalysisOutput struct { - - // The ID of the Network Access Scope analysis. - NetworkInsightsAccessScopeAnalysisId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkInsightsAccessScopeAnalysisMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInsightsAccessScopeAnalysis{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInsightsAccessScopeAnalysis{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkInsightsAccessScopeAnalysis"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkInsightsAccessScopeAnalysisValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInsightsAccessScopeAnalysis(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkInsightsAccessScopeAnalysis(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkInsightsAccessScopeAnalysis", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go deleted file mode 100644 index 278abdcd8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsAnalysis.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified network insights analysis. -func (c *Client) DeleteNetworkInsightsAnalysis(ctx context.Context, params *DeleteNetworkInsightsAnalysisInput, optFns ...func(*Options)) (*DeleteNetworkInsightsAnalysisOutput, error) { - if params == nil { - params = &DeleteNetworkInsightsAnalysisInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInsightsAnalysis", params, optFns, c.addOperationDeleteNetworkInsightsAnalysisMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkInsightsAnalysisOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNetworkInsightsAnalysisInput struct { - - // The ID of the network insights analysis. - // - // This member is required. - NetworkInsightsAnalysisId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkInsightsAnalysisOutput struct { - - // The ID of the network insights analysis. - NetworkInsightsAnalysisId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkInsightsAnalysisMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInsightsAnalysis{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkInsightsAnalysis"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkInsightsAnalysisValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInsightsAnalysis(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkInsightsAnalysis(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkInsightsAnalysis", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsPath.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsPath.go deleted file mode 100644 index f0bf81034..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInsightsPath.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified path. -func (c *Client) DeleteNetworkInsightsPath(ctx context.Context, params *DeleteNetworkInsightsPathInput, optFns ...func(*Options)) (*DeleteNetworkInsightsPathOutput, error) { - if params == nil { - params = &DeleteNetworkInsightsPathInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInsightsPath", params, optFns, c.addOperationDeleteNetworkInsightsPathMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkInsightsPathOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteNetworkInsightsPathInput struct { - - // The ID of the path. - // - // This member is required. - NetworkInsightsPathId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkInsightsPathOutput struct { - - // The ID of the path. - NetworkInsightsPathId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkInsightsPathMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInsightsPath{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInsightsPath{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkInsightsPath"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkInsightsPathValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInsightsPath(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkInsightsPath(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkInsightsPath", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterface.go deleted file mode 100644 index e992fd746..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterface.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified network interface. You must detach the network interface -// before you can delete it. -func (c *Client) DeleteNetworkInterface(ctx context.Context, params *DeleteNetworkInterfaceInput, optFns ...func(*Options)) (*DeleteNetworkInterfaceOutput, error) { - if params == nil { - params = &DeleteNetworkInterfaceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInterface", params, optFns, c.addOperationDeleteNetworkInterfaceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkInterfaceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteNetworkInterface. -type DeleteNetworkInterfaceInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteNetworkInterfaceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInterface{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInterface{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkInterface"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkInterfaceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInterface(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkInterface", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterfacePermission.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterfacePermission.go deleted file mode 100644 index 5c8451503..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteNetworkInterfacePermission.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a permission for a network interface. By default, you cannot delete the -// permission if the account for which you're removing the permission has attached -// the network interface to an instance. However, you can force delete the -// permission, regardless of any attachment. -func (c *Client) DeleteNetworkInterfacePermission(ctx context.Context, params *DeleteNetworkInterfacePermissionInput, optFns ...func(*Options)) (*DeleteNetworkInterfacePermissionOutput, error) { - if params == nil { - params = &DeleteNetworkInterfacePermissionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteNetworkInterfacePermission", params, optFns, c.addOperationDeleteNetworkInterfacePermissionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteNetworkInterfacePermissionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteNetworkInterfacePermission. -type DeleteNetworkInterfacePermissionInput struct { - - // The ID of the network interface permission. - // - // This member is required. - NetworkInterfacePermissionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specify true to remove the permission even if the network interface is attached - // to an instance. - Force *bool - - noSmithyDocumentSerde -} - -// Contains the output for DeleteNetworkInterfacePermission. -type DeleteNetworkInterfacePermissionOutput struct { - - // Returns true if the request succeeds, otherwise returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteNetworkInterfacePermissionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteNetworkInterfacePermission{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteNetworkInterfacePermission{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteNetworkInterfacePermission"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteNetworkInterfacePermissionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteNetworkInterfacePermission(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteNetworkInterfacePermission(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteNetworkInterfacePermission", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go deleted file mode 100644 index 145a431d0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePlacementGroup.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified placement group. You must terminate all instances in the -// placement group before you can delete the placement group. For more information, -// see Placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon EC2 User Guide. -func (c *Client) DeletePlacementGroup(ctx context.Context, params *DeletePlacementGroupInput, optFns ...func(*Options)) (*DeletePlacementGroupOutput, error) { - if params == nil { - params = &DeletePlacementGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeletePlacementGroup", params, optFns, c.addOperationDeletePlacementGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeletePlacementGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeletePlacementGroupInput struct { - - // The name of the placement group. - // - // This member is required. - GroupName *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeletePlacementGroupOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeletePlacementGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeletePlacementGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeletePlacementGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePlacementGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeletePlacementGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePlacementGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeletePlacementGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeletePlacementGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePublicIpv4Pool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePublicIpv4Pool.go deleted file mode 100644 index 76e5c6ff2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeletePublicIpv4Pool.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete a public IPv4 pool. A public IPv4 pool is an EC2 IP address pool -// required for the public IPv4 CIDRs that you own and bring to Amazon Web Services -// to manage with IPAM. IPv6 addresses you bring to Amazon Web Services, however, -// use IPAM pools only. -func (c *Client) DeletePublicIpv4Pool(ctx context.Context, params *DeletePublicIpv4PoolInput, optFns ...func(*Options)) (*DeletePublicIpv4PoolOutput, error) { - if params == nil { - params = &DeletePublicIpv4PoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeletePublicIpv4Pool", params, optFns, c.addOperationDeletePublicIpv4PoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeletePublicIpv4PoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeletePublicIpv4PoolInput struct { - - // The ID of the public IPv4 pool you want to delete. - // - // This member is required. - PoolId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeletePublicIpv4PoolOutput struct { - - // Information about the result of deleting the public IPv4 pool. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeletePublicIpv4PoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeletePublicIpv4Pool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeletePublicIpv4Pool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeletePublicIpv4Pool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeletePublicIpv4PoolValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeletePublicIpv4Pool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeletePublicIpv4Pool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeletePublicIpv4Pool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteQueuedReservedInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteQueuedReservedInstances.go deleted file mode 100644 index cfc997d5a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteQueuedReservedInstances.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the queued purchases for the specified Reserved Instances. -func (c *Client) DeleteQueuedReservedInstances(ctx context.Context, params *DeleteQueuedReservedInstancesInput, optFns ...func(*Options)) (*DeleteQueuedReservedInstancesOutput, error) { - if params == nil { - params = &DeleteQueuedReservedInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteQueuedReservedInstances", params, optFns, c.addOperationDeleteQueuedReservedInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteQueuedReservedInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteQueuedReservedInstancesInput struct { - - // The IDs of the Reserved Instances. - // - // This member is required. - ReservedInstancesIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteQueuedReservedInstancesOutput struct { - - // Information about the queued purchases that could not be deleted. - FailedQueuedPurchaseDeletions []types.FailedQueuedPurchaseDeletion - - // Information about the queued purchases that were successfully deleted. - SuccessfulQueuedPurchaseDeletions []types.SuccessfulQueuedPurchaseDeletion - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteQueuedReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteQueuedReservedInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteQueuedReservedInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteQueuedReservedInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteQueuedReservedInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueuedReservedInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteQueuedReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteQueuedReservedInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRoute.go deleted file mode 100644 index 8d46533f8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRoute.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified route from the specified route table. -func (c *Client) DeleteRoute(ctx context.Context, params *DeleteRouteInput, optFns ...func(*Options)) (*DeleteRouteOutput, error) { - if params == nil { - params = &DeleteRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteRoute", params, optFns, c.addOperationDeleteRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteRouteInput struct { - - // The ID of the route table. - // - // This member is required. - RouteTableId *string - - // The IPv4 CIDR range for the route. The value you specify must match the CIDR - // for the route exactly. - DestinationCidrBlock *string - - // The IPv6 CIDR range for the route. The value you specify must match the CIDR - // for the route exactly. - DestinationIpv6CidrBlock *string - - // The ID of the prefix list for the route. - DestinationPrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteRouteOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRouteTable.go deleted file mode 100644 index 7d136c2a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteRouteTable.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified route table. You must disassociate the route table from -// any subnets before you can delete it. You can't delete the main route table. -func (c *Client) DeleteRouteTable(ctx context.Context, params *DeleteRouteTableInput, optFns ...func(*Options)) (*DeleteRouteTableOutput, error) { - if params == nil { - params = &DeleteRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteRouteTable", params, optFns, c.addOperationDeleteRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteRouteTableInput struct { - - // The ID of the route table. - // - // This member is required. - RouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteRouteTableOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSecurityGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSecurityGroup.go deleted file mode 100644 index 68c894ce6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSecurityGroup.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a security group. If you attempt to delete a security group that is -// associated with an instance or network interface or is referenced by another -// security group, the operation fails with DependencyViolation . -func (c *Client) DeleteSecurityGroup(ctx context.Context, params *DeleteSecurityGroupInput, optFns ...func(*Options)) (*DeleteSecurityGroupOutput, error) { - if params == nil { - params = &DeleteSecurityGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSecurityGroup", params, optFns, c.addOperationDeleteSecurityGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSecurityGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSecurityGroupInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the security group. - GroupId *string - - // [Default VPC] The name of the security group. You can specify either the - // security group name or the security group ID. For security groups in a - // nondefault VPC, you must specify the security group ID. - GroupName *string - - noSmithyDocumentSerde -} - -type DeleteSecurityGroupOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSecurityGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSecurityGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSecurityGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSecurityGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSecurityGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSecurityGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSecurityGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSnapshot.go deleted file mode 100644 index d708781d4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSnapshot.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified snapshot. When you make periodic snapshots of a volume, -// the snapshots are incremental, and only the blocks on the device that have -// changed since your last snapshot are saved in the new snapshot. When you delete -// a snapshot, only the data not needed for any other snapshot is removed. So -// regardless of which prior snapshots have been deleted, all active snapshots will -// have access to all the information needed to restore the volume. You cannot -// delete a snapshot of the root device of an EBS volume used by a registered AMI. -// You must first de-register the AMI before you can delete the snapshot. For more -// information, see Delete an Amazon EBS snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DeleteSnapshot(ctx context.Context, params *DeleteSnapshotInput, optFns ...func(*Options)) (*DeleteSnapshotOutput, error) { - if params == nil { - params = &DeleteSnapshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSnapshot", params, optFns, c.addOperationDeleteSnapshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSnapshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSnapshotInput struct { - - // The ID of the EBS snapshot. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteSnapshotOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSnapshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSnapshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSnapshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteSnapshotValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSnapshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSnapshot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSpotDatafeedSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSpotDatafeedSubscription.go deleted file mode 100644 index 51b2189c0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSpotDatafeedSubscription.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the data feed for Spot Instances. -func (c *Client) DeleteSpotDatafeedSubscription(ctx context.Context, params *DeleteSpotDatafeedSubscriptionInput, optFns ...func(*Options)) (*DeleteSpotDatafeedSubscriptionOutput, error) { - if params == nil { - params = &DeleteSpotDatafeedSubscriptionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSpotDatafeedSubscription", params, optFns, c.addOperationDeleteSpotDatafeedSubscriptionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSpotDatafeedSubscriptionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteSpotDatafeedSubscription. -type DeleteSpotDatafeedSubscriptionInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteSpotDatafeedSubscriptionOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSpotDatafeedSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSpotDatafeedSubscription{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSpotDatafeedSubscription{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSpotDatafeedSubscription"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSpotDatafeedSubscription(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSpotDatafeedSubscription(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSpotDatafeedSubscription", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnet.go deleted file mode 100644 index e731b57a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnet.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified subnet. You must terminate all running instances in the -// subnet before you can delete the subnet. -func (c *Client) DeleteSubnet(ctx context.Context, params *DeleteSubnetInput, optFns ...func(*Options)) (*DeleteSubnetOutput, error) { - if params == nil { - params = &DeleteSubnetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSubnet", params, optFns, c.addOperationDeleteSubnetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSubnetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSubnetInput struct { - - // The ID of the subnet. - // - // This member is required. - SubnetId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteSubnetOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSubnetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSubnet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSubnet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSubnet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteSubnetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSubnet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSubnet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSubnet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnetCidrReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnetCidrReservation.go deleted file mode 100644 index 51b4ed687..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteSubnetCidrReservation.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a subnet CIDR reservation. -func (c *Client) DeleteSubnetCidrReservation(ctx context.Context, params *DeleteSubnetCidrReservationInput, optFns ...func(*Options)) (*DeleteSubnetCidrReservationOutput, error) { - if params == nil { - params = &DeleteSubnetCidrReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSubnetCidrReservation", params, optFns, c.addOperationDeleteSubnetCidrReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSubnetCidrReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSubnetCidrReservationInput struct { - - // The ID of the subnet CIDR reservation. - // - // This member is required. - SubnetCidrReservationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteSubnetCidrReservationOutput struct { - - // Information about the deleted subnet CIDR reservation. - DeletedSubnetCidrReservation *types.SubnetCidrReservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSubnetCidrReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteSubnetCidrReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteSubnetCidrReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSubnetCidrReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteSubnetCidrReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSubnetCidrReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSubnetCidrReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSubnetCidrReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTags.go deleted file mode 100644 index d795d5ae5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTags.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified set of tags from the specified set of resources. To list -// the current tags, use DescribeTags . For more information about tags, see Tag -// your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error) { - if params == nil { - params = &DeleteTagsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTags", params, optFns, c.addOperationDeleteTagsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTagsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTagsInput struct { - - // The IDs of the resources, separated by spaces. Constraints: Up to 1000 resource - // IDs. We recommend breaking up this request into smaller batches. - // - // This member is required. - Resources []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to delete. Specify a tag key and an optional tag value to delete - // specific tags. If you specify a tag key without a tag value, we delete any tag - // with this key regardless of its value. If you specify a tag key with an empty - // string as the tag value, we delete the tag only if its value is an empty string. - // If you omit this parameter, we delete all user-defined tags for the specified - // resources. We do not delete Amazon Web Services-generated tags (tags that have - // the aws: prefix). Constraints: Up to 1000 tags. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type DeleteTagsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTags{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTags{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTags"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTags(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTags(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTags", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilter.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilter.go deleted file mode 100644 index 83ab16a6d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilter.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Traffic Mirror filter. You cannot delete a Traffic Mirror -// filter that is in use by a Traffic Mirror session. -func (c *Client) DeleteTrafficMirrorFilter(ctx context.Context, params *DeleteTrafficMirrorFilterInput, optFns ...func(*Options)) (*DeleteTrafficMirrorFilterOutput, error) { - if params == nil { - params = &DeleteTrafficMirrorFilterInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorFilter", params, optFns, c.addOperationDeleteTrafficMirrorFilterMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTrafficMirrorFilterOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTrafficMirrorFilterInput struct { - - // The ID of the Traffic Mirror filter. - // - // This member is required. - TrafficMirrorFilterId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTrafficMirrorFilterOutput struct { - - // The ID of the Traffic Mirror filter. - TrafficMirrorFilterId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTrafficMirrorFilterMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorFilter{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorFilter{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTrafficMirrorFilter"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTrafficMirrorFilterValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorFilter(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTrafficMirrorFilter(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTrafficMirrorFilter", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go deleted file mode 100644 index 5332e4532..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorFilterRule.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Traffic Mirror rule. -func (c *Client) DeleteTrafficMirrorFilterRule(ctx context.Context, params *DeleteTrafficMirrorFilterRuleInput, optFns ...func(*Options)) (*DeleteTrafficMirrorFilterRuleOutput, error) { - if params == nil { - params = &DeleteTrafficMirrorFilterRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorFilterRule", params, optFns, c.addOperationDeleteTrafficMirrorFilterRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTrafficMirrorFilterRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTrafficMirrorFilterRuleInput struct { - - // The ID of the Traffic Mirror rule. - // - // This member is required. - TrafficMirrorFilterRuleId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTrafficMirrorFilterRuleOutput struct { - - // The ID of the deleted Traffic Mirror rule. - TrafficMirrorFilterRuleId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTrafficMirrorFilterRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorFilterRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTrafficMirrorFilterRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorFilterRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTrafficMirrorFilterRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTrafficMirrorFilterRule", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorSession.go deleted file mode 100644 index 444af1c5e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorSession.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Traffic Mirror session. -func (c *Client) DeleteTrafficMirrorSession(ctx context.Context, params *DeleteTrafficMirrorSessionInput, optFns ...func(*Options)) (*DeleteTrafficMirrorSessionOutput, error) { - if params == nil { - params = &DeleteTrafficMirrorSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorSession", params, optFns, c.addOperationDeleteTrafficMirrorSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTrafficMirrorSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTrafficMirrorSessionInput struct { - - // The ID of the Traffic Mirror session. - // - // This member is required. - TrafficMirrorSessionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTrafficMirrorSessionOutput struct { - - // The ID of the deleted Traffic Mirror session. - TrafficMirrorSessionId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTrafficMirrorSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTrafficMirrorSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTrafficMirrorSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTrafficMirrorSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTrafficMirrorSession", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorTarget.go deleted file mode 100644 index dce118e2f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTrafficMirrorTarget.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Traffic Mirror target. You cannot delete a Traffic Mirror -// target that is in use by a Traffic Mirror session. -func (c *Client) DeleteTrafficMirrorTarget(ctx context.Context, params *DeleteTrafficMirrorTargetInput, optFns ...func(*Options)) (*DeleteTrafficMirrorTargetOutput, error) { - if params == nil { - params = &DeleteTrafficMirrorTargetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficMirrorTarget", params, optFns, c.addOperationDeleteTrafficMirrorTargetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTrafficMirrorTargetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTrafficMirrorTargetInput struct { - - // The ID of the Traffic Mirror target. - // - // This member is required. - TrafficMirrorTargetId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTrafficMirrorTargetOutput struct { - - // The ID of the deleted Traffic Mirror target. - TrafficMirrorTargetId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTrafficMirrorTargetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTrafficMirrorTarget{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTrafficMirrorTarget{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTrafficMirrorTarget"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTrafficMirrorTargetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficMirrorTarget(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTrafficMirrorTarget(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTrafficMirrorTarget", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGateway.go deleted file mode 100644 index 74e83b2fd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGateway.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified transit gateway. -func (c *Client) DeleteTransitGateway(ctx context.Context, params *DeleteTransitGatewayInput, optFns ...func(*Options)) (*DeleteTransitGatewayOutput, error) { - if params == nil { - params = &DeleteTransitGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGateway", params, optFns, c.addOperationDeleteTransitGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayInput struct { - - // The ID of the transit gateway. - // - // This member is required. - TransitGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayOutput struct { - - // Information about the deleted transit gateway. - TransitGateway *types.TransitGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnect.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnect.go deleted file mode 100644 index 57f907297..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnect.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Connect attachment. You must first delete any Connect -// peers for the attachment. -func (c *Client) DeleteTransitGatewayConnect(ctx context.Context, params *DeleteTransitGatewayConnectInput, optFns ...func(*Options)) (*DeleteTransitGatewayConnectOutput, error) { - if params == nil { - params = &DeleteTransitGatewayConnectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayConnect", params, optFns, c.addOperationDeleteTransitGatewayConnectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayConnectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayConnectInput struct { - - // The ID of the Connect attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayConnectOutput struct { - - // Information about the deleted Connect attachment. - TransitGatewayConnect *types.TransitGatewayConnect - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayConnectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayConnect{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayConnect{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayConnect"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayConnectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayConnect(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayConnect(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayConnect", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go deleted file mode 100644 index 257f8ba4f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayConnectPeer.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Connect peer. -func (c *Client) DeleteTransitGatewayConnectPeer(ctx context.Context, params *DeleteTransitGatewayConnectPeerInput, optFns ...func(*Options)) (*DeleteTransitGatewayConnectPeerOutput, error) { - if params == nil { - params = &DeleteTransitGatewayConnectPeerInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayConnectPeer", params, optFns, c.addOperationDeleteTransitGatewayConnectPeerMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayConnectPeerOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayConnectPeerInput struct { - - // The ID of the Connect peer. - // - // This member is required. - TransitGatewayConnectPeerId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayConnectPeerOutput struct { - - // Information about the deleted Connect peer. - TransitGatewayConnectPeer *types.TransitGatewayConnectPeer - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayConnectPeerMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayConnectPeer{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayConnectPeer"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayConnectPeerValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayConnectPeer(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayConnectPeer(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayConnectPeer", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go deleted file mode 100644 index 3d9de9605..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayMulticastDomain.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified transit gateway multicast domain. -func (c *Client) DeleteTransitGatewayMulticastDomain(ctx context.Context, params *DeleteTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*DeleteTransitGatewayMulticastDomainOutput, error) { - if params == nil { - params = &DeleteTransitGatewayMulticastDomainInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayMulticastDomain", params, optFns, c.addOperationDeleteTransitGatewayMulticastDomainMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayMulticastDomainOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayMulticastDomainInput struct { - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayMulticastDomainOutput struct { - - // Information about the deleted transit gateway multicast domain. - TransitGatewayMulticastDomain *types.TransitGatewayMulticastDomain - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayMulticastDomain"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayMulticastDomain(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayMulticastDomain", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go deleted file mode 100644 index 592c9dade..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPeeringAttachment.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a transit gateway peering attachment. -func (c *Client) DeleteTransitGatewayPeeringAttachment(ctx context.Context, params *DeleteTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*DeleteTransitGatewayPeeringAttachmentOutput, error) { - if params == nil { - params = &DeleteTransitGatewayPeeringAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayPeeringAttachment", params, optFns, c.addOperationDeleteTransitGatewayPeeringAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayPeeringAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayPeeringAttachmentInput struct { - - // The ID of the transit gateway peering attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayPeeringAttachmentOutput struct { - - // The transit gateway peering attachment. - TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayPeeringAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayPeeringAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayPeeringAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go deleted file mode 100644 index 25e0b522d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPolicyTable.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified transit gateway policy table. -func (c *Client) DeleteTransitGatewayPolicyTable(ctx context.Context, params *DeleteTransitGatewayPolicyTableInput, optFns ...func(*Options)) (*DeleteTransitGatewayPolicyTableOutput, error) { - if params == nil { - params = &DeleteTransitGatewayPolicyTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayPolicyTable", params, optFns, c.addOperationDeleteTransitGatewayPolicyTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayPolicyTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayPolicyTableInput struct { - - // The transit gateway policy table to delete. - // - // This member is required. - TransitGatewayPolicyTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayPolicyTableOutput struct { - - // Provides details about the deleted transit gateway policy table. - TransitGatewayPolicyTable *types.TransitGatewayPolicyTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayPolicyTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayPolicyTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayPolicyTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayPolicyTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayPolicyTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go deleted file mode 100644 index a8e799e1a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayPrefixListReference.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a reference (route) to a prefix list in a specified transit gateway -// route table. -func (c *Client) DeleteTransitGatewayPrefixListReference(ctx context.Context, params *DeleteTransitGatewayPrefixListReferenceInput, optFns ...func(*Options)) (*DeleteTransitGatewayPrefixListReferenceOutput, error) { - if params == nil { - params = &DeleteTransitGatewayPrefixListReferenceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayPrefixListReference", params, optFns, c.addOperationDeleteTransitGatewayPrefixListReferenceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayPrefixListReferenceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayPrefixListReferenceInput struct { - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // The ID of the route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayPrefixListReferenceOutput struct { - - // Information about the deleted prefix list reference. - TransitGatewayPrefixListReference *types.TransitGatewayPrefixListReference - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayPrefixListReferenceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayPrefixListReference"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayPrefixListReference(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayPrefixListReference(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayPrefixListReference", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRoute.go deleted file mode 100644 index 154b02902..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRoute.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified route from the specified transit gateway route table. -func (c *Client) DeleteTransitGatewayRoute(ctx context.Context, params *DeleteTransitGatewayRouteInput, optFns ...func(*Options)) (*DeleteTransitGatewayRouteOutput, error) { - if params == nil { - params = &DeleteTransitGatewayRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayRoute", params, optFns, c.addOperationDeleteTransitGatewayRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayRouteInput struct { - - // The CIDR range for the route. This must match the CIDR for the route exactly. - // - // This member is required. - DestinationCidrBlock *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayRouteOutput struct { - - // Information about the route. - Route *types.TransitGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTable.go deleted file mode 100644 index caf4f74b3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTable.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified transit gateway route table. You must disassociate the -// route table from any transit gateway route tables before you can delete it. -func (c *Client) DeleteTransitGatewayRouteTable(ctx context.Context, params *DeleteTransitGatewayRouteTableInput, optFns ...func(*Options)) (*DeleteTransitGatewayRouteTableOutput, error) { - if params == nil { - params = &DeleteTransitGatewayRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayRouteTable", params, optFns, c.addOperationDeleteTransitGatewayRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayRouteTableInput struct { - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayRouteTableOutput struct { - - // Information about the deleted transit gateway route table. - TransitGatewayRouteTable *types.TransitGatewayRouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go deleted file mode 100644 index 246cc6aaa..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayRouteTableAnnouncement.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Advertises to the transit gateway that a transit gateway route table is deleted. -func (c *Client) DeleteTransitGatewayRouteTableAnnouncement(ctx context.Context, params *DeleteTransitGatewayRouteTableAnnouncementInput, optFns ...func(*Options)) (*DeleteTransitGatewayRouteTableAnnouncementOutput, error) { - if params == nil { - params = &DeleteTransitGatewayRouteTableAnnouncementInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayRouteTableAnnouncement", params, optFns, c.addOperationDeleteTransitGatewayRouteTableAnnouncementMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayRouteTableAnnouncementOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayRouteTableAnnouncementInput struct { - - // The transit gateway route table ID that's being deleted. - // - // This member is required. - TransitGatewayRouteTableAnnouncementId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayRouteTableAnnouncementOutput struct { - - // Provides details about a deleted transit gateway route table. - TransitGatewayRouteTableAnnouncement *types.TransitGatewayRouteTableAnnouncement - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayRouteTableAnnouncementMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayRouteTableAnnouncement{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayRouteTableAnnouncement{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayRouteTableAnnouncement"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayRouteTableAnnouncementValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayRouteTableAnnouncement(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayRouteTableAnnouncement(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayRouteTableAnnouncement", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go deleted file mode 100644 index 5803890f5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteTransitGatewayVpcAttachment.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified VPC attachment. -func (c *Client) DeleteTransitGatewayVpcAttachment(ctx context.Context, params *DeleteTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*DeleteTransitGatewayVpcAttachmentOutput, error) { - if params == nil { - params = &DeleteTransitGatewayVpcAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTransitGatewayVpcAttachment", params, optFns, c.addOperationDeleteTransitGatewayVpcAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTransitGatewayVpcAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteTransitGatewayVpcAttachmentInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteTransitGatewayVpcAttachmentOutput struct { - - // Information about the deleted VPC attachment. - TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTransitGatewayVpcAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTransitGatewayVpcAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTransitGatewayVpcAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go deleted file mode 100644 index d6eb507e8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessEndpoint.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete an Amazon Web Services Verified Access endpoint. -func (c *Client) DeleteVerifiedAccessEndpoint(ctx context.Context, params *DeleteVerifiedAccessEndpointInput, optFns ...func(*Options)) (*DeleteVerifiedAccessEndpointOutput, error) { - if params == nil { - params = &DeleteVerifiedAccessEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVerifiedAccessEndpoint", params, optFns, c.addOperationDeleteVerifiedAccessEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVerifiedAccessEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVerifiedAccessEndpointInput struct { - - // The ID of the Verified Access endpoint. - // - // This member is required. - VerifiedAccessEndpointId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVerifiedAccessEndpointOutput struct { - - // Details about the Verified Access endpoint. - VerifiedAccessEndpoint *types.VerifiedAccessEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVerifiedAccessEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVerifiedAccessEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVerifiedAccessEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVerifiedAccessEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteVerifiedAccessEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteVerifiedAccessEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVerifiedAccessEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteVerifiedAccessEndpoint struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteVerifiedAccessEndpoint) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteVerifiedAccessEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteVerifiedAccessEndpointInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteVerifiedAccessEndpointMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteVerifiedAccessEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteVerifiedAccessEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVerifiedAccessEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessGroup.go deleted file mode 100644 index c3b00f166..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessGroup.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete an Amazon Web Services Verified Access group. -func (c *Client) DeleteVerifiedAccessGroup(ctx context.Context, params *DeleteVerifiedAccessGroupInput, optFns ...func(*Options)) (*DeleteVerifiedAccessGroupOutput, error) { - if params == nil { - params = &DeleteVerifiedAccessGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVerifiedAccessGroup", params, optFns, c.addOperationDeleteVerifiedAccessGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVerifiedAccessGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVerifiedAccessGroupInput struct { - - // The ID of the Verified Access group. - // - // This member is required. - VerifiedAccessGroupId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVerifiedAccessGroupOutput struct { - - // Details about the Verified Access group. - VerifiedAccessGroup *types.VerifiedAccessGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVerifiedAccessGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVerifiedAccessGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVerifiedAccessGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVerifiedAccessGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteVerifiedAccessGroupMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteVerifiedAccessGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVerifiedAccessGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteVerifiedAccessGroup struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteVerifiedAccessGroup) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteVerifiedAccessGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessGroupInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteVerifiedAccessGroupInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteVerifiedAccessGroupMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteVerifiedAccessGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteVerifiedAccessGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVerifiedAccessGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessInstance.go deleted file mode 100644 index 7c47f264b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessInstance.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete an Amazon Web Services Verified Access instance. -func (c *Client) DeleteVerifiedAccessInstance(ctx context.Context, params *DeleteVerifiedAccessInstanceInput, optFns ...func(*Options)) (*DeleteVerifiedAccessInstanceOutput, error) { - if params == nil { - params = &DeleteVerifiedAccessInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVerifiedAccessInstance", params, optFns, c.addOperationDeleteVerifiedAccessInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVerifiedAccessInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVerifiedAccessInstanceInput struct { - - // The ID of the Verified Access instance. - // - // This member is required. - VerifiedAccessInstanceId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVerifiedAccessInstanceOutput struct { - - // Details about the Verified Access instance. - VerifiedAccessInstance *types.VerifiedAccessInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVerifiedAccessInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVerifiedAccessInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVerifiedAccessInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVerifiedAccessInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteVerifiedAccessInstanceMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteVerifiedAccessInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVerifiedAccessInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteVerifiedAccessInstance struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteVerifiedAccessInstance) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteVerifiedAccessInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteVerifiedAccessInstanceInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteVerifiedAccessInstanceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteVerifiedAccessInstance{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteVerifiedAccessInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVerifiedAccessInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go deleted file mode 100644 index 108f6cb0e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVerifiedAccessTrustProvider.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Delete an Amazon Web Services Verified Access trust provider. -func (c *Client) DeleteVerifiedAccessTrustProvider(ctx context.Context, params *DeleteVerifiedAccessTrustProviderInput, optFns ...func(*Options)) (*DeleteVerifiedAccessTrustProviderOutput, error) { - if params == nil { - params = &DeleteVerifiedAccessTrustProviderInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVerifiedAccessTrustProvider", params, optFns, c.addOperationDeleteVerifiedAccessTrustProviderMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVerifiedAccessTrustProviderOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVerifiedAccessTrustProviderInput struct { - - // The ID of the Verified Access trust provider. - // - // This member is required. - VerifiedAccessTrustProviderId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVerifiedAccessTrustProviderOutput struct { - - // Details about the Verified Access trust provider. - VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVerifiedAccessTrustProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVerifiedAccessTrustProvider"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opDeleteVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { - return err - } - if err = addOpDeleteVerifiedAccessTrustProviderValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVerifiedAccessTrustProvider(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDeleteVerifiedAccessTrustProvider struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDeleteVerifiedAccessTrustProvider) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDeleteVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteVerifiedAccessTrustProviderInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDeleteVerifiedAccessTrustProviderMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteVerifiedAccessTrustProvider{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDeleteVerifiedAccessTrustProvider(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVerifiedAccessTrustProvider", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVolume.go deleted file mode 100644 index f1d0d74aa..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVolume.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified EBS volume. The volume must be in the available state -// (not attached to an instance). The volume can remain in the deleting state for -// several minutes. For more information, see Delete an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DeleteVolume(ctx context.Context, params *DeleteVolumeInput, optFns ...func(*Options)) (*DeleteVolumeOutput, error) { - if params == nil { - params = &DeleteVolumeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVolume", params, optFns, c.addOperationDeleteVolumeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVolumeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVolumeInput struct { - - // The ID of the volume. - // - // This member is required. - VolumeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVolumeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVolume{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVolume{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVolume"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVolumeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVolume(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVolume(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVolume", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go deleted file mode 100644 index d0deeaceb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpc.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified VPC. You must detach or delete all gateways and resources -// that are associated with the VPC before you can delete it. For example, you must -// terminate all instances running in the VPC, delete all security groups -// associated with the VPC (except the default one), delete all route tables -// associated with the VPC (except the default one), and so on. When you delete the -// VPC, it deletes the VPC's default security group, network ACL, and route table. -func (c *Client) DeleteVpc(ctx context.Context, params *DeleteVpcInput, optFns ...func(*Options)) (*DeleteVpcOutput, error) { - if params == nil { - params = &DeleteVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpc", params, optFns, c.addOperationDeleteVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVpcInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpcOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpcValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go deleted file mode 100644 index 40739f42c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointConnectionNotifications.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified VPC endpoint connection notifications. -func (c *Client) DeleteVpcEndpointConnectionNotifications(ctx context.Context, params *DeleteVpcEndpointConnectionNotificationsInput, optFns ...func(*Options)) (*DeleteVpcEndpointConnectionNotificationsOutput, error) { - if params == nil { - params = &DeleteVpcEndpointConnectionNotificationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpcEndpointConnectionNotifications", params, optFns, c.addOperationDeleteVpcEndpointConnectionNotificationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpcEndpointConnectionNotificationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVpcEndpointConnectionNotificationsInput struct { - - // The IDs of the notifications. - // - // This member is required. - ConnectionNotificationIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpcEndpointConnectionNotificationsOutput struct { - - // Information about the notifications that could not be deleted successfully. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpcEndpointConnectionNotificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpcEndpointConnectionNotifications"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpcEndpointConnectionNotificationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcEndpointConnectionNotifications(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpcEndpointConnectionNotifications(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpcEndpointConnectionNotifications", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go deleted file mode 100644 index d4c559b51..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpointServiceConfigurations.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified VPC endpoint service configurations. Before you can -// delete an endpoint service configuration, you must reject any Available or -// PendingAcceptance interface endpoint connections that are attached to the -// service. -func (c *Client) DeleteVpcEndpointServiceConfigurations(ctx context.Context, params *DeleteVpcEndpointServiceConfigurationsInput, optFns ...func(*Options)) (*DeleteVpcEndpointServiceConfigurationsOutput, error) { - if params == nil { - params = &DeleteVpcEndpointServiceConfigurationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpcEndpointServiceConfigurations", params, optFns, c.addOperationDeleteVpcEndpointServiceConfigurationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpcEndpointServiceConfigurationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVpcEndpointServiceConfigurationsInput struct { - - // The IDs of the services. - // - // This member is required. - ServiceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpcEndpointServiceConfigurationsOutput struct { - - // Information about the service configurations that were not deleted, if - // applicable. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpcEndpointServiceConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpcEndpointServiceConfigurations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpcEndpointServiceConfigurationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcEndpointServiceConfigurations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpcEndpointServiceConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpcEndpointServiceConfigurations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpoints.go deleted file mode 100644 index e7e0aaad4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcEndpoints.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified VPC endpoints. When you delete a gateway endpoint, we -// delete the endpoint routes in the route tables for the endpoint. When you delete -// a Gateway Load Balancer endpoint, we delete its endpoint network interfaces. You -// can only delete Gateway Load Balancer endpoints when the routes that are -// associated with the endpoint are deleted. When you delete an interface endpoint, -// we delete its endpoint network interfaces. -func (c *Client) DeleteVpcEndpoints(ctx context.Context, params *DeleteVpcEndpointsInput, optFns ...func(*Options)) (*DeleteVpcEndpointsOutput, error) { - if params == nil { - params = &DeleteVpcEndpointsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpcEndpoints", params, optFns, c.addOperationDeleteVpcEndpointsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpcEndpointsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVpcEndpointsInput struct { - - // The IDs of the VPC endpoints. - // - // This member is required. - VpcEndpointIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpcEndpointsOutput struct { - - // Information about the VPC endpoints that were not successfully deleted. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpcEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcEndpoints{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcEndpoints{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpcEndpoints"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpcEndpointsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcEndpoints(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpcEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpcEndpoints", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcPeeringConnection.go deleted file mode 100644 index f6ff95fb5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpcPeeringConnection.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a VPC peering connection. Either the owner of the requester VPC or the -// owner of the accepter VPC can delete the VPC peering connection if it's in the -// active state. The owner of the requester VPC can delete a VPC peering connection -// in the pending-acceptance state. You cannot delete a VPC peering connection -// that's in the failed or rejected state. -func (c *Client) DeleteVpcPeeringConnection(ctx context.Context, params *DeleteVpcPeeringConnectionInput, optFns ...func(*Options)) (*DeleteVpcPeeringConnectionOutput, error) { - if params == nil { - params = &DeleteVpcPeeringConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpcPeeringConnection", params, optFns, c.addOperationDeleteVpcPeeringConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpcPeeringConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVpcPeeringConnectionInput struct { - - // The ID of the VPC peering connection. - // - // This member is required. - VpcPeeringConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpcPeeringConnectionOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpcPeeringConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpcPeeringConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpcPeeringConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpcPeeringConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnection.go deleted file mode 100644 index 99be5e80b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnection.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified VPN connection. If you're deleting the VPC and its -// associated components, we recommend that you detach the virtual private gateway -// from the VPC and delete the VPC before deleting the VPN connection. If you -// believe that the tunnel credentials for your VPN connection have been -// compromised, you can delete the VPN connection and create a new one that has new -// keys, without needing to delete the VPC or virtual private gateway. If you -// create a new VPN connection, you must reconfigure the customer gateway device -// using the new configuration information returned with the new VPN connection ID. -// For certificate-based authentication, delete all Certificate Manager (ACM) -// private certificates used for the Amazon Web Services-side tunnel endpoints for -// the VPN connection before deleting the VPN connection. -func (c *Client) DeleteVpnConnection(ctx context.Context, params *DeleteVpnConnectionInput, optFns ...func(*Options)) (*DeleteVpnConnectionOutput, error) { - if params == nil { - params = &DeleteVpnConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpnConnection", params, optFns, c.addOperationDeleteVpnConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpnConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteVpnConnection. -type DeleteVpnConnectionInput struct { - - // The ID of the VPN connection. - // - // This member is required. - VpnConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpnConnectionOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpnConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpnConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpnConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpnConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpnConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpnConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpnConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpnConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnectionRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnectionRoute.go deleted file mode 100644 index 254a7357e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnConnectionRoute.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified static route associated with a VPN connection between an -// existing virtual private gateway and a VPN customer gateway. The static route -// allows traffic to be routed from the virtual private gateway to the VPN customer -// gateway. -func (c *Client) DeleteVpnConnectionRoute(ctx context.Context, params *DeleteVpnConnectionRouteInput, optFns ...func(*Options)) (*DeleteVpnConnectionRouteOutput, error) { - if params == nil { - params = &DeleteVpnConnectionRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpnConnectionRoute", params, optFns, c.addOperationDeleteVpnConnectionRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpnConnectionRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteVpnConnectionRoute. -type DeleteVpnConnectionRouteInput struct { - - // The CIDR block associated with the local subnet of the customer network. - // - // This member is required. - DestinationCidrBlock *string - - // The ID of the VPN connection. - // - // This member is required. - VpnConnectionId *string - - noSmithyDocumentSerde -} - -type DeleteVpnConnectionRouteOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpnConnectionRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpnConnectionRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpnConnectionRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpnConnectionRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpnConnectionRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpnConnectionRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpnConnectionRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpnConnectionRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnGateway.go deleted file mode 100644 index 3ea21acfd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeleteVpnGateway.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified virtual private gateway. You must first detach the -// virtual private gateway from the VPC. Note that you don't need to delete the -// virtual private gateway if you plan to delete and recreate the VPN connection -// between your VPC and your network. -func (c *Client) DeleteVpnGateway(ctx context.Context, params *DeleteVpnGatewayInput, optFns ...func(*Options)) (*DeleteVpnGatewayOutput, error) { - if params == nil { - params = &DeleteVpnGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVpnGateway", params, optFns, c.addOperationDeleteVpnGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVpnGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeleteVpnGateway. -type DeleteVpnGatewayInput struct { - - // The ID of the virtual private gateway. - // - // This member is required. - VpnGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeleteVpnGatewayOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeleteVpnGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeleteVpnGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVpnGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteVpnGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVpnGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVpnGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionByoipCidr.go deleted file mode 100644 index 8ce263c93..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionByoipCidr.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Releases the specified address range that you provisioned for use with your -// Amazon Web Services resources through bring your own IP addresses (BYOIP) and -// deletes the corresponding address pool. Before you can release an address range, -// you must stop advertising it using WithdrawByoipCidr and you must not have any -// IP addresses allocated from its address range. -func (c *Client) DeprovisionByoipCidr(ctx context.Context, params *DeprovisionByoipCidrInput, optFns ...func(*Options)) (*DeprovisionByoipCidrOutput, error) { - if params == nil { - params = &DeprovisionByoipCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeprovisionByoipCidr", params, optFns, c.addOperationDeprovisionByoipCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeprovisionByoipCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeprovisionByoipCidrInput struct { - - // The address range, in CIDR notation. The prefix must be the same prefix that - // you specified when you provisioned the address range. - // - // This member is required. - Cidr *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeprovisionByoipCidrOutput struct { - - // Information about the address range. - ByoipCidr *types.ByoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeprovisionByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeprovisionByoipCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeprovisionByoipCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeprovisionByoipCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeprovisionByoipCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeprovisionByoipCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeprovisionByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeprovisionByoipCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionIpamByoasn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionIpamByoasn.go deleted file mode 100644 index 3a0bd81a1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionIpamByoasn.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deprovisions your Autonomous System Number (ASN) from your Amazon Web Services -// account. This action can only be called after any BYOIP CIDR associations are -// removed from your Amazon Web Services account with DisassociateIpamByoasn (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DisassociateIpamByoasn.html) -// . For more information, see Tutorial: Bring your ASN to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html) -// in the Amazon VPC IPAM guide. -func (c *Client) DeprovisionIpamByoasn(ctx context.Context, params *DeprovisionIpamByoasnInput, optFns ...func(*Options)) (*DeprovisionIpamByoasnOutput, error) { - if params == nil { - params = &DeprovisionIpamByoasnInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeprovisionIpamByoasn", params, optFns, c.addOperationDeprovisionIpamByoasnMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeprovisionIpamByoasnOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeprovisionIpamByoasnInput struct { - - // An ASN. - // - // This member is required. - Asn *string - - // The IPAM ID. - // - // This member is required. - IpamId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeprovisionIpamByoasnOutput struct { - - // An ASN and BYOIP CIDR association. - Byoasn *types.Byoasn - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeprovisionIpamByoasnMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeprovisionIpamByoasn{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeprovisionIpamByoasn{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeprovisionIpamByoasn"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeprovisionIpamByoasnValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeprovisionIpamByoasn(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeprovisionIpamByoasn(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeprovisionIpamByoasn", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionIpamPoolCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionIpamPoolCidr.go deleted file mode 100644 index ea2fb7978..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionIpamPoolCidr.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deprovision a CIDR provisioned from an IPAM pool. If you deprovision a CIDR -// from a pool that has a source pool, the CIDR is recycled back into the source -// pool. For more information, see Deprovision pool CIDRs (https://docs.aws.amazon.com/vpc/latest/ipam/depro-pool-cidr-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) DeprovisionIpamPoolCidr(ctx context.Context, params *DeprovisionIpamPoolCidrInput, optFns ...func(*Options)) (*DeprovisionIpamPoolCidrOutput, error) { - if params == nil { - params = &DeprovisionIpamPoolCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeprovisionIpamPoolCidr", params, optFns, c.addOperationDeprovisionIpamPoolCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeprovisionIpamPoolCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeprovisionIpamPoolCidrInput struct { - - // The ID of the pool that has the CIDR you want to deprovision. - // - // This member is required. - IpamPoolId *string - - // The CIDR which you want to deprovision from the pool. - Cidr *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeprovisionIpamPoolCidrOutput struct { - - // The deprovisioned pool CIDR. - IpamPoolCidr *types.IpamPoolCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeprovisionIpamPoolCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeprovisionIpamPoolCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeprovisionIpamPoolCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeprovisionIpamPoolCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeprovisionIpamPoolCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeprovisionIpamPoolCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeprovisionIpamPoolCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeprovisionIpamPoolCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go deleted file mode 100644 index 99024ace5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeprovisionPublicIpv4PoolCidr.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deprovision a CIDR from a public IPv4 pool. -func (c *Client) DeprovisionPublicIpv4PoolCidr(ctx context.Context, params *DeprovisionPublicIpv4PoolCidrInput, optFns ...func(*Options)) (*DeprovisionPublicIpv4PoolCidrOutput, error) { - if params == nil { - params = &DeprovisionPublicIpv4PoolCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeprovisionPublicIpv4PoolCidr", params, optFns, c.addOperationDeprovisionPublicIpv4PoolCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeprovisionPublicIpv4PoolCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeprovisionPublicIpv4PoolCidrInput struct { - - // The CIDR you want to deprovision from the pool. Enter the CIDR you want to - // deprovision with a netmask of /32 . You must rerun this command for each IP - // address in the CIDR range. If your CIDR is a /24 , you will have to run this - // command to deprovision each of the 256 IP addresses in the /24 CIDR. - // - // This member is required. - Cidr *string - - // The ID of the pool that you want to deprovision the CIDR from. - // - // This member is required. - PoolId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeprovisionPublicIpv4PoolCidrOutput struct { - - // The deprovisioned CIDRs. - DeprovisionedAddresses []string - - // The ID of the pool that you deprovisioned the CIDR from. - PoolId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeprovisionPublicIpv4PoolCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeprovisionPublicIpv4PoolCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeprovisionPublicIpv4PoolCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeprovisionPublicIpv4PoolCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeprovisionPublicIpv4PoolCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeprovisionPublicIpv4PoolCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeprovisionPublicIpv4PoolCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeprovisionPublicIpv4PoolCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go deleted file mode 100644 index fceb77ca7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterImage.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deregisters the specified AMI. After you deregister an AMI, it can't be used to -// launch new instances. If you deregister an AMI that matches a Recycle Bin -// retention rule, the AMI is retained in the Recycle Bin for the specified -// retention period. For more information, see Recycle Bin (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html) -// in the Amazon EC2 User Guide. When you deregister an AMI, it doesn't affect any -// instances that you've already launched from the AMI. You'll continue to incur -// usage costs for those instances until you terminate them. When you deregister an -// Amazon EBS-backed AMI, it doesn't affect the snapshot that was created for the -// root volume of the instance during the AMI creation process. When you deregister -// an instance store-backed AMI, it doesn't affect the files that you uploaded to -// Amazon S3 when you created the AMI. -func (c *Client) DeregisterImage(ctx context.Context, params *DeregisterImageInput, optFns ...func(*Options)) (*DeregisterImageOutput, error) { - if params == nil { - params = &DeregisterImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeregisterImage", params, optFns, c.addOperationDeregisterImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeregisterImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DeregisterImage. -type DeregisterImageInput struct { - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeregisterImageOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeregisterImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeregisterImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeregisterImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeregisterImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go deleted file mode 100644 index 8d392ffd5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterInstanceEventNotificationAttributes.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deregisters tag keys to prevent tags that have the specified tag keys from -// being included in scheduled event notifications for resources in the Region. -func (c *Client) DeregisterInstanceEventNotificationAttributes(ctx context.Context, params *DeregisterInstanceEventNotificationAttributesInput, optFns ...func(*Options)) (*DeregisterInstanceEventNotificationAttributesOutput, error) { - if params == nil { - params = &DeregisterInstanceEventNotificationAttributesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeregisterInstanceEventNotificationAttributes", params, optFns, c.addOperationDeregisterInstanceEventNotificationAttributesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeregisterInstanceEventNotificationAttributesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeregisterInstanceEventNotificationAttributesInput struct { - - // Information about the tag keys to deregister. - // - // This member is required. - InstanceTagAttribute *types.DeregisterInstanceTagAttributeRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DeregisterInstanceEventNotificationAttributesOutput struct { - - // The resulting set of tag keys. - InstanceTagAttribute *types.InstanceTagNotificationAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeregisterInstanceEventNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterInstanceEventNotificationAttributes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDeregisterInstanceEventNotificationAttributesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterInstanceEventNotificationAttributes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeregisterInstanceEventNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeregisterInstanceEventNotificationAttributes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go deleted file mode 100644 index 0da18b7f4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupMembers.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deregisters the specified members (network interfaces) from the transit gateway -// multicast group. -func (c *Client) DeregisterTransitGatewayMulticastGroupMembers(ctx context.Context, params *DeregisterTransitGatewayMulticastGroupMembersInput, optFns ...func(*Options)) (*DeregisterTransitGatewayMulticastGroupMembersOutput, error) { - if params == nil { - params = &DeregisterTransitGatewayMulticastGroupMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeregisterTransitGatewayMulticastGroupMembers", params, optFns, c.addOperationDeregisterTransitGatewayMulticastGroupMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeregisterTransitGatewayMulticastGroupMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeregisterTransitGatewayMulticastGroupMembersInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // The IDs of the group members' network interfaces. - NetworkInterfaceIds []string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -type DeregisterTransitGatewayMulticastGroupMembersOutput struct { - - // Information about the deregistered members. - DeregisteredMulticastGroupMembers *types.TransitGatewayMulticastDeregisteredGroupMembers - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeregisterTransitGatewayMulticastGroupMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterTransitGatewayMulticastGroupMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTransitGatewayMulticastGroupMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeregisterTransitGatewayMulticastGroupMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeregisterTransitGatewayMulticastGroupMembers", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go deleted file mode 100644 index c0b2da495..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DeregisterTransitGatewayMulticastGroupSources.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deregisters the specified sources (network interfaces) from the transit gateway -// multicast group. -func (c *Client) DeregisterTransitGatewayMulticastGroupSources(ctx context.Context, params *DeregisterTransitGatewayMulticastGroupSourcesInput, optFns ...func(*Options)) (*DeregisterTransitGatewayMulticastGroupSourcesOutput, error) { - if params == nil { - params = &DeregisterTransitGatewayMulticastGroupSourcesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeregisterTransitGatewayMulticastGroupSources", params, optFns, c.addOperationDeregisterTransitGatewayMulticastGroupSourcesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeregisterTransitGatewayMulticastGroupSourcesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeregisterTransitGatewayMulticastGroupSourcesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // The IDs of the group sources' network interfaces. - NetworkInterfaceIds []string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -type DeregisterTransitGatewayMulticastGroupSourcesOutput struct { - - // Information about the deregistered group sources. - DeregisteredMulticastGroupSources *types.TransitGatewayMulticastDeregisteredGroupSources - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeregisterTransitGatewayMulticastGroupSourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeregisterTransitGatewayMulticastGroupSources"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterTransitGatewayMulticastGroupSources(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeregisterTransitGatewayMulticastGroupSources(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeregisterTransitGatewayMulticastGroupSources", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAccountAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAccountAttributes.go deleted file mode 100644 index a823db84d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAccountAttributes.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes attributes of your Amazon Web Services account. The following are the -// supported account attributes: -// - default-vpc : The ID of the default VPC for your account, or none . -// - max-instances : This attribute is no longer supported. The returned value -// does not reflect your actual vCPU limit for running On-Demand Instances. For -// more information, see On-Demand Instance Limits (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-on-demand-instances.html#ec2-on-demand-instances-limits) -// in the Amazon Elastic Compute Cloud User Guide. -// - max-elastic-ips : The maximum number of Elastic IP addresses that you can -// allocate. -// - supported-platforms : This attribute is deprecated. -// - vpc-max-elastic-ips : The maximum number of Elastic IP addresses that you -// can allocate. -// - vpc-max-security-groups-per-interface : The maximum number of security -// groups that you can assign to a network interface. -func (c *Client) DescribeAccountAttributes(ctx context.Context, params *DescribeAccountAttributesInput, optFns ...func(*Options)) (*DescribeAccountAttributesOutput, error) { - if params == nil { - params = &DescribeAccountAttributesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAccountAttributes", params, optFns, c.addOperationDescribeAccountAttributesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAccountAttributesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAccountAttributesInput struct { - - // The account attribute names. - AttributeNames []types.AccountAttributeName - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeAccountAttributesOutput struct { - - // Information about the account attributes. - AccountAttributes []types.AccountAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAccountAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAccountAttributes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAccountAttributes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccountAttributes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountAttributes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeAccountAttributes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAccountAttributes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressTransfers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressTransfers.go deleted file mode 100644 index 0e3c60a38..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressTransfers.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes an Elastic IP address transfer. For more information, see Transfer -// Elastic IP addresses (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) -// in the Amazon Virtual Private Cloud User Guide. When you transfer an Elastic IP -// address, there is a two-step handshake between the source and transfer Amazon -// Web Services accounts. When the source account starts the transfer, the transfer -// account has seven days to accept the Elastic IP address transfer. During those -// seven days, the source account can view the pending transfer by using this -// action. After seven days, the transfer expires and ownership of the Elastic IP -// address returns to the source account. Accepted transfers are visible to the -// source account for three days after the transfers have been accepted. -func (c *Client) DescribeAddressTransfers(ctx context.Context, params *DescribeAddressTransfersInput, optFns ...func(*Options)) (*DescribeAddressTransfersOutput, error) { - if params == nil { - params = &DescribeAddressTransfersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAddressTransfers", params, optFns, c.addOperationDescribeAddressTransfersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAddressTransfersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAddressTransfersInput struct { - - // The allocation IDs of Elastic IP addresses. - AllocationIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of address transfers to return in one page of results. - MaxResults *int32 - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeAddressTransfersOutput struct { - - // The Elastic IP address transfer. - AddressTransfers []types.AddressTransfer - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAddressTransfersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAddressTransfers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAddressTransfers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAddressTransfers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddressTransfers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeAddressTransfersAPIClient is a client that implements the -// DescribeAddressTransfers operation. -type DescribeAddressTransfersAPIClient interface { - DescribeAddressTransfers(context.Context, *DescribeAddressTransfersInput, ...func(*Options)) (*DescribeAddressTransfersOutput, error) -} - -var _ DescribeAddressTransfersAPIClient = (*Client)(nil) - -// DescribeAddressTransfersPaginatorOptions is the paginator options for -// DescribeAddressTransfers -type DescribeAddressTransfersPaginatorOptions struct { - // The maximum number of address transfers to return in one page of results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeAddressTransfersPaginator is a paginator for DescribeAddressTransfers -type DescribeAddressTransfersPaginator struct { - options DescribeAddressTransfersPaginatorOptions - client DescribeAddressTransfersAPIClient - params *DescribeAddressTransfersInput - nextToken *string - firstPage bool -} - -// NewDescribeAddressTransfersPaginator returns a new -// DescribeAddressTransfersPaginator -func NewDescribeAddressTransfersPaginator(client DescribeAddressTransfersAPIClient, params *DescribeAddressTransfersInput, optFns ...func(*DescribeAddressTransfersPaginatorOptions)) *DescribeAddressTransfersPaginator { - if params == nil { - params = &DescribeAddressTransfersInput{} - } - - options := DescribeAddressTransfersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeAddressTransfersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeAddressTransfersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeAddressTransfers page. -func (p *DescribeAddressTransfersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAddressTransfersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeAddressTransfers(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeAddressTransfers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAddressTransfers", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddresses.go deleted file mode 100644 index bc97a237e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddresses.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Elastic IP addresses or all of your Elastic IP -// addresses. -func (c *Client) DescribeAddresses(ctx context.Context, params *DescribeAddressesInput, optFns ...func(*Options)) (*DescribeAddressesOutput, error) { - if params == nil { - params = &DescribeAddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAddresses", params, optFns, c.addOperationDescribeAddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAddressesInput struct { - - // Information about the allocation IDs. - AllocationIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - allocation-id - The allocation ID for the address. - // - association-id - The association ID for the address. - // - instance-id - The ID of the instance the address is associated with, if any. - // - network-border-group - A unique set of Availability Zones, Local Zones, or - // Wavelength Zones from where Amazon Web Services advertises IP addresses. - // - network-interface-id - The ID of the network interface that the address is - // associated with, if any. - // - network-interface-owner-id - The Amazon Web Services account ID of the - // owner. - // - private-ip-address - The private IP address associated with the Elastic IP - // address. - // - public-ip - The Elastic IP address, or the carrier IP address. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // One or more Elastic IP addresses. Default: Describes all your Elastic IP - // addresses. - PublicIps []string - - noSmithyDocumentSerde -} - -type DescribeAddressesOutput struct { - - // Information about the Elastic IP addresses. - Addresses []types.Address - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAddresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAddresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAddresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeAddresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAddresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressesAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressesAttribute.go deleted file mode 100644 index 408217b07..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAddressesAttribute.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the attributes of the specified Elastic IP addresses. For -// requirements, see Using reverse DNS for email applications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS) -// . -func (c *Client) DescribeAddressesAttribute(ctx context.Context, params *DescribeAddressesAttributeInput, optFns ...func(*Options)) (*DescribeAddressesAttributeOutput, error) { - if params == nil { - params = &DescribeAddressesAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAddressesAttribute", params, optFns, c.addOperationDescribeAddressesAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAddressesAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAddressesAttributeInput struct { - - // [EC2-VPC] The allocation IDs. - AllocationIds []string - - // The attribute of the IP address. - Attribute types.AddressAttributeName - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeAddressesAttributeOutput struct { - - // Information about the IP addresses. - Addresses []types.AddressAttribute - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAddressesAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAddressesAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAddressesAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAddressesAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAddressesAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeAddressesAttributeAPIClient is a client that implements the -// DescribeAddressesAttribute operation. -type DescribeAddressesAttributeAPIClient interface { - DescribeAddressesAttribute(context.Context, *DescribeAddressesAttributeInput, ...func(*Options)) (*DescribeAddressesAttributeOutput, error) -} - -var _ DescribeAddressesAttributeAPIClient = (*Client)(nil) - -// DescribeAddressesAttributePaginatorOptions is the paginator options for -// DescribeAddressesAttribute -type DescribeAddressesAttributePaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeAddressesAttributePaginator is a paginator for -// DescribeAddressesAttribute -type DescribeAddressesAttributePaginator struct { - options DescribeAddressesAttributePaginatorOptions - client DescribeAddressesAttributeAPIClient - params *DescribeAddressesAttributeInput - nextToken *string - firstPage bool -} - -// NewDescribeAddressesAttributePaginator returns a new -// DescribeAddressesAttributePaginator -func NewDescribeAddressesAttributePaginator(client DescribeAddressesAttributeAPIClient, params *DescribeAddressesAttributeInput, optFns ...func(*DescribeAddressesAttributePaginatorOptions)) *DescribeAddressesAttributePaginator { - if params == nil { - params = &DescribeAddressesAttributeInput{} - } - - options := DescribeAddressesAttributePaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeAddressesAttributePaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeAddressesAttributePaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeAddressesAttribute page. -func (p *DescribeAddressesAttributePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAddressesAttributeOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeAddressesAttribute(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeAddressesAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAddressesAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAggregateIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAggregateIdFormat.go deleted file mode 100644 index 69459b2a4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAggregateIdFormat.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the longer ID format settings for all resource types in a specific -// Region. This request is useful for performing a quick audit to determine whether -// a specific Region is fully opted in for longer IDs (17-character IDs). This -// request only returns information about resource types that support longer IDs. -// The following resource types support longer IDs: bundle | conversion-task | -// customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association -// | export-task | flow-log | image | import-task | instance | internet-gateway | -// network-acl | network-acl-association | network-interface | -// network-interface-attachment | prefix-list | reservation | route-table | -// route-table-association | security-group | snapshot | subnet | -// subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | -// vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway . -func (c *Client) DescribeAggregateIdFormat(ctx context.Context, params *DescribeAggregateIdFormatInput, optFns ...func(*Options)) (*DescribeAggregateIdFormatOutput, error) { - if params == nil { - params = &DescribeAggregateIdFormatInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAggregateIdFormat", params, optFns, c.addOperationDescribeAggregateIdFormatMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAggregateIdFormatOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAggregateIdFormatInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeAggregateIdFormatOutput struct { - - // Information about each resource's ID format. - Statuses []types.IdFormat - - // Indicates whether all resource types in the Region are configured to use longer - // IDs. This value is only true if all users are configured to use longer IDs for - // all resources types in the Region. - UseLongIdsAggregated *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAggregateIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAggregateIdFormat{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAggregateIdFormat{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAggregateIdFormat"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAggregateIdFormat(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeAggregateIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAggregateIdFormat", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAvailabilityZones.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAvailabilityZones.go deleted file mode 100644 index 8d3f2f3f2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAvailabilityZones.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the Availability Zones, Local Zones, and Wavelength Zones that are -// available to you. If there is an event impacting a zone, you can use this -// request to view the state and any provided messages for that zone. For more -// information about Availability Zones, Local Zones, and Wavelength Zones, see -// Regions and zones (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeAvailabilityZones(ctx context.Context, params *DescribeAvailabilityZonesInput, optFns ...func(*Options)) (*DescribeAvailabilityZonesOutput, error) { - if params == nil { - params = &DescribeAvailabilityZonesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAvailabilityZones", params, optFns, c.addOperationDescribeAvailabilityZonesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAvailabilityZonesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAvailabilityZonesInput struct { - - // Include all Availability Zones, Local Zones, and Wavelength Zones regardless of - // your opt-in status. If you do not use this parameter, the results include only - // the zones for the Regions where you have chosen the option to opt in. - AllAvailabilityZones *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - group-name - For Availability Zones, use the Region name. For Local Zones, - // use the name of the group associated with the Local Zone (for example, - // us-west-2-lax-1 ) For Wavelength Zones, use the name of the group associated - // with the Wavelength Zone (for example, us-east-1-wl1-bos-wlz-1 ). - // - message - The Zone message. - // - opt-in-status - The opt-in status ( opted-in | not-opted-in | - // opt-in-not-required ). - // - parent-zone-id - The ID of the zone that handles some of the Local Zone and - // Wavelength Zone control plane operations, such as API calls. - // - parent-zone-name - The ID of the zone that handles some of the Local Zone - // and Wavelength Zone control plane operations, such as API calls. - // - region-name - The name of the Region for the Zone (for example, us-east-1 ). - // - state - The state of the Availability Zone, the Local Zone, or the - // Wavelength Zone ( available ). - // - zone-id - The ID of the Availability Zone (for example, use1-az1 ), the - // Local Zone (for example, usw2-lax1-az1 ), or the Wavelength Zone (for example, - // us-east-1-wl1-bos-wlz-1 ). - // - zone-name - The name of the Availability Zone (for example, us-east-1a ), - // the Local Zone (for example, us-west-2-lax-1a ), or the Wavelength Zone (for - // example, us-east-1-wl1-bos-wlz-1 ). - // - zone-type - The type of zone ( availability-zone | local-zone | - // wavelength-zone ). - Filters []types.Filter - - // The IDs of the Availability Zones, Local Zones, and Wavelength Zones. - ZoneIds []string - - // The names of the Availability Zones, Local Zones, and Wavelength Zones. - ZoneNames []string - - noSmithyDocumentSerde -} - -type DescribeAvailabilityZonesOutput struct { - - // Information about the Availability Zones, Local Zones, and Wavelength Zones. - AvailabilityZones []types.AvailabilityZone - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAvailabilityZonesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAvailabilityZones{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAvailabilityZones{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAvailabilityZones"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAvailabilityZones(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeAvailabilityZones(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAvailabilityZones", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go deleted file mode 100644 index 7ade16456..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the current Infrastructure Performance metric subscriptions. -func (c *Client) DescribeAwsNetworkPerformanceMetricSubscriptions(ctx context.Context, params *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, optFns ...func(*Options)) (*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, error) { - if params == nil { - params = &DescribeAwsNetworkPerformanceMetricSubscriptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAwsNetworkPerformanceMetricSubscriptions", params, optFns, c.addOperationDescribeAwsNetworkPerformanceMetricSubscriptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAwsNetworkPerformanceMetricSubscriptionsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeAwsNetworkPerformanceMetricSubscriptionsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Describes the current Infrastructure Performance subscriptions. - Subscriptions []types.Subscription - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAwsNetworkPerformanceMetricSubscriptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeAwsNetworkPerformanceMetricSubscriptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeAwsNetworkPerformanceMetricSubscriptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAwsNetworkPerformanceMetricSubscriptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAwsNetworkPerformanceMetricSubscriptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient is a client that -// implements the DescribeAwsNetworkPerformanceMetricSubscriptions operation. -type DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient interface { - DescribeAwsNetworkPerformanceMetricSubscriptions(context.Context, *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, ...func(*Options)) (*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, error) -} - -var _ DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient = (*Client)(nil) - -// DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions is the -// paginator options for DescribeAwsNetworkPerformanceMetricSubscriptions -type DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator is a paginator for -// DescribeAwsNetworkPerformanceMetricSubscriptions -type DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator struct { - options DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions - client DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient - params *DescribeAwsNetworkPerformanceMetricSubscriptionsInput - nextToken *string - firstPage bool -} - -// NewDescribeAwsNetworkPerformanceMetricSubscriptionsPaginator returns a new -// DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator -func NewDescribeAwsNetworkPerformanceMetricSubscriptionsPaginator(client DescribeAwsNetworkPerformanceMetricSubscriptionsAPIClient, params *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, optFns ...func(*DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions)) *DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator { - if params == nil { - params = &DescribeAwsNetworkPerformanceMetricSubscriptionsInput{} - } - - options := DescribeAwsNetworkPerformanceMetricSubscriptionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeAwsNetworkPerformanceMetricSubscriptions -// page. -func (p *DescribeAwsNetworkPerformanceMetricSubscriptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeAwsNetworkPerformanceMetricSubscriptions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeAwsNetworkPerformanceMetricSubscriptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAwsNetworkPerformanceMetricSubscriptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go deleted file mode 100644 index d8e96ab68..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeBundleTasks.go +++ /dev/null @@ -1,379 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the specified bundle tasks or all of your bundle tasks. Completed -// bundle tasks are listed for only a limited time. If your bundle task is no -// longer in the list, you can still register an AMI from it. Just use -// RegisterImage with the Amazon S3 bucket name and image manifest name you -// provided to the bundle task. -func (c *Client) DescribeBundleTasks(ctx context.Context, params *DescribeBundleTasksInput, optFns ...func(*Options)) (*DescribeBundleTasksOutput, error) { - if params == nil { - params = &DescribeBundleTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeBundleTasks", params, optFns, c.addOperationDescribeBundleTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeBundleTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeBundleTasksInput struct { - - // The bundle task IDs. Default: Describes all your bundle tasks. - BundleIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - bundle-id - The ID of the bundle task. - // - error-code - If the task failed, the error code returned. - // - error-message - If the task failed, the error message returned. - // - instance-id - The ID of the instance. - // - progress - The level of task completion, as a percentage (for example, 20%). - // - s3-bucket - The Amazon S3 bucket to store the AMI. - // - s3-prefix - The beginning of the AMI name. - // - start-time - The time the task started (for example, - // 2013-09-15T17:15:20.000Z). - // - state - The state of the task ( pending | waiting-for-shutdown | bundling | - // storing | cancelling | complete | failed ). - // - update-time - The time of the most recent update for the task. - Filters []types.Filter - - noSmithyDocumentSerde -} - -type DescribeBundleTasksOutput struct { - - // Information about the bundle tasks. - BundleTasks []types.BundleTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeBundleTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeBundleTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeBundleTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeBundleTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBundleTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeBundleTasksAPIClient is a client that implements the -// DescribeBundleTasks operation. -type DescribeBundleTasksAPIClient interface { - DescribeBundleTasks(context.Context, *DescribeBundleTasksInput, ...func(*Options)) (*DescribeBundleTasksOutput, error) -} - -var _ DescribeBundleTasksAPIClient = (*Client)(nil) - -// BundleTaskCompleteWaiterOptions are waiter options for BundleTaskCompleteWaiter -type BundleTaskCompleteWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // BundleTaskCompleteWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, BundleTaskCompleteWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeBundleTasksInput, *DescribeBundleTasksOutput, error) (bool, error) -} - -// BundleTaskCompleteWaiter defines the waiters for BundleTaskComplete -type BundleTaskCompleteWaiter struct { - client DescribeBundleTasksAPIClient - - options BundleTaskCompleteWaiterOptions -} - -// NewBundleTaskCompleteWaiter constructs a BundleTaskCompleteWaiter. -func NewBundleTaskCompleteWaiter(client DescribeBundleTasksAPIClient, optFns ...func(*BundleTaskCompleteWaiterOptions)) *BundleTaskCompleteWaiter { - options := BundleTaskCompleteWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = bundleTaskCompleteStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &BundleTaskCompleteWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for BundleTaskComplete waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *BundleTaskCompleteWaiter) Wait(ctx context.Context, params *DescribeBundleTasksInput, maxWaitDur time.Duration, optFns ...func(*BundleTaskCompleteWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for BundleTaskComplete waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *BundleTaskCompleteWaiter) WaitForOutput(ctx context.Context, params *DescribeBundleTasksInput, maxWaitDur time.Duration, optFns ...func(*BundleTaskCompleteWaiterOptions)) (*DescribeBundleTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeBundleTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for BundleTaskComplete waiter") -} - -func bundleTaskCompleteStateRetryable(ctx context.Context, input *DescribeBundleTasksInput, output *DescribeBundleTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("BundleTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "complete" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.BundleTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.BundleTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("BundleTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.BundleTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.BundleTaskState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeBundleTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeBundleTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeByoipCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeByoipCidrs.go deleted file mode 100644 index cae95fb39..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeByoipCidrs.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the IP address ranges that were specified in calls to -// ProvisionByoipCidr . To describe the address pools that were created when you -// provisioned the address ranges, use DescribePublicIpv4Pools or DescribeIpv6Pools -// . -func (c *Client) DescribeByoipCidrs(ctx context.Context, params *DescribeByoipCidrsInput, optFns ...func(*Options)) (*DescribeByoipCidrsOutput, error) { - if params == nil { - params = &DescribeByoipCidrsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeByoipCidrs", params, optFns, c.addOperationDescribeByoipCidrsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeByoipCidrsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeByoipCidrsInput struct { - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - // - // This member is required. - MaxResults *int32 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeByoipCidrsOutput struct { - - // Information about your address ranges. - ByoipCidrs []types.ByoipCidr - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeByoipCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeByoipCidrs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeByoipCidrs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeByoipCidrs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeByoipCidrsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeByoipCidrs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeByoipCidrsAPIClient is a client that implements the DescribeByoipCidrs -// operation. -type DescribeByoipCidrsAPIClient interface { - DescribeByoipCidrs(context.Context, *DescribeByoipCidrsInput, ...func(*Options)) (*DescribeByoipCidrsOutput, error) -} - -var _ DescribeByoipCidrsAPIClient = (*Client)(nil) - -// DescribeByoipCidrsPaginatorOptions is the paginator options for -// DescribeByoipCidrs -type DescribeByoipCidrsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeByoipCidrsPaginator is a paginator for DescribeByoipCidrs -type DescribeByoipCidrsPaginator struct { - options DescribeByoipCidrsPaginatorOptions - client DescribeByoipCidrsAPIClient - params *DescribeByoipCidrsInput - nextToken *string - firstPage bool -} - -// NewDescribeByoipCidrsPaginator returns a new DescribeByoipCidrsPaginator -func NewDescribeByoipCidrsPaginator(client DescribeByoipCidrsAPIClient, params *DescribeByoipCidrsInput, optFns ...func(*DescribeByoipCidrsPaginatorOptions)) *DescribeByoipCidrsPaginator { - if params == nil { - params = &DescribeByoipCidrsInput{} - } - - options := DescribeByoipCidrsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeByoipCidrsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeByoipCidrsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeByoipCidrs page. -func (p *DescribeByoipCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeByoipCidrsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeByoipCidrs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeByoipCidrs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeByoipCidrs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityBlockOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityBlockOfferings.go deleted file mode 100644 index f4d13de12..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityBlockOfferings.go +++ /dev/null @@ -1,269 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes Capacity Block offerings available for purchase. With Capacity -// Blocks, you purchase a specific instance type for a period of time. -func (c *Client) DescribeCapacityBlockOfferings(ctx context.Context, params *DescribeCapacityBlockOfferingsInput, optFns ...func(*Options)) (*DescribeCapacityBlockOfferingsOutput, error) { - if params == nil { - params = &DescribeCapacityBlockOfferingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeCapacityBlockOfferings", params, optFns, c.addOperationDescribeCapacityBlockOfferingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeCapacityBlockOfferingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeCapacityBlockOfferingsInput struct { - - // The number of hours for which to reserve Capacity Block. - // - // This member is required. - CapacityDurationHours *int32 - - // The number of instances for which to reserve capacity. - // - // This member is required. - InstanceCount *int32 - - // The type of instance for which the Capacity Block offering reserves capacity. - // - // This member is required. - InstanceType *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The latest end date for the Capacity Block offering. - EndDateRange *time.Time - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - // The earliest start date for the Capacity Block offering. - StartDateRange *time.Time - - noSmithyDocumentSerde -} - -type DescribeCapacityBlockOfferingsOutput struct { - - // The recommended Capacity Block offering for the dates specified. - CapacityBlockOfferings []types.CapacityBlockOffering - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeCapacityBlockOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCapacityBlockOfferings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCapacityBlockOfferings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCapacityBlockOfferings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeCapacityBlockOfferingsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityBlockOfferings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeCapacityBlockOfferingsAPIClient is a client that implements the -// DescribeCapacityBlockOfferings operation. -type DescribeCapacityBlockOfferingsAPIClient interface { - DescribeCapacityBlockOfferings(context.Context, *DescribeCapacityBlockOfferingsInput, ...func(*Options)) (*DescribeCapacityBlockOfferingsOutput, error) -} - -var _ DescribeCapacityBlockOfferingsAPIClient = (*Client)(nil) - -// DescribeCapacityBlockOfferingsPaginatorOptions is the paginator options for -// DescribeCapacityBlockOfferings -type DescribeCapacityBlockOfferingsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeCapacityBlockOfferingsPaginator is a paginator for -// DescribeCapacityBlockOfferings -type DescribeCapacityBlockOfferingsPaginator struct { - options DescribeCapacityBlockOfferingsPaginatorOptions - client DescribeCapacityBlockOfferingsAPIClient - params *DescribeCapacityBlockOfferingsInput - nextToken *string - firstPage bool -} - -// NewDescribeCapacityBlockOfferingsPaginator returns a new -// DescribeCapacityBlockOfferingsPaginator -func NewDescribeCapacityBlockOfferingsPaginator(client DescribeCapacityBlockOfferingsAPIClient, params *DescribeCapacityBlockOfferingsInput, optFns ...func(*DescribeCapacityBlockOfferingsPaginatorOptions)) *DescribeCapacityBlockOfferingsPaginator { - if params == nil { - params = &DescribeCapacityBlockOfferingsInput{} - } - - options := DescribeCapacityBlockOfferingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeCapacityBlockOfferingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeCapacityBlockOfferingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeCapacityBlockOfferings page. -func (p *DescribeCapacityBlockOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCapacityBlockOfferingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeCapacityBlockOfferings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeCapacityBlockOfferings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeCapacityBlockOfferings", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservationFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservationFleets.go deleted file mode 100644 index 7f2bd48ae..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservationFleets.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more Capacity Reservation Fleets. -func (c *Client) DescribeCapacityReservationFleets(ctx context.Context, params *DescribeCapacityReservationFleetsInput, optFns ...func(*Options)) (*DescribeCapacityReservationFleetsOutput, error) { - if params == nil { - params = &DescribeCapacityReservationFleetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeCapacityReservationFleets", params, optFns, c.addOperationDescribeCapacityReservationFleetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeCapacityReservationFleetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeCapacityReservationFleetsInput struct { - - // The IDs of the Capacity Reservation Fleets to describe. - CapacityReservationFleetIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - state - The state of the Fleet ( submitted | modifying | active | - // partially_fulfilled | expiring | expired | cancelling | cancelled | failed ). - // - instance-match-criteria - The instance matching criteria for the Fleet. Only - // open is supported. - // - tenancy - The tenancy of the Fleet ( default | dedicated ). - // - allocation-strategy - The allocation strategy used by the Fleet. Only - // prioritized is supported. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeCapacityReservationFleetsOutput struct { - - // Information about the Capacity Reservation Fleets. - CapacityReservationFleets []types.CapacityReservationFleet - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeCapacityReservationFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCapacityReservationFleets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCapacityReservationFleets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCapacityReservationFleets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityReservationFleets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeCapacityReservationFleetsAPIClient is a client that implements the -// DescribeCapacityReservationFleets operation. -type DescribeCapacityReservationFleetsAPIClient interface { - DescribeCapacityReservationFleets(context.Context, *DescribeCapacityReservationFleetsInput, ...func(*Options)) (*DescribeCapacityReservationFleetsOutput, error) -} - -var _ DescribeCapacityReservationFleetsAPIClient = (*Client)(nil) - -// DescribeCapacityReservationFleetsPaginatorOptions is the paginator options for -// DescribeCapacityReservationFleets -type DescribeCapacityReservationFleetsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeCapacityReservationFleetsPaginator is a paginator for -// DescribeCapacityReservationFleets -type DescribeCapacityReservationFleetsPaginator struct { - options DescribeCapacityReservationFleetsPaginatorOptions - client DescribeCapacityReservationFleetsAPIClient - params *DescribeCapacityReservationFleetsInput - nextToken *string - firstPage bool -} - -// NewDescribeCapacityReservationFleetsPaginator returns a new -// DescribeCapacityReservationFleetsPaginator -func NewDescribeCapacityReservationFleetsPaginator(client DescribeCapacityReservationFleetsAPIClient, params *DescribeCapacityReservationFleetsInput, optFns ...func(*DescribeCapacityReservationFleetsPaginatorOptions)) *DescribeCapacityReservationFleetsPaginator { - if params == nil { - params = &DescribeCapacityReservationFleetsInput{} - } - - options := DescribeCapacityReservationFleetsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeCapacityReservationFleetsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeCapacityReservationFleetsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeCapacityReservationFleets page. -func (p *DescribeCapacityReservationFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCapacityReservationFleetsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeCapacityReservationFleets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeCapacityReservationFleets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeCapacityReservationFleets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservations.go deleted file mode 100644 index 89fe57a9f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCapacityReservations.go +++ /dev/null @@ -1,304 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your Capacity Reservations. The results describe only -// the Capacity Reservations in the Amazon Web Services Region that you're -// currently using. -func (c *Client) DescribeCapacityReservations(ctx context.Context, params *DescribeCapacityReservationsInput, optFns ...func(*Options)) (*DescribeCapacityReservationsOutput, error) { - if params == nil { - params = &DescribeCapacityReservationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeCapacityReservations", params, optFns, c.addOperationDescribeCapacityReservationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeCapacityReservationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeCapacityReservationsInput struct { - - // The ID of the Capacity Reservation. - CapacityReservationIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - instance-type - The type of instance for which the Capacity Reservation - // reserves capacity. - // - owner-id - The ID of the Amazon Web Services account that owns the Capacity - // Reservation. - // - instance-platform - The type of operating system for which the Capacity - // Reservation reserves capacity. - // - availability-zone - The Availability Zone of the Capacity Reservation. - // - tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity - // Reservation can have one of the following tenancy settings: - // - default - The Capacity Reservation is created on hardware that is shared - // with other Amazon Web Services accounts. - // - dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single Amazon Web Services account. - // - outpost-arn - The Amazon Resource Name (ARN) of the Outpost on which the - // Capacity Reservation was created. - // - state - The current state of the Capacity Reservation. A Capacity - // Reservation can be in one of the following states: - // - active - The Capacity Reservation is active and the capacity is available - // for your use. - // - expired - The Capacity Reservation expired automatically at the date and - // time specified in your request. The reserved capacity is no longer available for - // your use. - // - cancelled - The Capacity Reservation was cancelled. The reserved capacity is - // no longer available for your use. - // - pending - The Capacity Reservation request was successful but the capacity - // provisioning is still pending. - // - failed - The Capacity Reservation request has failed. A request might fail - // due to invalid request parameters, capacity constraints, or instance limit - // constraints. Failed requests are retained for 60 minutes. - // - start-date - The date and time at which the Capacity Reservation was - // started. - // - end-date - The date and time at which the Capacity Reservation expires. When - // a Capacity Reservation expires, the reserved capacity is released and you can no - // longer launch instances into it. The Capacity Reservation's state changes to - // expired when it reaches its end date and time. - // - end-date-type - Indicates the way in which the Capacity Reservation ends. A - // Capacity Reservation can have one of the following end types: - // - unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. - // - limited - The Capacity Reservation expires automatically at a specified date - // and time. - // - instance-match-criteria - Indicates the type of instance launches that the - // Capacity Reservation accepts. The options include: - // - open - The Capacity Reservation accepts all instances that have matching - // attributes (instance type, platform, and Availability Zone). Instances that have - // matching attributes launch into the Capacity Reservation automatically without - // specifying any additional parameters. - // - targeted - The Capacity Reservation only accepts instances that have - // matching attributes (instance type, platform, and Availability Zone), and - // explicitly target the Capacity Reservation. This ensures that only permitted - // instances can use the reserved capacity. - // - placement-group-arn - The ARN of the cluster placement group in which the - // Capacity Reservation was created. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeCapacityReservationsOutput struct { - - // Information about the Capacity Reservations. - CapacityReservations []types.CapacityReservation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeCapacityReservationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCapacityReservations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCapacityReservations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCapacityReservations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCapacityReservations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeCapacityReservationsAPIClient is a client that implements the -// DescribeCapacityReservations operation. -type DescribeCapacityReservationsAPIClient interface { - DescribeCapacityReservations(context.Context, *DescribeCapacityReservationsInput, ...func(*Options)) (*DescribeCapacityReservationsOutput, error) -} - -var _ DescribeCapacityReservationsAPIClient = (*Client)(nil) - -// DescribeCapacityReservationsPaginatorOptions is the paginator options for -// DescribeCapacityReservations -type DescribeCapacityReservationsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeCapacityReservationsPaginator is a paginator for -// DescribeCapacityReservations -type DescribeCapacityReservationsPaginator struct { - options DescribeCapacityReservationsPaginatorOptions - client DescribeCapacityReservationsAPIClient - params *DescribeCapacityReservationsInput - nextToken *string - firstPage bool -} - -// NewDescribeCapacityReservationsPaginator returns a new -// DescribeCapacityReservationsPaginator -func NewDescribeCapacityReservationsPaginator(client DescribeCapacityReservationsAPIClient, params *DescribeCapacityReservationsInput, optFns ...func(*DescribeCapacityReservationsPaginatorOptions)) *DescribeCapacityReservationsPaginator { - if params == nil { - params = &DescribeCapacityReservationsInput{} - } - - options := DescribeCapacityReservationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeCapacityReservationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeCapacityReservationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeCapacityReservations page. -func (p *DescribeCapacityReservationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCapacityReservationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeCapacityReservations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeCapacityReservations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeCapacityReservations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCarrierGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCarrierGateways.go deleted file mode 100644 index 9de246d7b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCarrierGateways.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your carrier gateways. -func (c *Client) DescribeCarrierGateways(ctx context.Context, params *DescribeCarrierGatewaysInput, optFns ...func(*Options)) (*DescribeCarrierGatewaysOutput, error) { - if params == nil { - params = &DescribeCarrierGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeCarrierGateways", params, optFns, c.addOperationDescribeCarrierGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeCarrierGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeCarrierGatewaysInput struct { - - // One or more carrier gateway IDs. - CarrierGatewayIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - carrier-gateway-id - The ID of the carrier gateway. - // - state - The state of the carrier gateway ( pending | failed | available | - // deleting | deleted ). - // - owner-id - The Amazon Web Services account ID of the owner of the carrier - // gateway. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC associated with the carrier gateway. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeCarrierGatewaysOutput struct { - - // Information about the carrier gateway. - CarrierGateways []types.CarrierGateway - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeCarrierGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCarrierGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCarrierGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCarrierGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCarrierGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeCarrierGatewaysAPIClient is a client that implements the -// DescribeCarrierGateways operation. -type DescribeCarrierGatewaysAPIClient interface { - DescribeCarrierGateways(context.Context, *DescribeCarrierGatewaysInput, ...func(*Options)) (*DescribeCarrierGatewaysOutput, error) -} - -var _ DescribeCarrierGatewaysAPIClient = (*Client)(nil) - -// DescribeCarrierGatewaysPaginatorOptions is the paginator options for -// DescribeCarrierGateways -type DescribeCarrierGatewaysPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeCarrierGatewaysPaginator is a paginator for DescribeCarrierGateways -type DescribeCarrierGatewaysPaginator struct { - options DescribeCarrierGatewaysPaginatorOptions - client DescribeCarrierGatewaysAPIClient - params *DescribeCarrierGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeCarrierGatewaysPaginator returns a new -// DescribeCarrierGatewaysPaginator -func NewDescribeCarrierGatewaysPaginator(client DescribeCarrierGatewaysAPIClient, params *DescribeCarrierGatewaysInput, optFns ...func(*DescribeCarrierGatewaysPaginatorOptions)) *DescribeCarrierGatewaysPaginator { - if params == nil { - params = &DescribeCarrierGatewaysInput{} - } - - options := DescribeCarrierGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeCarrierGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeCarrierGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeCarrierGateways page. -func (p *DescribeCarrierGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCarrierGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeCarrierGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeCarrierGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeCarrierGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClassicLinkInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClassicLinkInstances.go deleted file mode 100644 index b809d2aaf..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClassicLinkInstances.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Describes one or more of your linked EC2-Classic -// instances. This request only returns information about EC2-Classic instances -// linked to a VPC through ClassicLink. You cannot use this request to return -// information about other instances. -func (c *Client) DescribeClassicLinkInstances(ctx context.Context, params *DescribeClassicLinkInstancesInput, optFns ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error) { - if params == nil { - params = &DescribeClassicLinkInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeClassicLinkInstances", params, optFns, c.addOperationDescribeClassicLinkInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeClassicLinkInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeClassicLinkInstancesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - group-id - The ID of a VPC security group that's associated with the - // instance. - // - instance-id - The ID of the instance. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC to which the instance is linked. - Filters []types.Filter - - // The instance IDs. Must be instances linked to a VPC through ClassicLink. - InstanceIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . Constraint: If the value is greater than 1000, we return only 1000 items. - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeClassicLinkInstancesOutput struct { - - // Information about one or more linked EC2-Classic instances. - Instances []types.ClassicLinkInstance - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeClassicLinkInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClassicLinkInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClassicLinkInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClassicLinkInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClassicLinkInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeClassicLinkInstancesAPIClient is a client that implements the -// DescribeClassicLinkInstances operation. -type DescribeClassicLinkInstancesAPIClient interface { - DescribeClassicLinkInstances(context.Context, *DescribeClassicLinkInstancesInput, ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error) -} - -var _ DescribeClassicLinkInstancesAPIClient = (*Client)(nil) - -// DescribeClassicLinkInstancesPaginatorOptions is the paginator options for -// DescribeClassicLinkInstances -type DescribeClassicLinkInstancesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . Constraint: If the value is greater than 1000, we return only 1000 items. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClassicLinkInstancesPaginator is a paginator for -// DescribeClassicLinkInstances -type DescribeClassicLinkInstancesPaginator struct { - options DescribeClassicLinkInstancesPaginatorOptions - client DescribeClassicLinkInstancesAPIClient - params *DescribeClassicLinkInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeClassicLinkInstancesPaginator returns a new -// DescribeClassicLinkInstancesPaginator -func NewDescribeClassicLinkInstancesPaginator(client DescribeClassicLinkInstancesAPIClient, params *DescribeClassicLinkInstancesInput, optFns ...func(*DescribeClassicLinkInstancesPaginatorOptions)) *DescribeClassicLinkInstancesPaginator { - if params == nil { - params = &DescribeClassicLinkInstancesInput{} - } - - options := DescribeClassicLinkInstancesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClassicLinkInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClassicLinkInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClassicLinkInstances page. -func (p *DescribeClassicLinkInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClassicLinkInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeClassicLinkInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeClassicLinkInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeClassicLinkInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go deleted file mode 100644 index 4c564309f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnAuthorizationRules.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the authorization rules for a specified Client VPN endpoint. -func (c *Client) DescribeClientVpnAuthorizationRules(ctx context.Context, params *DescribeClientVpnAuthorizationRulesInput, optFns ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error) { - if params == nil { - params = &DescribeClientVpnAuthorizationRulesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnAuthorizationRules", params, optFns, c.addOperationDescribeClientVpnAuthorizationRulesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeClientVpnAuthorizationRulesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeClientVpnAuthorizationRulesInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - description - The description of the authorization rule. - // - destination-cidr - The CIDR of the network to which the authorization rule - // applies. - // - group-id - The ID of the Active Directory group to which the authorization - // rule grants access. - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeClientVpnAuthorizationRulesOutput struct { - - // Information about the authorization rules. - AuthorizationRules []types.AuthorizationRule - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeClientVpnAuthorizationRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnAuthorizationRules{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClientVpnAuthorizationRules"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeClientVpnAuthorizationRulesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnAuthorizationRules(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeClientVpnAuthorizationRulesAPIClient is a client that implements the -// DescribeClientVpnAuthorizationRules operation. -type DescribeClientVpnAuthorizationRulesAPIClient interface { - DescribeClientVpnAuthorizationRules(context.Context, *DescribeClientVpnAuthorizationRulesInput, ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error) -} - -var _ DescribeClientVpnAuthorizationRulesAPIClient = (*Client)(nil) - -// DescribeClientVpnAuthorizationRulesPaginatorOptions is the paginator options -// for DescribeClientVpnAuthorizationRules -type DescribeClientVpnAuthorizationRulesPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClientVpnAuthorizationRulesPaginator is a paginator for -// DescribeClientVpnAuthorizationRules -type DescribeClientVpnAuthorizationRulesPaginator struct { - options DescribeClientVpnAuthorizationRulesPaginatorOptions - client DescribeClientVpnAuthorizationRulesAPIClient - params *DescribeClientVpnAuthorizationRulesInput - nextToken *string - firstPage bool -} - -// NewDescribeClientVpnAuthorizationRulesPaginator returns a new -// DescribeClientVpnAuthorizationRulesPaginator -func NewDescribeClientVpnAuthorizationRulesPaginator(client DescribeClientVpnAuthorizationRulesAPIClient, params *DescribeClientVpnAuthorizationRulesInput, optFns ...func(*DescribeClientVpnAuthorizationRulesPaginatorOptions)) *DescribeClientVpnAuthorizationRulesPaginator { - if params == nil { - params = &DescribeClientVpnAuthorizationRulesInput{} - } - - options := DescribeClientVpnAuthorizationRulesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClientVpnAuthorizationRulesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClientVpnAuthorizationRulesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClientVpnAuthorizationRules page. -func (p *DescribeClientVpnAuthorizationRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnAuthorizationRulesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeClientVpnAuthorizationRules(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeClientVpnAuthorizationRules(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeClientVpnAuthorizationRules", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnConnections.go deleted file mode 100644 index 0a154ea82..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnConnections.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes active client connections and connections that have been terminated -// within the last 60 minutes for the specified Client VPN endpoint. -func (c *Client) DescribeClientVpnConnections(ctx context.Context, params *DescribeClientVpnConnectionsInput, optFns ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error) { - if params == nil { - params = &DescribeClientVpnConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnConnections", params, optFns, c.addOperationDescribeClientVpnConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeClientVpnConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeClientVpnConnectionsInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - connection-id - The ID of the connection. - // - username - For Active Directory client authentication, the user name of the - // client who established the client connection. - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeClientVpnConnectionsOutput struct { - - // Information about the active and terminated client connections. - Connections []types.ClientVpnConnection - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeClientVpnConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClientVpnConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeClientVpnConnectionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeClientVpnConnectionsAPIClient is a client that implements the -// DescribeClientVpnConnections operation. -type DescribeClientVpnConnectionsAPIClient interface { - DescribeClientVpnConnections(context.Context, *DescribeClientVpnConnectionsInput, ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error) -} - -var _ DescribeClientVpnConnectionsAPIClient = (*Client)(nil) - -// DescribeClientVpnConnectionsPaginatorOptions is the paginator options for -// DescribeClientVpnConnections -type DescribeClientVpnConnectionsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClientVpnConnectionsPaginator is a paginator for -// DescribeClientVpnConnections -type DescribeClientVpnConnectionsPaginator struct { - options DescribeClientVpnConnectionsPaginatorOptions - client DescribeClientVpnConnectionsAPIClient - params *DescribeClientVpnConnectionsInput - nextToken *string - firstPage bool -} - -// NewDescribeClientVpnConnectionsPaginator returns a new -// DescribeClientVpnConnectionsPaginator -func NewDescribeClientVpnConnectionsPaginator(client DescribeClientVpnConnectionsAPIClient, params *DescribeClientVpnConnectionsInput, optFns ...func(*DescribeClientVpnConnectionsPaginatorOptions)) *DescribeClientVpnConnectionsPaginator { - if params == nil { - params = &DescribeClientVpnConnectionsInput{} - } - - options := DescribeClientVpnConnectionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClientVpnConnectionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClientVpnConnectionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClientVpnConnections page. -func (p *DescribeClientVpnConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnConnectionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeClientVpnConnections(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeClientVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeClientVpnConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnEndpoints.go deleted file mode 100644 index 0b1f866b4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnEndpoints.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more Client VPN endpoints in the account. -func (c *Client) DescribeClientVpnEndpoints(ctx context.Context, params *DescribeClientVpnEndpointsInput, optFns ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error) { - if params == nil { - params = &DescribeClientVpnEndpointsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnEndpoints", params, optFns, c.addOperationDescribeClientVpnEndpointsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeClientVpnEndpointsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeClientVpnEndpointsInput struct { - - // The ID of the Client VPN endpoint. - ClientVpnEndpointIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - endpoint-id - The ID of the Client VPN endpoint. - // - transport-protocol - The transport protocol ( tcp | udp ). - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeClientVpnEndpointsOutput struct { - - // Information about the Client VPN endpoints. - ClientVpnEndpoints []types.ClientVpnEndpoint - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeClientVpnEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnEndpoints{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnEndpoints{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClientVpnEndpoints"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnEndpoints(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeClientVpnEndpointsAPIClient is a client that implements the -// DescribeClientVpnEndpoints operation. -type DescribeClientVpnEndpointsAPIClient interface { - DescribeClientVpnEndpoints(context.Context, *DescribeClientVpnEndpointsInput, ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error) -} - -var _ DescribeClientVpnEndpointsAPIClient = (*Client)(nil) - -// DescribeClientVpnEndpointsPaginatorOptions is the paginator options for -// DescribeClientVpnEndpoints -type DescribeClientVpnEndpointsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClientVpnEndpointsPaginator is a paginator for -// DescribeClientVpnEndpoints -type DescribeClientVpnEndpointsPaginator struct { - options DescribeClientVpnEndpointsPaginatorOptions - client DescribeClientVpnEndpointsAPIClient - params *DescribeClientVpnEndpointsInput - nextToken *string - firstPage bool -} - -// NewDescribeClientVpnEndpointsPaginator returns a new -// DescribeClientVpnEndpointsPaginator -func NewDescribeClientVpnEndpointsPaginator(client DescribeClientVpnEndpointsAPIClient, params *DescribeClientVpnEndpointsInput, optFns ...func(*DescribeClientVpnEndpointsPaginatorOptions)) *DescribeClientVpnEndpointsPaginator { - if params == nil { - params = &DescribeClientVpnEndpointsInput{} - } - - options := DescribeClientVpnEndpointsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClientVpnEndpointsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClientVpnEndpointsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClientVpnEndpoints page. -func (p *DescribeClientVpnEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnEndpointsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeClientVpnEndpoints(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeClientVpnEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeClientVpnEndpoints", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnRoutes.go deleted file mode 100644 index e59c63481..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnRoutes.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the routes for the specified Client VPN endpoint. -func (c *Client) DescribeClientVpnRoutes(ctx context.Context, params *DescribeClientVpnRoutesInput, optFns ...func(*Options)) (*DescribeClientVpnRoutesOutput, error) { - if params == nil { - params = &DescribeClientVpnRoutesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnRoutes", params, optFns, c.addOperationDescribeClientVpnRoutesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeClientVpnRoutesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeClientVpnRoutesInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - destination-cidr - The CIDR of the route destination. - // - origin - How the route was associated with the Client VPN endpoint ( - // associate | add-route ). - // - target-subnet - The ID of the subnet through which traffic is routed. - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeClientVpnRoutesOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the Client VPN endpoint routes. - Routes []types.ClientVpnRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeClientVpnRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnRoutes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnRoutes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClientVpnRoutes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeClientVpnRoutesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnRoutes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeClientVpnRoutesAPIClient is a client that implements the -// DescribeClientVpnRoutes operation. -type DescribeClientVpnRoutesAPIClient interface { - DescribeClientVpnRoutes(context.Context, *DescribeClientVpnRoutesInput, ...func(*Options)) (*DescribeClientVpnRoutesOutput, error) -} - -var _ DescribeClientVpnRoutesAPIClient = (*Client)(nil) - -// DescribeClientVpnRoutesPaginatorOptions is the paginator options for -// DescribeClientVpnRoutes -type DescribeClientVpnRoutesPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClientVpnRoutesPaginator is a paginator for DescribeClientVpnRoutes -type DescribeClientVpnRoutesPaginator struct { - options DescribeClientVpnRoutesPaginatorOptions - client DescribeClientVpnRoutesAPIClient - params *DescribeClientVpnRoutesInput - nextToken *string - firstPage bool -} - -// NewDescribeClientVpnRoutesPaginator returns a new -// DescribeClientVpnRoutesPaginator -func NewDescribeClientVpnRoutesPaginator(client DescribeClientVpnRoutesAPIClient, params *DescribeClientVpnRoutesInput, optFns ...func(*DescribeClientVpnRoutesPaginatorOptions)) *DescribeClientVpnRoutesPaginator { - if params == nil { - params = &DescribeClientVpnRoutesInput{} - } - - options := DescribeClientVpnRoutesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClientVpnRoutesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClientVpnRoutesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClientVpnRoutes page. -func (p *DescribeClientVpnRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnRoutesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeClientVpnRoutes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeClientVpnRoutes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeClientVpnRoutes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnTargetNetworks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnTargetNetworks.go deleted file mode 100644 index 384bf7d1a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeClientVpnTargetNetworks.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the target networks associated with the specified Client VPN endpoint. -func (c *Client) DescribeClientVpnTargetNetworks(ctx context.Context, params *DescribeClientVpnTargetNetworksInput, optFns ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error) { - if params == nil { - params = &DescribeClientVpnTargetNetworksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeClientVpnTargetNetworks", params, optFns, c.addOperationDescribeClientVpnTargetNetworksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeClientVpnTargetNetworksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeClientVpnTargetNetworksInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // The IDs of the target network associations. - AssociationIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - association-id - The ID of the association. - // - target-network-id - The ID of the subnet specified as the target network. - // - vpc-id - The ID of the VPC in which the target network is located. - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeClientVpnTargetNetworksOutput struct { - - // Information about the associated target networks. - ClientVpnTargetNetworks []types.TargetNetwork - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeClientVpnTargetNetworksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeClientVpnTargetNetworks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeClientVpnTargetNetworks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeClientVpnTargetNetworks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeClientVpnTargetNetworksValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeClientVpnTargetNetworks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeClientVpnTargetNetworksAPIClient is a client that implements the -// DescribeClientVpnTargetNetworks operation. -type DescribeClientVpnTargetNetworksAPIClient interface { - DescribeClientVpnTargetNetworks(context.Context, *DescribeClientVpnTargetNetworksInput, ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error) -} - -var _ DescribeClientVpnTargetNetworksAPIClient = (*Client)(nil) - -// DescribeClientVpnTargetNetworksPaginatorOptions is the paginator options for -// DescribeClientVpnTargetNetworks -type DescribeClientVpnTargetNetworksPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the nextToken - // value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeClientVpnTargetNetworksPaginator is a paginator for -// DescribeClientVpnTargetNetworks -type DescribeClientVpnTargetNetworksPaginator struct { - options DescribeClientVpnTargetNetworksPaginatorOptions - client DescribeClientVpnTargetNetworksAPIClient - params *DescribeClientVpnTargetNetworksInput - nextToken *string - firstPage bool -} - -// NewDescribeClientVpnTargetNetworksPaginator returns a new -// DescribeClientVpnTargetNetworksPaginator -func NewDescribeClientVpnTargetNetworksPaginator(client DescribeClientVpnTargetNetworksAPIClient, params *DescribeClientVpnTargetNetworksInput, optFns ...func(*DescribeClientVpnTargetNetworksPaginatorOptions)) *DescribeClientVpnTargetNetworksPaginator { - if params == nil { - params = &DescribeClientVpnTargetNetworksInput{} - } - - options := DescribeClientVpnTargetNetworksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeClientVpnTargetNetworksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeClientVpnTargetNetworksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeClientVpnTargetNetworks page. -func (p *DescribeClientVpnTargetNetworksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeClientVpnTargetNetworksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeClientVpnTargetNetworks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeClientVpnTargetNetworks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeClientVpnTargetNetworks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCoipPools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCoipPools.go deleted file mode 100644 index 04fcdd528..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCoipPools.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified customer-owned address pools or all of your -// customer-owned address pools. -func (c *Client) DescribeCoipPools(ctx context.Context, params *DescribeCoipPoolsInput, optFns ...func(*Options)) (*DescribeCoipPoolsOutput, error) { - if params == nil { - params = &DescribeCoipPoolsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeCoipPools", params, optFns, c.addOperationDescribeCoipPoolsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeCoipPoolsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeCoipPoolsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - coip-pool.local-gateway-route-table-id - The ID of the local gateway route - // table. - // - coip-pool.pool-id - The ID of the address pool. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the address pools. - PoolIds []string - - noSmithyDocumentSerde -} - -type DescribeCoipPoolsOutput struct { - - // Information about the address pools. - CoipPools []types.CoipPool - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeCoipPoolsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCoipPools{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCoipPools{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCoipPools"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCoipPools(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeCoipPoolsAPIClient is a client that implements the DescribeCoipPools -// operation. -type DescribeCoipPoolsAPIClient interface { - DescribeCoipPools(context.Context, *DescribeCoipPoolsInput, ...func(*Options)) (*DescribeCoipPoolsOutput, error) -} - -var _ DescribeCoipPoolsAPIClient = (*Client)(nil) - -// DescribeCoipPoolsPaginatorOptions is the paginator options for DescribeCoipPools -type DescribeCoipPoolsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeCoipPoolsPaginator is a paginator for DescribeCoipPools -type DescribeCoipPoolsPaginator struct { - options DescribeCoipPoolsPaginatorOptions - client DescribeCoipPoolsAPIClient - params *DescribeCoipPoolsInput - nextToken *string - firstPage bool -} - -// NewDescribeCoipPoolsPaginator returns a new DescribeCoipPoolsPaginator -func NewDescribeCoipPoolsPaginator(client DescribeCoipPoolsAPIClient, params *DescribeCoipPoolsInput, optFns ...func(*DescribeCoipPoolsPaginatorOptions)) *DescribeCoipPoolsPaginator { - if params == nil { - params = &DescribeCoipPoolsInput{} - } - - options := DescribeCoipPoolsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeCoipPoolsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeCoipPoolsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeCoipPools page. -func (p *DescribeCoipPoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCoipPoolsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeCoipPools(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeCoipPools(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeCoipPools", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go deleted file mode 100644 index 171d091cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeConversionTasks.go +++ /dev/null @@ -1,768 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the specified conversion tasks or all your conversion tasks. For more -// information, see the VM Import/Export User Guide (https://docs.aws.amazon.com/vm-import/latest/userguide/) -// . For information about the import manifest referenced by this API action, see -// VM Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html) -// . -func (c *Client) DescribeConversionTasks(ctx context.Context, params *DescribeConversionTasksInput, optFns ...func(*Options)) (*DescribeConversionTasksOutput, error) { - if params == nil { - params = &DescribeConversionTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeConversionTasks", params, optFns, c.addOperationDescribeConversionTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeConversionTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeConversionTasksInput struct { - - // The conversion task IDs. - ConversionTaskIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeConversionTasksOutput struct { - - // Information about the conversion tasks. - ConversionTasks []types.ConversionTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeConversionTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeConversionTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeConversionTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeConversionTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConversionTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeConversionTasksAPIClient is a client that implements the -// DescribeConversionTasks operation. -type DescribeConversionTasksAPIClient interface { - DescribeConversionTasks(context.Context, *DescribeConversionTasksInput, ...func(*Options)) (*DescribeConversionTasksOutput, error) -} - -var _ DescribeConversionTasksAPIClient = (*Client)(nil) - -// ConversionTaskCancelledWaiterOptions are waiter options for -// ConversionTaskCancelledWaiter -type ConversionTaskCancelledWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ConversionTaskCancelledWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ConversionTaskCancelledWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeConversionTasksInput, *DescribeConversionTasksOutput, error) (bool, error) -} - -// ConversionTaskCancelledWaiter defines the waiters for ConversionTaskCancelled -type ConversionTaskCancelledWaiter struct { - client DescribeConversionTasksAPIClient - - options ConversionTaskCancelledWaiterOptions -} - -// NewConversionTaskCancelledWaiter constructs a ConversionTaskCancelledWaiter. -func NewConversionTaskCancelledWaiter(client DescribeConversionTasksAPIClient, optFns ...func(*ConversionTaskCancelledWaiterOptions)) *ConversionTaskCancelledWaiter { - options := ConversionTaskCancelledWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = conversionTaskCancelledStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ConversionTaskCancelledWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ConversionTaskCancelled waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *ConversionTaskCancelledWaiter) Wait(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskCancelledWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ConversionTaskCancelled waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *ConversionTaskCancelledWaiter) WaitForOutput(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskCancelledWaiterOptions)) (*DescribeConversionTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeConversionTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ConversionTaskCancelled waiter") -} - -func conversionTaskCancelledStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "cancelled" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -// ConversionTaskCompletedWaiterOptions are waiter options for -// ConversionTaskCompletedWaiter -type ConversionTaskCompletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ConversionTaskCompletedWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ConversionTaskCompletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeConversionTasksInput, *DescribeConversionTasksOutput, error) (bool, error) -} - -// ConversionTaskCompletedWaiter defines the waiters for ConversionTaskCompleted -type ConversionTaskCompletedWaiter struct { - client DescribeConversionTasksAPIClient - - options ConversionTaskCompletedWaiterOptions -} - -// NewConversionTaskCompletedWaiter constructs a ConversionTaskCompletedWaiter. -func NewConversionTaskCompletedWaiter(client DescribeConversionTasksAPIClient, optFns ...func(*ConversionTaskCompletedWaiterOptions)) *ConversionTaskCompletedWaiter { - options := ConversionTaskCompletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = conversionTaskCompletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ConversionTaskCompletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ConversionTaskCompleted waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *ConversionTaskCompletedWaiter) Wait(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskCompletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ConversionTaskCompleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *ConversionTaskCompletedWaiter) WaitForOutput(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskCompletedWaiterOptions)) (*DescribeConversionTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeConversionTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ConversionTaskCompleted waiter") -} - -func conversionTaskCompletedStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "cancelled" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "cancelling" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -// ConversionTaskDeletedWaiterOptions are waiter options for -// ConversionTaskDeletedWaiter -type ConversionTaskDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ConversionTaskDeletedWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ConversionTaskDeletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeConversionTasksInput, *DescribeConversionTasksOutput, error) (bool, error) -} - -// ConversionTaskDeletedWaiter defines the waiters for ConversionTaskDeleted -type ConversionTaskDeletedWaiter struct { - client DescribeConversionTasksAPIClient - - options ConversionTaskDeletedWaiterOptions -} - -// NewConversionTaskDeletedWaiter constructs a ConversionTaskDeletedWaiter. -func NewConversionTaskDeletedWaiter(client DescribeConversionTasksAPIClient, optFns ...func(*ConversionTaskDeletedWaiterOptions)) *ConversionTaskDeletedWaiter { - options := ConversionTaskDeletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = conversionTaskDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ConversionTaskDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ConversionTaskDeleted waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *ConversionTaskDeletedWaiter) Wait(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ConversionTaskDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *ConversionTaskDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeConversionTasksInput, maxWaitDur time.Duration, optFns ...func(*ConversionTaskDeletedWaiterOptions)) (*DescribeConversionTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeConversionTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ConversionTaskDeleted waiter") -} - -func conversionTaskDeletedStateRetryable(ctx context.Context, input *DescribeConversionTasksInput, output *DescribeConversionTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("ConversionTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ConversionTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ConversionTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeConversionTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeConversionTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go deleted file mode 100644 index d42d1a8c2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeCustomerGateways.go +++ /dev/null @@ -1,408 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your VPN customer gateways. For more information, see -// Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) DescribeCustomerGateways(ctx context.Context, params *DescribeCustomerGatewaysInput, optFns ...func(*Options)) (*DescribeCustomerGatewaysOutput, error) { - if params == nil { - params = &DescribeCustomerGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeCustomerGateways", params, optFns, c.addOperationDescribeCustomerGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeCustomerGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeCustomerGateways. -type DescribeCustomerGatewaysInput struct { - - // One or more customer gateway IDs. Default: Describes all your customer gateways. - CustomerGatewayIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - bgp-asn - The customer gateway's Border Gateway Protocol (BGP) Autonomous - // System Number (ASN). - // - customer-gateway-id - The ID of the customer gateway. - // - ip-address - The IP address of the customer gateway device's external - // interface. - // - state - The state of the customer gateway ( pending | available | deleting | - // deleted ). - // - type - The type of customer gateway. Currently, the only supported type is - // ipsec.1 . - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - noSmithyDocumentSerde -} - -// Contains the output of DescribeCustomerGateways. -type DescribeCustomerGatewaysOutput struct { - - // Information about one or more customer gateways. - CustomerGateways []types.CustomerGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeCustomerGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeCustomerGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeCustomerGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCustomerGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomerGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeCustomerGatewaysAPIClient is a client that implements the -// DescribeCustomerGateways operation. -type DescribeCustomerGatewaysAPIClient interface { - DescribeCustomerGateways(context.Context, *DescribeCustomerGatewaysInput, ...func(*Options)) (*DescribeCustomerGatewaysOutput, error) -} - -var _ DescribeCustomerGatewaysAPIClient = (*Client)(nil) - -// CustomerGatewayAvailableWaiterOptions are waiter options for -// CustomerGatewayAvailableWaiter -type CustomerGatewayAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // CustomerGatewayAvailableWaiter will use default minimum delay of 15 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, CustomerGatewayAvailableWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeCustomerGatewaysInput, *DescribeCustomerGatewaysOutput, error) (bool, error) -} - -// CustomerGatewayAvailableWaiter defines the waiters for CustomerGatewayAvailable -type CustomerGatewayAvailableWaiter struct { - client DescribeCustomerGatewaysAPIClient - - options CustomerGatewayAvailableWaiterOptions -} - -// NewCustomerGatewayAvailableWaiter constructs a CustomerGatewayAvailableWaiter. -func NewCustomerGatewayAvailableWaiter(client DescribeCustomerGatewaysAPIClient, optFns ...func(*CustomerGatewayAvailableWaiterOptions)) *CustomerGatewayAvailableWaiter { - options := CustomerGatewayAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = customerGatewayAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &CustomerGatewayAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for CustomerGatewayAvailable waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *CustomerGatewayAvailableWaiter) Wait(ctx context.Context, params *DescribeCustomerGatewaysInput, maxWaitDur time.Duration, optFns ...func(*CustomerGatewayAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for CustomerGatewayAvailable waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *CustomerGatewayAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeCustomerGatewaysInput, maxWaitDur time.Duration, optFns ...func(*CustomerGatewayAvailableWaiterOptions)) (*DescribeCustomerGatewaysOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeCustomerGateways(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for CustomerGatewayAvailable waiter") -} - -func customerGatewayAvailableStateRetryable(ctx context.Context, input *DescribeCustomerGatewaysInput, output *DescribeCustomerGatewaysOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("CustomerGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("CustomerGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("CustomerGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleting" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeCustomerGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeCustomerGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeDhcpOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeDhcpOptions.go deleted file mode 100644 index a655843ab..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeDhcpOptions.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your DHCP options sets. For more information, see DHCP -// options sets (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html) -// in the Amazon VPC User Guide. -func (c *Client) DescribeDhcpOptions(ctx context.Context, params *DescribeDhcpOptionsInput, optFns ...func(*Options)) (*DescribeDhcpOptionsOutput, error) { - if params == nil { - params = &DescribeDhcpOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeDhcpOptions", params, optFns, c.addOperationDescribeDhcpOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeDhcpOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeDhcpOptionsInput struct { - - // The IDs of one or more DHCP options sets. Default: Describes all your DHCP - // options sets. - DhcpOptionsIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - dhcp-options-id - The ID of a DHCP options set. - // - key - The key for one of the options (for example, domain-name ). - // - value - The value for one of the options. - // - owner-id - The ID of the Amazon Web Services account that owns the DHCP - // options set. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeDhcpOptionsOutput struct { - - // Information about one or more DHCP options sets. - DhcpOptions []types.DhcpOptions - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeDhcpOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeDhcpOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeDhcpOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeDhcpOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDhcpOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeDhcpOptionsAPIClient is a client that implements the -// DescribeDhcpOptions operation. -type DescribeDhcpOptionsAPIClient interface { - DescribeDhcpOptions(context.Context, *DescribeDhcpOptionsInput, ...func(*Options)) (*DescribeDhcpOptionsOutput, error) -} - -var _ DescribeDhcpOptionsAPIClient = (*Client)(nil) - -// DescribeDhcpOptionsPaginatorOptions is the paginator options for -// DescribeDhcpOptions -type DescribeDhcpOptionsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeDhcpOptionsPaginator is a paginator for DescribeDhcpOptions -type DescribeDhcpOptionsPaginator struct { - options DescribeDhcpOptionsPaginatorOptions - client DescribeDhcpOptionsAPIClient - params *DescribeDhcpOptionsInput - nextToken *string - firstPage bool -} - -// NewDescribeDhcpOptionsPaginator returns a new DescribeDhcpOptionsPaginator -func NewDescribeDhcpOptionsPaginator(client DescribeDhcpOptionsAPIClient, params *DescribeDhcpOptionsInput, optFns ...func(*DescribeDhcpOptionsPaginatorOptions)) *DescribeDhcpOptionsPaginator { - if params == nil { - params = &DescribeDhcpOptionsInput{} - } - - options := DescribeDhcpOptionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeDhcpOptionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeDhcpOptionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeDhcpOptions page. -func (p *DescribeDhcpOptionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeDhcpOptionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeDhcpOptions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeDhcpOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeDhcpOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go deleted file mode 100644 index 2219a13bc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeEgressOnlyInternetGateways.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your egress-only internet gateways. -func (c *Client) DescribeEgressOnlyInternetGateways(ctx context.Context, params *DescribeEgressOnlyInternetGatewaysInput, optFns ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error) { - if params == nil { - params = &DescribeEgressOnlyInternetGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeEgressOnlyInternetGateways", params, optFns, c.addOperationDescribeEgressOnlyInternetGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeEgressOnlyInternetGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeEgressOnlyInternetGatewaysInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of the egress-only internet gateways. - EgressOnlyInternetGatewayIds []string - - // The filters. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeEgressOnlyInternetGatewaysOutput struct { - - // Information about the egress-only internet gateways. - EgressOnlyInternetGateways []types.EgressOnlyInternetGateway - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeEgressOnlyInternetGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeEgressOnlyInternetGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeEgressOnlyInternetGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEgressOnlyInternetGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeEgressOnlyInternetGatewaysAPIClient is a client that implements the -// DescribeEgressOnlyInternetGateways operation. -type DescribeEgressOnlyInternetGatewaysAPIClient interface { - DescribeEgressOnlyInternetGateways(context.Context, *DescribeEgressOnlyInternetGatewaysInput, ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error) -} - -var _ DescribeEgressOnlyInternetGatewaysAPIClient = (*Client)(nil) - -// DescribeEgressOnlyInternetGatewaysPaginatorOptions is the paginator options for -// DescribeEgressOnlyInternetGateways -type DescribeEgressOnlyInternetGatewaysPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeEgressOnlyInternetGatewaysPaginator is a paginator for -// DescribeEgressOnlyInternetGateways -type DescribeEgressOnlyInternetGatewaysPaginator struct { - options DescribeEgressOnlyInternetGatewaysPaginatorOptions - client DescribeEgressOnlyInternetGatewaysAPIClient - params *DescribeEgressOnlyInternetGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeEgressOnlyInternetGatewaysPaginator returns a new -// DescribeEgressOnlyInternetGatewaysPaginator -func NewDescribeEgressOnlyInternetGatewaysPaginator(client DescribeEgressOnlyInternetGatewaysAPIClient, params *DescribeEgressOnlyInternetGatewaysInput, optFns ...func(*DescribeEgressOnlyInternetGatewaysPaginatorOptions)) *DescribeEgressOnlyInternetGatewaysPaginator { - if params == nil { - params = &DescribeEgressOnlyInternetGatewaysInput{} - } - - options := DescribeEgressOnlyInternetGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeEgressOnlyInternetGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeEgressOnlyInternetGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeEgressOnlyInternetGateways page. -func (p *DescribeEgressOnlyInternetGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeEgressOnlyInternetGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeEgressOnlyInternetGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeEgressOnlyInternetGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeEgressOnlyInternetGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeElasticGpus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeElasticGpus.go deleted file mode 100644 index 758495fce..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeElasticGpus.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads -// that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, -// G4dn, or G5 instances. Describes the Elastic Graphics accelerator associated -// with your instances. For more information about Elastic Graphics, see Amazon -// Elastic Graphics (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html) -// . -func (c *Client) DescribeElasticGpus(ctx context.Context, params *DescribeElasticGpusInput, optFns ...func(*Options)) (*DescribeElasticGpusOutput, error) { - if params == nil { - params = &DescribeElasticGpusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeElasticGpus", params, optFns, c.addOperationDescribeElasticGpusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeElasticGpusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeElasticGpusInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Elastic Graphics accelerator IDs. - ElasticGpuIds []string - - // The filters. - // - availability-zone - The Availability Zone in which the Elastic Graphics - // accelerator resides. - // - elastic-gpu-health - The status of the Elastic Graphics accelerator ( OK | - // IMPAIRED ). - // - elastic-gpu-state - The state of the Elastic Graphics accelerator ( ATTACHED - // ). - // - elastic-gpu-type - The type of Elastic Graphics accelerator; for example, - // eg1.medium . - // - instance-id - The ID of the instance to which the Elastic Graphics - // accelerator is associated. - Filters []types.Filter - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 5 and 1000. - MaxResults *int32 - - // The token to request the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeElasticGpusOutput struct { - - // Information about the Elastic Graphics accelerators. - ElasticGpuSet []types.ElasticGpus - - // The total number of items to return. If the total number of items available is - // more than the value specified in max-items then a Next-Token will be provided in - // the output that you can use to resume pagination. - MaxResults *int32 - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeElasticGpusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeElasticGpus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeElasticGpus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeElasticGpus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeElasticGpus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeElasticGpus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeElasticGpus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportImageTasks.go deleted file mode 100644 index 2a90768ca..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportImageTasks.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified export image tasks or all of your export image tasks. -func (c *Client) DescribeExportImageTasks(ctx context.Context, params *DescribeExportImageTasksInput, optFns ...func(*Options)) (*DescribeExportImageTasksOutput, error) { - if params == nil { - params = &DescribeExportImageTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeExportImageTasks", params, optFns, c.addOperationDescribeExportImageTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeExportImageTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeExportImageTasksInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of the export image tasks. - ExportImageTaskIds []string - - // Filter tasks using the task-state filter and one of the following values: active - // , completed , deleting , or deleted . - Filters []types.Filter - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // A token that indicates the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeExportImageTasksOutput struct { - - // Information about the export image tasks. - ExportImageTasks []types.ExportImageTask - - // The token to use to get the next page of results. This value is null when there - // are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeExportImageTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeExportImageTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeExportImageTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeExportImageTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportImageTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeExportImageTasksAPIClient is a client that implements the -// DescribeExportImageTasks operation. -type DescribeExportImageTasksAPIClient interface { - DescribeExportImageTasks(context.Context, *DescribeExportImageTasksInput, ...func(*Options)) (*DescribeExportImageTasksOutput, error) -} - -var _ DescribeExportImageTasksAPIClient = (*Client)(nil) - -// DescribeExportImageTasksPaginatorOptions is the paginator options for -// DescribeExportImageTasks -type DescribeExportImageTasksPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeExportImageTasksPaginator is a paginator for DescribeExportImageTasks -type DescribeExportImageTasksPaginator struct { - options DescribeExportImageTasksPaginatorOptions - client DescribeExportImageTasksAPIClient - params *DescribeExportImageTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeExportImageTasksPaginator returns a new -// DescribeExportImageTasksPaginator -func NewDescribeExportImageTasksPaginator(client DescribeExportImageTasksAPIClient, params *DescribeExportImageTasksInput, optFns ...func(*DescribeExportImageTasksPaginatorOptions)) *DescribeExportImageTasksPaginator { - if params == nil { - params = &DescribeExportImageTasksInput{} - } - - options := DescribeExportImageTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeExportImageTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeExportImageTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeExportImageTasks page. -func (p *DescribeExportImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeExportImageTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeExportImageTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeExportImageTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeExportImageTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go deleted file mode 100644 index d33938bd7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeExportTasks.go +++ /dev/null @@ -1,525 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the specified export instance tasks or all of your export instance -// tasks. -func (c *Client) DescribeExportTasks(ctx context.Context, params *DescribeExportTasksInput, optFns ...func(*Options)) (*DescribeExportTasksOutput, error) { - if params == nil { - params = &DescribeExportTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeExportTasks", params, optFns, c.addOperationDescribeExportTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeExportTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeExportTasksInput struct { - - // The export task IDs. - ExportTaskIds []string - - // the filters for the export tasks. - Filters []types.Filter - - noSmithyDocumentSerde -} - -type DescribeExportTasksOutput struct { - - // Information about the export tasks. - ExportTasks []types.ExportTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeExportTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeExportTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeExportTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeExportTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeExportTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeExportTasksAPIClient is a client that implements the -// DescribeExportTasks operation. -type DescribeExportTasksAPIClient interface { - DescribeExportTasks(context.Context, *DescribeExportTasksInput, ...func(*Options)) (*DescribeExportTasksOutput, error) -} - -var _ DescribeExportTasksAPIClient = (*Client)(nil) - -// ExportTaskCancelledWaiterOptions are waiter options for -// ExportTaskCancelledWaiter -type ExportTaskCancelledWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ExportTaskCancelledWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ExportTaskCancelledWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeExportTasksInput, *DescribeExportTasksOutput, error) (bool, error) -} - -// ExportTaskCancelledWaiter defines the waiters for ExportTaskCancelled -type ExportTaskCancelledWaiter struct { - client DescribeExportTasksAPIClient - - options ExportTaskCancelledWaiterOptions -} - -// NewExportTaskCancelledWaiter constructs a ExportTaskCancelledWaiter. -func NewExportTaskCancelledWaiter(client DescribeExportTasksAPIClient, optFns ...func(*ExportTaskCancelledWaiterOptions)) *ExportTaskCancelledWaiter { - options := ExportTaskCancelledWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = exportTaskCancelledStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ExportTaskCancelledWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ExportTaskCancelled waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *ExportTaskCancelledWaiter) Wait(ctx context.Context, params *DescribeExportTasksInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCancelledWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ExportTaskCancelled waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *ExportTaskCancelledWaiter) WaitForOutput(ctx context.Context, params *DescribeExportTasksInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCancelledWaiterOptions)) (*DescribeExportTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeExportTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ExportTaskCancelled waiter") -} - -func exportTaskCancelledStateRetryable(ctx context.Context, input *DescribeExportTasksInput, output *DescribeExportTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("ExportTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "cancelled" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ExportTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ExportTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -// ExportTaskCompletedWaiterOptions are waiter options for -// ExportTaskCompletedWaiter -type ExportTaskCompletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ExportTaskCompletedWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ExportTaskCompletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeExportTasksInput, *DescribeExportTasksOutput, error) (bool, error) -} - -// ExportTaskCompletedWaiter defines the waiters for ExportTaskCompleted -type ExportTaskCompletedWaiter struct { - client DescribeExportTasksAPIClient - - options ExportTaskCompletedWaiterOptions -} - -// NewExportTaskCompletedWaiter constructs a ExportTaskCompletedWaiter. -func NewExportTaskCompletedWaiter(client DescribeExportTasksAPIClient, optFns ...func(*ExportTaskCompletedWaiterOptions)) *ExportTaskCompletedWaiter { - options := ExportTaskCompletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = exportTaskCompletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ExportTaskCompletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ExportTaskCompleted waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *ExportTaskCompletedWaiter) Wait(ctx context.Context, params *DescribeExportTasksInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCompletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ExportTaskCompleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *ExportTaskCompletedWaiter) WaitForOutput(ctx context.Context, params *DescribeExportTasksInput, maxWaitDur time.Duration, optFns ...func(*ExportTaskCompletedWaiterOptions)) (*DescribeExportTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeExportTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ExportTaskCompleted waiter") -} - -func exportTaskCompletedStateRetryable(ctx context.Context, input *DescribeExportTasksInput, output *DescribeExportTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("ExportTasks[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ExportTaskState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ExportTaskState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeExportTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeExportTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastLaunchImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastLaunchImages.go deleted file mode 100644 index 1a8bb0cab..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastLaunchImages.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describe details for Windows AMIs that are configured for Windows fast launch. -func (c *Client) DescribeFastLaunchImages(ctx context.Context, params *DescribeFastLaunchImagesInput, optFns ...func(*Options)) (*DescribeFastLaunchImagesOutput, error) { - if params == nil { - params = &DescribeFastLaunchImagesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFastLaunchImages", params, optFns, c.addOperationDescribeFastLaunchImagesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFastLaunchImagesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFastLaunchImagesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Use the following filters to streamline results. - // - resource-type - The resource type for pre-provisioning. - // - owner-id - The owner ID for the pre-provisioning resource. - // - state - The current state of fast launching for the Windows AMI. - Filters []types.Filter - - // Specify one or more Windows AMI image IDs for the request. - ImageIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeFastLaunchImagesOutput struct { - - // A collection of details about the fast-launch enabled Windows images that meet - // the requested criteria. - FastLaunchImages []types.DescribeFastLaunchImagesSuccessItem - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFastLaunchImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFastLaunchImages{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFastLaunchImages{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFastLaunchImages"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFastLaunchImages(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeFastLaunchImagesAPIClient is a client that implements the -// DescribeFastLaunchImages operation. -type DescribeFastLaunchImagesAPIClient interface { - DescribeFastLaunchImages(context.Context, *DescribeFastLaunchImagesInput, ...func(*Options)) (*DescribeFastLaunchImagesOutput, error) -} - -var _ DescribeFastLaunchImagesAPIClient = (*Client)(nil) - -// DescribeFastLaunchImagesPaginatorOptions is the paginator options for -// DescribeFastLaunchImages -type DescribeFastLaunchImagesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeFastLaunchImagesPaginator is a paginator for DescribeFastLaunchImages -type DescribeFastLaunchImagesPaginator struct { - options DescribeFastLaunchImagesPaginatorOptions - client DescribeFastLaunchImagesAPIClient - params *DescribeFastLaunchImagesInput - nextToken *string - firstPage bool -} - -// NewDescribeFastLaunchImagesPaginator returns a new -// DescribeFastLaunchImagesPaginator -func NewDescribeFastLaunchImagesPaginator(client DescribeFastLaunchImagesAPIClient, params *DescribeFastLaunchImagesInput, optFns ...func(*DescribeFastLaunchImagesPaginatorOptions)) *DescribeFastLaunchImagesPaginator { - if params == nil { - params = &DescribeFastLaunchImagesInput{} - } - - options := DescribeFastLaunchImagesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeFastLaunchImagesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeFastLaunchImagesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeFastLaunchImages page. -func (p *DescribeFastLaunchImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFastLaunchImagesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeFastLaunchImages(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeFastLaunchImages(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFastLaunchImages", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastSnapshotRestores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastSnapshotRestores.go deleted file mode 100644 index d06fe37c1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFastSnapshotRestores.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the state of fast snapshot restores for your snapshots. -func (c *Client) DescribeFastSnapshotRestores(ctx context.Context, params *DescribeFastSnapshotRestoresInput, optFns ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error) { - if params == nil { - params = &DescribeFastSnapshotRestoresInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFastSnapshotRestores", params, optFns, c.addOperationDescribeFastSnapshotRestoresMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFastSnapshotRestoresOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFastSnapshotRestoresInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. The possible values are: - // - availability-zone : The Availability Zone of the snapshot. - // - owner-id : The ID of the Amazon Web Services account that enabled fast - // snapshot restore on the snapshot. - // - snapshot-id : The ID of the snapshot. - // - state : The state of fast snapshot restores for the snapshot ( enabling | - // optimizing | enabled | disabling | disabled ). - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeFastSnapshotRestoresOutput struct { - - // Information about the state of fast snapshot restores. - FastSnapshotRestores []types.DescribeFastSnapshotRestoreSuccessItem - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFastSnapshotRestoresMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFastSnapshotRestores{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFastSnapshotRestores{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFastSnapshotRestores"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFastSnapshotRestores(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeFastSnapshotRestoresAPIClient is a client that implements the -// DescribeFastSnapshotRestores operation. -type DescribeFastSnapshotRestoresAPIClient interface { - DescribeFastSnapshotRestores(context.Context, *DescribeFastSnapshotRestoresInput, ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error) -} - -var _ DescribeFastSnapshotRestoresAPIClient = (*Client)(nil) - -// DescribeFastSnapshotRestoresPaginatorOptions is the paginator options for -// DescribeFastSnapshotRestores -type DescribeFastSnapshotRestoresPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeFastSnapshotRestoresPaginator is a paginator for -// DescribeFastSnapshotRestores -type DescribeFastSnapshotRestoresPaginator struct { - options DescribeFastSnapshotRestoresPaginatorOptions - client DescribeFastSnapshotRestoresAPIClient - params *DescribeFastSnapshotRestoresInput - nextToken *string - firstPage bool -} - -// NewDescribeFastSnapshotRestoresPaginator returns a new -// DescribeFastSnapshotRestoresPaginator -func NewDescribeFastSnapshotRestoresPaginator(client DescribeFastSnapshotRestoresAPIClient, params *DescribeFastSnapshotRestoresInput, optFns ...func(*DescribeFastSnapshotRestoresPaginatorOptions)) *DescribeFastSnapshotRestoresPaginator { - if params == nil { - params = &DescribeFastSnapshotRestoresInput{} - } - - options := DescribeFastSnapshotRestoresPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeFastSnapshotRestoresPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeFastSnapshotRestoresPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeFastSnapshotRestores page. -func (p *DescribeFastSnapshotRestoresPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFastSnapshotRestoresOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeFastSnapshotRestores(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFastSnapshotRestores", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetHistory.go deleted file mode 100644 index a07b3ae26..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetHistory.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes the events for the specified EC2 Fleet during the specified time. EC2 -// Fleet events are delayed by up to 30 seconds before they can be described. This -// ensures that you can query by the last evaluated time and not miss a recorded -// event. EC2 Fleet events are available for 48 hours. For more information, see -// Monitor fleet events using Amazon EventBridge (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-monitor.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeFleetHistory(ctx context.Context, params *DescribeFleetHistoryInput, optFns ...func(*Options)) (*DescribeFleetHistoryOutput, error) { - if params == nil { - params = &DescribeFleetHistoryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFleetHistory", params, optFns, c.addOperationDescribeFleetHistoryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFleetHistoryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFleetHistoryInput struct { - - // The ID of the EC2 Fleet. - // - // This member is required. - FleetId *string - - // The start date and time for the events, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - // - // This member is required. - StartTime *time.Time - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The type of events to describe. By default, all events are described. - EventType types.FleetEventType - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeFleetHistoryOutput struct { - - // The ID of the EC Fleet. - FleetId *string - - // Information about the events in the history of the EC2 Fleet. - HistoryRecords []types.HistoryRecordEntry - - // The last date and time for the events, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved. If nextToken - // indicates that there are more items, this value is not present. - LastEvaluatedTime *time.Time - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The start date and time for the events, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFleetHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFleetHistory{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFleetHistory{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFleetHistory"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeFleetHistoryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetHistory(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeFleetHistory(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFleetHistory", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetInstances.go deleted file mode 100644 index 61daedb3b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleetInstances.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the running instances for the specified EC2 Fleet. For more -// information, see Monitor your EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#monitor-ec2-fleet) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeFleetInstances(ctx context.Context, params *DescribeFleetInstancesInput, optFns ...func(*Options)) (*DescribeFleetInstancesOutput, error) { - if params == nil { - params = &DescribeFleetInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFleetInstances", params, optFns, c.addOperationDescribeFleetInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFleetInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFleetInstancesInput struct { - - // The ID of the EC2 Fleet. - // - // This member is required. - FleetId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - instance-type - The instance type. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeFleetInstancesOutput struct { - - // The running instances. This list is refreshed periodically and might be out of - // date. - ActiveInstances []types.ActiveInstance - - // The ID of the EC2 Fleet. - FleetId *string - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFleetInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFleetInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFleetInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFleetInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeFleetInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleetInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeFleetInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFleetInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleets.go deleted file mode 100644 index 60d231ce9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFleets.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified EC2 Fleets or all of your EC2 Fleets. For more -// information, see Monitor your EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#monitor-ec2-fleet) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeFleets(ctx context.Context, params *DescribeFleetsInput, optFns ...func(*Options)) (*DescribeFleetsOutput, error) { - if params == nil { - params = &DescribeFleetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFleets", params, optFns, c.addOperationDescribeFleetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFleetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFleetsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - activity-status - The progress of the EC2 Fleet ( error | - // pending-fulfillment | pending-termination | fulfilled ). - // - excess-capacity-termination-policy - Indicates whether to terminate running - // instances if the target capacity is decreased below the current EC2 Fleet size ( - // true | false ). - // - fleet-state - The state of the EC2 Fleet ( submitted | active | deleted | - // failed | deleted-running | deleted-terminating | modifying ). - // - replace-unhealthy-instances - Indicates whether EC2 Fleet should replace - // unhealthy instances ( true | false ). - // - type - The type of request ( instant | request | maintain ). - Filters []types.Filter - - // The IDs of the EC2 Fleets. If a fleet is of type instant , you must specify the - // fleet ID, otherwise it does not appear in the response. - FleetIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeFleetsOutput struct { - - // Information about the EC2 Fleets. - Fleets []types.FleetData - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFleetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFleets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFleets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFleets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFleets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeFleetsAPIClient is a client that implements the DescribeFleets -// operation. -type DescribeFleetsAPIClient interface { - DescribeFleets(context.Context, *DescribeFleetsInput, ...func(*Options)) (*DescribeFleetsOutput, error) -} - -var _ DescribeFleetsAPIClient = (*Client)(nil) - -// DescribeFleetsPaginatorOptions is the paginator options for DescribeFleets -type DescribeFleetsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeFleetsPaginator is a paginator for DescribeFleets -type DescribeFleetsPaginator struct { - options DescribeFleetsPaginatorOptions - client DescribeFleetsAPIClient - params *DescribeFleetsInput - nextToken *string - firstPage bool -} - -// NewDescribeFleetsPaginator returns a new DescribeFleetsPaginator -func NewDescribeFleetsPaginator(client DescribeFleetsAPIClient, params *DescribeFleetsInput, optFns ...func(*DescribeFleetsPaginatorOptions)) *DescribeFleetsPaginator { - if params == nil { - params = &DescribeFleetsInput{} - } - - options := DescribeFleetsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeFleetsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeFleetsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeFleets page. -func (p *DescribeFleetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFleetsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeFleets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeFleets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFleets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFlowLogs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFlowLogs.go deleted file mode 100644 index ce4df6266..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFlowLogs.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more flow logs. To view the published flow log records, you -// must view the log destination. For example, the CloudWatch Logs log group, the -// Amazon S3 bucket, or the Kinesis Data Firehose delivery stream. -func (c *Client) DescribeFlowLogs(ctx context.Context, params *DescribeFlowLogsInput, optFns ...func(*Options)) (*DescribeFlowLogsOutput, error) { - if params == nil { - params = &DescribeFlowLogsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFlowLogs", params, optFns, c.addOperationDescribeFlowLogsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFlowLogsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFlowLogsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - deliver-log-status - The status of the logs delivery ( SUCCESS | FAILED ). - // - log-destination-type - The type of destination for the flow log data ( - // cloud-watch-logs | s3 | kinesis-data-firehose ). - // - flow-log-id - The ID of the flow log. - // - log-group-name - The name of the log group. - // - resource-id - The ID of the VPC, subnet, or network interface. - // - traffic-type - The type of traffic ( ACCEPT | REJECT | ALL ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filter []types.Filter - - // One or more flow log IDs. Constraint: Maximum of 1000 flow log IDs. - FlowLogIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to request the next page of items. Pagination continues from the end - // of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeFlowLogsOutput struct { - - // Information about the flow logs. - FlowLogs []types.FlowLog - - // The token to request the next page of items. This value is null when there are - // no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFlowLogsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFlowLogs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFlowLogs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFlowLogs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFlowLogs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeFlowLogsAPIClient is a client that implements the DescribeFlowLogs -// operation. -type DescribeFlowLogsAPIClient interface { - DescribeFlowLogs(context.Context, *DescribeFlowLogsInput, ...func(*Options)) (*DescribeFlowLogsOutput, error) -} - -var _ DescribeFlowLogsAPIClient = (*Client)(nil) - -// DescribeFlowLogsPaginatorOptions is the paginator options for DescribeFlowLogs -type DescribeFlowLogsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeFlowLogsPaginator is a paginator for DescribeFlowLogs -type DescribeFlowLogsPaginator struct { - options DescribeFlowLogsPaginatorOptions - client DescribeFlowLogsAPIClient - params *DescribeFlowLogsInput - nextToken *string - firstPage bool -} - -// NewDescribeFlowLogsPaginator returns a new DescribeFlowLogsPaginator -func NewDescribeFlowLogsPaginator(client DescribeFlowLogsAPIClient, params *DescribeFlowLogsInput, optFns ...func(*DescribeFlowLogsPaginatorOptions)) *DescribeFlowLogsPaginator { - if params == nil { - params = &DescribeFlowLogsInput{} - } - - options := DescribeFlowLogsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeFlowLogsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeFlowLogsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeFlowLogs page. -func (p *DescribeFlowLogsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFlowLogsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeFlowLogs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeFlowLogs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFlowLogs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImageAttribute.go deleted file mode 100644 index 998ed71d8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImageAttribute.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified attribute of the specified Amazon FPGA Image (AFI). -func (c *Client) DescribeFpgaImageAttribute(ctx context.Context, params *DescribeFpgaImageAttributeInput, optFns ...func(*Options)) (*DescribeFpgaImageAttributeOutput, error) { - if params == nil { - params = &DescribeFpgaImageAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFpgaImageAttribute", params, optFns, c.addOperationDescribeFpgaImageAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFpgaImageAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFpgaImageAttributeInput struct { - - // The AFI attribute. - // - // This member is required. - Attribute types.FpgaImageAttributeName - - // The ID of the AFI. - // - // This member is required. - FpgaImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeFpgaImageAttributeOutput struct { - - // Information about the attribute. - FpgaImageAttribute *types.FpgaImageAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFpgaImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFpgaImageAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFpgaImageAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFpgaImageAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeFpgaImageAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFpgaImageAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeFpgaImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFpgaImageAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImages.go deleted file mode 100644 index a3b2af1fa..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeFpgaImages.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the Amazon FPGA Images (AFIs) available to you. These include public -// AFIs, private AFIs that you own, and AFIs owned by other Amazon Web Services -// accounts for which you have load permissions. -func (c *Client) DescribeFpgaImages(ctx context.Context, params *DescribeFpgaImagesInput, optFns ...func(*Options)) (*DescribeFpgaImagesOutput, error) { - if params == nil { - params = &DescribeFpgaImagesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeFpgaImages", params, optFns, c.addOperationDescribeFpgaImagesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeFpgaImagesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeFpgaImagesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - create-time - The creation time of the AFI. - // - fpga-image-id - The FPGA image identifier (AFI ID). - // - fpga-image-global-id - The global FPGA image identifier (AGFI ID). - // - name - The name of the AFI. - // - owner-id - The Amazon Web Services account ID of the AFI owner. - // - product-code - The product code. - // - shell-version - The version of the Amazon Web Services Shell that was used - // to create the bitstream. - // - state - The state of the AFI ( pending | failed | available | unavailable ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - update-time - The time of the most recent update. - Filters []types.Filter - - // The AFI IDs. - FpgaImageIds []string - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - // Filters the AFI by owner. Specify an Amazon Web Services account ID, self - // (owner is the sender of the request), or an Amazon Web Services owner alias - // (valid values are amazon | aws-marketplace ). - Owners []string - - noSmithyDocumentSerde -} - -type DescribeFpgaImagesOutput struct { - - // Information about the FPGA images. - FpgaImages []types.FpgaImage - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeFpgaImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeFpgaImages{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeFpgaImages{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFpgaImages"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFpgaImages(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeFpgaImagesAPIClient is a client that implements the DescribeFpgaImages -// operation. -type DescribeFpgaImagesAPIClient interface { - DescribeFpgaImages(context.Context, *DescribeFpgaImagesInput, ...func(*Options)) (*DescribeFpgaImagesOutput, error) -} - -var _ DescribeFpgaImagesAPIClient = (*Client)(nil) - -// DescribeFpgaImagesPaginatorOptions is the paginator options for -// DescribeFpgaImages -type DescribeFpgaImagesPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeFpgaImagesPaginator is a paginator for DescribeFpgaImages -type DescribeFpgaImagesPaginator struct { - options DescribeFpgaImagesPaginatorOptions - client DescribeFpgaImagesAPIClient - params *DescribeFpgaImagesInput - nextToken *string - firstPage bool -} - -// NewDescribeFpgaImagesPaginator returns a new DescribeFpgaImagesPaginator -func NewDescribeFpgaImagesPaginator(client DescribeFpgaImagesAPIClient, params *DescribeFpgaImagesInput, optFns ...func(*DescribeFpgaImagesPaginatorOptions)) *DescribeFpgaImagesPaginator { - if params == nil { - params = &DescribeFpgaImagesInput{} - } - - options := DescribeFpgaImagesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeFpgaImagesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeFpgaImagesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeFpgaImages page. -func (p *DescribeFpgaImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFpgaImagesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeFpgaImages(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeFpgaImages(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeFpgaImages", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservationOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservationOfferings.go deleted file mode 100644 index 32bd98cc7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservationOfferings.go +++ /dev/null @@ -1,267 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the Dedicated Host reservations that are available to purchase. The -// results describe all of the Dedicated Host reservation offerings, including -// offerings that might not match the instance family and Region of your Dedicated -// Hosts. When purchasing an offering, ensure that the instance family and Region -// of the offering matches that of the Dedicated Hosts with which it is to be -// associated. For more information about supported instance types, see Dedicated -// Hosts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeHostReservationOfferings(ctx context.Context, params *DescribeHostReservationOfferingsInput, optFns ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error) { - if params == nil { - params = &DescribeHostReservationOfferingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeHostReservationOfferings", params, optFns, c.addOperationDescribeHostReservationOfferingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeHostReservationOfferingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeHostReservationOfferingsInput struct { - - // The filters. - // - instance-family - The instance family of the offering (for example, m4 ). - // - payment-option - The payment option ( NoUpfront | PartialUpfront | - // AllUpfront ). - Filter []types.Filter - - // This is the maximum duration of the reservation to purchase, specified in - // seconds. Reservations are available in one-year and three-year terms. The number - // of seconds specified must be the number of seconds in a year (365x24x60x60) - // times one of the supported durations (1 or 3). For example, specify 94608000 for - // three years. - MaxDuration *int32 - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given a - // larger value than 500, you receive an error. - MaxResults *int32 - - // This is the minimum duration of the reservation you'd like to purchase, - // specified in seconds. Reservations are available in one-year and three-year - // terms. The number of seconds specified must be the number of seconds in a year - // (365x24x60x60) times one of the supported durations (1 or 3). For example, - // specify 31536000 for one year. - MinDuration *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - // The ID of the reservation offering. - OfferingId *string - - noSmithyDocumentSerde -} - -type DescribeHostReservationOfferingsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the offerings. - OfferingSet []types.HostOffering - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeHostReservationOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeHostReservationOfferings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeHostReservationOfferings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeHostReservationOfferings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHostReservationOfferings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeHostReservationOfferingsAPIClient is a client that implements the -// DescribeHostReservationOfferings operation. -type DescribeHostReservationOfferingsAPIClient interface { - DescribeHostReservationOfferings(context.Context, *DescribeHostReservationOfferingsInput, ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error) -} - -var _ DescribeHostReservationOfferingsAPIClient = (*Client)(nil) - -// DescribeHostReservationOfferingsPaginatorOptions is the paginator options for -// DescribeHostReservationOfferings -type DescribeHostReservationOfferingsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given a - // larger value than 500, you receive an error. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeHostReservationOfferingsPaginator is a paginator for -// DescribeHostReservationOfferings -type DescribeHostReservationOfferingsPaginator struct { - options DescribeHostReservationOfferingsPaginatorOptions - client DescribeHostReservationOfferingsAPIClient - params *DescribeHostReservationOfferingsInput - nextToken *string - firstPage bool -} - -// NewDescribeHostReservationOfferingsPaginator returns a new -// DescribeHostReservationOfferingsPaginator -func NewDescribeHostReservationOfferingsPaginator(client DescribeHostReservationOfferingsAPIClient, params *DescribeHostReservationOfferingsInput, optFns ...func(*DescribeHostReservationOfferingsPaginatorOptions)) *DescribeHostReservationOfferingsPaginator { - if params == nil { - params = &DescribeHostReservationOfferingsInput{} - } - - options := DescribeHostReservationOfferingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeHostReservationOfferingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeHostReservationOfferingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeHostReservationOfferings page. -func (p *DescribeHostReservationOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeHostReservationOfferingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeHostReservationOfferings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeHostReservationOfferings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeHostReservationOfferings", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservations.go deleted file mode 100644 index f690dce75..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHostReservations.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes reservations that are associated with Dedicated Hosts in your account. -func (c *Client) DescribeHostReservations(ctx context.Context, params *DescribeHostReservationsInput, optFns ...func(*Options)) (*DescribeHostReservationsOutput, error) { - if params == nil { - params = &DescribeHostReservationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeHostReservations", params, optFns, c.addOperationDescribeHostReservationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeHostReservationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeHostReservationsInput struct { - - // The filters. - // - instance-family - The instance family (for example, m4 ). - // - payment-option - The payment option ( NoUpfront | PartialUpfront | - // AllUpfront ). - // - state - The state of the reservation ( payment-pending | payment-failed | - // active | retired ). - // - tag: - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filter []types.Filter - - // The host reservation IDs. - HostReservationIdSet []string - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given a - // larger value than 500, you receive an error. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeHostReservationsOutput struct { - - // Details about the reservation's configuration. - HostReservationSet []types.HostReservation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeHostReservationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeHostReservations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeHostReservations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeHostReservations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHostReservations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeHostReservationsAPIClient is a client that implements the -// DescribeHostReservations operation. -type DescribeHostReservationsAPIClient interface { - DescribeHostReservations(context.Context, *DescribeHostReservationsInput, ...func(*Options)) (*DescribeHostReservationsOutput, error) -} - -var _ DescribeHostReservationsAPIClient = (*Client)(nil) - -// DescribeHostReservationsPaginatorOptions is the paginator options for -// DescribeHostReservations -type DescribeHostReservationsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given a - // larger value than 500, you receive an error. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeHostReservationsPaginator is a paginator for DescribeHostReservations -type DescribeHostReservationsPaginator struct { - options DescribeHostReservationsPaginatorOptions - client DescribeHostReservationsAPIClient - params *DescribeHostReservationsInput - nextToken *string - firstPage bool -} - -// NewDescribeHostReservationsPaginator returns a new -// DescribeHostReservationsPaginator -func NewDescribeHostReservationsPaginator(client DescribeHostReservationsAPIClient, params *DescribeHostReservationsInput, optFns ...func(*DescribeHostReservationsPaginatorOptions)) *DescribeHostReservationsPaginator { - if params == nil { - params = &DescribeHostReservationsInput{} - } - - options := DescribeHostReservationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeHostReservationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeHostReservationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeHostReservations page. -func (p *DescribeHostReservationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeHostReservationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeHostReservations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeHostReservations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeHostReservations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHosts.go deleted file mode 100644 index 680ea44f8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeHosts.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Dedicated Hosts or all your Dedicated Hosts. The -// results describe only the Dedicated Hosts in the Region you're currently using. -// All listed instances consume capacity on your Dedicated Host. Dedicated Hosts -// that have recently been released are listed with the state released . -func (c *Client) DescribeHosts(ctx context.Context, params *DescribeHostsInput, optFns ...func(*Options)) (*DescribeHostsOutput, error) { - if params == nil { - params = &DescribeHostsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeHosts", params, optFns, c.addOperationDescribeHostsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeHostsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeHostsInput struct { - - // The filters. - // - auto-placement - Whether auto-placement is enabled or disabled ( on | off ). - // - availability-zone - The Availability Zone of the host. - // - client-token - The idempotency token that you provided when you allocated - // the host. - // - host-reservation-id - The ID of the reservation assigned to this host. - // - instance-type - The instance type size that the Dedicated Host is configured - // to support. - // - state - The allocation state of the Dedicated Host ( available | - // under-assessment | permanent-failure | released | released-permanent-failure - // ). - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filter []types.Filter - - // The IDs of the Dedicated Hosts. The IDs are used for targeted instance launches. - HostIds []string - - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given a - // larger value than 500, you receive an error. You cannot specify this parameter - // and the host IDs parameter in the same request. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeHostsOutput struct { - - // Information about the Dedicated Hosts. - Hosts []types.Host - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeHostsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeHosts{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeHosts{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeHosts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeHosts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeHostsAPIClient is a client that implements the DescribeHosts operation. -type DescribeHostsAPIClient interface { - DescribeHosts(context.Context, *DescribeHostsInput, ...func(*Options)) (*DescribeHostsOutput, error) -} - -var _ DescribeHostsAPIClient = (*Client)(nil) - -// DescribeHostsPaginatorOptions is the paginator options for DescribeHosts -type DescribeHostsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results can be seen by sending another request with the returned - // nextToken value. This value can be between 5 and 500. If maxResults is given a - // larger value than 500, you receive an error. You cannot specify this parameter - // and the host IDs parameter in the same request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeHostsPaginator is a paginator for DescribeHosts -type DescribeHostsPaginator struct { - options DescribeHostsPaginatorOptions - client DescribeHostsAPIClient - params *DescribeHostsInput - nextToken *string - firstPage bool -} - -// NewDescribeHostsPaginator returns a new DescribeHostsPaginator -func NewDescribeHostsPaginator(client DescribeHostsAPIClient, params *DescribeHostsInput, optFns ...func(*DescribeHostsPaginatorOptions)) *DescribeHostsPaginator { - if params == nil { - params = &DescribeHostsInput{} - } - - options := DescribeHostsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeHostsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeHostsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeHosts page. -func (p *DescribeHostsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeHostsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeHosts(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeHosts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeHosts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go deleted file mode 100644 index d3ebd62c3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIamInstanceProfileAssociations.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your IAM instance profile associations. -func (c *Client) DescribeIamInstanceProfileAssociations(ctx context.Context, params *DescribeIamInstanceProfileAssociationsInput, optFns ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error) { - if params == nil { - params = &DescribeIamInstanceProfileAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIamInstanceProfileAssociations", params, optFns, c.addOperationDescribeIamInstanceProfileAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIamInstanceProfileAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIamInstanceProfileAssociationsInput struct { - - // The IAM instance profile associations. - AssociationIds []string - - // The filters. - // - instance-id - The ID of the instance. - // - state - The state of the association ( associating | associated | - // disassociating ). - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIamInstanceProfileAssociationsOutput struct { - - // Information about the IAM instance profile associations. - IamInstanceProfileAssociations []types.IamInstanceProfileAssociation - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIamInstanceProfileAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIamInstanceProfileAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIamInstanceProfileAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIamInstanceProfileAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIamInstanceProfileAssociationsAPIClient is a client that implements the -// DescribeIamInstanceProfileAssociations operation. -type DescribeIamInstanceProfileAssociationsAPIClient interface { - DescribeIamInstanceProfileAssociations(context.Context, *DescribeIamInstanceProfileAssociationsInput, ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error) -} - -var _ DescribeIamInstanceProfileAssociationsAPIClient = (*Client)(nil) - -// DescribeIamInstanceProfileAssociationsPaginatorOptions is the paginator options -// for DescribeIamInstanceProfileAssociations -type DescribeIamInstanceProfileAssociationsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIamInstanceProfileAssociationsPaginator is a paginator for -// DescribeIamInstanceProfileAssociations -type DescribeIamInstanceProfileAssociationsPaginator struct { - options DescribeIamInstanceProfileAssociationsPaginatorOptions - client DescribeIamInstanceProfileAssociationsAPIClient - params *DescribeIamInstanceProfileAssociationsInput - nextToken *string - firstPage bool -} - -// NewDescribeIamInstanceProfileAssociationsPaginator returns a new -// DescribeIamInstanceProfileAssociationsPaginator -func NewDescribeIamInstanceProfileAssociationsPaginator(client DescribeIamInstanceProfileAssociationsAPIClient, params *DescribeIamInstanceProfileAssociationsInput, optFns ...func(*DescribeIamInstanceProfileAssociationsPaginatorOptions)) *DescribeIamInstanceProfileAssociationsPaginator { - if params == nil { - params = &DescribeIamInstanceProfileAssociationsInput{} - } - - options := DescribeIamInstanceProfileAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIamInstanceProfileAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIamInstanceProfileAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIamInstanceProfileAssociations page. -func (p *DescribeIamInstanceProfileAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIamInstanceProfileAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIamInstanceProfileAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIamInstanceProfileAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIamInstanceProfileAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdFormat.go deleted file mode 100644 index c0a505392..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdFormat.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the ID format settings for your resources on a per-Region basis, for -// example, to view which resource types are enabled for longer IDs. This request -// only returns information about resource types whose ID formats can be modified; -// it does not return information about other resource types. The following -// resource types support longer IDs: bundle | conversion-task | customer-gateway -// | dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | -// flow-log | image | import-task | instance | internet-gateway | network-acl | -// network-acl-association | network-interface | network-interface-attachment | -// prefix-list | reservation | route-table | route-table-association | -// security-group | snapshot | subnet | subnet-cidr-block-association | volume | -// vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | -// vpn-connection | vpn-gateway . These settings apply to the IAM user who makes -// the request; they do not apply to the entire Amazon Web Services account. By -// default, an IAM user defaults to the same settings as the root user, unless they -// explicitly override the settings by running the ModifyIdFormat command. -// Resources created with longer IDs are visible to all IAM users, regardless of -// these settings and provided that they have permission to use the relevant -// Describe command for the resource type. -func (c *Client) DescribeIdFormat(ctx context.Context, params *DescribeIdFormatInput, optFns ...func(*Options)) (*DescribeIdFormatOutput, error) { - if params == nil { - params = &DescribeIdFormatInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIdFormat", params, optFns, c.addOperationDescribeIdFormatMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIdFormatOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIdFormatInput struct { - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | - // image | import-task | instance | internet-gateway | network-acl | - // network-acl-association | network-interface | network-interface-attachment | - // prefix-list | reservation | route-table | route-table-association | - // security-group | snapshot | subnet | subnet-cidr-block-association | volume | - // vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | - // vpn-connection | vpn-gateway - Resource *string - - noSmithyDocumentSerde -} - -type DescribeIdFormatOutput struct { - - // Information about the ID format for the resource. - Statuses []types.IdFormat - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIdFormat{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIdFormat{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIdFormat"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIdFormat(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIdFormat", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdentityIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdentityIdFormat.go deleted file mode 100644 index 054f3f8c2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIdentityIdFormat.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the ID format settings for resources for the specified IAM user, IAM -// role, or root user. For example, you can view the resource types that are -// enabled for longer IDs. This request only returns information about resource -// types whose ID formats can be modified; it does not return information about -// other resource types. For more information, see Resource IDs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) -// in the Amazon Elastic Compute Cloud User Guide. The following resource types -// support longer IDs: bundle | conversion-task | customer-gateway | dhcp-options -// | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | -// image | import-task | instance | internet-gateway | network-acl | -// network-acl-association | network-interface | network-interface-attachment | -// prefix-list | reservation | route-table | route-table-association | -// security-group | snapshot | subnet | subnet-cidr-block-association | volume | -// vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | -// vpn-connection | vpn-gateway . These settings apply to the principal specified -// in the request. They do not apply to the principal that makes the request. -func (c *Client) DescribeIdentityIdFormat(ctx context.Context, params *DescribeIdentityIdFormatInput, optFns ...func(*Options)) (*DescribeIdentityIdFormatOutput, error) { - if params == nil { - params = &DescribeIdentityIdFormatInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIdentityIdFormat", params, optFns, c.addOperationDescribeIdentityIdFormatMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIdentityIdFormatOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIdentityIdFormatInput struct { - - // The ARN of the principal, which can be an IAM role, IAM user, or the root user. - // - // This member is required. - PrincipalArn *string - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | - // image | import-task | instance | internet-gateway | network-acl | - // network-acl-association | network-interface | network-interface-attachment | - // prefix-list | reservation | route-table | route-table-association | - // security-group | snapshot | subnet | subnet-cidr-block-association | volume | - // vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | - // vpn-connection | vpn-gateway - Resource *string - - noSmithyDocumentSerde -} - -type DescribeIdentityIdFormatOutput struct { - - // Information about the ID format for the resources. - Statuses []types.IdFormat - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIdentityIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIdentityIdFormat{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIdentityIdFormat{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIdentityIdFormat"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeIdentityIdFormatValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIdentityIdFormat(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeIdentityIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIdentityIdFormat", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go deleted file mode 100644 index 75d635a49..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImageAttribute.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified attribute of the specified AMI. You can specify only -// one attribute at a time. -func (c *Client) DescribeImageAttribute(ctx context.Context, params *DescribeImageAttributeInput, optFns ...func(*Options)) (*DescribeImageAttributeOutput, error) { - if params == nil { - params = &DescribeImageAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeImageAttribute", params, optFns, c.addOperationDescribeImageAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeImageAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeImageAttribute. -type DescribeImageAttributeInput struct { - - // The AMI attribute. Note: The blockDeviceMapping attribute is deprecated. Using - // this attribute returns the Client.AuthFailure error. To get information about - // the block device mappings for an AMI, use the DescribeImages action. - // - // This member is required. - Attribute types.ImageAttributeName - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Describes an image attribute. -type DescribeImageAttributeOutput struct { - - // The block device mapping entries. - BlockDeviceMappings []types.BlockDeviceMapping - - // The boot mode. - BootMode *types.AttributeValue - - // A description for the AMI. - Description *types.AttributeValue - - // The ID of the AMI. - ImageId *string - - // If v2.0 , it indicates that IMDSv2 is specified in the AMI. Instances launched - // from this AMI will have HttpTokens automatically set to required so that, by - // default, the instance requires that IMDSv2 is used when requesting instance - // metadata. In addition, HttpPutResponseHopLimit is set to 2 . For more - // information, see Configure the AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration) - // in the Amazon EC2 User Guide. - ImdsSupport *types.AttributeValue - - // The kernel ID. - KernelId *types.AttributeValue - - // The date and time, in ISO 8601 date-time format (http://www.iso.org/iso/iso8601) - // , when the AMI was last used to launch an EC2 instance. When the AMI is used to - // launch an instance, there is a 24-hour delay before that usage is reported. - // lastLaunchedTime data is available starting April 2017. - LastLaunchedTime *types.AttributeValue - - // The launch permissions. - LaunchPermissions []types.LaunchPermission - - // The product codes. - ProductCodes []types.ProductCode - - // The RAM disk ID. - RamdiskId *types.AttributeValue - - // Indicates whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *types.AttributeValue - - // If the image is configured for NitroTPM support, the value is v2.0 . - TpmSupport *types.AttributeValue - - // Base64 representation of the non-volatile UEFI variable store. To retrieve the - // UEFI data, use the GetInstanceUefiData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData) - // command. You can inspect and modify the UEFI data by using the python-uefivars - // tool (https://github.com/awslabs/python-uefivars) on GitHub. For more - // information, see UEFI Secure Boot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html) - // in the Amazon EC2 User Guide. - UefiData *types.AttributeValue - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImageAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImageAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeImageAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeImageAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImageAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeImageAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go deleted file mode 100644 index 1f57ec7ac..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImages.go +++ /dev/null @@ -1,745 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "strconv" - "time" -) - -// Describes the specified images (AMIs, AKIs, and ARIs) available to you or all -// of the images available to you. The images available to you include public -// images, private images that you own, and private images owned by other Amazon -// Web Services accounts for which you have explicit launch permissions. Recently -// deregistered images appear in the returned results for a short interval and then -// return empty results. After all instances that reference a deregistered AMI are -// terminated, specifying the ID of the image will eventually return an error -// indicating that the AMI ID cannot be found. -func (c *Client) DescribeImages(ctx context.Context, params *DescribeImagesInput, optFns ...func(*Options)) (*DescribeImagesOutput, error) { - if params == nil { - params = &DescribeImagesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeImages", params, optFns, c.addOperationDescribeImagesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeImagesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeImagesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Scopes the images by users with explicit launch permissions. Specify an Amazon - // Web Services account ID, self (the sender of the request), or all (public - // AMIs). - // - If you specify an Amazon Web Services account ID that is not your own, only - // AMIs shared with that specific Amazon Web Services account ID are returned. - // However, AMIs that are shared with the account’s organization or organizational - // unit (OU) are not returned. - // - If you specify self or your own Amazon Web Services account ID, AMIs shared - // with your account are returned. In addition, AMIs that are shared with the - // organization or OU of which you are member are also returned. - // - If you specify all , all public AMIs are returned. - ExecutableUsers []string - - // The filters. - // - architecture - The image architecture ( i386 | x86_64 | arm64 | x86_64_mac | - // arm64_mac ). - // - block-device-mapping.delete-on-termination - A Boolean value that indicates - // whether the Amazon EBS volume is deleted on instance termination. - // - block-device-mapping.device-name - The device name specified in the block - // device mapping (for example, /dev/sdh or xvdh ). - // - block-device-mapping.snapshot-id - The ID of the snapshot used for the - // Amazon EBS volume. - // - block-device-mapping.volume-size - The volume size of the Amazon EBS volume, - // in GiB. - // - block-device-mapping.volume-type - The volume type of the Amazon EBS volume ( - // io1 | io2 | gp2 | gp3 | sc1 | st1 | standard ). - // - block-device-mapping.encrypted - A Boolean that indicates whether the Amazon - // EBS volume is encrypted. - // - creation-date - The time when the image was created, in the ISO 8601 format - // in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, - // 2021-09-29T11:04:43.305Z . You can use a wildcard ( * ), for example, - // 2021-09-29T* , which matches an entire day. - // - description - The description of the image (provided during image creation). - // - ena-support - A Boolean that indicates whether enhanced networking with ENA - // is enabled. - // - hypervisor - The hypervisor type ( ovm | xen ). - // - image-id - The ID of the image. - // - image-type - The image type ( machine | kernel | ramdisk ). - // - is-public - A Boolean that indicates whether the image is public. - // - kernel-id - The kernel ID. - // - manifest-location - The location of the image manifest. - // - name - The name of the AMI (provided during image creation). - // - owner-alias - The owner alias ( amazon | aws-marketplace ). The valid - // aliases are defined in an Amazon-maintained list. This is not the Amazon Web - // Services account alias that can be set using the IAM console. We recommend that - // you use the Owner request parameter instead of this filter. - // - owner-id - The Amazon Web Services account ID of the owner. We recommend - // that you use the Owner request parameter instead of this filter. - // - platform - The platform. The only supported value is windows . - // - product-code - The product code. - // - product-code.type - The type of the product code ( marketplace ). - // - ramdisk-id - The RAM disk ID. - // - root-device-name - The device name of the root device volume (for example, - // /dev/sda1 ). - // - root-device-type - The type of the root device volume ( ebs | instance-store - // ). - // - source-instance-id - The ID of the instance that the AMI was created from if - // the AMI was created using CreateImage. This filter is applicable only if the AMI - // was created using CreateImage (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html) - // . - // - state - The state of the image ( available | pending | failed ). - // - state-reason-code - The reason code for the state change. - // - state-reason-message - The message for the state change. - // - sriov-net-support - A value of simple indicates that enhanced networking - // with the Intel 82599 VF interface is enabled. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - virtualization-type - The virtualization type ( paravirtual | hvm ). - Filters []types.Filter - - // The image IDs. Default: Describes all images available to you. - ImageIds []string - - // Specifies whether to include deprecated AMIs. Default: No deprecated AMIs are - // included in the response. If you are the AMI owner, all deprecated AMIs appear - // in the response regardless of what you specify for this parameter. - IncludeDeprecated *bool - - // Specifies whether to include disabled AMIs. Default: No disabled AMIs are - // included in the response. - IncludeDisabled *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // Scopes the results to images with the specified owners. You can specify a - // combination of Amazon Web Services account IDs, self , amazon , and - // aws-marketplace . If you omit this parameter, the results include all images for - // which you have launch permissions, regardless of ownership. - Owners []string - - noSmithyDocumentSerde -} - -type DescribeImagesOutput struct { - - // Information about the images. - Images []types.Image - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImages{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImages{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeImages"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImages(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeImagesAPIClient is a client that implements the DescribeImages -// operation. -type DescribeImagesAPIClient interface { - DescribeImages(context.Context, *DescribeImagesInput, ...func(*Options)) (*DescribeImagesOutput, error) -} - -var _ DescribeImagesAPIClient = (*Client)(nil) - -// DescribeImagesPaginatorOptions is the paginator options for DescribeImages -type DescribeImagesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeImagesPaginator is a paginator for DescribeImages -type DescribeImagesPaginator struct { - options DescribeImagesPaginatorOptions - client DescribeImagesAPIClient - params *DescribeImagesInput - nextToken *string - firstPage bool -} - -// NewDescribeImagesPaginator returns a new DescribeImagesPaginator -func NewDescribeImagesPaginator(client DescribeImagesAPIClient, params *DescribeImagesInput, optFns ...func(*DescribeImagesPaginatorOptions)) *DescribeImagesPaginator { - if params == nil { - params = &DescribeImagesInput{} - } - - options := DescribeImagesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeImagesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeImagesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeImages page. -func (p *DescribeImagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImagesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeImages(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ImageAvailableWaiterOptions are waiter options for ImageAvailableWaiter -type ImageAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ImageAvailableWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ImageAvailableWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeImagesInput, *DescribeImagesOutput, error) (bool, error) -} - -// ImageAvailableWaiter defines the waiters for ImageAvailable -type ImageAvailableWaiter struct { - client DescribeImagesAPIClient - - options ImageAvailableWaiterOptions -} - -// NewImageAvailableWaiter constructs a ImageAvailableWaiter. -func NewImageAvailableWaiter(client DescribeImagesAPIClient, optFns ...func(*ImageAvailableWaiterOptions)) *ImageAvailableWaiter { - options := ImageAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = imageAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ImageAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ImageAvailable waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *ImageAvailableWaiter) Wait(ctx context.Context, params *DescribeImagesInput, maxWaitDur time.Duration, optFns ...func(*ImageAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ImageAvailable waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *ImageAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeImagesInput, maxWaitDur time.Duration, optFns ...func(*ImageAvailableWaiterOptions)) (*DescribeImagesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeImages(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ImageAvailable waiter") -} - -func imageAvailableStateRetryable(ctx context.Context, input *DescribeImagesInput, output *DescribeImagesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Images[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.ImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ImageState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Images[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.ImageState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.ImageState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -// ImageExistsWaiterOptions are waiter options for ImageExistsWaiter -type ImageExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ImageExistsWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ImageExistsWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeImagesInput, *DescribeImagesOutput, error) (bool, error) -} - -// ImageExistsWaiter defines the waiters for ImageExists -type ImageExistsWaiter struct { - client DescribeImagesAPIClient - - options ImageExistsWaiterOptions -} - -// NewImageExistsWaiter constructs a ImageExistsWaiter. -func NewImageExistsWaiter(client DescribeImagesAPIClient, optFns ...func(*ImageExistsWaiterOptions)) *ImageExistsWaiter { - options := ImageExistsWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = imageExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ImageExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ImageExists waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *ImageExistsWaiter) Wait(ctx context.Context, params *DescribeImagesInput, maxWaitDur time.Duration, optFns ...func(*ImageExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ImageExists waiter and returns the -// output of the successful operation. The maxWaitDur is the maximum wait duration -// the waiter will wait. The maxWaitDur is required and must be greater than zero. -func (w *ImageExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeImagesInput, maxWaitDur time.Duration, optFns ...func(*ImageExistsWaiterOptions)) (*DescribeImagesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeImages(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ImageExists waiter") -} - -func imageExistsStateRetryable(ctx context.Context, input *DescribeImagesInput, output *DescribeImagesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("length(Images[]) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "true" - bv, err := strconv.ParseBool(expectedValue) - if err != nil { - return false, fmt.Errorf("error parsing boolean from string %w", err) - } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidAMIID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeImages(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeImages", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportImageTasks.go deleted file mode 100644 index 8fc87556c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportImageTasks.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Displays details about an import virtual machine or import snapshot tasks that -// are already created. -func (c *Client) DescribeImportImageTasks(ctx context.Context, params *DescribeImportImageTasksInput, optFns ...func(*Options)) (*DescribeImportImageTasksOutput, error) { - if params == nil { - params = &DescribeImportImageTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeImportImageTasks", params, optFns, c.addOperationDescribeImportImageTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeImportImageTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeImportImageTasksInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Filter tasks using the task-state filter and one of the following values: active - // , completed , deleting , or deleted . - Filters []types.Filter - - // The IDs of the import image tasks. - ImportTaskIds []string - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // A token that indicates the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeImportImageTasksOutput struct { - - // A list of zero or more import image tasks that are currently active or were - // completed or canceled in the previous 7 days. - ImportImageTasks []types.ImportImageTask - - // The token to use to get the next page of results. This value is null when there - // are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeImportImageTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImportImageTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImportImageTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeImportImageTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportImageTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeImportImageTasksAPIClient is a client that implements the -// DescribeImportImageTasks operation. -type DescribeImportImageTasksAPIClient interface { - DescribeImportImageTasks(context.Context, *DescribeImportImageTasksInput, ...func(*Options)) (*DescribeImportImageTasksOutput, error) -} - -var _ DescribeImportImageTasksAPIClient = (*Client)(nil) - -// DescribeImportImageTasksPaginatorOptions is the paginator options for -// DescribeImportImageTasks -type DescribeImportImageTasksPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeImportImageTasksPaginator is a paginator for DescribeImportImageTasks -type DescribeImportImageTasksPaginator struct { - options DescribeImportImageTasksPaginatorOptions - client DescribeImportImageTasksAPIClient - params *DescribeImportImageTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeImportImageTasksPaginator returns a new -// DescribeImportImageTasksPaginator -func NewDescribeImportImageTasksPaginator(client DescribeImportImageTasksAPIClient, params *DescribeImportImageTasksInput, optFns ...func(*DescribeImportImageTasksPaginatorOptions)) *DescribeImportImageTasksPaginator { - if params == nil { - params = &DescribeImportImageTasksInput{} - } - - options := DescribeImportImageTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeImportImageTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeImportImageTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeImportImageTasks page. -func (p *DescribeImportImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImportImageTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeImportImageTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeImportImageTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeImportImageTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go deleted file mode 100644 index d974ad061..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeImportSnapshotTasks.go +++ /dev/null @@ -1,461 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes your import snapshot tasks. -func (c *Client) DescribeImportSnapshotTasks(ctx context.Context, params *DescribeImportSnapshotTasksInput, optFns ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) { - if params == nil { - params = &DescribeImportSnapshotTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeImportSnapshotTasks", params, optFns, c.addOperationDescribeImportSnapshotTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeImportSnapshotTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeImportSnapshotTasksInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - Filters []types.Filter - - // A list of import snapshot task IDs. - ImportTaskIds []string - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int32 - - // A token that indicates the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeImportSnapshotTasksOutput struct { - - // A list of zero or more import snapshot tasks that are currently active or were - // completed or canceled in the previous 7 days. - ImportSnapshotTasks []types.ImportSnapshotTask - - // The token to use to get the next page of results. This value is null when there - // are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeImportSnapshotTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeImportSnapshotTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeImportSnapshotTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeImportSnapshotTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImportSnapshotTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeImportSnapshotTasksAPIClient is a client that implements the -// DescribeImportSnapshotTasks operation. -type DescribeImportSnapshotTasksAPIClient interface { - DescribeImportSnapshotTasks(context.Context, *DescribeImportSnapshotTasksInput, ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) -} - -var _ DescribeImportSnapshotTasksAPIClient = (*Client)(nil) - -// DescribeImportSnapshotTasksPaginatorOptions is the paginator options for -// DescribeImportSnapshotTasks -type DescribeImportSnapshotTasksPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeImportSnapshotTasksPaginator is a paginator for -// DescribeImportSnapshotTasks -type DescribeImportSnapshotTasksPaginator struct { - options DescribeImportSnapshotTasksPaginatorOptions - client DescribeImportSnapshotTasksAPIClient - params *DescribeImportSnapshotTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeImportSnapshotTasksPaginator returns a new -// DescribeImportSnapshotTasksPaginator -func NewDescribeImportSnapshotTasksPaginator(client DescribeImportSnapshotTasksAPIClient, params *DescribeImportSnapshotTasksInput, optFns ...func(*DescribeImportSnapshotTasksPaginatorOptions)) *DescribeImportSnapshotTasksPaginator { - if params == nil { - params = &DescribeImportSnapshotTasksInput{} - } - - options := DescribeImportSnapshotTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeImportSnapshotTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeImportSnapshotTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeImportSnapshotTasks page. -func (p *DescribeImportSnapshotTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeImportSnapshotTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeImportSnapshotTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// SnapshotImportedWaiterOptions are waiter options for SnapshotImportedWaiter -type SnapshotImportedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // SnapshotImportedWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, SnapshotImportedWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeImportSnapshotTasksInput, *DescribeImportSnapshotTasksOutput, error) (bool, error) -} - -// SnapshotImportedWaiter defines the waiters for SnapshotImported -type SnapshotImportedWaiter struct { - client DescribeImportSnapshotTasksAPIClient - - options SnapshotImportedWaiterOptions -} - -// NewSnapshotImportedWaiter constructs a SnapshotImportedWaiter. -func NewSnapshotImportedWaiter(client DescribeImportSnapshotTasksAPIClient, optFns ...func(*SnapshotImportedWaiterOptions)) *SnapshotImportedWaiter { - options := SnapshotImportedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = snapshotImportedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &SnapshotImportedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for SnapshotImported waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *SnapshotImportedWaiter) Wait(ctx context.Context, params *DescribeImportSnapshotTasksInput, maxWaitDur time.Duration, optFns ...func(*SnapshotImportedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for SnapshotImported waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *SnapshotImportedWaiter) WaitForOutput(ctx context.Context, params *DescribeImportSnapshotTasksInput, maxWaitDur time.Duration, optFns ...func(*SnapshotImportedWaiterOptions)) (*DescribeImportSnapshotTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeImportSnapshotTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for SnapshotImported waiter") -} - -func snapshotImportedStateRetryable(ctx context.Context, input *DescribeImportSnapshotTasksInput, output *DescribeImportSnapshotTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("ImportSnapshotTasks[].SnapshotTaskDetail.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("ImportSnapshotTasks[].SnapshotTaskDetail.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "error" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeImportSnapshotTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeImportSnapshotTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go deleted file mode 100644 index cfae82ecb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceAttribute.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified attribute of the specified instance. You can specify -// only one attribute at a time. Valid attribute values are: instanceType | kernel -// | ramdisk | userData | disableApiTermination | instanceInitiatedShutdownBehavior -// | rootDeviceName | blockDeviceMapping | productCodes | sourceDestCheck | -// groupSet | ebsOptimized | sriovNetSupport -func (c *Client) DescribeInstanceAttribute(ctx context.Context, params *DescribeInstanceAttributeInput, optFns ...func(*Options)) (*DescribeInstanceAttributeOutput, error) { - if params == nil { - params = &DescribeInstanceAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceAttribute", params, optFns, c.addOperationDescribeInstanceAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceAttributeInput struct { - - // The instance attribute. Note: The enaSupport attribute is not supported at this - // time. - // - // This member is required. - Attribute types.InstanceAttributeName - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Describes an instance attribute. -type DescribeInstanceAttributeOutput struct { - - // The block device mapping of the instance. - BlockDeviceMappings []types.InstanceBlockDeviceMapping - - // To enable the instance for Amazon Web Services Stop Protection, set this - // parameter to true ; otherwise, set it to false . - DisableApiStop *types.AttributeBooleanValue - - // If the value is true , you can't terminate the instance through the Amazon EC2 - // console, CLI, or API; otherwise, you can. - DisableApiTermination *types.AttributeBooleanValue - - // Indicates whether the instance is optimized for Amazon EBS I/O. - EbsOptimized *types.AttributeBooleanValue - - // Indicates whether enhanced networking with ENA is enabled. - EnaSupport *types.AttributeBooleanValue - - // To enable the instance for Amazon Web Services Nitro Enclaves, set this - // parameter to true ; otherwise, set it to false . - EnclaveOptions *types.EnclaveOptions - - // The security groups associated with the instance. - Groups []types.GroupIdentifier - - // The ID of the instance. - InstanceId *string - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *types.AttributeValue - - // The instance type. - InstanceType *types.AttributeValue - - // The kernel ID. - KernelId *types.AttributeValue - - // A list of product codes. - ProductCodes []types.ProductCode - - // The RAM disk ID. - RamdiskId *types.AttributeValue - - // The device name of the root device volume (for example, /dev/sda1 ). - RootDeviceName *types.AttributeValue - - // Enable or disable source/destination checks, which ensure that the instance is - // either the source or the destination of any traffic that it receives. If the - // value is true , source/destination checks are enabled; otherwise, they are - // disabled. The default value is true . You must disable source/destination checks - // if the instance runs services such as network address translation, routing, or - // firewalls. - SourceDestCheck *types.AttributeBooleanValue - - // Indicates whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *types.AttributeValue - - // The user data. - UserData *types.AttributeValue - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeInstanceAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceConnectEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceConnectEndpoints.go deleted file mode 100644 index 619a0a8cb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceConnectEndpoints.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified EC2 Instance Connect Endpoints or all EC2 Instance -// Connect Endpoints. -func (c *Client) DescribeInstanceConnectEndpoints(ctx context.Context, params *DescribeInstanceConnectEndpointsInput, optFns ...func(*Options)) (*DescribeInstanceConnectEndpointsOutput, error) { - if params == nil { - params = &DescribeInstanceConnectEndpointsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceConnectEndpoints", params, optFns, c.addOperationDescribeInstanceConnectEndpointsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceConnectEndpointsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceConnectEndpointsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - instance-connect-endpoint-id - The ID of the EC2 Instance Connect Endpoint. - // - state - The state of the EC2 Instance Connect Endpoint ( create-in-progress - // | create-complete | create-failed | delete-in-progress | delete-complete | - // delete-failed ). - // - subnet-id - The ID of the subnet in which the EC2 Instance Connect Endpoint - // was created. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - tag-value - The value of a tag assigned to the resource. Use this filter to - // find all resources that have a tag with a specific value, regardless of tag key. - // - // - vpc-id - The ID of the VPC in which the EC2 Instance Connect Endpoint was - // created. - Filters []types.Filter - - // One or more EC2 Instance Connect Endpoint IDs. - InstanceConnectEndpointIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceConnectEndpointsOutput struct { - - // Information about the EC2 Instance Connect Endpoints. - InstanceConnectEndpoints []types.Ec2InstanceConnectEndpoint - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceConnectEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceConnectEndpoints{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceConnectEndpoints{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceConnectEndpoints"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceConnectEndpoints(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceConnectEndpointsAPIClient is a client that implements the -// DescribeInstanceConnectEndpoints operation. -type DescribeInstanceConnectEndpointsAPIClient interface { - DescribeInstanceConnectEndpoints(context.Context, *DescribeInstanceConnectEndpointsInput, ...func(*Options)) (*DescribeInstanceConnectEndpointsOutput, error) -} - -var _ DescribeInstanceConnectEndpointsAPIClient = (*Client)(nil) - -// DescribeInstanceConnectEndpointsPaginatorOptions is the paginator options for -// DescribeInstanceConnectEndpoints -type DescribeInstanceConnectEndpointsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceConnectEndpointsPaginator is a paginator for -// DescribeInstanceConnectEndpoints -type DescribeInstanceConnectEndpointsPaginator struct { - options DescribeInstanceConnectEndpointsPaginatorOptions - client DescribeInstanceConnectEndpointsAPIClient - params *DescribeInstanceConnectEndpointsInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceConnectEndpointsPaginator returns a new -// DescribeInstanceConnectEndpointsPaginator -func NewDescribeInstanceConnectEndpointsPaginator(client DescribeInstanceConnectEndpointsAPIClient, params *DescribeInstanceConnectEndpointsInput, optFns ...func(*DescribeInstanceConnectEndpointsPaginatorOptions)) *DescribeInstanceConnectEndpointsPaginator { - if params == nil { - params = &DescribeInstanceConnectEndpointsInput{} - } - - options := DescribeInstanceConnectEndpointsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceConnectEndpointsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceConnectEndpointsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceConnectEndpoints page. -func (p *DescribeInstanceConnectEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceConnectEndpointsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceConnectEndpoints(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceConnectEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceConnectEndpoints", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go deleted file mode 100644 index 6cd3bf0d1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceCreditSpecifications.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the credit option for CPU usage of the specified burstable -// performance instances. The credit options are standard and unlimited . If you do -// not specify an instance ID, Amazon EC2 returns burstable performance instances -// with the unlimited credit option, as well as instances that were previously -// configured as T2, T3, and T3a with the unlimited credit option. For example, if -// you resize a T2 instance, while it is configured as unlimited , to an M4 -// instance, Amazon EC2 returns the M4 instance. If you specify one or more -// instance IDs, Amazon EC2 returns the credit option ( standard or unlimited ) of -// those instances. If you specify an instance ID that is not valid, such as an -// instance that is not a burstable performance instance, an error is returned. -// Recently terminated instances might appear in the returned results. This -// interval is usually less than one hour. If an Availability Zone is experiencing -// a service disruption and you specify instance IDs in the affected zone, or do -// not specify any instance IDs at all, the call fails. If you specify only -// instance IDs in an unaffected zone, the call works normally. For more -// information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeInstanceCreditSpecifications(ctx context.Context, params *DescribeInstanceCreditSpecificationsInput, optFns ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error) { - if params == nil { - params = &DescribeInstanceCreditSpecificationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceCreditSpecifications", params, optFns, c.addOperationDescribeInstanceCreditSpecificationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceCreditSpecificationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceCreditSpecificationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - instance-id - The ID of the instance. - Filters []types.Filter - - // The instance IDs. Default: Describes all your instances. Constraints: Maximum - // 1000 explicitly specified instance IDs. - InstanceIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the instance IDs parameter in the same - // call. - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceCreditSpecificationsOutput struct { - - // Information about the credit option for CPU usage of an instance. - InstanceCreditSpecifications []types.InstanceCreditSpecification - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceCreditSpecificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceCreditSpecifications{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceCreditSpecifications{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceCreditSpecifications"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceCreditSpecifications(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceCreditSpecificationsAPIClient is a client that implements the -// DescribeInstanceCreditSpecifications operation. -type DescribeInstanceCreditSpecificationsAPIClient interface { - DescribeInstanceCreditSpecifications(context.Context, *DescribeInstanceCreditSpecificationsInput, ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error) -} - -var _ DescribeInstanceCreditSpecificationsAPIClient = (*Client)(nil) - -// DescribeInstanceCreditSpecificationsPaginatorOptions is the paginator options -// for DescribeInstanceCreditSpecifications -type DescribeInstanceCreditSpecificationsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the instance IDs parameter in the same - // call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceCreditSpecificationsPaginator is a paginator for -// DescribeInstanceCreditSpecifications -type DescribeInstanceCreditSpecificationsPaginator struct { - options DescribeInstanceCreditSpecificationsPaginatorOptions - client DescribeInstanceCreditSpecificationsAPIClient - params *DescribeInstanceCreditSpecificationsInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceCreditSpecificationsPaginator returns a new -// DescribeInstanceCreditSpecificationsPaginator -func NewDescribeInstanceCreditSpecificationsPaginator(client DescribeInstanceCreditSpecificationsAPIClient, params *DescribeInstanceCreditSpecificationsInput, optFns ...func(*DescribeInstanceCreditSpecificationsPaginatorOptions)) *DescribeInstanceCreditSpecificationsPaginator { - if params == nil { - params = &DescribeInstanceCreditSpecificationsInput{} - } - - options := DescribeInstanceCreditSpecificationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceCreditSpecificationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceCreditSpecificationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceCreditSpecifications page. -func (p *DescribeInstanceCreditSpecificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceCreditSpecificationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceCreditSpecifications(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceCreditSpecifications(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceCreditSpecifications", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go deleted file mode 100644 index 22afb6495..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventNotificationAttributes.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the tag keys that are registered to appear in scheduled event -// notifications for resources in the current Region. -func (c *Client) DescribeInstanceEventNotificationAttributes(ctx context.Context, params *DescribeInstanceEventNotificationAttributesInput, optFns ...func(*Options)) (*DescribeInstanceEventNotificationAttributesOutput, error) { - if params == nil { - params = &DescribeInstanceEventNotificationAttributesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceEventNotificationAttributes", params, optFns, c.addOperationDescribeInstanceEventNotificationAttributesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceEventNotificationAttributesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceEventNotificationAttributesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeInstanceEventNotificationAttributesOutput struct { - - // Information about the registered tag keys. - InstanceTagAttribute *types.InstanceTagNotificationAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceEventNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceEventNotificationAttributes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceEventNotificationAttributes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceEventNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceEventNotificationAttributes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventWindows.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventWindows.go deleted file mode 100644 index 933d9b1e7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceEventWindows.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified event windows or all event windows. If you specify -// event window IDs, the output includes information for only the specified event -// windows. If you specify filters, the output includes information for only those -// event windows that meet the filter criteria. If you do not specify event windows -// IDs or filters, the output includes information for all event windows, which can -// affect performance. We recommend that you use pagination to ensure that the -// operation returns quickly and successfully. For more information, see Define -// event windows for scheduled events (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeInstanceEventWindows(ctx context.Context, params *DescribeInstanceEventWindowsInput, optFns ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error) { - if params == nil { - params = &DescribeInstanceEventWindowsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceEventWindows", params, optFns, c.addOperationDescribeInstanceEventWindowsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceEventWindowsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Describe instance event windows by InstanceEventWindow. -type DescribeInstanceEventWindowsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - dedicated-host-id - The event windows associated with the specified - // Dedicated Host ID. - // - event-window-name - The event windows associated with the specified names. - // - instance-id - The event windows associated with the specified instance ID. - // - instance-tag - The event windows associated with the specified tag and - // value. - // - instance-tag-key - The event windows associated with the specified tag key, - // regardless of the value. - // - instance-tag-value - The event windows associated with the specified tag - // value, regardless of the key. - // - tag: - The key/value combination of a tag assigned to the event window. Use - // the tag key in the filter name and the tag value as the filter value. For - // example, to find all resources that have a tag with the key Owner and the - // value CMX , specify tag:Owner for the filter name and CMX for the filter - // value. - // - tag-key - The key of a tag assigned to the event window. Use this filter to - // find all event windows that have a tag with a specific key, regardless of the - // tag value. - // - tag-value - The value of a tag assigned to the event window. Use this filter - // to find all event windows that have a tag with a specific value, regardless of - // the tag key. - Filters []types.Filter - - // The IDs of the event windows. - InstanceEventWindowIds []string - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 20 and 500. You cannot specify this parameter and the event - // window IDs parameter in the same call. - MaxResults *int32 - - // The token to request the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceEventWindowsOutput struct { - - // Information about the event windows. - InstanceEventWindows []types.InstanceEventWindow - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceEventWindowsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceEventWindows{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceEventWindows{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceEventWindows"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceEventWindows(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceEventWindowsAPIClient is a client that implements the -// DescribeInstanceEventWindows operation. -type DescribeInstanceEventWindowsAPIClient interface { - DescribeInstanceEventWindows(context.Context, *DescribeInstanceEventWindowsInput, ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error) -} - -var _ DescribeInstanceEventWindowsAPIClient = (*Client)(nil) - -// DescribeInstanceEventWindowsPaginatorOptions is the paginator options for -// DescribeInstanceEventWindows -type DescribeInstanceEventWindowsPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 20 and 500. You cannot specify this parameter and the event - // window IDs parameter in the same call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceEventWindowsPaginator is a paginator for -// DescribeInstanceEventWindows -type DescribeInstanceEventWindowsPaginator struct { - options DescribeInstanceEventWindowsPaginatorOptions - client DescribeInstanceEventWindowsAPIClient - params *DescribeInstanceEventWindowsInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceEventWindowsPaginator returns a new -// DescribeInstanceEventWindowsPaginator -func NewDescribeInstanceEventWindowsPaginator(client DescribeInstanceEventWindowsAPIClient, params *DescribeInstanceEventWindowsInput, optFns ...func(*DescribeInstanceEventWindowsPaginatorOptions)) *DescribeInstanceEventWindowsPaginator { - if params == nil { - params = &DescribeInstanceEventWindowsInput{} - } - - options := DescribeInstanceEventWindowsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceEventWindowsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceEventWindowsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceEventWindows page. -func (p *DescribeInstanceEventWindowsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceEventWindowsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceEventWindows(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceEventWindows(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceEventWindows", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go deleted file mode 100644 index 8138c7666..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceStatus.go +++ /dev/null @@ -1,690 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the status of the specified instances or all of your instances. By -// default, only running instances are described, unless you specifically indicate -// to return the status of all instances. Instance status includes the following -// components: -// - Status checks - Amazon EC2 performs status checks on running EC2 instances -// to identify hardware and software issues. For more information, see Status -// checks for your instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html) -// and Troubleshoot instances with failed status checks (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html) -// in the Amazon EC2 User Guide. -// - Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, or -// terminate) for your instances related to hardware issues, software updates, or -// system maintenance. For more information, see Scheduled events for your -// instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html) -// in the Amazon EC2 User Guide. -// - Instance state - You can manage your instances from the moment you launch -// them through their termination. For more information, see Instance lifecycle (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeInstanceStatus(ctx context.Context, params *DescribeInstanceStatusInput, optFns ...func(*Options)) (*DescribeInstanceStatusOutput, error) { - if params == nil { - params = &DescribeInstanceStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceStatus", params, optFns, c.addOperationDescribeInstanceStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceStatusInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - availability-zone - The Availability Zone of the instance. - // - event.code - The code for the scheduled event ( instance-reboot | - // system-reboot | system-maintenance | instance-retirement | instance-stop ). - // - event.description - A description of the event. - // - event.instance-event-id - The ID of the event whose date and time you are - // modifying. - // - event.not-after - The latest end time for the scheduled event (for example, - // 2014-09-15T17:15:20.000Z ). - // - event.not-before - The earliest start time for the scheduled event (for - // example, 2014-09-15T17:15:20.000Z ). - // - event.not-before-deadline - The deadline for starting the event (for - // example, 2014-09-15T17:15:20.000Z ). - // - instance-state-code - The code for the instance state, as a 16-bit unsigned - // integer. The high byte is used for internal purposes and should be ignored. The - // low byte is set based on the state represented. The valid values are 0 - // (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and - // 80 (stopped). - // - instance-state-name - The state of the instance ( pending | running | - // shutting-down | terminated | stopping | stopped ). - // - instance-status.reachability - Filters on instance status where the name is - // reachability ( passed | failed | initializing | insufficient-data ). - // - instance-status.status - The status of the instance ( ok | impaired | - // initializing | insufficient-data | not-applicable ). - // - system-status.reachability - Filters on system status where the name is - // reachability ( passed | failed | initializing | insufficient-data ). - // - system-status.status - The system status of the instance ( ok | impaired | - // initializing | insufficient-data | not-applicable ). - Filters []types.Filter - - // When true , includes the health status for all instances. When false , includes - // the health status for running instances only. Default: false - IncludeAllInstances *bool - - // The instance IDs. Default: Describes all your instances. Constraints: Maximum - // 100 explicitly specified instance IDs. - InstanceIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the instance IDs parameter in the same - // request. - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceStatusOutput struct { - - // Information about the status of the instances. - InstanceStatuses []types.InstanceStatus - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceStatusAPIClient is a client that implements the -// DescribeInstanceStatus operation. -type DescribeInstanceStatusAPIClient interface { - DescribeInstanceStatus(context.Context, *DescribeInstanceStatusInput, ...func(*Options)) (*DescribeInstanceStatusOutput, error) -} - -var _ DescribeInstanceStatusAPIClient = (*Client)(nil) - -// DescribeInstanceStatusPaginatorOptions is the paginator options for -// DescribeInstanceStatus -type DescribeInstanceStatusPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the instance IDs parameter in the same - // request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceStatusPaginator is a paginator for DescribeInstanceStatus -type DescribeInstanceStatusPaginator struct { - options DescribeInstanceStatusPaginatorOptions - client DescribeInstanceStatusAPIClient - params *DescribeInstanceStatusInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceStatusPaginator returns a new DescribeInstanceStatusPaginator -func NewDescribeInstanceStatusPaginator(client DescribeInstanceStatusAPIClient, params *DescribeInstanceStatusInput, optFns ...func(*DescribeInstanceStatusPaginatorOptions)) *DescribeInstanceStatusPaginator { - if params == nil { - params = &DescribeInstanceStatusInput{} - } - - options := DescribeInstanceStatusPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceStatusPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceStatusPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceStatus page. -func (p *DescribeInstanceStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceStatusOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceStatus(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// InstanceStatusOkWaiterOptions are waiter options for InstanceStatusOkWaiter -type InstanceStatusOkWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // InstanceStatusOkWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, InstanceStatusOkWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInstanceStatusInput, *DescribeInstanceStatusOutput, error) (bool, error) -} - -// InstanceStatusOkWaiter defines the waiters for InstanceStatusOk -type InstanceStatusOkWaiter struct { - client DescribeInstanceStatusAPIClient - - options InstanceStatusOkWaiterOptions -} - -// NewInstanceStatusOkWaiter constructs a InstanceStatusOkWaiter. -func NewInstanceStatusOkWaiter(client DescribeInstanceStatusAPIClient, optFns ...func(*InstanceStatusOkWaiterOptions)) *InstanceStatusOkWaiter { - options := InstanceStatusOkWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = instanceStatusOkStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &InstanceStatusOkWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for InstanceStatusOk waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *InstanceStatusOkWaiter) Wait(ctx context.Context, params *DescribeInstanceStatusInput, maxWaitDur time.Duration, optFns ...func(*InstanceStatusOkWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for InstanceStatusOk waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *InstanceStatusOkWaiter) WaitForOutput(ctx context.Context, params *DescribeInstanceStatusInput, maxWaitDur time.Duration, optFns ...func(*InstanceStatusOkWaiterOptions)) (*DescribeInstanceStatusOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInstanceStatus(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for InstanceStatusOk waiter") -} - -func instanceStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceStatusInput, output *DescribeInstanceStatusOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("InstanceStatuses[].InstanceStatus.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "ok" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SummaryStatus) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SummaryStatus value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidInstanceID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -// SystemStatusOkWaiterOptions are waiter options for SystemStatusOkWaiter -type SystemStatusOkWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // SystemStatusOkWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, SystemStatusOkWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInstanceStatusInput, *DescribeInstanceStatusOutput, error) (bool, error) -} - -// SystemStatusOkWaiter defines the waiters for SystemStatusOk -type SystemStatusOkWaiter struct { - client DescribeInstanceStatusAPIClient - - options SystemStatusOkWaiterOptions -} - -// NewSystemStatusOkWaiter constructs a SystemStatusOkWaiter. -func NewSystemStatusOkWaiter(client DescribeInstanceStatusAPIClient, optFns ...func(*SystemStatusOkWaiterOptions)) *SystemStatusOkWaiter { - options := SystemStatusOkWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = systemStatusOkStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &SystemStatusOkWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for SystemStatusOk waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *SystemStatusOkWaiter) Wait(ctx context.Context, params *DescribeInstanceStatusInput, maxWaitDur time.Duration, optFns ...func(*SystemStatusOkWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for SystemStatusOk waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *SystemStatusOkWaiter) WaitForOutput(ctx context.Context, params *DescribeInstanceStatusInput, maxWaitDur time.Duration, optFns ...func(*SystemStatusOkWaiterOptions)) (*DescribeInstanceStatusOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInstanceStatus(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for SystemStatusOk waiter") -} - -func systemStatusOkStateRetryable(ctx context.Context, input *DescribeInstanceStatusInput, output *DescribeInstanceStatusOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("InstanceStatuses[].SystemStatus.Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "ok" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SummaryStatus) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SummaryStatus value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go deleted file mode 100644 index ae0c91bce..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTopology.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes a tree-based hierarchy that represents the physical host placement of -// your EC2 instances within an Availability Zone or Local Zone. You can use this -// information to determine the relative proximity of your EC2 instances within the -// Amazon Web Services network to support your tightly coupled workloads. -// Limitations -// - Supported zones -// - Availability Zone -// - Local Zone -// - Supported instance types -// - hpc6a.48xlarge | hpc6id.32xlarge | hpc7a.12xlarge | hpc7a.24xlarge | -// hpc7a.48xlarge | hpc7a.96xlarge | hpc7g.4xlarge | hpc7g.8xlarge | -// hpc7g.16xlarge -// - p3dn.24xlarge | p4d.24xlarge | p4de.24xlarge | p5.48xlarge -// - trn1.2xlarge | trn1.32xlarge | trn1n.32xlarge -// -// For more information, see Amazon EC2 instance topology (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-topology.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeInstanceTopology(ctx context.Context, params *DescribeInstanceTopologyInput, optFns ...func(*Options)) (*DescribeInstanceTopologyOutput, error) { - if params == nil { - params = &DescribeInstanceTopologyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTopology", params, optFns, c.addOperationDescribeInstanceTopologyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceTopologyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceTopologyInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - availability-zone - The name of the Availability Zone (for example, - // us-west-2a ) or Local Zone (for example, us-west-2-lax-1b ) that the instance - // is in. - // - instance-type - The instance type (for example, p4d.24xlarge ) or instance - // family (for example, p4d* ). You can use the * wildcard to match zero or more - // characters, or the ? wildcard to match zero or one character. - // - zone-id - The ID of the Availability Zone (for example, usw2-az2 ) or Local - // Zone (for example, usw2-lax1-az1 ) that the instance is in. - Filters []types.Filter - - // The name of the placement group that each instance is in. Constraints: Maximum - // 100 explicitly specified placement group names. - GroupNames []string - - // The instance IDs. Default: Describes all your instances. Constraints: Maximum - // 100 explicitly specified instance IDs. - InstanceIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You can't specify this parameter and the instance IDs parameter in the same - // request. Default: 20 - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceTopologyOutput struct { - - // Information about the topology of each instance. - Instances []types.InstanceTopology - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceTopologyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceTopology{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceTopology{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceTopology"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTopology(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceTopologyAPIClient is a client that implements the -// DescribeInstanceTopology operation. -type DescribeInstanceTopologyAPIClient interface { - DescribeInstanceTopology(context.Context, *DescribeInstanceTopologyInput, ...func(*Options)) (*DescribeInstanceTopologyOutput, error) -} - -var _ DescribeInstanceTopologyAPIClient = (*Client)(nil) - -// DescribeInstanceTopologyPaginatorOptions is the paginator options for -// DescribeInstanceTopology -type DescribeInstanceTopologyPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You can't specify this parameter and the instance IDs parameter in the same - // request. Default: 20 - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceTopologyPaginator is a paginator for DescribeInstanceTopology -type DescribeInstanceTopologyPaginator struct { - options DescribeInstanceTopologyPaginatorOptions - client DescribeInstanceTopologyAPIClient - params *DescribeInstanceTopologyInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceTopologyPaginator returns a new -// DescribeInstanceTopologyPaginator -func NewDescribeInstanceTopologyPaginator(client DescribeInstanceTopologyAPIClient, params *DescribeInstanceTopologyInput, optFns ...func(*DescribeInstanceTopologyPaginatorOptions)) *DescribeInstanceTopologyPaginator { - if params == nil { - params = &DescribeInstanceTopologyInput{} - } - - options := DescribeInstanceTopologyPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceTopologyPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceTopologyPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceTopology page. -func (p *DescribeInstanceTopologyPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceTopologyOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceTopology(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceTopology(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceTopology", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypeOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypeOfferings.go deleted file mode 100644 index 1d12ba1a3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypeOfferings.go +++ /dev/null @@ -1,256 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a list of all instance types offered. The results can be filtered by -// location (Region or Availability Zone). If no location is specified, the -// instance types offered in the current Region are returned. -func (c *Client) DescribeInstanceTypeOfferings(ctx context.Context, params *DescribeInstanceTypeOfferingsInput, optFns ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error) { - if params == nil { - params = &DescribeInstanceTypeOfferingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTypeOfferings", params, optFns, c.addOperationDescribeInstanceTypeOfferingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceTypeOfferingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceTypeOfferingsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - location - This depends on the location type. For example, if the location - // type is region (default), the location is the Region code (for example, - // us-east-2 .) - // - instance-type - The instance type. For example, c5.2xlarge . - Filters []types.Filter - - // The location type. - LocationType types.LocationType - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceTypeOfferingsOutput struct { - - // The instance types offered. - InstanceTypeOfferings []types.InstanceTypeOffering - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceTypeOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceTypeOfferings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceTypeOfferings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceTypeOfferings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTypeOfferings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceTypeOfferingsAPIClient is a client that implements the -// DescribeInstanceTypeOfferings operation. -type DescribeInstanceTypeOfferingsAPIClient interface { - DescribeInstanceTypeOfferings(context.Context, *DescribeInstanceTypeOfferingsInput, ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error) -} - -var _ DescribeInstanceTypeOfferingsAPIClient = (*Client)(nil) - -// DescribeInstanceTypeOfferingsPaginatorOptions is the paginator options for -// DescribeInstanceTypeOfferings -type DescribeInstanceTypeOfferingsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceTypeOfferingsPaginator is a paginator for -// DescribeInstanceTypeOfferings -type DescribeInstanceTypeOfferingsPaginator struct { - options DescribeInstanceTypeOfferingsPaginatorOptions - client DescribeInstanceTypeOfferingsAPIClient - params *DescribeInstanceTypeOfferingsInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceTypeOfferingsPaginator returns a new -// DescribeInstanceTypeOfferingsPaginator -func NewDescribeInstanceTypeOfferingsPaginator(client DescribeInstanceTypeOfferingsAPIClient, params *DescribeInstanceTypeOfferingsInput, optFns ...func(*DescribeInstanceTypeOfferingsPaginatorOptions)) *DescribeInstanceTypeOfferingsPaginator { - if params == nil { - params = &DescribeInstanceTypeOfferingsInput{} - } - - options := DescribeInstanceTypeOfferingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceTypeOfferingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceTypeOfferingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceTypeOfferings page. -func (p *DescribeInstanceTypeOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceTypeOfferingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceTypeOfferings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceTypeOfferings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceTypeOfferings", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypes.go deleted file mode 100644 index 5d2b850e0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstanceTypes.go +++ /dev/null @@ -1,342 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the details of the instance types that are offered in a location. The -// results can be filtered by the attributes of the instance types. -func (c *Client) DescribeInstanceTypes(ctx context.Context, params *DescribeInstanceTypesInput, optFns ...func(*Options)) (*DescribeInstanceTypesOutput, error) { - if params == nil { - params = &DescribeInstanceTypesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstanceTypes", params, optFns, c.addOperationDescribeInstanceTypesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstanceTypesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstanceTypesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - // - auto-recovery-supported - Indicates whether Amazon CloudWatch action based - // recovery is supported ( true | false ). - // - bare-metal - Indicates whether it is a bare metal instance type ( true | - // false ). - // - burstable-performance-supported - Indicates whether the instance type is a - // burstable performance T instance type ( true | false ). - // - current-generation - Indicates whether this instance type is the latest - // generation instance type of an instance family ( true | false ). - // - ebs-info.ebs-optimized-info.baseline-bandwidth-in-mbps - The baseline - // bandwidth performance for an EBS-optimized instance type, in Mbps. - // - ebs-info.ebs-optimized-info.baseline-iops - The baseline input/output - // storage operations per second for an EBS-optimized instance type. - // - ebs-info.ebs-optimized-info.baseline-throughput-in-mbps - The baseline - // throughput performance for an EBS-optimized instance type, in MB/s. - // - ebs-info.ebs-optimized-info.maximum-bandwidth-in-mbps - The maximum - // bandwidth performance for an EBS-optimized instance type, in Mbps. - // - ebs-info.ebs-optimized-info.maximum-iops - The maximum input/output storage - // operations per second for an EBS-optimized instance type. - // - ebs-info.ebs-optimized-info.maximum-throughput-in-mbps - The maximum - // throughput performance for an EBS-optimized instance type, in MB/s. - // - ebs-info.ebs-optimized-support - Indicates whether the instance type is - // EBS-optimized ( supported | unsupported | default ). - // - ebs-info.encryption-support - Indicates whether EBS encryption is supported ( - // supported | unsupported ). - // - ebs-info.nvme-support - Indicates whether non-volatile memory express (NVMe) - // is supported for EBS volumes ( required | supported | unsupported ). - // - free-tier-eligible - Indicates whether the instance type is eligible to use - // in the free tier ( true | false ). - // - hibernation-supported - Indicates whether On-Demand hibernation is supported - // ( true | false ). - // - hypervisor - The hypervisor ( nitro | xen ). - // - instance-storage-info.disk.count - The number of local disks. - // - instance-storage-info.disk.size-in-gb - The storage size of each instance - // storage disk, in GB. - // - instance-storage-info.disk.type - The storage technology for the local - // instance storage disks ( hdd | ssd ). - // - instance-storage-info.encryption-support - Indicates whether data is - // encrypted at rest ( required | supported | unsupported ). - // - instance-storage-info.nvme-support - Indicates whether non-volatile memory - // express (NVMe) is supported for instance store ( required | supported | - // unsupported ). - // - instance-storage-info.total-size-in-gb - The total amount of storage - // available from all local instance storage, in GB. - // - instance-storage-supported - Indicates whether the instance type has local - // instance storage ( true | false ). - // - instance-type - The instance type (for example c5.2xlarge or c5*). - // - memory-info.size-in-mib - The memory size. - // - network-info.efa-info.maximum-efa-interfaces - The maximum number of Elastic - // Fabric Adapters (EFAs) per instance. - // - network-info.efa-supported - Indicates whether the instance type supports - // Elastic Fabric Adapter (EFA) ( true | false ). - // - network-info.ena-support - Indicates whether Elastic Network Adapter (ENA) - // is supported or required ( required | supported | unsupported ). - // - network-info.encryption-in-transit-supported - Indicates whether the - // instance type automatically encrypts in-transit traffic between instances ( - // true | false ). - // - network-info.ipv4-addresses-per-interface - The maximum number of private - // IPv4 addresses per network interface. - // - network-info.ipv6-addresses-per-interface - The maximum number of private - // IPv6 addresses per network interface. - // - network-info.ipv6-supported - Indicates whether the instance type supports - // IPv6 ( true | false ). - // - network-info.maximum-network-cards - The maximum number of network cards per - // instance. - // - network-info.maximum-network-interfaces - The maximum number of network - // interfaces per instance. - // - network-info.network-performance - The network performance (for example, "25 - // Gigabit"). - // - nitro-enclaves-support - Indicates whether Nitro Enclaves is supported ( - // supported | unsupported ). - // - nitro-tpm-support - Indicates whether NitroTPM is supported ( supported | - // unsupported ). - // - nitro-tpm-info.supported-versions - The supported NitroTPM version ( 2.0 ). - // - processor-info.supported-architecture - The CPU architecture ( arm64 | i386 - // | x86_64 ). - // - processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in GHz. - // - processor-info.supported-features - The supported CPU features ( amd-sev-snp - // ). - // - supported-boot-mode - The boot mode ( legacy-bios | uefi ). - // - supported-root-device-type - The root device type ( ebs | instance-store ). - // - supported-usage-class - The usage class ( on-demand | spot ). - // - supported-virtualization-type - The virtualization type ( hvm | paravirtual - // ). - // - vcpu-info.default-cores - The default number of cores for the instance type. - // - vcpu-info.default-threads-per-core - The default number of threads per core - // for the instance type. - // - vcpu-info.default-vcpus - The default number of vCPUs for the instance type. - // - vcpu-info.valid-cores - The number of cores that can be configured for the - // instance type. - // - vcpu-info.valid-threads-per-core - The number of threads per core that can - // be configured for the instance type. For example, "1" or "1,2". - Filters []types.Filter - - // The instance types. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - InstanceTypes []types.InstanceType - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstanceTypesOutput struct { - - // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - InstanceTypes []types.InstanceTypeInfo - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstanceTypesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstanceTypes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstanceTypes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstanceTypes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstanceTypes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstanceTypesAPIClient is a client that implements the -// DescribeInstanceTypes operation. -type DescribeInstanceTypesAPIClient interface { - DescribeInstanceTypes(context.Context, *DescribeInstanceTypesInput, ...func(*Options)) (*DescribeInstanceTypesOutput, error) -} - -var _ DescribeInstanceTypesAPIClient = (*Client)(nil) - -// DescribeInstanceTypesPaginatorOptions is the paginator options for -// DescribeInstanceTypes -type DescribeInstanceTypesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstanceTypesPaginator is a paginator for DescribeInstanceTypes -type DescribeInstanceTypesPaginator struct { - options DescribeInstanceTypesPaginatorOptions - client DescribeInstanceTypesAPIClient - params *DescribeInstanceTypesInput - nextToken *string - firstPage bool -} - -// NewDescribeInstanceTypesPaginator returns a new DescribeInstanceTypesPaginator -func NewDescribeInstanceTypesPaginator(client DescribeInstanceTypesAPIClient, params *DescribeInstanceTypesInput, optFns ...func(*DescribeInstanceTypesPaginatorOptions)) *DescribeInstanceTypesPaginator { - if params == nil { - params = &DescribeInstanceTypesInput{} - } - - options := DescribeInstanceTypesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstanceTypesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstanceTypesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstanceTypes page. -func (p *DescribeInstanceTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstanceTypesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstanceTypes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeInstanceTypes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstanceTypes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go deleted file mode 100644 index 07221ea89..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInstances.go +++ /dev/null @@ -1,1452 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "strconv" - "time" -) - -// Describes the specified instances or all instances. If you specify instance -// IDs, the output includes information for only the specified instances. If you -// specify filters, the output includes information for only those instances that -// meet the filter criteria. If you do not specify instance IDs or filters, the -// output includes information for all instances, which can affect performance. We -// recommend that you use pagination to ensure that the operation returns quickly -// and successfully. If you specify an instance ID that is not valid, an error is -// returned. If you specify an instance that you do not own, it is not included in -// the output. Recently terminated instances might appear in the returned results. -// This interval is usually less than one hour. If you describe instances in the -// rare case where an Availability Zone is experiencing a service disruption and -// you specify instance IDs that are in the affected zone, or do not specify any -// instance IDs at all, the call fails. If you describe instances and specify only -// instance IDs that are in an unaffected zone, the call works normally. -func (c *Client) DescribeInstances(ctx context.Context, params *DescribeInstancesInput, optFns ...func(*Options)) (*DescribeInstancesOutput, error) { - if params == nil { - params = &DescribeInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInstances", params, optFns, c.addOperationDescribeInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInstancesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - affinity - The affinity setting for an instance running on a Dedicated Host ( - // default | host ). - // - architecture - The instance architecture ( i386 | x86_64 | arm64 ). - // - availability-zone - The Availability Zone of the instance. - // - block-device-mapping.attach-time - The attach time for an EBS volume mapped - // to the instance, for example, 2022-09-15T17:15:20.000Z . - // - block-device-mapping.delete-on-termination - A Boolean that indicates - // whether the EBS volume is deleted on instance termination. - // - block-device-mapping.device-name - The device name specified in the block - // device mapping (for example, /dev/sdh or xvdh ). - // - block-device-mapping.status - The status for the EBS volume ( attaching | - // attached | detaching | detached ). - // - block-device-mapping.volume-id - The volume ID of the EBS volume. - // - boot-mode - The boot mode that was specified by the AMI ( legacy-bios | uefi - // | uefi-preferred ). - // - capacity-reservation-id - The ID of the Capacity Reservation into which the - // instance was launched. - // - capacity-reservation-specification.capacity-reservation-preference - The - // instance's Capacity Reservation preference ( open | none ). - // - - // capacity-reservation-specification.capacity-reservation-target.capacity-reservation-id - // - The ID of the targeted Capacity Reservation. - // - - // capacity-reservation-specification.capacity-reservation-target.capacity-reservation-resource-group-arn - // - The ARN of the targeted Capacity Reservation group. - // - client-token - The idempotency token you provided when you launched the - // instance. - // - current-instance-boot-mode - The boot mode that is used to launch the - // instance at launch or start ( legacy-bios | uefi ). - // - dns-name - The public DNS name of the instance. - // - ebs-optimized - A Boolean that indicates whether the instance is optimized - // for Amazon EBS I/O. - // - ena-support - A Boolean that indicates whether the instance is enabled for - // enhanced networking with ENA. - // - enclave-options.enabled - A Boolean that indicates whether the instance is - // enabled for Amazon Web Services Nitro Enclaves. - // - hibernation-options.configured - A Boolean that indicates whether the - // instance is enabled for hibernation. A value of true means that the instance - // is enabled for hibernation. - // - host-id - The ID of the Dedicated Host on which the instance is running, if - // applicable. - // - hypervisor - The hypervisor type of the instance ( ovm | xen ). The value - // xen is used for both Xen and Nitro hypervisors. - // - iam-instance-profile.arn - The instance profile associated with the - // instance. Specified as an ARN. - // - iam-instance-profile.id - The instance profile associated with the instance. - // Specified as an ID. - // - iam-instance-profile.name - The instance profile associated with the - // instance. Specified as an name. - // - image-id - The ID of the image used to launch the instance. - // - instance-id - The ID of the instance. - // - instance-lifecycle - Indicates whether this is a Spot Instance, a Scheduled - // Instance, or a Capacity Block ( spot | scheduled | capacity-block ). - // - instance-state-code - The state of the instance, as a 16-bit unsigned - // integer. The high byte is used for internal purposes and should be ignored. The - // low byte is set based on the state represented. The valid values are: 0 - // (pending), 16 (running), 32 (shutting-down), 48 (terminated), 64 (stopping), and - // 80 (stopped). - // - instance-state-name - The state of the instance ( pending | running | - // shutting-down | terminated | stopping | stopped ). - // - instance-type - The type of instance (for example, t2.micro ). - // - instance.group-id - The ID of the security group for the instance. - // - instance.group-name - The name of the security group for the instance. - // - ip-address - The public IPv4 address of the instance. - // - ipv6-address - The IPv6 address of the instance. - // - kernel-id - The kernel ID. - // - key-name - The name of the key pair used when the instance was launched. - // - launch-index - When launching multiple instances, this is the index for the - // instance in the launch group (for example, 0, 1, 2, and so on). - // - launch-time - The time when the instance was launched, in the ISO 8601 - // format in the UTC time zone (YYYY-MM-DDThh:mm:ss.sssZ), for example, - // 2021-09-29T11:04:43.305Z . You can use a wildcard ( * ), for example, - // 2021-09-29T* , which matches an entire day. - // - maintenance-options.auto-recovery - The current automatic recovery behavior - // of the instance ( disabled | default ). - // - metadata-options.http-endpoint - The status of access to the HTTP metadata - // endpoint on your instance ( enabled | disabled ) - // - metadata-options.http-protocol-ipv4 - Indicates whether the IPv4 endpoint is - // enabled ( disabled | enabled ). - // - metadata-options.http-protocol-ipv6 - Indicates whether the IPv6 endpoint is - // enabled ( disabled | enabled ). - // - metadata-options.http-put-response-hop-limit - The HTTP metadata request put - // response hop limit (integer, possible values 1 to 64 ) - // - metadata-options.http-tokens - The metadata request authorization state ( - // optional | required ) - // - metadata-options.instance-metadata-tags - The status of access to instance - // tags from the instance metadata ( enabled | disabled ) - // - metadata-options.state - The state of the metadata option changes ( pending - // | applied ). - // - monitoring-state - Indicates whether detailed monitoring is enabled ( - // disabled | enabled ). - // - network-interface.addresses.association.allocation-id - The allocation ID. - // - network-interface.addresses.association.association-id - The association ID. - // - network-interface.addresses.association.carrier-ip - The carrier IP address. - // - network-interface.addresses.association.customer-owned-ip - The - // customer-owned IP address. - // - network-interface.addresses.association.ip-owner-id - The owner ID of the - // private IPv4 address associated with the network interface. - // - network-interface.addresses.association.public-dns-name - The public DNS - // name. - // - network-interface.addresses.association.public-ip - The ID of the - // association of an Elastic IP address (IPv4) with a network interface. - // - network-interface.addresses.primary - Specifies whether the IPv4 address of - // the network interface is the primary private IPv4 address. - // - network-interface.addresses.private-dns-name - The private DNS name. - // - network-interface.addresses.private-ip-address - The private IPv4 address - // associated with the network interface. - // - network-interface.association.allocation-id - The allocation ID returned - // when you allocated the Elastic IP address (IPv4) for your network interface. - // - network-interface.association.association-id - The association ID returned - // when the network interface was associated with an IPv4 address. - // - network-interface.association.carrier-ip - The customer-owned IP address. - // - network-interface.association.customer-owned-ip - The customer-owned IP - // address. - // - network-interface.association.ip-owner-id - The owner of the Elastic IP - // address (IPv4) associated with the network interface. - // - network-interface.association.public-dns-name - The public DNS name. - // - network-interface.association.public-ip - The address of the Elastic IP - // address (IPv4) bound to the network interface. - // - network-interface.attachment.attach-time - The time that the network - // interface was attached to an instance. - // - network-interface.attachment.attachment-id - The ID of the interface - // attachment. - // - network-interface.attachment.delete-on-termination - Specifies whether the - // attachment is deleted when an instance is terminated. - // - network-interface.attachment.device-index - The device index to which the - // network interface is attached. - // - network-interface.attachment.instance-id - The ID of the instance to which - // the network interface is attached. - // - network-interface.attachment.instance-owner-id - The owner ID of the - // instance to which the network interface is attached. - // - network-interface.attachment.network-card-index - The index of the network - // card. - // - network-interface.attachment.status - The status of the attachment ( - // attaching | attached | detaching | detached ). - // - network-interface.availability-zone - The Availability Zone for the network - // interface. - // - network-interface.deny-all-igw-traffic - A Boolean that indicates whether a - // network interface with an IPv6 address is unreachable from the public internet. - // - network-interface.description - The description of the network interface. - // - network-interface.group-id - The ID of a security group associated with the - // network interface. - // - network-interface.group-name - The name of a security group associated with - // the network interface. - // - network-interface.ipv4-prefixes.ipv4-prefix - The IPv4 prefixes that are - // assigned to the network interface. - // - network-interface.ipv6-address - The IPv6 address associated with the - // network interface. - // - network-interface.ipv6-addresses.ipv6-address - The IPv6 address associated - // with the network interface. - // - network-interface.ipv6-addresses.is-primary-ipv6 - A Boolean that indicates - // whether this is the primary IPv6 address. - // - network-interface.ipv6-native - A Boolean that indicates whether this is an - // IPv6 only network interface. - // - network-interface.ipv6-prefixes.ipv6-prefix - The IPv6 prefix assigned to - // the network interface. - // - network-interface.mac-address - The MAC address of the network interface. - // - network-interface.network-interface-id - The ID of the network interface. - // - network-interface.outpost-arn - The ARN of the Outpost. - // - network-interface.owner-id - The ID of the owner of the network interface. - // - network-interface.private-dns-name - The private DNS name of the network - // interface. - // - network-interface.private-ip-address - The private IPv4 address. - // - network-interface.public-dns-name - The public DNS name. - // - network-interface.requester-id - The requester ID for the network interface. - // - network-interface.requester-managed - Indicates whether the network - // interface is being managed by Amazon Web Services. - // - network-interface.status - The status of the network interface ( available ) - // | in-use ). - // - network-interface.source-dest-check - Whether the network interface performs - // source/destination checking. A value of true means that checking is enabled, - // and false means that checking is disabled. The value must be false for the - // network interface to perform network address translation (NAT) in your VPC. - // - network-interface.subnet-id - The ID of the subnet for the network - // interface. - // - network-interface.tag-key - The key of a tag assigned to the network - // interface. - // - network-interface.tag-value - The value of a tag assigned to the network - // interface. - // - network-interface.vpc-id - The ID of the VPC for the network interface. - // - outpost-arn - The Amazon Resource Name (ARN) of the Outpost. - // - owner-id - The Amazon Web Services account ID of the instance owner. - // - placement-group-name - The name of the placement group for the instance. - // - placement-partition-number - The partition in which the instance is located. - // - platform - The platform. To list only Windows instances, use windows . - // - platform-details - The platform ( Linux/UNIX | Red Hat BYOL Linux | Red Hat - // Enterprise Linux | Red Hat Enterprise Linux with HA | Red Hat Enterprise - // Linux with SQL Server Standard and HA | Red Hat Enterprise Linux with SQL - // Server Enterprise and HA | Red Hat Enterprise Linux with SQL Server Standard | - // Red Hat Enterprise Linux with SQL Server Web | Red Hat Enterprise Linux with - // SQL Server Enterprise | SQL Server Enterprise | SQL Server Standard | SQL - // Server Web | SUSE Linux | Ubuntu Pro | Windows | Windows BYOL | Windows with - // SQL Server Enterprise | Windows with SQL Server Standard | Windows with SQL - // Server Web ). - // - private-dns-name - The private IPv4 DNS name of the instance. - // - private-dns-name-options.enable-resource-name-dns-a-record - A Boolean that - // indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - // - private-dns-name-options.enable-resource-name-dns-aaaa-record - A Boolean - // that indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - // - private-dns-name-options.hostname-type - The type of hostname ( ip-name | - // resource-name ). - // - private-ip-address - The private IPv4 address of the instance. - // - product-code - The product code associated with the AMI used to launch the - // instance. - // - product-code.type - The type of product code ( devpay | marketplace ). - // - ramdisk-id - The RAM disk ID. - // - reason - The reason for the current state of the instance (for example, - // shows "User Initiated [date]" when you stop or terminate the instance). Similar - // to the state-reason-code filter. - // - requester-id - The ID of the entity that launched the instance on your - // behalf (for example, Amazon Web Services Management Console, Auto Scaling, and - // so on). - // - reservation-id - The ID of the instance's reservation. A reservation ID is - // created any time you launch an instance. A reservation ID has a one-to-one - // relationship with an instance launch request, but can be associated with more - // than one instance if you launch multiple instances using the same launch - // request. For example, if you launch one instance, you get one reservation ID. If - // you launch ten instances using the same launch request, you also get one - // reservation ID. - // - root-device-name - The device name of the root device volume (for example, - // /dev/sda1 ). - // - root-device-type - The type of the root device volume ( ebs | instance-store - // ). - // - source-dest-check - Indicates whether the instance performs - // source/destination checking. A value of true means that checking is enabled, - // and false means that checking is disabled. The value must be false for the - // instance to perform network address translation (NAT) in your VPC. - // - spot-instance-request-id - The ID of the Spot Instance request. - // - state-reason-code - The reason code for the state change. - // - state-reason-message - A message that describes the state change. - // - subnet-id - The ID of the subnet for the instance. - // - tag: - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources that have a tag with a specific key, regardless of the tag value. - // - tenancy - The tenancy of an instance ( dedicated | default | host ). - // - tpm-support - Indicates if the instance is configured for NitroTPM support ( - // v2.0 ). - // - usage-operation - The usage operation value for the instance ( RunInstances - // | RunInstances:00g0 | RunInstances:0010 | RunInstances:1010 | - // RunInstances:1014 | RunInstances:1110 | RunInstances:0014 | RunInstances:0210 - // | RunInstances:0110 | RunInstances:0100 | RunInstances:0004 | - // RunInstances:0200 | RunInstances:000g | RunInstances:0g00 | RunInstances:0002 - // | RunInstances:0800 | RunInstances:0102 | RunInstances:0006 | - // RunInstances:0202 ). - // - usage-operation-update-time - The time that the usage operation was last - // updated, for example, 2022-09-15T17:15:20.000Z . - // - virtualization-type - The virtualization type of the instance ( paravirtual - // | hvm ). - // - vpc-id - The ID of the VPC that the instance is running in. - Filters []types.Filter - - // The instance IDs. Default: Describes all your instances. - InstanceIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the instance IDs parameter in the same - // request. - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInstancesOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the reservations. - Reservations []types.Reservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInstancesAPIClient is a client that implements the DescribeInstances -// operation. -type DescribeInstancesAPIClient interface { - DescribeInstances(context.Context, *DescribeInstancesInput, ...func(*Options)) (*DescribeInstancesOutput, error) -} - -var _ DescribeInstancesAPIClient = (*Client)(nil) - -// DescribeInstancesPaginatorOptions is the paginator options for DescribeInstances -type DescribeInstancesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the instance IDs parameter in the same - // request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInstancesPaginator is a paginator for DescribeInstances -type DescribeInstancesPaginator struct { - options DescribeInstancesPaginatorOptions - client DescribeInstancesAPIClient - params *DescribeInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeInstancesPaginator returns a new DescribeInstancesPaginator -func NewDescribeInstancesPaginator(client DescribeInstancesAPIClient, params *DescribeInstancesInput, optFns ...func(*DescribeInstancesPaginatorOptions)) *DescribeInstancesPaginator { - if params == nil { - params = &DescribeInstancesInput{} - } - - options := DescribeInstancesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInstances page. -func (p *DescribeInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// InstanceExistsWaiterOptions are waiter options for InstanceExistsWaiter -type InstanceExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // InstanceExistsWaiter will use default minimum delay of 5 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, InstanceExistsWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error) -} - -// InstanceExistsWaiter defines the waiters for InstanceExists -type InstanceExistsWaiter struct { - client DescribeInstancesAPIClient - - options InstanceExistsWaiterOptions -} - -// NewInstanceExistsWaiter constructs a InstanceExistsWaiter. -func NewInstanceExistsWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceExistsWaiterOptions)) *InstanceExistsWaiter { - options := InstanceExistsWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = instanceExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &InstanceExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for InstanceExists waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *InstanceExistsWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for InstanceExists waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *InstanceExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceExistsWaiterOptions)) (*DescribeInstancesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for InstanceExists waiter") -} - -func instanceExistsStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("length(Reservations[]) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "true" - bv, err := strconv.ParseBool(expectedValue) - if err != nil { - return false, fmt.Errorf("error parsing boolean from string %w", err) - } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidInstanceID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -// InstanceRunningWaiterOptions are waiter options for InstanceRunningWaiter -type InstanceRunningWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // InstanceRunningWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, InstanceRunningWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error) -} - -// InstanceRunningWaiter defines the waiters for InstanceRunning -type InstanceRunningWaiter struct { - client DescribeInstancesAPIClient - - options InstanceRunningWaiterOptions -} - -// NewInstanceRunningWaiter constructs a InstanceRunningWaiter. -func NewInstanceRunningWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceRunningWaiterOptions)) *InstanceRunningWaiter { - options := InstanceRunningWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = instanceRunningStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &InstanceRunningWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for InstanceRunning waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *InstanceRunningWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceRunningWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for InstanceRunning waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *InstanceRunningWaiter) WaitForOutput(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceRunningWaiterOptions)) (*DescribeInstancesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for InstanceRunning waiter") -} - -func instanceRunningStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "running" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "shutting-down" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "terminated" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "stopping" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidInstanceID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -// InstanceStoppedWaiterOptions are waiter options for InstanceStoppedWaiter -type InstanceStoppedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // InstanceStoppedWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, InstanceStoppedWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error) -} - -// InstanceStoppedWaiter defines the waiters for InstanceStopped -type InstanceStoppedWaiter struct { - client DescribeInstancesAPIClient - - options InstanceStoppedWaiterOptions -} - -// NewInstanceStoppedWaiter constructs a InstanceStoppedWaiter. -func NewInstanceStoppedWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceStoppedWaiterOptions)) *InstanceStoppedWaiter { - options := InstanceStoppedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = instanceStoppedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &InstanceStoppedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for InstanceStopped waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *InstanceStoppedWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceStoppedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for InstanceStopped waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *InstanceStoppedWaiter) WaitForOutput(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceStoppedWaiterOptions)) (*DescribeInstancesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for InstanceStopped waiter") -} - -func instanceStoppedStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "stopped" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "pending" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "terminated" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -// InstanceTerminatedWaiterOptions are waiter options for InstanceTerminatedWaiter -type InstanceTerminatedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // InstanceTerminatedWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, InstanceTerminatedWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInstancesInput, *DescribeInstancesOutput, error) (bool, error) -} - -// InstanceTerminatedWaiter defines the waiters for InstanceTerminated -type InstanceTerminatedWaiter struct { - client DescribeInstancesAPIClient - - options InstanceTerminatedWaiterOptions -} - -// NewInstanceTerminatedWaiter constructs a InstanceTerminatedWaiter. -func NewInstanceTerminatedWaiter(client DescribeInstancesAPIClient, optFns ...func(*InstanceTerminatedWaiterOptions)) *InstanceTerminatedWaiter { - options := InstanceTerminatedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = instanceTerminatedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &InstanceTerminatedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for InstanceTerminated waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *InstanceTerminatedWaiter) Wait(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceTerminatedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for InstanceTerminated waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *InstanceTerminatedWaiter) WaitForOutput(ctx context.Context, params *DescribeInstancesInput, maxWaitDur time.Duration, optFns ...func(*InstanceTerminatedWaiterOptions)) (*DescribeInstancesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInstances(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for InstanceTerminated waiter") -} - -func instanceTerminatedStateRetryable(ctx context.Context, input *DescribeInstancesInput, output *DescribeInstancesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "terminated" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "pending" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("Reservations[].Instances[].State.Name", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "stopping" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.InstanceStateName) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.InstanceStateName value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go deleted file mode 100644 index 7812f4d44..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeInternetGateways.go +++ /dev/null @@ -1,458 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "strconv" - "time" -) - -// Describes one or more of your internet gateways. -func (c *Client) DescribeInternetGateways(ctx context.Context, params *DescribeInternetGatewaysInput, optFns ...func(*Options)) (*DescribeInternetGatewaysOutput, error) { - if params == nil { - params = &DescribeInternetGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeInternetGateways", params, optFns, c.addOperationDescribeInternetGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeInternetGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeInternetGatewaysInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - attachment.state - The current state of the attachment between the gateway - // and the VPC ( available ). Present only if a VPC is attached. - // - attachment.vpc-id - The ID of an attached VPC. - // - internet-gateway-id - The ID of the Internet gateway. - // - owner-id - The ID of the Amazon Web Services account that owns the internet - // gateway. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The IDs of the internet gateways. Default: Describes all your internet gateways. - InternetGatewayIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeInternetGatewaysOutput struct { - - // Information about one or more internet gateways. - InternetGateways []types.InternetGateway - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeInternetGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeInternetGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeInternetGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeInternetGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeInternetGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeInternetGatewaysAPIClient is a client that implements the -// DescribeInternetGateways operation. -type DescribeInternetGatewaysAPIClient interface { - DescribeInternetGateways(context.Context, *DescribeInternetGatewaysInput, ...func(*Options)) (*DescribeInternetGatewaysOutput, error) -} - -var _ DescribeInternetGatewaysAPIClient = (*Client)(nil) - -// DescribeInternetGatewaysPaginatorOptions is the paginator options for -// DescribeInternetGateways -type DescribeInternetGatewaysPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeInternetGatewaysPaginator is a paginator for DescribeInternetGateways -type DescribeInternetGatewaysPaginator struct { - options DescribeInternetGatewaysPaginatorOptions - client DescribeInternetGatewaysAPIClient - params *DescribeInternetGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeInternetGatewaysPaginator returns a new -// DescribeInternetGatewaysPaginator -func NewDescribeInternetGatewaysPaginator(client DescribeInternetGatewaysAPIClient, params *DescribeInternetGatewaysInput, optFns ...func(*DescribeInternetGatewaysPaginatorOptions)) *DescribeInternetGatewaysPaginator { - if params == nil { - params = &DescribeInternetGatewaysInput{} - } - - options := DescribeInternetGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeInternetGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeInternetGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeInternetGateways page. -func (p *DescribeInternetGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeInternetGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeInternetGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// InternetGatewayExistsWaiterOptions are waiter options for -// InternetGatewayExistsWaiter -type InternetGatewayExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // InternetGatewayExistsWaiter will use default minimum delay of 5 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, InternetGatewayExistsWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeInternetGatewaysInput, *DescribeInternetGatewaysOutput, error) (bool, error) -} - -// InternetGatewayExistsWaiter defines the waiters for InternetGatewayExists -type InternetGatewayExistsWaiter struct { - client DescribeInternetGatewaysAPIClient - - options InternetGatewayExistsWaiterOptions -} - -// NewInternetGatewayExistsWaiter constructs a InternetGatewayExistsWaiter. -func NewInternetGatewayExistsWaiter(client DescribeInternetGatewaysAPIClient, optFns ...func(*InternetGatewayExistsWaiterOptions)) *InternetGatewayExistsWaiter { - options := InternetGatewayExistsWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = internetGatewayExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &InternetGatewayExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for InternetGatewayExists waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *InternetGatewayExistsWaiter) Wait(ctx context.Context, params *DescribeInternetGatewaysInput, maxWaitDur time.Duration, optFns ...func(*InternetGatewayExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for InternetGatewayExists waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *InternetGatewayExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeInternetGatewaysInput, maxWaitDur time.Duration, optFns ...func(*InternetGatewayExistsWaiterOptions)) (*DescribeInternetGatewaysOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeInternetGateways(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for InternetGatewayExists waiter") -} - -func internetGatewayExistsStateRetryable(ctx context.Context, input *DescribeInternetGatewaysInput, output *DescribeInternetGatewaysOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("length(InternetGateways[].InternetGatewayId) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "true" - bv, err := strconv.ParseBool(expectedValue) - if err != nil { - return false, fmt.Errorf("error parsing boolean from string %w", err) - } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidInternetGateway.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeInternetGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeInternetGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamByoasn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamByoasn.go deleted file mode 100644 index 9833a3dce..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamByoasn.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your Autonomous System Numbers (ASNs), their provisioning statuses, -// and the BYOIP CIDRs with which they are associated. For more information, see -// Tutorial: Bring your ASN to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html) -// in the Amazon VPC IPAM guide. -func (c *Client) DescribeIpamByoasn(ctx context.Context, params *DescribeIpamByoasnInput, optFns ...func(*Options)) (*DescribeIpamByoasnOutput, error) { - if params == nil { - params = &DescribeIpamByoasnInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpamByoasn", params, optFns, c.addOperationDescribeIpamByoasnMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpamByoasnOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpamByoasnInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIpamByoasnOutput struct { - - // ASN and BYOIP CIDR associations. - Byoasns []types.Byoasn - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpamByoasnMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpamByoasn{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpamByoasn{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpamByoasn"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamByoasn(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeIpamByoasn(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpamByoasn", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamPools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamPools.go deleted file mode 100644 index c40a86050..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamPools.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get information about your IPAM pools. -func (c *Client) DescribeIpamPools(ctx context.Context, params *DescribeIpamPoolsInput, optFns ...func(*Options)) (*DescribeIpamPoolsOutput, error) { - if params == nil { - params = &DescribeIpamPoolsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpamPools", params, optFns, c.addOperationDescribeIpamPoolsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpamPoolsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpamPoolsInput struct { - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters for the request. For more information about filtering, see - // Filtering CLI output (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html) - // . - Filters []types.Filter - - // The IDs of the IPAM pools you would like information on. - IpamPoolIds []string - - // The maximum number of results to return in the request. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIpamPoolsOutput struct { - - // Information about the IPAM pools. - IpamPools []types.IpamPool - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpamPoolsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpamPools{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpamPools{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpamPools"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamPools(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIpamPoolsAPIClient is a client that implements the DescribeIpamPools -// operation. -type DescribeIpamPoolsAPIClient interface { - DescribeIpamPools(context.Context, *DescribeIpamPoolsInput, ...func(*Options)) (*DescribeIpamPoolsOutput, error) -} - -var _ DescribeIpamPoolsAPIClient = (*Client)(nil) - -// DescribeIpamPoolsPaginatorOptions is the paginator options for DescribeIpamPools -type DescribeIpamPoolsPaginatorOptions struct { - // The maximum number of results to return in the request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIpamPoolsPaginator is a paginator for DescribeIpamPools -type DescribeIpamPoolsPaginator struct { - options DescribeIpamPoolsPaginatorOptions - client DescribeIpamPoolsAPIClient - params *DescribeIpamPoolsInput - nextToken *string - firstPage bool -} - -// NewDescribeIpamPoolsPaginator returns a new DescribeIpamPoolsPaginator -func NewDescribeIpamPoolsPaginator(client DescribeIpamPoolsAPIClient, params *DescribeIpamPoolsInput, optFns ...func(*DescribeIpamPoolsPaginatorOptions)) *DescribeIpamPoolsPaginator { - if params == nil { - params = &DescribeIpamPoolsInput{} - } - - options := DescribeIpamPoolsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIpamPoolsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIpamPoolsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIpamPools page. -func (p *DescribeIpamPoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpamPoolsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIpamPools(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIpamPools(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpamPools", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamResourceDiscoveries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamResourceDiscoveries.go deleted file mode 100644 index 8ea86b241..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamResourceDiscoveries.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes IPAM resource discoveries. A resource discovery is an IPAM component -// that enables IPAM to manage and monitor resources that belong to the owning -// account. -func (c *Client) DescribeIpamResourceDiscoveries(ctx context.Context, params *DescribeIpamResourceDiscoveriesInput, optFns ...func(*Options)) (*DescribeIpamResourceDiscoveriesOutput, error) { - if params == nil { - params = &DescribeIpamResourceDiscoveriesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpamResourceDiscoveries", params, optFns, c.addOperationDescribeIpamResourceDiscoveriesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpamResourceDiscoveriesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpamResourceDiscoveriesInput struct { - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The resource discovery filters. - Filters []types.Filter - - // The IPAM resource discovery IDs. - IpamResourceDiscoveryIds []string - - // The maximum number of resource discoveries to return in one page of results. - MaxResults *int32 - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIpamResourceDiscoveriesOutput struct { - - // The resource discoveries. - IpamResourceDiscoveries []types.IpamResourceDiscovery - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpamResourceDiscoveriesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpamResourceDiscoveries{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpamResourceDiscoveries{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpamResourceDiscoveries"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveries(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIpamResourceDiscoveriesAPIClient is a client that implements the -// DescribeIpamResourceDiscoveries operation. -type DescribeIpamResourceDiscoveriesAPIClient interface { - DescribeIpamResourceDiscoveries(context.Context, *DescribeIpamResourceDiscoveriesInput, ...func(*Options)) (*DescribeIpamResourceDiscoveriesOutput, error) -} - -var _ DescribeIpamResourceDiscoveriesAPIClient = (*Client)(nil) - -// DescribeIpamResourceDiscoveriesPaginatorOptions is the paginator options for -// DescribeIpamResourceDiscoveries -type DescribeIpamResourceDiscoveriesPaginatorOptions struct { - // The maximum number of resource discoveries to return in one page of results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIpamResourceDiscoveriesPaginator is a paginator for -// DescribeIpamResourceDiscoveries -type DescribeIpamResourceDiscoveriesPaginator struct { - options DescribeIpamResourceDiscoveriesPaginatorOptions - client DescribeIpamResourceDiscoveriesAPIClient - params *DescribeIpamResourceDiscoveriesInput - nextToken *string - firstPage bool -} - -// NewDescribeIpamResourceDiscoveriesPaginator returns a new -// DescribeIpamResourceDiscoveriesPaginator -func NewDescribeIpamResourceDiscoveriesPaginator(client DescribeIpamResourceDiscoveriesAPIClient, params *DescribeIpamResourceDiscoveriesInput, optFns ...func(*DescribeIpamResourceDiscoveriesPaginatorOptions)) *DescribeIpamResourceDiscoveriesPaginator { - if params == nil { - params = &DescribeIpamResourceDiscoveriesInput{} - } - - options := DescribeIpamResourceDiscoveriesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIpamResourceDiscoveriesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIpamResourceDiscoveriesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIpamResourceDiscoveries page. -func (p *DescribeIpamResourceDiscoveriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpamResourceDiscoveriesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIpamResourceDiscoveries(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveries(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpamResourceDiscoveries", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go deleted file mode 100644 index 7fee30b66..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamResourceDiscoveryAssociations.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes resource discovery association with an Amazon VPC IPAM. An associated -// resource discovery is a resource discovery that has been associated with an -// IPAM.. -func (c *Client) DescribeIpamResourceDiscoveryAssociations(ctx context.Context, params *DescribeIpamResourceDiscoveryAssociationsInput, optFns ...func(*Options)) (*DescribeIpamResourceDiscoveryAssociationsOutput, error) { - if params == nil { - params = &DescribeIpamResourceDiscoveryAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpamResourceDiscoveryAssociations", params, optFns, c.addOperationDescribeIpamResourceDiscoveryAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpamResourceDiscoveryAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpamResourceDiscoveryAssociationsInput struct { - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The resource discovery association filters. - Filters []types.Filter - - // The resource discovery association IDs. - IpamResourceDiscoveryAssociationIds []string - - // The maximum number of resource discovery associations to return in one page of - // results. - MaxResults *int32 - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIpamResourceDiscoveryAssociationsOutput struct { - - // The resource discovery associations. - IpamResourceDiscoveryAssociations []types.IpamResourceDiscoveryAssociation - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpamResourceDiscoveryAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpamResourceDiscoveryAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpamResourceDiscoveryAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveryAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIpamResourceDiscoveryAssociationsAPIClient is a client that implements -// the DescribeIpamResourceDiscoveryAssociations operation. -type DescribeIpamResourceDiscoveryAssociationsAPIClient interface { - DescribeIpamResourceDiscoveryAssociations(context.Context, *DescribeIpamResourceDiscoveryAssociationsInput, ...func(*Options)) (*DescribeIpamResourceDiscoveryAssociationsOutput, error) -} - -var _ DescribeIpamResourceDiscoveryAssociationsAPIClient = (*Client)(nil) - -// DescribeIpamResourceDiscoveryAssociationsPaginatorOptions is the paginator -// options for DescribeIpamResourceDiscoveryAssociations -type DescribeIpamResourceDiscoveryAssociationsPaginatorOptions struct { - // The maximum number of resource discovery associations to return in one page of - // results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIpamResourceDiscoveryAssociationsPaginator is a paginator for -// DescribeIpamResourceDiscoveryAssociations -type DescribeIpamResourceDiscoveryAssociationsPaginator struct { - options DescribeIpamResourceDiscoveryAssociationsPaginatorOptions - client DescribeIpamResourceDiscoveryAssociationsAPIClient - params *DescribeIpamResourceDiscoveryAssociationsInput - nextToken *string - firstPage bool -} - -// NewDescribeIpamResourceDiscoveryAssociationsPaginator returns a new -// DescribeIpamResourceDiscoveryAssociationsPaginator -func NewDescribeIpamResourceDiscoveryAssociationsPaginator(client DescribeIpamResourceDiscoveryAssociationsAPIClient, params *DescribeIpamResourceDiscoveryAssociationsInput, optFns ...func(*DescribeIpamResourceDiscoveryAssociationsPaginatorOptions)) *DescribeIpamResourceDiscoveryAssociationsPaginator { - if params == nil { - params = &DescribeIpamResourceDiscoveryAssociationsInput{} - } - - options := DescribeIpamResourceDiscoveryAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIpamResourceDiscoveryAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIpamResourceDiscoveryAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIpamResourceDiscoveryAssociations page. -func (p *DescribeIpamResourceDiscoveryAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpamResourceDiscoveryAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIpamResourceDiscoveryAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIpamResourceDiscoveryAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpamResourceDiscoveryAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamScopes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamScopes.go deleted file mode 100644 index b7c5219bf..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpamScopes.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get information about your IPAM scopes. -func (c *Client) DescribeIpamScopes(ctx context.Context, params *DescribeIpamScopesInput, optFns ...func(*Options)) (*DescribeIpamScopesOutput, error) { - if params == nil { - params = &DescribeIpamScopesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpamScopes", params, optFns, c.addOperationDescribeIpamScopesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpamScopesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpamScopesInput struct { - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters for the request. For more information about filtering, see - // Filtering CLI output (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html) - // . - Filters []types.Filter - - // The IDs of the scopes you want information on. - IpamScopeIds []string - - // The maximum number of results to return in the request. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIpamScopesOutput struct { - - // The scopes you want information on. - IpamScopes []types.IpamScope - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpamScopesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpamScopes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpamScopes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpamScopes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpamScopes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIpamScopesAPIClient is a client that implements the DescribeIpamScopes -// operation. -type DescribeIpamScopesAPIClient interface { - DescribeIpamScopes(context.Context, *DescribeIpamScopesInput, ...func(*Options)) (*DescribeIpamScopesOutput, error) -} - -var _ DescribeIpamScopesAPIClient = (*Client)(nil) - -// DescribeIpamScopesPaginatorOptions is the paginator options for -// DescribeIpamScopes -type DescribeIpamScopesPaginatorOptions struct { - // The maximum number of results to return in the request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIpamScopesPaginator is a paginator for DescribeIpamScopes -type DescribeIpamScopesPaginator struct { - options DescribeIpamScopesPaginatorOptions - client DescribeIpamScopesAPIClient - params *DescribeIpamScopesInput - nextToken *string - firstPage bool -} - -// NewDescribeIpamScopesPaginator returns a new DescribeIpamScopesPaginator -func NewDescribeIpamScopesPaginator(client DescribeIpamScopesAPIClient, params *DescribeIpamScopesInput, optFns ...func(*DescribeIpamScopesPaginatorOptions)) *DescribeIpamScopesPaginator { - if params == nil { - params = &DescribeIpamScopesInput{} - } - - options := DescribeIpamScopesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIpamScopesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIpamScopesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIpamScopes page. -func (p *DescribeIpamScopesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpamScopesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIpamScopes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIpamScopes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpamScopes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpams.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpams.go deleted file mode 100644 index cf864c25c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpams.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get information about your IPAM pools. For more information, see What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) DescribeIpams(ctx context.Context, params *DescribeIpamsInput, optFns ...func(*Options)) (*DescribeIpamsOutput, error) { - if params == nil { - params = &DescribeIpamsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpams", params, optFns, c.addOperationDescribeIpamsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpamsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpamsInput struct { - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters for the request. For more information about filtering, see - // Filtering CLI output (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html) - // . - Filters []types.Filter - - // The IDs of the IPAMs you want information on. - IpamIds []string - - // The maximum number of results to return in the request. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeIpamsOutput struct { - - // Information about the IPAMs. - Ipams []types.Ipam - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpamsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpams{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpams{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpams"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpams(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIpamsAPIClient is a client that implements the DescribeIpams operation. -type DescribeIpamsAPIClient interface { - DescribeIpams(context.Context, *DescribeIpamsInput, ...func(*Options)) (*DescribeIpamsOutput, error) -} - -var _ DescribeIpamsAPIClient = (*Client)(nil) - -// DescribeIpamsPaginatorOptions is the paginator options for DescribeIpams -type DescribeIpamsPaginatorOptions struct { - // The maximum number of results to return in the request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIpamsPaginator is a paginator for DescribeIpams -type DescribeIpamsPaginator struct { - options DescribeIpamsPaginatorOptions - client DescribeIpamsAPIClient - params *DescribeIpamsInput - nextToken *string - firstPage bool -} - -// NewDescribeIpamsPaginator returns a new DescribeIpamsPaginator -func NewDescribeIpamsPaginator(client DescribeIpamsAPIClient, params *DescribeIpamsInput, optFns ...func(*DescribeIpamsPaginatorOptions)) *DescribeIpamsPaginator { - if params == nil { - params = &DescribeIpamsInput{} - } - - options := DescribeIpamsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIpamsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIpamsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIpams page. -func (p *DescribeIpamsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpamsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIpams(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIpams(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpams", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpv6Pools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpv6Pools.go deleted file mode 100644 index 3945bfa13..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeIpv6Pools.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your IPv6 address pools. -func (c *Client) DescribeIpv6Pools(ctx context.Context, params *DescribeIpv6PoolsInput, optFns ...func(*Options)) (*DescribeIpv6PoolsOutput, error) { - if params == nil { - params = &DescribeIpv6PoolsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeIpv6Pools", params, optFns, c.addOperationDescribeIpv6PoolsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeIpv6PoolsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeIpv6PoolsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the IPv6 address pools. - PoolIds []string - - noSmithyDocumentSerde -} - -type DescribeIpv6PoolsOutput struct { - - // Information about the IPv6 address pools. - Ipv6Pools []types.Ipv6Pool - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeIpv6PoolsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeIpv6Pools{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeIpv6Pools{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeIpv6Pools"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeIpv6Pools(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeIpv6PoolsAPIClient is a client that implements the DescribeIpv6Pools -// operation. -type DescribeIpv6PoolsAPIClient interface { - DescribeIpv6Pools(context.Context, *DescribeIpv6PoolsInput, ...func(*Options)) (*DescribeIpv6PoolsOutput, error) -} - -var _ DescribeIpv6PoolsAPIClient = (*Client)(nil) - -// DescribeIpv6PoolsPaginatorOptions is the paginator options for DescribeIpv6Pools -type DescribeIpv6PoolsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeIpv6PoolsPaginator is a paginator for DescribeIpv6Pools -type DescribeIpv6PoolsPaginator struct { - options DescribeIpv6PoolsPaginatorOptions - client DescribeIpv6PoolsAPIClient - params *DescribeIpv6PoolsInput - nextToken *string - firstPage bool -} - -// NewDescribeIpv6PoolsPaginator returns a new DescribeIpv6PoolsPaginator -func NewDescribeIpv6PoolsPaginator(client DescribeIpv6PoolsAPIClient, params *DescribeIpv6PoolsInput, optFns ...func(*DescribeIpv6PoolsPaginatorOptions)) *DescribeIpv6PoolsPaginator { - if params == nil { - params = &DescribeIpv6PoolsInput{} - } - - options := DescribeIpv6PoolsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeIpv6PoolsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeIpv6PoolsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeIpv6Pools page. -func (p *DescribeIpv6PoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeIpv6PoolsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeIpv6Pools(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeIpv6Pools(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeIpv6Pools", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go deleted file mode 100644 index 89f668b9f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeKeyPairs.go +++ /dev/null @@ -1,360 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "strconv" - "time" -) - -// Describes the specified key pairs or all of your key pairs. For more -// information about key pairs, see Amazon EC2 key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeKeyPairs(ctx context.Context, params *DescribeKeyPairsInput, optFns ...func(*Options)) (*DescribeKeyPairsOutput, error) { - if params == nil { - params = &DescribeKeyPairsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeKeyPairs", params, optFns, c.addOperationDescribeKeyPairsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeKeyPairsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeKeyPairsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - key-pair-id - The ID of the key pair. - // - fingerprint - The fingerprint of the key pair. - // - key-name - The name of the key pair. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - Filters []types.Filter - - // If true , the public key material is included in the response. Default: false - IncludePublicKey *bool - - // The key pair names. Default: Describes all of your key pairs. - KeyNames []string - - // The IDs of the key pairs. - KeyPairIds []string - - noSmithyDocumentSerde -} - -type DescribeKeyPairsOutput struct { - - // Information about the key pairs. - KeyPairs []types.KeyPairInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeKeyPairsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeKeyPairs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeKeyPairs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeKeyPairs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeKeyPairs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeKeyPairsAPIClient is a client that implements the DescribeKeyPairs -// operation. -type DescribeKeyPairsAPIClient interface { - DescribeKeyPairs(context.Context, *DescribeKeyPairsInput, ...func(*Options)) (*DescribeKeyPairsOutput, error) -} - -var _ DescribeKeyPairsAPIClient = (*Client)(nil) - -// KeyPairExistsWaiterOptions are waiter options for KeyPairExistsWaiter -type KeyPairExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // KeyPairExistsWaiter will use default minimum delay of 5 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, KeyPairExistsWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeKeyPairsInput, *DescribeKeyPairsOutput, error) (bool, error) -} - -// KeyPairExistsWaiter defines the waiters for KeyPairExists -type KeyPairExistsWaiter struct { - client DescribeKeyPairsAPIClient - - options KeyPairExistsWaiterOptions -} - -// NewKeyPairExistsWaiter constructs a KeyPairExistsWaiter. -func NewKeyPairExistsWaiter(client DescribeKeyPairsAPIClient, optFns ...func(*KeyPairExistsWaiterOptions)) *KeyPairExistsWaiter { - options := KeyPairExistsWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = keyPairExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &KeyPairExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for KeyPairExists waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *KeyPairExistsWaiter) Wait(ctx context.Context, params *DescribeKeyPairsInput, maxWaitDur time.Duration, optFns ...func(*KeyPairExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for KeyPairExists waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *KeyPairExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeKeyPairsInput, maxWaitDur time.Duration, optFns ...func(*KeyPairExistsWaiterOptions)) (*DescribeKeyPairsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeKeyPairs(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for KeyPairExists waiter") -} - -func keyPairExistsStateRetryable(ctx context.Context, input *DescribeKeyPairsInput, output *DescribeKeyPairsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("length(KeyPairs[].KeyName) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "true" - bv, err := strconv.ParseBool(expectedValue) - if err != nil { - return false, fmt.Errorf("error parsing boolean from string %w", err) - } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidKeyPair.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeKeyPairs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeKeyPairs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplateVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplateVersions.go deleted file mode 100644 index 9a683451b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplateVersions.go +++ /dev/null @@ -1,303 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more versions of a specified launch template. You can describe -// all versions, individual versions, or a range of versions. You can also describe -// all the latest versions or all the default versions of all the launch templates -// in your account. -func (c *Client) DescribeLaunchTemplateVersions(ctx context.Context, params *DescribeLaunchTemplateVersionsInput, optFns ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error) { - if params == nil { - params = &DescribeLaunchTemplateVersionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLaunchTemplateVersions", params, optFns, c.addOperationDescribeLaunchTemplateVersionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLaunchTemplateVersionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLaunchTemplateVersionsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - create-time - The time the launch template version was created. - // - ebs-optimized - A boolean that indicates whether the instance is optimized - // for Amazon EBS I/O. - // - http-endpoint - Indicates whether the HTTP metadata endpoint on your - // instances is enabled ( enabled | disabled ). - // - http-protocol-ipv4 - Indicates whether the IPv4 endpoint for the instance - // metadata service is enabled ( enabled | disabled ). - // - host-resource-group-arn - The ARN of the host resource group in which to - // launch the instances. - // - http-tokens - The state of token usage for your instance metadata requests ( - // optional | required ). - // - iam-instance-profile - The ARN of the IAM instance profile. - // - image-id - The ID of the AMI. - // - instance-type - The instance type. - // - is-default-version - A boolean that indicates whether the launch template - // version is the default version. - // - kernel-id - The kernel ID. - // - license-configuration-arn - The ARN of the license configuration. - // - network-card-index - The index of the network card. - // - ram-disk-id - The RAM disk ID. - Filters []types.Filter - - // The ID of the launch template. To describe one or more versions of a specified - // launch template, you must specify either the LaunchTemplateId or the - // LaunchTemplateName , but not both. To describe all the latest or default launch - // template versions in your account, you must omit this parameter. - LaunchTemplateId *string - - // The name of the launch template. To describe one or more versions of a - // specified launch template, you must specify either the LaunchTemplateName or - // the LaunchTemplateId , but not both. To describe all the latest or default - // launch template versions in your account, you must omit this parameter. - LaunchTemplateName *string - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 1 and 200. - MaxResults *int32 - - // The version number up to which to describe launch template versions. - MaxVersion *string - - // The version number after which to describe launch template versions. - MinVersion *string - - // The token to request the next page of results. - NextToken *string - - // If true , and if a Systems Manager parameter is specified for ImageId , the AMI - // ID is displayed in the response for imageId . If false , and if a Systems - // Manager parameter is specified for ImageId , the parameter is displayed in the - // response for imageId . For more information, see Use a Systems Manager - // parameter instead of an AMI ID (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id) - // in the Amazon Elastic Compute Cloud User Guide. Default: false - ResolveAlias *bool - - // One or more versions of the launch template. Valid values depend on whether you - // are describing a specified launch template (by ID or name) or all launch - // templates in your account. To describe one or more versions of a specified - // launch template, valid values are $Latest , $Default , and numbers. To describe - // all launch templates in your account that are defined as the latest version, the - // valid value is $Latest . To describe all launch templates in your account that - // are defined as the default version, the valid value is $Default . You can - // specify $Latest and $Default in the same request. You cannot specify numbers. - Versions []string - - noSmithyDocumentSerde -} - -type DescribeLaunchTemplateVersionsOutput struct { - - // Information about the launch template versions. - LaunchTemplateVersions []types.LaunchTemplateVersion - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLaunchTemplateVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLaunchTemplateVersions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLaunchTemplateVersions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLaunchTemplateVersions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchTemplateVersions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLaunchTemplateVersionsAPIClient is a client that implements the -// DescribeLaunchTemplateVersions operation. -type DescribeLaunchTemplateVersionsAPIClient interface { - DescribeLaunchTemplateVersions(context.Context, *DescribeLaunchTemplateVersionsInput, ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error) -} - -var _ DescribeLaunchTemplateVersionsAPIClient = (*Client)(nil) - -// DescribeLaunchTemplateVersionsPaginatorOptions is the paginator options for -// DescribeLaunchTemplateVersions -type DescribeLaunchTemplateVersionsPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 1 and 200. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLaunchTemplateVersionsPaginator is a paginator for -// DescribeLaunchTemplateVersions -type DescribeLaunchTemplateVersionsPaginator struct { - options DescribeLaunchTemplateVersionsPaginatorOptions - client DescribeLaunchTemplateVersionsAPIClient - params *DescribeLaunchTemplateVersionsInput - nextToken *string - firstPage bool -} - -// NewDescribeLaunchTemplateVersionsPaginator returns a new -// DescribeLaunchTemplateVersionsPaginator -func NewDescribeLaunchTemplateVersionsPaginator(client DescribeLaunchTemplateVersionsAPIClient, params *DescribeLaunchTemplateVersionsInput, optFns ...func(*DescribeLaunchTemplateVersionsPaginatorOptions)) *DescribeLaunchTemplateVersionsPaginator { - if params == nil { - params = &DescribeLaunchTemplateVersionsInput{} - } - - options := DescribeLaunchTemplateVersionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLaunchTemplateVersionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLaunchTemplateVersionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLaunchTemplateVersions page. -func (p *DescribeLaunchTemplateVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLaunchTemplateVersionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLaunchTemplateVersions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLaunchTemplateVersions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLaunchTemplateVersions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplates.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplates.go deleted file mode 100644 index fa78c90b0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLaunchTemplates.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more launch templates. -func (c *Client) DescribeLaunchTemplates(ctx context.Context, params *DescribeLaunchTemplatesInput, optFns ...func(*Options)) (*DescribeLaunchTemplatesOutput, error) { - if params == nil { - params = &DescribeLaunchTemplatesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLaunchTemplates", params, optFns, c.addOperationDescribeLaunchTemplatesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLaunchTemplatesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLaunchTemplatesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - create-time - The time the launch template was created. - // - launch-template-name - The name of the launch template. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // One or more launch template IDs. - LaunchTemplateIds []string - - // One or more launch template names. - LaunchTemplateNames []string - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 1 and 200. - MaxResults *int32 - - // The token to request the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLaunchTemplatesOutput struct { - - // Information about the launch templates. - LaunchTemplates []types.LaunchTemplate - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLaunchTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLaunchTemplates{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLaunchTemplates{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLaunchTemplates"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLaunchTemplates(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLaunchTemplatesAPIClient is a client that implements the -// DescribeLaunchTemplates operation. -type DescribeLaunchTemplatesAPIClient interface { - DescribeLaunchTemplates(context.Context, *DescribeLaunchTemplatesInput, ...func(*Options)) (*DescribeLaunchTemplatesOutput, error) -} - -var _ DescribeLaunchTemplatesAPIClient = (*Client)(nil) - -// DescribeLaunchTemplatesPaginatorOptions is the paginator options for -// DescribeLaunchTemplates -type DescribeLaunchTemplatesPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. This - // value can be between 1 and 200. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLaunchTemplatesPaginator is a paginator for DescribeLaunchTemplates -type DescribeLaunchTemplatesPaginator struct { - options DescribeLaunchTemplatesPaginatorOptions - client DescribeLaunchTemplatesAPIClient - params *DescribeLaunchTemplatesInput - nextToken *string - firstPage bool -} - -// NewDescribeLaunchTemplatesPaginator returns a new -// DescribeLaunchTemplatesPaginator -func NewDescribeLaunchTemplatesPaginator(client DescribeLaunchTemplatesAPIClient, params *DescribeLaunchTemplatesInput, optFns ...func(*DescribeLaunchTemplatesPaginatorOptions)) *DescribeLaunchTemplatesPaginator { - if params == nil { - params = &DescribeLaunchTemplatesInput{} - } - - options := DescribeLaunchTemplatesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLaunchTemplatesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLaunchTemplatesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLaunchTemplates page. -func (p *DescribeLaunchTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLaunchTemplatesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLaunchTemplates(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLaunchTemplates(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLaunchTemplates", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go deleted file mode 100644 index 084a97485..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the associations between virtual interface groups and local gateway -// route tables. -func (c *Client) DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(ctx context.Context, params *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error) { - if params == nil { - params = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations", params, optFns, c.addOperationDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - local-gateway-id - The ID of a local gateway. - // - local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local - // gateway route table for the virtual interface group. - // - local-gateway-route-table-id - The ID of the local gateway route table. - // - local-gateway-route-table-virtual-interface-group-association-id - The ID of - // the association. - // - local-gateway-route-table-virtual-interface-group-id - The ID of the virtual - // interface group. - // - owner-id - The ID of the Amazon Web Services account that owns the local - // gateway virtual interface group association. - // - state - The state of the association. - Filters []types.Filter - - // The IDs of the associations. - LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds []string - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput struct { - - // Information about the associations. - LocalGatewayRouteTableVirtualInterfaceGroupAssociations []types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient is a -// client that implements the -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations operation. -type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient interface { - DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(context.Context, *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error) -} - -var _ DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient = (*Client)(nil) - -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions -// is the paginator options for -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations -type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator is a -// paginator for DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations -type DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator struct { - options DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions - client DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient - params *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput - nextToken *string - firstPage bool -} - -// NewDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator -// returns a new -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator -func NewDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator(client DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsAPIClient, params *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, optFns ...func(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions)) *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator { - if params == nil { - params = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput{} - } - - options := DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next -// DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations page. -func (p *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go deleted file mode 100644 index c7c183f29..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTableVpcAssociations.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified associations between VPCs and local gateway route -// tables. -func (c *Client) DescribeLocalGatewayRouteTableVpcAssociations(ctx context.Context, params *DescribeLocalGatewayRouteTableVpcAssociationsInput, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error) { - if params == nil { - params = &DescribeLocalGatewayRouteTableVpcAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayRouteTableVpcAssociations", params, optFns, c.addOperationDescribeLocalGatewayRouteTableVpcAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLocalGatewayRouteTableVpcAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLocalGatewayRouteTableVpcAssociationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - local-gateway-id - The ID of a local gateway. - // - local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local - // gateway route table for the association. - // - local-gateway-route-table-id - The ID of the local gateway route table. - // - local-gateway-route-table-vpc-association-id - The ID of the association. - // - owner-id - The ID of the Amazon Web Services account that owns the local - // gateway route table for the association. - // - state - The state of the association. - // - vpc-id - The ID of the VPC. - Filters []types.Filter - - // The IDs of the associations. - LocalGatewayRouteTableVpcAssociationIds []string - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLocalGatewayRouteTableVpcAssociationsOutput struct { - - // Information about the associations. - LocalGatewayRouteTableVpcAssociations []types.LocalGatewayRouteTableVpcAssociation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLocalGatewayRouteTableVpcAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLocalGatewayRouteTableVpcAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVpcAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLocalGatewayRouteTableVpcAssociationsAPIClient is a client that -// implements the DescribeLocalGatewayRouteTableVpcAssociations operation. -type DescribeLocalGatewayRouteTableVpcAssociationsAPIClient interface { - DescribeLocalGatewayRouteTableVpcAssociations(context.Context, *DescribeLocalGatewayRouteTableVpcAssociationsInput, ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error) -} - -var _ DescribeLocalGatewayRouteTableVpcAssociationsAPIClient = (*Client)(nil) - -// DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions is the paginator -// options for DescribeLocalGatewayRouteTableVpcAssociations -type DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLocalGatewayRouteTableVpcAssociationsPaginator is a paginator for -// DescribeLocalGatewayRouteTableVpcAssociations -type DescribeLocalGatewayRouteTableVpcAssociationsPaginator struct { - options DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions - client DescribeLocalGatewayRouteTableVpcAssociationsAPIClient - params *DescribeLocalGatewayRouteTableVpcAssociationsInput - nextToken *string - firstPage bool -} - -// NewDescribeLocalGatewayRouteTableVpcAssociationsPaginator returns a new -// DescribeLocalGatewayRouteTableVpcAssociationsPaginator -func NewDescribeLocalGatewayRouteTableVpcAssociationsPaginator(client DescribeLocalGatewayRouteTableVpcAssociationsAPIClient, params *DescribeLocalGatewayRouteTableVpcAssociationsInput, optFns ...func(*DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions)) *DescribeLocalGatewayRouteTableVpcAssociationsPaginator { - if params == nil { - params = &DescribeLocalGatewayRouteTableVpcAssociationsInput{} - } - - options := DescribeLocalGatewayRouteTableVpcAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLocalGatewayRouteTableVpcAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLocalGatewayRouteTableVpcAssociations page. -func (p *DescribeLocalGatewayRouteTableVpcAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTableVpcAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLocalGatewayRouteTableVpcAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTableVpcAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLocalGatewayRouteTableVpcAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTables.go deleted file mode 100644 index e61573149..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayRouteTables.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more local gateway route tables. By default, all local gateway -// route tables are described. Alternatively, you can filter the results. -func (c *Client) DescribeLocalGatewayRouteTables(ctx context.Context, params *DescribeLocalGatewayRouteTablesInput, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error) { - if params == nil { - params = &DescribeLocalGatewayRouteTablesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayRouteTables", params, optFns, c.addOperationDescribeLocalGatewayRouteTablesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLocalGatewayRouteTablesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLocalGatewayRouteTablesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - local-gateway-id - The ID of a local gateway. - // - local-gateway-route-table-arn - The Amazon Resource Name (ARN) of the local - // gateway route table. - // - local-gateway-route-table-id - The ID of a local gateway route table. - // - outpost-arn - The Amazon Resource Name (ARN) of the Outpost. - // - owner-id - The ID of the Amazon Web Services account that owns the local - // gateway route table. - // - state - The state of the local gateway route table. - Filters []types.Filter - - // The IDs of the local gateway route tables. - LocalGatewayRouteTableIds []string - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLocalGatewayRouteTablesOutput struct { - - // Information about the local gateway route tables. - LocalGatewayRouteTables []types.LocalGatewayRouteTable - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLocalGatewayRouteTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayRouteTables{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayRouteTables{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLocalGatewayRouteTables"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTables(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLocalGatewayRouteTablesAPIClient is a client that implements the -// DescribeLocalGatewayRouteTables operation. -type DescribeLocalGatewayRouteTablesAPIClient interface { - DescribeLocalGatewayRouteTables(context.Context, *DescribeLocalGatewayRouteTablesInput, ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error) -} - -var _ DescribeLocalGatewayRouteTablesAPIClient = (*Client)(nil) - -// DescribeLocalGatewayRouteTablesPaginatorOptions is the paginator options for -// DescribeLocalGatewayRouteTables -type DescribeLocalGatewayRouteTablesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLocalGatewayRouteTablesPaginator is a paginator for -// DescribeLocalGatewayRouteTables -type DescribeLocalGatewayRouteTablesPaginator struct { - options DescribeLocalGatewayRouteTablesPaginatorOptions - client DescribeLocalGatewayRouteTablesAPIClient - params *DescribeLocalGatewayRouteTablesInput - nextToken *string - firstPage bool -} - -// NewDescribeLocalGatewayRouteTablesPaginator returns a new -// DescribeLocalGatewayRouteTablesPaginator -func NewDescribeLocalGatewayRouteTablesPaginator(client DescribeLocalGatewayRouteTablesAPIClient, params *DescribeLocalGatewayRouteTablesInput, optFns ...func(*DescribeLocalGatewayRouteTablesPaginatorOptions)) *DescribeLocalGatewayRouteTablesPaginator { - if params == nil { - params = &DescribeLocalGatewayRouteTablesInput{} - } - - options := DescribeLocalGatewayRouteTablesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLocalGatewayRouteTablesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLocalGatewayRouteTablesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLocalGatewayRouteTables page. -func (p *DescribeLocalGatewayRouteTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayRouteTablesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLocalGatewayRouteTables(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLocalGatewayRouteTables(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLocalGatewayRouteTables", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go deleted file mode 100644 index daadcb497..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaceGroups.go +++ /dev/null @@ -1,251 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified local gateway virtual interface groups. -func (c *Client) DescribeLocalGatewayVirtualInterfaceGroups(ctx context.Context, params *DescribeLocalGatewayVirtualInterfaceGroupsInput, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error) { - if params == nil { - params = &DescribeLocalGatewayVirtualInterfaceGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayVirtualInterfaceGroups", params, optFns, c.addOperationDescribeLocalGatewayVirtualInterfaceGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLocalGatewayVirtualInterfaceGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLocalGatewayVirtualInterfaceGroupsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - local-gateway-id - The ID of a local gateway. - // - local-gateway-virtual-interface-group-id - The ID of the virtual interface - // group. - // - local-gateway-virtual-interface-id - The ID of the virtual interface. - // - owner-id - The ID of the Amazon Web Services account that owns the local - // gateway virtual interface group. - Filters []types.Filter - - // The IDs of the virtual interface groups. - LocalGatewayVirtualInterfaceGroupIds []string - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLocalGatewayVirtualInterfaceGroupsOutput struct { - - // The virtual interface groups. - LocalGatewayVirtualInterfaceGroups []types.LocalGatewayVirtualInterfaceGroup - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLocalGatewayVirtualInterfaceGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLocalGatewayVirtualInterfaceGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaceGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLocalGatewayVirtualInterfaceGroupsAPIClient is a client that implements -// the DescribeLocalGatewayVirtualInterfaceGroups operation. -type DescribeLocalGatewayVirtualInterfaceGroupsAPIClient interface { - DescribeLocalGatewayVirtualInterfaceGroups(context.Context, *DescribeLocalGatewayVirtualInterfaceGroupsInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error) -} - -var _ DescribeLocalGatewayVirtualInterfaceGroupsAPIClient = (*Client)(nil) - -// DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions is the paginator -// options for DescribeLocalGatewayVirtualInterfaceGroups -type DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLocalGatewayVirtualInterfaceGroupsPaginator is a paginator for -// DescribeLocalGatewayVirtualInterfaceGroups -type DescribeLocalGatewayVirtualInterfaceGroupsPaginator struct { - options DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions - client DescribeLocalGatewayVirtualInterfaceGroupsAPIClient - params *DescribeLocalGatewayVirtualInterfaceGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeLocalGatewayVirtualInterfaceGroupsPaginator returns a new -// DescribeLocalGatewayVirtualInterfaceGroupsPaginator -func NewDescribeLocalGatewayVirtualInterfaceGroupsPaginator(client DescribeLocalGatewayVirtualInterfaceGroupsAPIClient, params *DescribeLocalGatewayVirtualInterfaceGroupsInput, optFns ...func(*DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions)) *DescribeLocalGatewayVirtualInterfaceGroupsPaginator { - if params == nil { - params = &DescribeLocalGatewayVirtualInterfaceGroupsInput{} - } - - options := DescribeLocalGatewayVirtualInterfaceGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLocalGatewayVirtualInterfaceGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLocalGatewayVirtualInterfaceGroups page. -func (p *DescribeLocalGatewayVirtualInterfaceGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfaceGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLocalGatewayVirtualInterfaceGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaceGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLocalGatewayVirtualInterfaceGroups", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go deleted file mode 100644 index 0db453a84..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGatewayVirtualInterfaces.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified local gateway virtual interfaces. -func (c *Client) DescribeLocalGatewayVirtualInterfaces(ctx context.Context, params *DescribeLocalGatewayVirtualInterfacesInput, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error) { - if params == nil { - params = &DescribeLocalGatewayVirtualInterfacesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGatewayVirtualInterfaces", params, optFns, c.addOperationDescribeLocalGatewayVirtualInterfacesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLocalGatewayVirtualInterfacesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLocalGatewayVirtualInterfacesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - local-address - The local address. - // - local-bgp-asn - The Border Gateway Protocol (BGP) Autonomous System Number - // (ASN) of the local gateway. - // - local-gateway-id - The ID of the local gateway. - // - local-gateway-virtual-interface-id - The ID of the virtual interface. - // - owner-id - The ID of the Amazon Web Services account that owns the local - // gateway virtual interface. - // - peer-address - The peer address. - // - peer-bgp-asn - The peer BGP ASN. - // - vlan - The ID of the VLAN. - Filters []types.Filter - - // The IDs of the virtual interfaces. - LocalGatewayVirtualInterfaceIds []string - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLocalGatewayVirtualInterfacesOutput struct { - - // Information about the virtual interfaces. - LocalGatewayVirtualInterfaces []types.LocalGatewayVirtualInterface - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLocalGatewayVirtualInterfacesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLocalGatewayVirtualInterfaces"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaces(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLocalGatewayVirtualInterfacesAPIClient is a client that implements the -// DescribeLocalGatewayVirtualInterfaces operation. -type DescribeLocalGatewayVirtualInterfacesAPIClient interface { - DescribeLocalGatewayVirtualInterfaces(context.Context, *DescribeLocalGatewayVirtualInterfacesInput, ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error) -} - -var _ DescribeLocalGatewayVirtualInterfacesAPIClient = (*Client)(nil) - -// DescribeLocalGatewayVirtualInterfacesPaginatorOptions is the paginator options -// for DescribeLocalGatewayVirtualInterfaces -type DescribeLocalGatewayVirtualInterfacesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLocalGatewayVirtualInterfacesPaginator is a paginator for -// DescribeLocalGatewayVirtualInterfaces -type DescribeLocalGatewayVirtualInterfacesPaginator struct { - options DescribeLocalGatewayVirtualInterfacesPaginatorOptions - client DescribeLocalGatewayVirtualInterfacesAPIClient - params *DescribeLocalGatewayVirtualInterfacesInput - nextToken *string - firstPage bool -} - -// NewDescribeLocalGatewayVirtualInterfacesPaginator returns a new -// DescribeLocalGatewayVirtualInterfacesPaginator -func NewDescribeLocalGatewayVirtualInterfacesPaginator(client DescribeLocalGatewayVirtualInterfacesAPIClient, params *DescribeLocalGatewayVirtualInterfacesInput, optFns ...func(*DescribeLocalGatewayVirtualInterfacesPaginatorOptions)) *DescribeLocalGatewayVirtualInterfacesPaginator { - if params == nil { - params = &DescribeLocalGatewayVirtualInterfacesInput{} - } - - options := DescribeLocalGatewayVirtualInterfacesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLocalGatewayVirtualInterfacesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLocalGatewayVirtualInterfacesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLocalGatewayVirtualInterfaces page. -func (p *DescribeLocalGatewayVirtualInterfacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewayVirtualInterfacesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLocalGatewayVirtualInterfaces(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLocalGatewayVirtualInterfaces(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLocalGatewayVirtualInterfaces", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGateways.go deleted file mode 100644 index ada2cf059..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLocalGateways.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more local gateways. By default, all local gateways are -// described. Alternatively, you can filter the results. -func (c *Client) DescribeLocalGateways(ctx context.Context, params *DescribeLocalGatewaysInput, optFns ...func(*Options)) (*DescribeLocalGatewaysOutput, error) { - if params == nil { - params = &DescribeLocalGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLocalGateways", params, optFns, c.addOperationDescribeLocalGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLocalGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLocalGatewaysInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - local-gateway-id - The ID of a local gateway. - // - outpost-arn - The Amazon Resource Name (ARN) of the Outpost. - // - owner-id - The ID of the Amazon Web Services account that owns the local - // gateway. - // - state - The state of the association. - Filters []types.Filter - - // The IDs of the local gateways. - LocalGatewayIds []string - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeLocalGatewaysOutput struct { - - // Information about the local gateways. - LocalGateways []types.LocalGateway - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLocalGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLocalGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLocalGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLocalGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLocalGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeLocalGatewaysAPIClient is a client that implements the -// DescribeLocalGateways operation. -type DescribeLocalGatewaysAPIClient interface { - DescribeLocalGateways(context.Context, *DescribeLocalGatewaysInput, ...func(*Options)) (*DescribeLocalGatewaysOutput, error) -} - -var _ DescribeLocalGatewaysAPIClient = (*Client)(nil) - -// DescribeLocalGatewaysPaginatorOptions is the paginator options for -// DescribeLocalGateways -type DescribeLocalGatewaysPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeLocalGatewaysPaginator is a paginator for DescribeLocalGateways -type DescribeLocalGatewaysPaginator struct { - options DescribeLocalGatewaysPaginatorOptions - client DescribeLocalGatewaysAPIClient - params *DescribeLocalGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeLocalGatewaysPaginator returns a new DescribeLocalGatewaysPaginator -func NewDescribeLocalGatewaysPaginator(client DescribeLocalGatewaysAPIClient, params *DescribeLocalGatewaysInput, optFns ...func(*DescribeLocalGatewaysPaginatorOptions)) *DescribeLocalGatewaysPaginator { - if params == nil { - params = &DescribeLocalGatewaysInput{} - } - - options := DescribeLocalGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeLocalGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeLocalGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeLocalGateways page. -func (p *DescribeLocalGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeLocalGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeLocalGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeLocalGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLocalGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLockedSnapshots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLockedSnapshots.go deleted file mode 100644 index 0afb78cea..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeLockedSnapshots.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the lock status for a snapshot. -func (c *Client) DescribeLockedSnapshots(ctx context.Context, params *DescribeLockedSnapshotsInput, optFns ...func(*Options)) (*DescribeLockedSnapshotsOutput, error) { - if params == nil { - params = &DescribeLockedSnapshotsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeLockedSnapshots", params, optFns, c.addOperationDescribeLockedSnapshotsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeLockedSnapshotsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeLockedSnapshotsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - lock-state - The state of the snapshot lock ( compliance-cooloff | - // governance | compliance | expired ). - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the snapshots for which to view the lock status. - SnapshotIds []string - - noSmithyDocumentSerde -} - -type DescribeLockedSnapshotsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the snapshots. - Snapshots []types.LockedSnapshotsInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeLockedSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeLockedSnapshots{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeLockedSnapshots{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLockedSnapshots"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLockedSnapshots(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeLockedSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeLockedSnapshots", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeManagedPrefixLists.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeManagedPrefixLists.go deleted file mode 100644 index cf127131b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeManagedPrefixLists.go +++ /dev/null @@ -1,250 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your managed prefix lists and any Amazon Web Services-managed prefix -// lists. To view the entries for your prefix list, use GetManagedPrefixListEntries -// . -func (c *Client) DescribeManagedPrefixLists(ctx context.Context, params *DescribeManagedPrefixListsInput, optFns ...func(*Options)) (*DescribeManagedPrefixListsOutput, error) { - if params == nil { - params = &DescribeManagedPrefixListsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeManagedPrefixLists", params, optFns, c.addOperationDescribeManagedPrefixListsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeManagedPrefixListsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeManagedPrefixListsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - owner-id - The ID of the prefix list owner. - // - prefix-list-id - The ID of the prefix list. - // - prefix-list-name - The name of the prefix list. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // One or more prefix list IDs. - PrefixListIds []string - - noSmithyDocumentSerde -} - -type DescribeManagedPrefixListsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the prefix lists. - PrefixLists []types.ManagedPrefixList - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeManagedPrefixListsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeManagedPrefixLists{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeManagedPrefixLists{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeManagedPrefixLists"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeManagedPrefixLists(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeManagedPrefixListsAPIClient is a client that implements the -// DescribeManagedPrefixLists operation. -type DescribeManagedPrefixListsAPIClient interface { - DescribeManagedPrefixLists(context.Context, *DescribeManagedPrefixListsInput, ...func(*Options)) (*DescribeManagedPrefixListsOutput, error) -} - -var _ DescribeManagedPrefixListsAPIClient = (*Client)(nil) - -// DescribeManagedPrefixListsPaginatorOptions is the paginator options for -// DescribeManagedPrefixLists -type DescribeManagedPrefixListsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeManagedPrefixListsPaginator is a paginator for -// DescribeManagedPrefixLists -type DescribeManagedPrefixListsPaginator struct { - options DescribeManagedPrefixListsPaginatorOptions - client DescribeManagedPrefixListsAPIClient - params *DescribeManagedPrefixListsInput - nextToken *string - firstPage bool -} - -// NewDescribeManagedPrefixListsPaginator returns a new -// DescribeManagedPrefixListsPaginator -func NewDescribeManagedPrefixListsPaginator(client DescribeManagedPrefixListsAPIClient, params *DescribeManagedPrefixListsInput, optFns ...func(*DescribeManagedPrefixListsPaginatorOptions)) *DescribeManagedPrefixListsPaginator { - if params == nil { - params = &DescribeManagedPrefixListsInput{} - } - - options := DescribeManagedPrefixListsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeManagedPrefixListsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeManagedPrefixListsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeManagedPrefixLists page. -func (p *DescribeManagedPrefixListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeManagedPrefixListsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeManagedPrefixLists(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeManagedPrefixLists(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeManagedPrefixLists", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeMovingAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeMovingAddresses.go deleted file mode 100644 index fa37b607a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeMovingAddresses.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Describes your Elastic IP addresses that are being -// moved from or being restored to the EC2-Classic platform. This request does not -// return information about any other Elastic IP addresses in your account. -func (c *Client) DescribeMovingAddresses(ctx context.Context, params *DescribeMovingAddressesInput, optFns ...func(*Options)) (*DescribeMovingAddressesOutput, error) { - if params == nil { - params = &DescribeMovingAddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeMovingAddresses", params, optFns, c.addOperationDescribeMovingAddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeMovingAddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeMovingAddressesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - moving-status - The status of the Elastic IP address ( MovingToVpc | - // RestoringToClassic ). - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1000; if - // MaxResults is given a value outside of this range, an error is returned. - // Default: If no value is provided, the default is 1000. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // One or more Elastic IP addresses. - PublicIps []string - - noSmithyDocumentSerde -} - -type DescribeMovingAddressesOutput struct { - - // The status for each Elastic IP address. - MovingAddressStatuses []types.MovingAddressStatus - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeMovingAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeMovingAddresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeMovingAddresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMovingAddresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMovingAddresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeMovingAddressesAPIClient is a client that implements the -// DescribeMovingAddresses operation. -type DescribeMovingAddressesAPIClient interface { - DescribeMovingAddresses(context.Context, *DescribeMovingAddressesInput, ...func(*Options)) (*DescribeMovingAddressesOutput, error) -} - -var _ DescribeMovingAddressesAPIClient = (*Client)(nil) - -// DescribeMovingAddressesPaginatorOptions is the paginator options for -// DescribeMovingAddresses -type DescribeMovingAddressesPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1000; if - // MaxResults is given a value outside of this range, an error is returned. - // Default: If no value is provided, the default is 1000. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeMovingAddressesPaginator is a paginator for DescribeMovingAddresses -type DescribeMovingAddressesPaginator struct { - options DescribeMovingAddressesPaginatorOptions - client DescribeMovingAddressesAPIClient - params *DescribeMovingAddressesInput - nextToken *string - firstPage bool -} - -// NewDescribeMovingAddressesPaginator returns a new -// DescribeMovingAddressesPaginator -func NewDescribeMovingAddressesPaginator(client DescribeMovingAddressesAPIClient, params *DescribeMovingAddressesInput, optFns ...func(*DescribeMovingAddressesPaginatorOptions)) *DescribeMovingAddressesPaginator { - if params == nil { - params = &DescribeMovingAddressesInput{} - } - - options := DescribeMovingAddressesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeMovingAddressesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeMovingAddressesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeMovingAddresses page. -func (p *DescribeMovingAddressesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMovingAddressesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeMovingAddresses(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeMovingAddresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeMovingAddresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go deleted file mode 100644 index 43db24ed6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNatGateways.go +++ /dev/null @@ -1,737 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your NAT gateways. -func (c *Client) DescribeNatGateways(ctx context.Context, params *DescribeNatGatewaysInput, optFns ...func(*Options)) (*DescribeNatGatewaysOutput, error) { - if params == nil { - params = &DescribeNatGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNatGateways", params, optFns, c.addOperationDescribeNatGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNatGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeNatGatewaysInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - nat-gateway-id - The ID of the NAT gateway. - // - state - The state of the NAT gateway ( pending | failed | available | - // deleting | deleted ). - // - subnet-id - The ID of the subnet in which the NAT gateway resides. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC in which the NAT gateway resides. - Filter []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The IDs of the NAT gateways. - NatGatewayIds []string - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNatGatewaysOutput struct { - - // Information about the NAT gateways. - NatGateways []types.NatGateway - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNatGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNatGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNatGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNatGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNatGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNatGatewaysAPIClient is a client that implements the -// DescribeNatGateways operation. -type DescribeNatGatewaysAPIClient interface { - DescribeNatGateways(context.Context, *DescribeNatGatewaysInput, ...func(*Options)) (*DescribeNatGatewaysOutput, error) -} - -var _ DescribeNatGatewaysAPIClient = (*Client)(nil) - -// DescribeNatGatewaysPaginatorOptions is the paginator options for -// DescribeNatGateways -type DescribeNatGatewaysPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNatGatewaysPaginator is a paginator for DescribeNatGateways -type DescribeNatGatewaysPaginator struct { - options DescribeNatGatewaysPaginatorOptions - client DescribeNatGatewaysAPIClient - params *DescribeNatGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeNatGatewaysPaginator returns a new DescribeNatGatewaysPaginator -func NewDescribeNatGatewaysPaginator(client DescribeNatGatewaysAPIClient, params *DescribeNatGatewaysInput, optFns ...func(*DescribeNatGatewaysPaginatorOptions)) *DescribeNatGatewaysPaginator { - if params == nil { - params = &DescribeNatGatewaysInput{} - } - - options := DescribeNatGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNatGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNatGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNatGateways page. -func (p *DescribeNatGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNatGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNatGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// NatGatewayAvailableWaiterOptions are waiter options for -// NatGatewayAvailableWaiter -type NatGatewayAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // NatGatewayAvailableWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, NatGatewayAvailableWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeNatGatewaysInput, *DescribeNatGatewaysOutput, error) (bool, error) -} - -// NatGatewayAvailableWaiter defines the waiters for NatGatewayAvailable -type NatGatewayAvailableWaiter struct { - client DescribeNatGatewaysAPIClient - - options NatGatewayAvailableWaiterOptions -} - -// NewNatGatewayAvailableWaiter constructs a NatGatewayAvailableWaiter. -func NewNatGatewayAvailableWaiter(client DescribeNatGatewaysAPIClient, optFns ...func(*NatGatewayAvailableWaiterOptions)) *NatGatewayAvailableWaiter { - options := NatGatewayAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = natGatewayAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &NatGatewayAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for NatGatewayAvailable waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *NatGatewayAvailableWaiter) Wait(ctx context.Context, params *DescribeNatGatewaysInput, maxWaitDur time.Duration, optFns ...func(*NatGatewayAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for NatGatewayAvailable waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *NatGatewayAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeNatGatewaysInput, maxWaitDur time.Duration, optFns ...func(*NatGatewayAvailableWaiterOptions)) (*DescribeNatGatewaysOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeNatGateways(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for NatGatewayAvailable waiter") -} - -func natGatewayAvailableStateRetryable(ctx context.Context, input *DescribeNatGatewaysInput, output *DescribeNatGatewaysOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleting" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "NatGatewayNotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -// NatGatewayDeletedWaiterOptions are waiter options for NatGatewayDeletedWaiter -type NatGatewayDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // NatGatewayDeletedWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, NatGatewayDeletedWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeNatGatewaysInput, *DescribeNatGatewaysOutput, error) (bool, error) -} - -// NatGatewayDeletedWaiter defines the waiters for NatGatewayDeleted -type NatGatewayDeletedWaiter struct { - client DescribeNatGatewaysAPIClient - - options NatGatewayDeletedWaiterOptions -} - -// NewNatGatewayDeletedWaiter constructs a NatGatewayDeletedWaiter. -func NewNatGatewayDeletedWaiter(client DescribeNatGatewaysAPIClient, optFns ...func(*NatGatewayDeletedWaiterOptions)) *NatGatewayDeletedWaiter { - options := NatGatewayDeletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = natGatewayDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &NatGatewayDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for NatGatewayDeleted waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *NatGatewayDeletedWaiter) Wait(ctx context.Context, params *DescribeNatGatewaysInput, maxWaitDur time.Duration, optFns ...func(*NatGatewayDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for NatGatewayDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *NatGatewayDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeNatGatewaysInput, maxWaitDur time.Duration, optFns ...func(*NatGatewayDeletedWaiterOptions)) (*DescribeNatGatewaysOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeNatGateways(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for NatGatewayDeleted waiter") -} - -func natGatewayDeletedStateRetryable(ctx context.Context, input *DescribeNatGatewaysInput, output *DescribeNatGatewaysOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("NatGateways[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.NatGatewayState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NatGatewayState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "NatGatewayNotFound" == apiErr.ErrorCode() { - return false, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeNatGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNatGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkAcls.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkAcls.go deleted file mode 100644 index af8b7ccb1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkAcls.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your network ACLs. For more information, see Network -// ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) in -// the Amazon VPC User Guide. -func (c *Client) DescribeNetworkAcls(ctx context.Context, params *DescribeNetworkAclsInput, optFns ...func(*Options)) (*DescribeNetworkAclsOutput, error) { - if params == nil { - params = &DescribeNetworkAclsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkAcls", params, optFns, c.addOperationDescribeNetworkAclsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkAclsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeNetworkAclsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - association.association-id - The ID of an association ID for the ACL. - // - association.network-acl-id - The ID of the network ACL involved in the - // association. - // - association.subnet-id - The ID of the subnet involved in the association. - // - default - Indicates whether the ACL is the default network ACL for the VPC. - // - entry.cidr - The IPv4 CIDR range specified in the entry. - // - entry.icmp.code - The ICMP code specified in the entry, if any. - // - entry.icmp.type - The ICMP type specified in the entry, if any. - // - entry.ipv6-cidr - The IPv6 CIDR range specified in the entry. - // - entry.port-range.from - The start of the port range specified in the entry. - // - entry.port-range.to - The end of the port range specified in the entry. - // - entry.protocol - The protocol specified in the entry ( tcp | udp | icmp or a - // protocol number). - // - entry.rule-action - Allows or denies the matching traffic ( allow | deny ). - // - entry.egress - A Boolean that indicates the type of rule. Specify true for - // egress rules, or false for ingress rules. - // - entry.rule-number - The number of an entry (in other words, rule) in the set - // of ACL entries. - // - network-acl-id - The ID of the network ACL. - // - owner-id - The ID of the Amazon Web Services account that owns the network - // ACL. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC for the network ACL. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The IDs of the network ACLs. Default: Describes all your network ACLs. - NetworkAclIds []string - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNetworkAclsOutput struct { - - // Information about one or more network ACLs. - NetworkAcls []types.NetworkAcl - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkAclsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkAcls{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkAcls{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkAcls"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkAcls(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkAclsAPIClient is a client that implements the -// DescribeNetworkAcls operation. -type DescribeNetworkAclsAPIClient interface { - DescribeNetworkAcls(context.Context, *DescribeNetworkAclsInput, ...func(*Options)) (*DescribeNetworkAclsOutput, error) -} - -var _ DescribeNetworkAclsAPIClient = (*Client)(nil) - -// DescribeNetworkAclsPaginatorOptions is the paginator options for -// DescribeNetworkAcls -type DescribeNetworkAclsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkAclsPaginator is a paginator for DescribeNetworkAcls -type DescribeNetworkAclsPaginator struct { - options DescribeNetworkAclsPaginatorOptions - client DescribeNetworkAclsAPIClient - params *DescribeNetworkAclsInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkAclsPaginator returns a new DescribeNetworkAclsPaginator -func NewDescribeNetworkAclsPaginator(client DescribeNetworkAclsAPIClient, params *DescribeNetworkAclsInput, optFns ...func(*DescribeNetworkAclsPaginatorOptions)) *DescribeNetworkAclsPaginator { - if params == nil { - params = &DescribeNetworkAclsInput{} - } - - options := DescribeNetworkAclsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkAclsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkAclsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkAcls page. -func (p *DescribeNetworkAclsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkAclsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkAcls(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkAcls(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkAcls", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go deleted file mode 100644 index 12e5c86fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAccessScopeAnalyses.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes the specified Network Access Scope analyses. -func (c *Client) DescribeNetworkInsightsAccessScopeAnalyses(ctx context.Context, params *DescribeNetworkInsightsAccessScopeAnalysesInput, optFns ...func(*Options)) (*DescribeNetworkInsightsAccessScopeAnalysesOutput, error) { - if params == nil { - params = &DescribeNetworkInsightsAccessScopeAnalysesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInsightsAccessScopeAnalyses", params, optFns, c.addOperationDescribeNetworkInsightsAccessScopeAnalysesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInsightsAccessScopeAnalysesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeNetworkInsightsAccessScopeAnalysesInput struct { - - // Filters the results based on the start time. The analysis must have started on - // or after this time. - AnalysisStartTimeBegin *time.Time - - // Filters the results based on the start time. The analysis must have started on - // or before this time. - AnalysisStartTimeEnd *time.Time - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // There are no supported filters. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The IDs of the Network Access Scope analyses. - NetworkInsightsAccessScopeAnalysisIds []string - - // The ID of the Network Access Scope. - NetworkInsightsAccessScopeId *string - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNetworkInsightsAccessScopeAnalysesOutput struct { - - // The Network Access Scope analyses. - NetworkInsightsAccessScopeAnalyses []types.NetworkInsightsAccessScopeAnalysis - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInsightsAccessScopeAnalysesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInsightsAccessScopeAnalyses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopeAnalyses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInsightsAccessScopeAnalyses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopeAnalyses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkInsightsAccessScopeAnalysesAPIClient is a client that implements -// the DescribeNetworkInsightsAccessScopeAnalyses operation. -type DescribeNetworkInsightsAccessScopeAnalysesAPIClient interface { - DescribeNetworkInsightsAccessScopeAnalyses(context.Context, *DescribeNetworkInsightsAccessScopeAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAccessScopeAnalysesOutput, error) -} - -var _ DescribeNetworkInsightsAccessScopeAnalysesAPIClient = (*Client)(nil) - -// DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions is the paginator -// options for DescribeNetworkInsightsAccessScopeAnalyses -type DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInsightsAccessScopeAnalysesPaginator is a paginator for -// DescribeNetworkInsightsAccessScopeAnalyses -type DescribeNetworkInsightsAccessScopeAnalysesPaginator struct { - options DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions - client DescribeNetworkInsightsAccessScopeAnalysesAPIClient - params *DescribeNetworkInsightsAccessScopeAnalysesInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInsightsAccessScopeAnalysesPaginator returns a new -// DescribeNetworkInsightsAccessScopeAnalysesPaginator -func NewDescribeNetworkInsightsAccessScopeAnalysesPaginator(client DescribeNetworkInsightsAccessScopeAnalysesAPIClient, params *DescribeNetworkInsightsAccessScopeAnalysesInput, optFns ...func(*DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions)) *DescribeNetworkInsightsAccessScopeAnalysesPaginator { - if params == nil { - params = &DescribeNetworkInsightsAccessScopeAnalysesInput{} - } - - options := DescribeNetworkInsightsAccessScopeAnalysesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInsightsAccessScopeAnalysesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInsightsAccessScopeAnalysesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInsightsAccessScopeAnalyses page. -func (p *DescribeNetworkInsightsAccessScopeAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInsightsAccessScopeAnalysesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInsightsAccessScopeAnalyses(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopeAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInsightsAccessScopeAnalyses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go deleted file mode 100644 index a4101b7ce..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAccessScopes.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Network Access Scopes. -func (c *Client) DescribeNetworkInsightsAccessScopes(ctx context.Context, params *DescribeNetworkInsightsAccessScopesInput, optFns ...func(*Options)) (*DescribeNetworkInsightsAccessScopesOutput, error) { - if params == nil { - params = &DescribeNetworkInsightsAccessScopesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInsightsAccessScopes", params, optFns, c.addOperationDescribeNetworkInsightsAccessScopesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInsightsAccessScopesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeNetworkInsightsAccessScopesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // There are no supported filters. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The IDs of the Network Access Scopes. - NetworkInsightsAccessScopeIds []string - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNetworkInsightsAccessScopesOutput struct { - - // The Network Access Scopes. - NetworkInsightsAccessScopes []types.NetworkInsightsAccessScope - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInsightsAccessScopesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInsightsAccessScopes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInsightsAccessScopes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkInsightsAccessScopesAPIClient is a client that implements the -// DescribeNetworkInsightsAccessScopes operation. -type DescribeNetworkInsightsAccessScopesAPIClient interface { - DescribeNetworkInsightsAccessScopes(context.Context, *DescribeNetworkInsightsAccessScopesInput, ...func(*Options)) (*DescribeNetworkInsightsAccessScopesOutput, error) -} - -var _ DescribeNetworkInsightsAccessScopesAPIClient = (*Client)(nil) - -// DescribeNetworkInsightsAccessScopesPaginatorOptions is the paginator options -// for DescribeNetworkInsightsAccessScopes -type DescribeNetworkInsightsAccessScopesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInsightsAccessScopesPaginator is a paginator for -// DescribeNetworkInsightsAccessScopes -type DescribeNetworkInsightsAccessScopesPaginator struct { - options DescribeNetworkInsightsAccessScopesPaginatorOptions - client DescribeNetworkInsightsAccessScopesAPIClient - params *DescribeNetworkInsightsAccessScopesInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInsightsAccessScopesPaginator returns a new -// DescribeNetworkInsightsAccessScopesPaginator -func NewDescribeNetworkInsightsAccessScopesPaginator(client DescribeNetworkInsightsAccessScopesAPIClient, params *DescribeNetworkInsightsAccessScopesInput, optFns ...func(*DescribeNetworkInsightsAccessScopesPaginatorOptions)) *DescribeNetworkInsightsAccessScopesPaginator { - if params == nil { - params = &DescribeNetworkInsightsAccessScopesInput{} - } - - options := DescribeNetworkInsightsAccessScopesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInsightsAccessScopesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInsightsAccessScopesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInsightsAccessScopes page. -func (p *DescribeNetworkInsightsAccessScopesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInsightsAccessScopesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInsightsAccessScopes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInsightsAccessScopes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInsightsAccessScopes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go deleted file mode 100644 index ccb3ad5b5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsAnalyses.go +++ /dev/null @@ -1,259 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes one or more of your network insights analyses. -func (c *Client) DescribeNetworkInsightsAnalyses(ctx context.Context, params *DescribeNetworkInsightsAnalysesInput, optFns ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error) { - if params == nil { - params = &DescribeNetworkInsightsAnalysesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInsightsAnalyses", params, optFns, c.addOperationDescribeNetworkInsightsAnalysesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInsightsAnalysesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeNetworkInsightsAnalysesInput struct { - - // The time when the network insights analyses ended. - AnalysisEndTime *time.Time - - // The time when the network insights analyses started. - AnalysisStartTime *time.Time - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. The following are the possible values: - // - path-found - A Boolean value that indicates whether a feasible path is - // found. - // - status - The status of the analysis (running | succeeded | failed). - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The ID of the network insights analyses. You must specify either analysis IDs - // or a path ID. - NetworkInsightsAnalysisIds []string - - // The ID of the path. You must specify either a path ID or analysis IDs. - NetworkInsightsPathId *string - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNetworkInsightsAnalysesOutput struct { - - // Information about the network insights analyses. - NetworkInsightsAnalyses []types.NetworkInsightsAnalysis - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInsightsAnalysesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInsightsAnalyses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInsightsAnalyses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsAnalyses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkInsightsAnalysesAPIClient is a client that implements the -// DescribeNetworkInsightsAnalyses operation. -type DescribeNetworkInsightsAnalysesAPIClient interface { - DescribeNetworkInsightsAnalyses(context.Context, *DescribeNetworkInsightsAnalysesInput, ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error) -} - -var _ DescribeNetworkInsightsAnalysesAPIClient = (*Client)(nil) - -// DescribeNetworkInsightsAnalysesPaginatorOptions is the paginator options for -// DescribeNetworkInsightsAnalyses -type DescribeNetworkInsightsAnalysesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInsightsAnalysesPaginator is a paginator for -// DescribeNetworkInsightsAnalyses -type DescribeNetworkInsightsAnalysesPaginator struct { - options DescribeNetworkInsightsAnalysesPaginatorOptions - client DescribeNetworkInsightsAnalysesAPIClient - params *DescribeNetworkInsightsAnalysesInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInsightsAnalysesPaginator returns a new -// DescribeNetworkInsightsAnalysesPaginator -func NewDescribeNetworkInsightsAnalysesPaginator(client DescribeNetworkInsightsAnalysesAPIClient, params *DescribeNetworkInsightsAnalysesInput, optFns ...func(*DescribeNetworkInsightsAnalysesPaginatorOptions)) *DescribeNetworkInsightsAnalysesPaginator { - if params == nil { - params = &DescribeNetworkInsightsAnalysesInput{} - } - - options := DescribeNetworkInsightsAnalysesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInsightsAnalysesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInsightsAnalysesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInsightsAnalyses page. -func (p *DescribeNetworkInsightsAnalysesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInsightsAnalysesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInsightsAnalyses(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInsightsAnalyses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInsightsAnalyses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsPaths.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsPaths.go deleted file mode 100644 index ed66b81a9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInsightsPaths.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your paths. -func (c *Client) DescribeNetworkInsightsPaths(ctx context.Context, params *DescribeNetworkInsightsPathsInput, optFns ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error) { - if params == nil { - params = &DescribeNetworkInsightsPathsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInsightsPaths", params, optFns, c.addOperationDescribeNetworkInsightsPathsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInsightsPathsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeNetworkInsightsPathsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. The following are the possible values: - // - destination - The ID of the resource. - // - filter-at-source.source-address - The source IPv4 address at the source. - // - filter-at-source.source-port-range - The source port range at the source. - // - filter-at-source.destination-address - The destination IPv4 address at the - // source. - // - filter-at-source.destination-port-range - The destination port range at the - // source. - // - filter-at-destination.source-address - The source IPv4 address at the - // destination. - // - filter-at-destination.source-port-range - The source port range at the - // destination. - // - filter-at-destination.destination-address - The destination IPv4 address at - // the destination. - // - filter-at-destination.destination-port-range - The destination port range - // at the destination. - // - protocol - The protocol. - // - source - The ID of the resource. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The IDs of the paths. - NetworkInsightsPathIds []string - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNetworkInsightsPathsOutput struct { - - // Information about the paths. - NetworkInsightsPaths []types.NetworkInsightsPath - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInsightsPathsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInsightsPaths{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInsightsPaths{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInsightsPaths"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInsightsPaths(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkInsightsPathsAPIClient is a client that implements the -// DescribeNetworkInsightsPaths operation. -type DescribeNetworkInsightsPathsAPIClient interface { - DescribeNetworkInsightsPaths(context.Context, *DescribeNetworkInsightsPathsInput, ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error) -} - -var _ DescribeNetworkInsightsPathsAPIClient = (*Client)(nil) - -// DescribeNetworkInsightsPathsPaginatorOptions is the paginator options for -// DescribeNetworkInsightsPaths -type DescribeNetworkInsightsPathsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInsightsPathsPaginator is a paginator for -// DescribeNetworkInsightsPaths -type DescribeNetworkInsightsPathsPaginator struct { - options DescribeNetworkInsightsPathsPaginatorOptions - client DescribeNetworkInsightsPathsAPIClient - params *DescribeNetworkInsightsPathsInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInsightsPathsPaginator returns a new -// DescribeNetworkInsightsPathsPaginator -func NewDescribeNetworkInsightsPathsPaginator(client DescribeNetworkInsightsPathsAPIClient, params *DescribeNetworkInsightsPathsInput, optFns ...func(*DescribeNetworkInsightsPathsPaginatorOptions)) *DescribeNetworkInsightsPathsPaginator { - if params == nil { - params = &DescribeNetworkInsightsPathsInput{} - } - - options := DescribeNetworkInsightsPathsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInsightsPathsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInsightsPathsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInsightsPaths page. -func (p *DescribeNetworkInsightsPathsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInsightsPathsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInsightsPaths(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInsightsPaths(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInsightsPaths", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go deleted file mode 100644 index c0b19beed..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaceAttribute.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes a network interface attribute. You can specify only one attribute at -// a time. -func (c *Client) DescribeNetworkInterfaceAttribute(ctx context.Context, params *DescribeNetworkInterfaceAttributeInput, optFns ...func(*Options)) (*DescribeNetworkInterfaceAttributeOutput, error) { - if params == nil { - params = &DescribeNetworkInterfaceAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInterfaceAttribute", params, optFns, c.addOperationDescribeNetworkInterfaceAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInterfaceAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeNetworkInterfaceAttribute. -type DescribeNetworkInterfaceAttributeInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // The attribute of the network interface. This parameter is required. - Attribute types.NetworkInterfaceAttribute - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of DescribeNetworkInterfaceAttribute. -type DescribeNetworkInterfaceAttributeOutput struct { - - // The attachment (if any) of the network interface. - Attachment *types.NetworkInterfaceAttachment - - // The description of the network interface. - Description *types.AttributeValue - - // The security groups associated with the network interface. - Groups []types.GroupIdentifier - - // The ID of the network interface. - NetworkInterfaceId *string - - // Indicates whether source/destination checking is enabled. - SourceDestCheck *types.AttributeBooleanValue - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInterfaceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInterfaceAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInterfaceAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeNetworkInterfaceAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInterfaceAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInterfaceAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInterfaceAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfacePermissions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfacePermissions.go deleted file mode 100644 index 71b04f0e9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfacePermissions.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the permissions for your network interfaces. -func (c *Client) DescribeNetworkInterfacePermissions(ctx context.Context, params *DescribeNetworkInterfacePermissionsInput, optFns ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error) { - if params == nil { - params = &DescribeNetworkInterfacePermissionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInterfacePermissions", params, optFns, c.addOperationDescribeNetworkInterfacePermissionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInterfacePermissionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeNetworkInterfacePermissions. -type DescribeNetworkInterfacePermissionsInput struct { - - // One or more filters. - // - network-interface-permission.network-interface-permission-id - The ID of the - // permission. - // - network-interface-permission.network-interface-id - The ID of the network - // interface. - // - network-interface-permission.aws-account-id - The Amazon Web Services - // account ID. - // - network-interface-permission.aws-service - The Amazon Web Service. - // - network-interface-permission.permission - The type of permission ( - // INSTANCE-ATTACH | EIP-ASSOCIATE ). - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. If this - // parameter is not specified, up to 50 results are returned by default. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The network interface permission IDs. - NetworkInterfacePermissionIds []string - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -// Contains the output for DescribeNetworkInterfacePermissions. -type DescribeNetworkInterfacePermissionsOutput struct { - - // The network interface permissions. - NetworkInterfacePermissions []types.NetworkInterfacePermission - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInterfacePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInterfacePermissions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInterfacePermissions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInterfacePermissions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInterfacePermissions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkInterfacePermissionsAPIClient is a client that implements the -// DescribeNetworkInterfacePermissions operation. -type DescribeNetworkInterfacePermissionsAPIClient interface { - DescribeNetworkInterfacePermissions(context.Context, *DescribeNetworkInterfacePermissionsInput, ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error) -} - -var _ DescribeNetworkInterfacePermissionsAPIClient = (*Client)(nil) - -// DescribeNetworkInterfacePermissionsPaginatorOptions is the paginator options -// for DescribeNetworkInterfacePermissions -type DescribeNetworkInterfacePermissionsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. If this - // parameter is not specified, up to 50 results are returned by default. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInterfacePermissionsPaginator is a paginator for -// DescribeNetworkInterfacePermissions -type DescribeNetworkInterfacePermissionsPaginator struct { - options DescribeNetworkInterfacePermissionsPaginatorOptions - client DescribeNetworkInterfacePermissionsAPIClient - params *DescribeNetworkInterfacePermissionsInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInterfacePermissionsPaginator returns a new -// DescribeNetworkInterfacePermissionsPaginator -func NewDescribeNetworkInterfacePermissionsPaginator(client DescribeNetworkInterfacePermissionsAPIClient, params *DescribeNetworkInterfacePermissionsInput, optFns ...func(*DescribeNetworkInterfacePermissionsPaginatorOptions)) *DescribeNetworkInterfacePermissionsPaginator { - if params == nil { - params = &DescribeNetworkInterfacePermissionsInput{} - } - - options := DescribeNetworkInterfacePermissionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInterfacePermissionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInterfacePermissionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInterfacePermissions page. -func (p *DescribeNetworkInterfacePermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInterfacePermissionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInterfacePermissions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInterfacePermissions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInterfacePermissions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go deleted file mode 100644 index a82e4efa9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeNetworkInterfaces.go +++ /dev/null @@ -1,532 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your network interfaces. If you have a large number of -// network interfaces, the operation fails unless you use pagination or one of the -// following filters: group-id , mac-address , private-dns-name , -// private-ip-address , private-dns-name , subnet-id , or vpc-id . -func (c *Client) DescribeNetworkInterfaces(ctx context.Context, params *DescribeNetworkInterfacesInput, optFns ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) { - if params == nil { - params = &DescribeNetworkInterfacesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeNetworkInterfaces", params, optFns, c.addOperationDescribeNetworkInterfacesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeNetworkInterfacesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeNetworkInterfaces. -type DescribeNetworkInterfacesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - association.allocation-id - The allocation ID returned when you allocated - // the Elastic IP address (IPv4) for your network interface. - // - association.association-id - The association ID returned when the network - // interface was associated with an IPv4 address. - // - addresses.association.owner-id - The owner ID of the addresses associated - // with the network interface. - // - addresses.association.public-ip - The association ID returned when the - // network interface was associated with the Elastic IP address (IPv4). - // - addresses.primary - Whether the private IPv4 address is the primary IP - // address associated with the network interface. - // - addresses.private-ip-address - The private IPv4 addresses associated with - // the network interface. - // - association.ip-owner-id - The owner of the Elastic IP address (IPv4) - // associated with the network interface. - // - association.public-ip - The address of the Elastic IP address (IPv4) bound - // to the network interface. - // - association.public-dns-name - The public DNS name for the network interface - // (IPv4). - // - attachment.attach-time - The time that the network interface was attached to - // an instance. - // - attachment.attachment-id - The ID of the interface attachment. - // - attachment.delete-on-termination - Indicates whether the attachment is - // deleted when an instance is terminated. - // - attachment.device-index - The device index to which the network interface is - // attached. - // - attachment.instance-id - The ID of the instance to which the network - // interface is attached. - // - attachment.instance-owner-id - The owner ID of the instance to which the - // network interface is attached. - // - attachment.status - The status of the attachment ( attaching | attached | - // detaching | detached ). - // - availability-zone - The Availability Zone of the network interface. - // - description - The description of the network interface. - // - group-id - The ID of a security group associated with the network interface. - // - ipv6-addresses.ipv6-address - An IPv6 address associated with the network - // interface. - // - interface-type - The type of network interface ( api_gateway_managed | - // aws_codestar_connections_managed | branch | ec2_instance_connect_endpoint | - // efa | efs | gateway_load_balancer | gateway_load_balancer_endpoint | - // global_accelerator_managed | interface | iot_rules_managed | lambda | - // load_balancer | nat_gateway | network_load_balancer | quicksight | - // transit_gateway | trunk | vpc_endpoint ). - // - mac-address - The MAC address of the network interface. - // - network-interface-id - The ID of the network interface. - // - owner-id - The Amazon Web Services account ID of the network interface - // owner. - // - private-dns-name - The private DNS name of the network interface (IPv4). - // - private-ip-address - The private IPv4 address or addresses of the network - // interface. - // - requester-id - The alias or Amazon Web Services account ID of the principal - // or service that created the network interface. - // - requester-managed - Indicates whether the network interface is being managed - // by an Amazon Web Service (for example, Amazon Web Services Management Console, - // Auto Scaling, and so on). - // - source-dest-check - Indicates whether the network interface performs - // source/destination checking. A value of true means checking is enabled, and - // false means checking is disabled. The value must be false for the network - // interface to perform network address translation (NAT) in your VPC. - // - status - The status of the network interface. If the network interface is - // not attached to an instance, the status is available ; if a network interface - // is attached to an instance the status is in-use . - // - subnet-id - The ID of the subnet for the network interface. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC for the network interface. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. You cannot - // specify this parameter and the network interface IDs parameter in the same - // request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The network interface IDs. Default: Describes all your network interfaces. - NetworkInterfaceIds []string - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeNetworkInterfacesOutput struct { - - // Information about one or more network interfaces. - NetworkInterfaces []types.NetworkInterface - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeNetworkInterfacesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeNetworkInterfaces{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeNetworkInterfaces{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeNetworkInterfaces"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNetworkInterfaces(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeNetworkInterfacesAPIClient is a client that implements the -// DescribeNetworkInterfaces operation. -type DescribeNetworkInterfacesAPIClient interface { - DescribeNetworkInterfaces(context.Context, *DescribeNetworkInterfacesInput, ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) -} - -var _ DescribeNetworkInterfacesAPIClient = (*Client)(nil) - -// DescribeNetworkInterfacesPaginatorOptions is the paginator options for -// DescribeNetworkInterfaces -type DescribeNetworkInterfacesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. You cannot - // specify this parameter and the network interface IDs parameter in the same - // request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeNetworkInterfacesPaginator is a paginator for DescribeNetworkInterfaces -type DescribeNetworkInterfacesPaginator struct { - options DescribeNetworkInterfacesPaginatorOptions - client DescribeNetworkInterfacesAPIClient - params *DescribeNetworkInterfacesInput - nextToken *string - firstPage bool -} - -// NewDescribeNetworkInterfacesPaginator returns a new -// DescribeNetworkInterfacesPaginator -func NewDescribeNetworkInterfacesPaginator(client DescribeNetworkInterfacesAPIClient, params *DescribeNetworkInterfacesInput, optFns ...func(*DescribeNetworkInterfacesPaginatorOptions)) *DescribeNetworkInterfacesPaginator { - if params == nil { - params = &DescribeNetworkInterfacesInput{} - } - - options := DescribeNetworkInterfacesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeNetworkInterfacesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeNetworkInterfacesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeNetworkInterfaces page. -func (p *DescribeNetworkInterfacesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeNetworkInterfacesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeNetworkInterfaces(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// NetworkInterfaceAvailableWaiterOptions are waiter options for -// NetworkInterfaceAvailableWaiter -type NetworkInterfaceAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // NetworkInterfaceAvailableWaiter will use default minimum delay of 20 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, NetworkInterfaceAvailableWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeNetworkInterfacesInput, *DescribeNetworkInterfacesOutput, error) (bool, error) -} - -// NetworkInterfaceAvailableWaiter defines the waiters for -// NetworkInterfaceAvailable -type NetworkInterfaceAvailableWaiter struct { - client DescribeNetworkInterfacesAPIClient - - options NetworkInterfaceAvailableWaiterOptions -} - -// NewNetworkInterfaceAvailableWaiter constructs a NetworkInterfaceAvailableWaiter. -func NewNetworkInterfaceAvailableWaiter(client DescribeNetworkInterfacesAPIClient, optFns ...func(*NetworkInterfaceAvailableWaiterOptions)) *NetworkInterfaceAvailableWaiter { - options := NetworkInterfaceAvailableWaiterOptions{} - options.MinDelay = 20 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = networkInterfaceAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &NetworkInterfaceAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for NetworkInterfaceAvailable waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *NetworkInterfaceAvailableWaiter) Wait(ctx context.Context, params *DescribeNetworkInterfacesInput, maxWaitDur time.Duration, optFns ...func(*NetworkInterfaceAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for NetworkInterfaceAvailable waiter -// and returns the output of the successful operation. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *NetworkInterfaceAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeNetworkInterfacesInput, maxWaitDur time.Duration, optFns ...func(*NetworkInterfaceAvailableWaiterOptions)) (*DescribeNetworkInterfacesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeNetworkInterfaces(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for NetworkInterfaceAvailable waiter") -} - -func networkInterfaceAvailableStateRetryable(ctx context.Context, input *DescribeNetworkInterfacesInput, output *DescribeNetworkInterfacesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("NetworkInterfaces[].Status", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.NetworkInterfaceStatus) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.NetworkInterfaceStatus value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidNetworkInterfaceID.NotFound" == apiErr.ErrorCode() { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeNetworkInterfaces(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeNetworkInterfaces", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go deleted file mode 100644 index 3dd29c312..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePlacementGroups.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified placement groups or all of your placement groups. For -// more information, see Placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribePlacementGroups(ctx context.Context, params *DescribePlacementGroupsInput, optFns ...func(*Options)) (*DescribePlacementGroupsOutput, error) { - if params == nil { - params = &DescribePlacementGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribePlacementGroups", params, optFns, c.addOperationDescribePlacementGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribePlacementGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribePlacementGroupsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - group-name - The name of the placement group. - // - group-arn - The Amazon Resource Name (ARN) of the placement group. - // - spread-level - The spread level for the placement group ( host | rack ). - // - state - The state of the placement group ( pending | available | deleting | - // deleted ). - // - strategy - The strategy of the placement group ( cluster | spread | - // partition ). - // - tag: - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources that have a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The IDs of the placement groups. - GroupIds []string - - // The names of the placement groups. Default: Describes all your placement - // groups, or only those otherwise specified. - GroupNames []string - - noSmithyDocumentSerde -} - -type DescribePlacementGroupsOutput struct { - - // Information about the placement groups. - PlacementGroups []types.PlacementGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribePlacementGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePlacementGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePlacementGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePlacementGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePlacementGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribePlacementGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribePlacementGroups", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrefixLists.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrefixLists.go deleted file mode 100644 index c919d3eaf..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrefixLists.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes available Amazon Web Services services in a prefix list format, which -// includes the prefix list name and prefix list ID of the service and the IP -// address range for the service. We recommend that you use -// DescribeManagedPrefixLists instead. -func (c *Client) DescribePrefixLists(ctx context.Context, params *DescribePrefixListsInput, optFns ...func(*Options)) (*DescribePrefixListsOutput, error) { - if params == nil { - params = &DescribePrefixListsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribePrefixLists", params, optFns, c.addOperationDescribePrefixListsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribePrefixListsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribePrefixListsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - prefix-list-id : The ID of a prefix list. - // - prefix-list-name : The name of a prefix list. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // One or more prefix list IDs. - PrefixListIds []string - - noSmithyDocumentSerde -} - -type DescribePrefixListsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // All available prefix lists. - PrefixLists []types.PrefixList - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribePrefixListsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePrefixLists{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePrefixLists{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePrefixLists"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePrefixLists(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribePrefixListsAPIClient is a client that implements the -// DescribePrefixLists operation. -type DescribePrefixListsAPIClient interface { - DescribePrefixLists(context.Context, *DescribePrefixListsInput, ...func(*Options)) (*DescribePrefixListsOutput, error) -} - -var _ DescribePrefixListsAPIClient = (*Client)(nil) - -// DescribePrefixListsPaginatorOptions is the paginator options for -// DescribePrefixLists -type DescribePrefixListsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribePrefixListsPaginator is a paginator for DescribePrefixLists -type DescribePrefixListsPaginator struct { - options DescribePrefixListsPaginatorOptions - client DescribePrefixListsAPIClient - params *DescribePrefixListsInput - nextToken *string - firstPage bool -} - -// NewDescribePrefixListsPaginator returns a new DescribePrefixListsPaginator -func NewDescribePrefixListsPaginator(client DescribePrefixListsAPIClient, params *DescribePrefixListsInput, optFns ...func(*DescribePrefixListsPaginatorOptions)) *DescribePrefixListsPaginator { - if params == nil { - params = &DescribePrefixListsInput{} - } - - options := DescribePrefixListsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribePrefixListsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribePrefixListsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribePrefixLists page. -func (p *DescribePrefixListsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePrefixListsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribePrefixLists(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribePrefixLists(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribePrefixLists", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrincipalIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrincipalIdFormat.go deleted file mode 100644 index 57d37f4d5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePrincipalIdFormat.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the ID format settings for the root user and all IAM roles and IAM -// users that have explicitly specified a longer ID (17-character ID) preference. -// By default, all IAM roles and IAM users default to the same ID settings as the -// root user, unless they explicitly override the settings. This request is useful -// for identifying those IAM users and IAM roles that have overridden the default -// ID settings. The following resource types support longer IDs: bundle | -// conversion-task | customer-gateway | dhcp-options | elastic-ip-allocation | -// elastic-ip-association | export-task | flow-log | image | import-task | instance -// | internet-gateway | network-acl | network-acl-association | network-interface -// | network-interface-attachment | prefix-list | reservation | route-table | -// route-table-association | security-group | snapshot | subnet | -// subnet-cidr-block-association | volume | vpc | vpc-cidr-block-association | -// vpc-endpoint | vpc-peering-connection | vpn-connection | vpn-gateway . -func (c *Client) DescribePrincipalIdFormat(ctx context.Context, params *DescribePrincipalIdFormatInput, optFns ...func(*Options)) (*DescribePrincipalIdFormatOutput, error) { - if params == nil { - params = &DescribePrincipalIdFormatInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribePrincipalIdFormat", params, optFns, c.addOperationDescribePrincipalIdFormatMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribePrincipalIdFormatOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribePrincipalIdFormatInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - MaxResults *int32 - - // The token to request the next page of results. - NextToken *string - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | - // image | import-task | instance | internet-gateway | network-acl | - // network-acl-association | network-interface | network-interface-attachment | - // prefix-list | reservation | route-table | route-table-association | - // security-group | snapshot | subnet | subnet-cidr-block-association | volume | - // vpc | vpc-cidr-block-association | vpc-endpoint | vpc-peering-connection | - // vpn-connection | vpn-gateway - Resources []string - - noSmithyDocumentSerde -} - -type DescribePrincipalIdFormatOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the ID format settings for the ARN. - Principals []types.PrincipalIdFormat - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribePrincipalIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePrincipalIdFormat{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePrincipalIdFormat{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePrincipalIdFormat"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePrincipalIdFormat(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribePrincipalIdFormatAPIClient is a client that implements the -// DescribePrincipalIdFormat operation. -type DescribePrincipalIdFormatAPIClient interface { - DescribePrincipalIdFormat(context.Context, *DescribePrincipalIdFormatInput, ...func(*Options)) (*DescribePrincipalIdFormatOutput, error) -} - -var _ DescribePrincipalIdFormatAPIClient = (*Client)(nil) - -// DescribePrincipalIdFormatPaginatorOptions is the paginator options for -// DescribePrincipalIdFormat -type DescribePrincipalIdFormatPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another call with the returned NextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribePrincipalIdFormatPaginator is a paginator for DescribePrincipalIdFormat -type DescribePrincipalIdFormatPaginator struct { - options DescribePrincipalIdFormatPaginatorOptions - client DescribePrincipalIdFormatAPIClient - params *DescribePrincipalIdFormatInput - nextToken *string - firstPage bool -} - -// NewDescribePrincipalIdFormatPaginator returns a new -// DescribePrincipalIdFormatPaginator -func NewDescribePrincipalIdFormatPaginator(client DescribePrincipalIdFormatAPIClient, params *DescribePrincipalIdFormatInput, optFns ...func(*DescribePrincipalIdFormatPaginatorOptions)) *DescribePrincipalIdFormatPaginator { - if params == nil { - params = &DescribePrincipalIdFormatInput{} - } - - options := DescribePrincipalIdFormatPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribePrincipalIdFormatPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribePrincipalIdFormatPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribePrincipalIdFormat page. -func (p *DescribePrincipalIdFormatPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePrincipalIdFormatOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribePrincipalIdFormat(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribePrincipalIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribePrincipalIdFormat", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePublicIpv4Pools.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePublicIpv4Pools.go deleted file mode 100644 index aaebc9e85..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribePublicIpv4Pools.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified IPv4 address pools. -func (c *Client) DescribePublicIpv4Pools(ctx context.Context, params *DescribePublicIpv4PoolsInput, optFns ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error) { - if params == nil { - params = &DescribePublicIpv4PoolsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribePublicIpv4Pools", params, optFns, c.addOperationDescribePublicIpv4PoolsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribePublicIpv4PoolsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribePublicIpv4PoolsInput struct { - - // One or more filters. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the address pools. - PoolIds []string - - noSmithyDocumentSerde -} - -type DescribePublicIpv4PoolsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the address pools. - PublicIpv4Pools []types.PublicIpv4Pool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribePublicIpv4PoolsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribePublicIpv4Pools{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribePublicIpv4Pools{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribePublicIpv4Pools"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribePublicIpv4Pools(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribePublicIpv4PoolsAPIClient is a client that implements the -// DescribePublicIpv4Pools operation. -type DescribePublicIpv4PoolsAPIClient interface { - DescribePublicIpv4Pools(context.Context, *DescribePublicIpv4PoolsInput, ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error) -} - -var _ DescribePublicIpv4PoolsAPIClient = (*Client)(nil) - -// DescribePublicIpv4PoolsPaginatorOptions is the paginator options for -// DescribePublicIpv4Pools -type DescribePublicIpv4PoolsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribePublicIpv4PoolsPaginator is a paginator for DescribePublicIpv4Pools -type DescribePublicIpv4PoolsPaginator struct { - options DescribePublicIpv4PoolsPaginatorOptions - client DescribePublicIpv4PoolsAPIClient - params *DescribePublicIpv4PoolsInput - nextToken *string - firstPage bool -} - -// NewDescribePublicIpv4PoolsPaginator returns a new -// DescribePublicIpv4PoolsPaginator -func NewDescribePublicIpv4PoolsPaginator(client DescribePublicIpv4PoolsAPIClient, params *DescribePublicIpv4PoolsInput, optFns ...func(*DescribePublicIpv4PoolsPaginatorOptions)) *DescribePublicIpv4PoolsPaginator { - if params == nil { - params = &DescribePublicIpv4PoolsInput{} - } - - options := DescribePublicIpv4PoolsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribePublicIpv4PoolsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribePublicIpv4PoolsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribePublicIpv4Pools page. -func (p *DescribePublicIpv4PoolsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribePublicIpv4PoolsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribePublicIpv4Pools(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribePublicIpv4Pools(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribePublicIpv4Pools", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRegions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRegions.go deleted file mode 100644 index 3930963f3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRegions.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the Regions that are enabled for your account, or all Regions. For a -// list of the Regions supported by Amazon EC2, see Amazon Elastic Compute Cloud -// endpoints and quotas (https://docs.aws.amazon.com/general/latest/gr/ec2-service.html) -// . For information about enabling and disabling Regions for your account, see -// Managing Amazon Web Services Regions (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html) -// in the Amazon Web Services General Reference. -func (c *Client) DescribeRegions(ctx context.Context, params *DescribeRegionsInput, optFns ...func(*Options)) (*DescribeRegionsOutput, error) { - if params == nil { - params = &DescribeRegionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeRegions", params, optFns, c.addOperationDescribeRegionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeRegionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeRegionsInput struct { - - // Indicates whether to display all Regions, including Regions that are disabled - // for your account. - AllRegions *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - endpoint - The endpoint of the Region (for example, - // ec2.us-east-1.amazonaws.com ). - // - opt-in-status - The opt-in status of the Region ( opt-in-not-required | - // opted-in | not-opted-in ). - // - region-name - The name of the Region (for example, us-east-1 ). - Filters []types.Filter - - // The names of the Regions. You can specify any Regions, whether they are enabled - // and disabled for your account. - RegionNames []string - - noSmithyDocumentSerde -} - -type DescribeRegionsOutput struct { - - // Information about the Regions. - Regions []types.Region - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeRegionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeRegions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeRegions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeRegions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRegions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeRegions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeRegions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go deleted file mode 100644 index a3d31fee5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReplaceRootVolumeTasks.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes a root volume replacement task. For more information, see Replace a -// root volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/replace-root.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeReplaceRootVolumeTasks(ctx context.Context, params *DescribeReplaceRootVolumeTasksInput, optFns ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error) { - if params == nil { - params = &DescribeReplaceRootVolumeTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeReplaceRootVolumeTasks", params, optFns, c.addOperationDescribeReplaceRootVolumeTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeReplaceRootVolumeTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeReplaceRootVolumeTasksInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Filter to use: - // - instance-id - The ID of the instance for which the root volume replacement - // task was created. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The ID of the root volume replacement task to view. - ReplaceRootVolumeTaskIds []string - - noSmithyDocumentSerde -} - -type DescribeReplaceRootVolumeTasksOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the root volume replacement task. - ReplaceRootVolumeTasks []types.ReplaceRootVolumeTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeReplaceRootVolumeTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReplaceRootVolumeTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeReplaceRootVolumeTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplaceRootVolumeTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeReplaceRootVolumeTasksAPIClient is a client that implements the -// DescribeReplaceRootVolumeTasks operation. -type DescribeReplaceRootVolumeTasksAPIClient interface { - DescribeReplaceRootVolumeTasks(context.Context, *DescribeReplaceRootVolumeTasksInput, ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error) -} - -var _ DescribeReplaceRootVolumeTasksAPIClient = (*Client)(nil) - -// DescribeReplaceRootVolumeTasksPaginatorOptions is the paginator options for -// DescribeReplaceRootVolumeTasks -type DescribeReplaceRootVolumeTasksPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeReplaceRootVolumeTasksPaginator is a paginator for -// DescribeReplaceRootVolumeTasks -type DescribeReplaceRootVolumeTasksPaginator struct { - options DescribeReplaceRootVolumeTasksPaginatorOptions - client DescribeReplaceRootVolumeTasksAPIClient - params *DescribeReplaceRootVolumeTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeReplaceRootVolumeTasksPaginator returns a new -// DescribeReplaceRootVolumeTasksPaginator -func NewDescribeReplaceRootVolumeTasksPaginator(client DescribeReplaceRootVolumeTasksAPIClient, params *DescribeReplaceRootVolumeTasksInput, optFns ...func(*DescribeReplaceRootVolumeTasksPaginatorOptions)) *DescribeReplaceRootVolumeTasksPaginator { - if params == nil { - params = &DescribeReplaceRootVolumeTasksInput{} - } - - options := DescribeReplaceRootVolumeTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeReplaceRootVolumeTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeReplaceRootVolumeTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeReplaceRootVolumeTasks page. -func (p *DescribeReplaceRootVolumeTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplaceRootVolumeTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeReplaceRootVolumeTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeReplaceRootVolumeTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeReplaceRootVolumeTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstances.go deleted file mode 100644 index 060ad7e7a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstances.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of the Reserved Instances that you purchased. For more -// information about Reserved Instances, see Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeReservedInstances(ctx context.Context, params *DescribeReservedInstancesInput, optFns ...func(*Options)) (*DescribeReservedInstancesOutput, error) { - if params == nil { - params = &DescribeReservedInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstances", params, optFns, c.addOperationDescribeReservedInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeReservedInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeReservedInstances. -type DescribeReservedInstancesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - availability-zone - The Availability Zone where the Reserved Instance can be - // used. - // - duration - The duration of the Reserved Instance (one year or three years), - // in seconds ( 31536000 | 94608000 ). - // - end - The time when the Reserved Instance expires (for example, - // 2015-08-07T11:54:42.000Z). - // - fixed-price - The purchase price of the Reserved Instance (for example, - // 9800.0). - // - instance-type - The instance type that is covered by the reservation. - // - scope - The scope of the Reserved Instance ( Region or Availability Zone ). - // - product-description - The Reserved Instance product platform description ( - // Linux/UNIX | Linux with SQL Server Standard | Linux with SQL Server Web | - // Linux with SQL Server Enterprise | SUSE Linux | Red Hat Enterprise Linux | - // Red Hat Enterprise Linux with HA | Windows | Windows with SQL Server Standard - // | Windows with SQL Server Web | Windows with SQL Server Enterprise ). - // - reserved-instances-id - The ID of the Reserved Instance. - // - start - The time at which the Reserved Instance purchase request was placed - // (for example, 2014-08-07T11:54:42.000Z). - // - state - The state of the Reserved Instance ( payment-pending | active | - // payment-failed | retired ). - // - tag: - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - usage-price - The usage price of the Reserved Instance, per hour (for - // example, 0.84). - Filters []types.Filter - - // Describes whether the Reserved Instance is Standard or Convertible. - OfferingClass types.OfferingClassType - - // The Reserved Instance offering type. If you are using tools that predate the - // 2011-11-01 API version, you only have access to the Medium Utilization Reserved - // Instance offering type. - OfferingType types.OfferingTypeValues - - // One or more Reserved Instance IDs. Default: Describes all your Reserved - // Instances, or only those otherwise specified. - ReservedInstancesIds []string - - noSmithyDocumentSerde -} - -// Contains the output for DescribeReservedInstances. -type DescribeReservedInstancesOutput struct { - - // A list of Reserved Instances. - ReservedInstances []types.ReservedInstances - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeReservedInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeReservedInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesListings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesListings.go deleted file mode 100644 index 515b63b18..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesListings.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your account's Reserved Instance listings in the Reserved Instance -// Marketplace. The Reserved Instance Marketplace matches sellers who want to -// resell Reserved Instance capacity that they no longer need with buyers who want -// to purchase additional capacity. Reserved Instances bought and sold through the -// Reserved Instance Marketplace work like any other Reserved Instances. As a -// seller, you choose to list some or all of your Reserved Instances, and you -// specify the upfront price to receive for them. Your Reserved Instances are then -// listed in the Reserved Instance Marketplace and are available for purchase. As a -// buyer, you specify the configuration of the Reserved Instance to purchase, and -// the Marketplace matches what you're searching for with what's available. The -// Marketplace first sells the lowest priced Reserved Instances to you, and -// continues to sell available Reserved Instance listings to you until your demand -// is met. You are charged based on the total price of all of the listings that you -// purchase. For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeReservedInstancesListings(ctx context.Context, params *DescribeReservedInstancesListingsInput, optFns ...func(*Options)) (*DescribeReservedInstancesListingsOutput, error) { - if params == nil { - params = &DescribeReservedInstancesListingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstancesListings", params, optFns, c.addOperationDescribeReservedInstancesListingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeReservedInstancesListingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeReservedInstancesListings. -type DescribeReservedInstancesListingsInput struct { - - // One or more filters. - // - reserved-instances-id - The ID of the Reserved Instances. - // - reserved-instances-listing-id - The ID of the Reserved Instances listing. - // - status - The status of the Reserved Instance listing ( pending | active | - // cancelled | closed ). - // - status-message - The reason for the status. - Filters []types.Filter - - // One or more Reserved Instance IDs. - ReservedInstancesId *string - - // One or more Reserved Instance listing IDs. - ReservedInstancesListingId *string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeReservedInstancesListings. -type DescribeReservedInstancesListingsOutput struct { - - // Information about the Reserved Instance listing. - ReservedInstancesListings []types.ReservedInstancesListing - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeReservedInstancesListingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstancesListings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstancesListings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeReservedInstancesListings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstancesListings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeReservedInstancesListings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeReservedInstancesListings", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesModifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesModifications.go deleted file mode 100644 index ec5a874ca..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesModifications.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the modifications made to your Reserved Instances. If no parameter is -// specified, information about all your Reserved Instances modification requests -// is returned. If a modification ID is specified, only information about the -// specific modification is returned. For more information, see Modifying Reserved -// Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeReservedInstancesModifications(ctx context.Context, params *DescribeReservedInstancesModificationsInput, optFns ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) { - if params == nil { - params = &DescribeReservedInstancesModificationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstancesModifications", params, optFns, c.addOperationDescribeReservedInstancesModificationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeReservedInstancesModificationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeReservedInstancesModifications. -type DescribeReservedInstancesModificationsInput struct { - - // One or more filters. - // - client-token - The idempotency token for the modification request. - // - create-date - The time when the modification request was created. - // - effective-date - The time when the modification becomes effective. - // - modification-result.reserved-instances-id - The ID for the Reserved - // Instances created as part of the modification request. This ID is only available - // when the status of the modification is fulfilled . - // - modification-result.target-configuration.availability-zone - The - // Availability Zone for the new Reserved Instances. - // - modification-result.target-configuration.instance-count - The number of new - // Reserved Instances. - // - modification-result.target-configuration.instance-type - The instance type - // of the new Reserved Instances. - // - reserved-instances-id - The ID of the Reserved Instances modified. - // - reserved-instances-modification-id - The ID of the modification request. - // - status - The status of the Reserved Instances modification request ( - // processing | fulfilled | failed ). - // - status-message - The reason for the status. - // - update-date - The time when the modification request was last updated. - Filters []types.Filter - - // The token to retrieve the next page of results. - NextToken *string - - // IDs for the submitted modification request. - ReservedInstancesModificationIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeReservedInstancesModifications. -type DescribeReservedInstancesModificationsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // The Reserved Instance modification information. - ReservedInstancesModifications []types.ReservedInstancesModification - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeReservedInstancesModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstancesModifications{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstancesModifications{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeReservedInstancesModifications"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstancesModifications(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeReservedInstancesModificationsAPIClient is a client that implements the -// DescribeReservedInstancesModifications operation. -type DescribeReservedInstancesModificationsAPIClient interface { - DescribeReservedInstancesModifications(context.Context, *DescribeReservedInstancesModificationsInput, ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) -} - -var _ DescribeReservedInstancesModificationsAPIClient = (*Client)(nil) - -// DescribeReservedInstancesModificationsPaginatorOptions is the paginator options -// for DescribeReservedInstancesModifications -type DescribeReservedInstancesModificationsPaginatorOptions struct { - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeReservedInstancesModificationsPaginator is a paginator for -// DescribeReservedInstancesModifications -type DescribeReservedInstancesModificationsPaginator struct { - options DescribeReservedInstancesModificationsPaginatorOptions - client DescribeReservedInstancesModificationsAPIClient - params *DescribeReservedInstancesModificationsInput - nextToken *string - firstPage bool -} - -// NewDescribeReservedInstancesModificationsPaginator returns a new -// DescribeReservedInstancesModificationsPaginator -func NewDescribeReservedInstancesModificationsPaginator(client DescribeReservedInstancesModificationsAPIClient, params *DescribeReservedInstancesModificationsInput, optFns ...func(*DescribeReservedInstancesModificationsPaginatorOptions)) *DescribeReservedInstancesModificationsPaginator { - if params == nil { - params = &DescribeReservedInstancesModificationsInput{} - } - - options := DescribeReservedInstancesModificationsPaginatorOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeReservedInstancesModificationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeReservedInstancesModificationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeReservedInstancesModifications page. -func (p *DescribeReservedInstancesModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedInstancesModificationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - result, err := p.client.DescribeReservedInstancesModifications(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeReservedInstancesModifications(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeReservedInstancesModifications", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesOfferings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesOfferings.go deleted file mode 100644 index d9ce13f47..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeReservedInstancesOfferings.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes Reserved Instance offerings that are available for purchase. With -// Reserved Instances, you purchase the right to launch instances for a period of -// time. During that time period, you do not receive insufficient capacity errors, -// and you pay a lower usage rate than the rate charged for On-Demand instances for -// the actual time used. If you have listed your own Reserved Instances for sale in -// the Reserved Instance Marketplace, they will be excluded from these results. -// This is to ensure that you do not purchase your own Reserved Instances. For more -// information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeReservedInstancesOfferings(ctx context.Context, params *DescribeReservedInstancesOfferingsInput, optFns ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) { - if params == nil { - params = &DescribeReservedInstancesOfferingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeReservedInstancesOfferings", params, optFns, c.addOperationDescribeReservedInstancesOfferingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeReservedInstancesOfferingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeReservedInstancesOfferings. -type DescribeReservedInstancesOfferingsInput struct { - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - availability-zone - The Availability Zone where the Reserved Instance can be - // used. - // - duration - The duration of the Reserved Instance (for example, one year or - // three years), in seconds ( 31536000 | 94608000 ). - // - fixed-price - The purchase price of the Reserved Instance (for example, - // 9800.0). - // - instance-type - The instance type that is covered by the reservation. - // - marketplace - Set to true to show only Reserved Instance Marketplace - // offerings. When this filter is not used, which is the default behavior, all - // offerings from both Amazon Web Services and the Reserved Instance Marketplace - // are listed. - // - product-description - The Reserved Instance product platform description ( - // Linux/UNIX | Linux with SQL Server Standard | Linux with SQL Server Web | - // Linux with SQL Server Enterprise | SUSE Linux | Red Hat Enterprise Linux | - // Red Hat Enterprise Linux with HA | Windows | Windows with SQL Server Standard - // | Windows with SQL Server Web | Windows with SQL Server Enterprise ). - // - reserved-instances-offering-id - The Reserved Instances offering ID. - // - scope - The scope of the Reserved Instance ( Availability Zone or Region ). - // - usage-price - The usage price of the Reserved Instance, per hour (for - // example, 0.84). - Filters []types.Filter - - // Include Reserved Instance Marketplace offerings in the response. - IncludeMarketplace *bool - - // The tenancy of the instances covered by the reservation. A Reserved Instance - // with a tenancy of dedicated is applied to instances that run in a VPC on - // single-tenant hardware (i.e., Dedicated Instances). Important: The host value - // cannot be used with this parameter. Use the default or dedicated values only. - // Default: default - InstanceTenancy types.Tenancy - - // The instance type that the reservation will cover (for example, m1.small ). For - // more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - InstanceType types.InstanceType - - // The maximum duration (in seconds) to filter when searching for offerings. - // Default: 94608000 (3 years) - MaxDuration *int64 - - // The maximum number of instances to filter when searching for offerings. - // Default: 20 - MaxInstanceCount *int32 - - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. The maximum is 100. Default: 100 - MaxResults *int32 - - // The minimum duration (in seconds) to filter when searching for offerings. - // Default: 2592000 (1 month) - MinDuration *int64 - - // The token to retrieve the next page of results. - NextToken *string - - // The offering class of the Reserved Instance. Can be standard or convertible . - OfferingClass types.OfferingClassType - - // The Reserved Instance offering type. If you are using tools that predate the - // 2011-11-01 API version, you only have access to the Medium Utilization Reserved - // Instance offering type. - OfferingType types.OfferingTypeValues - - // The Reserved Instance product platform description. Instances that include - // (Amazon VPC) in the description are for use with Amazon VPC. - ProductDescription types.RIProductDescription - - // One or more Reserved Instances offering IDs. - ReservedInstancesOfferingIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeReservedInstancesOfferings. -type DescribeReservedInstancesOfferingsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // A list of Reserved Instances offerings. - ReservedInstancesOfferings []types.ReservedInstancesOffering - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeReservedInstancesOfferingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeReservedInstancesOfferings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeReservedInstancesOfferings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeReservedInstancesOfferings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReservedInstancesOfferings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeReservedInstancesOfferingsAPIClient is a client that implements the -// DescribeReservedInstancesOfferings operation. -type DescribeReservedInstancesOfferingsAPIClient interface { - DescribeReservedInstancesOfferings(context.Context, *DescribeReservedInstancesOfferingsInput, ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) -} - -var _ DescribeReservedInstancesOfferingsAPIClient = (*Client)(nil) - -// DescribeReservedInstancesOfferingsPaginatorOptions is the paginator options for -// DescribeReservedInstancesOfferings -type DescribeReservedInstancesOfferingsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. The maximum is 100. Default: 100 - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeReservedInstancesOfferingsPaginator is a paginator for -// DescribeReservedInstancesOfferings -type DescribeReservedInstancesOfferingsPaginator struct { - options DescribeReservedInstancesOfferingsPaginatorOptions - client DescribeReservedInstancesOfferingsAPIClient - params *DescribeReservedInstancesOfferingsInput - nextToken *string - firstPage bool -} - -// NewDescribeReservedInstancesOfferingsPaginator returns a new -// DescribeReservedInstancesOfferingsPaginator -func NewDescribeReservedInstancesOfferingsPaginator(client DescribeReservedInstancesOfferingsAPIClient, params *DescribeReservedInstancesOfferingsInput, optFns ...func(*DescribeReservedInstancesOfferingsPaginatorOptions)) *DescribeReservedInstancesOfferingsPaginator { - if params == nil { - params = &DescribeReservedInstancesOfferingsInput{} - } - - options := DescribeReservedInstancesOfferingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeReservedInstancesOfferingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeReservedInstancesOfferingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeReservedInstancesOfferings page. -func (p *DescribeReservedInstancesOfferingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReservedInstancesOfferingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeReservedInstancesOfferings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeReservedInstancesOfferings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeReservedInstancesOfferings", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRouteTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRouteTables.go deleted file mode 100644 index 297840528..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeRouteTables.go +++ /dev/null @@ -1,296 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your route tables. Each subnet in your VPC must be -// associated with a route table. If a subnet is not explicitly associated with any -// route table, it is implicitly associated with the main route table. This command -// does not return the subnet ID for implicit associations. For more information, -// see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. -func (c *Client) DescribeRouteTables(ctx context.Context, params *DescribeRouteTablesInput, optFns ...func(*Options)) (*DescribeRouteTablesOutput, error) { - if params == nil { - params = &DescribeRouteTablesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeRouteTables", params, optFns, c.addOperationDescribeRouteTablesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeRouteTablesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeRouteTablesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - association.gateway-id - The ID of the gateway involved in the association. - // - association.route-table-association-id - The ID of an association ID for the - // route table. - // - association.route-table-id - The ID of the route table involved in the - // association. - // - association.subnet-id - The ID of the subnet involved in the association. - // - association.main - Indicates whether the route table is the main route table - // for the VPC ( true | false ). Route tables that do not have an association ID - // are not returned in the response. - // - owner-id - The ID of the Amazon Web Services account that owns the route - // table. - // - route-table-id - The ID of the route table. - // - route.destination-cidr-block - The IPv4 CIDR range specified in a route in - // the table. - // - route.destination-ipv6-cidr-block - The IPv6 CIDR range specified in a route - // in the route table. - // - route.destination-prefix-list-id - The ID (prefix) of the Amazon Web Service - // specified in a route in the table. - // - route.egress-only-internet-gateway-id - The ID of an egress-only Internet - // gateway specified in a route in the route table. - // - route.gateway-id - The ID of a gateway specified in a route in the table. - // - route.instance-id - The ID of an instance specified in a route in the table. - // - route.nat-gateway-id - The ID of a NAT gateway. - // - route.transit-gateway-id - The ID of a transit gateway. - // - route.origin - Describes how the route was created. CreateRouteTable - // indicates that the route was automatically created when the route table was - // created; CreateRoute indicates that the route was manually added to the route - // table; EnableVgwRoutePropagation indicates that the route was propagated by - // route propagation. - // - route.state - The state of a route in the route table ( active | blackhole - // ). The blackhole state indicates that the route's target isn't available (for - // example, the specified gateway isn't attached to the VPC, the specified NAT - // instance has been terminated, and so on). - // - route.vpc-peering-connection-id - The ID of a VPC peering connection - // specified in a route in the table. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC for the route table. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the route tables. Default: Describes all your route tables. - RouteTableIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeRouteTables. -type DescribeRouteTablesOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about one or more route tables. - RouteTables []types.RouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeRouteTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeRouteTables{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeRouteTables{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeRouteTables"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeRouteTables(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeRouteTablesAPIClient is a client that implements the -// DescribeRouteTables operation. -type DescribeRouteTablesAPIClient interface { - DescribeRouteTables(context.Context, *DescribeRouteTablesInput, ...func(*Options)) (*DescribeRouteTablesOutput, error) -} - -var _ DescribeRouteTablesAPIClient = (*Client)(nil) - -// DescribeRouteTablesPaginatorOptions is the paginator options for -// DescribeRouteTables -type DescribeRouteTablesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeRouteTablesPaginator is a paginator for DescribeRouteTables -type DescribeRouteTablesPaginator struct { - options DescribeRouteTablesPaginatorOptions - client DescribeRouteTablesAPIClient - params *DescribeRouteTablesInput - nextToken *string - firstPage bool -} - -// NewDescribeRouteTablesPaginator returns a new DescribeRouteTablesPaginator -func NewDescribeRouteTablesPaginator(client DescribeRouteTablesAPIClient, params *DescribeRouteTablesInput, optFns ...func(*DescribeRouteTablesPaginatorOptions)) *DescribeRouteTablesPaginator { - if params == nil { - params = &DescribeRouteTablesInput{} - } - - options := DescribeRouteTablesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeRouteTablesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeRouteTablesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeRouteTables page. -func (p *DescribeRouteTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeRouteTablesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeRouteTables(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeRouteTables(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeRouteTables", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstanceAvailability.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstanceAvailability.go deleted file mode 100644 index bed8d95be..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstanceAvailability.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Finds available schedules that meet the specified criteria. You can search for -// an available schedule no more than 3 months in advance. You must meet the -// minimum required duration of 1,200 hours per year. For example, the minimum -// daily schedule is 4 hours, the minimum weekly schedule is 24 hours, and the -// minimum monthly schedule is 100 hours. After you find a schedule that meets your -// needs, call PurchaseScheduledInstances to purchase Scheduled Instances with -// that schedule. -func (c *Client) DescribeScheduledInstanceAvailability(ctx context.Context, params *DescribeScheduledInstanceAvailabilityInput, optFns ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) { - if params == nil { - params = &DescribeScheduledInstanceAvailabilityInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeScheduledInstanceAvailability", params, optFns, c.addOperationDescribeScheduledInstanceAvailabilityMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeScheduledInstanceAvailabilityOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeScheduledInstanceAvailability. -type DescribeScheduledInstanceAvailabilityInput struct { - - // The time period for the first schedule to start. - // - // This member is required. - FirstSlotStartTimeRange *types.SlotDateTimeRangeRequest - - // The schedule recurrence. - // - // This member is required. - Recurrence *types.ScheduledInstanceRecurrenceRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - availability-zone - The Availability Zone (for example, us-west-2a ). - // - instance-type - The instance type (for example, c4.large ). - // - platform - The platform ( Linux/UNIX or Windows ). - Filters []types.Filter - - // The maximum number of results to return in a single call. This value can be - // between 5 and 300. The default value is 300. To retrieve the remaining results, - // make another call with the returned NextToken value. - MaxResults *int32 - - // The maximum available duration, in hours. This value must be greater than - // MinSlotDurationInHours and less than 1,720. - MaxSlotDurationInHours *int32 - - // The minimum available duration, in hours. The minimum required duration is - // 1,200 hours per year. For example, the minimum daily schedule is 4 hours, the - // minimum weekly schedule is 24 hours, and the minimum monthly schedule is 100 - // hours. - MinSlotDurationInHours *int32 - - // The token for the next set of results. - NextToken *string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeScheduledInstanceAvailability. -type DescribeScheduledInstanceAvailabilityOutput struct { - - // The token required to retrieve the next set of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the available Scheduled Instances. - ScheduledInstanceAvailabilitySet []types.ScheduledInstanceAvailability - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeScheduledInstanceAvailabilityMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeScheduledInstanceAvailability{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeScheduledInstanceAvailability{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeScheduledInstanceAvailability"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeScheduledInstanceAvailabilityValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScheduledInstanceAvailability(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeScheduledInstanceAvailabilityAPIClient is a client that implements the -// DescribeScheduledInstanceAvailability operation. -type DescribeScheduledInstanceAvailabilityAPIClient interface { - DescribeScheduledInstanceAvailability(context.Context, *DescribeScheduledInstanceAvailabilityInput, ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) -} - -var _ DescribeScheduledInstanceAvailabilityAPIClient = (*Client)(nil) - -// DescribeScheduledInstanceAvailabilityPaginatorOptions is the paginator options -// for DescribeScheduledInstanceAvailability -type DescribeScheduledInstanceAvailabilityPaginatorOptions struct { - // The maximum number of results to return in a single call. This value can be - // between 5 and 300. The default value is 300. To retrieve the remaining results, - // make another call with the returned NextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeScheduledInstanceAvailabilityPaginator is a paginator for -// DescribeScheduledInstanceAvailability -type DescribeScheduledInstanceAvailabilityPaginator struct { - options DescribeScheduledInstanceAvailabilityPaginatorOptions - client DescribeScheduledInstanceAvailabilityAPIClient - params *DescribeScheduledInstanceAvailabilityInput - nextToken *string - firstPage bool -} - -// NewDescribeScheduledInstanceAvailabilityPaginator returns a new -// DescribeScheduledInstanceAvailabilityPaginator -func NewDescribeScheduledInstanceAvailabilityPaginator(client DescribeScheduledInstanceAvailabilityAPIClient, params *DescribeScheduledInstanceAvailabilityInput, optFns ...func(*DescribeScheduledInstanceAvailabilityPaginatorOptions)) *DescribeScheduledInstanceAvailabilityPaginator { - if params == nil { - params = &DescribeScheduledInstanceAvailabilityInput{} - } - - options := DescribeScheduledInstanceAvailabilityPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeScheduledInstanceAvailabilityPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeScheduledInstanceAvailabilityPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeScheduledInstanceAvailability page. -func (p *DescribeScheduledInstanceAvailabilityPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeScheduledInstanceAvailabilityOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeScheduledInstanceAvailability(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeScheduledInstanceAvailability(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeScheduledInstanceAvailability", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstances.go deleted file mode 100644 index 5f6a9bc4b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeScheduledInstances.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Scheduled Instances or all your Scheduled Instances. -func (c *Client) DescribeScheduledInstances(ctx context.Context, params *DescribeScheduledInstancesInput, optFns ...func(*Options)) (*DescribeScheduledInstancesOutput, error) { - if params == nil { - params = &DescribeScheduledInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeScheduledInstances", params, optFns, c.addOperationDescribeScheduledInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeScheduledInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeScheduledInstances. -type DescribeScheduledInstancesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - availability-zone - The Availability Zone (for example, us-west-2a ). - // - instance-type - The instance type (for example, c4.large ). - // - platform - The platform ( Linux/UNIX or Windows ). - Filters []types.Filter - - // The maximum number of results to return in a single call. This value can be - // between 5 and 300. The default value is 100. To retrieve the remaining results, - // make another call with the returned NextToken value. - MaxResults *int32 - - // The token for the next set of results. - NextToken *string - - // The Scheduled Instance IDs. - ScheduledInstanceIds []string - - // The time period for the first schedule to start. - SlotStartTimeRange *types.SlotStartTimeRangeRequest - - noSmithyDocumentSerde -} - -// Contains the output of DescribeScheduledInstances. -type DescribeScheduledInstancesOutput struct { - - // The token required to retrieve the next set of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the Scheduled Instances. - ScheduledInstanceSet []types.ScheduledInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeScheduledInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeScheduledInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeScheduledInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeScheduledInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeScheduledInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeScheduledInstancesAPIClient is a client that implements the -// DescribeScheduledInstances operation. -type DescribeScheduledInstancesAPIClient interface { - DescribeScheduledInstances(context.Context, *DescribeScheduledInstancesInput, ...func(*Options)) (*DescribeScheduledInstancesOutput, error) -} - -var _ DescribeScheduledInstancesAPIClient = (*Client)(nil) - -// DescribeScheduledInstancesPaginatorOptions is the paginator options for -// DescribeScheduledInstances -type DescribeScheduledInstancesPaginatorOptions struct { - // The maximum number of results to return in a single call. This value can be - // between 5 and 300. The default value is 100. To retrieve the remaining results, - // make another call with the returned NextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeScheduledInstancesPaginator is a paginator for -// DescribeScheduledInstances -type DescribeScheduledInstancesPaginator struct { - options DescribeScheduledInstancesPaginatorOptions - client DescribeScheduledInstancesAPIClient - params *DescribeScheduledInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeScheduledInstancesPaginator returns a new -// DescribeScheduledInstancesPaginator -func NewDescribeScheduledInstancesPaginator(client DescribeScheduledInstancesAPIClient, params *DescribeScheduledInstancesInput, optFns ...func(*DescribeScheduledInstancesPaginatorOptions)) *DescribeScheduledInstancesPaginator { - if params == nil { - params = &DescribeScheduledInstancesInput{} - } - - options := DescribeScheduledInstancesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeScheduledInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeScheduledInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeScheduledInstances page. -func (p *DescribeScheduledInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeScheduledInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeScheduledInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeScheduledInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupReferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupReferences.go deleted file mode 100644 index 0464d9c2c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupReferences.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the VPCs on the other side of a VPC peering connection or the VPCs -// attached to a transit gateway that are referencing the security groups you've -// specified in this request. -func (c *Client) DescribeSecurityGroupReferences(ctx context.Context, params *DescribeSecurityGroupReferencesInput, optFns ...func(*Options)) (*DescribeSecurityGroupReferencesOutput, error) { - if params == nil { - params = &DescribeSecurityGroupReferencesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroupReferences", params, optFns, c.addOperationDescribeSecurityGroupReferencesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSecurityGroupReferencesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSecurityGroupReferencesInput struct { - - // The IDs of the security groups in your account. - // - // This member is required. - GroupId []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeSecurityGroupReferencesOutput struct { - - // Information about the VPCs with the referencing security groups. - SecurityGroupReferenceSet []types.SecurityGroupReference - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSecurityGroupReferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroupReferences{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroupReferences{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSecurityGroupReferences"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeSecurityGroupReferencesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityGroupReferences(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeSecurityGroupReferences(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSecurityGroupReferences", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupRules.go deleted file mode 100644 index 7183ab422..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroupRules.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your security group rules. -func (c *Client) DescribeSecurityGroupRules(ctx context.Context, params *DescribeSecurityGroupRulesInput, optFns ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error) { - if params == nil { - params = &DescribeSecurityGroupRulesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroupRules", params, optFns, c.addOperationDescribeSecurityGroupRulesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSecurityGroupRulesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSecurityGroupRulesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - group-id - The ID of the security group. - // - security-group-rule-id - The ID of the security group rule. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1000. If this parameter is not specified, then all items - // are returned. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the security group rules. - SecurityGroupRuleIds []string - - noSmithyDocumentSerde -} - -type DescribeSecurityGroupRulesOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about security group rules. - SecurityGroupRules []types.SecurityGroupRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSecurityGroupRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroupRules{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroupRules{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSecurityGroupRules"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityGroupRules(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSecurityGroupRulesAPIClient is a client that implements the -// DescribeSecurityGroupRules operation. -type DescribeSecurityGroupRulesAPIClient interface { - DescribeSecurityGroupRules(context.Context, *DescribeSecurityGroupRulesInput, ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error) -} - -var _ DescribeSecurityGroupRulesAPIClient = (*Client)(nil) - -// DescribeSecurityGroupRulesPaginatorOptions is the paginator options for -// DescribeSecurityGroupRules -type DescribeSecurityGroupRulesPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1000. If this parameter is not specified, then all items - // are returned. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSecurityGroupRulesPaginator is a paginator for -// DescribeSecurityGroupRules -type DescribeSecurityGroupRulesPaginator struct { - options DescribeSecurityGroupRulesPaginatorOptions - client DescribeSecurityGroupRulesAPIClient - params *DescribeSecurityGroupRulesInput - nextToken *string - firstPage bool -} - -// NewDescribeSecurityGroupRulesPaginator returns a new -// DescribeSecurityGroupRulesPaginator -func NewDescribeSecurityGroupRulesPaginator(client DescribeSecurityGroupRulesAPIClient, params *DescribeSecurityGroupRulesInput, optFns ...func(*DescribeSecurityGroupRulesPaginatorOptions)) *DescribeSecurityGroupRulesPaginator { - if params == nil { - params = &DescribeSecurityGroupRulesInput{} - } - - options := DescribeSecurityGroupRulesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSecurityGroupRulesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSecurityGroupRulesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSecurityGroupRules page. -func (p *DescribeSecurityGroupRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupRulesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSecurityGroupRules(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeSecurityGroupRules(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSecurityGroupRules", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go deleted file mode 100644 index 7e32a368f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSecurityGroups.go +++ /dev/null @@ -1,502 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "strconv" - "time" -) - -// Describes the specified security groups or all of your security groups. -func (c *Client) DescribeSecurityGroups(ctx context.Context, params *DescribeSecurityGroupsInput, optFns ...func(*Options)) (*DescribeSecurityGroupsOutput, error) { - if params == nil { - params = &DescribeSecurityGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSecurityGroups", params, optFns, c.addOperationDescribeSecurityGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSecurityGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSecurityGroupsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. If using multiple filters for rules, the results include security - // groups for which any combination of rules - not necessarily a single rule - - // match all filters. - // - description - The description of the security group. - // - egress.ip-permission.cidr - An IPv4 CIDR block for an outbound security - // group rule. - // - egress.ip-permission.from-port - For an outbound rule, the start of port - // range for the TCP and UDP protocols, or an ICMP type number. - // - egress.ip-permission.group-id - The ID of a security group that has been - // referenced in an outbound security group rule. - // - egress.ip-permission.group-name - The name of a security group that is - // referenced in an outbound security group rule. - // - egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound security - // group rule. - // - egress.ip-permission.prefix-list-id - The ID of a prefix list to which a - // security group rule allows outbound access. - // - egress.ip-permission.protocol - The IP protocol for an outbound security - // group rule ( tcp | udp | icmp , a protocol number, or -1 for all protocols). - // - egress.ip-permission.to-port - For an outbound rule, the end of port range - // for the TCP and UDP protocols, or an ICMP code. - // - egress.ip-permission.user-id - The ID of an Amazon Web Services account that - // has been referenced in an outbound security group rule. - // - group-id - The ID of the security group. - // - group-name - The name of the security group. - // - ip-permission.cidr - An IPv4 CIDR block for an inbound security group rule. - // - ip-permission.from-port - For an inbound rule, the start of port range for - // the TCP and UDP protocols, or an ICMP type number. - // - ip-permission.group-id - The ID of a security group that has been referenced - // in an inbound security group rule. - // - ip-permission.group-name - The name of a security group that is referenced - // in an inbound security group rule. - // - ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security group - // rule. - // - ip-permission.prefix-list-id - The ID of a prefix list from which a security - // group rule allows inbound access. - // - ip-permission.protocol - The IP protocol for an inbound security group rule ( - // tcp | udp | icmp , a protocol number, or -1 for all protocols). - // - ip-permission.to-port - For an inbound rule, the end of port range for the - // TCP and UDP protocols, or an ICMP code. - // - ip-permission.user-id - The ID of an Amazon Web Services account that has - // been referenced in an inbound security group rule. - // - owner-id - The Amazon Web Services account ID of the owner of the security - // group. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC specified when the security group was created. - Filters []types.Filter - - // The IDs of the security groups. Required for security groups in a nondefault - // VPC. Default: Describes all of your security groups. - GroupIds []string - - // [Default VPC] The names of the security groups. You can specify either the - // security group name or the security group ID. Default: Describes all of your - // security groups. - GroupNames []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1000. If this parameter is not specified, then all items - // are returned. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeSecurityGroupsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the security groups. - SecurityGroups []types.SecurityGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSecurityGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSecurityGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSecurityGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecurityGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSecurityGroupsAPIClient is a client that implements the -// DescribeSecurityGroups operation. -type DescribeSecurityGroupsAPIClient interface { - DescribeSecurityGroups(context.Context, *DescribeSecurityGroupsInput, ...func(*Options)) (*DescribeSecurityGroupsOutput, error) -} - -var _ DescribeSecurityGroupsAPIClient = (*Client)(nil) - -// DescribeSecurityGroupsPaginatorOptions is the paginator options for -// DescribeSecurityGroups -type DescribeSecurityGroupsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1000. If this parameter is not specified, then all items - // are returned. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSecurityGroupsPaginator is a paginator for DescribeSecurityGroups -type DescribeSecurityGroupsPaginator struct { - options DescribeSecurityGroupsPaginatorOptions - client DescribeSecurityGroupsAPIClient - params *DescribeSecurityGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeSecurityGroupsPaginator returns a new DescribeSecurityGroupsPaginator -func NewDescribeSecurityGroupsPaginator(client DescribeSecurityGroupsAPIClient, params *DescribeSecurityGroupsInput, optFns ...func(*DescribeSecurityGroupsPaginatorOptions)) *DescribeSecurityGroupsPaginator { - if params == nil { - params = &DescribeSecurityGroupsInput{} - } - - options := DescribeSecurityGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSecurityGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSecurityGroups page. -func (p *DescribeSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSecurityGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSecurityGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// SecurityGroupExistsWaiterOptions are waiter options for -// SecurityGroupExistsWaiter -type SecurityGroupExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // SecurityGroupExistsWaiter will use default minimum delay of 5 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, SecurityGroupExistsWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeSecurityGroupsInput, *DescribeSecurityGroupsOutput, error) (bool, error) -} - -// SecurityGroupExistsWaiter defines the waiters for SecurityGroupExists -type SecurityGroupExistsWaiter struct { - client DescribeSecurityGroupsAPIClient - - options SecurityGroupExistsWaiterOptions -} - -// NewSecurityGroupExistsWaiter constructs a SecurityGroupExistsWaiter. -func NewSecurityGroupExistsWaiter(client DescribeSecurityGroupsAPIClient, optFns ...func(*SecurityGroupExistsWaiterOptions)) *SecurityGroupExistsWaiter { - options := SecurityGroupExistsWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = securityGroupExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &SecurityGroupExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for SecurityGroupExists waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *SecurityGroupExistsWaiter) Wait(ctx context.Context, params *DescribeSecurityGroupsInput, maxWaitDur time.Duration, optFns ...func(*SecurityGroupExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for SecurityGroupExists waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *SecurityGroupExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeSecurityGroupsInput, maxWaitDur time.Duration, optFns ...func(*SecurityGroupExistsWaiterOptions)) (*DescribeSecurityGroupsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeSecurityGroups(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for SecurityGroupExists waiter") -} - -func securityGroupExistsStateRetryable(ctx context.Context, input *DescribeSecurityGroupsInput, output *DescribeSecurityGroupsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("length(SecurityGroups[].GroupId) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "true" - bv, err := strconv.ParseBool(expectedValue) - if err != nil { - return false, fmt.Errorf("error parsing boolean from string %w", err) - } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidGroup.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSecurityGroups", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotAttribute.go deleted file mode 100644 index d0b264ec3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotAttribute.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified attribute of the specified snapshot. You can specify -// only one attribute at a time. For more information about EBS snapshots, see -// Amazon EBS snapshots (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeSnapshotAttribute(ctx context.Context, params *DescribeSnapshotAttributeInput, optFns ...func(*Options)) (*DescribeSnapshotAttributeOutput, error) { - if params == nil { - params = &DescribeSnapshotAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSnapshotAttribute", params, optFns, c.addOperationDescribeSnapshotAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSnapshotAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSnapshotAttributeInput struct { - - // The snapshot attribute you would like to view. - // - // This member is required. - Attribute types.SnapshotAttributeName - - // The ID of the EBS snapshot. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeSnapshotAttributeOutput struct { - - // The users and groups that have the permissions for creating volumes from the - // snapshot. - CreateVolumePermissions []types.CreateVolumePermission - - // The product codes. - ProductCodes []types.ProductCode - - // The ID of the EBS snapshot. - SnapshotId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSnapshotAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSnapshotAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSnapshotAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeSnapshotAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSnapshotAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotTierStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotTierStatus.go deleted file mode 100644 index a9380f94b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshotTierStatus.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the storage tier status of one or more Amazon EBS snapshots. -func (c *Client) DescribeSnapshotTierStatus(ctx context.Context, params *DescribeSnapshotTierStatusInput, optFns ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) { - if params == nil { - params = &DescribeSnapshotTierStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSnapshotTierStatus", params, optFns, c.addOperationDescribeSnapshotTierStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSnapshotTierStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSnapshotTierStatusInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - snapshot-id - The snapshot ID. - // - volume-id - The ID of the volume the snapshot is for. - // - last-tiering-operation - The state of the last archive or restore action. ( - // archival-in-progress | archival-completed | archival-failed | - // permanent-restore-in-progress | permanent-restore-completed | - // permanent-restore-failed | temporary-restore-in-progress | - // temporary-restore-completed | temporary-restore-failed ) - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeSnapshotTierStatusOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the snapshot's storage tier. - SnapshotTierStatuses []types.SnapshotTierStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSnapshotTierStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSnapshotTierStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSnapshotTierStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSnapshotTierStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshotTierStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSnapshotTierStatusAPIClient is a client that implements the -// DescribeSnapshotTierStatus operation. -type DescribeSnapshotTierStatusAPIClient interface { - DescribeSnapshotTierStatus(context.Context, *DescribeSnapshotTierStatusInput, ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) -} - -var _ DescribeSnapshotTierStatusAPIClient = (*Client)(nil) - -// DescribeSnapshotTierStatusPaginatorOptions is the paginator options for -// DescribeSnapshotTierStatus -type DescribeSnapshotTierStatusPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSnapshotTierStatusPaginator is a paginator for -// DescribeSnapshotTierStatus -type DescribeSnapshotTierStatusPaginator struct { - options DescribeSnapshotTierStatusPaginatorOptions - client DescribeSnapshotTierStatusAPIClient - params *DescribeSnapshotTierStatusInput - nextToken *string - firstPage bool -} - -// NewDescribeSnapshotTierStatusPaginator returns a new -// DescribeSnapshotTierStatusPaginator -func NewDescribeSnapshotTierStatusPaginator(client DescribeSnapshotTierStatusAPIClient, params *DescribeSnapshotTierStatusInput, optFns ...func(*DescribeSnapshotTierStatusPaginatorOptions)) *DescribeSnapshotTierStatusPaginator { - if params == nil { - params = &DescribeSnapshotTierStatusInput{} - } - - options := DescribeSnapshotTierStatusPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSnapshotTierStatusPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSnapshotTierStatusPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSnapshotTierStatus page. -func (p *DescribeSnapshotTierStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotTierStatusOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSnapshotTierStatus(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeSnapshotTierStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSnapshotTierStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go deleted file mode 100644 index c7d1c0c6b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSnapshots.go +++ /dev/null @@ -1,529 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the specified EBS snapshots available to you or all of the EBS -// snapshots available to you. The snapshots available to you include public -// snapshots, private snapshots that you own, and private snapshots owned by other -// Amazon Web Services accounts for which you have explicit create volume -// permissions. The create volume permissions fall into the following categories: -// - public: The owner of the snapshot granted create volume permissions for the -// snapshot to the all group. All Amazon Web Services accounts have create volume -// permissions for these snapshots. -// - explicit: The owner of the snapshot granted create volume permissions to a -// specific Amazon Web Services account. -// - implicit: An Amazon Web Services account has implicit create volume -// permissions for all snapshots it owns. -// -// The list of snapshots returned can be filtered by specifying snapshot IDs, -// snapshot owners, or Amazon Web Services accounts with create volume permissions. -// If no options are specified, Amazon EC2 returns all snapshots for which you have -// create volume permissions. If you specify one or more snapshot IDs, only -// snapshots that have the specified IDs are returned. If you specify an invalid -// snapshot ID, an error is returned. If you specify a snapshot ID for which you do -// not have access, it is not included in the returned results. If you specify one -// or more snapshot owners using the OwnerIds option, only snapshots from the -// specified owners and for which you have access are returned. The results can -// include the Amazon Web Services account IDs of the specified owners, amazon for -// snapshots owned by Amazon, or self for snapshots that you own. If you specify a -// list of restorable users, only snapshots with create snapshot permissions for -// those users are returned. You can specify Amazon Web Services account IDs (if -// you own the snapshots), self for snapshots for which you own or have explicit -// permissions, or all for public snapshots. If you are describing a long list of -// snapshots, we recommend that you paginate the output to make the list more -// manageable. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) -// . To get the state of fast snapshot restores for a snapshot, use -// DescribeFastSnapshotRestores . For more information about EBS snapshots, see -// Amazon EBS snapshots (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSSnapshots.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeSnapshots(ctx context.Context, params *DescribeSnapshotsInput, optFns ...func(*Options)) (*DescribeSnapshotsOutput, error) { - if params == nil { - params = &DescribeSnapshotsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSnapshots", params, optFns, c.addOperationDescribeSnapshotsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSnapshotsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSnapshotsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - description - A description of the snapshot. - // - encrypted - Indicates whether the snapshot is encrypted ( true | false ) - // - owner-alias - The owner alias, from an Amazon-maintained list ( amazon ). - // This is not the user-configured Amazon Web Services account alias set using the - // IAM console. We recommend that you use the related parameter instead of this - // filter. - // - owner-id - The Amazon Web Services account ID of the owner. We recommend - // that you use the related parameter instead of this filter. - // - progress - The progress of the snapshot, as a percentage (for example, 80%). - // - snapshot-id - The snapshot ID. - // - start-time - The time stamp when the snapshot was initiated. - // - status - The status of the snapshot ( pending | completed | error ). - // - storage-tier - The storage tier of the snapshot ( archive | standard ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - volume-id - The ID of the volume the snapshot is for. - // - volume-size - The size of the volume, in GiB. - Filters []types.Filter - - // The maximum number of snapshots to return for this request. This value can be - // between 5 and 1,000; if this value is larger than 1,000, only 1,000 results are - // returned. If this parameter is not used, then the request returns all snapshots. - // You cannot specify this parameter and the snapshot IDs parameter in the same - // request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // Scopes the results to snapshots with the specified owners. You can specify a - // combination of Amazon Web Services account IDs, self , and amazon . - OwnerIds []string - - // The IDs of the Amazon Web Services accounts that can create volumes from the - // snapshot. - RestorableByUserIds []string - - // The snapshot IDs. Default: Describes the snapshots for which you have create - // volume permissions. - SnapshotIds []string - - noSmithyDocumentSerde -} - -type DescribeSnapshotsOutput struct { - - // The token to include in another request to return the next page of snapshots. - // This value is null when there are no more snapshots to return. - NextToken *string - - // Information about the snapshots. - Snapshots []types.Snapshot - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSnapshots{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSnapshots{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSnapshots"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSnapshots(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSnapshotsAPIClient is a client that implements the DescribeSnapshots -// operation. -type DescribeSnapshotsAPIClient interface { - DescribeSnapshots(context.Context, *DescribeSnapshotsInput, ...func(*Options)) (*DescribeSnapshotsOutput, error) -} - -var _ DescribeSnapshotsAPIClient = (*Client)(nil) - -// DescribeSnapshotsPaginatorOptions is the paginator options for DescribeSnapshots -type DescribeSnapshotsPaginatorOptions struct { - // The maximum number of snapshots to return for this request. This value can be - // between 5 and 1,000; if this value is larger than 1,000, only 1,000 results are - // returned. If this parameter is not used, then the request returns all snapshots. - // You cannot specify this parameter and the snapshot IDs parameter in the same - // request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSnapshotsPaginator is a paginator for DescribeSnapshots -type DescribeSnapshotsPaginator struct { - options DescribeSnapshotsPaginatorOptions - client DescribeSnapshotsAPIClient - params *DescribeSnapshotsInput - nextToken *string - firstPage bool -} - -// NewDescribeSnapshotsPaginator returns a new DescribeSnapshotsPaginator -func NewDescribeSnapshotsPaginator(client DescribeSnapshotsAPIClient, params *DescribeSnapshotsInput, optFns ...func(*DescribeSnapshotsPaginatorOptions)) *DescribeSnapshotsPaginator { - if params == nil { - params = &DescribeSnapshotsInput{} - } - - options := DescribeSnapshotsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSnapshotsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSnapshotsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSnapshots page. -func (p *DescribeSnapshotsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSnapshotsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSnapshots(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// SnapshotCompletedWaiterOptions are waiter options for SnapshotCompletedWaiter -type SnapshotCompletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // SnapshotCompletedWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, SnapshotCompletedWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeSnapshotsInput, *DescribeSnapshotsOutput, error) (bool, error) -} - -// SnapshotCompletedWaiter defines the waiters for SnapshotCompleted -type SnapshotCompletedWaiter struct { - client DescribeSnapshotsAPIClient - - options SnapshotCompletedWaiterOptions -} - -// NewSnapshotCompletedWaiter constructs a SnapshotCompletedWaiter. -func NewSnapshotCompletedWaiter(client DescribeSnapshotsAPIClient, optFns ...func(*SnapshotCompletedWaiterOptions)) *SnapshotCompletedWaiter { - options := SnapshotCompletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = snapshotCompletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &SnapshotCompletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for SnapshotCompleted waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *SnapshotCompletedWaiter) Wait(ctx context.Context, params *DescribeSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*SnapshotCompletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for SnapshotCompleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *SnapshotCompletedWaiter) WaitForOutput(ctx context.Context, params *DescribeSnapshotsInput, maxWaitDur time.Duration, optFns ...func(*SnapshotCompletedWaiterOptions)) (*DescribeSnapshotsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeSnapshots(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for SnapshotCompleted waiter") -} - -func snapshotCompletedStateRetryable(ctx context.Context, input *DescribeSnapshotsInput, output *DescribeSnapshotsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Snapshots[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SnapshotState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SnapshotState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Snapshots[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "error" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.SnapshotState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SnapshotState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSnapshots", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotDatafeedSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotDatafeedSubscription.go deleted file mode 100644 index a4599c99c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotDatafeedSubscription.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the data feed for Spot Instances. For more information, see Spot -// Instance data feed (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) -// in the Amazon EC2 User Guide for Linux Instances. -func (c *Client) DescribeSpotDatafeedSubscription(ctx context.Context, params *DescribeSpotDatafeedSubscriptionInput, optFns ...func(*Options)) (*DescribeSpotDatafeedSubscriptionOutput, error) { - if params == nil { - params = &DescribeSpotDatafeedSubscriptionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSpotDatafeedSubscription", params, optFns, c.addOperationDescribeSpotDatafeedSubscriptionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSpotDatafeedSubscriptionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeSpotDatafeedSubscription. -type DescribeSpotDatafeedSubscriptionInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of DescribeSpotDatafeedSubscription. -type DescribeSpotDatafeedSubscriptionOutput struct { - - // The Spot Instance data feed subscription. - SpotDatafeedSubscription *types.SpotDatafeedSubscription - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSpotDatafeedSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotDatafeedSubscription{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotDatafeedSubscription{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSpotDatafeedSubscription"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotDatafeedSubscription(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeSpotDatafeedSubscription(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSpotDatafeedSubscription", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetInstances.go deleted file mode 100644 index ba3a23159..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetInstances.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the running instances for the specified Spot Fleet. -func (c *Client) DescribeSpotFleetInstances(ctx context.Context, params *DescribeSpotFleetInstancesInput, optFns ...func(*Options)) (*DescribeSpotFleetInstancesOutput, error) { - if params == nil { - params = &DescribeSpotFleetInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSpotFleetInstances", params, optFns, c.addOperationDescribeSpotFleetInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSpotFleetInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeSpotFleetInstances. -type DescribeSpotFleetInstancesInput struct { - - // The ID of the Spot Fleet request. - // - // This member is required. - SpotFleetRequestId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeSpotFleetInstances. -type DescribeSpotFleetInstancesOutput struct { - - // The running instances. This list is refreshed periodically and might be out of - // date. - ActiveInstances []types.ActiveInstance - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSpotFleetInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotFleetInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotFleetInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSpotFleetInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeSpotFleetInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotFleetInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeSpotFleetInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSpotFleetInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequestHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequestHistory.go deleted file mode 100644 index e58c39168..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequestHistory.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes the events for the specified Spot Fleet request during the specified -// time. Spot Fleet events are delayed by up to 30 seconds before they can be -// described. This ensures that you can query by the last evaluated time and not -// miss a recorded event. Spot Fleet events are available for 48 hours. For more -// information, see Monitor fleet events using Amazon EventBridge (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/fleet-monitor.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeSpotFleetRequestHistory(ctx context.Context, params *DescribeSpotFleetRequestHistoryInput, optFns ...func(*Options)) (*DescribeSpotFleetRequestHistoryOutput, error) { - if params == nil { - params = &DescribeSpotFleetRequestHistoryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSpotFleetRequestHistory", params, optFns, c.addOperationDescribeSpotFleetRequestHistoryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSpotFleetRequestHistoryOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeSpotFleetRequestHistory. -type DescribeSpotFleetRequestHistoryInput struct { - - // The ID of the Spot Fleet request. - // - // This member is required. - SpotFleetRequestId *string - - // The starting date and time for the events, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - // - // This member is required. - StartTime *time.Time - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The type of events to describe. By default, all events are described. - EventType types.EventType - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeSpotFleetRequestHistory. -type DescribeSpotFleetRequestHistoryOutput struct { - - // Information about the events in the history of the Spot Fleet request. - HistoryRecords []types.HistoryRecord - - // The last date and time for the events, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). All records up to this time were retrieved. If nextToken - // indicates that there are more items, this value is not present. - LastEvaluatedTime *time.Time - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string - - // The starting date and time for the events, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSpotFleetRequestHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotFleetRequestHistory{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotFleetRequestHistory{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSpotFleetRequestHistory"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeSpotFleetRequestHistoryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotFleetRequestHistory(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeSpotFleetRequestHistory(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSpotFleetRequestHistory", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequests.go deleted file mode 100644 index 5e4ca9d8b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotFleetRequests.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your Spot Fleet requests. Spot Fleet requests are deleted 48 hours -// after they are canceled and their instances are terminated. -func (c *Client) DescribeSpotFleetRequests(ctx context.Context, params *DescribeSpotFleetRequestsInput, optFns ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error) { - if params == nil { - params = &DescribeSpotFleetRequestsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSpotFleetRequests", params, optFns, c.addOperationDescribeSpotFleetRequestsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSpotFleetRequestsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeSpotFleetRequests. -type DescribeSpotFleetRequestsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The IDs of the Spot Fleet requests. - SpotFleetRequestIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeSpotFleetRequests. -type DescribeSpotFleetRequestsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the configuration of your Spot Fleet. - SpotFleetRequestConfigs []types.SpotFleetRequestConfig - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSpotFleetRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotFleetRequests{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotFleetRequests{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSpotFleetRequests"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotFleetRequests(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSpotFleetRequestsAPIClient is a client that implements the -// DescribeSpotFleetRequests operation. -type DescribeSpotFleetRequestsAPIClient interface { - DescribeSpotFleetRequests(context.Context, *DescribeSpotFleetRequestsInput, ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error) -} - -var _ DescribeSpotFleetRequestsAPIClient = (*Client)(nil) - -// DescribeSpotFleetRequestsPaginatorOptions is the paginator options for -// DescribeSpotFleetRequests -type DescribeSpotFleetRequestsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSpotFleetRequestsPaginator is a paginator for DescribeSpotFleetRequests -type DescribeSpotFleetRequestsPaginator struct { - options DescribeSpotFleetRequestsPaginatorOptions - client DescribeSpotFleetRequestsAPIClient - params *DescribeSpotFleetRequestsInput - nextToken *string - firstPage bool -} - -// NewDescribeSpotFleetRequestsPaginator returns a new -// DescribeSpotFleetRequestsPaginator -func NewDescribeSpotFleetRequestsPaginator(client DescribeSpotFleetRequestsAPIClient, params *DescribeSpotFleetRequestsInput, optFns ...func(*DescribeSpotFleetRequestsPaginatorOptions)) *DescribeSpotFleetRequestsPaginator { - if params == nil { - params = &DescribeSpotFleetRequestsInput{} - } - - options := DescribeSpotFleetRequestsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSpotFleetRequestsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSpotFleetRequestsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSpotFleetRequests page. -func (p *DescribeSpotFleetRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotFleetRequestsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSpotFleetRequests(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeSpotFleetRequests(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSpotFleetRequests", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go deleted file mode 100644 index 618f451b9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotInstanceRequests.go +++ /dev/null @@ -1,665 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the specified Spot Instance requests. You can use -// DescribeSpotInstanceRequests to find a running Spot Instance by examining the -// response. If the status of the Spot Instance is fulfilled , the instance ID -// appears in the response and contains the identifier of the instance. -// Alternatively, you can use DescribeInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances) -// with a filter to look for instances where the instance lifecycle is spot . We -// recommend that you set MaxResults to a value between 5 and 1000 to limit the -// number of items returned. This paginates the output, which makes the list more -// manageable and returns the items faster. If the list of items exceeds your -// MaxResults value, then that number of items is returned along with a NextToken -// value that can be passed to a subsequent DescribeSpotInstanceRequests request -// to retrieve the remaining items. Spot Instance requests are deleted four hours -// after they are canceled and their instances are terminated. -func (c *Client) DescribeSpotInstanceRequests(ctx context.Context, params *DescribeSpotInstanceRequestsInput, optFns ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) { - if params == nil { - params = &DescribeSpotInstanceRequestsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSpotInstanceRequests", params, optFns, c.addOperationDescribeSpotInstanceRequestsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSpotInstanceRequestsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeSpotInstanceRequests. -type DescribeSpotInstanceRequestsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - availability-zone-group - The Availability Zone group. - // - create-time - The time stamp when the Spot Instance request was created. - // - fault-code - The fault code related to the request. - // - fault-message - The fault message related to the request. - // - instance-id - The ID of the instance that fulfilled the request. - // - launch-group - The Spot Instance launch group. - // - launch.block-device-mapping.delete-on-termination - Indicates whether the - // EBS volume is deleted on instance termination. - // - launch.block-device-mapping.device-name - The device name for the volume in - // the block device mapping (for example, /dev/sdh or xvdh ). - // - launch.block-device-mapping.snapshot-id - The ID of the snapshot for the EBS - // volume. - // - launch.block-device-mapping.volume-size - The size of the EBS volume, in - // GiB. - // - launch.block-device-mapping.volume-type - The type of EBS volume: gp2 or gp3 - // for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for - // Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic. - // - launch.group-id - The ID of the security group for the instance. - // - launch.group-name - The name of the security group for the instance. - // - launch.image-id - The ID of the AMI. - // - launch.instance-type - The type of instance (for example, m3.medium ). - // - launch.kernel-id - The kernel ID. - // - launch.key-name - The name of the key pair the instance launched with. - // - launch.monitoring-enabled - Whether detailed monitoring is enabled for the - // Spot Instance. - // - launch.ramdisk-id - The RAM disk ID. - // - launched-availability-zone - The Availability Zone in which the request is - // launched. - // - network-interface.addresses.primary - Indicates whether the IP address is - // the primary private IP address. - // - network-interface.delete-on-termination - Indicates whether the network - // interface is deleted when the instance is terminated. - // - network-interface.description - A description of the network interface. - // - network-interface.device-index - The index of the device for the network - // interface attachment on the instance. - // - network-interface.group-id - The ID of the security group associated with - // the network interface. - // - network-interface.network-interface-id - The ID of the network interface. - // - network-interface.private-ip-address - The primary private IP address of the - // network interface. - // - network-interface.subnet-id - The ID of the subnet for the instance. - // - product-description - The product description associated with the instance ( - // Linux/UNIX | Windows ). - // - spot-instance-request-id - The Spot Instance request ID. - // - spot-price - The maximum hourly price for any Spot Instance launched to - // fulfill the request. - // - state - The state of the Spot Instance request ( open | active | closed | - // cancelled | failed ). Spot request status information can help you track your - // Amazon EC2 Spot Instance requests. For more information, see Spot request - // status (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html) - // in the Amazon EC2 User Guide for Linux Instances. - // - status-code - The short code describing the most recent evaluation of your - // Spot Instance request. - // - status-message - The message explaining the status of the Spot Instance - // request. - // - tag: - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - type - The type of Spot Instance request ( one-time | persistent ). - // - valid-from - The start date of the request. - // - valid-until - The end date of the request. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the Spot Instance requests. - SpotInstanceRequestIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeSpotInstanceRequests. -type DescribeSpotInstanceRequestsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The Spot Instance requests. - SpotInstanceRequests []types.SpotInstanceRequest - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSpotInstanceRequestsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotInstanceRequests{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotInstanceRequests{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSpotInstanceRequests"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotInstanceRequests(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSpotInstanceRequestsAPIClient is a client that implements the -// DescribeSpotInstanceRequests operation. -type DescribeSpotInstanceRequestsAPIClient interface { - DescribeSpotInstanceRequests(context.Context, *DescribeSpotInstanceRequestsInput, ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) -} - -var _ DescribeSpotInstanceRequestsAPIClient = (*Client)(nil) - -// DescribeSpotInstanceRequestsPaginatorOptions is the paginator options for -// DescribeSpotInstanceRequests -type DescribeSpotInstanceRequestsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSpotInstanceRequestsPaginator is a paginator for -// DescribeSpotInstanceRequests -type DescribeSpotInstanceRequestsPaginator struct { - options DescribeSpotInstanceRequestsPaginatorOptions - client DescribeSpotInstanceRequestsAPIClient - params *DescribeSpotInstanceRequestsInput - nextToken *string - firstPage bool -} - -// NewDescribeSpotInstanceRequestsPaginator returns a new -// DescribeSpotInstanceRequestsPaginator -func NewDescribeSpotInstanceRequestsPaginator(client DescribeSpotInstanceRequestsAPIClient, params *DescribeSpotInstanceRequestsInput, optFns ...func(*DescribeSpotInstanceRequestsPaginatorOptions)) *DescribeSpotInstanceRequestsPaginator { - if params == nil { - params = &DescribeSpotInstanceRequestsInput{} - } - - options := DescribeSpotInstanceRequestsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSpotInstanceRequestsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSpotInstanceRequestsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSpotInstanceRequests page. -func (p *DescribeSpotInstanceRequestsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotInstanceRequestsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSpotInstanceRequests(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// SpotInstanceRequestFulfilledWaiterOptions are waiter options for -// SpotInstanceRequestFulfilledWaiter -type SpotInstanceRequestFulfilledWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // SpotInstanceRequestFulfilledWaiter will use default minimum delay of 15 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, SpotInstanceRequestFulfilledWaiter will use default max delay of - // 120 seconds. Note that MaxDelay must resolve to value greater than or equal to - // the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeSpotInstanceRequestsInput, *DescribeSpotInstanceRequestsOutput, error) (bool, error) -} - -// SpotInstanceRequestFulfilledWaiter defines the waiters for -// SpotInstanceRequestFulfilled -type SpotInstanceRequestFulfilledWaiter struct { - client DescribeSpotInstanceRequestsAPIClient - - options SpotInstanceRequestFulfilledWaiterOptions -} - -// NewSpotInstanceRequestFulfilledWaiter constructs a -// SpotInstanceRequestFulfilledWaiter. -func NewSpotInstanceRequestFulfilledWaiter(client DescribeSpotInstanceRequestsAPIClient, optFns ...func(*SpotInstanceRequestFulfilledWaiterOptions)) *SpotInstanceRequestFulfilledWaiter { - options := SpotInstanceRequestFulfilledWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = spotInstanceRequestFulfilledStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &SpotInstanceRequestFulfilledWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for SpotInstanceRequestFulfilled waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *SpotInstanceRequestFulfilledWaiter) Wait(ctx context.Context, params *DescribeSpotInstanceRequestsInput, maxWaitDur time.Duration, optFns ...func(*SpotInstanceRequestFulfilledWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for SpotInstanceRequestFulfilled waiter -// and returns the output of the successful operation. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *SpotInstanceRequestFulfilledWaiter) WaitForOutput(ctx context.Context, params *DescribeSpotInstanceRequestsInput, maxWaitDur time.Duration, optFns ...func(*SpotInstanceRequestFulfilledWaiterOptions)) (*DescribeSpotInstanceRequestsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeSpotInstanceRequests(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for SpotInstanceRequestFulfilled waiter") -} - -func spotInstanceRequestFulfilledStateRetryable(ctx context.Context, input *DescribeSpotInstanceRequestsInput, output *DescribeSpotInstanceRequestsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "fulfilled" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "request-canceled-and-instance-running" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "schedule-expired" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "canceled-before-fulfillment" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "bad-parameters" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("SpotInstanceRequests[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "system-error" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidSpotInstanceRequestID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeSpotInstanceRequests(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSpotInstanceRequests", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotPriceHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotPriceHistory.go deleted file mode 100644 index 7951aae3e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSpotPriceHistory.go +++ /dev/null @@ -1,283 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes the Spot price history. For more information, see Spot Instance -// pricing history (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html) -// in the Amazon EC2 User Guide for Linux Instances. When you specify a start and -// end time, the operation returns the prices of the instance types within that -// time range. It also returns the last price change before the start time, which -// is the effective price as of the start time. -func (c *Client) DescribeSpotPriceHistory(ctx context.Context, params *DescribeSpotPriceHistoryInput, optFns ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error) { - if params == nil { - params = &DescribeSpotPriceHistoryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSpotPriceHistory", params, optFns, c.addOperationDescribeSpotPriceHistoryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSpotPriceHistoryOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeSpotPriceHistory. -type DescribeSpotPriceHistoryInput struct { - - // Filters the results by the specified Availability Zone. - AvailabilityZone *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The date and time, up to the current date, from which to stop retrieving the - // price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - EndTime *time.Time - - // The filters. - // - availability-zone - The Availability Zone for which prices should be - // returned. - // - instance-type - The type of instance (for example, m3.medium ). - // - product-description - The product description for the Spot price ( Linux/UNIX - // | Red Hat Enterprise Linux | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | - // Red Hat Enterprise Linux (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows - // (Amazon VPC) ). - // - spot-price - The Spot price. The value must match exactly (or use wildcards; - // greater than or less than comparison is not supported). - // - timestamp - The time stamp of the Spot price history, in UTC format (for - // example, ddd MMM dd HH:mm:ss UTC YYYY). You can use wildcards ( * and ? ). - // Greater than or less than comparison is not supported. - Filters []types.Filter - - // Filters the results by the specified instance types. - InstanceTypes []types.InstanceType - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // Filters the results by the specified basic product descriptions. - ProductDescriptions []string - - // The date and time, up to the past 90 days, from which to start retrieving the - // price history data, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). - StartTime *time.Time - - noSmithyDocumentSerde -} - -// Contains the output of DescribeSpotPriceHistory. -type DescribeSpotPriceHistoryOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The historical Spot prices. - SpotPriceHistory []types.SpotPrice - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSpotPriceHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSpotPriceHistory{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSpotPriceHistory{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSpotPriceHistory"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSpotPriceHistory(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSpotPriceHistoryAPIClient is a client that implements the -// DescribeSpotPriceHistory operation. -type DescribeSpotPriceHistoryAPIClient interface { - DescribeSpotPriceHistory(context.Context, *DescribeSpotPriceHistoryInput, ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error) -} - -var _ DescribeSpotPriceHistoryAPIClient = (*Client)(nil) - -// DescribeSpotPriceHistoryPaginatorOptions is the paginator options for -// DescribeSpotPriceHistory -type DescribeSpotPriceHistoryPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSpotPriceHistoryPaginator is a paginator for DescribeSpotPriceHistory -type DescribeSpotPriceHistoryPaginator struct { - options DescribeSpotPriceHistoryPaginatorOptions - client DescribeSpotPriceHistoryAPIClient - params *DescribeSpotPriceHistoryInput - nextToken *string - firstPage bool -} - -// NewDescribeSpotPriceHistoryPaginator returns a new -// DescribeSpotPriceHistoryPaginator -func NewDescribeSpotPriceHistoryPaginator(client DescribeSpotPriceHistoryAPIClient, params *DescribeSpotPriceHistoryInput, optFns ...func(*DescribeSpotPriceHistoryPaginatorOptions)) *DescribeSpotPriceHistoryPaginator { - if params == nil { - params = &DescribeSpotPriceHistoryInput{} - } - - options := DescribeSpotPriceHistoryPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSpotPriceHistoryPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSpotPriceHistoryPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSpotPriceHistory page. -func (p *DescribeSpotPriceHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSpotPriceHistoryOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSpotPriceHistory(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeSpotPriceHistory(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSpotPriceHistory", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStaleSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStaleSecurityGroups.go deleted file mode 100644 index 3e4c2210a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStaleSecurityGroups.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the stale security group rules for security groups in a specified -// VPC. Rules are stale when they reference a deleted security group in the same -// VPC, peered VPC, or in separate VPCs attached to a transit gateway (with -// security group referencing support (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-transit-gateways.html#create-tgw) -// enabled). Rules can also be stale if they reference a security group in a peer -// VPC for which the VPC peering connection has been deleted or if they reference a -// security group in a VPC that has been detached from a transit gateway. -func (c *Client) DescribeStaleSecurityGroups(ctx context.Context, params *DescribeStaleSecurityGroupsInput, optFns ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) { - if params == nil { - params = &DescribeStaleSecurityGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeStaleSecurityGroups", params, optFns, c.addOperationDescribeStaleSecurityGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeStaleSecurityGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeStaleSecurityGroupsInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeStaleSecurityGroupsOutput struct { - - // The token to include in another request to get the next page of items. If there - // are no additional items to return, the string is empty. - NextToken *string - - // Information about the stale security groups. - StaleSecurityGroupSet []types.StaleSecurityGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeStaleSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeStaleSecurityGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeStaleSecurityGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeStaleSecurityGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeStaleSecurityGroupsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStaleSecurityGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeStaleSecurityGroupsAPIClient is a client that implements the -// DescribeStaleSecurityGroups operation. -type DescribeStaleSecurityGroupsAPIClient interface { - DescribeStaleSecurityGroups(context.Context, *DescribeStaleSecurityGroupsInput, ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) -} - -var _ DescribeStaleSecurityGroupsAPIClient = (*Client)(nil) - -// DescribeStaleSecurityGroupsPaginatorOptions is the paginator options for -// DescribeStaleSecurityGroups -type DescribeStaleSecurityGroupsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeStaleSecurityGroupsPaginator is a paginator for -// DescribeStaleSecurityGroups -type DescribeStaleSecurityGroupsPaginator struct { - options DescribeStaleSecurityGroupsPaginatorOptions - client DescribeStaleSecurityGroupsAPIClient - params *DescribeStaleSecurityGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeStaleSecurityGroupsPaginator returns a new -// DescribeStaleSecurityGroupsPaginator -func NewDescribeStaleSecurityGroupsPaginator(client DescribeStaleSecurityGroupsAPIClient, params *DescribeStaleSecurityGroupsInput, optFns ...func(*DescribeStaleSecurityGroupsPaginatorOptions)) *DescribeStaleSecurityGroupsPaginator { - if params == nil { - params = &DescribeStaleSecurityGroupsInput{} - } - - options := DescribeStaleSecurityGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeStaleSecurityGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeStaleSecurityGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeStaleSecurityGroups page. -func (p *DescribeStaleSecurityGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStaleSecurityGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeStaleSecurityGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeStaleSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeStaleSecurityGroups", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go deleted file mode 100644 index d4f1d283e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeStoreImageTasks.go +++ /dev/null @@ -1,507 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the progress of the AMI store tasks. You can describe the store tasks -// for specified AMIs. If you don't specify the AMIs, you get a paginated list of -// store tasks from the last 31 days. For each AMI task, the response indicates if -// the task is InProgress , Completed , or Failed . For tasks InProgress , the -// response shows the estimated progress as a percentage. Tasks are listed in -// reverse chronological order. Currently, only tasks from the past 31 days can be -// viewed. To use this API, you must have the required permissions. For more -// information, see Permissions for storing and restoring AMIs using Amazon S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions) -// in the Amazon EC2 User Guide. For more information, see Store and restore an -// AMI using Amazon S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) -// in the Amazon EC2 User Guide. -func (c *Client) DescribeStoreImageTasks(ctx context.Context, params *DescribeStoreImageTasksInput, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, error) { - if params == nil { - params = &DescribeStoreImageTasksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeStoreImageTasks", params, optFns, c.addOperationDescribeStoreImageTasksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeStoreImageTasksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeStoreImageTasksInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - task-state - Returns tasks in a certain state ( InProgress | Completed | - // Failed ) - // - bucket - Returns task information for tasks that targeted a specific bucket. - // For the filter value, specify the bucket name. - // When you specify the ImageIds parameter, any filters that you specify are - // ignored. To use the filters, you must remove the ImageIds parameter. - Filters []types.Filter - - // The AMI IDs for which to show progress. Up to 20 AMI IDs can be included in a - // request. - ImageIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the ImageIds parameter in the same call. - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeStoreImageTasksOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The information about the AMI store tasks. - StoreImageTaskResults []types.StoreImageTaskResult - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeStoreImageTasksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeStoreImageTasks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeStoreImageTasks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeStoreImageTasks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStoreImageTasks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeStoreImageTasksAPIClient is a client that implements the -// DescribeStoreImageTasks operation. -type DescribeStoreImageTasksAPIClient interface { - DescribeStoreImageTasks(context.Context, *DescribeStoreImageTasksInput, ...func(*Options)) (*DescribeStoreImageTasksOutput, error) -} - -var _ DescribeStoreImageTasksAPIClient = (*Client)(nil) - -// DescribeStoreImageTasksPaginatorOptions is the paginator options for -// DescribeStoreImageTasks -type DescribeStoreImageTasksPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . You cannot specify this parameter and the ImageIds parameter in the same call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeStoreImageTasksPaginator is a paginator for DescribeStoreImageTasks -type DescribeStoreImageTasksPaginator struct { - options DescribeStoreImageTasksPaginatorOptions - client DescribeStoreImageTasksAPIClient - params *DescribeStoreImageTasksInput - nextToken *string - firstPage bool -} - -// NewDescribeStoreImageTasksPaginator returns a new -// DescribeStoreImageTasksPaginator -func NewDescribeStoreImageTasksPaginator(client DescribeStoreImageTasksAPIClient, params *DescribeStoreImageTasksInput, optFns ...func(*DescribeStoreImageTasksPaginatorOptions)) *DescribeStoreImageTasksPaginator { - if params == nil { - params = &DescribeStoreImageTasksInput{} - } - - options := DescribeStoreImageTasksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeStoreImageTasksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeStoreImageTasksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeStoreImageTasks page. -func (p *DescribeStoreImageTasksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeStoreImageTasksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeStoreImageTasks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// StoreImageTaskCompleteWaiterOptions are waiter options for -// StoreImageTaskCompleteWaiter -type StoreImageTaskCompleteWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // StoreImageTaskCompleteWaiter will use default minimum delay of 5 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, StoreImageTaskCompleteWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeStoreImageTasksInput, *DescribeStoreImageTasksOutput, error) (bool, error) -} - -// StoreImageTaskCompleteWaiter defines the waiters for StoreImageTaskComplete -type StoreImageTaskCompleteWaiter struct { - client DescribeStoreImageTasksAPIClient - - options StoreImageTaskCompleteWaiterOptions -} - -// NewStoreImageTaskCompleteWaiter constructs a StoreImageTaskCompleteWaiter. -func NewStoreImageTaskCompleteWaiter(client DescribeStoreImageTasksAPIClient, optFns ...func(*StoreImageTaskCompleteWaiterOptions)) *StoreImageTaskCompleteWaiter { - options := StoreImageTaskCompleteWaiterOptions{} - options.MinDelay = 5 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = storeImageTaskCompleteStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &StoreImageTaskCompleteWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for StoreImageTaskComplete waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *StoreImageTaskCompleteWaiter) Wait(ctx context.Context, params *DescribeStoreImageTasksInput, maxWaitDur time.Duration, optFns ...func(*StoreImageTaskCompleteWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for StoreImageTaskComplete waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *StoreImageTaskCompleteWaiter) WaitForOutput(ctx context.Context, params *DescribeStoreImageTasksInput, maxWaitDur time.Duration, optFns ...func(*StoreImageTaskCompleteWaiterOptions)) (*DescribeStoreImageTasksOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeStoreImageTasks(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for StoreImageTaskComplete waiter") -} - -func storeImageTaskCompleteStateRetryable(ctx context.Context, input *DescribeStoreImageTasksInput, output *DescribeStoreImageTasksOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("StoreImageTaskResults[].StoreTaskState", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "Completed" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("StoreImageTaskResults[].StoreTaskState", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "Failed" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("StoreImageTaskResults[].StoreTaskState", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "InProgress" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(*string) - if !ok { - return false, fmt.Errorf("waiter comparator expected *string value, got %T", pathValue) - } - - if string(*value) == expectedValue { - return true, nil - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeStoreImageTasks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeStoreImageTasks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go deleted file mode 100644 index 7dd8c2649..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeSubnets.go +++ /dev/null @@ -1,495 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your subnets. For more information, see Subnets (https://docs.aws.amazon.com/vpc/latest/userguide/configure-subnets.html) -// in the Amazon VPC User Guide. -func (c *Client) DescribeSubnets(ctx context.Context, params *DescribeSubnetsInput, optFns ...func(*Options)) (*DescribeSubnetsOutput, error) { - if params == nil { - params = &DescribeSubnetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSubnets", params, optFns, c.addOperationDescribeSubnetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSubnetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSubnetsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - availability-zone - The Availability Zone for the subnet. You can also use - // availabilityZone as the filter name. - // - availability-zone-id - The ID of the Availability Zone for the subnet. You - // can also use availabilityZoneId as the filter name. - // - available-ip-address-count - The number of IPv4 addresses in the subnet that - // are available. - // - cidr-block - The IPv4 CIDR block of the subnet. The CIDR block you specify - // must exactly match the subnet's CIDR block for information to be returned for - // the subnet. You can also use cidr or cidrBlock as the filter names. - // - customer-owned-ipv4-pool - The customer-owned IPv4 address pool associated - // with the subnet. - // - default-for-az - Indicates whether this is the default subnet for the - // Availability Zone ( true | false ). You can also use defaultForAz as the - // filter name. - // - enable-dns64 - Indicates whether DNS queries made to the Amazon-provided DNS - // Resolver in this subnet should return synthetic IPv6 addresses for IPv4-only - // destinations. - // - enable-lni-at-device-index - Indicates the device position for local network - // interfaces in this subnet. For example, 1 indicates local network interfaces - // in this subnet are the secondary network interface (eth1). - // - ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated - // with the subnet. - // - ipv6-cidr-block-association.association-id - An association ID for an IPv6 - // CIDR block associated with the subnet. - // - ipv6-cidr-block-association.state - The state of an IPv6 CIDR block - // associated with the subnet. - // - ipv6-native - Indicates whether this is an IPv6 only subnet ( true | false - // ). - // - map-customer-owned-ip-on-launch - Indicates whether a network interface - // created in this subnet (including a network interface created by RunInstances - // ) receives a customer-owned IPv4 address. - // - map-public-ip-on-launch - Indicates whether instances launched in this - // subnet receive a public IPv4 address. - // - outpost-arn - The Amazon Resource Name (ARN) of the Outpost. - // - owner-id - The ID of the Amazon Web Services account that owns the subnet. - // - private-dns-name-options-on-launch.hostname-type - The type of hostname to - // assign to instances in the subnet at launch. For IPv4-only and dual-stack (IPv4 - // and IPv6) subnets, an instance DNS name can be based on the instance IPv4 - // address (ip-name) or the instance ID (resource-name). For IPv6 only subnets, an - // instance DNS name must be based on the instance ID (resource-name). - // - private-dns-name-options-on-launch.enable-resource-name-dns-a-record - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - // - private-dns-name-options-on-launch.enable-resource-name-dns-aaaa-record - - // Indicates whether to respond to DNS queries for instance hostnames with DNS AAAA - // records. - // - state - The state of the subnet ( pending | available ). - // - subnet-arn - The Amazon Resource Name (ARN) of the subnet. - // - subnet-id - The ID of the subnet. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC for the subnet. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the subnets. Default: Describes all your subnets. - SubnetIds []string - - noSmithyDocumentSerde -} - -type DescribeSubnetsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about one or more subnets. - Subnets []types.Subnet - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSubnetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeSubnets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeSubnets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSubnets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSubnets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeSubnetsAPIClient is a client that implements the DescribeSubnets -// operation. -type DescribeSubnetsAPIClient interface { - DescribeSubnets(context.Context, *DescribeSubnetsInput, ...func(*Options)) (*DescribeSubnetsOutput, error) -} - -var _ DescribeSubnetsAPIClient = (*Client)(nil) - -// DescribeSubnetsPaginatorOptions is the paginator options for DescribeSubnets -type DescribeSubnetsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeSubnetsPaginator is a paginator for DescribeSubnets -type DescribeSubnetsPaginator struct { - options DescribeSubnetsPaginatorOptions - client DescribeSubnetsAPIClient - params *DescribeSubnetsInput - nextToken *string - firstPage bool -} - -// NewDescribeSubnetsPaginator returns a new DescribeSubnetsPaginator -func NewDescribeSubnetsPaginator(client DescribeSubnetsAPIClient, params *DescribeSubnetsInput, optFns ...func(*DescribeSubnetsPaginatorOptions)) *DescribeSubnetsPaginator { - if params == nil { - params = &DescribeSubnetsInput{} - } - - options := DescribeSubnetsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeSubnetsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeSubnetsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeSubnets page. -func (p *DescribeSubnetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeSubnetsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeSubnets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// SubnetAvailableWaiterOptions are waiter options for SubnetAvailableWaiter -type SubnetAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // SubnetAvailableWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, SubnetAvailableWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeSubnetsInput, *DescribeSubnetsOutput, error) (bool, error) -} - -// SubnetAvailableWaiter defines the waiters for SubnetAvailable -type SubnetAvailableWaiter struct { - client DescribeSubnetsAPIClient - - options SubnetAvailableWaiterOptions -} - -// NewSubnetAvailableWaiter constructs a SubnetAvailableWaiter. -func NewSubnetAvailableWaiter(client DescribeSubnetsAPIClient, optFns ...func(*SubnetAvailableWaiterOptions)) *SubnetAvailableWaiter { - options := SubnetAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = subnetAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &SubnetAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for SubnetAvailable waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *SubnetAvailableWaiter) Wait(ctx context.Context, params *DescribeSubnetsInput, maxWaitDur time.Duration, optFns ...func(*SubnetAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for SubnetAvailable waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *SubnetAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeSubnetsInput, maxWaitDur time.Duration, optFns ...func(*SubnetAvailableWaiterOptions)) (*DescribeSubnetsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeSubnets(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for SubnetAvailable waiter") -} - -func subnetAvailableStateRetryable(ctx context.Context, input *DescribeSubnetsInput, output *DescribeSubnetsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Subnets[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.SubnetState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.SubnetState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeSubnets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSubnets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTags.go deleted file mode 100644 index e15eeeb50..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTags.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified tags for your EC2 resources. For more information about -// tags, see Tag your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error) { - if params == nil { - params = &DescribeTagsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTags", params, optFns, c.addOperationDescribeTagsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTagsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTagsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - key - The tag key. - // - resource-id - The ID of the resource. - // - resource-type - The resource type ( customer-gateway | dedicated-host | - // dhcp-options | elastic-ip | fleet | fpga-image | host-reservation | image | - // instance | internet-gateway | key-pair | launch-template | natgateway | - // network-acl | network-interface | placement-group | reserved-instances | - // route-table | security-group | snapshot | spot-instances-request | subnet | - // volume | vpc | vpc-endpoint | vpc-endpoint-service | vpc-peering-connection | - // vpn-connection | vpn-gateway ). - // - tag : - The key/value combination of the tag. For example, specify - // "tag:Owner" for the filter name and "TeamA" for the filter value to find - // resources with the tag "Owner=TeamA". - // - value - The tag value. - Filters []types.Filter - - // The maximum number of items to return for this request. This value can be - // between 5 and 1000. To get the next page of items, make another request with the - // token returned in the output. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeTagsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The tags. - Tags []types.TagDescription - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTags{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTags{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTags"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTags(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTagsAPIClient is a client that implements the DescribeTags operation. -type DescribeTagsAPIClient interface { - DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) -} - -var _ DescribeTagsAPIClient = (*Client)(nil) - -// DescribeTagsPaginatorOptions is the paginator options for DescribeTags -type DescribeTagsPaginatorOptions struct { - // The maximum number of items to return for this request. This value can be - // between 5 and 1000. To get the next page of items, make another request with the - // token returned in the output. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTagsPaginator is a paginator for DescribeTags -type DescribeTagsPaginator struct { - options DescribeTagsPaginatorOptions - client DescribeTagsAPIClient - params *DescribeTagsInput - nextToken *string - firstPage bool -} - -// NewDescribeTagsPaginator returns a new DescribeTagsPaginator -func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTagsInput, optFns ...func(*DescribeTagsPaginatorOptions)) *DescribeTagsPaginator { - if params == nil { - params = &DescribeTagsInput{} - } - - options := DescribeTagsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTagsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTagsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTags page. -func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTagsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTags", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorFilters.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorFilters.go deleted file mode 100644 index b01f361ec..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorFilters.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more Traffic Mirror filters. -func (c *Client) DescribeTrafficMirrorFilters(ctx context.Context, params *DescribeTrafficMirrorFiltersInput, optFns ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error) { - if params == nil { - params = &DescribeTrafficMirrorFiltersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTrafficMirrorFilters", params, optFns, c.addOperationDescribeTrafficMirrorFiltersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTrafficMirrorFiltersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTrafficMirrorFiltersInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - description : The Traffic Mirror filter description. - // - traffic-mirror-filter-id : The ID of the Traffic Mirror filter. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the Traffic Mirror filter. - TrafficMirrorFilterIds []string - - noSmithyDocumentSerde -} - -type DescribeTrafficMirrorFiltersOutput struct { - - // The token to use to retrieve the next page of results. The value is null when - // there are no more results to return. - NextToken *string - - // Information about one or more Traffic Mirror filters. - TrafficMirrorFilters []types.TrafficMirrorFilter - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTrafficMirrorFiltersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrafficMirrorFilters{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrafficMirrorFilters{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTrafficMirrorFilters"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorFilters(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTrafficMirrorFiltersAPIClient is a client that implements the -// DescribeTrafficMirrorFilters operation. -type DescribeTrafficMirrorFiltersAPIClient interface { - DescribeTrafficMirrorFilters(context.Context, *DescribeTrafficMirrorFiltersInput, ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error) -} - -var _ DescribeTrafficMirrorFiltersAPIClient = (*Client)(nil) - -// DescribeTrafficMirrorFiltersPaginatorOptions is the paginator options for -// DescribeTrafficMirrorFilters -type DescribeTrafficMirrorFiltersPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTrafficMirrorFiltersPaginator is a paginator for -// DescribeTrafficMirrorFilters -type DescribeTrafficMirrorFiltersPaginator struct { - options DescribeTrafficMirrorFiltersPaginatorOptions - client DescribeTrafficMirrorFiltersAPIClient - params *DescribeTrafficMirrorFiltersInput - nextToken *string - firstPage bool -} - -// NewDescribeTrafficMirrorFiltersPaginator returns a new -// DescribeTrafficMirrorFiltersPaginator -func NewDescribeTrafficMirrorFiltersPaginator(client DescribeTrafficMirrorFiltersAPIClient, params *DescribeTrafficMirrorFiltersInput, optFns ...func(*DescribeTrafficMirrorFiltersPaginatorOptions)) *DescribeTrafficMirrorFiltersPaginator { - if params == nil { - params = &DescribeTrafficMirrorFiltersInput{} - } - - options := DescribeTrafficMirrorFiltersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTrafficMirrorFiltersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTrafficMirrorFiltersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTrafficMirrorFilters page. -func (p *DescribeTrafficMirrorFiltersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrafficMirrorFiltersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTrafficMirrorFilters(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTrafficMirrorFilters(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTrafficMirrorFilters", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorSessions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorSessions.go deleted file mode 100644 index 9b9b6bb64..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorSessions.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror -// sessions are described. Alternatively, you can filter the results. -func (c *Client) DescribeTrafficMirrorSessions(ctx context.Context, params *DescribeTrafficMirrorSessionsInput, optFns ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error) { - if params == nil { - params = &DescribeTrafficMirrorSessionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTrafficMirrorSessions", params, optFns, c.addOperationDescribeTrafficMirrorSessionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTrafficMirrorSessionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTrafficMirrorSessionsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - description : The Traffic Mirror session description. - // - network-interface-id : The ID of the Traffic Mirror session network - // interface. - // - owner-id : The ID of the account that owns the Traffic Mirror session. - // - packet-length : The assigned number of packets to mirror. - // - session-number : The assigned session number. - // - traffic-mirror-filter-id : The ID of the Traffic Mirror filter. - // - traffic-mirror-session-id : The ID of the Traffic Mirror session. - // - traffic-mirror-target-id : The ID of the Traffic Mirror target. - // - virtual-network-id : The virtual network ID of the Traffic Mirror session. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the Traffic Mirror session. - TrafficMirrorSessionIds []string - - noSmithyDocumentSerde -} - -type DescribeTrafficMirrorSessionsOutput struct { - - // The token to use to retrieve the next page of results. The value is null when - // there are no more results to return. - NextToken *string - - // Describes one or more Traffic Mirror sessions. By default, all Traffic Mirror - // sessions are described. Alternatively, you can filter the results. - TrafficMirrorSessions []types.TrafficMirrorSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTrafficMirrorSessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrafficMirrorSessions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrafficMirrorSessions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTrafficMirrorSessions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorSessions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTrafficMirrorSessionsAPIClient is a client that implements the -// DescribeTrafficMirrorSessions operation. -type DescribeTrafficMirrorSessionsAPIClient interface { - DescribeTrafficMirrorSessions(context.Context, *DescribeTrafficMirrorSessionsInput, ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error) -} - -var _ DescribeTrafficMirrorSessionsAPIClient = (*Client)(nil) - -// DescribeTrafficMirrorSessionsPaginatorOptions is the paginator options for -// DescribeTrafficMirrorSessions -type DescribeTrafficMirrorSessionsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTrafficMirrorSessionsPaginator is a paginator for -// DescribeTrafficMirrorSessions -type DescribeTrafficMirrorSessionsPaginator struct { - options DescribeTrafficMirrorSessionsPaginatorOptions - client DescribeTrafficMirrorSessionsAPIClient - params *DescribeTrafficMirrorSessionsInput - nextToken *string - firstPage bool -} - -// NewDescribeTrafficMirrorSessionsPaginator returns a new -// DescribeTrafficMirrorSessionsPaginator -func NewDescribeTrafficMirrorSessionsPaginator(client DescribeTrafficMirrorSessionsAPIClient, params *DescribeTrafficMirrorSessionsInput, optFns ...func(*DescribeTrafficMirrorSessionsPaginatorOptions)) *DescribeTrafficMirrorSessionsPaginator { - if params == nil { - params = &DescribeTrafficMirrorSessionsInput{} - } - - options := DescribeTrafficMirrorSessionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTrafficMirrorSessionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTrafficMirrorSessionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTrafficMirrorSessions page. -func (p *DescribeTrafficMirrorSessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrafficMirrorSessionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTrafficMirrorSessions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTrafficMirrorSessions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTrafficMirrorSessions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorTargets.go deleted file mode 100644 index 85a105d27..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrafficMirrorTargets.go +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Information about one or more Traffic Mirror targets. -func (c *Client) DescribeTrafficMirrorTargets(ctx context.Context, params *DescribeTrafficMirrorTargetsInput, optFns ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error) { - if params == nil { - params = &DescribeTrafficMirrorTargetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTrafficMirrorTargets", params, optFns, c.addOperationDescribeTrafficMirrorTargetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTrafficMirrorTargetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTrafficMirrorTargetsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - description : The Traffic Mirror target description. - // - network-interface-id : The ID of the Traffic Mirror session network - // interface. - // - network-load-balancer-arn : The Amazon Resource Name (ARN) of the Network - // Load Balancer that is associated with the session. - // - owner-id : The ID of the account that owns the Traffic Mirror session. - // - traffic-mirror-target-id : The ID of the Traffic Mirror target. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the Traffic Mirror targets. - TrafficMirrorTargetIds []string - - noSmithyDocumentSerde -} - -type DescribeTrafficMirrorTargetsOutput struct { - - // The token to use to retrieve the next page of results. The value is null when - // there are no more results to return. - NextToken *string - - // Information about one or more Traffic Mirror targets. - TrafficMirrorTargets []types.TrafficMirrorTarget - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTrafficMirrorTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrafficMirrorTargets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrafficMirrorTargets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTrafficMirrorTargets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrafficMirrorTargets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTrafficMirrorTargetsAPIClient is a client that implements the -// DescribeTrafficMirrorTargets operation. -type DescribeTrafficMirrorTargetsAPIClient interface { - DescribeTrafficMirrorTargets(context.Context, *DescribeTrafficMirrorTargetsInput, ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error) -} - -var _ DescribeTrafficMirrorTargetsAPIClient = (*Client)(nil) - -// DescribeTrafficMirrorTargetsPaginatorOptions is the paginator options for -// DescribeTrafficMirrorTargets -type DescribeTrafficMirrorTargetsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTrafficMirrorTargetsPaginator is a paginator for -// DescribeTrafficMirrorTargets -type DescribeTrafficMirrorTargetsPaginator struct { - options DescribeTrafficMirrorTargetsPaginatorOptions - client DescribeTrafficMirrorTargetsAPIClient - params *DescribeTrafficMirrorTargetsInput - nextToken *string - firstPage bool -} - -// NewDescribeTrafficMirrorTargetsPaginator returns a new -// DescribeTrafficMirrorTargetsPaginator -func NewDescribeTrafficMirrorTargetsPaginator(client DescribeTrafficMirrorTargetsAPIClient, params *DescribeTrafficMirrorTargetsInput, optFns ...func(*DescribeTrafficMirrorTargetsPaginatorOptions)) *DescribeTrafficMirrorTargetsPaginator { - if params == nil { - params = &DescribeTrafficMirrorTargetsInput{} - } - - options := DescribeTrafficMirrorTargetsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTrafficMirrorTargetsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTrafficMirrorTargetsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTrafficMirrorTargets page. -func (p *DescribeTrafficMirrorTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrafficMirrorTargetsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTrafficMirrorTargets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTrafficMirrorTargets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTrafficMirrorTargets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayAttachments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayAttachments.go deleted file mode 100644 index 7e390d889..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayAttachments.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more attachments between resources and transit gateways. By -// default, all attachments are described. Alternatively, you can filter the -// results by attachment ID, attachment state, resource ID, or resource owner. -func (c *Client) DescribeTransitGatewayAttachments(ctx context.Context, params *DescribeTransitGatewayAttachmentsInput, optFns ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error) { - if params == nil { - params = &DescribeTransitGatewayAttachmentsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayAttachments", params, optFns, c.addOperationDescribeTransitGatewayAttachmentsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayAttachmentsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayAttachmentsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - association.state - The state of the association ( associating | associated - // | disassociating ). - // - association.transit-gateway-route-table-id - The ID of the route table for - // the transit gateway. - // - resource-id - The ID of the resource. - // - resource-owner-id - The ID of the Amazon Web Services account that owns the - // resource. - // - resource-type - The resource type. Valid values are vpc | vpn | - // direct-connect-gateway | peering | connect . - // - state - The state of the attachment. Valid values are available | deleted | - // deleting | failed | failing | initiatingRequest | modifying | - // pendingAcceptance | pending | rollingBack | rejected | rejecting . - // - transit-gateway-attachment-id - The ID of the attachment. - // - transit-gateway-id - The ID of the transit gateway. - // - transit-gateway-owner-id - The ID of the Amazon Web Services account that - // owns the transit gateway. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the attachments. - TransitGatewayAttachmentIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayAttachmentsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the attachments. - TransitGatewayAttachments []types.TransitGatewayAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayAttachments{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayAttachments{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayAttachments"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayAttachments(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayAttachmentsAPIClient is a client that implements the -// DescribeTransitGatewayAttachments operation. -type DescribeTransitGatewayAttachmentsAPIClient interface { - DescribeTransitGatewayAttachments(context.Context, *DescribeTransitGatewayAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error) -} - -var _ DescribeTransitGatewayAttachmentsAPIClient = (*Client)(nil) - -// DescribeTransitGatewayAttachmentsPaginatorOptions is the paginator options for -// DescribeTransitGatewayAttachments -type DescribeTransitGatewayAttachmentsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayAttachmentsPaginator is a paginator for -// DescribeTransitGatewayAttachments -type DescribeTransitGatewayAttachmentsPaginator struct { - options DescribeTransitGatewayAttachmentsPaginatorOptions - client DescribeTransitGatewayAttachmentsAPIClient - params *DescribeTransitGatewayAttachmentsInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayAttachmentsPaginator returns a new -// DescribeTransitGatewayAttachmentsPaginator -func NewDescribeTransitGatewayAttachmentsPaginator(client DescribeTransitGatewayAttachmentsAPIClient, params *DescribeTransitGatewayAttachmentsInput, optFns ...func(*DescribeTransitGatewayAttachmentsPaginatorOptions)) *DescribeTransitGatewayAttachmentsPaginator { - if params == nil { - params = &DescribeTransitGatewayAttachmentsInput{} - } - - options := DescribeTransitGatewayAttachmentsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayAttachmentsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayAttachments page. -func (p *DescribeTransitGatewayAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayAttachmentsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayAttachments(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayAttachments(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayAttachments", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go deleted file mode 100644 index 8db87e7f1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnectPeers.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more Connect peers. -func (c *Client) DescribeTransitGatewayConnectPeers(ctx context.Context, params *DescribeTransitGatewayConnectPeersInput, optFns ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error) { - if params == nil { - params = &DescribeTransitGatewayConnectPeersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayConnectPeers", params, optFns, c.addOperationDescribeTransitGatewayConnectPeersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayConnectPeersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayConnectPeersInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - state - The state of the Connect peer ( pending | available | deleting | - // deleted ). - // - transit-gateway-attachment-id - The ID of the attachment. - // - transit-gateway-connect-peer-id - The ID of the Connect peer. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the Connect peers. - TransitGatewayConnectPeerIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayConnectPeersOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the Connect peers. - TransitGatewayConnectPeers []types.TransitGatewayConnectPeer - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayConnectPeersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayConnectPeers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayConnectPeers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayConnectPeers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayConnectPeersAPIClient is a client that implements the -// DescribeTransitGatewayConnectPeers operation. -type DescribeTransitGatewayConnectPeersAPIClient interface { - DescribeTransitGatewayConnectPeers(context.Context, *DescribeTransitGatewayConnectPeersInput, ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error) -} - -var _ DescribeTransitGatewayConnectPeersAPIClient = (*Client)(nil) - -// DescribeTransitGatewayConnectPeersPaginatorOptions is the paginator options for -// DescribeTransitGatewayConnectPeers -type DescribeTransitGatewayConnectPeersPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayConnectPeersPaginator is a paginator for -// DescribeTransitGatewayConnectPeers -type DescribeTransitGatewayConnectPeersPaginator struct { - options DescribeTransitGatewayConnectPeersPaginatorOptions - client DescribeTransitGatewayConnectPeersAPIClient - params *DescribeTransitGatewayConnectPeersInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayConnectPeersPaginator returns a new -// DescribeTransitGatewayConnectPeersPaginator -func NewDescribeTransitGatewayConnectPeersPaginator(client DescribeTransitGatewayConnectPeersAPIClient, params *DescribeTransitGatewayConnectPeersInput, optFns ...func(*DescribeTransitGatewayConnectPeersPaginatorOptions)) *DescribeTransitGatewayConnectPeersPaginator { - if params == nil { - params = &DescribeTransitGatewayConnectPeersInput{} - } - - options := DescribeTransitGatewayConnectPeersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayConnectPeersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayConnectPeersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayConnectPeers page. -func (p *DescribeTransitGatewayConnectPeersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayConnectPeersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayConnectPeers(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayConnectPeers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayConnectPeers", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnects.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnects.go deleted file mode 100644 index 70f4884a5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayConnects.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more Connect attachments. -func (c *Client) DescribeTransitGatewayConnects(ctx context.Context, params *DescribeTransitGatewayConnectsInput, optFns ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error) { - if params == nil { - params = &DescribeTransitGatewayConnectsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayConnects", params, optFns, c.addOperationDescribeTransitGatewayConnectsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayConnectsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayConnectsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - options.protocol - The tunnel protocol ( gre ). - // - state - The state of the attachment ( initiating | initiatingRequest | - // pendingAcceptance | rollingBack | pending | available | modifying | deleting | - // deleted | failed | rejected | rejecting | failing ). - // - transit-gateway-attachment-id - The ID of the Connect attachment. - // - transit-gateway-id - The ID of the transit gateway. - // - transport-transit-gateway-attachment-id - The ID of the transit gateway - // attachment from which the Connect attachment was created. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the attachments. - TransitGatewayAttachmentIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayConnectsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the Connect attachments. - TransitGatewayConnects []types.TransitGatewayConnect - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayConnectsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayConnects{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayConnects{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayConnects"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayConnects(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayConnectsAPIClient is a client that implements the -// DescribeTransitGatewayConnects operation. -type DescribeTransitGatewayConnectsAPIClient interface { - DescribeTransitGatewayConnects(context.Context, *DescribeTransitGatewayConnectsInput, ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error) -} - -var _ DescribeTransitGatewayConnectsAPIClient = (*Client)(nil) - -// DescribeTransitGatewayConnectsPaginatorOptions is the paginator options for -// DescribeTransitGatewayConnects -type DescribeTransitGatewayConnectsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayConnectsPaginator is a paginator for -// DescribeTransitGatewayConnects -type DescribeTransitGatewayConnectsPaginator struct { - options DescribeTransitGatewayConnectsPaginatorOptions - client DescribeTransitGatewayConnectsAPIClient - params *DescribeTransitGatewayConnectsInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayConnectsPaginator returns a new -// DescribeTransitGatewayConnectsPaginator -func NewDescribeTransitGatewayConnectsPaginator(client DescribeTransitGatewayConnectsAPIClient, params *DescribeTransitGatewayConnectsInput, optFns ...func(*DescribeTransitGatewayConnectsPaginatorOptions)) *DescribeTransitGatewayConnectsPaginator { - if params == nil { - params = &DescribeTransitGatewayConnectsInput{} - } - - options := DescribeTransitGatewayConnectsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayConnectsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayConnectsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayConnects page. -func (p *DescribeTransitGatewayConnectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayConnectsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayConnects(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayConnects(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayConnects", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go deleted file mode 100644 index 2b36f14e7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayMulticastDomains.go +++ /dev/null @@ -1,250 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more transit gateway multicast domains. -func (c *Client) DescribeTransitGatewayMulticastDomains(ctx context.Context, params *DescribeTransitGatewayMulticastDomainsInput, optFns ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error) { - if params == nil { - params = &DescribeTransitGatewayMulticastDomainsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayMulticastDomains", params, optFns, c.addOperationDescribeTransitGatewayMulticastDomainsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayMulticastDomainsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayMulticastDomainsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - state - The state of the transit gateway multicast domain. Valid values are - // pending | available | deleting | deleted . - // - transit-gateway-id - The ID of the transit gateway. - // - transit-gateway-multicast-domain-id - The ID of the transit gateway - // multicast domain. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayMulticastDomainsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the transit gateway multicast domains. - TransitGatewayMulticastDomains []types.TransitGatewayMulticastDomain - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayMulticastDomainsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayMulticastDomains"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayMulticastDomains(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayMulticastDomainsAPIClient is a client that implements the -// DescribeTransitGatewayMulticastDomains operation. -type DescribeTransitGatewayMulticastDomainsAPIClient interface { - DescribeTransitGatewayMulticastDomains(context.Context, *DescribeTransitGatewayMulticastDomainsInput, ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error) -} - -var _ DescribeTransitGatewayMulticastDomainsAPIClient = (*Client)(nil) - -// DescribeTransitGatewayMulticastDomainsPaginatorOptions is the paginator options -// for DescribeTransitGatewayMulticastDomains -type DescribeTransitGatewayMulticastDomainsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayMulticastDomainsPaginator is a paginator for -// DescribeTransitGatewayMulticastDomains -type DescribeTransitGatewayMulticastDomainsPaginator struct { - options DescribeTransitGatewayMulticastDomainsPaginatorOptions - client DescribeTransitGatewayMulticastDomainsAPIClient - params *DescribeTransitGatewayMulticastDomainsInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayMulticastDomainsPaginator returns a new -// DescribeTransitGatewayMulticastDomainsPaginator -func NewDescribeTransitGatewayMulticastDomainsPaginator(client DescribeTransitGatewayMulticastDomainsAPIClient, params *DescribeTransitGatewayMulticastDomainsInput, optFns ...func(*DescribeTransitGatewayMulticastDomainsPaginatorOptions)) *DescribeTransitGatewayMulticastDomainsPaginator { - if params == nil { - params = &DescribeTransitGatewayMulticastDomainsInput{} - } - - options := DescribeTransitGatewayMulticastDomainsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayMulticastDomainsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayMulticastDomainsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayMulticastDomains page. -func (p *DescribeTransitGatewayMulticastDomainsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayMulticastDomainsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayMulticastDomains(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayMulticastDomains(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayMulticastDomains", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go deleted file mode 100644 index 2aae4b3e7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPeeringAttachments.go +++ /dev/null @@ -1,259 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your transit gateway peering attachments. -func (c *Client) DescribeTransitGatewayPeeringAttachments(ctx context.Context, params *DescribeTransitGatewayPeeringAttachmentsInput, optFns ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error) { - if params == nil { - params = &DescribeTransitGatewayPeeringAttachmentsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayPeeringAttachments", params, optFns, c.addOperationDescribeTransitGatewayPeeringAttachmentsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayPeeringAttachmentsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayPeeringAttachmentsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - transit-gateway-attachment-id - The ID of the transit gateway attachment. - // - local-owner-id - The ID of your Amazon Web Services account. - // - remote-owner-id - The ID of the Amazon Web Services account in the remote - // Region that owns the transit gateway. - // - state - The state of the peering attachment. Valid values are available | - // deleted | deleting | failed | failing | initiatingRequest | modifying | - // pendingAcceptance | pending | rollingBack | rejected | rejecting ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources that have a tag with a specific key, regardless of the tag value. - // - transit-gateway-id - The ID of the transit gateway. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // One or more IDs of the transit gateway peering attachments. - TransitGatewayAttachmentIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayPeeringAttachmentsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // The transit gateway peering attachments. - TransitGatewayPeeringAttachments []types.TransitGatewayPeeringAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayPeeringAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayPeeringAttachments"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayPeeringAttachments(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayPeeringAttachmentsAPIClient is a client that implements -// the DescribeTransitGatewayPeeringAttachments operation. -type DescribeTransitGatewayPeeringAttachmentsAPIClient interface { - DescribeTransitGatewayPeeringAttachments(context.Context, *DescribeTransitGatewayPeeringAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error) -} - -var _ DescribeTransitGatewayPeeringAttachmentsAPIClient = (*Client)(nil) - -// DescribeTransitGatewayPeeringAttachmentsPaginatorOptions is the paginator -// options for DescribeTransitGatewayPeeringAttachments -type DescribeTransitGatewayPeeringAttachmentsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayPeeringAttachmentsPaginator is a paginator for -// DescribeTransitGatewayPeeringAttachments -type DescribeTransitGatewayPeeringAttachmentsPaginator struct { - options DescribeTransitGatewayPeeringAttachmentsPaginatorOptions - client DescribeTransitGatewayPeeringAttachmentsAPIClient - params *DescribeTransitGatewayPeeringAttachmentsInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayPeeringAttachmentsPaginator returns a new -// DescribeTransitGatewayPeeringAttachmentsPaginator -func NewDescribeTransitGatewayPeeringAttachmentsPaginator(client DescribeTransitGatewayPeeringAttachmentsAPIClient, params *DescribeTransitGatewayPeeringAttachmentsInput, optFns ...func(*DescribeTransitGatewayPeeringAttachmentsPaginatorOptions)) *DescribeTransitGatewayPeeringAttachmentsPaginator { - if params == nil { - params = &DescribeTransitGatewayPeeringAttachmentsInput{} - } - - options := DescribeTransitGatewayPeeringAttachmentsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayPeeringAttachmentsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayPeeringAttachments page. -func (p *DescribeTransitGatewayPeeringAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayPeeringAttachmentsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayPeeringAttachments(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayPeeringAttachments(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayPeeringAttachments", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go deleted file mode 100644 index 17902528b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayPolicyTables.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more transit gateway route policy tables. -func (c *Client) DescribeTransitGatewayPolicyTables(ctx context.Context, params *DescribeTransitGatewayPolicyTablesInput, optFns ...func(*Options)) (*DescribeTransitGatewayPolicyTablesOutput, error) { - if params == nil { - params = &DescribeTransitGatewayPolicyTablesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayPolicyTables", params, optFns, c.addOperationDescribeTransitGatewayPolicyTablesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayPolicyTablesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayPolicyTablesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters associated with the transit gateway policy table. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the transit gateway policy tables. - TransitGatewayPolicyTableIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayPolicyTablesOutput struct { - - // The token for the next page of results. - NextToken *string - - // Describes the transit gateway policy tables. - TransitGatewayPolicyTables []types.TransitGatewayPolicyTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayPolicyTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayPolicyTables{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayPolicyTables{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayPolicyTables"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayPolicyTables(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayPolicyTablesAPIClient is a client that implements the -// DescribeTransitGatewayPolicyTables operation. -type DescribeTransitGatewayPolicyTablesAPIClient interface { - DescribeTransitGatewayPolicyTables(context.Context, *DescribeTransitGatewayPolicyTablesInput, ...func(*Options)) (*DescribeTransitGatewayPolicyTablesOutput, error) -} - -var _ DescribeTransitGatewayPolicyTablesAPIClient = (*Client)(nil) - -// DescribeTransitGatewayPolicyTablesPaginatorOptions is the paginator options for -// DescribeTransitGatewayPolicyTables -type DescribeTransitGatewayPolicyTablesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayPolicyTablesPaginator is a paginator for -// DescribeTransitGatewayPolicyTables -type DescribeTransitGatewayPolicyTablesPaginator struct { - options DescribeTransitGatewayPolicyTablesPaginatorOptions - client DescribeTransitGatewayPolicyTablesAPIClient - params *DescribeTransitGatewayPolicyTablesInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayPolicyTablesPaginator returns a new -// DescribeTransitGatewayPolicyTablesPaginator -func NewDescribeTransitGatewayPolicyTablesPaginator(client DescribeTransitGatewayPolicyTablesAPIClient, params *DescribeTransitGatewayPolicyTablesInput, optFns ...func(*DescribeTransitGatewayPolicyTablesPaginatorOptions)) *DescribeTransitGatewayPolicyTablesPaginator { - if params == nil { - params = &DescribeTransitGatewayPolicyTablesInput{} - } - - options := DescribeTransitGatewayPolicyTablesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayPolicyTablesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayPolicyTablesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayPolicyTables page. -func (p *DescribeTransitGatewayPolicyTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayPolicyTablesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayPolicyTables(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayPolicyTables(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayPolicyTables", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go deleted file mode 100644 index 6585df5c0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTableAnnouncements.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more transit gateway route table advertisements. -func (c *Client) DescribeTransitGatewayRouteTableAnnouncements(ctx context.Context, params *DescribeTransitGatewayRouteTableAnnouncementsInput, optFns ...func(*Options)) (*DescribeTransitGatewayRouteTableAnnouncementsOutput, error) { - if params == nil { - params = &DescribeTransitGatewayRouteTableAnnouncementsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayRouteTableAnnouncements", params, optFns, c.addOperationDescribeTransitGatewayRouteTableAnnouncementsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayRouteTableAnnouncementsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayRouteTableAnnouncementsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters associated with the transit gateway policy table. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the transit gateway route tables that are being advertised. - TransitGatewayRouteTableAnnouncementIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayRouteTableAnnouncementsOutput struct { - - // The token for the next page of results. - NextToken *string - - // Describes the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncements []types.TransitGatewayRouteTableAnnouncement - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayRouteTableAnnouncementsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayRouteTableAnnouncements{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayRouteTableAnnouncements{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayRouteTableAnnouncements"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTableAnnouncements(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayRouteTableAnnouncementsAPIClient is a client that -// implements the DescribeTransitGatewayRouteTableAnnouncements operation. -type DescribeTransitGatewayRouteTableAnnouncementsAPIClient interface { - DescribeTransitGatewayRouteTableAnnouncements(context.Context, *DescribeTransitGatewayRouteTableAnnouncementsInput, ...func(*Options)) (*DescribeTransitGatewayRouteTableAnnouncementsOutput, error) -} - -var _ DescribeTransitGatewayRouteTableAnnouncementsAPIClient = (*Client)(nil) - -// DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions is the paginator -// options for DescribeTransitGatewayRouteTableAnnouncements -type DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayRouteTableAnnouncementsPaginator is a paginator for -// DescribeTransitGatewayRouteTableAnnouncements -type DescribeTransitGatewayRouteTableAnnouncementsPaginator struct { - options DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions - client DescribeTransitGatewayRouteTableAnnouncementsAPIClient - params *DescribeTransitGatewayRouteTableAnnouncementsInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayRouteTableAnnouncementsPaginator returns a new -// DescribeTransitGatewayRouteTableAnnouncementsPaginator -func NewDescribeTransitGatewayRouteTableAnnouncementsPaginator(client DescribeTransitGatewayRouteTableAnnouncementsAPIClient, params *DescribeTransitGatewayRouteTableAnnouncementsInput, optFns ...func(*DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions)) *DescribeTransitGatewayRouteTableAnnouncementsPaginator { - if params == nil { - params = &DescribeTransitGatewayRouteTableAnnouncementsInput{} - } - - options := DescribeTransitGatewayRouteTableAnnouncementsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayRouteTableAnnouncementsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayRouteTableAnnouncementsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayRouteTableAnnouncements page. -func (p *DescribeTransitGatewayRouteTableAnnouncementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayRouteTableAnnouncementsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayRouteTableAnnouncements(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTableAnnouncements(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayRouteTableAnnouncements", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTables.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTables.go deleted file mode 100644 index dda2d8492..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayRouteTables.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more transit gateway route tables. By default, all transit -// gateway route tables are described. Alternatively, you can filter the results. -func (c *Client) DescribeTransitGatewayRouteTables(ctx context.Context, params *DescribeTransitGatewayRouteTablesInput, optFns ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error) { - if params == nil { - params = &DescribeTransitGatewayRouteTablesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayRouteTables", params, optFns, c.addOperationDescribeTransitGatewayRouteTablesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayRouteTablesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayRouteTablesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - default-association-route-table - Indicates whether this is the default - // association route table for the transit gateway ( true | false ). - // - default-propagation-route-table - Indicates whether this is the default - // propagation route table for the transit gateway ( true | false ). - // - state - The state of the route table ( available | deleting | deleted | - // pending ). - // - transit-gateway-id - The ID of the transit gateway. - // - transit-gateway-route-table-id - The ID of the transit gateway route table. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the transit gateway route tables. - TransitGatewayRouteTableIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayRouteTablesOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the transit gateway route tables. - TransitGatewayRouteTables []types.TransitGatewayRouteTable - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayRouteTablesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayRouteTables{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayRouteTables{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayRouteTables"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTables(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayRouteTablesAPIClient is a client that implements the -// DescribeTransitGatewayRouteTables operation. -type DescribeTransitGatewayRouteTablesAPIClient interface { - DescribeTransitGatewayRouteTables(context.Context, *DescribeTransitGatewayRouteTablesInput, ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error) -} - -var _ DescribeTransitGatewayRouteTablesAPIClient = (*Client)(nil) - -// DescribeTransitGatewayRouteTablesPaginatorOptions is the paginator options for -// DescribeTransitGatewayRouteTables -type DescribeTransitGatewayRouteTablesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayRouteTablesPaginator is a paginator for -// DescribeTransitGatewayRouteTables -type DescribeTransitGatewayRouteTablesPaginator struct { - options DescribeTransitGatewayRouteTablesPaginatorOptions - client DescribeTransitGatewayRouteTablesAPIClient - params *DescribeTransitGatewayRouteTablesInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayRouteTablesPaginator returns a new -// DescribeTransitGatewayRouteTablesPaginator -func NewDescribeTransitGatewayRouteTablesPaginator(client DescribeTransitGatewayRouteTablesAPIClient, params *DescribeTransitGatewayRouteTablesInput, optFns ...func(*DescribeTransitGatewayRouteTablesPaginatorOptions)) *DescribeTransitGatewayRouteTablesPaginator { - if params == nil { - params = &DescribeTransitGatewayRouteTablesInput{} - } - - options := DescribeTransitGatewayRouteTablesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayRouteTablesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayRouteTablesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayRouteTables page. -func (p *DescribeTransitGatewayRouteTablesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayRouteTablesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayRouteTables(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayRouteTables(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayRouteTables", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go deleted file mode 100644 index f2b05ebde..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGatewayVpcAttachments.go +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more VPC attachments. By default, all VPC attachments are -// described. Alternatively, you can filter the results. -func (c *Client) DescribeTransitGatewayVpcAttachments(ctx context.Context, params *DescribeTransitGatewayVpcAttachmentsInput, optFns ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error) { - if params == nil { - params = &DescribeTransitGatewayVpcAttachmentsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGatewayVpcAttachments", params, optFns, c.addOperationDescribeTransitGatewayVpcAttachmentsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewayVpcAttachmentsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewayVpcAttachmentsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - state - The state of the attachment. Valid values are available | deleted | - // deleting | failed | failing | initiatingRequest | modifying | - // pendingAcceptance | pending | rollingBack | rejected | rejecting . - // - transit-gateway-attachment-id - The ID of the attachment. - // - transit-gateway-id - The ID of the transit gateway. - // - vpc-id - The ID of the VPC. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the attachments. - TransitGatewayAttachmentIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewayVpcAttachmentsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the VPC attachments. - TransitGatewayVpcAttachments []types.TransitGatewayVpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewayVpcAttachmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGatewayVpcAttachments"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGatewayVpcAttachments(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewayVpcAttachmentsAPIClient is a client that implements the -// DescribeTransitGatewayVpcAttachments operation. -type DescribeTransitGatewayVpcAttachmentsAPIClient interface { - DescribeTransitGatewayVpcAttachments(context.Context, *DescribeTransitGatewayVpcAttachmentsInput, ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error) -} - -var _ DescribeTransitGatewayVpcAttachmentsAPIClient = (*Client)(nil) - -// DescribeTransitGatewayVpcAttachmentsPaginatorOptions is the paginator options -// for DescribeTransitGatewayVpcAttachments -type DescribeTransitGatewayVpcAttachmentsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewayVpcAttachmentsPaginator is a paginator for -// DescribeTransitGatewayVpcAttachments -type DescribeTransitGatewayVpcAttachmentsPaginator struct { - options DescribeTransitGatewayVpcAttachmentsPaginatorOptions - client DescribeTransitGatewayVpcAttachmentsAPIClient - params *DescribeTransitGatewayVpcAttachmentsInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewayVpcAttachmentsPaginator returns a new -// DescribeTransitGatewayVpcAttachmentsPaginator -func NewDescribeTransitGatewayVpcAttachmentsPaginator(client DescribeTransitGatewayVpcAttachmentsAPIClient, params *DescribeTransitGatewayVpcAttachmentsInput, optFns ...func(*DescribeTransitGatewayVpcAttachmentsPaginatorOptions)) *DescribeTransitGatewayVpcAttachmentsPaginator { - if params == nil { - params = &DescribeTransitGatewayVpcAttachmentsInput{} - } - - options := DescribeTransitGatewayVpcAttachmentsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewayVpcAttachmentsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewayVpcAttachmentsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGatewayVpcAttachments page. -func (p *DescribeTransitGatewayVpcAttachmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewayVpcAttachmentsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGatewayVpcAttachments(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGatewayVpcAttachments(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGatewayVpcAttachments", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGateways.go deleted file mode 100644 index 95ee309dc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTransitGateways.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more transit gateways. By default, all transit gateways are -// described. Alternatively, you can filter the results. -func (c *Client) DescribeTransitGateways(ctx context.Context, params *DescribeTransitGatewaysInput, optFns ...func(*Options)) (*DescribeTransitGatewaysOutput, error) { - if params == nil { - params = &DescribeTransitGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTransitGateways", params, optFns, c.addOperationDescribeTransitGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTransitGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTransitGatewaysInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - options.propagation-default-route-table-id - The ID of the default - // propagation route table. - // - options.amazon-side-asn - The private ASN for the Amazon side of a BGP - // session. - // - options.association-default-route-table-id - The ID of the default - // association route table. - // - options.auto-accept-shared-attachments - Indicates whether there is - // automatic acceptance of attachment requests ( enable | disable ). - // - options.default-route-table-association - Indicates whether resource - // attachments are automatically associated with the default association route - // table ( enable | disable ). - // - options.default-route-table-propagation - Indicates whether resource - // attachments automatically propagate routes to the default propagation route - // table ( enable | disable ). - // - options.dns-support - Indicates whether DNS support is enabled ( enable | - // disable ). - // - options.vpn-ecmp-support - Indicates whether Equal Cost Multipath Protocol - // support is enabled ( enable | disable ). - // - owner-id - The ID of the Amazon Web Services account that owns the transit - // gateway. - // - state - The state of the transit gateway ( available | deleted | deleting | - // modifying | pending ). - // - transit-gateway-id - The ID of the transit gateway. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the transit gateways. - TransitGatewayIds []string - - noSmithyDocumentSerde -} - -type DescribeTransitGatewaysOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the transit gateways. - TransitGateways []types.TransitGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTransitGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTransitGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTransitGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTransitGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTransitGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTransitGatewaysAPIClient is a client that implements the -// DescribeTransitGateways operation. -type DescribeTransitGatewaysAPIClient interface { - DescribeTransitGateways(context.Context, *DescribeTransitGatewaysInput, ...func(*Options)) (*DescribeTransitGatewaysOutput, error) -} - -var _ DescribeTransitGatewaysAPIClient = (*Client)(nil) - -// DescribeTransitGatewaysPaginatorOptions is the paginator options for -// DescribeTransitGateways -type DescribeTransitGatewaysPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTransitGatewaysPaginator is a paginator for DescribeTransitGateways -type DescribeTransitGatewaysPaginator struct { - options DescribeTransitGatewaysPaginatorOptions - client DescribeTransitGatewaysAPIClient - params *DescribeTransitGatewaysInput - nextToken *string - firstPage bool -} - -// NewDescribeTransitGatewaysPaginator returns a new -// DescribeTransitGatewaysPaginator -func NewDescribeTransitGatewaysPaginator(client DescribeTransitGatewaysAPIClient, params *DescribeTransitGatewaysInput, optFns ...func(*DescribeTransitGatewaysPaginatorOptions)) *DescribeTransitGatewaysPaginator { - if params == nil { - params = &DescribeTransitGatewaysInput{} - } - - options := DescribeTransitGatewaysPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTransitGatewaysPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTransitGatewaysPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTransitGateways page. -func (p *DescribeTransitGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTransitGatewaysOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTransitGateways(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTransitGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTransitGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go deleted file mode 100644 index c9591eadf..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeTrunkInterfaceAssociations.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more network interface trunk associations. -func (c *Client) DescribeTrunkInterfaceAssociations(ctx context.Context, params *DescribeTrunkInterfaceAssociationsInput, optFns ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error) { - if params == nil { - params = &DescribeTrunkInterfaceAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeTrunkInterfaceAssociations", params, optFns, c.addOperationDescribeTrunkInterfaceAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeTrunkInterfaceAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeTrunkInterfaceAssociationsInput struct { - - // The IDs of the associations. - AssociationIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - gre-key - The ID of a trunk interface association. - // - interface-protocol - The interface protocol. Valid values are VLAN and GRE . - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeTrunkInterfaceAssociationsOutput struct { - - // Information about the trunk associations. - InterfaceAssociations []types.TrunkInterfaceAssociation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeTrunkInterfaceAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeTrunkInterfaceAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTrunkInterfaceAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTrunkInterfaceAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeTrunkInterfaceAssociationsAPIClient is a client that implements the -// DescribeTrunkInterfaceAssociations operation. -type DescribeTrunkInterfaceAssociationsAPIClient interface { - DescribeTrunkInterfaceAssociations(context.Context, *DescribeTrunkInterfaceAssociationsInput, ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error) -} - -var _ DescribeTrunkInterfaceAssociationsAPIClient = (*Client)(nil) - -// DescribeTrunkInterfaceAssociationsPaginatorOptions is the paginator options for -// DescribeTrunkInterfaceAssociations -type DescribeTrunkInterfaceAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeTrunkInterfaceAssociationsPaginator is a paginator for -// DescribeTrunkInterfaceAssociations -type DescribeTrunkInterfaceAssociationsPaginator struct { - options DescribeTrunkInterfaceAssociationsPaginatorOptions - client DescribeTrunkInterfaceAssociationsAPIClient - params *DescribeTrunkInterfaceAssociationsInput - nextToken *string - firstPage bool -} - -// NewDescribeTrunkInterfaceAssociationsPaginator returns a new -// DescribeTrunkInterfaceAssociationsPaginator -func NewDescribeTrunkInterfaceAssociationsPaginator(client DescribeTrunkInterfaceAssociationsAPIClient, params *DescribeTrunkInterfaceAssociationsInput, optFns ...func(*DescribeTrunkInterfaceAssociationsPaginatorOptions)) *DescribeTrunkInterfaceAssociationsPaginator { - if params == nil { - params = &DescribeTrunkInterfaceAssociationsInput{} - } - - options := DescribeTrunkInterfaceAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeTrunkInterfaceAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeTrunkInterfaceAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeTrunkInterfaceAssociations page. -func (p *DescribeTrunkInterfaceAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTrunkInterfaceAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeTrunkInterfaceAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeTrunkInterfaceAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeTrunkInterfaceAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go deleted file mode 100644 index 46389cf5c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessEndpoints.go +++ /dev/null @@ -1,251 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Amazon Web Services Verified Access endpoints. -func (c *Client) DescribeVerifiedAccessEndpoints(ctx context.Context, params *DescribeVerifiedAccessEndpointsInput, optFns ...func(*Options)) (*DescribeVerifiedAccessEndpointsOutput, error) { - if params == nil { - params = &DescribeVerifiedAccessEndpointsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVerifiedAccessEndpoints", params, optFns, c.addOperationDescribeVerifiedAccessEndpointsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVerifiedAccessEndpointsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVerifiedAccessEndpointsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the Verified Access endpoint. - VerifiedAccessEndpointIds []string - - // The ID of the Verified Access group. - VerifiedAccessGroupId *string - - // The ID of the Verified Access instance. - VerifiedAccessInstanceId *string - - noSmithyDocumentSerde -} - -type DescribeVerifiedAccessEndpointsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Details about the Verified Access endpoints. - VerifiedAccessEndpoints []types.VerifiedAccessEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVerifiedAccessEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVerifiedAccessEndpoints{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVerifiedAccessEndpoints{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVerifiedAccessEndpoints"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessEndpoints(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVerifiedAccessEndpointsAPIClient is a client that implements the -// DescribeVerifiedAccessEndpoints operation. -type DescribeVerifiedAccessEndpointsAPIClient interface { - DescribeVerifiedAccessEndpoints(context.Context, *DescribeVerifiedAccessEndpointsInput, ...func(*Options)) (*DescribeVerifiedAccessEndpointsOutput, error) -} - -var _ DescribeVerifiedAccessEndpointsAPIClient = (*Client)(nil) - -// DescribeVerifiedAccessEndpointsPaginatorOptions is the paginator options for -// DescribeVerifiedAccessEndpoints -type DescribeVerifiedAccessEndpointsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVerifiedAccessEndpointsPaginator is a paginator for -// DescribeVerifiedAccessEndpoints -type DescribeVerifiedAccessEndpointsPaginator struct { - options DescribeVerifiedAccessEndpointsPaginatorOptions - client DescribeVerifiedAccessEndpointsAPIClient - params *DescribeVerifiedAccessEndpointsInput - nextToken *string - firstPage bool -} - -// NewDescribeVerifiedAccessEndpointsPaginator returns a new -// DescribeVerifiedAccessEndpointsPaginator -func NewDescribeVerifiedAccessEndpointsPaginator(client DescribeVerifiedAccessEndpointsAPIClient, params *DescribeVerifiedAccessEndpointsInput, optFns ...func(*DescribeVerifiedAccessEndpointsPaginatorOptions)) *DescribeVerifiedAccessEndpointsPaginator { - if params == nil { - params = &DescribeVerifiedAccessEndpointsInput{} - } - - options := DescribeVerifiedAccessEndpointsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVerifiedAccessEndpointsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVerifiedAccessEndpointsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVerifiedAccessEndpoints page. -func (p *DescribeVerifiedAccessEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVerifiedAccessEndpointsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVerifiedAccessEndpoints(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVerifiedAccessEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVerifiedAccessEndpoints", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessGroups.go deleted file mode 100644 index fdf9d8f7e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessGroups.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Verified Access groups. -func (c *Client) DescribeVerifiedAccessGroups(ctx context.Context, params *DescribeVerifiedAccessGroupsInput, optFns ...func(*Options)) (*DescribeVerifiedAccessGroupsOutput, error) { - if params == nil { - params = &DescribeVerifiedAccessGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVerifiedAccessGroups", params, optFns, c.addOperationDescribeVerifiedAccessGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVerifiedAccessGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVerifiedAccessGroupsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the Verified Access groups. - VerifiedAccessGroupIds []string - - // The ID of the Verified Access instance. - VerifiedAccessInstanceId *string - - noSmithyDocumentSerde -} - -type DescribeVerifiedAccessGroupsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Details about the Verified Access groups. - VerifiedAccessGroups []types.VerifiedAccessGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVerifiedAccessGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVerifiedAccessGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVerifiedAccessGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVerifiedAccessGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVerifiedAccessGroupsAPIClient is a client that implements the -// DescribeVerifiedAccessGroups operation. -type DescribeVerifiedAccessGroupsAPIClient interface { - DescribeVerifiedAccessGroups(context.Context, *DescribeVerifiedAccessGroupsInput, ...func(*Options)) (*DescribeVerifiedAccessGroupsOutput, error) -} - -var _ DescribeVerifiedAccessGroupsAPIClient = (*Client)(nil) - -// DescribeVerifiedAccessGroupsPaginatorOptions is the paginator options for -// DescribeVerifiedAccessGroups -type DescribeVerifiedAccessGroupsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVerifiedAccessGroupsPaginator is a paginator for -// DescribeVerifiedAccessGroups -type DescribeVerifiedAccessGroupsPaginator struct { - options DescribeVerifiedAccessGroupsPaginatorOptions - client DescribeVerifiedAccessGroupsAPIClient - params *DescribeVerifiedAccessGroupsInput - nextToken *string - firstPage bool -} - -// NewDescribeVerifiedAccessGroupsPaginator returns a new -// DescribeVerifiedAccessGroupsPaginator -func NewDescribeVerifiedAccessGroupsPaginator(client DescribeVerifiedAccessGroupsAPIClient, params *DescribeVerifiedAccessGroupsInput, optFns ...func(*DescribeVerifiedAccessGroupsPaginatorOptions)) *DescribeVerifiedAccessGroupsPaginator { - if params == nil { - params = &DescribeVerifiedAccessGroupsInput{} - } - - options := DescribeVerifiedAccessGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVerifiedAccessGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVerifiedAccessGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVerifiedAccessGroups page. -func (p *DescribeVerifiedAccessGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVerifiedAccessGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVerifiedAccessGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVerifiedAccessGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVerifiedAccessGroups", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go deleted file mode 100644 index c1ec94e1c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go +++ /dev/null @@ -1,246 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Amazon Web Services Verified Access instances. -func (c *Client) DescribeVerifiedAccessInstanceLoggingConfigurations(ctx context.Context, params *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, optFns ...func(*Options)) (*DescribeVerifiedAccessInstanceLoggingConfigurationsOutput, error) { - if params == nil { - params = &DescribeVerifiedAccessInstanceLoggingConfigurationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVerifiedAccessInstanceLoggingConfigurations", params, optFns, c.addOperationDescribeVerifiedAccessInstanceLoggingConfigurationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVerifiedAccessInstanceLoggingConfigurationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVerifiedAccessInstanceLoggingConfigurationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the Verified Access instances. - VerifiedAccessInstanceIds []string - - noSmithyDocumentSerde -} - -type DescribeVerifiedAccessInstanceLoggingConfigurationsOutput struct { - - // The logging configuration for the Verified Access instances. - LoggingConfigurations []types.VerifiedAccessInstanceLoggingConfiguration - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVerifiedAccessInstanceLoggingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVerifiedAccessInstanceLoggingConfigurations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVerifiedAccessInstanceLoggingConfigurations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVerifiedAccessInstanceLoggingConfigurations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessInstanceLoggingConfigurations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient is a client that -// implements the DescribeVerifiedAccessInstanceLoggingConfigurations operation. -type DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient interface { - DescribeVerifiedAccessInstanceLoggingConfigurations(context.Context, *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, ...func(*Options)) (*DescribeVerifiedAccessInstanceLoggingConfigurationsOutput, error) -} - -var _ DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient = (*Client)(nil) - -// DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions is the -// paginator options for DescribeVerifiedAccessInstanceLoggingConfigurations -type DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator is a paginator for -// DescribeVerifiedAccessInstanceLoggingConfigurations -type DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator struct { - options DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions - client DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient - params *DescribeVerifiedAccessInstanceLoggingConfigurationsInput - nextToken *string - firstPage bool -} - -// NewDescribeVerifiedAccessInstanceLoggingConfigurationsPaginator returns a new -// DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator -func NewDescribeVerifiedAccessInstanceLoggingConfigurationsPaginator(client DescribeVerifiedAccessInstanceLoggingConfigurationsAPIClient, params *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, optFns ...func(*DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions)) *DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator { - if params == nil { - params = &DescribeVerifiedAccessInstanceLoggingConfigurationsInput{} - } - - options := DescribeVerifiedAccessInstanceLoggingConfigurationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVerifiedAccessInstanceLoggingConfigurations -// page. -func (p *DescribeVerifiedAccessInstanceLoggingConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVerifiedAccessInstanceLoggingConfigurationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVerifiedAccessInstanceLoggingConfigurations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVerifiedAccessInstanceLoggingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVerifiedAccessInstanceLoggingConfigurations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessInstances.go deleted file mode 100644 index 8f5c8ff66..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessInstances.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Amazon Web Services Verified Access instances. -func (c *Client) DescribeVerifiedAccessInstances(ctx context.Context, params *DescribeVerifiedAccessInstancesInput, optFns ...func(*Options)) (*DescribeVerifiedAccessInstancesOutput, error) { - if params == nil { - params = &DescribeVerifiedAccessInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVerifiedAccessInstances", params, optFns, c.addOperationDescribeVerifiedAccessInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVerifiedAccessInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVerifiedAccessInstancesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the Verified Access instances. - VerifiedAccessInstanceIds []string - - noSmithyDocumentSerde -} - -type DescribeVerifiedAccessInstancesOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Details about the Verified Access instances. - VerifiedAccessInstances []types.VerifiedAccessInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVerifiedAccessInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVerifiedAccessInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVerifiedAccessInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVerifiedAccessInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVerifiedAccessInstancesAPIClient is a client that implements the -// DescribeVerifiedAccessInstances operation. -type DescribeVerifiedAccessInstancesAPIClient interface { - DescribeVerifiedAccessInstances(context.Context, *DescribeVerifiedAccessInstancesInput, ...func(*Options)) (*DescribeVerifiedAccessInstancesOutput, error) -} - -var _ DescribeVerifiedAccessInstancesAPIClient = (*Client)(nil) - -// DescribeVerifiedAccessInstancesPaginatorOptions is the paginator options for -// DescribeVerifiedAccessInstances -type DescribeVerifiedAccessInstancesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVerifiedAccessInstancesPaginator is a paginator for -// DescribeVerifiedAccessInstances -type DescribeVerifiedAccessInstancesPaginator struct { - options DescribeVerifiedAccessInstancesPaginatorOptions - client DescribeVerifiedAccessInstancesAPIClient - params *DescribeVerifiedAccessInstancesInput - nextToken *string - firstPage bool -} - -// NewDescribeVerifiedAccessInstancesPaginator returns a new -// DescribeVerifiedAccessInstancesPaginator -func NewDescribeVerifiedAccessInstancesPaginator(client DescribeVerifiedAccessInstancesAPIClient, params *DescribeVerifiedAccessInstancesInput, optFns ...func(*DescribeVerifiedAccessInstancesPaginatorOptions)) *DescribeVerifiedAccessInstancesPaginator { - if params == nil { - params = &DescribeVerifiedAccessInstancesInput{} - } - - options := DescribeVerifiedAccessInstancesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVerifiedAccessInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVerifiedAccessInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVerifiedAccessInstances page. -func (p *DescribeVerifiedAccessInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVerifiedAccessInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVerifiedAccessInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVerifiedAccessInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVerifiedAccessInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go deleted file mode 100644 index 6947be939..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVerifiedAccessTrustProviders.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified Amazon Web Services Verified Access trust providers. -func (c *Client) DescribeVerifiedAccessTrustProviders(ctx context.Context, params *DescribeVerifiedAccessTrustProvidersInput, optFns ...func(*Options)) (*DescribeVerifiedAccessTrustProvidersOutput, error) { - if params == nil { - params = &DescribeVerifiedAccessTrustProvidersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVerifiedAccessTrustProviders", params, optFns, c.addOperationDescribeVerifiedAccessTrustProvidersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVerifiedAccessTrustProvidersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVerifiedAccessTrustProvidersInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. Filter names and values are case-sensitive. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The IDs of the Verified Access trust providers. - VerifiedAccessTrustProviderIds []string - - noSmithyDocumentSerde -} - -type DescribeVerifiedAccessTrustProvidersOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Details about the Verified Access trust providers. - VerifiedAccessTrustProviders []types.VerifiedAccessTrustProvider - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVerifiedAccessTrustProvidersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVerifiedAccessTrustProviders{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVerifiedAccessTrustProviders{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVerifiedAccessTrustProviders"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVerifiedAccessTrustProviders(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVerifiedAccessTrustProvidersAPIClient is a client that implements the -// DescribeVerifiedAccessTrustProviders operation. -type DescribeVerifiedAccessTrustProvidersAPIClient interface { - DescribeVerifiedAccessTrustProviders(context.Context, *DescribeVerifiedAccessTrustProvidersInput, ...func(*Options)) (*DescribeVerifiedAccessTrustProvidersOutput, error) -} - -var _ DescribeVerifiedAccessTrustProvidersAPIClient = (*Client)(nil) - -// DescribeVerifiedAccessTrustProvidersPaginatorOptions is the paginator options -// for DescribeVerifiedAccessTrustProviders -type DescribeVerifiedAccessTrustProvidersPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVerifiedAccessTrustProvidersPaginator is a paginator for -// DescribeVerifiedAccessTrustProviders -type DescribeVerifiedAccessTrustProvidersPaginator struct { - options DescribeVerifiedAccessTrustProvidersPaginatorOptions - client DescribeVerifiedAccessTrustProvidersAPIClient - params *DescribeVerifiedAccessTrustProvidersInput - nextToken *string - firstPage bool -} - -// NewDescribeVerifiedAccessTrustProvidersPaginator returns a new -// DescribeVerifiedAccessTrustProvidersPaginator -func NewDescribeVerifiedAccessTrustProvidersPaginator(client DescribeVerifiedAccessTrustProvidersAPIClient, params *DescribeVerifiedAccessTrustProvidersInput, optFns ...func(*DescribeVerifiedAccessTrustProvidersPaginatorOptions)) *DescribeVerifiedAccessTrustProvidersPaginator { - if params == nil { - params = &DescribeVerifiedAccessTrustProvidersInput{} - } - - options := DescribeVerifiedAccessTrustProvidersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVerifiedAccessTrustProvidersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVerifiedAccessTrustProvidersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVerifiedAccessTrustProviders page. -func (p *DescribeVerifiedAccessTrustProvidersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVerifiedAccessTrustProvidersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVerifiedAccessTrustProviders(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVerifiedAccessTrustProviders(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVerifiedAccessTrustProviders", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeAttribute.go deleted file mode 100644 index 5de5d6039..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeAttribute.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified attribute of the specified volume. You can specify only -// one attribute at a time. For more information about EBS volumes, see Amazon EBS -// volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) in -// the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeVolumeAttribute(ctx context.Context, params *DescribeVolumeAttributeInput, optFns ...func(*Options)) (*DescribeVolumeAttributeOutput, error) { - if params == nil { - params = &DescribeVolumeAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVolumeAttribute", params, optFns, c.addOperationDescribeVolumeAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVolumeAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVolumeAttributeInput struct { - - // The attribute of the volume. This parameter is required. - // - // This member is required. - Attribute types.VolumeAttributeName - - // The ID of the volume. - // - // This member is required. - VolumeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeVolumeAttributeOutput struct { - - // The state of autoEnableIO attribute. - AutoEnableIO *types.AttributeBooleanValue - - // A list of product codes. - ProductCodes []types.ProductCode - - // The ID of the volume. - VolumeId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVolumeAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumeAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumeAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVolumeAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeVolumeAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumeAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeVolumeAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVolumeAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeStatus.go deleted file mode 100644 index 764b03e31..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumeStatus.go +++ /dev/null @@ -1,300 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the status of the specified volumes. Volume status provides the -// result of the checks performed on your volumes to determine events that can -// impair the performance of your volumes. The performance of a volume can be -// affected if an issue occurs on the volume's underlying host. If the volume's -// underlying host experiences a power outage or system issue, after the system is -// restored, there could be data inconsistencies on the volume. Volume events -// notify you if this occurs. Volume actions notify you if any action needs to be -// taken in response to the event. The DescribeVolumeStatus operation provides the -// following information about the specified volumes: Status: Reflects the current -// status of the volume. The possible values are ok , impaired , warning , or -// insufficient-data . If all checks pass, the overall status of the volume is ok . -// If the check fails, the overall status is impaired . If the status is -// insufficient-data , then the checks might still be taking place on your volume -// at the time. We recommend that you retry the request. For more information about -// volume status, see Monitor the status of your volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html) -// in the Amazon Elastic Compute Cloud User Guide. Events: Reflect the cause of a -// volume status and might require you to take action. For example, if your volume -// returns an impaired status, then the volume event might be -// potential-data-inconsistency . This means that your volume has been affected by -// an issue with the underlying host, has all I/O operations disabled, and might -// have inconsistent data. Actions: Reflect the actions you might have to take in -// response to an event. For example, if the status of the volume is impaired and -// the volume event shows potential-data-inconsistency , then the action shows -// enable-volume-io . This means that you may want to enable the I/O operations for -// the volume by calling the EnableVolumeIO action and then check the volume for -// data consistency. Volume status is based on the volume status checks, and does -// not reflect the volume state. Therefore, volume status does not indicate volumes -// in the error state (for example, when a volume is incapable of accepting I/O.) -func (c *Client) DescribeVolumeStatus(ctx context.Context, params *DescribeVolumeStatusInput, optFns ...func(*Options)) (*DescribeVolumeStatusOutput, error) { - if params == nil { - params = &DescribeVolumeStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVolumeStatus", params, optFns, c.addOperationDescribeVolumeStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVolumeStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVolumeStatusInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - action.code - The action code for the event (for example, enable-volume-io - // ). - // - action.description - A description of the action. - // - action.event-id - The event ID associated with the action. - // - availability-zone - The Availability Zone of the instance. - // - event.description - A description of the event. - // - event.event-id - The event ID. - // - event.event-type - The event type (for io-enabled : passed | failed ; for - // io-performance : io-performance:degraded | io-performance:severely-degraded | - // io-performance:stalled ). - // - event.not-after - The latest end time for the event. - // - event.not-before - The earliest start time for the event. - // - volume-status.details-name - The cause for volume-status.status ( io-enabled - // | io-performance ). - // - volume-status.details-status - The status of volume-status.details-name (for - // io-enabled : passed | failed ; for io-performance : normal | degraded | - // severely-degraded | stalled ). - // - volume-status.status - The status of the volume ( ok | impaired | warning | - // insufficient-data ). - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1,000; if the value is larger than 1,000, only 1,000 - // results are returned. If this parameter is not used, then all items are - // returned. You cannot specify this parameter and the volume IDs parameter in the - // same request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the volumes. Default: Describes all your volumes. - VolumeIds []string - - noSmithyDocumentSerde -} - -type DescribeVolumeStatusOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the status of the volumes. - VolumeStatuses []types.VolumeStatusItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVolumeStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumeStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumeStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVolumeStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumeStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVolumeStatusAPIClient is a client that implements the -// DescribeVolumeStatus operation. -type DescribeVolumeStatusAPIClient interface { - DescribeVolumeStatus(context.Context, *DescribeVolumeStatusInput, ...func(*Options)) (*DescribeVolumeStatusOutput, error) -} - -var _ DescribeVolumeStatusAPIClient = (*Client)(nil) - -// DescribeVolumeStatusPaginatorOptions is the paginator options for -// DescribeVolumeStatus -type DescribeVolumeStatusPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. This value - // can be between 5 and 1,000; if the value is larger than 1,000, only 1,000 - // results are returned. If this parameter is not used, then all items are - // returned. You cannot specify this parameter and the volume IDs parameter in the - // same request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVolumeStatusPaginator is a paginator for DescribeVolumeStatus -type DescribeVolumeStatusPaginator struct { - options DescribeVolumeStatusPaginatorOptions - client DescribeVolumeStatusAPIClient - params *DescribeVolumeStatusInput - nextToken *string - firstPage bool -} - -// NewDescribeVolumeStatusPaginator returns a new DescribeVolumeStatusPaginator -func NewDescribeVolumeStatusPaginator(client DescribeVolumeStatusAPIClient, params *DescribeVolumeStatusInput, optFns ...func(*DescribeVolumeStatusPaginatorOptions)) *DescribeVolumeStatusPaginator { - if params == nil { - params = &DescribeVolumeStatusInput{} - } - - options := DescribeVolumeStatusPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVolumeStatusPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVolumeStatusPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVolumeStatus page. -func (p *DescribeVolumeStatusPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumeStatusOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVolumeStatus(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVolumeStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVolumeStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go deleted file mode 100644 index ef3751fc7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumes.go +++ /dev/null @@ -1,909 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes the specified EBS volumes or all of your EBS volumes. If you are -// describing a long list of volumes, we recommend that you paginate the output to -// make the list more manageable. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) -// . For more information about EBS volumes, see Amazon EBS volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumes.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeVolumes(ctx context.Context, params *DescribeVolumesInput, optFns ...func(*Options)) (*DescribeVolumesOutput, error) { - if params == nil { - params = &DescribeVolumesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVolumes", params, optFns, c.addOperationDescribeVolumesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVolumesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVolumesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - attachment.attach-time - The time stamp when the attachment initiated. - // - attachment.delete-on-termination - Whether the volume is deleted on instance - // termination. - // - attachment.device - The device name specified in the block device mapping - // (for example, /dev/sda1 ). - // - attachment.instance-id - The ID of the instance the volume is attached to. - // - attachment.status - The attachment state ( attaching | attached | detaching - // ). - // - availability-zone - The Availability Zone in which the volume was created. - // - create-time - The time stamp when the volume was created. - // - encrypted - Indicates whether the volume is encrypted ( true | false ) - // - multi-attach-enabled - Indicates whether the volume is enabled for - // Multi-Attach ( true | false ) - // - fast-restored - Indicates whether the volume was created from a snapshot - // that is enabled for fast snapshot restore ( true | false ). - // - size - The size of the volume, in GiB. - // - snapshot-id - The snapshot from which the volume was created. - // - status - The state of the volume ( creating | available | in-use | deleting - // | deleted | error ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - volume-id - The volume ID. - // - volume-type - The Amazon EBS volume type ( gp2 | gp3 | io1 | io2 | st1 | sc1 - // | standard ) - Filters []types.Filter - - // The maximum number of volumes to return for this request. This value can be - // between 5 and 500; if you specify a value larger than 500, only 500 items are - // returned. If this parameter is not used, then all items are returned. You cannot - // specify this parameter and the volume IDs parameter in the same request. For - // more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned from the previous request. - NextToken *string - - // The volume IDs. - VolumeIds []string - - noSmithyDocumentSerde -} - -type DescribeVolumesOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the volumes. - Volumes []types.Volume - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVolumesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVolumes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVolumesAPIClient is a client that implements the DescribeVolumes -// operation. -type DescribeVolumesAPIClient interface { - DescribeVolumes(context.Context, *DescribeVolumesInput, ...func(*Options)) (*DescribeVolumesOutput, error) -} - -var _ DescribeVolumesAPIClient = (*Client)(nil) - -// DescribeVolumesPaginatorOptions is the paginator options for DescribeVolumes -type DescribeVolumesPaginatorOptions struct { - // The maximum number of volumes to return for this request. This value can be - // between 5 and 500; if you specify a value larger than 500, only 500 items are - // returned. If this parameter is not used, then all items are returned. You cannot - // specify this parameter and the volume IDs parameter in the same request. For - // more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVolumesPaginator is a paginator for DescribeVolumes -type DescribeVolumesPaginator struct { - options DescribeVolumesPaginatorOptions - client DescribeVolumesAPIClient - params *DescribeVolumesInput - nextToken *string - firstPage bool -} - -// NewDescribeVolumesPaginator returns a new DescribeVolumesPaginator -func NewDescribeVolumesPaginator(client DescribeVolumesAPIClient, params *DescribeVolumesInput, optFns ...func(*DescribeVolumesPaginatorOptions)) *DescribeVolumesPaginator { - if params == nil { - params = &DescribeVolumesInput{} - } - - options := DescribeVolumesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVolumesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVolumesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVolumes page. -func (p *DescribeVolumesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVolumes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// VolumeAvailableWaiterOptions are waiter options for VolumeAvailableWaiter -type VolumeAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VolumeAvailableWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VolumeAvailableWaiter will use default max delay of 120 seconds. - // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVolumesInput, *DescribeVolumesOutput, error) (bool, error) -} - -// VolumeAvailableWaiter defines the waiters for VolumeAvailable -type VolumeAvailableWaiter struct { - client DescribeVolumesAPIClient - - options VolumeAvailableWaiterOptions -} - -// NewVolumeAvailableWaiter constructs a VolumeAvailableWaiter. -func NewVolumeAvailableWaiter(client DescribeVolumesAPIClient, optFns ...func(*VolumeAvailableWaiterOptions)) *VolumeAvailableWaiter { - options := VolumeAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = volumeAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VolumeAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VolumeAvailable waiter. The maxWaitDur is -// the maximum wait duration the waiter will wait. The maxWaitDur is required and -// must be greater than zero. -func (w *VolumeAvailableWaiter) Wait(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VolumeAvailable waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *VolumeAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeAvailableWaiterOptions)) (*DescribeVolumesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVolumes(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VolumeAvailable waiter") -} - -func volumeAvailableStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -// VolumeDeletedWaiterOptions are waiter options for VolumeDeletedWaiter -type VolumeDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VolumeDeletedWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VolumeDeletedWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVolumesInput, *DescribeVolumesOutput, error) (bool, error) -} - -// VolumeDeletedWaiter defines the waiters for VolumeDeleted -type VolumeDeletedWaiter struct { - client DescribeVolumesAPIClient - - options VolumeDeletedWaiterOptions -} - -// NewVolumeDeletedWaiter constructs a VolumeDeletedWaiter. -func NewVolumeDeletedWaiter(client DescribeVolumesAPIClient, optFns ...func(*VolumeDeletedWaiterOptions)) *VolumeDeletedWaiter { - options := VolumeDeletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = volumeDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VolumeDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VolumeDeleted waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *VolumeDeletedWaiter) Wait(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VolumeDeleted waiter and returns -// the output of the successful operation. The maxWaitDur is the maximum wait -// duration the waiter will wait. The maxWaitDur is required and must be greater -// than zero. -func (w *VolumeDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeDeletedWaiterOptions)) (*DescribeVolumesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVolumes(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VolumeDeleted waiter") -} - -func volumeDeletedStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidVolume.NotFound" == apiErr.ErrorCode() { - return false, nil - } - } - - return true, nil -} - -// VolumeInUseWaiterOptions are waiter options for VolumeInUseWaiter -type VolumeInUseWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VolumeInUseWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VolumeInUseWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVolumesInput, *DescribeVolumesOutput, error) (bool, error) -} - -// VolumeInUseWaiter defines the waiters for VolumeInUse -type VolumeInUseWaiter struct { - client DescribeVolumesAPIClient - - options VolumeInUseWaiterOptions -} - -// NewVolumeInUseWaiter constructs a VolumeInUseWaiter. -func NewVolumeInUseWaiter(client DescribeVolumesAPIClient, optFns ...func(*VolumeInUseWaiterOptions)) *VolumeInUseWaiter { - options := VolumeInUseWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = volumeInUseStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VolumeInUseWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VolumeInUse waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *VolumeInUseWaiter) Wait(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeInUseWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VolumeInUse waiter and returns the -// output of the successful operation. The maxWaitDur is the maximum wait duration -// the waiter will wait. The maxWaitDur is required and must be greater than zero. -func (w *VolumeInUseWaiter) WaitForOutput(ctx context.Context, params *DescribeVolumesInput, maxWaitDur time.Duration, optFns ...func(*VolumeInUseWaiterOptions)) (*DescribeVolumesOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVolumes(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VolumeInUse waiter") -} - -func volumeInUseStateRetryable(ctx context.Context, input *DescribeVolumesInput, output *DescribeVolumesOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "in-use" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("Volumes[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VolumeState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VolumeState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeVolumes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVolumes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumesModifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumesModifications.go deleted file mode 100644 index af2f69528..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVolumesModifications.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the most recent volume modification request for the specified EBS -// volumes. If a volume has never been modified, some information in the output -// will be null. If a volume has been modified more than once, the output includes -// only the most recent modification request. You can also use CloudWatch Events to -// check the status of a modification to an EBS volume. For information about -// CloudWatch Events, see the Amazon CloudWatch Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/) -// . For more information, see Monitor the progress of volume modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DescribeVolumesModifications(ctx context.Context, params *DescribeVolumesModificationsInput, optFns ...func(*Options)) (*DescribeVolumesModificationsOutput, error) { - if params == nil { - params = &DescribeVolumesModificationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVolumesModifications", params, optFns, c.addOperationDescribeVolumesModificationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVolumesModificationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVolumesModificationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - modification-state - The current modification state (modifying | optimizing - // | completed | failed). - // - original-iops - The original IOPS rate of the volume. - // - original-size - The original size of the volume, in GiB. - // - original-volume-type - The original volume type of the volume (standard | - // io1 | io2 | gp2 | sc1 | st1). - // - originalMultiAttachEnabled - Indicates whether Multi-Attach support was - // enabled (true | false). - // - start-time - The modification start time. - // - target-iops - The target IOPS rate of the volume. - // - target-size - The target size of the volume, in GiB. - // - target-volume-type - The target volume type of the volume (standard | io1 | - // io2 | gp2 | sc1 | st1). - // - targetMultiAttachEnabled - Indicates whether Multi-Attach support is to be - // enabled (true | false). - // - volume-id - The ID of the volume. - Filters []types.Filter - - // The maximum number of results (up to a limit of 500) to be returned in a - // paginated request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned by a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the volumes. - VolumeIds []string - - noSmithyDocumentSerde -} - -type DescribeVolumesModificationsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null if there are no more items to return. - NextToken *string - - // Information about the volume modifications. - VolumesModifications []types.VolumeModification - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVolumesModificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVolumesModifications{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVolumesModifications{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVolumesModifications"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVolumesModifications(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVolumesModificationsAPIClient is a client that implements the -// DescribeVolumesModifications operation. -type DescribeVolumesModificationsAPIClient interface { - DescribeVolumesModifications(context.Context, *DescribeVolumesModificationsInput, ...func(*Options)) (*DescribeVolumesModificationsOutput, error) -} - -var _ DescribeVolumesModificationsAPIClient = (*Client)(nil) - -// DescribeVolumesModificationsPaginatorOptions is the paginator options for -// DescribeVolumesModifications -type DescribeVolumesModificationsPaginatorOptions struct { - // The maximum number of results (up to a limit of 500) to be returned in a - // paginated request. For more information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVolumesModificationsPaginator is a paginator for -// DescribeVolumesModifications -type DescribeVolumesModificationsPaginator struct { - options DescribeVolumesModificationsPaginatorOptions - client DescribeVolumesModificationsAPIClient - params *DescribeVolumesModificationsInput - nextToken *string - firstPage bool -} - -// NewDescribeVolumesModificationsPaginator returns a new -// DescribeVolumesModificationsPaginator -func NewDescribeVolumesModificationsPaginator(client DescribeVolumesModificationsAPIClient, params *DescribeVolumesModificationsInput, optFns ...func(*DescribeVolumesModificationsPaginatorOptions)) *DescribeVolumesModificationsPaginator { - if params == nil { - params = &DescribeVolumesModificationsInput{} - } - - options := DescribeVolumesModificationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVolumesModificationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVolumesModificationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVolumesModifications page. -func (p *DescribeVolumesModificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVolumesModificationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVolumesModifications(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVolumesModifications(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVolumesModifications", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcAttribute.go deleted file mode 100644 index 99d99af4c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcAttribute.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the specified attribute of the specified VPC. You can specify only -// one attribute at a time. -func (c *Client) DescribeVpcAttribute(ctx context.Context, params *DescribeVpcAttributeInput, optFns ...func(*Options)) (*DescribeVpcAttributeOutput, error) { - if params == nil { - params = &DescribeVpcAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcAttribute", params, optFns, c.addOperationDescribeVpcAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcAttributeInput struct { - - // The VPC attribute. - // - // This member is required. - Attribute types.VpcAttributeName - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DescribeVpcAttributeOutput struct { - - // Indicates whether the instances launched in the VPC get DNS hostnames. If this - // attribute is true , instances in the VPC get DNS hostnames; otherwise, they do - // not. - EnableDnsHostnames *types.AttributeBooleanValue - - // Indicates whether DNS resolution is enabled for the VPC. If this attribute is - // true , the Amazon DNS server resolves DNS hostnames for your instances to their - // corresponding IP addresses; otherwise, it does not. - EnableDnsSupport *types.AttributeBooleanValue - - // Indicates whether Network Address Usage metrics are enabled for your VPC. - EnableNetworkAddressUsageMetrics *types.AttributeBooleanValue - - // The ID of the VPC. - VpcId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeVpcAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeVpcAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLink.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLink.go deleted file mode 100644 index 2c35f6a13..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLink.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Describes the ClassicLink status of the specified -// VPCs. -func (c *Client) DescribeVpcClassicLink(ctx context.Context, params *DescribeVpcClassicLinkInput, optFns ...func(*Options)) (*DescribeVpcClassicLinkOutput, error) { - if params == nil { - params = &DescribeVpcClassicLinkInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcClassicLink", params, optFns, c.addOperationDescribeVpcClassicLinkMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcClassicLinkOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcClassicLinkInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - is-classic-link-enabled - Whether the VPC is enabled for ClassicLink ( true - // | false ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The VPCs for which you want to describe the ClassicLink status. - VpcIds []string - - noSmithyDocumentSerde -} - -type DescribeVpcClassicLinkOutput struct { - - // The ClassicLink status of the VPCs. - Vpcs []types.VpcClassicLink - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcClassicLinkMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcClassicLink{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcClassicLink{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcClassicLink"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcClassicLink(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeVpcClassicLink(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcClassicLink", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go deleted file mode 100644 index 8456b32c6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcClassicLinkDnsSupport.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Describes the ClassicLink DNS support status of one -// or more VPCs. If enabled, the DNS hostname of a linked EC2-Classic instance -// resolves to its private IP address when addressed from an instance in the VPC to -// which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves -// to its private IP address when addressed from a linked EC2-Classic instance. -func (c *Client) DescribeVpcClassicLinkDnsSupport(ctx context.Context, params *DescribeVpcClassicLinkDnsSupportInput, optFns ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error) { - if params == nil { - params = &DescribeVpcClassicLinkDnsSupportInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcClassicLinkDnsSupport", params, optFns, c.addOperationDescribeVpcClassicLinkDnsSupportMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcClassicLinkDnsSupportOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcClassicLinkDnsSupportInput struct { - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the VPCs. - VpcIds []string - - noSmithyDocumentSerde -} - -type DescribeVpcClassicLinkDnsSupportOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the ClassicLink DNS support status of the VPCs. - Vpcs []types.ClassicLinkDnsSupport - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcClassicLinkDnsSupportMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcClassicLinkDnsSupport"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcClassicLinkDnsSupport(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcClassicLinkDnsSupportAPIClient is a client that implements the -// DescribeVpcClassicLinkDnsSupport operation. -type DescribeVpcClassicLinkDnsSupportAPIClient interface { - DescribeVpcClassicLinkDnsSupport(context.Context, *DescribeVpcClassicLinkDnsSupportInput, ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error) -} - -var _ DescribeVpcClassicLinkDnsSupportAPIClient = (*Client)(nil) - -// DescribeVpcClassicLinkDnsSupportPaginatorOptions is the paginator options for -// DescribeVpcClassicLinkDnsSupport -type DescribeVpcClassicLinkDnsSupportPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcClassicLinkDnsSupportPaginator is a paginator for -// DescribeVpcClassicLinkDnsSupport -type DescribeVpcClassicLinkDnsSupportPaginator struct { - options DescribeVpcClassicLinkDnsSupportPaginatorOptions - client DescribeVpcClassicLinkDnsSupportAPIClient - params *DescribeVpcClassicLinkDnsSupportInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcClassicLinkDnsSupportPaginator returns a new -// DescribeVpcClassicLinkDnsSupportPaginator -func NewDescribeVpcClassicLinkDnsSupportPaginator(client DescribeVpcClassicLinkDnsSupportAPIClient, params *DescribeVpcClassicLinkDnsSupportInput, optFns ...func(*DescribeVpcClassicLinkDnsSupportPaginatorOptions)) *DescribeVpcClassicLinkDnsSupportPaginator { - if params == nil { - params = &DescribeVpcClassicLinkDnsSupportInput{} - } - - options := DescribeVpcClassicLinkDnsSupportPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcClassicLinkDnsSupportPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcClassicLinkDnsSupportPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcClassicLinkDnsSupport page. -func (p *DescribeVpcClassicLinkDnsSupportPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcClassicLinkDnsSupportOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcClassicLinkDnsSupport(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcClassicLinkDnsSupport", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go deleted file mode 100644 index f84fd2288..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnectionNotifications.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the connection notifications for VPC endpoints and VPC endpoint -// services. -func (c *Client) DescribeVpcEndpointConnectionNotifications(ctx context.Context, params *DescribeVpcEndpointConnectionNotificationsInput, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error) { - if params == nil { - params = &DescribeVpcEndpointConnectionNotificationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointConnectionNotifications", params, optFns, c.addOperationDescribeVpcEndpointConnectionNotificationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcEndpointConnectionNotificationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcEndpointConnectionNotificationsInput struct { - - // The ID of the notification. - ConnectionNotificationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - connection-notification-arn - The ARN of the SNS topic for the notification. - // - connection-notification-id - The ID of the notification. - // - connection-notification-state - The state of the notification ( Enabled | - // Disabled ). - // - connection-notification-type - The type of notification ( Topic ). - // - service-id - The ID of the endpoint service. - // - vpc-endpoint-id - The ID of the VPC endpoint. - Filters []types.Filter - - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another request with the returned NextToken value. - MaxResults *int32 - - // The token to request the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeVpcEndpointConnectionNotificationsOutput struct { - - // The notifications. - ConnectionNotificationSet []types.ConnectionNotification - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcEndpointConnectionNotificationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcEndpointConnectionNotifications"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointConnectionNotifications(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcEndpointConnectionNotificationsAPIClient is a client that implements -// the DescribeVpcEndpointConnectionNotifications operation. -type DescribeVpcEndpointConnectionNotificationsAPIClient interface { - DescribeVpcEndpointConnectionNotifications(context.Context, *DescribeVpcEndpointConnectionNotificationsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error) -} - -var _ DescribeVpcEndpointConnectionNotificationsAPIClient = (*Client)(nil) - -// DescribeVpcEndpointConnectionNotificationsPaginatorOptions is the paginator -// options for DescribeVpcEndpointConnectionNotifications -type DescribeVpcEndpointConnectionNotificationsPaginatorOptions struct { - // The maximum number of results to return in a single call. To retrieve the - // remaining results, make another request with the returned NextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcEndpointConnectionNotificationsPaginator is a paginator for -// DescribeVpcEndpointConnectionNotifications -type DescribeVpcEndpointConnectionNotificationsPaginator struct { - options DescribeVpcEndpointConnectionNotificationsPaginatorOptions - client DescribeVpcEndpointConnectionNotificationsAPIClient - params *DescribeVpcEndpointConnectionNotificationsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcEndpointConnectionNotificationsPaginator returns a new -// DescribeVpcEndpointConnectionNotificationsPaginator -func NewDescribeVpcEndpointConnectionNotificationsPaginator(client DescribeVpcEndpointConnectionNotificationsAPIClient, params *DescribeVpcEndpointConnectionNotificationsInput, optFns ...func(*DescribeVpcEndpointConnectionNotificationsPaginatorOptions)) *DescribeVpcEndpointConnectionNotificationsPaginator { - if params == nil { - params = &DescribeVpcEndpointConnectionNotificationsInput{} - } - - options := DescribeVpcEndpointConnectionNotificationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcEndpointConnectionNotificationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcEndpointConnectionNotificationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcEndpointConnectionNotifications page. -func (p *DescribeVpcEndpointConnectionNotificationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionNotificationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcEndpointConnectionNotifications(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcEndpointConnectionNotifications(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcEndpointConnectionNotifications", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnections.go deleted file mode 100644 index 8c6ca7774..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointConnections.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the VPC endpoint connections to your VPC endpoint services, including -// any endpoints that are pending your acceptance. -func (c *Client) DescribeVpcEndpointConnections(ctx context.Context, params *DescribeVpcEndpointConnectionsInput, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error) { - if params == nil { - params = &DescribeVpcEndpointConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointConnections", params, optFns, c.addOperationDescribeVpcEndpointConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcEndpointConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcEndpointConnectionsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - ip-address-type - The IP address type ( ipv4 | ipv6 ). - // - service-id - The ID of the service. - // - vpc-endpoint-owner - The ID of the Amazon Web Services account ID that owns - // the endpoint. - // - vpc-endpoint-state - The state of the endpoint ( pendingAcceptance | pending - // | available | deleting | deleted | rejected | failed ). - // - vpc-endpoint-id - The ID of the endpoint. - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1,000; if - // MaxResults is given a value larger than 1,000, only 1,000 results are returned. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeVpcEndpointConnectionsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the VPC endpoint connections. - VpcEndpointConnections []types.VpcEndpointConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcEndpointConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcEndpointConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcEndpointConnectionsAPIClient is a client that implements the -// DescribeVpcEndpointConnections operation. -type DescribeVpcEndpointConnectionsAPIClient interface { - DescribeVpcEndpointConnections(context.Context, *DescribeVpcEndpointConnectionsInput, ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error) -} - -var _ DescribeVpcEndpointConnectionsAPIClient = (*Client)(nil) - -// DescribeVpcEndpointConnectionsPaginatorOptions is the paginator options for -// DescribeVpcEndpointConnections -type DescribeVpcEndpointConnectionsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1,000; if - // MaxResults is given a value larger than 1,000, only 1,000 results are returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcEndpointConnectionsPaginator is a paginator for -// DescribeVpcEndpointConnections -type DescribeVpcEndpointConnectionsPaginator struct { - options DescribeVpcEndpointConnectionsPaginatorOptions - client DescribeVpcEndpointConnectionsAPIClient - params *DescribeVpcEndpointConnectionsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcEndpointConnectionsPaginator returns a new -// DescribeVpcEndpointConnectionsPaginator -func NewDescribeVpcEndpointConnectionsPaginator(client DescribeVpcEndpointConnectionsAPIClient, params *DescribeVpcEndpointConnectionsInput, optFns ...func(*DescribeVpcEndpointConnectionsPaginatorOptions)) *DescribeVpcEndpointConnectionsPaginator { - if params == nil { - params = &DescribeVpcEndpointConnectionsInput{} - } - - options := DescribeVpcEndpointConnectionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcEndpointConnectionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcEndpointConnectionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcEndpointConnections page. -func (p *DescribeVpcEndpointConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointConnectionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcEndpointConnections(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcEndpointConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go deleted file mode 100644 index de00f1544..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServiceConfigurations.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the VPC endpoint service configurations in your account (your -// services). -func (c *Client) DescribeVpcEndpointServiceConfigurations(ctx context.Context, params *DescribeVpcEndpointServiceConfigurationsInput, optFns ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error) { - if params == nil { - params = &DescribeVpcEndpointServiceConfigurationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServiceConfigurations", params, optFns, c.addOperationDescribeVpcEndpointServiceConfigurationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcEndpointServiceConfigurationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcEndpointServiceConfigurationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - service-name - The name of the service. - // - service-id - The ID of the service. - // - service-state - The state of the service ( Pending | Available | Deleting | - // Deleted | Failed ). - // - supported-ip-address-types - The IP address type ( ipv4 | ipv6 ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1,000; if - // MaxResults is given a value larger than 1,000, only 1,000 results are returned. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - // The IDs of the endpoint services. - ServiceIds []string - - noSmithyDocumentSerde -} - -type DescribeVpcEndpointServiceConfigurationsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the services. - ServiceConfigurations []types.ServiceConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcEndpointServiceConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcEndpointServiceConfigurations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServiceConfigurations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcEndpointServiceConfigurationsAPIClient is a client that implements -// the DescribeVpcEndpointServiceConfigurations operation. -type DescribeVpcEndpointServiceConfigurationsAPIClient interface { - DescribeVpcEndpointServiceConfigurations(context.Context, *DescribeVpcEndpointServiceConfigurationsInput, ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error) -} - -var _ DescribeVpcEndpointServiceConfigurationsAPIClient = (*Client)(nil) - -// DescribeVpcEndpointServiceConfigurationsPaginatorOptions is the paginator -// options for DescribeVpcEndpointServiceConfigurations -type DescribeVpcEndpointServiceConfigurationsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1,000; if - // MaxResults is given a value larger than 1,000, only 1,000 results are returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcEndpointServiceConfigurationsPaginator is a paginator for -// DescribeVpcEndpointServiceConfigurations -type DescribeVpcEndpointServiceConfigurationsPaginator struct { - options DescribeVpcEndpointServiceConfigurationsPaginatorOptions - client DescribeVpcEndpointServiceConfigurationsAPIClient - params *DescribeVpcEndpointServiceConfigurationsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcEndpointServiceConfigurationsPaginator returns a new -// DescribeVpcEndpointServiceConfigurationsPaginator -func NewDescribeVpcEndpointServiceConfigurationsPaginator(client DescribeVpcEndpointServiceConfigurationsAPIClient, params *DescribeVpcEndpointServiceConfigurationsInput, optFns ...func(*DescribeVpcEndpointServiceConfigurationsPaginatorOptions)) *DescribeVpcEndpointServiceConfigurationsPaginator { - if params == nil { - params = &DescribeVpcEndpointServiceConfigurationsInput{} - } - - options := DescribeVpcEndpointServiceConfigurationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcEndpointServiceConfigurationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcEndpointServiceConfigurationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcEndpointServiceConfigurations page. -func (p *DescribeVpcEndpointServiceConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointServiceConfigurationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcEndpointServiceConfigurations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcEndpointServiceConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcEndpointServiceConfigurations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go deleted file mode 100644 index 25f4413e2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServicePermissions.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the principals (service consumers) that are permitted to discover -// your VPC endpoint service. -func (c *Client) DescribeVpcEndpointServicePermissions(ctx context.Context, params *DescribeVpcEndpointServicePermissionsInput, optFns ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error) { - if params == nil { - params = &DescribeVpcEndpointServicePermissionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServicePermissions", params, optFns, c.addOperationDescribeVpcEndpointServicePermissionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcEndpointServicePermissionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcEndpointServicePermissionsInput struct { - - // The ID of the service. - // - // This member is required. - ServiceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - principal - The ARN of the principal. - // - principal-type - The principal type ( All | Service | OrganizationUnit | - // Account | User | Role ). - Filters []types.Filter - - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1,000; if - // MaxResults is given a value larger than 1,000, only 1,000 results are returned. - MaxResults *int32 - - // The token to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type DescribeVpcEndpointServicePermissionsOutput struct { - - // Information about the allowed principals. - AllowedPrincipals []types.AllowedPrincipal - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcEndpointServicePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServicePermissions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcEndpointServicePermissions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeVpcEndpointServicePermissionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServicePermissions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcEndpointServicePermissionsAPIClient is a client that implements the -// DescribeVpcEndpointServicePermissions operation. -type DescribeVpcEndpointServicePermissionsAPIClient interface { - DescribeVpcEndpointServicePermissions(context.Context, *DescribeVpcEndpointServicePermissionsInput, ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error) -} - -var _ DescribeVpcEndpointServicePermissionsAPIClient = (*Client)(nil) - -// DescribeVpcEndpointServicePermissionsPaginatorOptions is the paginator options -// for DescribeVpcEndpointServicePermissions -type DescribeVpcEndpointServicePermissionsPaginatorOptions struct { - // The maximum number of results to return for the request in a single page. The - // remaining results of the initial request can be seen by sending another request - // with the returned NextToken value. This value can be between 5 and 1,000; if - // MaxResults is given a value larger than 1,000, only 1,000 results are returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcEndpointServicePermissionsPaginator is a paginator for -// DescribeVpcEndpointServicePermissions -type DescribeVpcEndpointServicePermissionsPaginator struct { - options DescribeVpcEndpointServicePermissionsPaginatorOptions - client DescribeVpcEndpointServicePermissionsAPIClient - params *DescribeVpcEndpointServicePermissionsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcEndpointServicePermissionsPaginator returns a new -// DescribeVpcEndpointServicePermissionsPaginator -func NewDescribeVpcEndpointServicePermissionsPaginator(client DescribeVpcEndpointServicePermissionsAPIClient, params *DescribeVpcEndpointServicePermissionsInput, optFns ...func(*DescribeVpcEndpointServicePermissionsPaginatorOptions)) *DescribeVpcEndpointServicePermissionsPaginator { - if params == nil { - params = &DescribeVpcEndpointServicePermissionsInput{} - } - - options := DescribeVpcEndpointServicePermissionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcEndpointServicePermissionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcEndpointServicePermissionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcEndpointServicePermissions page. -func (p *DescribeVpcEndpointServicePermissionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointServicePermissionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcEndpointServicePermissions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcEndpointServicePermissions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcEndpointServicePermissions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServices.go deleted file mode 100644 index dec4d3f9a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpointServices.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes available services to which you can create a VPC endpoint. When the -// service provider and the consumer have different accounts in multiple -// Availability Zones, and the consumer views the VPC endpoint service information, -// the response only includes the common Availability Zones. For example, when the -// service provider account uses us-east-1a and us-east-1c and the consumer uses -// us-east-1a and us-east-1b , the response includes the VPC endpoint services in -// the common Availability Zone, us-east-1a . -func (c *Client) DescribeVpcEndpointServices(ctx context.Context, params *DescribeVpcEndpointServicesInput, optFns ...func(*Options)) (*DescribeVpcEndpointServicesOutput, error) { - if params == nil { - params = &DescribeVpcEndpointServicesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpointServices", params, optFns, c.addOperationDescribeVpcEndpointServicesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcEndpointServicesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcEndpointServicesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - owner - The ID or alias of the Amazon Web Services account that owns the - // service. - // - service-name - The name of the service. - // - service-type - The type of service ( Interface | Gateway | - // GatewayLoadBalancer ). - // - supported-ip-address-types - The IP address type ( ipv4 | ipv6 ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of items to return for this request. The request returns a - // token that you can specify in a subsequent call to get the next set of results. - // Constraint: If the value is greater than 1,000, we return only 1,000 items. - MaxResults *int32 - - // The token for the next set of items to return. (You received this token from a - // prior call.) - NextToken *string - - // The service names. - ServiceNames []string - - noSmithyDocumentSerde -} - -type DescribeVpcEndpointServicesOutput struct { - - // The token to use when requesting the next set of items. If there are no - // additional items to return, the string is empty. - NextToken *string - - // Information about the service. - ServiceDetails []types.ServiceDetail - - // The supported services. - ServiceNames []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcEndpointServicesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpointServices{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpointServices{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcEndpointServices"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpointServices(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeVpcEndpointServices(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcEndpointServices", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpoints.go deleted file mode 100644 index 882cf9295..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcEndpoints.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes your VPC endpoints. -func (c *Client) DescribeVpcEndpoints(ctx context.Context, params *DescribeVpcEndpointsInput, optFns ...func(*Options)) (*DescribeVpcEndpointsOutput, error) { - if params == nil { - params = &DescribeVpcEndpointsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcEndpoints", params, optFns, c.addOperationDescribeVpcEndpointsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcEndpointsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcEndpointsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - ip-address-type - The IP address type ( ipv4 | ipv6 ). - // - service-name - The name of the service. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC in which the endpoint resides. - // - vpc-endpoint-id - The ID of the endpoint. - // - vpc-endpoint-state - The state of the endpoint ( pendingAcceptance | pending - // | available | deleting | deleted | rejected | failed ). - // - vpc-endpoint-type - The type of VPC endpoint ( Interface | Gateway | - // GatewayLoadBalancer ). - Filters []types.Filter - - // The maximum number of items to return for this request. The request returns a - // token that you can specify in a subsequent call to get the next set of results. - // Constraint: If the value is greater than 1,000, we return only 1,000 items. - MaxResults *int32 - - // The token for the next set of items to return. (You received this token from a - // prior call.) - NextToken *string - - // The IDs of the VPC endpoints. - VpcEndpointIds []string - - noSmithyDocumentSerde -} - -type DescribeVpcEndpointsOutput struct { - - // The token to use when requesting the next set of items. If there are no - // additional items to return, the string is empty. - NextToken *string - - // Information about the endpoints. - VpcEndpoints []types.VpcEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcEndpointsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcEndpoints{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcEndpoints{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcEndpoints"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcEndpoints(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcEndpointsAPIClient is a client that implements the -// DescribeVpcEndpoints operation. -type DescribeVpcEndpointsAPIClient interface { - DescribeVpcEndpoints(context.Context, *DescribeVpcEndpointsInput, ...func(*Options)) (*DescribeVpcEndpointsOutput, error) -} - -var _ DescribeVpcEndpointsAPIClient = (*Client)(nil) - -// DescribeVpcEndpointsPaginatorOptions is the paginator options for -// DescribeVpcEndpoints -type DescribeVpcEndpointsPaginatorOptions struct { - // The maximum number of items to return for this request. The request returns a - // token that you can specify in a subsequent call to get the next set of results. - // Constraint: If the value is greater than 1,000, we return only 1,000 items. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcEndpointsPaginator is a paginator for DescribeVpcEndpoints -type DescribeVpcEndpointsPaginator struct { - options DescribeVpcEndpointsPaginatorOptions - client DescribeVpcEndpointsAPIClient - params *DescribeVpcEndpointsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcEndpointsPaginator returns a new DescribeVpcEndpointsPaginator -func NewDescribeVpcEndpointsPaginator(client DescribeVpcEndpointsAPIClient, params *DescribeVpcEndpointsInput, optFns ...func(*DescribeVpcEndpointsPaginatorOptions)) *DescribeVpcEndpointsPaginator { - if params == nil { - params = &DescribeVpcEndpointsInput{} - } - - options := DescribeVpcEndpointsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcEndpointsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcEndpointsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcEndpoints page. -func (p *DescribeVpcEndpointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcEndpointsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcEndpoints(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcEndpoints(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcEndpoints", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go deleted file mode 100644 index 2429346b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcPeeringConnections.go +++ /dev/null @@ -1,656 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your VPC peering connections. -func (c *Client) DescribeVpcPeeringConnections(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, optFns ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) { - if params == nil { - params = &DescribeVpcPeeringConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcPeeringConnections", params, optFns, c.addOperationDescribeVpcPeeringConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcPeeringConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcPeeringConnectionsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - accepter-vpc-info.cidr-block - The IPv4 CIDR block of the accepter VPC. - // - accepter-vpc-info.owner-id - The ID of the Amazon Web Services account that - // owns the accepter VPC. - // - accepter-vpc-info.vpc-id - The ID of the accepter VPC. - // - expiration-time - The expiration date and time for the VPC peering - // connection. - // - requester-vpc-info.cidr-block - The IPv4 CIDR block of the requester's VPC. - // - requester-vpc-info.owner-id - The ID of the Amazon Web Services account that - // owns the requester VPC. - // - requester-vpc-info.vpc-id - The ID of the requester VPC. - // - status-code - The status of the VPC peering connection ( pending-acceptance - // | failed | expired | provisioning | active | deleting | deleted | rejected ). - // - status-message - A message that provides more information about the status - // of the VPC peering connection, if applicable. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-peering-connection-id - The ID of the VPC peering connection. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the VPC peering connections. Default: Describes all your VPC peering - // connections. - VpcPeeringConnectionIds []string - - noSmithyDocumentSerde -} - -type DescribeVpcPeeringConnectionsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the VPC peering connections. - VpcPeeringConnections []types.VpcPeeringConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcPeeringConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcPeeringConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcPeeringConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcPeeringConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcPeeringConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcPeeringConnectionsAPIClient is a client that implements the -// DescribeVpcPeeringConnections operation. -type DescribeVpcPeeringConnectionsAPIClient interface { - DescribeVpcPeeringConnections(context.Context, *DescribeVpcPeeringConnectionsInput, ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) -} - -var _ DescribeVpcPeeringConnectionsAPIClient = (*Client)(nil) - -// DescribeVpcPeeringConnectionsPaginatorOptions is the paginator options for -// DescribeVpcPeeringConnections -type DescribeVpcPeeringConnectionsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcPeeringConnectionsPaginator is a paginator for -// DescribeVpcPeeringConnections -type DescribeVpcPeeringConnectionsPaginator struct { - options DescribeVpcPeeringConnectionsPaginatorOptions - client DescribeVpcPeeringConnectionsAPIClient - params *DescribeVpcPeeringConnectionsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcPeeringConnectionsPaginator returns a new -// DescribeVpcPeeringConnectionsPaginator -func NewDescribeVpcPeeringConnectionsPaginator(client DescribeVpcPeeringConnectionsAPIClient, params *DescribeVpcPeeringConnectionsInput, optFns ...func(*DescribeVpcPeeringConnectionsPaginatorOptions)) *DescribeVpcPeeringConnectionsPaginator { - if params == nil { - params = &DescribeVpcPeeringConnectionsInput{} - } - - options := DescribeVpcPeeringConnectionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcPeeringConnectionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcPeeringConnectionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcPeeringConnections page. -func (p *DescribeVpcPeeringConnectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcPeeringConnectionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcPeeringConnections(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// VpcPeeringConnectionDeletedWaiterOptions are waiter options for -// VpcPeeringConnectionDeletedWaiter -type VpcPeeringConnectionDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VpcPeeringConnectionDeletedWaiter will use default minimum delay of 15 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VpcPeeringConnectionDeletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVpcPeeringConnectionsInput, *DescribeVpcPeeringConnectionsOutput, error) (bool, error) -} - -// VpcPeeringConnectionDeletedWaiter defines the waiters for -// VpcPeeringConnectionDeleted -type VpcPeeringConnectionDeletedWaiter struct { - client DescribeVpcPeeringConnectionsAPIClient - - options VpcPeeringConnectionDeletedWaiterOptions -} - -// NewVpcPeeringConnectionDeletedWaiter constructs a -// VpcPeeringConnectionDeletedWaiter. -func NewVpcPeeringConnectionDeletedWaiter(client DescribeVpcPeeringConnectionsAPIClient, optFns ...func(*VpcPeeringConnectionDeletedWaiterOptions)) *VpcPeeringConnectionDeletedWaiter { - options := VpcPeeringConnectionDeletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = vpcPeeringConnectionDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VpcPeeringConnectionDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VpcPeeringConnectionDeleted waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *VpcPeeringConnectionDeletedWaiter) Wait(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpcPeeringConnectionDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VpcPeeringConnectionDeleted waiter -// and returns the output of the successful operation. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *VpcPeeringConnectionDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpcPeeringConnectionDeletedWaiterOptions)) (*DescribeVpcPeeringConnectionsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVpcPeeringConnections(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VpcPeeringConnectionDeleted waiter") -} - -func vpcPeeringConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpcPeeringConnectionsInput, output *DescribeVpcPeeringConnectionsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("VpcPeeringConnections[].Status.Code", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpcPeeringConnectionStateReasonCode) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpcPeeringConnectionStateReasonCode value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidVpcPeeringConnectionID.NotFound" == apiErr.ErrorCode() { - return false, nil - } - } - - return true, nil -} - -// VpcPeeringConnectionExistsWaiterOptions are waiter options for -// VpcPeeringConnectionExistsWaiter -type VpcPeeringConnectionExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VpcPeeringConnectionExistsWaiter will use default minimum delay of 15 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VpcPeeringConnectionExistsWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVpcPeeringConnectionsInput, *DescribeVpcPeeringConnectionsOutput, error) (bool, error) -} - -// VpcPeeringConnectionExistsWaiter defines the waiters for -// VpcPeeringConnectionExists -type VpcPeeringConnectionExistsWaiter struct { - client DescribeVpcPeeringConnectionsAPIClient - - options VpcPeeringConnectionExistsWaiterOptions -} - -// NewVpcPeeringConnectionExistsWaiter constructs a -// VpcPeeringConnectionExistsWaiter. -func NewVpcPeeringConnectionExistsWaiter(client DescribeVpcPeeringConnectionsAPIClient, optFns ...func(*VpcPeeringConnectionExistsWaiterOptions)) *VpcPeeringConnectionExistsWaiter { - options := VpcPeeringConnectionExistsWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = vpcPeeringConnectionExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VpcPeeringConnectionExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VpcPeeringConnectionExists waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *VpcPeeringConnectionExistsWaiter) Wait(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpcPeeringConnectionExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VpcPeeringConnectionExists waiter -// and returns the output of the successful operation. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *VpcPeeringConnectionExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeVpcPeeringConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpcPeeringConnectionExistsWaiterOptions)) (*DescribeVpcPeeringConnectionsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVpcPeeringConnections(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VpcPeeringConnectionExists waiter") -} - -func vpcPeeringConnectionExistsStateRetryable(ctx context.Context, input *DescribeVpcPeeringConnectionsInput, output *DescribeVpcPeeringConnectionsOutput, err error) (bool, error) { - - if err == nil { - return false, nil - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidVpcPeeringConnectionID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcPeeringConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcPeeringConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go deleted file mode 100644 index ab2dc5ce4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpcs.go +++ /dev/null @@ -1,636 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your VPCs. -func (c *Client) DescribeVpcs(ctx context.Context, params *DescribeVpcsInput, optFns ...func(*Options)) (*DescribeVpcsOutput, error) { - if params == nil { - params = &DescribeVpcsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpcs", params, optFns, c.addOperationDescribeVpcsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpcsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeVpcsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. - // - cidr - The primary IPv4 CIDR block of the VPC. The CIDR block you specify - // must exactly match the VPC's CIDR block for information to be returned for the - // VPC. Must contain the slash followed by one or two digits (for example, /28 ). - // - cidr-block-association.cidr-block - An IPv4 CIDR block associated with the - // VPC. - // - cidr-block-association.association-id - The association ID for an IPv4 CIDR - // block associated with the VPC. - // - cidr-block-association.state - The state of an IPv4 CIDR block associated - // with the VPC. - // - dhcp-options-id - The ID of a set of DHCP options. - // - ipv6-cidr-block-association.ipv6-cidr-block - An IPv6 CIDR block associated - // with the VPC. - // - ipv6-cidr-block-association.ipv6-pool - The ID of the IPv6 address pool from - // which the IPv6 CIDR block is allocated. - // - ipv6-cidr-block-association.association-id - The association ID for an IPv6 - // CIDR block associated with the VPC. - // - ipv6-cidr-block-association.state - The state of an IPv6 CIDR block - // associated with the VPC. - // - is-default - Indicates whether the VPC is the default VPC. - // - owner-id - The ID of the Amazon Web Services account that owns the VPC. - // - state - The state of the VPC ( pending | available ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - vpc-id - The ID of the VPC. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the VPCs. Default: Describes all your VPCs. - VpcIds []string - - noSmithyDocumentSerde -} - -type DescribeVpcsOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about one or more VPCs. - Vpcs []types.Vpc - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpcsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpcs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpcs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpcs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpcs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpcsAPIClient is a client that implements the DescribeVpcs operation. -type DescribeVpcsAPIClient interface { - DescribeVpcs(context.Context, *DescribeVpcsInput, ...func(*Options)) (*DescribeVpcsOutput, error) -} - -var _ DescribeVpcsAPIClient = (*Client)(nil) - -// DescribeVpcsPaginatorOptions is the paginator options for DescribeVpcs -type DescribeVpcsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// DescribeVpcsPaginator is a paginator for DescribeVpcs -type DescribeVpcsPaginator struct { - options DescribeVpcsPaginatorOptions - client DescribeVpcsAPIClient - params *DescribeVpcsInput - nextToken *string - firstPage bool -} - -// NewDescribeVpcsPaginator returns a new DescribeVpcsPaginator -func NewDescribeVpcsPaginator(client DescribeVpcsAPIClient, params *DescribeVpcsInput, optFns ...func(*DescribeVpcsPaginatorOptions)) *DescribeVpcsPaginator { - if params == nil { - params = &DescribeVpcsInput{} - } - - options := DescribeVpcsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &DescribeVpcsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *DescribeVpcsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next DescribeVpcs page. -func (p *DescribeVpcsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeVpcsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.DescribeVpcs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// VpcAvailableWaiterOptions are waiter options for VpcAvailableWaiter -type VpcAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VpcAvailableWaiter will use default minimum delay of 15 seconds. Note that - // MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VpcAvailableWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVpcsInput, *DescribeVpcsOutput, error) (bool, error) -} - -// VpcAvailableWaiter defines the waiters for VpcAvailable -type VpcAvailableWaiter struct { - client DescribeVpcsAPIClient - - options VpcAvailableWaiterOptions -} - -// NewVpcAvailableWaiter constructs a VpcAvailableWaiter. -func NewVpcAvailableWaiter(client DescribeVpcsAPIClient, optFns ...func(*VpcAvailableWaiterOptions)) *VpcAvailableWaiter { - options := VpcAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = vpcAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VpcAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VpcAvailable waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *VpcAvailableWaiter) Wait(ctx context.Context, params *DescribeVpcsInput, maxWaitDur time.Duration, optFns ...func(*VpcAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VpcAvailable waiter and returns the -// output of the successful operation. The maxWaitDur is the maximum wait duration -// the waiter will wait. The maxWaitDur is required and must be greater than zero. -func (w *VpcAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeVpcsInput, maxWaitDur time.Duration, optFns ...func(*VpcAvailableWaiterOptions)) (*DescribeVpcsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVpcs(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VpcAvailable waiter") -} - -func vpcAvailableStateRetryable(ctx context.Context, input *DescribeVpcsInput, output *DescribeVpcsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("Vpcs[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpcState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpcState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - return true, nil -} - -// VpcExistsWaiterOptions are waiter options for VpcExistsWaiter -type VpcExistsWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VpcExistsWaiter will use default minimum delay of 1 seconds. Note that MinDelay - // must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VpcExistsWaiter will use default max delay of 120 seconds. Note - // that MaxDelay must resolve to value greater than or equal to the MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVpcsInput, *DescribeVpcsOutput, error) (bool, error) -} - -// VpcExistsWaiter defines the waiters for VpcExists -type VpcExistsWaiter struct { - client DescribeVpcsAPIClient - - options VpcExistsWaiterOptions -} - -// NewVpcExistsWaiter constructs a VpcExistsWaiter. -func NewVpcExistsWaiter(client DescribeVpcsAPIClient, optFns ...func(*VpcExistsWaiterOptions)) *VpcExistsWaiter { - options := VpcExistsWaiterOptions{} - options.MinDelay = 1 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = vpcExistsStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VpcExistsWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VpcExists waiter. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *VpcExistsWaiter) Wait(ctx context.Context, params *DescribeVpcsInput, maxWaitDur time.Duration, optFns ...func(*VpcExistsWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VpcExists waiter and returns the -// output of the successful operation. The maxWaitDur is the maximum wait duration -// the waiter will wait. The maxWaitDur is required and must be greater than zero. -func (w *VpcExistsWaiter) WaitForOutput(ctx context.Context, params *DescribeVpcsInput, maxWaitDur time.Duration, optFns ...func(*VpcExistsWaiterOptions)) (*DescribeVpcsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVpcs(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VpcExists waiter") -} - -func vpcExistsStateRetryable(ctx context.Context, input *DescribeVpcsInput, output *DescribeVpcsOutput, err error) (bool, error) { - - if err == nil { - return false, nil - } - - if err != nil { - var apiErr smithy.APIError - ok := errors.As(err, &apiErr) - if !ok { - return false, fmt.Errorf("expected err to be of type smithy.APIError, got %w", err) - } - - if "InvalidVpcID.NotFound" == apiErr.ErrorCode() { - return true, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeVpcs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpcs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go deleted file mode 100644 index 0104ae6d5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnConnections.go +++ /dev/null @@ -1,632 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "time" -) - -// Describes one or more of your VPN connections. For more information, see Amazon -// Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) DescribeVpnConnections(ctx context.Context, params *DescribeVpnConnectionsInput, optFns ...func(*Options)) (*DescribeVpnConnectionsOutput, error) { - if params == nil { - params = &DescribeVpnConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpnConnections", params, optFns, c.addOperationDescribeVpnConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpnConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeVpnConnections. -type DescribeVpnConnectionsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - customer-gateway-configuration - The configuration information for the - // customer gateway. - // - customer-gateway-id - The ID of a customer gateway associated with the VPN - // connection. - // - state - The state of the VPN connection ( pending | available | deleting | - // deleted ). - // - option.static-routes-only - Indicates whether the connection has static - // routes only. Used for devices that do not support Border Gateway Protocol (BGP). - // - // - route.destination-cidr-block - The destination CIDR block. This corresponds - // to the subnet used in a customer data center. - // - bgp-asn - The BGP Autonomous System Number (ASN) associated with a BGP - // device. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - type - The type of VPN connection. Currently the only supported type is - // ipsec.1 . - // - vpn-connection-id - The ID of the VPN connection. - // - vpn-gateway-id - The ID of a virtual private gateway associated with the VPN - // connection. - // - transit-gateway-id - The ID of a transit gateway associated with the VPN - // connection. - Filters []types.Filter - - // One or more VPN connection IDs. Default: Describes your VPN connections. - VpnConnectionIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeVpnConnections. -type DescribeVpnConnectionsOutput struct { - - // Information about one or more VPN connections. - VpnConnections []types.VpnConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpnConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpnConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpnConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpnConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpnConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// DescribeVpnConnectionsAPIClient is a client that implements the -// DescribeVpnConnections operation. -type DescribeVpnConnectionsAPIClient interface { - DescribeVpnConnections(context.Context, *DescribeVpnConnectionsInput, ...func(*Options)) (*DescribeVpnConnectionsOutput, error) -} - -var _ DescribeVpnConnectionsAPIClient = (*Client)(nil) - -// VpnConnectionAvailableWaiterOptions are waiter options for -// VpnConnectionAvailableWaiter -type VpnConnectionAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VpnConnectionAvailableWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VpnConnectionAvailableWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVpnConnectionsInput, *DescribeVpnConnectionsOutput, error) (bool, error) -} - -// VpnConnectionAvailableWaiter defines the waiters for VpnConnectionAvailable -type VpnConnectionAvailableWaiter struct { - client DescribeVpnConnectionsAPIClient - - options VpnConnectionAvailableWaiterOptions -} - -// NewVpnConnectionAvailableWaiter constructs a VpnConnectionAvailableWaiter. -func NewVpnConnectionAvailableWaiter(client DescribeVpnConnectionsAPIClient, optFns ...func(*VpnConnectionAvailableWaiterOptions)) *VpnConnectionAvailableWaiter { - options := VpnConnectionAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = vpnConnectionAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VpnConnectionAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VpnConnectionAvailable waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *VpnConnectionAvailableWaiter) Wait(ctx context.Context, params *DescribeVpnConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpnConnectionAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VpnConnectionAvailable waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *VpnConnectionAvailableWaiter) WaitForOutput(ctx context.Context, params *DescribeVpnConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpnConnectionAvailableWaiterOptions)) (*DescribeVpnConnectionsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVpnConnections(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VpnConnectionAvailable waiter") -} - -func vpnConnectionAvailableStateRetryable(ctx context.Context, input *DescribeVpnConnectionsInput, output *DescribeVpnConnectionsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "available" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleting" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -// VpnConnectionDeletedWaiterOptions are waiter options for -// VpnConnectionDeletedWaiter -type VpnConnectionDeletedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // VpnConnectionDeletedWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, VpnConnectionDeletedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *DescribeVpnConnectionsInput, *DescribeVpnConnectionsOutput, error) (bool, error) -} - -// VpnConnectionDeletedWaiter defines the waiters for VpnConnectionDeleted -type VpnConnectionDeletedWaiter struct { - client DescribeVpnConnectionsAPIClient - - options VpnConnectionDeletedWaiterOptions -} - -// NewVpnConnectionDeletedWaiter constructs a VpnConnectionDeletedWaiter. -func NewVpnConnectionDeletedWaiter(client DescribeVpnConnectionsAPIClient, optFns ...func(*VpnConnectionDeletedWaiterOptions)) *VpnConnectionDeletedWaiter { - options := VpnConnectionDeletedWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = vpnConnectionDeletedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &VpnConnectionDeletedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for VpnConnectionDeleted waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *VpnConnectionDeletedWaiter) Wait(ctx context.Context, params *DescribeVpnConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpnConnectionDeletedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for VpnConnectionDeleted waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *VpnConnectionDeletedWaiter) WaitForOutput(ctx context.Context, params *DescribeVpnConnectionsInput, maxWaitDur time.Duration, optFns ...func(*VpnConnectionDeletedWaiterOptions)) (*DescribeVpnConnectionsOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.DescribeVpnConnections(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for VpnConnectionDeleted waiter") -} - -func vpnConnectionDeletedStateRetryable(ctx context.Context, input *DescribeVpnConnectionsInput, output *DescribeVpnConnectionsOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "deleted" - var match = true - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - if len(listOfValues) == 0 { - match = false - } - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) != expectedValue { - match = false - } - } - - if match { - return false, nil - } - } - - if err == nil { - pathValue, err := jmespath.Search("VpnConnections[].State", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "pending" - listOfValues, ok := pathValue.([]interface{}) - if !ok { - return false, fmt.Errorf("waiter comparator expected list got %T", pathValue) - } - - for _, v := range listOfValues { - value, ok := v.(types.VpnState) - if !ok { - return false, fmt.Errorf("waiter comparator expected types.VpnState value, got %T", pathValue) - } - - if string(value) == expectedValue { - return false, fmt.Errorf("waiter state transitioned to Failure") - } - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opDescribeVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpnConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnGateways.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnGateways.go deleted file mode 100644 index 43c38469d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DescribeVpnGateways.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes one or more of your virtual private gateways. For more information, -// see Amazon Web Services Site-to-Site VPN (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPC_VPN.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) DescribeVpnGateways(ctx context.Context, params *DescribeVpnGatewaysInput, optFns ...func(*Options)) (*DescribeVpnGatewaysOutput, error) { - if params == nil { - params = &DescribeVpnGatewaysInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeVpnGateways", params, optFns, c.addOperationDescribeVpnGatewaysMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeVpnGatewaysOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DescribeVpnGateways. -type DescribeVpnGatewaysInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - amazon-side-asn - The Autonomous System Number (ASN) for the Amazon side of - // the gateway. - // - attachment.state - The current state of the attachment between the gateway - // and the VPC ( attaching | attached | detaching | detached ). - // - attachment.vpc-id - The ID of an attached VPC. - // - availability-zone - The Availability Zone for the virtual private gateway - // (if applicable). - // - state - The state of the virtual private gateway ( pending | available | - // deleting | deleted ). - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - // - type - The type of virtual private gateway. Currently the only supported - // type is ipsec.1 . - // - vpn-gateway-id - The ID of the virtual private gateway. - Filters []types.Filter - - // One or more virtual private gateway IDs. Default: Describes all your virtual - // private gateways. - VpnGatewayIds []string - - noSmithyDocumentSerde -} - -// Contains the output of DescribeVpnGateways. -type DescribeVpnGatewaysOutput struct { - - // Information about one or more virtual private gateways. - VpnGateways []types.VpnGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeVpnGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDescribeVpnGateways{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDescribeVpnGateways{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeVpnGateways"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeVpnGateways(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeVpnGateways(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeVpnGateways", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachClassicLinkVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachClassicLinkVpc.go deleted file mode 100644 index 716d3a56b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachClassicLinkVpc.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Unlinks (detaches) a linked EC2-Classic instance -// from a VPC. After the instance has been unlinked, the VPC security groups are no -// longer associated with it. An instance is automatically unlinked from a VPC when -// it's stopped. -func (c *Client) DetachClassicLinkVpc(ctx context.Context, params *DetachClassicLinkVpcInput, optFns ...func(*Options)) (*DetachClassicLinkVpcOutput, error) { - if params == nil { - params = &DetachClassicLinkVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DetachClassicLinkVpc", params, optFns, c.addOperationDetachClassicLinkVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DetachClassicLinkVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DetachClassicLinkVpcInput struct { - - // The ID of the instance to unlink from the VPC. - // - // This member is required. - InstanceId *string - - // The ID of the VPC to which the instance is linked. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DetachClassicLinkVpcOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDetachClassicLinkVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDetachClassicLinkVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachClassicLinkVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DetachClassicLinkVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDetachClassicLinkVpcValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachClassicLinkVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDetachClassicLinkVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DetachClassicLinkVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachInternetGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachInternetGateway.go deleted file mode 100644 index 80e39d8e0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachInternetGateway.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Detaches an internet gateway from a VPC, disabling connectivity between the -// internet and the VPC. The VPC must not contain any running instances with -// Elastic IP addresses or public IPv4 addresses. -func (c *Client) DetachInternetGateway(ctx context.Context, params *DetachInternetGatewayInput, optFns ...func(*Options)) (*DetachInternetGatewayOutput, error) { - if params == nil { - params = &DetachInternetGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DetachInternetGateway", params, optFns, c.addOperationDetachInternetGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DetachInternetGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DetachInternetGatewayInput struct { - - // The ID of the internet gateway. - // - // This member is required. - InternetGatewayId *string - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DetachInternetGatewayOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDetachInternetGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDetachInternetGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachInternetGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DetachInternetGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDetachInternetGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachInternetGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDetachInternetGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DetachInternetGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachNetworkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachNetworkInterface.go deleted file mode 100644 index 57b407766..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachNetworkInterface.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Detaches a network interface from an instance. -func (c *Client) DetachNetworkInterface(ctx context.Context, params *DetachNetworkInterfaceInput, optFns ...func(*Options)) (*DetachNetworkInterfaceOutput, error) { - if params == nil { - params = &DetachNetworkInterfaceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DetachNetworkInterface", params, optFns, c.addOperationDetachNetworkInterfaceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DetachNetworkInterfaceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DetachNetworkInterface. -type DetachNetworkInterfaceInput struct { - - // The ID of the attachment. - // - // This member is required. - AttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specifies whether to force a detachment. - // - Use the Force parameter only as a last resort to detach a network interface - // from a failed instance. - // - If you use the Force parameter to detach a network interface, you might not - // be able to attach a different network interface to the same index on the - // instance without first stopping and starting the instance. - // - If you force the detachment of a network interface, the instance metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // might not get updated. This means that the attributes associated with the - // detached network interface might still be visible. The instance metadata will - // get updated when you stop and start the instance. - Force *bool - - noSmithyDocumentSerde -} - -type DetachNetworkInterfaceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDetachNetworkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDetachNetworkInterface{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachNetworkInterface{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DetachNetworkInterface"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDetachNetworkInterfaceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachNetworkInterface(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDetachNetworkInterface(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DetachNetworkInterface", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go deleted file mode 100644 index 6d478ffb0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVerifiedAccessTrustProvider.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Detaches the specified Amazon Web Services Verified Access trust provider from -// the specified Amazon Web Services Verified Access instance. -func (c *Client) DetachVerifiedAccessTrustProvider(ctx context.Context, params *DetachVerifiedAccessTrustProviderInput, optFns ...func(*Options)) (*DetachVerifiedAccessTrustProviderOutput, error) { - if params == nil { - params = &DetachVerifiedAccessTrustProviderInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DetachVerifiedAccessTrustProvider", params, optFns, c.addOperationDetachVerifiedAccessTrustProviderMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DetachVerifiedAccessTrustProviderOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DetachVerifiedAccessTrustProviderInput struct { - - // The ID of the Verified Access instance. - // - // This member is required. - VerifiedAccessInstanceId *string - - // The ID of the Verified Access trust provider. - // - // This member is required. - VerifiedAccessTrustProviderId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DetachVerifiedAccessTrustProviderOutput struct { - - // Details about the Verified Access instance. - VerifiedAccessInstance *types.VerifiedAccessInstance - - // Details about the Verified Access trust provider. - VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDetachVerifiedAccessTrustProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDetachVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DetachVerifiedAccessTrustProvider"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opDetachVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { - return err - } - if err = addOpDetachVerifiedAccessTrustProviderValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachVerifiedAccessTrustProvider(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDetachVerifiedAccessTrustProvider struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDetachVerifiedAccessTrustProvider) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDetachVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DetachVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DetachVerifiedAccessTrustProviderInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDetachVerifiedAccessTrustProviderMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDetachVerifiedAccessTrustProvider{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDetachVerifiedAccessTrustProvider(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DetachVerifiedAccessTrustProvider", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVolume.go deleted file mode 100644 index 1d5ee4cee..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVolume.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Detaches an EBS volume from an instance. Make sure to unmount any file systems -// on the device within your operating system before detaching the volume. Failure -// to do so can result in the volume becoming stuck in the busy state while -// detaching. If this happens, detachment can be delayed indefinitely until you -// unmount the volume, force detachment, reboot the instance, or all three. If an -// EBS volume is the root device of an instance, it can't be detached while the -// instance is running. To detach the root volume, stop the instance first. When a -// volume with an Amazon Web Services Marketplace product code is detached from an -// instance, the product code is no longer associated with the instance. You can't -// detach or force detach volumes that are attached to Amazon ECS or Fargate tasks. -// Attempting to do this results in the UnsupportedOperationException exception -// with the Unable to detach volume attached to ECS tasks error message. For more -// information, see Detach an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DetachVolume(ctx context.Context, params *DetachVolumeInput, optFns ...func(*Options)) (*DetachVolumeOutput, error) { - if params == nil { - params = &DetachVolumeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DetachVolume", params, optFns, c.addOperationDetachVolumeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DetachVolumeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DetachVolumeInput struct { - - // The ID of the volume. - // - // This member is required. - VolumeId *string - - // The device name. - Device *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Forces detachment if the previous detachment attempt did not occur cleanly (for - // example, logging into an instance, unmounting the volume, and detaching - // normally). This option can lead to data loss or a corrupted file system. Use - // this option only as a last resort to detach a volume from a failed instance. The - // instance won't have an opportunity to flush file system caches or file system - // metadata. If you use this option, you must perform file system check and repair - // procedures. - Force *bool - - // The ID of the instance. If you are detaching a Multi-Attach enabled volume, you - // must specify an instance ID. - InstanceId *string - - noSmithyDocumentSerde -} - -// Describes volume attachment details. -type DetachVolumeOutput struct { - - // The ARN of the Amazon ECS or Fargate task to which the volume is attached. - AssociatedResource *string - - // The time stamp when the attachment initiated. - AttachTime *time.Time - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool - - // The device name. If the volume is attached to a Fargate task, this parameter - // returns null . - Device *string - - // The ID of the instance. If the volume is attached to a Fargate task, this - // parameter returns null . - InstanceId *string - - // The service principal of Amazon Web Services service that owns the underlying - // instance to which the volume is attached. This parameter is returned only for - // volumes that are attached to Fargate tasks. - InstanceOwningService *string - - // The attachment state of the volume. - State types.VolumeAttachmentState - - // The ID of the volume. - VolumeId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDetachVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDetachVolume{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachVolume{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DetachVolume"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDetachVolumeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachVolume(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDetachVolume(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DetachVolume", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVpnGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVpnGateway.go deleted file mode 100644 index 89bf4d532..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DetachVpnGateway.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Detaches a virtual private gateway from a VPC. You do this if you're planning -// to turn off the VPC and not use it anymore. You can confirm a virtual private -// gateway has been completely detached from a VPC by describing the virtual -// private gateway (any attachments to the virtual private gateway are also -// described). You must wait for the attachment's state to switch to detached -// before you can delete the VPC or attach a different VPC to the virtual private -// gateway. -func (c *Client) DetachVpnGateway(ctx context.Context, params *DetachVpnGatewayInput, optFns ...func(*Options)) (*DetachVpnGatewayOutput, error) { - if params == nil { - params = &DetachVpnGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DetachVpnGateway", params, optFns, c.addOperationDetachVpnGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DetachVpnGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DetachVpnGateway. -type DetachVpnGatewayInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // The ID of the virtual private gateway. - // - // This member is required. - VpnGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DetachVpnGatewayOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDetachVpnGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDetachVpnGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDetachVpnGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DetachVpnGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDetachVpnGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDetachVpnGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDetachVpnGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DetachVpnGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableAddressTransfer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableAddressTransfer.go deleted file mode 100644 index d2cff2ab7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableAddressTransfer.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables Elastic IP address transfer. For more information, see Transfer -// Elastic IP addresses (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) -// in the Amazon Virtual Private Cloud User Guide. -func (c *Client) DisableAddressTransfer(ctx context.Context, params *DisableAddressTransferInput, optFns ...func(*Options)) (*DisableAddressTransferOutput, error) { - if params == nil { - params = &DisableAddressTransferInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableAddressTransfer", params, optFns, c.addOperationDisableAddressTransferMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableAddressTransferOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableAddressTransferInput struct { - - // The allocation ID of an Elastic IP address. - // - // This member is required. - AllocationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableAddressTransferOutput struct { - - // An Elastic IP address transfer. - AddressTransfer *types.AddressTransfer - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableAddressTransferMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableAddressTransfer{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableAddressTransfer{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableAddressTransfer"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableAddressTransferValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableAddressTransfer(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableAddressTransfer(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableAddressTransfer", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go deleted file mode 100644 index 96ebed8b3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableAwsNetworkPerformanceMetricSubscription.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables Infrastructure Performance metric subscriptions. -func (c *Client) DisableAwsNetworkPerformanceMetricSubscription(ctx context.Context, params *DisableAwsNetworkPerformanceMetricSubscriptionInput, optFns ...func(*Options)) (*DisableAwsNetworkPerformanceMetricSubscriptionOutput, error) { - if params == nil { - params = &DisableAwsNetworkPerformanceMetricSubscriptionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableAwsNetworkPerformanceMetricSubscription", params, optFns, c.addOperationDisableAwsNetworkPerformanceMetricSubscriptionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableAwsNetworkPerformanceMetricSubscriptionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableAwsNetworkPerformanceMetricSubscriptionInput struct { - - // The target Region or Availability Zone that the metric subscription is disabled - // for. For example, eu-north-1 . - Destination *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The metric used for the disabled subscription. - Metric types.MetricType - - // The source Region or Availability Zone that the metric subscription is disabled - // for. For example, us-east-1 . - Source *string - - // The statistic used for the disabled subscription. - Statistic types.StatisticType - - noSmithyDocumentSerde -} - -type DisableAwsNetworkPerformanceMetricSubscriptionOutput struct { - - // Indicates whether the unsubscribe action was successful. - Output *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableAwsNetworkPerformanceMetricSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableAwsNetworkPerformanceMetricSubscription{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableAwsNetworkPerformanceMetricSubscription{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableAwsNetworkPerformanceMetricSubscription"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableAwsNetworkPerformanceMetricSubscription(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableAwsNetworkPerformanceMetricSubscription(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableAwsNetworkPerformanceMetricSubscription", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableEbsEncryptionByDefault.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableEbsEncryptionByDefault.go deleted file mode 100644 index 5ea0b194c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableEbsEncryptionByDefault.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables EBS encryption by default for your account in the current Region. -// After you disable encryption by default, you can still create encrypted volumes -// by enabling encryption when you create each volume. Disabling encryption by -// default does not change the encryption status of your existing volumes. For more -// information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) DisableEbsEncryptionByDefault(ctx context.Context, params *DisableEbsEncryptionByDefaultInput, optFns ...func(*Options)) (*DisableEbsEncryptionByDefaultOutput, error) { - if params == nil { - params = &DisableEbsEncryptionByDefaultInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableEbsEncryptionByDefault", params, optFns, c.addOperationDisableEbsEncryptionByDefaultMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableEbsEncryptionByDefaultOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableEbsEncryptionByDefaultInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableEbsEncryptionByDefaultOutput struct { - - // The updated status of encryption by default. - EbsEncryptionByDefault *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableEbsEncryptionByDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableEbsEncryptionByDefault{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableEbsEncryptionByDefault{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableEbsEncryptionByDefault"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableEbsEncryptionByDefault(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableEbsEncryptionByDefault(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableEbsEncryptionByDefault", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastLaunch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastLaunch.go deleted file mode 100644 index c609e0022..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastLaunch.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Discontinue Windows fast launch for a Windows AMI, and clean up existing -// pre-provisioned snapshots. After you disable Windows fast launch, the AMI uses -// the standard launch process for each new instance. Amazon EC2 must remove all -// pre-provisioned snapshots before you can enable Windows fast launch again. You -// can only change these settings for Windows AMIs that you own or that have been -// shared with you. -func (c *Client) DisableFastLaunch(ctx context.Context, params *DisableFastLaunchInput, optFns ...func(*Options)) (*DisableFastLaunchOutput, error) { - if params == nil { - params = &DisableFastLaunchInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableFastLaunch", params, optFns, c.addOperationDisableFastLaunchMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableFastLaunchOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableFastLaunchInput struct { - - // Specify the ID of the image for which to disable Windows fast launch. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Forces the image settings to turn off Windows fast launch for your Windows AMI. - // This parameter overrides any errors that are encountered while cleaning up - // resources in your account. - Force *bool - - noSmithyDocumentSerde -} - -type DisableFastLaunchOutput struct { - - // The ID of the image for which Windows fast launch was disabled. - ImageId *string - - // The launch template that was used to launch Windows instances from - // pre-provisioned snapshots. - LaunchTemplate *types.FastLaunchLaunchTemplateSpecificationResponse - - // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows fast launch. - MaxParallelLaunches *int32 - - // The owner of the Windows AMI for which Windows fast launch was disabled. - OwnerId *string - - // The pre-provisioning resource type that must be cleaned after turning off - // Windows fast launch for the Windows AMI. Supported values include: snapshot . - ResourceType types.FastLaunchResourceType - - // Parameters that were used for Windows fast launch for the Windows AMI before - // Windows fast launch was disabled. This informs the clean-up process. - SnapshotConfiguration *types.FastLaunchSnapshotConfigurationResponse - - // The current state of Windows fast launch for the specified Windows AMI. - State types.FastLaunchStateCode - - // The reason that the state changed for Windows fast launch for the Windows AMI. - StateTransitionReason *string - - // The time that the state changed for Windows fast launch for the Windows AMI. - StateTransitionTime *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableFastLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableFastLaunch{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableFastLaunch{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableFastLaunch"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableFastLaunchValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableFastLaunch(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableFastLaunch(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableFastLaunch", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastSnapshotRestores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastSnapshotRestores.go deleted file mode 100644 index 75038eb1c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableFastSnapshotRestores.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables fast snapshot restores for the specified snapshots in the specified -// Availability Zones. -func (c *Client) DisableFastSnapshotRestores(ctx context.Context, params *DisableFastSnapshotRestoresInput, optFns ...func(*Options)) (*DisableFastSnapshotRestoresOutput, error) { - if params == nil { - params = &DisableFastSnapshotRestoresInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableFastSnapshotRestores", params, optFns, c.addOperationDisableFastSnapshotRestoresMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableFastSnapshotRestoresOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableFastSnapshotRestoresInput struct { - - // One or more Availability Zones. For example, us-east-2a . - // - // This member is required. - AvailabilityZones []string - - // The IDs of one or more snapshots. For example, snap-1234567890abcdef0 . - // - // This member is required. - SourceSnapshotIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableFastSnapshotRestoresOutput struct { - - // Information about the snapshots for which fast snapshot restores were - // successfully disabled. - Successful []types.DisableFastSnapshotRestoreSuccessItem - - // Information about the snapshots for which fast snapshot restores could not be - // disabled. - Unsuccessful []types.DisableFastSnapshotRestoreErrorItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableFastSnapshotRestoresMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableFastSnapshotRestores{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableFastSnapshotRestores{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableFastSnapshotRestores"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableFastSnapshotRestoresValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableFastSnapshotRestores(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableFastSnapshotRestores", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImage.go deleted file mode 100644 index a5d65c5f9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImage.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Sets the AMI state to disabled and removes all launch permissions from the AMI. -// A disabled AMI can't be used for instance launches. A disabled AMI can't be -// shared. If an AMI was public or previously shared, it is made private. If an AMI -// was shared with an Amazon Web Services account, organization, or Organizational -// Unit, they lose access to the disabled AMI. A disabled AMI does not appear in -// DescribeImages (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) -// API calls by default. Only the AMI owner can disable an AMI. You can re-enable a -// disabled AMI using EnableImage (http://amazonaws.com/AWSEC2/latest/APIReference/API_EnableImage.html) -// . For more information, see Disable an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/disable-an-ami.html) -// in the Amazon EC2 User Guide. -func (c *Client) DisableImage(ctx context.Context, params *DisableImageInput, optFns ...func(*Options)) (*DisableImageOutput, error) { - if params == nil { - params = &DisableImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableImage", params, optFns, c.addOperationDisableImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableImageInput struct { - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableImageOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go deleted file mode 100644 index 1cb265ddd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageBlockPublicAccess.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables block public access for AMIs at the account level in the specified -// Amazon Web Services Region. This removes the block public access restriction -// from your account. With the restriction removed, you can publicly share your -// AMIs in the specified Amazon Web Services Region. The API can take up to 10 -// minutes to configure this setting. During this time, if you run -// GetImageBlockPublicAccessState (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html) -// , the response will be block-new-sharing . When the API has completed the -// configuration, the response will be unblocked . For more information, see Block -// public access to your AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis) -// in the Amazon EC2 User Guide. -func (c *Client) DisableImageBlockPublicAccess(ctx context.Context, params *DisableImageBlockPublicAccessInput, optFns ...func(*Options)) (*DisableImageBlockPublicAccessOutput, error) { - if params == nil { - params = &DisableImageBlockPublicAccessInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableImageBlockPublicAccess", params, optFns, c.addOperationDisableImageBlockPublicAccessMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableImageBlockPublicAccessOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableImageBlockPublicAccessInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableImageBlockPublicAccessOutput struct { - - // Returns unblocked if the request succeeds; otherwise, it returns an error. - ImageBlockPublicAccessState types.ImageBlockPublicAccessDisabledState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableImageBlockPublicAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableImageBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableImageBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableImageBlockPublicAccess"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableImageBlockPublicAccess(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableImageBlockPublicAccess(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableImageBlockPublicAccess", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go deleted file mode 100644 index dddd47e87..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableImageDeprecation.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels the deprecation of the specified AMI. For more information, see -// Deprecate an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html) -// in the Amazon EC2 User Guide. -func (c *Client) DisableImageDeprecation(ctx context.Context, params *DisableImageDeprecationInput, optFns ...func(*Options)) (*DisableImageDeprecationOutput, error) { - if params == nil { - params = &DisableImageDeprecationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableImageDeprecation", params, optFns, c.addOperationDisableImageDeprecationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableImageDeprecationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableImageDeprecationInput struct { - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableImageDeprecationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableImageDeprecationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableImageDeprecation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableImageDeprecation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableImageDeprecation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableImageDeprecationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableImageDeprecation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableImageDeprecation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableImageDeprecation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go deleted file mode 100644 index 942220d1d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableIpamOrganizationAdminAccount.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disable the IPAM account. For more information, see Enable integration with -// Organizations (https://docs.aws.amazon.com/vpc/latest/ipam/enable-integ-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) DisableIpamOrganizationAdminAccount(ctx context.Context, params *DisableIpamOrganizationAdminAccountInput, optFns ...func(*Options)) (*DisableIpamOrganizationAdminAccountOutput, error) { - if params == nil { - params = &DisableIpamOrganizationAdminAccountInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableIpamOrganizationAdminAccount", params, optFns, c.addOperationDisableIpamOrganizationAdminAccountMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableIpamOrganizationAdminAccountOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableIpamOrganizationAdminAccountInput struct { - - // The Organizations member account ID that you want to disable as IPAM account. - // - // This member is required. - DelegatedAdminAccountId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableIpamOrganizationAdminAccountOutput struct { - - // The result of disabling the IPAM account. - Success *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableIpamOrganizationAdminAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableIpamOrganizationAdminAccount{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableIpamOrganizationAdminAccount{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableIpamOrganizationAdminAccount"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableIpamOrganizationAdminAccountValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableIpamOrganizationAdminAccount(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableIpamOrganizationAdminAccount(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableIpamOrganizationAdminAccount", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSerialConsoleAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSerialConsoleAccess.go deleted file mode 100644 index 2d43c7587..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSerialConsoleAccess.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables access to the EC2 serial console of all instances for your account. By -// default, access to the EC2 serial console is disabled for your account. For more -// information, see Manage account access to the EC2 serial console (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access) -// in the Amazon EC2 User Guide. -func (c *Client) DisableSerialConsoleAccess(ctx context.Context, params *DisableSerialConsoleAccessInput, optFns ...func(*Options)) (*DisableSerialConsoleAccessOutput, error) { - if params == nil { - params = &DisableSerialConsoleAccessInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableSerialConsoleAccess", params, optFns, c.addOperationDisableSerialConsoleAccessMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableSerialConsoleAccessOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableSerialConsoleAccessInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableSerialConsoleAccessOutput struct { - - // If true , access to the EC2 serial console of all instances is enabled for your - // account. If false , access to the EC2 serial console of all instances is - // disabled for your account. - SerialConsoleAccessEnabled *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableSerialConsoleAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableSerialConsoleAccess{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableSerialConsoleAccess{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableSerialConsoleAccess"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSerialConsoleAccess(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableSerialConsoleAccess(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableSerialConsoleAccess", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go deleted file mode 100644 index 5ceadadb3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableSnapshotBlockPublicAccess.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables the block public access for snapshots setting at the account level for -// the specified Amazon Web Services Region. After you disable block public access -// for snapshots in a Region, users can publicly share snapshots in that Region. If -// block public access is enabled in block-all-sharing mode, and you disable block -// public access, all snapshots that were previously publicly shared are no longer -// treated as private and they become publicly accessible again. For more -// information, see Block public access for snapshots (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-snapshots.html) -// in the Amazon Elastic Compute Cloud User Guide . -func (c *Client) DisableSnapshotBlockPublicAccess(ctx context.Context, params *DisableSnapshotBlockPublicAccessInput, optFns ...func(*Options)) (*DisableSnapshotBlockPublicAccessOutput, error) { - if params == nil { - params = &DisableSnapshotBlockPublicAccessInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableSnapshotBlockPublicAccess", params, optFns, c.addOperationDisableSnapshotBlockPublicAccessMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableSnapshotBlockPublicAccessOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableSnapshotBlockPublicAccessInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableSnapshotBlockPublicAccessOutput struct { - - // Returns unblocked if the request succeeds. - State types.SnapshotBlockPublicAccessState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableSnapshotBlockPublicAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableSnapshotBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableSnapshotBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableSnapshotBlockPublicAccess"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableSnapshotBlockPublicAccess(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableSnapshotBlockPublicAccess(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableSnapshotBlockPublicAccess", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go deleted file mode 100644 index fd1b6858d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableTransitGatewayRouteTablePropagation.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables the specified resource attachment from propagating routes to the -// specified propagation route table. -func (c *Client) DisableTransitGatewayRouteTablePropagation(ctx context.Context, params *DisableTransitGatewayRouteTablePropagationInput, optFns ...func(*Options)) (*DisableTransitGatewayRouteTablePropagationOutput, error) { - if params == nil { - params = &DisableTransitGatewayRouteTablePropagationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableTransitGatewayRouteTablePropagation", params, optFns, c.addOperationDisableTransitGatewayRouteTablePropagationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableTransitGatewayRouteTablePropagationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableTransitGatewayRouteTablePropagationInput struct { - - // The ID of the propagation route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the route table announcement. - TransitGatewayRouteTableAnnouncementId *string - - noSmithyDocumentSerde -} - -type DisableTransitGatewayRouteTablePropagationOutput struct { - - // Information about route propagation. - Propagation *types.TransitGatewayPropagation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableTransitGatewayRouteTablePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableTransitGatewayRouteTablePropagation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableTransitGatewayRouteTablePropagationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableTransitGatewayRouteTablePropagation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableTransitGatewayRouteTablePropagation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableTransitGatewayRouteTablePropagation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVgwRoutePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVgwRoutePropagation.go deleted file mode 100644 index 141f71978..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVgwRoutePropagation.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables a virtual private gateway (VGW) from propagating routes to a specified -// route table of a VPC. -func (c *Client) DisableVgwRoutePropagation(ctx context.Context, params *DisableVgwRoutePropagationInput, optFns ...func(*Options)) (*DisableVgwRoutePropagationOutput, error) { - if params == nil { - params = &DisableVgwRoutePropagationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableVgwRoutePropagation", params, optFns, c.addOperationDisableVgwRoutePropagationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableVgwRoutePropagationOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for DisableVgwRoutePropagation. -type DisableVgwRoutePropagationInput struct { - - // The ID of the virtual private gateway. - // - // This member is required. - GatewayId *string - - // The ID of the route table. - // - // This member is required. - RouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableVgwRoutePropagationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableVgwRoutePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableVgwRoutePropagation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableVgwRoutePropagation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableVgwRoutePropagation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableVgwRoutePropagationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableVgwRoutePropagation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableVgwRoutePropagation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableVgwRoutePropagation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLink.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLink.go deleted file mode 100644 index fd4c35da2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLink.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Disables ClassicLink for a VPC. You cannot disable -// ClassicLink for a VPC that has EC2-Classic instances linked to it. -func (c *Client) DisableVpcClassicLink(ctx context.Context, params *DisableVpcClassicLinkInput, optFns ...func(*Options)) (*DisableVpcClassicLinkOutput, error) { - if params == nil { - params = &DisableVpcClassicLinkInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableVpcClassicLink", params, optFns, c.addOperationDisableVpcClassicLinkMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableVpcClassicLinkOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableVpcClassicLinkInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisableVpcClassicLinkOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableVpcClassicLinkMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableVpcClassicLink{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableVpcClassicLink{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableVpcClassicLink"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisableVpcClassicLinkValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableVpcClassicLink(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableVpcClassicLink(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableVpcClassicLink", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go deleted file mode 100644 index ef3552024..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisableVpcClassicLinkDnsSupport.go +++ /dev/null @@ -1,133 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Disables ClassicLink DNS support for a VPC. If -// disabled, DNS hostnames resolve to public IP addresses when addressed between a -// linked EC2-Classic instance and instances in the VPC to which it's linked. You -// must specify a VPC ID in the request. -func (c *Client) DisableVpcClassicLinkDnsSupport(ctx context.Context, params *DisableVpcClassicLinkDnsSupportInput, optFns ...func(*Options)) (*DisableVpcClassicLinkDnsSupportOutput, error) { - if params == nil { - params = &DisableVpcClassicLinkDnsSupportInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableVpcClassicLinkDnsSupport", params, optFns, c.addOperationDisableVpcClassicLinkDnsSupportMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableVpcClassicLinkDnsSupportOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableVpcClassicLinkDnsSupportInput struct { - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -type DisableVpcClassicLinkDnsSupportOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableVpcClassicLinkDnsSupportMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableVpcClassicLinkDnsSupport"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableVpcClassicLinkDnsSupport(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableVpcClassicLinkDnsSupport", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateAddress.go deleted file mode 100644 index 9adebab20..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateAddress.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates an Elastic IP address from the instance or network interface it's -// associated with. This is an idempotent operation. If you perform the operation -// more than once, Amazon EC2 doesn't return an error. -func (c *Client) DisassociateAddress(ctx context.Context, params *DisassociateAddressInput, optFns ...func(*Options)) (*DisassociateAddressOutput, error) { - if params == nil { - params = &DisassociateAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateAddress", params, optFns, c.addOperationDisassociateAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateAddressInput struct { - - // The association ID. This parameter is required. - AssociationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Deprecated. - PublicIp *string - - noSmithyDocumentSerde -} - -type DisassociateAddressOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go deleted file mode 100644 index c13ab711d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateClientVpnTargetNetwork.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates a target network from the specified Client VPN endpoint. When you -// disassociate the last target network from a Client VPN, the following happens: -// - The route that was automatically added for the VPC is deleted -// - All active client connections are terminated -// - New client connections are disallowed -// - The Client VPN endpoint's status changes to pending-associate -func (c *Client) DisassociateClientVpnTargetNetwork(ctx context.Context, params *DisassociateClientVpnTargetNetworkInput, optFns ...func(*Options)) (*DisassociateClientVpnTargetNetworkOutput, error) { - if params == nil { - params = &DisassociateClientVpnTargetNetworkInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateClientVpnTargetNetwork", params, optFns, c.addOperationDisassociateClientVpnTargetNetworkMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateClientVpnTargetNetworkOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateClientVpnTargetNetworkInput struct { - - // The ID of the target network association. - // - // This member is required. - AssociationId *string - - // The ID of the Client VPN endpoint from which to disassociate the target network. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateClientVpnTargetNetworkOutput struct { - - // The ID of the target network association. - AssociationId *string - - // The current state of the target network association. - Status *types.AssociationStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateClientVpnTargetNetworkMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateClientVpnTargetNetwork{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateClientVpnTargetNetwork"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateClientVpnTargetNetworkValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateClientVpnTargetNetwork(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateClientVpnTargetNetwork(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateClientVpnTargetNetwork", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go deleted file mode 100644 index e49ce6cb6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateEnclaveCertificateIamRole.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates an IAM role from an Certificate Manager (ACM) certificate. -// Disassociating an IAM role from an ACM certificate removes the Amazon S3 object -// that contains the certificate, certificate chain, and encrypted private key from -// the Amazon S3 bucket. It also revokes the IAM role's permission to use the KMS -// key used to encrypt the private key. This effectively revokes the role's -// permission to use the certificate. -func (c *Client) DisassociateEnclaveCertificateIamRole(ctx context.Context, params *DisassociateEnclaveCertificateIamRoleInput, optFns ...func(*Options)) (*DisassociateEnclaveCertificateIamRoleOutput, error) { - if params == nil { - params = &DisassociateEnclaveCertificateIamRoleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateEnclaveCertificateIamRole", params, optFns, c.addOperationDisassociateEnclaveCertificateIamRoleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateEnclaveCertificateIamRoleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateEnclaveCertificateIamRoleInput struct { - - // The ARN of the ACM certificate from which to disassociate the IAM role. - // - // This member is required. - CertificateArn *string - - // The ARN of the IAM role to disassociate. - // - // This member is required. - RoleArn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateEnclaveCertificateIamRoleOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateEnclaveCertificateIamRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateEnclaveCertificateIamRole"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateEnclaveCertificateIamRoleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateEnclaveCertificateIamRole(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateEnclaveCertificateIamRole(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateEnclaveCertificateIamRole", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIamInstanceProfile.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIamInstanceProfile.go deleted file mode 100644 index 280747824..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIamInstanceProfile.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates an IAM instance profile from a running or stopped instance. Use -// DescribeIamInstanceProfileAssociations to get the association ID. -func (c *Client) DisassociateIamInstanceProfile(ctx context.Context, params *DisassociateIamInstanceProfileInput, optFns ...func(*Options)) (*DisassociateIamInstanceProfileOutput, error) { - if params == nil { - params = &DisassociateIamInstanceProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateIamInstanceProfile", params, optFns, c.addOperationDisassociateIamInstanceProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateIamInstanceProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateIamInstanceProfileInput struct { - - // The ID of the IAM instance profile association. - // - // This member is required. - AssociationId *string - - noSmithyDocumentSerde -} - -type DisassociateIamInstanceProfileOutput struct { - - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *types.IamInstanceProfileAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateIamInstanceProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateIamInstanceProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateIamInstanceProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateIamInstanceProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateIamInstanceProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateIamInstanceProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateIamInstanceProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateIamInstanceProfile", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateInstanceEventWindow.go deleted file mode 100644 index 822479a4a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateInstanceEventWindow.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates one or more targets from an event window. For more information, -// see Define event windows for scheduled events (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) -// in the Amazon EC2 User Guide. -func (c *Client) DisassociateInstanceEventWindow(ctx context.Context, params *DisassociateInstanceEventWindowInput, optFns ...func(*Options)) (*DisassociateInstanceEventWindowOutput, error) { - if params == nil { - params = &DisassociateInstanceEventWindowInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateInstanceEventWindow", params, optFns, c.addOperationDisassociateInstanceEventWindowMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateInstanceEventWindowOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateInstanceEventWindowInput struct { - - // One or more targets to disassociate from the specified event window. - // - // This member is required. - AssociationTarget *types.InstanceEventWindowDisassociationRequest - - // The ID of the event window. - // - // This member is required. - InstanceEventWindowId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateInstanceEventWindowOutput struct { - - // Information about the event window. - InstanceEventWindow *types.InstanceEventWindow - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateInstanceEventWindow"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateInstanceEventWindowValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateInstanceEventWindow(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateInstanceEventWindow", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIpamByoasn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIpamByoasn.go deleted file mode 100644 index bc474fef9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIpamByoasn.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Remove the association between your Autonomous System Number (ASN) and your -// BYOIP CIDR. You may want to use this action to disassociate an ASN from a CIDR -// or if you want to swap ASNs. For more information, see Tutorial: Bring your ASN -// to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html) in -// the Amazon VPC IPAM guide. -func (c *Client) DisassociateIpamByoasn(ctx context.Context, params *DisassociateIpamByoasnInput, optFns ...func(*Options)) (*DisassociateIpamByoasnOutput, error) { - if params == nil { - params = &DisassociateIpamByoasnInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateIpamByoasn", params, optFns, c.addOperationDisassociateIpamByoasnMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateIpamByoasnOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateIpamByoasnInput struct { - - // A public 2-byte or 4-byte ASN. - // - // This member is required. - Asn *string - - // A BYOIP CIDR. - // - // This member is required. - Cidr *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateIpamByoasnOutput struct { - - // An ASN and BYOIP CIDR association. - AsnAssociation *types.AsnAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateIpamByoasnMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateIpamByoasn{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateIpamByoasn{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateIpamByoasn"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateIpamByoasnValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateIpamByoasn(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateIpamByoasn(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateIpamByoasn", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIpamResourceDiscovery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIpamResourceDiscovery.go deleted file mode 100644 index ac15c8ee8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateIpamResourceDiscovery.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates a resource discovery from an Amazon VPC IPAM. A resource -// discovery is an IPAM component that enables IPAM to manage and monitor resources -// that belong to the owning account. -func (c *Client) DisassociateIpamResourceDiscovery(ctx context.Context, params *DisassociateIpamResourceDiscoveryInput, optFns ...func(*Options)) (*DisassociateIpamResourceDiscoveryOutput, error) { - if params == nil { - params = &DisassociateIpamResourceDiscoveryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateIpamResourceDiscovery", params, optFns, c.addOperationDisassociateIpamResourceDiscoveryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateIpamResourceDiscoveryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateIpamResourceDiscoveryInput struct { - - // A resource discovery association ID. - // - // This member is required. - IpamResourceDiscoveryAssociationId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateIpamResourceDiscoveryOutput struct { - - // A resource discovery association. - IpamResourceDiscoveryAssociation *types.IpamResourceDiscoveryAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateIpamResourceDiscoveryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateIpamResourceDiscovery"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateIpamResourceDiscoveryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateIpamResourceDiscovery(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateIpamResourceDiscovery(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateIpamResourceDiscovery", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go deleted file mode 100644 index 841b9c4a7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateNatGatewayAddress.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates secondary Elastic IP addresses (EIPs) from a public NAT gateway. -// You cannot disassociate your primary EIP. For more information, see Edit -// secondary IP address associations (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-edit-secondary) -// in the Amazon VPC User Guide. While disassociating is in progress, you cannot -// associate/disassociate additional EIPs while the connections are being drained. -// You are, however, allowed to delete the NAT gateway. An EIP is released only at -// the end of MaxDrainDurationSeconds. It stays associated and supports the -// existing connections but does not support any new connections (new connections -// are distributed across the remaining associated EIPs). As the existing -// connections drain out, the EIPs (and the corresponding private IP addresses -// mapped to them) are released. -func (c *Client) DisassociateNatGatewayAddress(ctx context.Context, params *DisassociateNatGatewayAddressInput, optFns ...func(*Options)) (*DisassociateNatGatewayAddressOutput, error) { - if params == nil { - params = &DisassociateNatGatewayAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateNatGatewayAddress", params, optFns, c.addOperationDisassociateNatGatewayAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateNatGatewayAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateNatGatewayAddressInput struct { - - // The association IDs of EIPs that have been associated with the NAT gateway. - // - // This member is required. - AssociationIds []string - - // The ID of the NAT gateway. - // - // This member is required. - NatGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum amount of time to wait (in seconds) before forcibly releasing the - // IP addresses if connections are still in progress. Default value is 350 seconds. - MaxDrainDurationSeconds *int32 - - noSmithyDocumentSerde -} - -type DisassociateNatGatewayAddressOutput struct { - - // Information about the NAT gateway IP addresses. - NatGatewayAddresses []types.NatGatewayAddress - - // The ID of the NAT gateway. - NatGatewayId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateNatGatewayAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateNatGatewayAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateNatGatewayAddressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateNatGatewayAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateNatGatewayAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateNatGatewayAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateRouteTable.go deleted file mode 100644 index 70bca6c38..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateRouteTable.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates a subnet or gateway from a route table. After you perform this -// action, the subnet no longer uses the routes in the route table. Instead, it -// uses the routes in the VPC's main route table. For more information about route -// tables, see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. -func (c *Client) DisassociateRouteTable(ctx context.Context, params *DisassociateRouteTableInput, optFns ...func(*Options)) (*DisassociateRouteTableOutput, error) { - if params == nil { - params = &DisassociateRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateRouteTable", params, optFns, c.addOperationDisassociateRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateRouteTableInput struct { - - // The association ID representing the current association between the route table - // and subnet or gateway. - // - // This member is required. - AssociationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateRouteTableOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateSubnetCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateSubnetCidrBlock.go deleted file mode 100644 index 1d85b1f44..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateSubnetCidrBlock.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates a CIDR block from a subnet. Currently, you can disassociate an -// IPv6 CIDR block only. You must detach or delete all gateways and resources that -// are associated with the CIDR block before you can disassociate it. -func (c *Client) DisassociateSubnetCidrBlock(ctx context.Context, params *DisassociateSubnetCidrBlockInput, optFns ...func(*Options)) (*DisassociateSubnetCidrBlockOutput, error) { - if params == nil { - params = &DisassociateSubnetCidrBlockInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateSubnetCidrBlock", params, optFns, c.addOperationDisassociateSubnetCidrBlockMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateSubnetCidrBlockOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateSubnetCidrBlockInput struct { - - // The association ID for the CIDR block. - // - // This member is required. - AssociationId *string - - noSmithyDocumentSerde -} - -type DisassociateSubnetCidrBlockOutput struct { - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *types.SubnetIpv6CidrBlockAssociation - - // The ID of the subnet. - SubnetId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateSubnetCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateSubnetCidrBlock{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateSubnetCidrBlock{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateSubnetCidrBlock"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateSubnetCidrBlockValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateSubnetCidrBlock(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateSubnetCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateSubnetCidrBlock", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go deleted file mode 100644 index 8f835ba92..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayMulticastDomain.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates the specified subnets from the transit gateway multicast domain. -func (c *Client) DisassociateTransitGatewayMulticastDomain(ctx context.Context, params *DisassociateTransitGatewayMulticastDomainInput, optFns ...func(*Options)) (*DisassociateTransitGatewayMulticastDomainOutput, error) { - if params == nil { - params = &DisassociateTransitGatewayMulticastDomainInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateTransitGatewayMulticastDomain", params, optFns, c.addOperationDisassociateTransitGatewayMulticastDomainMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateTransitGatewayMulticastDomainOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateTransitGatewayMulticastDomainInput struct { - - // The IDs of the subnets; - // - // This member is required. - SubnetIds []string - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateTransitGatewayMulticastDomainOutput struct { - - // Information about the association. - Associations *types.TransitGatewayMulticastDomainAssociations - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateTransitGatewayMulticastDomainMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateTransitGatewayMulticastDomain"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateTransitGatewayMulticastDomainValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTransitGatewayMulticastDomain(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateTransitGatewayMulticastDomain(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateTransitGatewayMulticastDomain", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go deleted file mode 100644 index 1be6e9289..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayPolicyTable.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes the association between an an attachment and a policy table. -func (c *Client) DisassociateTransitGatewayPolicyTable(ctx context.Context, params *DisassociateTransitGatewayPolicyTableInput, optFns ...func(*Options)) (*DisassociateTransitGatewayPolicyTableOutput, error) { - if params == nil { - params = &DisassociateTransitGatewayPolicyTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateTransitGatewayPolicyTable", params, optFns, c.addOperationDisassociateTransitGatewayPolicyTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateTransitGatewayPolicyTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateTransitGatewayPolicyTableInput struct { - - // The ID of the transit gateway attachment to disassociate from the policy table. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The ID of the disassociated policy table. - // - // This member is required. - TransitGatewayPolicyTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateTransitGatewayPolicyTableOutput struct { - - // Returns details about the transit gateway policy table disassociation. - Association *types.TransitGatewayPolicyTableAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateTransitGatewayPolicyTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateTransitGatewayPolicyTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateTransitGatewayPolicyTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTransitGatewayPolicyTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateTransitGatewayPolicyTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateTransitGatewayPolicyTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go deleted file mode 100644 index 6529504e8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTransitGatewayRouteTable.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates a resource attachment from a transit gateway route table. -func (c *Client) DisassociateTransitGatewayRouteTable(ctx context.Context, params *DisassociateTransitGatewayRouteTableInput, optFns ...func(*Options)) (*DisassociateTransitGatewayRouteTableOutput, error) { - if params == nil { - params = &DisassociateTransitGatewayRouteTableInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateTransitGatewayRouteTable", params, optFns, c.addOperationDisassociateTransitGatewayRouteTableMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateTransitGatewayRouteTableOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateTransitGatewayRouteTableInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateTransitGatewayRouteTableOutput struct { - - // Information about the association. - Association *types.TransitGatewayAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateTransitGatewayRouteTableMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateTransitGatewayRouteTable"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateTransitGatewayRouteTableValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTransitGatewayRouteTable(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateTransitGatewayRouteTable(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateTransitGatewayRouteTable", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTrunkInterface.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTrunkInterface.go deleted file mode 100644 index 0d00eaea1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateTrunkInterface.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes an association between a branch network interface with a trunk network -// interface. -func (c *Client) DisassociateTrunkInterface(ctx context.Context, params *DisassociateTrunkInterfaceInput, optFns ...func(*Options)) (*DisassociateTrunkInterfaceOutput, error) { - if params == nil { - params = &DisassociateTrunkInterfaceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateTrunkInterface", params, optFns, c.addOperationDisassociateTrunkInterfaceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateTrunkInterfaceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateTrunkInterfaceInput struct { - - // The ID of the association - // - // This member is required. - AssociationId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type DisassociateTrunkInterfaceOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateTrunkInterfaceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateTrunkInterface{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateTrunkInterface{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateTrunkInterface"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opDisassociateTrunkInterfaceMiddleware(stack, options); err != nil { - return err - } - if err = addOpDisassociateTrunkInterfaceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTrunkInterface(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpDisassociateTrunkInterface struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpDisassociateTrunkInterface) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpDisassociateTrunkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*DisassociateTrunkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *DisassociateTrunkInterfaceInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opDisassociateTrunkInterfaceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpDisassociateTrunkInterface{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opDisassociateTrunkInterface(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateTrunkInterface", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateVpcCidrBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateVpcCidrBlock.go deleted file mode 100644 index cf5eff002..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_DisassociateVpcCidrBlock.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates a CIDR block from a VPC. To disassociate the CIDR block, you must -// specify its association ID. You can get the association ID by using DescribeVpcs -// . You must detach or delete all gateways and resources that are associated with -// the CIDR block before you can disassociate it. You cannot disassociate the CIDR -// block with which you originally created the VPC (the primary CIDR block). -func (c *Client) DisassociateVpcCidrBlock(ctx context.Context, params *DisassociateVpcCidrBlockInput, optFns ...func(*Options)) (*DisassociateVpcCidrBlockOutput, error) { - if params == nil { - params = &DisassociateVpcCidrBlockInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateVpcCidrBlock", params, optFns, c.addOperationDisassociateVpcCidrBlockMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateVpcCidrBlockOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateVpcCidrBlockInput struct { - - // The association ID for the CIDR block. - // - // This member is required. - AssociationId *string - - noSmithyDocumentSerde -} - -type DisassociateVpcCidrBlockOutput struct { - - // Information about the IPv4 CIDR block association. - CidrBlockAssociation *types.VpcCidrBlockAssociation - - // Information about the IPv6 CIDR block association. - Ipv6CidrBlockAssociation *types.VpcIpv6CidrBlockAssociation - - // The ID of the VPC. - VpcId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateVpcCidrBlockMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpDisassociateVpcCidrBlock{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpDisassociateVpcCidrBlock{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateVpcCidrBlock"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpDisassociateVpcCidrBlockValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateVpcCidrBlock(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateVpcCidrBlock(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateVpcCidrBlock", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableAddressTransfer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableAddressTransfer.go deleted file mode 100644 index 0a7ea99bd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableAddressTransfer.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables Elastic IP address transfer. For more information, see Transfer Elastic -// IP addresses (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) -// in the Amazon Virtual Private Cloud User Guide. -func (c *Client) EnableAddressTransfer(ctx context.Context, params *EnableAddressTransferInput, optFns ...func(*Options)) (*EnableAddressTransferOutput, error) { - if params == nil { - params = &EnableAddressTransferInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableAddressTransfer", params, optFns, c.addOperationEnableAddressTransferMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableAddressTransferOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableAddressTransferInput struct { - - // The allocation ID of an Elastic IP address. - // - // This member is required. - AllocationId *string - - // The ID of the account that you want to transfer the Elastic IP address to. - // - // This member is required. - TransferAccountId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableAddressTransferOutput struct { - - // An Elastic IP address transfer. - AddressTransfer *types.AddressTransfer - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableAddressTransferMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableAddressTransfer{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableAddressTransfer{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableAddressTransfer"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableAddressTransferValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAddressTransfer(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableAddressTransfer(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableAddressTransfer", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go deleted file mode 100644 index e678e7d91..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableAwsNetworkPerformanceMetricSubscription.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables Infrastructure Performance subscriptions. -func (c *Client) EnableAwsNetworkPerformanceMetricSubscription(ctx context.Context, params *EnableAwsNetworkPerformanceMetricSubscriptionInput, optFns ...func(*Options)) (*EnableAwsNetworkPerformanceMetricSubscriptionOutput, error) { - if params == nil { - params = &EnableAwsNetworkPerformanceMetricSubscriptionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableAwsNetworkPerformanceMetricSubscription", params, optFns, c.addOperationEnableAwsNetworkPerformanceMetricSubscriptionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableAwsNetworkPerformanceMetricSubscriptionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableAwsNetworkPerformanceMetricSubscriptionInput struct { - - // The target Region (like us-east-2 ) or Availability Zone ID (like use2-az2 ) - // that the metric subscription is enabled for. If you use Availability Zone IDs, - // the Source and Destination Availability Zones must be in the same Region. - Destination *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The metric used for the enabled subscription. - Metric types.MetricType - - // The source Region (like us-east-1 ) or Availability Zone ID (like use1-az1 ) - // that the metric subscription is enabled for. If you use Availability Zone IDs, - // the Source and Destination Availability Zones must be in the same Region. - Source *string - - // The statistic used for the enabled subscription. - Statistic types.StatisticType - - noSmithyDocumentSerde -} - -type EnableAwsNetworkPerformanceMetricSubscriptionOutput struct { - - // Indicates whether the subscribe action was successful. - Output *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableAwsNetworkPerformanceMetricSubscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableAwsNetworkPerformanceMetricSubscription{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableAwsNetworkPerformanceMetricSubscription"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableAwsNetworkPerformanceMetricSubscription(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableAwsNetworkPerformanceMetricSubscription(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableAwsNetworkPerformanceMetricSubscription", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableEbsEncryptionByDefault.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableEbsEncryptionByDefault.go deleted file mode 100644 index af0231ca1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableEbsEncryptionByDefault.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables EBS encryption by default for your account in the current Region. After -// you enable encryption by default, the EBS volumes that you create are always -// encrypted, either using the default KMS key or the KMS key that you specified -// when you created each volume. For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. You can specify the default KMS -// key for encryption by default using ModifyEbsDefaultKmsKeyId or -// ResetEbsDefaultKmsKeyId . Enabling encryption by default has no effect on the -// encryption status of your existing volumes. After you enable encryption by -// default, you can no longer launch instances using instance types that do not -// support encryption. For more information, see Supported instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances) -// . -func (c *Client) EnableEbsEncryptionByDefault(ctx context.Context, params *EnableEbsEncryptionByDefaultInput, optFns ...func(*Options)) (*EnableEbsEncryptionByDefaultOutput, error) { - if params == nil { - params = &EnableEbsEncryptionByDefaultInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableEbsEncryptionByDefault", params, optFns, c.addOperationEnableEbsEncryptionByDefaultMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableEbsEncryptionByDefaultOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableEbsEncryptionByDefaultInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableEbsEncryptionByDefaultOutput struct { - - // The updated status of encryption by default. - EbsEncryptionByDefault *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableEbsEncryptionByDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableEbsEncryptionByDefault{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableEbsEncryptionByDefault{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableEbsEncryptionByDefault"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableEbsEncryptionByDefault(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableEbsEncryptionByDefault(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableEbsEncryptionByDefault", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastLaunch.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastLaunch.go deleted file mode 100644 index 42e7472b1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastLaunch.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// When you enable Windows fast launch for a Windows AMI, images are -// pre-provisioned, using snapshots to launch instances up to 65% faster. To create -// the optimized Windows image, Amazon EC2 launches an instance and runs through -// Sysprep steps, rebooting as required. Then it creates a set of reserved -// snapshots that are used for subsequent launches. The reserved snapshots are -// automatically replenished as they are used, depending on your settings for -// launch frequency. You can only change these settings for Windows AMIs that you -// own or that have been shared with you. -func (c *Client) EnableFastLaunch(ctx context.Context, params *EnableFastLaunchInput, optFns ...func(*Options)) (*EnableFastLaunchOutput, error) { - if params == nil { - params = &EnableFastLaunchInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableFastLaunch", params, optFns, c.addOperationEnableFastLaunchMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableFastLaunchOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableFastLaunchInput struct { - - // Specify the ID of the image for which to enable Windows fast launch. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The launch template to use when launching Windows instances from - // pre-provisioned snapshots. Launch template parameters can include either the - // name or ID of the launch template, but not both. - LaunchTemplate *types.FastLaunchLaunchTemplateSpecificationRequest - - // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows fast launch. Value must be 6 or - // greater. - MaxParallelLaunches *int32 - - // The type of resource to use for pre-provisioning the AMI for Windows fast - // launch. Supported values include: snapshot , which is the default value. - ResourceType *string - - // Configuration settings for creating and managing the snapshots that are used - // for pre-provisioning the AMI for Windows fast launch. The associated - // ResourceType must be snapshot . - SnapshotConfiguration *types.FastLaunchSnapshotConfigurationRequest - - noSmithyDocumentSerde -} - -type EnableFastLaunchOutput struct { - - // The image ID that identifies the AMI for which Windows fast launch was enabled. - ImageId *string - - // The launch template that is used when launching Windows instances from - // pre-provisioned snapshots. - LaunchTemplate *types.FastLaunchLaunchTemplateSpecificationResponse - - // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows fast launch. - MaxParallelLaunches *int32 - - // The owner ID for the AMI for which Windows fast launch was enabled. - OwnerId *string - - // The type of resource that was defined for pre-provisioning the AMI for Windows - // fast launch. - ResourceType types.FastLaunchResourceType - - // Settings to create and manage the pre-provisioned snapshots that Amazon EC2 - // uses for faster launches from the Windows AMI. This property is returned when - // the associated resourceType is snapshot . - SnapshotConfiguration *types.FastLaunchSnapshotConfigurationResponse - - // The current state of Windows fast launch for the specified AMI. - State types.FastLaunchStateCode - - // The reason that the state changed for Windows fast launch for the AMI. - StateTransitionReason *string - - // The time that the state changed for Windows fast launch for the AMI. - StateTransitionTime *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableFastLaunchMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableFastLaunch{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableFastLaunch{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableFastLaunch"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableFastLaunchValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableFastLaunch(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableFastLaunch(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableFastLaunch", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastSnapshotRestores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastSnapshotRestores.go deleted file mode 100644 index 68801fb25..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableFastSnapshotRestores.go +++ /dev/null @@ -1,160 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables fast snapshot restores for the specified snapshots in the specified -// Availability Zones. You get the full benefit of fast snapshot restores after -// they enter the enabled state. To get the current state of fast snapshot -// restores, use DescribeFastSnapshotRestores . To disable fast snapshot restores, -// use DisableFastSnapshotRestores . For more information, see Amazon EBS fast -// snapshot restore (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-fast-snapshot-restore.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) EnableFastSnapshotRestores(ctx context.Context, params *EnableFastSnapshotRestoresInput, optFns ...func(*Options)) (*EnableFastSnapshotRestoresOutput, error) { - if params == nil { - params = &EnableFastSnapshotRestoresInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableFastSnapshotRestores", params, optFns, c.addOperationEnableFastSnapshotRestoresMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableFastSnapshotRestoresOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableFastSnapshotRestoresInput struct { - - // One or more Availability Zones. For example, us-east-2a . - // - // This member is required. - AvailabilityZones []string - - // The IDs of one or more snapshots. For example, snap-1234567890abcdef0 . You can - // specify a snapshot that was shared with you from another Amazon Web Services - // account. - // - // This member is required. - SourceSnapshotIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableFastSnapshotRestoresOutput struct { - - // Information about the snapshots for which fast snapshot restores were - // successfully enabled. - Successful []types.EnableFastSnapshotRestoreSuccessItem - - // Information about the snapshots for which fast snapshot restores could not be - // enabled. - Unsuccessful []types.EnableFastSnapshotRestoreErrorItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableFastSnapshotRestoresMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableFastSnapshotRestores{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableFastSnapshotRestores{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableFastSnapshotRestores"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableFastSnapshotRestoresValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableFastSnapshotRestores(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableFastSnapshotRestores(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableFastSnapshotRestores", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go deleted file mode 100644 index 6c04d73e5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImage.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Re-enables a disabled AMI. The re-enabled AMI is marked as available and can be -// used for instance launches, appears in describe operations, and can be shared. -// Amazon Web Services accounts, organizations, and Organizational Units that lost -// access to the AMI when it was disabled do not regain access automatically. Once -// the AMI is available, it can be shared with them again. Only the AMI owner can -// re-enable a disabled AMI. For more information, see Disable an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/disable-an-ami.html) -// in the Amazon EC2 User Guide. -func (c *Client) EnableImage(ctx context.Context, params *EnableImageInput, optFns ...func(*Options)) (*EnableImageOutput, error) { - if params == nil { - params = &EnableImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableImage", params, optFns, c.addOperationEnableImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableImageInput struct { - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableImageOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go deleted file mode 100644 index 459d5c2db..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageBlockPublicAccess.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables block public access for AMIs at the account level in the specified -// Amazon Web Services Region. This prevents the public sharing of your AMIs. -// However, if you already have public AMIs, they will remain publicly available. -// The API can take up to 10 minutes to configure this setting. During this time, -// if you run GetImageBlockPublicAccessState (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetImageBlockPublicAccessState.html) -// , the response will be unblocked . When the API has completed the configuration, -// the response will be block-new-sharing . For more information, see Block public -// access to your AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis) -// in the Amazon EC2 User Guide. -func (c *Client) EnableImageBlockPublicAccess(ctx context.Context, params *EnableImageBlockPublicAccessInput, optFns ...func(*Options)) (*EnableImageBlockPublicAccessOutput, error) { - if params == nil { - params = &EnableImageBlockPublicAccessInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableImageBlockPublicAccess", params, optFns, c.addOperationEnableImageBlockPublicAccessMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableImageBlockPublicAccessOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableImageBlockPublicAccessInput struct { - - // Specify block-new-sharing to enable block public access for AMIs at the account - // level in the specified Region. This will block any attempt to publicly share - // your AMIs in the specified Region. - // - // This member is required. - ImageBlockPublicAccessState types.ImageBlockPublicAccessEnabledState - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableImageBlockPublicAccessOutput struct { - - // Returns block-new-sharing if the request succeeds; otherwise, it returns an - // error. - ImageBlockPublicAccessState types.ImageBlockPublicAccessEnabledState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableImageBlockPublicAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableImageBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableImageBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableImageBlockPublicAccess"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableImageBlockPublicAccessValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableImageBlockPublicAccess(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableImageBlockPublicAccess(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableImageBlockPublicAccess", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeprecation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeprecation.go deleted file mode 100644 index c41535304..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableImageDeprecation.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Enables deprecation of the specified AMI at the specified date and time. For -// more information, see Deprecate an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html) -// in the Amazon EC2 User Guide. -func (c *Client) EnableImageDeprecation(ctx context.Context, params *EnableImageDeprecationInput, optFns ...func(*Options)) (*EnableImageDeprecationOutput, error) { - if params == nil { - params = &EnableImageDeprecationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableImageDeprecation", params, optFns, c.addOperationEnableImageDeprecationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableImageDeprecationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableImageDeprecationInput struct { - - // The date and time to deprecate the AMI, in UTC, in the following format: - // YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds the - // seconds to the nearest minute. You can’t specify a date in the past. The upper - // limit for DeprecateAt is 10 years from now, except for public AMIs, where the - // upper limit is 2 years from the creation date. - // - // This member is required. - DeprecateAt *time.Time - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableImageDeprecationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableImageDeprecationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableImageDeprecation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableImageDeprecation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableImageDeprecation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableImageDeprecationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableImageDeprecation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableImageDeprecation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableImageDeprecation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go deleted file mode 100644 index 34933eaae..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableIpamOrganizationAdminAccount.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enable an Organizations member account as the IPAM admin account. You cannot -// select the Organizations management account as the IPAM admin account. For more -// information, see Enable integration with Organizations (https://docs.aws.amazon.com/vpc/latest/ipam/enable-integ-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) EnableIpamOrganizationAdminAccount(ctx context.Context, params *EnableIpamOrganizationAdminAccountInput, optFns ...func(*Options)) (*EnableIpamOrganizationAdminAccountOutput, error) { - if params == nil { - params = &EnableIpamOrganizationAdminAccountInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableIpamOrganizationAdminAccount", params, optFns, c.addOperationEnableIpamOrganizationAdminAccountMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableIpamOrganizationAdminAccountOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableIpamOrganizationAdminAccountInput struct { - - // The Organizations member account ID that you want to enable as the IPAM account. - // - // This member is required. - DelegatedAdminAccountId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableIpamOrganizationAdminAccountOutput struct { - - // The result of enabling the IPAM account. - Success *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableIpamOrganizationAdminAccountMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableIpamOrganizationAdminAccount{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableIpamOrganizationAdminAccount"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableIpamOrganizationAdminAccountValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableIpamOrganizationAdminAccount(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableIpamOrganizationAdminAccount(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableIpamOrganizationAdminAccount", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go deleted file mode 100644 index def513a3f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableReachabilityAnalyzerOrganizationSharing.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Establishes a trust relationship between Reachability Analyzer and -// Organizations. This operation must be performed by the management account for -// the organization. After you establish a trust relationship, a user in the -// management account or a delegated administrator account can run a cross-account -// analysis using resources from the member accounts. -func (c *Client) EnableReachabilityAnalyzerOrganizationSharing(ctx context.Context, params *EnableReachabilityAnalyzerOrganizationSharingInput, optFns ...func(*Options)) (*EnableReachabilityAnalyzerOrganizationSharingOutput, error) { - if params == nil { - params = &EnableReachabilityAnalyzerOrganizationSharingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableReachabilityAnalyzerOrganizationSharing", params, optFns, c.addOperationEnableReachabilityAnalyzerOrganizationSharingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableReachabilityAnalyzerOrganizationSharingOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableReachabilityAnalyzerOrganizationSharingInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableReachabilityAnalyzerOrganizationSharingOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableReachabilityAnalyzerOrganizationSharingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableReachabilityAnalyzerOrganizationSharing{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableReachabilityAnalyzerOrganizationSharing"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableReachabilityAnalyzerOrganizationSharing(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableReachabilityAnalyzerOrganizationSharing(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableReachabilityAnalyzerOrganizationSharing", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSerialConsoleAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSerialConsoleAccess.go deleted file mode 100644 index 008fe6ee8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSerialConsoleAccess.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables access to the EC2 serial console of all instances for your account. By -// default, access to the EC2 serial console is disabled for your account. For more -// information, see Manage account access to the EC2 serial console (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access) -// in the Amazon EC2 User Guide. -func (c *Client) EnableSerialConsoleAccess(ctx context.Context, params *EnableSerialConsoleAccessInput, optFns ...func(*Options)) (*EnableSerialConsoleAccessOutput, error) { - if params == nil { - params = &EnableSerialConsoleAccessInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableSerialConsoleAccess", params, optFns, c.addOperationEnableSerialConsoleAccessMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableSerialConsoleAccessOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableSerialConsoleAccessInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableSerialConsoleAccessOutput struct { - - // If true , access to the EC2 serial console of all instances is enabled for your - // account. If false , access to the EC2 serial console of all instances is - // disabled for your account. - SerialConsoleAccessEnabled *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableSerialConsoleAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableSerialConsoleAccess{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableSerialConsoleAccess{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableSerialConsoleAccess"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSerialConsoleAccess(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableSerialConsoleAccess(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableSerialConsoleAccess", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go deleted file mode 100644 index c75e11090..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableSnapshotBlockPublicAccess.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables or modifies the block public access for snapshots setting at the -// account level for the specified Amazon Web Services Region. After you enable -// block public access for snapshots in a Region, users can no longer request -// public sharing for snapshots in that Region. Snapshots that are already publicly -// shared are either treated as private or they remain publicly shared, depending -// on the State that you specify. If block public access is enabled in -// block-all-sharing mode, and you change the mode to block-new-sharing , all -// snapshots that were previously publicly shared are no longer treated as private -// and they become publicly accessible again. For more information, see Block -// public access for snapshots (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-snapshots.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) EnableSnapshotBlockPublicAccess(ctx context.Context, params *EnableSnapshotBlockPublicAccessInput, optFns ...func(*Options)) (*EnableSnapshotBlockPublicAccessOutput, error) { - if params == nil { - params = &EnableSnapshotBlockPublicAccessInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableSnapshotBlockPublicAccess", params, optFns, c.addOperationEnableSnapshotBlockPublicAccessMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableSnapshotBlockPublicAccessOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableSnapshotBlockPublicAccessInput struct { - - // The mode in which to enable block public access for snapshots for the Region. - // Specify one of the following values: - // - block-all-sharing - Prevents all public sharing of snapshots in the Region. - // Users in the account will no longer be able to request new public sharing. - // Additionally, snapshots that are already publicly shared are treated as private - // and they are no longer publicly available. If you enable block public access for - // snapshots in block-all-sharing mode, it does not change the permissions for - // snapshots that are already publicly shared. Instead, it prevents these snapshots - // from be publicly visible and publicly accessible. Therefore, the attributes for - // these snapshots still indicate that they are publicly shared, even though they - // are not publicly available. - // - block-new-sharing - Prevents only new public sharing of snapshots in the - // Region. Users in the account will no longer be able to request new public - // sharing. However, snapshots that are already publicly shared, remain publicly - // available. - // unblocked is not a valid value for EnableSnapshotBlockPublicAccess. - // - // This member is required. - State types.SnapshotBlockPublicAccessState - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableSnapshotBlockPublicAccessOutput struct { - - // The state of block public access for snapshots for the account and Region. - // Returns either block-all-sharing or block-new-sharing if the request succeeds. - State types.SnapshotBlockPublicAccessState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableSnapshotBlockPublicAccessMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableSnapshotBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableSnapshotBlockPublicAccess"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableSnapshotBlockPublicAccessValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableSnapshotBlockPublicAccess(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableSnapshotBlockPublicAccess(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableSnapshotBlockPublicAccess", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go deleted file mode 100644 index 00a76ed4d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableTransitGatewayRouteTablePropagation.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables the specified attachment to propagate routes to the specified -// propagation route table. -func (c *Client) EnableTransitGatewayRouteTablePropagation(ctx context.Context, params *EnableTransitGatewayRouteTablePropagationInput, optFns ...func(*Options)) (*EnableTransitGatewayRouteTablePropagationOutput, error) { - if params == nil { - params = &EnableTransitGatewayRouteTablePropagationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableTransitGatewayRouteTablePropagation", params, optFns, c.addOperationEnableTransitGatewayRouteTablePropagationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableTransitGatewayRouteTablePropagationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableTransitGatewayRouteTablePropagationInput struct { - - // The ID of the propagation route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncementId *string - - noSmithyDocumentSerde -} - -type EnableTransitGatewayRouteTablePropagationOutput struct { - - // Information about route propagation. - Propagation *types.TransitGatewayPropagation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableTransitGatewayRouteTablePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableTransitGatewayRouteTablePropagation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableTransitGatewayRouteTablePropagationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableTransitGatewayRouteTablePropagation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableTransitGatewayRouteTablePropagation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableTransitGatewayRouteTablePropagation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVgwRoutePropagation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVgwRoutePropagation.go deleted file mode 100644 index f101e305f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVgwRoutePropagation.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables a virtual private gateway (VGW) to propagate routes to the specified -// route table of a VPC. -func (c *Client) EnableVgwRoutePropagation(ctx context.Context, params *EnableVgwRoutePropagationInput, optFns ...func(*Options)) (*EnableVgwRoutePropagationOutput, error) { - if params == nil { - params = &EnableVgwRoutePropagationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableVgwRoutePropagation", params, optFns, c.addOperationEnableVgwRoutePropagationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableVgwRoutePropagationOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for EnableVgwRoutePropagation. -type EnableVgwRoutePropagationInput struct { - - // The ID of the virtual private gateway that is attached to a VPC. The virtual - // private gateway must be attached to the same VPC that the routing tables are - // associated with. - // - // This member is required. - GatewayId *string - - // The ID of the route table. The routing table must be associated with the same - // VPC that the virtual private gateway is attached to. - // - // This member is required. - RouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableVgwRoutePropagationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableVgwRoutePropagationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVgwRoutePropagation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVgwRoutePropagation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableVgwRoutePropagation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableVgwRoutePropagationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVgwRoutePropagation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableVgwRoutePropagation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableVgwRoutePropagation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVolumeIO.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVolumeIO.go deleted file mode 100644 index 05a4082f2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVolumeIO.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables I/O operations for a volume that had I/O operations disabled because -// the data on the volume was potentially inconsistent. -func (c *Client) EnableVolumeIO(ctx context.Context, params *EnableVolumeIOInput, optFns ...func(*Options)) (*EnableVolumeIOOutput, error) { - if params == nil { - params = &EnableVolumeIOInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableVolumeIO", params, optFns, c.addOperationEnableVolumeIOMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableVolumeIOOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableVolumeIOInput struct { - - // The ID of the volume. - // - // This member is required. - VolumeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableVolumeIOOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableVolumeIOMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVolumeIO{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVolumeIO{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableVolumeIO"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableVolumeIOValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVolumeIO(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableVolumeIO(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableVolumeIO", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLink.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLink.go deleted file mode 100644 index 1695c6151..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLink.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Enables a VPC for ClassicLink. You can then link -// EC2-Classic instances to your ClassicLink-enabled VPC to allow communication -// over private IP addresses. You cannot enable your VPC for ClassicLink if any of -// your VPC route tables have existing routes for address ranges within the -// 10.0.0.0/8 IP address range, excluding local routes for VPCs in the 10.0.0.0/16 -// and 10.1.0.0/16 IP address ranges. -func (c *Client) EnableVpcClassicLink(ctx context.Context, params *EnableVpcClassicLinkInput, optFns ...func(*Options)) (*EnableVpcClassicLinkOutput, error) { - if params == nil { - params = &EnableVpcClassicLinkInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableVpcClassicLink", params, optFns, c.addOperationEnableVpcClassicLinkMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableVpcClassicLinkOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableVpcClassicLinkInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type EnableVpcClassicLinkOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableVpcClassicLinkMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVpcClassicLink{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVpcClassicLink{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableVpcClassicLink"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpEnableVpcClassicLinkValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVpcClassicLink(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableVpcClassicLink(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableVpcClassicLink", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go deleted file mode 100644 index 73b33346b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_EnableVpcClassicLinkDnsSupport.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Enables a VPC to support DNS hostname resolution for -// ClassicLink. If enabled, the DNS hostname of a linked EC2-Classic instance -// resolves to its private IP address when addressed from an instance in the VPC to -// which it's linked. Similarly, the DNS hostname of an instance in a VPC resolves -// to its private IP address when addressed from a linked EC2-Classic instance. You -// must specify a VPC ID in the request. -func (c *Client) EnableVpcClassicLinkDnsSupport(ctx context.Context, params *EnableVpcClassicLinkDnsSupportInput, optFns ...func(*Options)) (*EnableVpcClassicLinkDnsSupportOutput, error) { - if params == nil { - params = &EnableVpcClassicLinkDnsSupportInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableVpcClassicLinkDnsSupport", params, optFns, c.addOperationEnableVpcClassicLinkDnsSupportMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableVpcClassicLinkDnsSupportOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableVpcClassicLinkDnsSupportInput struct { - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -type EnableVpcClassicLinkDnsSupportOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableVpcClassicLinkDnsSupportMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableVpcClassicLinkDnsSupport"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableVpcClassicLinkDnsSupport(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableVpcClassicLinkDnsSupport(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableVpcClassicLinkDnsSupport", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go deleted file mode 100644 index eb1b316b9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientCertificateRevocationList.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Downloads the client certificate revocation list for the specified Client VPN -// endpoint. -func (c *Client) ExportClientVpnClientCertificateRevocationList(ctx context.Context, params *ExportClientVpnClientCertificateRevocationListInput, optFns ...func(*Options)) (*ExportClientVpnClientCertificateRevocationListOutput, error) { - if params == nil { - params = &ExportClientVpnClientCertificateRevocationListInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ExportClientVpnClientCertificateRevocationList", params, optFns, c.addOperationExportClientVpnClientCertificateRevocationListMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ExportClientVpnClientCertificateRevocationListOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ExportClientVpnClientCertificateRevocationListInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ExportClientVpnClientCertificateRevocationListOutput struct { - - // Information about the client certificate revocation list. - CertificateRevocationList *string - - // The current state of the client certificate revocation list. - Status *types.ClientCertificateRevocationListStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationExportClientVpnClientCertificateRevocationListMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ExportClientVpnClientCertificateRevocationList"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpExportClientVpnClientCertificateRevocationListValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportClientVpnClientCertificateRevocationList(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opExportClientVpnClientCertificateRevocationList(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ExportClientVpnClientCertificateRevocationList", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientConfiguration.go deleted file mode 100644 index a971c53ab..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportClientVpnClientConfiguration.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Downloads the contents of the Client VPN endpoint configuration file for the -// specified Client VPN endpoint. The Client VPN endpoint configuration file -// includes the Client VPN endpoint and certificate information clients need to -// establish a connection with the Client VPN endpoint. -func (c *Client) ExportClientVpnClientConfiguration(ctx context.Context, params *ExportClientVpnClientConfigurationInput, optFns ...func(*Options)) (*ExportClientVpnClientConfigurationOutput, error) { - if params == nil { - params = &ExportClientVpnClientConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ExportClientVpnClientConfiguration", params, optFns, c.addOperationExportClientVpnClientConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ExportClientVpnClientConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ExportClientVpnClientConfigurationInput struct { - - // The ID of the Client VPN endpoint. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ExportClientVpnClientConfigurationOutput struct { - - // The contents of the Client VPN endpoint configuration file. - ClientConfiguration *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationExportClientVpnClientConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpExportClientVpnClientConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportClientVpnClientConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ExportClientVpnClientConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpExportClientVpnClientConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportClientVpnClientConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opExportClientVpnClientConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ExportClientVpnClientConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportImage.go deleted file mode 100644 index 4c34e9901..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportImage.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Exports an Amazon Machine Image (AMI) to a VM file. For more information, see -// Exporting a VM directly from an Amazon Machine Image (AMI) (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html) -// in the VM Import/Export User Guide. -func (c *Client) ExportImage(ctx context.Context, params *ExportImageInput, optFns ...func(*Options)) (*ExportImageOutput, error) { - if params == nil { - params = &ExportImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ExportImage", params, optFns, c.addOperationExportImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ExportImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ExportImageInput struct { - - // The disk image format. - // - // This member is required. - DiskImageFormat types.DiskImageFormat - - // The ID of the image. - // - // This member is required. - ImageId *string - - // The Amazon S3 bucket for the destination image. The destination bucket must - // exist. - // - // This member is required. - S3ExportLocation *types.ExportTaskS3LocationRequest - - // Token to enable idempotency for export image requests. - ClientToken *string - - // A description of the image being exported. The maximum length is 255 characters. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name of the role that grants VM Import/Export permission to export images - // to your Amazon S3 bucket. If this parameter is not specified, the default role - // is named 'vmimport'. - RoleName *string - - // The tags to apply to the export image task during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type ExportImageOutput struct { - - // A description of the image being exported. - Description *string - - // The disk image format for the exported image. - DiskImageFormat types.DiskImageFormat - - // The ID of the export image task. - ExportImageTaskId *string - - // The ID of the image. - ImageId *string - - // The percent complete of the export image task. - Progress *string - - // The name of the role that grants VM Import/Export permission to export images - // to your Amazon S3 bucket. - RoleName *string - - // Information about the destination Amazon S3 bucket. - S3ExportLocation *types.ExportTaskS3Location - - // The status of the export image task. The possible values are active , completed - // , deleting , and deleted . - Status *string - - // The status message for the export image task. - StatusMessage *string - - // Any tags assigned to the export image task. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationExportImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpExportImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ExportImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opExportImageMiddleware(stack, options); err != nil { - return err - } - if err = addOpExportImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpExportImage struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpExportImage) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpExportImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ExportImageInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ExportImageInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opExportImageMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpExportImage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opExportImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ExportImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportTransitGatewayRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportTransitGatewayRoutes.go deleted file mode 100644 index e2ef1a392..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ExportTransitGatewayRoutes.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Exports routes from the specified transit gateway route table to the specified -// S3 bucket. By default, all routes are exported. Alternatively, you can filter by -// CIDR range. The routes are saved to the specified bucket in a JSON file. For -// more information, see Export Route Tables to Amazon S3 (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-route-tables.html#tgw-export-route-tables) -// in Transit Gateways. -func (c *Client) ExportTransitGatewayRoutes(ctx context.Context, params *ExportTransitGatewayRoutesInput, optFns ...func(*Options)) (*ExportTransitGatewayRoutesOutput, error) { - if params == nil { - params = &ExportTransitGatewayRoutesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ExportTransitGatewayRoutes", params, optFns, c.addOperationExportTransitGatewayRoutesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ExportTransitGatewayRoutesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ExportTransitGatewayRoutesInput struct { - - // The name of the S3 bucket. - // - // This member is required. - S3Bucket *string - - // The ID of the route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - attachment.transit-gateway-attachment-id - The id of the transit gateway - // attachment. - // - attachment.resource-id - The resource id of the transit gateway attachment. - // - route-search.exact-match - The exact match of the specified filter. - // - route-search.longest-prefix-match - The longest prefix that matches the - // route. - // - route-search.subnet-of-match - The routes with a subnet that match the - // specified CIDR filter. - // - route-search.supernet-of-match - The routes with a CIDR that encompass the - // CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your - // route table and you specify supernet-of-match as 10.0.1.0/30, then the result - // returns 10.0.1.0/29. - // - state - The state of the route ( active | blackhole ). - // - transit-gateway-route-destination-cidr-block - The CIDR range. - // - type - The type of route ( propagated | static ). - Filters []types.Filter - - noSmithyDocumentSerde -} - -type ExportTransitGatewayRoutesOutput struct { - - // The URL of the exported file in Amazon S3. For example, - // s3://bucket_name/VPCTransitGateway/TransitGatewayRouteTables/file_name. - S3Location *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationExportTransitGatewayRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpExportTransitGatewayRoutes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpExportTransitGatewayRoutes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ExportTransitGatewayRoutes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpExportTransitGatewayRoutesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opExportTransitGatewayRoutes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opExportTransitGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ExportTransitGatewayRoutes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go deleted file mode 100644 index a3c39d18d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedEnclaveCertificateIamRoles.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the IAM roles that are associated with the specified ACM (ACM) -// certificate. It also returns the name of the Amazon S3 bucket and the Amazon S3 -// object key where the certificate, certificate chain, and encrypted private key -// bundle are stored, and the ARN of the KMS key that's used to encrypt the private -// key. -func (c *Client) GetAssociatedEnclaveCertificateIamRoles(ctx context.Context, params *GetAssociatedEnclaveCertificateIamRolesInput, optFns ...func(*Options)) (*GetAssociatedEnclaveCertificateIamRolesOutput, error) { - if params == nil { - params = &GetAssociatedEnclaveCertificateIamRolesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAssociatedEnclaveCertificateIamRoles", params, optFns, c.addOperationGetAssociatedEnclaveCertificateIamRolesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAssociatedEnclaveCertificateIamRolesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAssociatedEnclaveCertificateIamRolesInput struct { - - // The ARN of the ACM certificate for which to view the associated IAM roles, - // encryption keys, and Amazon S3 object information. - // - // This member is required. - CertificateArn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetAssociatedEnclaveCertificateIamRolesOutput struct { - - // Information about the associated IAM roles. - AssociatedRoles []types.AssociatedRole - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAssociatedEnclaveCertificateIamRolesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAssociatedEnclaveCertificateIamRoles"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetAssociatedEnclaveCertificateIamRolesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAssociatedEnclaveCertificateIamRoles(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetAssociatedEnclaveCertificateIamRoles(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAssociatedEnclaveCertificateIamRoles", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go deleted file mode 100644 index d40c489f0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAssociatedIpv6PoolCidrs.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the IPv6 CIDR block associations for a specified IPv6 -// address pool. -func (c *Client) GetAssociatedIpv6PoolCidrs(ctx context.Context, params *GetAssociatedIpv6PoolCidrsInput, optFns ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error) { - if params == nil { - params = &GetAssociatedIpv6PoolCidrsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAssociatedIpv6PoolCidrs", params, optFns, c.addOperationGetAssociatedIpv6PoolCidrsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAssociatedIpv6PoolCidrsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAssociatedIpv6PoolCidrsInput struct { - - // The ID of the IPv6 address pool. - // - // This member is required. - PoolId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetAssociatedIpv6PoolCidrsOutput struct { - - // Information about the IPv6 CIDR block associations. - Ipv6CidrAssociations []types.Ipv6CidrAssociation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAssociatedIpv6PoolCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAssociatedIpv6PoolCidrs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetAssociatedIpv6PoolCidrsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAssociatedIpv6PoolCidrs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetAssociatedIpv6PoolCidrsAPIClient is a client that implements the -// GetAssociatedIpv6PoolCidrs operation. -type GetAssociatedIpv6PoolCidrsAPIClient interface { - GetAssociatedIpv6PoolCidrs(context.Context, *GetAssociatedIpv6PoolCidrsInput, ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error) -} - -var _ GetAssociatedIpv6PoolCidrsAPIClient = (*Client)(nil) - -// GetAssociatedIpv6PoolCidrsPaginatorOptions is the paginator options for -// GetAssociatedIpv6PoolCidrs -type GetAssociatedIpv6PoolCidrsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetAssociatedIpv6PoolCidrsPaginator is a paginator for -// GetAssociatedIpv6PoolCidrs -type GetAssociatedIpv6PoolCidrsPaginator struct { - options GetAssociatedIpv6PoolCidrsPaginatorOptions - client GetAssociatedIpv6PoolCidrsAPIClient - params *GetAssociatedIpv6PoolCidrsInput - nextToken *string - firstPage bool -} - -// NewGetAssociatedIpv6PoolCidrsPaginator returns a new -// GetAssociatedIpv6PoolCidrsPaginator -func NewGetAssociatedIpv6PoolCidrsPaginator(client GetAssociatedIpv6PoolCidrsAPIClient, params *GetAssociatedIpv6PoolCidrsInput, optFns ...func(*GetAssociatedIpv6PoolCidrsPaginatorOptions)) *GetAssociatedIpv6PoolCidrsPaginator { - if params == nil { - params = &GetAssociatedIpv6PoolCidrsInput{} - } - - options := GetAssociatedIpv6PoolCidrsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetAssociatedIpv6PoolCidrsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetAssociatedIpv6PoolCidrsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetAssociatedIpv6PoolCidrs page. -func (p *GetAssociatedIpv6PoolCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAssociatedIpv6PoolCidrsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetAssociatedIpv6PoolCidrs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetAssociatedIpv6PoolCidrs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAssociatedIpv6PoolCidrs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAwsNetworkPerformanceData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAwsNetworkPerformanceData.go deleted file mode 100644 index 3a8b424ad..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetAwsNetworkPerformanceData.go +++ /dev/null @@ -1,251 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Gets network performance data. -func (c *Client) GetAwsNetworkPerformanceData(ctx context.Context, params *GetAwsNetworkPerformanceDataInput, optFns ...func(*Options)) (*GetAwsNetworkPerformanceDataOutput, error) { - if params == nil { - params = &GetAwsNetworkPerformanceDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAwsNetworkPerformanceData", params, optFns, c.addOperationGetAwsNetworkPerformanceDataMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAwsNetworkPerformanceDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAwsNetworkPerformanceDataInput struct { - - // A list of network performance data queries. - DataQueries []types.DataQuery - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ending time for the performance data request. The end time must be - // formatted as yyyy-mm-ddThh:mm:ss . For example, 2022-06-12T12:00:00.000Z . - EndTime *time.Time - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The starting time for the performance data request. The starting time must be - // formatted as yyyy-mm-ddThh:mm:ss . For example, 2022-06-10T12:00:00.000Z . - StartTime *time.Time - - noSmithyDocumentSerde -} - -type GetAwsNetworkPerformanceDataOutput struct { - - // The list of data responses. - DataResponses []types.DataResponse - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAwsNetworkPerformanceDataMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetAwsNetworkPerformanceData{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetAwsNetworkPerformanceData{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAwsNetworkPerformanceData"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAwsNetworkPerformanceData(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetAwsNetworkPerformanceDataAPIClient is a client that implements the -// GetAwsNetworkPerformanceData operation. -type GetAwsNetworkPerformanceDataAPIClient interface { - GetAwsNetworkPerformanceData(context.Context, *GetAwsNetworkPerformanceDataInput, ...func(*Options)) (*GetAwsNetworkPerformanceDataOutput, error) -} - -var _ GetAwsNetworkPerformanceDataAPIClient = (*Client)(nil) - -// GetAwsNetworkPerformanceDataPaginatorOptions is the paginator options for -// GetAwsNetworkPerformanceData -type GetAwsNetworkPerformanceDataPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetAwsNetworkPerformanceDataPaginator is a paginator for -// GetAwsNetworkPerformanceData -type GetAwsNetworkPerformanceDataPaginator struct { - options GetAwsNetworkPerformanceDataPaginatorOptions - client GetAwsNetworkPerformanceDataAPIClient - params *GetAwsNetworkPerformanceDataInput - nextToken *string - firstPage bool -} - -// NewGetAwsNetworkPerformanceDataPaginator returns a new -// GetAwsNetworkPerformanceDataPaginator -func NewGetAwsNetworkPerformanceDataPaginator(client GetAwsNetworkPerformanceDataAPIClient, params *GetAwsNetworkPerformanceDataInput, optFns ...func(*GetAwsNetworkPerformanceDataPaginatorOptions)) *GetAwsNetworkPerformanceDataPaginator { - if params == nil { - params = &GetAwsNetworkPerformanceDataInput{} - } - - options := GetAwsNetworkPerformanceDataPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetAwsNetworkPerformanceDataPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetAwsNetworkPerformanceDataPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetAwsNetworkPerformanceData page. -func (p *GetAwsNetworkPerformanceDataPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetAwsNetworkPerformanceDataOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetAwsNetworkPerformanceData(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetAwsNetworkPerformanceData(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAwsNetworkPerformanceData", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCapacityReservationUsage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCapacityReservationUsage.go deleted file mode 100644 index 654d6fd31..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCapacityReservationUsage.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets usage information about a Capacity Reservation. If the Capacity -// Reservation is shared, it shows usage information for the Capacity Reservation -// owner and each Amazon Web Services account that is currently using the shared -// capacity. If the Capacity Reservation is not shared, it shows only the Capacity -// Reservation owner's usage. -func (c *Client) GetCapacityReservationUsage(ctx context.Context, params *GetCapacityReservationUsageInput, optFns ...func(*Options)) (*GetCapacityReservationUsageOutput, error) { - if params == nil { - params = &GetCapacityReservationUsageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetCapacityReservationUsage", params, optFns, c.addOperationGetCapacityReservationUsageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetCapacityReservationUsageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetCapacityReservationUsageInput struct { - - // The ID of the Capacity Reservation. - // - // This member is required. - CapacityReservationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetCapacityReservationUsageOutput struct { - - // The remaining capacity. Indicates the number of instances that can be launched - // in the Capacity Reservation. - AvailableInstanceCount *int32 - - // The ID of the Capacity Reservation. - CapacityReservationId *string - - // The type of instance for which the Capacity Reservation reserves capacity. - InstanceType *string - - // Information about the Capacity Reservation usage. - InstanceUsages []types.InstanceUsage - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // The current state of the Capacity Reservation. A Capacity Reservation can be in - // one of the following states: - // - active - The Capacity Reservation is active and the capacity is available - // for your use. - // - expired - The Capacity Reservation expired automatically at the date and - // time specified in your request. The reserved capacity is no longer available for - // your use. - // - cancelled - The Capacity Reservation was cancelled. The reserved capacity is - // no longer available for your use. - // - pending - The Capacity Reservation request was successful but the capacity - // provisioning is still pending. - // - failed - The Capacity Reservation request has failed. A request might fail - // due to invalid request parameters, capacity constraints, or instance limit - // constraints. Failed requests are retained for 60 minutes. - State types.CapacityReservationState - - // The number of instances for which the Capacity Reservation reserves capacity. - TotalInstanceCount *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetCapacityReservationUsageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetCapacityReservationUsage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetCapacityReservationUsage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetCapacityReservationUsage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetCapacityReservationUsageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCapacityReservationUsage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetCapacityReservationUsage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetCapacityReservationUsage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCoipPoolUsage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCoipPoolUsage.go deleted file mode 100644 index 51b53bd27..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetCoipPoolUsage.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the allocations from the specified customer-owned address pool. -func (c *Client) GetCoipPoolUsage(ctx context.Context, params *GetCoipPoolUsageInput, optFns ...func(*Options)) (*GetCoipPoolUsageOutput, error) { - if params == nil { - params = &GetCoipPoolUsageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetCoipPoolUsage", params, optFns, c.addOperationGetCoipPoolUsageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetCoipPoolUsageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetCoipPoolUsageInput struct { - - // The ID of the address pool. - // - // This member is required. - PoolId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - coip-address-usage.allocation-id - The allocation ID of the address. - // - coip-address-usage.aws-account-id - The ID of the Amazon Web Services - // account that is using the customer-owned IP address. - // - coip-address-usage.aws-service - The Amazon Web Services service that is - // using the customer-owned IP address. - // - coip-address-usage.co-ip - The customer-owned IP address. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetCoipPoolUsageOutput struct { - - // Information about the address usage. - CoipAddressUsages []types.CoipAddressUsage - - // The ID of the customer-owned address pool. - CoipPoolId *string - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetCoipPoolUsageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetCoipPoolUsage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetCoipPoolUsage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetCoipPoolUsage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetCoipPoolUsageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCoipPoolUsage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetCoipPoolUsage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetCoipPoolUsage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go deleted file mode 100644 index de6425907..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleOutput.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Gets the console output for the specified instance. For Linux instances, the -// instance console output displays the exact console output that would normally be -// displayed on a physical monitor attached to a computer. For Windows instances, -// the instance console output includes the last three system event log errors. By -// default, the console output returns buffered information that was posted shortly -// after an instance transition state (start, stop, reboot, or terminate). This -// information is available for at least one hour after the most recent post. Only -// the most recent 64 KB of console output is available. You can optionally -// retrieve the latest serial console output at any time during the instance -// lifecycle. This option is supported on instance types that use the Nitro -// hypervisor. For more information, see Instance console output (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output) -// in the Amazon EC2 User Guide. -func (c *Client) GetConsoleOutput(ctx context.Context, params *GetConsoleOutputInput, optFns ...func(*Options)) (*GetConsoleOutputOutput, error) { - if params == nil { - params = &GetConsoleOutputInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetConsoleOutput", params, optFns, c.addOperationGetConsoleOutputMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetConsoleOutputOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetConsoleOutputInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // When enabled, retrieves the latest console output for the instance. Default: - // disabled ( false ) - Latest *bool - - noSmithyDocumentSerde -} - -type GetConsoleOutputOutput struct { - - // The ID of the instance. - InstanceId *string - - // The console output, base64-encoded. If you are using a command line tool, the - // tool decodes the output for you. - Output *string - - // The time at which the output was last updated. - Timestamp *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetConsoleOutputMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetConsoleOutput{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetConsoleOutput{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetConsoleOutput"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetConsoleOutputValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConsoleOutput(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetConsoleOutput(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetConsoleOutput", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go deleted file mode 100644 index e8be89107..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetConsoleScreenshot.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieve a JPG-format screenshot of a running instance to help with -// troubleshooting. The returned content is Base64-encoded. -func (c *Client) GetConsoleScreenshot(ctx context.Context, params *GetConsoleScreenshotInput, optFns ...func(*Options)) (*GetConsoleScreenshotOutput, error) { - if params == nil { - params = &GetConsoleScreenshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetConsoleScreenshot", params, optFns, c.addOperationGetConsoleScreenshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetConsoleScreenshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetConsoleScreenshotInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // When set to true , acts as keystroke input and wakes up an instance that's in - // standby or "sleep" mode. - WakeUp *bool - - noSmithyDocumentSerde -} - -type GetConsoleScreenshotOutput struct { - - // The data that comprises the image. - ImageData *string - - // The ID of the instance. - InstanceId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetConsoleScreenshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetConsoleScreenshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetConsoleScreenshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetConsoleScreenshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetConsoleScreenshotValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetConsoleScreenshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetConsoleScreenshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetConsoleScreenshot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go deleted file mode 100644 index 382a5f962..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetDefaultCreditSpecification.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the default credit option for CPU usage of a burstable performance -// instance family. For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon EC2 User Guide. -func (c *Client) GetDefaultCreditSpecification(ctx context.Context, params *GetDefaultCreditSpecificationInput, optFns ...func(*Options)) (*GetDefaultCreditSpecificationOutput, error) { - if params == nil { - params = &GetDefaultCreditSpecificationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetDefaultCreditSpecification", params, optFns, c.addOperationGetDefaultCreditSpecificationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetDefaultCreditSpecificationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetDefaultCreditSpecificationInput struct { - - // The instance family. - // - // This member is required. - InstanceFamily types.UnlimitedSupportedInstanceFamily - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetDefaultCreditSpecificationOutput struct { - - // The default credit option for CPU usage of the instance family. - InstanceFamilyCreditSpecification *types.InstanceFamilyCreditSpecification - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetDefaultCreditSpecificationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetDefaultCreditSpecification{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetDefaultCreditSpecification{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetDefaultCreditSpecification"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetDefaultCreditSpecificationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDefaultCreditSpecification(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetDefaultCreditSpecification(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetDefaultCreditSpecification", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsDefaultKmsKeyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsDefaultKmsKeyId.go deleted file mode 100644 index 0238a43d4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsDefaultKmsKeyId.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes the default KMS key for EBS encryption by default for your account in -// this Region. You can change the default KMS key for encryption by default using -// ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId . For more information, see -// Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) GetEbsDefaultKmsKeyId(ctx context.Context, params *GetEbsDefaultKmsKeyIdInput, optFns ...func(*Options)) (*GetEbsDefaultKmsKeyIdOutput, error) { - if params == nil { - params = &GetEbsDefaultKmsKeyIdInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetEbsDefaultKmsKeyId", params, optFns, c.addOperationGetEbsDefaultKmsKeyIdMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetEbsDefaultKmsKeyIdOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetEbsDefaultKmsKeyIdInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetEbsDefaultKmsKeyIdOutput struct { - - // The Amazon Resource Name (ARN) of the default KMS key for encryption by default. - KmsKeyId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetEbsDefaultKmsKeyIdMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetEbsDefaultKmsKeyId{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetEbsDefaultKmsKeyId{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetEbsDefaultKmsKeyId"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEbsDefaultKmsKeyId(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetEbsDefaultKmsKeyId(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetEbsDefaultKmsKeyId", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsEncryptionByDefault.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsEncryptionByDefault.go deleted file mode 100644 index ddaa33bd1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetEbsEncryptionByDefault.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Describes whether EBS encryption by default is enabled for your account in the -// current Region. For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) GetEbsEncryptionByDefault(ctx context.Context, params *GetEbsEncryptionByDefaultInput, optFns ...func(*Options)) (*GetEbsEncryptionByDefaultOutput, error) { - if params == nil { - params = &GetEbsEncryptionByDefaultInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetEbsEncryptionByDefault", params, optFns, c.addOperationGetEbsEncryptionByDefaultMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetEbsEncryptionByDefaultOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetEbsEncryptionByDefaultInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetEbsEncryptionByDefaultOutput struct { - - // Indicates whether encryption by default is enabled. - EbsEncryptionByDefault *bool - - // Reserved for future use. - SseType types.SSEType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetEbsEncryptionByDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetEbsEncryptionByDefault{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetEbsEncryptionByDefault{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetEbsEncryptionByDefault"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEbsEncryptionByDefault(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetEbsEncryptionByDefault(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetEbsEncryptionByDefault", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go deleted file mode 100644 index 529d508fa..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetFlowLogsIntegrationTemplate.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Generates a CloudFormation template that streamlines and automates the -// integration of VPC flow logs with Amazon Athena. This make it easier for you to -// query and gain insights from VPC flow logs data. Based on the information that -// you provide, we configure resources in the template to do the following: -// - Create a table in Athena that maps fields to a custom log format -// - Create a Lambda function that updates the table with new partitions on a -// daily, weekly, or monthly basis -// - Create a table partitioned between two timestamps in the past -// - Create a set of named queries in Athena that you can use to get started -// quickly -// -// GetFlowLogsIntegrationTemplate does not support integration between Amazon Web -// Services Transit Gateway Flow Logs and Amazon Athena. -func (c *Client) GetFlowLogsIntegrationTemplate(ctx context.Context, params *GetFlowLogsIntegrationTemplateInput, optFns ...func(*Options)) (*GetFlowLogsIntegrationTemplateOutput, error) { - if params == nil { - params = &GetFlowLogsIntegrationTemplateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetFlowLogsIntegrationTemplate", params, optFns, c.addOperationGetFlowLogsIntegrationTemplateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetFlowLogsIntegrationTemplateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetFlowLogsIntegrationTemplateInput struct { - - // To store the CloudFormation template in Amazon S3, specify the location in - // Amazon S3. - // - // This member is required. - ConfigDeliveryS3DestinationArn *string - - // The ID of the flow log. - // - // This member is required. - FlowLogId *string - - // Information about the service integration. - // - // This member is required. - IntegrateServices *types.IntegrateServices - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetFlowLogsIntegrationTemplateOutput struct { - - // The generated CloudFormation template. - Result *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetFlowLogsIntegrationTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetFlowLogsIntegrationTemplate{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetFlowLogsIntegrationTemplate"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetFlowLogsIntegrationTemplateValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFlowLogsIntegrationTemplate(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetFlowLogsIntegrationTemplate(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetFlowLogsIntegrationTemplate", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetGroupsForCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetGroupsForCapacityReservation.go deleted file mode 100644 index 7edddb183..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetGroupsForCapacityReservation.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the resource groups to which a Capacity Reservation has been added. -func (c *Client) GetGroupsForCapacityReservation(ctx context.Context, params *GetGroupsForCapacityReservationInput, optFns ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error) { - if params == nil { - params = &GetGroupsForCapacityReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetGroupsForCapacityReservation", params, optFns, c.addOperationGetGroupsForCapacityReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetGroupsForCapacityReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetGroupsForCapacityReservationInput struct { - - // The ID of the Capacity Reservation. If you specify a Capacity Reservation that - // is shared with you, the operation returns only Capacity Reservation groups that - // you own. - // - // This member is required. - CapacityReservationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetGroupsForCapacityReservationOutput struct { - - // Information about the resource groups to which the Capacity Reservation has - // been added. - CapacityReservationGroups []types.CapacityReservationGroup - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetGroupsForCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetGroupsForCapacityReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetGroupsForCapacityReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetGroupsForCapacityReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetGroupsForCapacityReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGroupsForCapacityReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetGroupsForCapacityReservationAPIClient is a client that implements the -// GetGroupsForCapacityReservation operation. -type GetGroupsForCapacityReservationAPIClient interface { - GetGroupsForCapacityReservation(context.Context, *GetGroupsForCapacityReservationInput, ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error) -} - -var _ GetGroupsForCapacityReservationAPIClient = (*Client)(nil) - -// GetGroupsForCapacityReservationPaginatorOptions is the paginator options for -// GetGroupsForCapacityReservation -type GetGroupsForCapacityReservationPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetGroupsForCapacityReservationPaginator is a paginator for -// GetGroupsForCapacityReservation -type GetGroupsForCapacityReservationPaginator struct { - options GetGroupsForCapacityReservationPaginatorOptions - client GetGroupsForCapacityReservationAPIClient - params *GetGroupsForCapacityReservationInput - nextToken *string - firstPage bool -} - -// NewGetGroupsForCapacityReservationPaginator returns a new -// GetGroupsForCapacityReservationPaginator -func NewGetGroupsForCapacityReservationPaginator(client GetGroupsForCapacityReservationAPIClient, params *GetGroupsForCapacityReservationInput, optFns ...func(*GetGroupsForCapacityReservationPaginatorOptions)) *GetGroupsForCapacityReservationPaginator { - if params == nil { - params = &GetGroupsForCapacityReservationInput{} - } - - options := GetGroupsForCapacityReservationPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetGroupsForCapacityReservationPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetGroupsForCapacityReservationPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetGroupsForCapacityReservation page. -func (p *GetGroupsForCapacityReservationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetGroupsForCapacityReservationOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetGroupsForCapacityReservation(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetGroupsForCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetGroupsForCapacityReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetHostReservationPurchasePreview.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetHostReservationPurchasePreview.go deleted file mode 100644 index db3db154c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetHostReservationPurchasePreview.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Preview a reservation purchase with configurations that match those of your -// Dedicated Host. You must have active Dedicated Hosts in your account before you -// purchase a reservation. This is a preview of the PurchaseHostReservation action -// and does not result in the offering being purchased. -func (c *Client) GetHostReservationPurchasePreview(ctx context.Context, params *GetHostReservationPurchasePreviewInput, optFns ...func(*Options)) (*GetHostReservationPurchasePreviewOutput, error) { - if params == nil { - params = &GetHostReservationPurchasePreviewInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHostReservationPurchasePreview", params, optFns, c.addOperationGetHostReservationPurchasePreviewMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHostReservationPurchasePreviewOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetHostReservationPurchasePreviewInput struct { - - // The IDs of the Dedicated Hosts with which the reservation is associated. - // - // This member is required. - HostIdSet []string - - // The offering ID of the reservation. - // - // This member is required. - OfferingId *string - - noSmithyDocumentSerde -} - -type GetHostReservationPurchasePreviewOutput struct { - - // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are - // specified. At this time, the only supported currency is USD . - CurrencyCode types.CurrencyCodeValues - - // The purchase information of the Dedicated Host reservation and the Dedicated - // Hosts associated with it. - Purchase []types.Purchase - - // The potential total hourly price of the reservation per hour. - TotalHourlyPrice *string - - // The potential total upfront price. This is billed immediately. - TotalUpfrontPrice *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHostReservationPurchasePreviewMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetHostReservationPurchasePreview{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetHostReservationPurchasePreview{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHostReservationPurchasePreview"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetHostReservationPurchasePreviewValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostReservationPurchasePreview(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHostReservationPurchasePreview(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHostReservationPurchasePreview", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go deleted file mode 100644 index 2bfe6f6c3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetImageBlockPublicAccessState.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the current state of block public access for AMIs at the account level in -// the specified Amazon Web Services Region. For more information, see Block -// public access to your AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sharingamis-intro.html#block-public-access-to-amis) -// in the Amazon EC2 User Guide. -func (c *Client) GetImageBlockPublicAccessState(ctx context.Context, params *GetImageBlockPublicAccessStateInput, optFns ...func(*Options)) (*GetImageBlockPublicAccessStateOutput, error) { - if params == nil { - params = &GetImageBlockPublicAccessStateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetImageBlockPublicAccessState", params, optFns, c.addOperationGetImageBlockPublicAccessStateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetImageBlockPublicAccessStateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetImageBlockPublicAccessStateInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetImageBlockPublicAccessStateOutput struct { - - // The current state of block public access for AMIs at the account level in the - // specified Amazon Web Services Region. Possible values: - // - block-new-sharing - Any attempt to publicly share your AMIs in the specified - // Region is blocked. - // - unblocked - Your AMIs in the specified Region can be publicly shared. - ImageBlockPublicAccessState *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetImageBlockPublicAccessStateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetImageBlockPublicAccessState{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetImageBlockPublicAccessState{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetImageBlockPublicAccessState"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImageBlockPublicAccessState(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetImageBlockPublicAccessState(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetImageBlockPublicAccessState", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go deleted file mode 100644 index 45c0620c6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceTypesFromInstanceRequirements.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a list of instance types with the specified instance attributes. You -// can use the response to preview the instance types without launching instances. -// Note that the response does not consider capacity. When you specify multiple -// parameters, you get instance types that satisfy all of the specified parameters. -// If you specify multiple values for a parameter, you get instance types that -// satisfy any of the specified values. For more information, see Preview instance -// types with specified attributes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html#spotfleet-get-instance-types-from-instance-requirements) -// , Attribute-based instance type selection for EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html) -// , Attribute-based instance type selection for Spot Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html) -// , and Spot placement score (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html) -// in the Amazon EC2 User Guide, and Creating an Auto Scaling group using -// attribute-based instance type selection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg-instance-type-requirements.html) -// in the Amazon EC2 Auto Scaling User Guide. -func (c *Client) GetInstanceTypesFromInstanceRequirements(ctx context.Context, params *GetInstanceTypesFromInstanceRequirementsInput, optFns ...func(*Options)) (*GetInstanceTypesFromInstanceRequirementsOutput, error) { - if params == nil { - params = &GetInstanceTypesFromInstanceRequirementsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetInstanceTypesFromInstanceRequirements", params, optFns, c.addOperationGetInstanceTypesFromInstanceRequirementsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetInstanceTypesFromInstanceRequirementsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetInstanceTypesFromInstanceRequirementsInput struct { - - // The processor architecture type. - // - // This member is required. - ArchitectureTypes []types.ArchitectureType - - // The attributes required for the instance types. - // - // This member is required. - InstanceRequirements *types.InstanceRequirementsRequest - - // The virtualization type. - // - // This member is required. - VirtualizationTypes []types.VirtualizationType - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type GetInstanceTypesFromInstanceRequirementsOutput struct { - - // The instance types with the specified instance attributes. - InstanceTypes []types.InstanceTypeInfoFromInstanceRequirements - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetInstanceTypesFromInstanceRequirementsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetInstanceTypesFromInstanceRequirements"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetInstanceTypesFromInstanceRequirementsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstanceTypesFromInstanceRequirements(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetInstanceTypesFromInstanceRequirementsAPIClient is a client that implements -// the GetInstanceTypesFromInstanceRequirements operation. -type GetInstanceTypesFromInstanceRequirementsAPIClient interface { - GetInstanceTypesFromInstanceRequirements(context.Context, *GetInstanceTypesFromInstanceRequirementsInput, ...func(*Options)) (*GetInstanceTypesFromInstanceRequirementsOutput, error) -} - -var _ GetInstanceTypesFromInstanceRequirementsAPIClient = (*Client)(nil) - -// GetInstanceTypesFromInstanceRequirementsPaginatorOptions is the paginator -// options for GetInstanceTypesFromInstanceRequirements -type GetInstanceTypesFromInstanceRequirementsPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetInstanceTypesFromInstanceRequirementsPaginator is a paginator for -// GetInstanceTypesFromInstanceRequirements -type GetInstanceTypesFromInstanceRequirementsPaginator struct { - options GetInstanceTypesFromInstanceRequirementsPaginatorOptions - client GetInstanceTypesFromInstanceRequirementsAPIClient - params *GetInstanceTypesFromInstanceRequirementsInput - nextToken *string - firstPage bool -} - -// NewGetInstanceTypesFromInstanceRequirementsPaginator returns a new -// GetInstanceTypesFromInstanceRequirementsPaginator -func NewGetInstanceTypesFromInstanceRequirementsPaginator(client GetInstanceTypesFromInstanceRequirementsAPIClient, params *GetInstanceTypesFromInstanceRequirementsInput, optFns ...func(*GetInstanceTypesFromInstanceRequirementsPaginatorOptions)) *GetInstanceTypesFromInstanceRequirementsPaginator { - if params == nil { - params = &GetInstanceTypesFromInstanceRequirementsInput{} - } - - options := GetInstanceTypesFromInstanceRequirementsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetInstanceTypesFromInstanceRequirementsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetInstanceTypesFromInstanceRequirementsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetInstanceTypesFromInstanceRequirements page. -func (p *GetInstanceTypesFromInstanceRequirementsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetInstanceTypesFromInstanceRequirementsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetInstanceTypesFromInstanceRequirements(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetInstanceTypesFromInstanceRequirements(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetInstanceTypesFromInstanceRequirements", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go deleted file mode 100644 index cd173e278..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetInstanceUefiData.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// A binary representation of the UEFI variable store. Only non-volatile variables -// are stored. This is a base64 encoded and zlib compressed binary value that must -// be properly encoded. When you use register-image (https://docs.aws.amazon.com/cli/latest/reference/ec2/register-image.html) -// to create an AMI, you can create an exact copy of your variable store by passing -// the UEFI data in the UefiData parameter. You can modify the UEFI data by using -// the python-uefivars tool (https://github.com/awslabs/python-uefivars) on -// GitHub. You can use the tool to convert the UEFI data into a human-readable -// format (JSON), which you can inspect and modify, and then convert back into the -// binary format to use with register-image. For more information, see UEFI Secure -// Boot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html) -// in the Amazon EC2 User Guide. -func (c *Client) GetInstanceUefiData(ctx context.Context, params *GetInstanceUefiDataInput, optFns ...func(*Options)) (*GetInstanceUefiDataOutput, error) { - if params == nil { - params = &GetInstanceUefiDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetInstanceUefiData", params, optFns, c.addOperationGetInstanceUefiDataMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetInstanceUefiDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetInstanceUefiDataInput struct { - - // The ID of the instance from which to retrieve the UEFI data. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetInstanceUefiDataOutput struct { - - // The ID of the instance from which to retrieve the UEFI data. - InstanceId *string - - // Base64 representation of the non-volatile UEFI variable store. - UefiData *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetInstanceUefiDataMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetInstanceUefiData{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetInstanceUefiData{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetInstanceUefiData"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetInstanceUefiDataValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetInstanceUefiData(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetInstanceUefiData(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetInstanceUefiData", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamAddressHistory.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamAddressHistory.go deleted file mode 100644 index 344b96bc6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamAddressHistory.go +++ /dev/null @@ -1,268 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Retrieve historical information about a CIDR within an IPAM scope. For more -// information, see View the history of IP addresses (https://docs.aws.amazon.com/vpc/latest/ipam/view-history-cidr-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) GetIpamAddressHistory(ctx context.Context, params *GetIpamAddressHistoryInput, optFns ...func(*Options)) (*GetIpamAddressHistoryOutput, error) { - if params == nil { - params = &GetIpamAddressHistoryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamAddressHistory", params, optFns, c.addOperationGetIpamAddressHistoryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamAddressHistoryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamAddressHistoryInput struct { - - // The CIDR you want the history of. The CIDR can be an IPv4 or IPv6 IP address - // range. If you enter a /16 IPv4 CIDR, you will get records that match it exactly. - // You will not get records for any subnets within the /16 CIDR. - // - // This member is required. - Cidr *string - - // The ID of the IPAM scope that the CIDR is in. - // - // This member is required. - IpamScopeId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The end of the time period for which you are looking for history. If you omit - // this option, it will default to the current time. - EndTime *time.Time - - // The maximum number of historical results you would like returned per page. - // Defaults to 100. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The start of the time period for which you are looking for history. If you omit - // this option, it will default to the value of EndTime. - StartTime *time.Time - - // The ID of the VPC you want your history records filtered by. - VpcId *string - - noSmithyDocumentSerde -} - -type GetIpamAddressHistoryOutput struct { - - // A historical record for a CIDR within an IPAM scope. If the CIDR is associated - // with an EC2 instance, you will see an object in the response for the instance - // and one for the network interface. - HistoryRecords []types.IpamAddressHistoryRecord - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamAddressHistoryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamAddressHistory{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamAddressHistory{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamAddressHistory"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamAddressHistoryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamAddressHistory(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetIpamAddressHistoryAPIClient is a client that implements the -// GetIpamAddressHistory operation. -type GetIpamAddressHistoryAPIClient interface { - GetIpamAddressHistory(context.Context, *GetIpamAddressHistoryInput, ...func(*Options)) (*GetIpamAddressHistoryOutput, error) -} - -var _ GetIpamAddressHistoryAPIClient = (*Client)(nil) - -// GetIpamAddressHistoryPaginatorOptions is the paginator options for -// GetIpamAddressHistory -type GetIpamAddressHistoryPaginatorOptions struct { - // The maximum number of historical results you would like returned per page. - // Defaults to 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetIpamAddressHistoryPaginator is a paginator for GetIpamAddressHistory -type GetIpamAddressHistoryPaginator struct { - options GetIpamAddressHistoryPaginatorOptions - client GetIpamAddressHistoryAPIClient - params *GetIpamAddressHistoryInput - nextToken *string - firstPage bool -} - -// NewGetIpamAddressHistoryPaginator returns a new GetIpamAddressHistoryPaginator -func NewGetIpamAddressHistoryPaginator(client GetIpamAddressHistoryAPIClient, params *GetIpamAddressHistoryInput, optFns ...func(*GetIpamAddressHistoryPaginatorOptions)) *GetIpamAddressHistoryPaginator { - if params == nil { - params = &GetIpamAddressHistoryInput{} - } - - options := GetIpamAddressHistoryPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetIpamAddressHistoryPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetIpamAddressHistoryPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetIpamAddressHistory page. -func (p *GetIpamAddressHistoryPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetIpamAddressHistoryOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetIpamAddressHistory(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetIpamAddressHistory(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamAddressHistory", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredAccounts.go deleted file mode 100644 index f43f9c7b8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredAccounts.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets IPAM discovered accounts. A discovered account is an Amazon Web Services -// account that is monitored under a resource discovery. If you have integrated -// IPAM with Amazon Web Services Organizations, all accounts in the organization -// are discovered accounts. Only the IPAM account can get all discovered accounts -// in the organization. -func (c *Client) GetIpamDiscoveredAccounts(ctx context.Context, params *GetIpamDiscoveredAccountsInput, optFns ...func(*Options)) (*GetIpamDiscoveredAccountsOutput, error) { - if params == nil { - params = &GetIpamDiscoveredAccountsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamDiscoveredAccounts", params, optFns, c.addOperationGetIpamDiscoveredAccountsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamDiscoveredAccountsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamDiscoveredAccountsInput struct { - - // The Amazon Web Services Region that the account information is returned from. - // - // This member is required. - DiscoveryRegion *string - - // A resource discovery ID. - // - // This member is required. - IpamResourceDiscoveryId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Discovered account filters. - Filters []types.Filter - - // The maximum number of discovered accounts to return in one page of results. - MaxResults *int32 - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetIpamDiscoveredAccountsOutput struct { - - // Discovered accounts. - IpamDiscoveredAccounts []types.IpamDiscoveredAccount - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamDiscoveredAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamDiscoveredAccounts{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamDiscoveredAccounts{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamDiscoveredAccounts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamDiscoveredAccountsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamDiscoveredAccounts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetIpamDiscoveredAccountsAPIClient is a client that implements the -// GetIpamDiscoveredAccounts operation. -type GetIpamDiscoveredAccountsAPIClient interface { - GetIpamDiscoveredAccounts(context.Context, *GetIpamDiscoveredAccountsInput, ...func(*Options)) (*GetIpamDiscoveredAccountsOutput, error) -} - -var _ GetIpamDiscoveredAccountsAPIClient = (*Client)(nil) - -// GetIpamDiscoveredAccountsPaginatorOptions is the paginator options for -// GetIpamDiscoveredAccounts -type GetIpamDiscoveredAccountsPaginatorOptions struct { - // The maximum number of discovered accounts to return in one page of results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetIpamDiscoveredAccountsPaginator is a paginator for GetIpamDiscoveredAccounts -type GetIpamDiscoveredAccountsPaginator struct { - options GetIpamDiscoveredAccountsPaginatorOptions - client GetIpamDiscoveredAccountsAPIClient - params *GetIpamDiscoveredAccountsInput - nextToken *string - firstPage bool -} - -// NewGetIpamDiscoveredAccountsPaginator returns a new -// GetIpamDiscoveredAccountsPaginator -func NewGetIpamDiscoveredAccountsPaginator(client GetIpamDiscoveredAccountsAPIClient, params *GetIpamDiscoveredAccountsInput, optFns ...func(*GetIpamDiscoveredAccountsPaginatorOptions)) *GetIpamDiscoveredAccountsPaginator { - if params == nil { - params = &GetIpamDiscoveredAccountsInput{} - } - - options := GetIpamDiscoveredAccountsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetIpamDiscoveredAccountsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetIpamDiscoveredAccountsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetIpamDiscoveredAccounts page. -func (p *GetIpamDiscoveredAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetIpamDiscoveredAccountsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetIpamDiscoveredAccounts(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetIpamDiscoveredAccounts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamDiscoveredAccounts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go deleted file mode 100644 index b4e3ccdbe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredPublicAddresses.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Gets the public IP addresses that have been discovered by IPAM. -func (c *Client) GetIpamDiscoveredPublicAddresses(ctx context.Context, params *GetIpamDiscoveredPublicAddressesInput, optFns ...func(*Options)) (*GetIpamDiscoveredPublicAddressesOutput, error) { - if params == nil { - params = &GetIpamDiscoveredPublicAddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamDiscoveredPublicAddresses", params, optFns, c.addOperationGetIpamDiscoveredPublicAddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamDiscoveredPublicAddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamDiscoveredPublicAddressesInput struct { - - // The Amazon Web Services Region for the IP address. - // - // This member is required. - AddressRegion *string - - // An IPAM resource discovery ID. - // - // This member is required. - IpamResourceDiscoveryId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Filters. - Filters []types.Filter - - // The maximum number of IPAM discovered public addresses to return in one page of - // results. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetIpamDiscoveredPublicAddressesOutput struct { - - // IPAM discovered public addresses. - IpamDiscoveredPublicAddresses []types.IpamDiscoveredPublicAddress - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // The oldest successful resource discovery time. - OldestSampleTime *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamDiscoveredPublicAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamDiscoveredPublicAddresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamDiscoveredPublicAddresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamDiscoveredPublicAddressesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamDiscoveredPublicAddresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetIpamDiscoveredPublicAddresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamDiscoveredPublicAddresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go deleted file mode 100644 index ba7afdc4b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamDiscoveredResourceCidrs.go +++ /dev/null @@ -1,259 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the resource CIDRs that are monitored as part of a resource discovery. -// A discovered resource is a resource CIDR monitored under a resource discovery. -// The following resources can be discovered: VPCs, Public IPv4 pools, VPC subnets, -// and Elastic IP addresses. -func (c *Client) GetIpamDiscoveredResourceCidrs(ctx context.Context, params *GetIpamDiscoveredResourceCidrsInput, optFns ...func(*Options)) (*GetIpamDiscoveredResourceCidrsOutput, error) { - if params == nil { - params = &GetIpamDiscoveredResourceCidrsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamDiscoveredResourceCidrs", params, optFns, c.addOperationGetIpamDiscoveredResourceCidrsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamDiscoveredResourceCidrsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamDiscoveredResourceCidrsInput struct { - - // A resource discovery ID. - // - // This member is required. - IpamResourceDiscoveryId *string - - // A resource Region. - // - // This member is required. - ResourceRegion *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Filters. - Filters []types.Filter - - // The maximum number of discovered resource CIDRs to return in one page of - // results. - MaxResults *int32 - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetIpamDiscoveredResourceCidrsOutput struct { - - // Discovered resource CIDRs. - IpamDiscoveredResourceCidrs []types.IpamDiscoveredResourceCidr - - // Specify the pagination token from a previous request to retrieve the next page - // of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamDiscoveredResourceCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamDiscoveredResourceCidrs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamDiscoveredResourceCidrs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamDiscoveredResourceCidrsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamDiscoveredResourceCidrs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetIpamDiscoveredResourceCidrsAPIClient is a client that implements the -// GetIpamDiscoveredResourceCidrs operation. -type GetIpamDiscoveredResourceCidrsAPIClient interface { - GetIpamDiscoveredResourceCidrs(context.Context, *GetIpamDiscoveredResourceCidrsInput, ...func(*Options)) (*GetIpamDiscoveredResourceCidrsOutput, error) -} - -var _ GetIpamDiscoveredResourceCidrsAPIClient = (*Client)(nil) - -// GetIpamDiscoveredResourceCidrsPaginatorOptions is the paginator options for -// GetIpamDiscoveredResourceCidrs -type GetIpamDiscoveredResourceCidrsPaginatorOptions struct { - // The maximum number of discovered resource CIDRs to return in one page of - // results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetIpamDiscoveredResourceCidrsPaginator is a paginator for -// GetIpamDiscoveredResourceCidrs -type GetIpamDiscoveredResourceCidrsPaginator struct { - options GetIpamDiscoveredResourceCidrsPaginatorOptions - client GetIpamDiscoveredResourceCidrsAPIClient - params *GetIpamDiscoveredResourceCidrsInput - nextToken *string - firstPage bool -} - -// NewGetIpamDiscoveredResourceCidrsPaginator returns a new -// GetIpamDiscoveredResourceCidrsPaginator -func NewGetIpamDiscoveredResourceCidrsPaginator(client GetIpamDiscoveredResourceCidrsAPIClient, params *GetIpamDiscoveredResourceCidrsInput, optFns ...func(*GetIpamDiscoveredResourceCidrsPaginatorOptions)) *GetIpamDiscoveredResourceCidrsPaginator { - if params == nil { - params = &GetIpamDiscoveredResourceCidrsInput{} - } - - options := GetIpamDiscoveredResourceCidrsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetIpamDiscoveredResourceCidrsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetIpamDiscoveredResourceCidrsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetIpamDiscoveredResourceCidrs page. -func (p *GetIpamDiscoveredResourceCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetIpamDiscoveredResourceCidrsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetIpamDiscoveredResourceCidrs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetIpamDiscoveredResourceCidrs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamDiscoveredResourceCidrs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamPoolAllocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamPoolAllocations.go deleted file mode 100644 index 28ad65dbe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamPoolAllocations.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get a list of all the CIDR allocations in an IPAM pool. The Region you use -// should be the IPAM pool locale. The locale is the Amazon Web Services Region -// where this IPAM pool is available for allocations. If you use this action after -// AllocateIpamPoolCidr (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AllocateIpamPoolCidr.html) -// or ReleaseIpamPoolAllocation (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReleaseIpamPoolAllocation.html) -// , note that all EC2 API actions follow an eventual consistency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html#eventual-consistency) -// model. -func (c *Client) GetIpamPoolAllocations(ctx context.Context, params *GetIpamPoolAllocationsInput, optFns ...func(*Options)) (*GetIpamPoolAllocationsOutput, error) { - if params == nil { - params = &GetIpamPoolAllocationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamPoolAllocations", params, optFns, c.addOperationGetIpamPoolAllocationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamPoolAllocationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamPoolAllocationsInput struct { - - // The ID of the IPAM pool you want to see the allocations for. - // - // This member is required. - IpamPoolId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters for the request. For more information about filtering, see - // Filtering CLI output (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html) - // . - Filters []types.Filter - - // The ID of the allocation. - IpamPoolAllocationId *string - - // The maximum number of results you would like returned per page. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetIpamPoolAllocationsOutput struct { - - // The IPAM pool allocations you want information on. - IpamPoolAllocations []types.IpamPoolAllocation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamPoolAllocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamPoolAllocations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamPoolAllocations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamPoolAllocations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamPoolAllocationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamPoolAllocations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetIpamPoolAllocationsAPIClient is a client that implements the -// GetIpamPoolAllocations operation. -type GetIpamPoolAllocationsAPIClient interface { - GetIpamPoolAllocations(context.Context, *GetIpamPoolAllocationsInput, ...func(*Options)) (*GetIpamPoolAllocationsOutput, error) -} - -var _ GetIpamPoolAllocationsAPIClient = (*Client)(nil) - -// GetIpamPoolAllocationsPaginatorOptions is the paginator options for -// GetIpamPoolAllocations -type GetIpamPoolAllocationsPaginatorOptions struct { - // The maximum number of results you would like returned per page. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetIpamPoolAllocationsPaginator is a paginator for GetIpamPoolAllocations -type GetIpamPoolAllocationsPaginator struct { - options GetIpamPoolAllocationsPaginatorOptions - client GetIpamPoolAllocationsAPIClient - params *GetIpamPoolAllocationsInput - nextToken *string - firstPage bool -} - -// NewGetIpamPoolAllocationsPaginator returns a new GetIpamPoolAllocationsPaginator -func NewGetIpamPoolAllocationsPaginator(client GetIpamPoolAllocationsAPIClient, params *GetIpamPoolAllocationsInput, optFns ...func(*GetIpamPoolAllocationsPaginatorOptions)) *GetIpamPoolAllocationsPaginator { - if params == nil { - params = &GetIpamPoolAllocationsInput{} - } - - options := GetIpamPoolAllocationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetIpamPoolAllocationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetIpamPoolAllocationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetIpamPoolAllocations page. -func (p *GetIpamPoolAllocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetIpamPoolAllocationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetIpamPoolAllocations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetIpamPoolAllocations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamPoolAllocations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamPoolCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamPoolCidrs.go deleted file mode 100644 index f5bbfc13c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamPoolCidrs.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get the CIDRs provisioned to an IPAM pool. -func (c *Client) GetIpamPoolCidrs(ctx context.Context, params *GetIpamPoolCidrsInput, optFns ...func(*Options)) (*GetIpamPoolCidrsOutput, error) { - if params == nil { - params = &GetIpamPoolCidrsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamPoolCidrs", params, optFns, c.addOperationGetIpamPoolCidrsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamPoolCidrsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamPoolCidrsInput struct { - - // The ID of the IPAM pool you want the CIDR for. - // - // This member is required. - IpamPoolId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters for the request. For more information about filtering, see - // Filtering CLI output (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html) - // . - Filters []types.Filter - - // The maximum number of results to return in the request. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetIpamPoolCidrsOutput struct { - - // Information about the CIDRs provisioned to an IPAM pool. - IpamPoolCidrs []types.IpamPoolCidr - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamPoolCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamPoolCidrs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamPoolCidrs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamPoolCidrs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamPoolCidrsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamPoolCidrs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetIpamPoolCidrsAPIClient is a client that implements the GetIpamPoolCidrs -// operation. -type GetIpamPoolCidrsAPIClient interface { - GetIpamPoolCidrs(context.Context, *GetIpamPoolCidrsInput, ...func(*Options)) (*GetIpamPoolCidrsOutput, error) -} - -var _ GetIpamPoolCidrsAPIClient = (*Client)(nil) - -// GetIpamPoolCidrsPaginatorOptions is the paginator options for GetIpamPoolCidrs -type GetIpamPoolCidrsPaginatorOptions struct { - // The maximum number of results to return in the request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetIpamPoolCidrsPaginator is a paginator for GetIpamPoolCidrs -type GetIpamPoolCidrsPaginator struct { - options GetIpamPoolCidrsPaginatorOptions - client GetIpamPoolCidrsAPIClient - params *GetIpamPoolCidrsInput - nextToken *string - firstPage bool -} - -// NewGetIpamPoolCidrsPaginator returns a new GetIpamPoolCidrsPaginator -func NewGetIpamPoolCidrsPaginator(client GetIpamPoolCidrsAPIClient, params *GetIpamPoolCidrsInput, optFns ...func(*GetIpamPoolCidrsPaginatorOptions)) *GetIpamPoolCidrsPaginator { - if params == nil { - params = &GetIpamPoolCidrsInput{} - } - - options := GetIpamPoolCidrsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetIpamPoolCidrsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetIpamPoolCidrsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetIpamPoolCidrs page. -func (p *GetIpamPoolCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetIpamPoolCidrsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetIpamPoolCidrs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetIpamPoolCidrs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamPoolCidrs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamResourceCidrs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamResourceCidrs.go deleted file mode 100644 index 7cc861878..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetIpamResourceCidrs.go +++ /dev/null @@ -1,267 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns resource CIDRs managed by IPAM in a given scope. If an IPAM is -// associated with more than one resource discovery, the resource CIDRs across all -// of the resource discoveries is returned. A resource discovery is an IPAM -// component that enables IPAM to manage and monitor resources that belong to the -// owning account. -func (c *Client) GetIpamResourceCidrs(ctx context.Context, params *GetIpamResourceCidrsInput, optFns ...func(*Options)) (*GetIpamResourceCidrsOutput, error) { - if params == nil { - params = &GetIpamResourceCidrsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIpamResourceCidrs", params, optFns, c.addOperationGetIpamResourceCidrsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetIpamResourceCidrsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetIpamResourceCidrsInput struct { - - // The ID of the scope that the resource is in. - // - // This member is required. - IpamScopeId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters for the request. For more information about filtering, see - // Filtering CLI output (https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html) - // . - Filters []types.Filter - - // The ID of the IPAM pool that the resource is in. - IpamPoolId *string - - // The maximum number of results to return in the request. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The ID of the resource. - ResourceId *string - - // The ID of the Amazon Web Services account that owns the resource. - ResourceOwner *string - - // The resource tag. - ResourceTag *types.RequestIpamResourceTag - - // The resource type. - ResourceType types.IpamResourceType - - noSmithyDocumentSerde -} - -type GetIpamResourceCidrsOutput struct { - - // The resource CIDRs. - IpamResourceCidrs []types.IpamResourceCidr - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetIpamResourceCidrsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetIpamResourceCidrs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetIpamResourceCidrs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetIpamResourceCidrs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetIpamResourceCidrsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetIpamResourceCidrs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetIpamResourceCidrsAPIClient is a client that implements the -// GetIpamResourceCidrs operation. -type GetIpamResourceCidrsAPIClient interface { - GetIpamResourceCidrs(context.Context, *GetIpamResourceCidrsInput, ...func(*Options)) (*GetIpamResourceCidrsOutput, error) -} - -var _ GetIpamResourceCidrsAPIClient = (*Client)(nil) - -// GetIpamResourceCidrsPaginatorOptions is the paginator options for -// GetIpamResourceCidrs -type GetIpamResourceCidrsPaginatorOptions struct { - // The maximum number of results to return in the request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetIpamResourceCidrsPaginator is a paginator for GetIpamResourceCidrs -type GetIpamResourceCidrsPaginator struct { - options GetIpamResourceCidrsPaginatorOptions - client GetIpamResourceCidrsAPIClient - params *GetIpamResourceCidrsInput - nextToken *string - firstPage bool -} - -// NewGetIpamResourceCidrsPaginator returns a new GetIpamResourceCidrsPaginator -func NewGetIpamResourceCidrsPaginator(client GetIpamResourceCidrsAPIClient, params *GetIpamResourceCidrsInput, optFns ...func(*GetIpamResourceCidrsPaginatorOptions)) *GetIpamResourceCidrsPaginator { - if params == nil { - params = &GetIpamResourceCidrsInput{} - } - - options := GetIpamResourceCidrsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetIpamResourceCidrsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetIpamResourceCidrsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetIpamResourceCidrs page. -func (p *GetIpamResourceCidrsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetIpamResourceCidrsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetIpamResourceCidrs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetIpamResourceCidrs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetIpamResourceCidrs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetLaunchTemplateData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetLaunchTemplateData.go deleted file mode 100644 index 2525bfa66..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetLaunchTemplateData.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the configuration data of the specified instance. You can use this -// data to create a launch template. This action calls on other describe actions to -// get instance information. Depending on your instance configuration, you may need -// to allow the following actions in your IAM policy: DescribeSpotInstanceRequests -// , DescribeInstanceCreditSpecifications , DescribeVolumes , and -// DescribeInstanceAttribute . Or, you can allow describe* depending on your -// instance requirements. -func (c *Client) GetLaunchTemplateData(ctx context.Context, params *GetLaunchTemplateDataInput, optFns ...func(*Options)) (*GetLaunchTemplateDataOutput, error) { - if params == nil { - params = &GetLaunchTemplateDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetLaunchTemplateData", params, optFns, c.addOperationGetLaunchTemplateDataMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetLaunchTemplateDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetLaunchTemplateDataInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetLaunchTemplateDataOutput struct { - - // The instance data. - LaunchTemplateData *types.ResponseLaunchTemplateData - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetLaunchTemplateDataMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetLaunchTemplateData{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetLaunchTemplateData{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetLaunchTemplateData"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetLaunchTemplateDataValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetLaunchTemplateData(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetLaunchTemplateData(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetLaunchTemplateData", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListAssociations.go deleted file mode 100644 index f0a791e2e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListAssociations.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the resources that are associated with the specified -// managed prefix list. -func (c *Client) GetManagedPrefixListAssociations(ctx context.Context, params *GetManagedPrefixListAssociationsInput, optFns ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error) { - if params == nil { - params = &GetManagedPrefixListAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetManagedPrefixListAssociations", params, optFns, c.addOperationGetManagedPrefixListAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetManagedPrefixListAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetManagedPrefixListAssociationsInput struct { - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetManagedPrefixListAssociationsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the associations. - PrefixListAssociations []types.PrefixListAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetManagedPrefixListAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetManagedPrefixListAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetManagedPrefixListAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetManagedPrefixListAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetManagedPrefixListAssociationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetManagedPrefixListAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetManagedPrefixListAssociationsAPIClient is a client that implements the -// GetManagedPrefixListAssociations operation. -type GetManagedPrefixListAssociationsAPIClient interface { - GetManagedPrefixListAssociations(context.Context, *GetManagedPrefixListAssociationsInput, ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error) -} - -var _ GetManagedPrefixListAssociationsAPIClient = (*Client)(nil) - -// GetManagedPrefixListAssociationsPaginatorOptions is the paginator options for -// GetManagedPrefixListAssociations -type GetManagedPrefixListAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetManagedPrefixListAssociationsPaginator is a paginator for -// GetManagedPrefixListAssociations -type GetManagedPrefixListAssociationsPaginator struct { - options GetManagedPrefixListAssociationsPaginatorOptions - client GetManagedPrefixListAssociationsAPIClient - params *GetManagedPrefixListAssociationsInput - nextToken *string - firstPage bool -} - -// NewGetManagedPrefixListAssociationsPaginator returns a new -// GetManagedPrefixListAssociationsPaginator -func NewGetManagedPrefixListAssociationsPaginator(client GetManagedPrefixListAssociationsAPIClient, params *GetManagedPrefixListAssociationsInput, optFns ...func(*GetManagedPrefixListAssociationsPaginatorOptions)) *GetManagedPrefixListAssociationsPaginator { - if params == nil { - params = &GetManagedPrefixListAssociationsInput{} - } - - options := GetManagedPrefixListAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetManagedPrefixListAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetManagedPrefixListAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetManagedPrefixListAssociations page. -func (p *GetManagedPrefixListAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetManagedPrefixListAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetManagedPrefixListAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetManagedPrefixListAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetManagedPrefixListAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListEntries.go deleted file mode 100644 index cd286ee08..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetManagedPrefixListEntries.go +++ /dev/null @@ -1,251 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the entries for a specified managed prefix list. -func (c *Client) GetManagedPrefixListEntries(ctx context.Context, params *GetManagedPrefixListEntriesInput, optFns ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error) { - if params == nil { - params = &GetManagedPrefixListEntriesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetManagedPrefixListEntries", params, optFns, c.addOperationGetManagedPrefixListEntriesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetManagedPrefixListEntriesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetManagedPrefixListEntriesInput struct { - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - // The version of the prefix list for which to return the entries. The default is - // the current version. - TargetVersion *int64 - - noSmithyDocumentSerde -} - -type GetManagedPrefixListEntriesOutput struct { - - // Information about the prefix list entries. - Entries []types.PrefixListEntry - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetManagedPrefixListEntriesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetManagedPrefixListEntries{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetManagedPrefixListEntries{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetManagedPrefixListEntries"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetManagedPrefixListEntriesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetManagedPrefixListEntries(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetManagedPrefixListEntriesAPIClient is a client that implements the -// GetManagedPrefixListEntries operation. -type GetManagedPrefixListEntriesAPIClient interface { - GetManagedPrefixListEntries(context.Context, *GetManagedPrefixListEntriesInput, ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error) -} - -var _ GetManagedPrefixListEntriesAPIClient = (*Client)(nil) - -// GetManagedPrefixListEntriesPaginatorOptions is the paginator options for -// GetManagedPrefixListEntries -type GetManagedPrefixListEntriesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetManagedPrefixListEntriesPaginator is a paginator for -// GetManagedPrefixListEntries -type GetManagedPrefixListEntriesPaginator struct { - options GetManagedPrefixListEntriesPaginatorOptions - client GetManagedPrefixListEntriesAPIClient - params *GetManagedPrefixListEntriesInput - nextToken *string - firstPage bool -} - -// NewGetManagedPrefixListEntriesPaginator returns a new -// GetManagedPrefixListEntriesPaginator -func NewGetManagedPrefixListEntriesPaginator(client GetManagedPrefixListEntriesAPIClient, params *GetManagedPrefixListEntriesInput, optFns ...func(*GetManagedPrefixListEntriesPaginatorOptions)) *GetManagedPrefixListEntriesPaginator { - if params == nil { - params = &GetManagedPrefixListEntriesInput{} - } - - options := GetManagedPrefixListEntriesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetManagedPrefixListEntriesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetManagedPrefixListEntriesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetManagedPrefixListEntries page. -func (p *GetManagedPrefixListEntriesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetManagedPrefixListEntriesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetManagedPrefixListEntries(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetManagedPrefixListEntries(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetManagedPrefixListEntries", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go deleted file mode 100644 index 05c606274..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the findings for the specified Network Access Scope analysis. -func (c *Client) GetNetworkInsightsAccessScopeAnalysisFindings(ctx context.Context, params *GetNetworkInsightsAccessScopeAnalysisFindingsInput, optFns ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, error) { - if params == nil { - params = &GetNetworkInsightsAccessScopeAnalysisFindingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetNetworkInsightsAccessScopeAnalysisFindings", params, optFns, c.addOperationGetNetworkInsightsAccessScopeAnalysisFindingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetNetworkInsightsAccessScopeAnalysisFindingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetNetworkInsightsAccessScopeAnalysisFindingsInput struct { - - // The ID of the Network Access Scope analysis. - // - // This member is required. - NetworkInsightsAccessScopeAnalysisId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetNetworkInsightsAccessScopeAnalysisFindingsOutput struct { - - // The findings associated with Network Access Scope Analysis. - AnalysisFindings []types.AccessScopeAnalysisFinding - - // The status of Network Access Scope Analysis. - AnalysisStatus types.AnalysisStatus - - // The ID of the Network Access Scope analysis. - NetworkInsightsAccessScopeAnalysisId *string - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetNetworkInsightsAccessScopeAnalysisFindingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetNetworkInsightsAccessScopeAnalysisFindings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetNetworkInsightsAccessScopeAnalysisFindings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetNetworkInsightsAccessScopeAnalysisFindingsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNetworkInsightsAccessScopeAnalysisFindings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient is a client that -// implements the GetNetworkInsightsAccessScopeAnalysisFindings operation. -type GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient interface { - GetNetworkInsightsAccessScopeAnalysisFindings(context.Context, *GetNetworkInsightsAccessScopeAnalysisFindingsInput, ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, error) -} - -var _ GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient = (*Client)(nil) - -// GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions is the paginator -// options for GetNetworkInsightsAccessScopeAnalysisFindings -type GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetNetworkInsightsAccessScopeAnalysisFindingsPaginator is a paginator for -// GetNetworkInsightsAccessScopeAnalysisFindings -type GetNetworkInsightsAccessScopeAnalysisFindingsPaginator struct { - options GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions - client GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient - params *GetNetworkInsightsAccessScopeAnalysisFindingsInput - nextToken *string - firstPage bool -} - -// NewGetNetworkInsightsAccessScopeAnalysisFindingsPaginator returns a new -// GetNetworkInsightsAccessScopeAnalysisFindingsPaginator -func NewGetNetworkInsightsAccessScopeAnalysisFindingsPaginator(client GetNetworkInsightsAccessScopeAnalysisFindingsAPIClient, params *GetNetworkInsightsAccessScopeAnalysisFindingsInput, optFns ...func(*GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions)) *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator { - if params == nil { - params = &GetNetworkInsightsAccessScopeAnalysisFindingsInput{} - } - - options := GetNetworkInsightsAccessScopeAnalysisFindingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetNetworkInsightsAccessScopeAnalysisFindingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetNetworkInsightsAccessScopeAnalysisFindings page. -func (p *GetNetworkInsightsAccessScopeAnalysisFindingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetNetworkInsightsAccessScopeAnalysisFindingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetNetworkInsightsAccessScopeAnalysisFindings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetNetworkInsightsAccessScopeAnalysisFindings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetNetworkInsightsAccessScopeAnalysisFindings", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go deleted file mode 100644 index 25a73e8e3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetNetworkInsightsAccessScopeContent.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the content for the specified Network Access Scope. -func (c *Client) GetNetworkInsightsAccessScopeContent(ctx context.Context, params *GetNetworkInsightsAccessScopeContentInput, optFns ...func(*Options)) (*GetNetworkInsightsAccessScopeContentOutput, error) { - if params == nil { - params = &GetNetworkInsightsAccessScopeContentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetNetworkInsightsAccessScopeContent", params, optFns, c.addOperationGetNetworkInsightsAccessScopeContentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetNetworkInsightsAccessScopeContentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetNetworkInsightsAccessScopeContentInput struct { - - // The ID of the Network Access Scope. - // - // This member is required. - NetworkInsightsAccessScopeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetNetworkInsightsAccessScopeContentOutput struct { - - // The Network Access Scope content. - NetworkInsightsAccessScopeContent *types.NetworkInsightsAccessScopeContent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetNetworkInsightsAccessScopeContentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetNetworkInsightsAccessScopeContent{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetNetworkInsightsAccessScopeContent"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetNetworkInsightsAccessScopeContentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetNetworkInsightsAccessScopeContent(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetNetworkInsightsAccessScopeContent(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetNetworkInsightsAccessScopeContent", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go deleted file mode 100644 index f00f104a5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetPasswordData.go +++ /dev/null @@ -1,351 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "github.com/jmespath/go-jmespath" - "strconv" - "time" -) - -// Retrieves the encrypted administrator password for a running Windows instance. -// The Windows password is generated at boot by the EC2Config service or EC2Launch -// scripts (Windows Server 2016 and later). This usually only happens the first -// time an instance is launched. For more information, see EC2Config (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html) -// and EC2Launch (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html) -// in the Amazon EC2 User Guide. For the EC2Config service, the password is not -// generated for rebundled AMIs unless Ec2SetPassword is enabled before bundling. -// The password is encrypted using the key pair that you specified when you -// launched the instance. You must provide the corresponding key pair file. When -// you launch an instance, password generation and encryption may take a few -// minutes. If you try to retrieve the password before it's available, the output -// returns an empty string. We recommend that you wait up to 15 minutes after -// launching an instance before trying to retrieve the generated password. -func (c *Client) GetPasswordData(ctx context.Context, params *GetPasswordDataInput, optFns ...func(*Options)) (*GetPasswordDataOutput, error) { - if params == nil { - params = &GetPasswordDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetPasswordData", params, optFns, c.addOperationGetPasswordDataMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetPasswordDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetPasswordDataInput struct { - - // The ID of the Windows instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetPasswordDataOutput struct { - - // The ID of the Windows instance. - InstanceId *string - - // The password of the instance. Returns an empty string if the password is not - // available. - PasswordData *string - - // The time the data was last updated. - Timestamp *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetPasswordDataMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetPasswordData{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetPasswordData{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetPasswordData"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetPasswordDataValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPasswordData(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetPasswordDataAPIClient is a client that implements the GetPasswordData -// operation. -type GetPasswordDataAPIClient interface { - GetPasswordData(context.Context, *GetPasswordDataInput, ...func(*Options)) (*GetPasswordDataOutput, error) -} - -var _ GetPasswordDataAPIClient = (*Client)(nil) - -// PasswordDataAvailableWaiterOptions are waiter options for -// PasswordDataAvailableWaiter -type PasswordDataAvailableWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // PasswordDataAvailableWaiter will use default minimum delay of 15 seconds. Note - // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, PasswordDataAvailableWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. By - // default service-modeled logic will populate this option. This option can thus be - // used to define a custom waiter state with fall-back to service-modeled waiter - // state mutators.The function returns an error in case of a failure state. In case - // of retry state, this function returns a bool value of true and nil error, while - // in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetPasswordDataInput, *GetPasswordDataOutput, error) (bool, error) -} - -// PasswordDataAvailableWaiter defines the waiters for PasswordDataAvailable -type PasswordDataAvailableWaiter struct { - client GetPasswordDataAPIClient - - options PasswordDataAvailableWaiterOptions -} - -// NewPasswordDataAvailableWaiter constructs a PasswordDataAvailableWaiter. -func NewPasswordDataAvailableWaiter(client GetPasswordDataAPIClient, optFns ...func(*PasswordDataAvailableWaiterOptions)) *PasswordDataAvailableWaiter { - options := PasswordDataAvailableWaiterOptions{} - options.MinDelay = 15 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = passwordDataAvailableStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &PasswordDataAvailableWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for PasswordDataAvailable waiter. The maxWaitDur -// is the maximum wait duration the waiter will wait. The maxWaitDur is required -// and must be greater than zero. -func (w *PasswordDataAvailableWaiter) Wait(ctx context.Context, params *GetPasswordDataInput, maxWaitDur time.Duration, optFns ...func(*PasswordDataAvailableWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for PasswordDataAvailable waiter and -// returns the output of the successful operation. The maxWaitDur is the maximum -// wait duration the waiter will wait. The maxWaitDur is required and must be -// greater than zero. -func (w *PasswordDataAvailableWaiter) WaitForOutput(ctx context.Context, params *GetPasswordDataInput, maxWaitDur time.Duration, optFns ...func(*PasswordDataAvailableWaiterOptions)) (*GetPasswordDataOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetPasswordData(ctx, params, func(o *Options) { - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for PasswordDataAvailable waiter") -} - -func passwordDataAvailableStateRetryable(ctx context.Context, input *GetPasswordDataInput, output *GetPasswordDataOutput, err error) (bool, error) { - - if err == nil { - pathValue, err := jmespath.Search("length(PasswordData) > `0`", output) - if err != nil { - return false, fmt.Errorf("error evaluating waiter state: %w", err) - } - - expectedValue := "true" - bv, err := strconv.ParseBool(expectedValue) - if err != nil { - return false, fmt.Errorf("error parsing boolean from string %w", err) - } - value, ok := pathValue.(bool) - if !ok { - return false, fmt.Errorf("waiter comparator expected bool value got %T", pathValue) - } - - if value == bv { - return false, nil - } - } - - return true, nil -} - -func newServiceMetadataMiddleware_opGetPasswordData(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetPasswordData", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetReservedInstancesExchangeQuote.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetReservedInstancesExchangeQuote.go deleted file mode 100644 index 7815c7e13..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetReservedInstancesExchangeQuote.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Returns a quote and exchange information for exchanging one or more specified -// Convertible Reserved Instances for a new Convertible Reserved Instance. If the -// exchange cannot be performed, the reason is returned in the response. Use -// AcceptReservedInstancesExchangeQuote to perform the exchange. -func (c *Client) GetReservedInstancesExchangeQuote(ctx context.Context, params *GetReservedInstancesExchangeQuoteInput, optFns ...func(*Options)) (*GetReservedInstancesExchangeQuoteOutput, error) { - if params == nil { - params = &GetReservedInstancesExchangeQuoteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetReservedInstancesExchangeQuote", params, optFns, c.addOperationGetReservedInstancesExchangeQuoteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetReservedInstancesExchangeQuoteOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for GetReservedInstanceExchangeQuote. -type GetReservedInstancesExchangeQuoteInput struct { - - // The IDs of the Convertible Reserved Instances to exchange. - // - // This member is required. - ReservedInstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The configuration of the target Convertible Reserved Instance to exchange for - // your current Convertible Reserved Instances. - TargetConfigurations []types.TargetConfigurationRequest - - noSmithyDocumentSerde -} - -// Contains the output of GetReservedInstancesExchangeQuote. -type GetReservedInstancesExchangeQuoteOutput struct { - - // The currency of the transaction. - CurrencyCode *string - - // If true , the exchange is valid. If false , the exchange cannot be completed. - IsValidExchange *bool - - // The new end date of the reservation term. - OutputReservedInstancesWillExpireAt *time.Time - - // The total true upfront charge for the exchange. - PaymentDue *string - - // The cost associated with the Reserved Instance. - ReservedInstanceValueRollup *types.ReservationValue - - // The configuration of your Convertible Reserved Instances. - ReservedInstanceValueSet []types.ReservedInstanceReservationValue - - // The cost associated with the Reserved Instance. - TargetConfigurationValueRollup *types.ReservationValue - - // The values of the target Convertible Reserved Instances. - TargetConfigurationValueSet []types.TargetReservationValue - - // Describes the reason why the exchange cannot be completed. - ValidationFailureReason *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetReservedInstancesExchangeQuoteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetReservedInstancesExchangeQuote{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetReservedInstancesExchangeQuote{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetReservedInstancesExchangeQuote"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetReservedInstancesExchangeQuoteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReservedInstancesExchangeQuote(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetReservedInstancesExchangeQuote(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetReservedInstancesExchangeQuote", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSecurityGroupsForVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSecurityGroupsForVpc.go deleted file mode 100644 index cdb1912b5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSecurityGroupsForVpc.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets security groups that can be associated by the Amazon Web Services account -// making the request with network interfaces in the specified VPC. -func (c *Client) GetSecurityGroupsForVpc(ctx context.Context, params *GetSecurityGroupsForVpcInput, optFns ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) { - if params == nil { - params = &GetSecurityGroupsForVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSecurityGroupsForVpc", params, optFns, c.addOperationGetSecurityGroupsForVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSecurityGroupsForVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSecurityGroupsForVpcInput struct { - - // The VPC ID where the security group can be used. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters. If using multiple filters, the results include security groups - // which match all filters. - // - group-id : The security group ID. - // - description : The security group's description. - // - group-name : The security group name. - // - owner-id : The security group owner ID. - // - primary-vpc-id : The VPC ID in which the security group was created. - Filters []types.Filter - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type GetSecurityGroupsForVpcOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The security group that can be used by interfaces in the VPC. - SecurityGroupForVpcs []types.SecurityGroupForVpc - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSecurityGroupsForVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetSecurityGroupsForVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSecurityGroupsForVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSecurityGroupsForVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetSecurityGroupsForVpcValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSecurityGroupsForVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetSecurityGroupsForVpcAPIClient is a client that implements the -// GetSecurityGroupsForVpc operation. -type GetSecurityGroupsForVpcAPIClient interface { - GetSecurityGroupsForVpc(context.Context, *GetSecurityGroupsForVpcInput, ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) -} - -var _ GetSecurityGroupsForVpcAPIClient = (*Client)(nil) - -// GetSecurityGroupsForVpcPaginatorOptions is the paginator options for -// GetSecurityGroupsForVpc -type GetSecurityGroupsForVpcPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetSecurityGroupsForVpcPaginator is a paginator for GetSecurityGroupsForVpc -type GetSecurityGroupsForVpcPaginator struct { - options GetSecurityGroupsForVpcPaginatorOptions - client GetSecurityGroupsForVpcAPIClient - params *GetSecurityGroupsForVpcInput - nextToken *string - firstPage bool -} - -// NewGetSecurityGroupsForVpcPaginator returns a new -// GetSecurityGroupsForVpcPaginator -func NewGetSecurityGroupsForVpcPaginator(client GetSecurityGroupsForVpcAPIClient, params *GetSecurityGroupsForVpcInput, optFns ...func(*GetSecurityGroupsForVpcPaginatorOptions)) *GetSecurityGroupsForVpcPaginator { - if params == nil { - params = &GetSecurityGroupsForVpcInput{} - } - - options := GetSecurityGroupsForVpcPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetSecurityGroupsForVpcPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetSecurityGroupsForVpcPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetSecurityGroupsForVpc page. -func (p *GetSecurityGroupsForVpcPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetSecurityGroupsForVpcOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetSecurityGroupsForVpc(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetSecurityGroupsForVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSecurityGroupsForVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSerialConsoleAccessStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSerialConsoleAccessStatus.go deleted file mode 100644 index 0ee6bb2d6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSerialConsoleAccessStatus.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the access status of your account to the EC2 serial console of all -// instances. By default, access to the EC2 serial console is disabled for your -// account. For more information, see Manage account access to the EC2 serial -// console (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access) -// in the Amazon EC2 User Guide. -func (c *Client) GetSerialConsoleAccessStatus(ctx context.Context, params *GetSerialConsoleAccessStatusInput, optFns ...func(*Options)) (*GetSerialConsoleAccessStatusOutput, error) { - if params == nil { - params = &GetSerialConsoleAccessStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSerialConsoleAccessStatus", params, optFns, c.addOperationGetSerialConsoleAccessStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSerialConsoleAccessStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSerialConsoleAccessStatusInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetSerialConsoleAccessStatusOutput struct { - - // If true , access to the EC2 serial console of all instances is enabled for your - // account. If false , access to the EC2 serial console of all instances is - // disabled for your account. - SerialConsoleAccessEnabled *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSerialConsoleAccessStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetSerialConsoleAccessStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSerialConsoleAccessStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSerialConsoleAccessStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSerialConsoleAccessStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSerialConsoleAccessStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSerialConsoleAccessStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go deleted file mode 100644 index dcf30b922..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSnapshotBlockPublicAccessState.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the current state of block public access for snapshots setting for the -// account and Region. For more information, see Block public access for snapshots (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-public-access-snapshots.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) GetSnapshotBlockPublicAccessState(ctx context.Context, params *GetSnapshotBlockPublicAccessStateInput, optFns ...func(*Options)) (*GetSnapshotBlockPublicAccessStateOutput, error) { - if params == nil { - params = &GetSnapshotBlockPublicAccessStateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSnapshotBlockPublicAccessState", params, optFns, c.addOperationGetSnapshotBlockPublicAccessStateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSnapshotBlockPublicAccessStateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSnapshotBlockPublicAccessStateInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetSnapshotBlockPublicAccessStateOutput struct { - - // The current state of block public access for snapshots. Possible values - // include: - // - block-all-sharing - All public sharing of snapshots is blocked. Users in the - // account can't request new public sharing. Additionally, snapshots that were - // already publicly shared are treated as private and are not publicly available. - // - block-new-sharing - Only new public sharing of snapshots is blocked. Users - // in the account can't request new public sharing. However, snapshots that were - // already publicly shared, remain publicly available. - // - unblocked - Public sharing is not blocked. Users can publicly share - // snapshots. - State types.SnapshotBlockPublicAccessState - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSnapshotBlockPublicAccessStateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetSnapshotBlockPublicAccessState{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSnapshotBlockPublicAccessState"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSnapshotBlockPublicAccessState(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSnapshotBlockPublicAccessState(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSnapshotBlockPublicAccessState", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSpotPlacementScores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSpotPlacementScores.go deleted file mode 100644 index 593e8ffcc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSpotPlacementScores.go +++ /dev/null @@ -1,293 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Calculates the Spot placement score for a Region or Availability Zone based on -// the specified target capacity and compute requirements. You can specify your -// compute requirements either by using InstanceRequirementsWithMetadata and -// letting Amazon EC2 choose the optimal instance types to fulfill your Spot -// request, or you can specify the instance types by using InstanceTypes . For more -// information, see Spot placement score (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html) -// in the Amazon EC2 User Guide. -func (c *Client) GetSpotPlacementScores(ctx context.Context, params *GetSpotPlacementScoresInput, optFns ...func(*Options)) (*GetSpotPlacementScoresOutput, error) { - if params == nil { - params = &GetSpotPlacementScoresInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSpotPlacementScores", params, optFns, c.addOperationGetSpotPlacementScoresMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSpotPlacementScoresOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSpotPlacementScoresInput struct { - - // The target capacity. - // - // This member is required. - TargetCapacity *int32 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirementsWithMetadata , you can't specify InstanceTypes . - InstanceRequirementsWithMetadata *types.InstanceRequirementsWithMetadataRequest - - // The instance types. We recommend that you specify at least three instance - // types. If you specify one or two instance types, or specify variations of a - // single instance type (for example, an m3.xlarge with and without instance - // storage), the returned placement score will always be low. If you specify - // InstanceTypes , you can't specify InstanceRequirementsWithMetadata . - InstanceTypes []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The Regions used to narrow down the list of Regions to be scored. Enter the - // Region code, for example, us-east-1 . - RegionNames []string - - // Specify true so that the response returns a list of scored Availability Zones. - // Otherwise, the response returns a list of scored Regions. A list of scored - // Availability Zones is useful if you want to launch all of your Spot capacity - // into a single Availability Zone. - SingleAvailabilityZone *bool - - // The unit for the target capacity. - TargetCapacityUnitType types.TargetCapacityUnitType - - noSmithyDocumentSerde -} - -type GetSpotPlacementScoresOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // The Spot placement score for the top 10 Regions or Availability Zones, scored - // on a scale from 1 to 10. Each score
 reflects how likely it is that each Region - // or Availability Zone will succeed at fulfilling the specified target capacity - // at the time of the Spot placement score request. A score of 10 means that your - // Spot capacity request is highly likely to succeed in that Region or Availability - // Zone. If you request a Spot placement score for Regions, a high score assumes - // that your fleet request will be configured to use all Availability Zones and the - // capacity-optimized allocation strategy. If you request a Spot placement score - // for Availability Zones, a high score assumes that your fleet request will be - // configured to use a single Availability Zone and the capacity-optimized - // allocation strategy. Different
 Regions or Availability Zones might return the - // same score. The Spot placement score serves as a recommendation only. No score - // guarantees that your Spot request will be fully or partially fulfilled. - SpotPlacementScores []types.SpotPlacementScore - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSpotPlacementScoresMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetSpotPlacementScores{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSpotPlacementScores{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSpotPlacementScores"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetSpotPlacementScoresValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSpotPlacementScores(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetSpotPlacementScoresAPIClient is a client that implements the -// GetSpotPlacementScores operation. -type GetSpotPlacementScoresAPIClient interface { - GetSpotPlacementScores(context.Context, *GetSpotPlacementScoresInput, ...func(*Options)) (*GetSpotPlacementScoresOutput, error) -} - -var _ GetSpotPlacementScoresAPIClient = (*Client)(nil) - -// GetSpotPlacementScoresPaginatorOptions is the paginator options for -// GetSpotPlacementScores -type GetSpotPlacementScoresPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetSpotPlacementScoresPaginator is a paginator for GetSpotPlacementScores -type GetSpotPlacementScoresPaginator struct { - options GetSpotPlacementScoresPaginatorOptions - client GetSpotPlacementScoresAPIClient - params *GetSpotPlacementScoresInput - nextToken *string - firstPage bool -} - -// NewGetSpotPlacementScoresPaginator returns a new GetSpotPlacementScoresPaginator -func NewGetSpotPlacementScoresPaginator(client GetSpotPlacementScoresAPIClient, params *GetSpotPlacementScoresInput, optFns ...func(*GetSpotPlacementScoresPaginatorOptions)) *GetSpotPlacementScoresPaginator { - if params == nil { - params = &GetSpotPlacementScoresInput{} - } - - options := GetSpotPlacementScoresPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetSpotPlacementScoresPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetSpotPlacementScoresPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetSpotPlacementScores page. -func (p *GetSpotPlacementScoresPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetSpotPlacementScoresOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetSpotPlacementScores(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetSpotPlacementScores(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSpotPlacementScores", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSubnetCidrReservations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSubnetCidrReservations.go deleted file mode 100644 index 0da21852c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetSubnetCidrReservations.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the subnet CIDR reservations. -func (c *Client) GetSubnetCidrReservations(ctx context.Context, params *GetSubnetCidrReservationsInput, optFns ...func(*Options)) (*GetSubnetCidrReservationsOutput, error) { - if params == nil { - params = &GetSubnetCidrReservationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSubnetCidrReservations", params, optFns, c.addOperationGetSubnetCidrReservationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSubnetCidrReservationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSubnetCidrReservationsInput struct { - - // The ID of the subnet. - // - // This member is required. - SubnetId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - reservationType - The type of reservation ( prefix | explicit ). - // - subnet-id - The ID of the subnet. - // - tag : - The key/value combination of a tag assigned to the resource. Use the - // tag key in the filter name and the tag value as the filter value. For example, - // to find all resources that have a tag with the key Owner and the value TeamA , - // specify tag:Owner for the filter name and TeamA for the filter value. - // - tag-key - The key of a tag assigned to the resource. Use this filter to find - // all resources assigned a tag with a specific key, regardless of the tag value. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetSubnetCidrReservationsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the IPv4 subnet CIDR reservations. - SubnetIpv4CidrReservations []types.SubnetCidrReservation - - // Information about the IPv6 subnet CIDR reservations. - SubnetIpv6CidrReservations []types.SubnetCidrReservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSubnetCidrReservationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetSubnetCidrReservations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetSubnetCidrReservations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSubnetCidrReservations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetSubnetCidrReservationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSubnetCidrReservations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSubnetCidrReservations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSubnetCidrReservations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go deleted file mode 100644 index 14a9ce419..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayAttachmentPropagations.go +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the route tables to which the specified resource attachment propagates -// routes. -func (c *Client) GetTransitGatewayAttachmentPropagations(ctx context.Context, params *GetTransitGatewayAttachmentPropagationsInput, optFns ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error) { - if params == nil { - params = &GetTransitGatewayAttachmentPropagationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayAttachmentPropagations", params, optFns, c.addOperationGetTransitGatewayAttachmentPropagationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayAttachmentPropagationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayAttachmentPropagationsInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - transit-gateway-route-table-id - The ID of the transit gateway route table. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayAttachmentPropagationsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the propagation route tables. - TransitGatewayAttachmentPropagations []types.TransitGatewayAttachmentPropagation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayAttachmentPropagationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayAttachmentPropagations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayAttachmentPropagationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayAttachmentPropagations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetTransitGatewayAttachmentPropagationsAPIClient is a client that implements -// the GetTransitGatewayAttachmentPropagations operation. -type GetTransitGatewayAttachmentPropagationsAPIClient interface { - GetTransitGatewayAttachmentPropagations(context.Context, *GetTransitGatewayAttachmentPropagationsInput, ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error) -} - -var _ GetTransitGatewayAttachmentPropagationsAPIClient = (*Client)(nil) - -// GetTransitGatewayAttachmentPropagationsPaginatorOptions is the paginator -// options for GetTransitGatewayAttachmentPropagations -type GetTransitGatewayAttachmentPropagationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetTransitGatewayAttachmentPropagationsPaginator is a paginator for -// GetTransitGatewayAttachmentPropagations -type GetTransitGatewayAttachmentPropagationsPaginator struct { - options GetTransitGatewayAttachmentPropagationsPaginatorOptions - client GetTransitGatewayAttachmentPropagationsAPIClient - params *GetTransitGatewayAttachmentPropagationsInput - nextToken *string - firstPage bool -} - -// NewGetTransitGatewayAttachmentPropagationsPaginator returns a new -// GetTransitGatewayAttachmentPropagationsPaginator -func NewGetTransitGatewayAttachmentPropagationsPaginator(client GetTransitGatewayAttachmentPropagationsAPIClient, params *GetTransitGatewayAttachmentPropagationsInput, optFns ...func(*GetTransitGatewayAttachmentPropagationsPaginatorOptions)) *GetTransitGatewayAttachmentPropagationsPaginator { - if params == nil { - params = &GetTransitGatewayAttachmentPropagationsInput{} - } - - options := GetTransitGatewayAttachmentPropagationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetTransitGatewayAttachmentPropagationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetTransitGatewayAttachmentPropagationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetTransitGatewayAttachmentPropagations page. -func (p *GetTransitGatewayAttachmentPropagationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayAttachmentPropagationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetTransitGatewayAttachmentPropagations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayAttachmentPropagations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayAttachmentPropagations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go deleted file mode 100644 index 51fe65582..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayMulticastDomainAssociations.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the associations for the transit gateway multicast -// domain. -func (c *Client) GetTransitGatewayMulticastDomainAssociations(ctx context.Context, params *GetTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error) { - if params == nil { - params = &GetTransitGatewayMulticastDomainAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayMulticastDomainAssociations", params, optFns, c.addOperationGetTransitGatewayMulticastDomainAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayMulticastDomainAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayMulticastDomainAssociationsInput struct { - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - resource-id - The ID of the resource. - // - resource-type - The type of resource. The valid value is: vpc . - // - state - The state of the subnet association. Valid values are associated | - // associating | disassociated | disassociating . - // - subnet-id - The ID of the subnet. - // - transit-gateway-attachment-id - The id of the transit gateway attachment. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayMulticastDomainAssociationsOutput struct { - - // Information about the multicast domain associations. - MulticastDomainAssociations []types.TransitGatewayMulticastDomainAssociation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayMulticastDomainAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayMulticastDomainAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayMulticastDomainAssociationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetTransitGatewayMulticastDomainAssociationsAPIClient is a client that -// implements the GetTransitGatewayMulticastDomainAssociations operation. -type GetTransitGatewayMulticastDomainAssociationsAPIClient interface { - GetTransitGatewayMulticastDomainAssociations(context.Context, *GetTransitGatewayMulticastDomainAssociationsInput, ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error) -} - -var _ GetTransitGatewayMulticastDomainAssociationsAPIClient = (*Client)(nil) - -// GetTransitGatewayMulticastDomainAssociationsPaginatorOptions is the paginator -// options for GetTransitGatewayMulticastDomainAssociations -type GetTransitGatewayMulticastDomainAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetTransitGatewayMulticastDomainAssociationsPaginator is a paginator for -// GetTransitGatewayMulticastDomainAssociations -type GetTransitGatewayMulticastDomainAssociationsPaginator struct { - options GetTransitGatewayMulticastDomainAssociationsPaginatorOptions - client GetTransitGatewayMulticastDomainAssociationsAPIClient - params *GetTransitGatewayMulticastDomainAssociationsInput - nextToken *string - firstPage bool -} - -// NewGetTransitGatewayMulticastDomainAssociationsPaginator returns a new -// GetTransitGatewayMulticastDomainAssociationsPaginator -func NewGetTransitGatewayMulticastDomainAssociationsPaginator(client GetTransitGatewayMulticastDomainAssociationsAPIClient, params *GetTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*GetTransitGatewayMulticastDomainAssociationsPaginatorOptions)) *GetTransitGatewayMulticastDomainAssociationsPaginator { - if params == nil { - params = &GetTransitGatewayMulticastDomainAssociationsInput{} - } - - options := GetTransitGatewayMulticastDomainAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetTransitGatewayMulticastDomainAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetTransitGatewayMulticastDomainAssociations page. -func (p *GetTransitGatewayMulticastDomainAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayMulticastDomainAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetTransitGatewayMulticastDomainAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayMulticastDomainAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go deleted file mode 100644 index 681a0976a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPolicyTableAssociations.go +++ /dev/null @@ -1,249 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets a list of the transit gateway policy table associations. -func (c *Client) GetTransitGatewayPolicyTableAssociations(ctx context.Context, params *GetTransitGatewayPolicyTableAssociationsInput, optFns ...func(*Options)) (*GetTransitGatewayPolicyTableAssociationsOutput, error) { - if params == nil { - params = &GetTransitGatewayPolicyTableAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayPolicyTableAssociations", params, optFns, c.addOperationGetTransitGatewayPolicyTableAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayPolicyTableAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayPolicyTableAssociationsInput struct { - - // The ID of the transit gateway policy table. - // - // This member is required. - TransitGatewayPolicyTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters associated with the transit gateway policy table. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayPolicyTableAssociationsOutput struct { - - // Returns details about the transit gateway policy table association. - Associations []types.TransitGatewayPolicyTableAssociation - - // The token for the next page of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayPolicyTableAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayPolicyTableAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayPolicyTableAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayPolicyTableAssociationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayPolicyTableAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetTransitGatewayPolicyTableAssociationsAPIClient is a client that implements -// the GetTransitGatewayPolicyTableAssociations operation. -type GetTransitGatewayPolicyTableAssociationsAPIClient interface { - GetTransitGatewayPolicyTableAssociations(context.Context, *GetTransitGatewayPolicyTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayPolicyTableAssociationsOutput, error) -} - -var _ GetTransitGatewayPolicyTableAssociationsAPIClient = (*Client)(nil) - -// GetTransitGatewayPolicyTableAssociationsPaginatorOptions is the paginator -// options for GetTransitGatewayPolicyTableAssociations -type GetTransitGatewayPolicyTableAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetTransitGatewayPolicyTableAssociationsPaginator is a paginator for -// GetTransitGatewayPolicyTableAssociations -type GetTransitGatewayPolicyTableAssociationsPaginator struct { - options GetTransitGatewayPolicyTableAssociationsPaginatorOptions - client GetTransitGatewayPolicyTableAssociationsAPIClient - params *GetTransitGatewayPolicyTableAssociationsInput - nextToken *string - firstPage bool -} - -// NewGetTransitGatewayPolicyTableAssociationsPaginator returns a new -// GetTransitGatewayPolicyTableAssociationsPaginator -func NewGetTransitGatewayPolicyTableAssociationsPaginator(client GetTransitGatewayPolicyTableAssociationsAPIClient, params *GetTransitGatewayPolicyTableAssociationsInput, optFns ...func(*GetTransitGatewayPolicyTableAssociationsPaginatorOptions)) *GetTransitGatewayPolicyTableAssociationsPaginator { - if params == nil { - params = &GetTransitGatewayPolicyTableAssociationsInput{} - } - - options := GetTransitGatewayPolicyTableAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetTransitGatewayPolicyTableAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetTransitGatewayPolicyTableAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetTransitGatewayPolicyTableAssociations page. -func (p *GetTransitGatewayPolicyTableAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayPolicyTableAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetTransitGatewayPolicyTableAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayPolicyTableAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayPolicyTableAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go deleted file mode 100644 index 8b70dc776..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPolicyTableEntries.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a list of transit gateway policy table entries. -func (c *Client) GetTransitGatewayPolicyTableEntries(ctx context.Context, params *GetTransitGatewayPolicyTableEntriesInput, optFns ...func(*Options)) (*GetTransitGatewayPolicyTableEntriesOutput, error) { - if params == nil { - params = &GetTransitGatewayPolicyTableEntriesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayPolicyTableEntries", params, optFns, c.addOperationGetTransitGatewayPolicyTableEntriesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayPolicyTableEntriesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayPolicyTableEntriesInput struct { - - // The ID of the transit gateway policy table. - // - // This member is required. - TransitGatewayPolicyTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The filters associated with the transit gateway policy table. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayPolicyTableEntriesOutput struct { - - // The entries for the transit gateway policy table. - TransitGatewayPolicyTableEntries []types.TransitGatewayPolicyTableEntry - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayPolicyTableEntriesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayPolicyTableEntries{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayPolicyTableEntries"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayPolicyTableEntriesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayPolicyTableEntries(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayPolicyTableEntries(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayPolicyTableEntries", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go deleted file mode 100644 index 2c47b03e7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayPrefixListReferences.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the prefix list references in a specified transit -// gateway route table. -func (c *Client) GetTransitGatewayPrefixListReferences(ctx context.Context, params *GetTransitGatewayPrefixListReferencesInput, optFns ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error) { - if params == nil { - params = &GetTransitGatewayPrefixListReferencesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayPrefixListReferences", params, optFns, c.addOperationGetTransitGatewayPrefixListReferencesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayPrefixListReferencesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayPrefixListReferencesInput struct { - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - attachment.resource-id - The ID of the resource for the attachment. - // - attachment.resource-type - The type of resource for the attachment. Valid - // values are vpc | vpn | direct-connect-gateway | peering . - // - attachment.transit-gateway-attachment-id - The ID of the attachment. - // - is-blackhole - Whether traffic matching the route is blocked ( true | false - // ). - // - prefix-list-id - The ID of the prefix list. - // - prefix-list-owner-id - The ID of the owner of the prefix list. - // - state - The state of the prefix list reference ( pending | available | - // modifying | deleting ). - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayPrefixListReferencesOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the prefix list references. - TransitGatewayPrefixListReferences []types.TransitGatewayPrefixListReference - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayPrefixListReferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayPrefixListReferences{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayPrefixListReferences"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayPrefixListReferencesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayPrefixListReferences(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetTransitGatewayPrefixListReferencesAPIClient is a client that implements the -// GetTransitGatewayPrefixListReferences operation. -type GetTransitGatewayPrefixListReferencesAPIClient interface { - GetTransitGatewayPrefixListReferences(context.Context, *GetTransitGatewayPrefixListReferencesInput, ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error) -} - -var _ GetTransitGatewayPrefixListReferencesAPIClient = (*Client)(nil) - -// GetTransitGatewayPrefixListReferencesPaginatorOptions is the paginator options -// for GetTransitGatewayPrefixListReferences -type GetTransitGatewayPrefixListReferencesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetTransitGatewayPrefixListReferencesPaginator is a paginator for -// GetTransitGatewayPrefixListReferences -type GetTransitGatewayPrefixListReferencesPaginator struct { - options GetTransitGatewayPrefixListReferencesPaginatorOptions - client GetTransitGatewayPrefixListReferencesAPIClient - params *GetTransitGatewayPrefixListReferencesInput - nextToken *string - firstPage bool -} - -// NewGetTransitGatewayPrefixListReferencesPaginator returns a new -// GetTransitGatewayPrefixListReferencesPaginator -func NewGetTransitGatewayPrefixListReferencesPaginator(client GetTransitGatewayPrefixListReferencesAPIClient, params *GetTransitGatewayPrefixListReferencesInput, optFns ...func(*GetTransitGatewayPrefixListReferencesPaginatorOptions)) *GetTransitGatewayPrefixListReferencesPaginator { - if params == nil { - params = &GetTransitGatewayPrefixListReferencesInput{} - } - - options := GetTransitGatewayPrefixListReferencesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetTransitGatewayPrefixListReferencesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetTransitGatewayPrefixListReferencesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetTransitGatewayPrefixListReferences page. -func (p *GetTransitGatewayPrefixListReferencesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayPrefixListReferencesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetTransitGatewayPrefixListReferences(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayPrefixListReferences(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayPrefixListReferences", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go deleted file mode 100644 index 6c0b51587..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTableAssociations.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the associations for the specified transit gateway route -// table. -func (c *Client) GetTransitGatewayRouteTableAssociations(ctx context.Context, params *GetTransitGatewayRouteTableAssociationsInput, optFns ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error) { - if params == nil { - params = &GetTransitGatewayRouteTableAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayRouteTableAssociations", params, optFns, c.addOperationGetTransitGatewayRouteTableAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayRouteTableAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayRouteTableAssociationsInput struct { - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - resource-id - The ID of the resource. - // - resource-type - The resource type. Valid values are vpc | vpn | - // direct-connect-gateway | peering | connect . - // - transit-gateway-attachment-id - The ID of the attachment. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayRouteTableAssociationsOutput struct { - - // Information about the associations. - Associations []types.TransitGatewayRouteTableAssociation - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayRouteTableAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayRouteTableAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayRouteTableAssociationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayRouteTableAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetTransitGatewayRouteTableAssociationsAPIClient is a client that implements -// the GetTransitGatewayRouteTableAssociations operation. -type GetTransitGatewayRouteTableAssociationsAPIClient interface { - GetTransitGatewayRouteTableAssociations(context.Context, *GetTransitGatewayRouteTableAssociationsInput, ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error) -} - -var _ GetTransitGatewayRouteTableAssociationsAPIClient = (*Client)(nil) - -// GetTransitGatewayRouteTableAssociationsPaginatorOptions is the paginator -// options for GetTransitGatewayRouteTableAssociations -type GetTransitGatewayRouteTableAssociationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetTransitGatewayRouteTableAssociationsPaginator is a paginator for -// GetTransitGatewayRouteTableAssociations -type GetTransitGatewayRouteTableAssociationsPaginator struct { - options GetTransitGatewayRouteTableAssociationsPaginatorOptions - client GetTransitGatewayRouteTableAssociationsAPIClient - params *GetTransitGatewayRouteTableAssociationsInput - nextToken *string - firstPage bool -} - -// NewGetTransitGatewayRouteTableAssociationsPaginator returns a new -// GetTransitGatewayRouteTableAssociationsPaginator -func NewGetTransitGatewayRouteTableAssociationsPaginator(client GetTransitGatewayRouteTableAssociationsAPIClient, params *GetTransitGatewayRouteTableAssociationsInput, optFns ...func(*GetTransitGatewayRouteTableAssociationsPaginatorOptions)) *GetTransitGatewayRouteTableAssociationsPaginator { - if params == nil { - params = &GetTransitGatewayRouteTableAssociationsInput{} - } - - options := GetTransitGatewayRouteTableAssociationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetTransitGatewayRouteTableAssociationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetTransitGatewayRouteTableAssociationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetTransitGatewayRouteTableAssociations page. -func (p *GetTransitGatewayRouteTableAssociationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayRouteTableAssociationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetTransitGatewayRouteTableAssociations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayRouteTableAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayRouteTableAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go deleted file mode 100644 index aa32f9a59..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetTransitGatewayRouteTablePropagations.go +++ /dev/null @@ -1,255 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the route table propagations for the specified transit -// gateway route table. -func (c *Client) GetTransitGatewayRouteTablePropagations(ctx context.Context, params *GetTransitGatewayRouteTablePropagationsInput, optFns ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error) { - if params == nil { - params = &GetTransitGatewayRouteTablePropagationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTransitGatewayRouteTablePropagations", params, optFns, c.addOperationGetTransitGatewayRouteTablePropagationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTransitGatewayRouteTablePropagationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetTransitGatewayRouteTablePropagationsInput struct { - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - resource-id - The ID of the resource. - // - resource-type - The resource type. Valid values are vpc | vpn | - // direct-connect-gateway | peering | connect . - // - transit-gateway-attachment-id - The ID of the attachment. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type GetTransitGatewayRouteTablePropagationsOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the route table propagations. - TransitGatewayRouteTablePropagations []types.TransitGatewayRouteTablePropagation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTransitGatewayRouteTablePropagationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTransitGatewayRouteTablePropagations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetTransitGatewayRouteTablePropagationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTransitGatewayRouteTablePropagations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetTransitGatewayRouteTablePropagationsAPIClient is a client that implements -// the GetTransitGatewayRouteTablePropagations operation. -type GetTransitGatewayRouteTablePropagationsAPIClient interface { - GetTransitGatewayRouteTablePropagations(context.Context, *GetTransitGatewayRouteTablePropagationsInput, ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error) -} - -var _ GetTransitGatewayRouteTablePropagationsAPIClient = (*Client)(nil) - -// GetTransitGatewayRouteTablePropagationsPaginatorOptions is the paginator -// options for GetTransitGatewayRouteTablePropagations -type GetTransitGatewayRouteTablePropagationsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetTransitGatewayRouteTablePropagationsPaginator is a paginator for -// GetTransitGatewayRouteTablePropagations -type GetTransitGatewayRouteTablePropagationsPaginator struct { - options GetTransitGatewayRouteTablePropagationsPaginatorOptions - client GetTransitGatewayRouteTablePropagationsAPIClient - params *GetTransitGatewayRouteTablePropagationsInput - nextToken *string - firstPage bool -} - -// NewGetTransitGatewayRouteTablePropagationsPaginator returns a new -// GetTransitGatewayRouteTablePropagationsPaginator -func NewGetTransitGatewayRouteTablePropagationsPaginator(client GetTransitGatewayRouteTablePropagationsAPIClient, params *GetTransitGatewayRouteTablePropagationsInput, optFns ...func(*GetTransitGatewayRouteTablePropagationsPaginatorOptions)) *GetTransitGatewayRouteTablePropagationsPaginator { - if params == nil { - params = &GetTransitGatewayRouteTablePropagationsInput{} - } - - options := GetTransitGatewayRouteTablePropagationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetTransitGatewayRouteTablePropagationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetTransitGatewayRouteTablePropagationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetTransitGatewayRouteTablePropagations page. -func (p *GetTransitGatewayRouteTablePropagationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetTransitGatewayRouteTablePropagationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetTransitGatewayRouteTablePropagations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetTransitGatewayRouteTablePropagations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTransitGatewayRouteTablePropagations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go deleted file mode 100644 index 6ff12940e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVerifiedAccessEndpointPolicy.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get the Verified Access policy associated with the endpoint. -func (c *Client) GetVerifiedAccessEndpointPolicy(ctx context.Context, params *GetVerifiedAccessEndpointPolicyInput, optFns ...func(*Options)) (*GetVerifiedAccessEndpointPolicyOutput, error) { - if params == nil { - params = &GetVerifiedAccessEndpointPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVerifiedAccessEndpointPolicy", params, optFns, c.addOperationGetVerifiedAccessEndpointPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVerifiedAccessEndpointPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVerifiedAccessEndpointPolicyInput struct { - - // The ID of the Verified Access endpoint. - // - // This member is required. - VerifiedAccessEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetVerifiedAccessEndpointPolicyOutput struct { - - // The Verified Access policy document. - PolicyDocument *string - - // The status of the Verified Access policy. - PolicyEnabled *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVerifiedAccessEndpointPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetVerifiedAccessEndpointPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVerifiedAccessEndpointPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetVerifiedAccessEndpointPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVerifiedAccessEndpointPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVerifiedAccessEndpointPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVerifiedAccessEndpointPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go deleted file mode 100644 index 4b43cc679..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVerifiedAccessGroupPolicy.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Shows the contents of the Verified Access policy associated with the group. -func (c *Client) GetVerifiedAccessGroupPolicy(ctx context.Context, params *GetVerifiedAccessGroupPolicyInput, optFns ...func(*Options)) (*GetVerifiedAccessGroupPolicyOutput, error) { - if params == nil { - params = &GetVerifiedAccessGroupPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVerifiedAccessGroupPolicy", params, optFns, c.addOperationGetVerifiedAccessGroupPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVerifiedAccessGroupPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVerifiedAccessGroupPolicyInput struct { - - // The ID of the Verified Access group. - // - // This member is required. - VerifiedAccessGroupId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetVerifiedAccessGroupPolicyOutput struct { - - // The Verified Access policy document. - PolicyDocument *string - - // The status of the Verified Access policy. - PolicyEnabled *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVerifiedAccessGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetVerifiedAccessGroupPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVerifiedAccessGroupPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetVerifiedAccessGroupPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVerifiedAccessGroupPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVerifiedAccessGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVerifiedAccessGroupPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go deleted file mode 100644 index 65002babe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceSampleConfiguration.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Download an Amazon Web Services-provided sample configuration file to be used -// with the customer gateway device specified for your Site-to-Site VPN connection. -func (c *Client) GetVpnConnectionDeviceSampleConfiguration(ctx context.Context, params *GetVpnConnectionDeviceSampleConfigurationInput, optFns ...func(*Options)) (*GetVpnConnectionDeviceSampleConfigurationOutput, error) { - if params == nil { - params = &GetVpnConnectionDeviceSampleConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVpnConnectionDeviceSampleConfiguration", params, optFns, c.addOperationGetVpnConnectionDeviceSampleConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVpnConnectionDeviceSampleConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVpnConnectionDeviceSampleConfigurationInput struct { - - // Device identifier provided by the GetVpnConnectionDeviceTypes API. - // - // This member is required. - VpnConnectionDeviceTypeId *string - - // The VpnConnectionId specifies the Site-to-Site VPN connection used for the - // sample configuration. - // - // This member is required. - VpnConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IKE version to be used in the sample configuration file for your customer - // gateway device. You can specify one of the following versions: ikev1 or ikev2 . - InternetKeyExchangeVersion *string - - noSmithyDocumentSerde -} - -type GetVpnConnectionDeviceSampleConfigurationOutput struct { - - // Sample configuration file for the specified customer gateway device. - VpnConnectionDeviceSampleConfiguration *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVpnConnectionDeviceSampleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVpnConnectionDeviceSampleConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetVpnConnectionDeviceSampleConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpnConnectionDeviceSampleConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVpnConnectionDeviceSampleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVpnConnectionDeviceSampleConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceTypes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceTypes.go deleted file mode 100644 index 03af5dc3b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnConnectionDeviceTypes.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Obtain a list of customer gateway devices for which sample configuration files -// can be provided. The request has no additional parameters. You can also see the -// list of device types with sample configuration files available under Your -// customer gateway device (https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) GetVpnConnectionDeviceTypes(ctx context.Context, params *GetVpnConnectionDeviceTypesInput, optFns ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error) { - if params == nil { - params = &GetVpnConnectionDeviceTypesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVpnConnectionDeviceTypes", params, optFns, c.addOperationGetVpnConnectionDeviceTypesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVpnConnectionDeviceTypesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVpnConnectionDeviceTypesInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of results returned by GetVpnConnectionDeviceTypes in - // paginated output. When this parameter is used, GetVpnConnectionDeviceTypes only - // returns MaxResults results in a single page along with a NextToken response - // element. The remaining results of the initial request can be seen by sending - // another GetVpnConnectionDeviceTypes request with the returned NextToken value. - // This value can be between 200 and 1000. If this parameter is not used, then - // GetVpnConnectionDeviceTypes returns all results. - MaxResults *int32 - - // The NextToken value returned from a previous paginated - // GetVpnConnectionDeviceTypes request where MaxResults was used and the results - // exceeded the value of that parameter. Pagination continues from the end of the - // previous results that returned the NextToken value. This value is null when - // there are no more results to return. - NextToken *string - - noSmithyDocumentSerde -} - -type GetVpnConnectionDeviceTypesOutput struct { - - // The NextToken value to include in a future GetVpnConnectionDeviceTypes request. - // When the results of a GetVpnConnectionDeviceTypes request exceed MaxResults , - // this value can be used to retrieve the next page of results. This value is null - // when there are no more results to return. - NextToken *string - - // List of customer gateway devices that have a sample configuration file - // available for use. - VpnConnectionDeviceTypes []types.VpnConnectionDeviceType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVpnConnectionDeviceTypesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetVpnConnectionDeviceTypes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVpnConnectionDeviceTypes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVpnConnectionDeviceTypes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpnConnectionDeviceTypes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// GetVpnConnectionDeviceTypesAPIClient is a client that implements the -// GetVpnConnectionDeviceTypes operation. -type GetVpnConnectionDeviceTypesAPIClient interface { - GetVpnConnectionDeviceTypes(context.Context, *GetVpnConnectionDeviceTypesInput, ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error) -} - -var _ GetVpnConnectionDeviceTypesAPIClient = (*Client)(nil) - -// GetVpnConnectionDeviceTypesPaginatorOptions is the paginator options for -// GetVpnConnectionDeviceTypes -type GetVpnConnectionDeviceTypesPaginatorOptions struct { - // The maximum number of results returned by GetVpnConnectionDeviceTypes in - // paginated output. When this parameter is used, GetVpnConnectionDeviceTypes only - // returns MaxResults results in a single page along with a NextToken response - // element. The remaining results of the initial request can be seen by sending - // another GetVpnConnectionDeviceTypes request with the returned NextToken value. - // This value can be between 200 and 1000. If this parameter is not used, then - // GetVpnConnectionDeviceTypes returns all results. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// GetVpnConnectionDeviceTypesPaginator is a paginator for -// GetVpnConnectionDeviceTypes -type GetVpnConnectionDeviceTypesPaginator struct { - options GetVpnConnectionDeviceTypesPaginatorOptions - client GetVpnConnectionDeviceTypesAPIClient - params *GetVpnConnectionDeviceTypesInput - nextToken *string - firstPage bool -} - -// NewGetVpnConnectionDeviceTypesPaginator returns a new -// GetVpnConnectionDeviceTypesPaginator -func NewGetVpnConnectionDeviceTypesPaginator(client GetVpnConnectionDeviceTypesAPIClient, params *GetVpnConnectionDeviceTypesInput, optFns ...func(*GetVpnConnectionDeviceTypesPaginatorOptions)) *GetVpnConnectionDeviceTypesPaginator { - if params == nil { - params = &GetVpnConnectionDeviceTypesInput{} - } - - options := GetVpnConnectionDeviceTypesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &GetVpnConnectionDeviceTypesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *GetVpnConnectionDeviceTypesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next GetVpnConnectionDeviceTypes page. -func (p *GetVpnConnectionDeviceTypesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*GetVpnConnectionDeviceTypesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.GetVpnConnectionDeviceTypes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opGetVpnConnectionDeviceTypes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVpnConnectionDeviceTypes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnTunnelReplacementStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnTunnelReplacementStatus.go deleted file mode 100644 index ff7bca4c0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_GetVpnTunnelReplacementStatus.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Get details of available tunnel endpoint maintenance. -func (c *Client) GetVpnTunnelReplacementStatus(ctx context.Context, params *GetVpnTunnelReplacementStatusInput, optFns ...func(*Options)) (*GetVpnTunnelReplacementStatusOutput, error) { - if params == nil { - params = &GetVpnTunnelReplacementStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVpnTunnelReplacementStatus", params, optFns, c.addOperationGetVpnTunnelReplacementStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVpnTunnelReplacementStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVpnTunnelReplacementStatusInput struct { - - // The ID of the Site-to-Site VPN connection. - // - // This member is required. - VpnConnectionId *string - - // The external IP address of the VPN tunnel. - // - // This member is required. - VpnTunnelOutsideIpAddress *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type GetVpnTunnelReplacementStatusOutput struct { - - // The ID of the customer gateway. - CustomerGatewayId *string - - // Get details of pending tunnel endpoint maintenance. - MaintenanceDetails *types.MaintenanceDetails - - // The ID of the transit gateway associated with the VPN connection. - TransitGatewayId *string - - // The ID of the Site-to-Site VPN connection. - VpnConnectionId *string - - // The ID of the virtual private gateway. - VpnGatewayId *string - - // The external IP address of the VPN tunnel. - VpnTunnelOutsideIpAddress *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVpnTunnelReplacementStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpGetVpnTunnelReplacementStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpGetVpnTunnelReplacementStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVpnTunnelReplacementStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpGetVpnTunnelReplacementStatusValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVpnTunnelReplacementStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVpnTunnelReplacementStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVpnTunnelReplacementStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go deleted file mode 100644 index 7b73b687f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportClientVpnClientCertificateRevocationList.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Uploads a client certificate revocation list to the specified Client VPN -// endpoint. Uploading a client certificate revocation list overwrites the existing -// client certificate revocation list. Uploading a client certificate revocation -// list resets existing client connections. -func (c *Client) ImportClientVpnClientCertificateRevocationList(ctx context.Context, params *ImportClientVpnClientCertificateRevocationListInput, optFns ...func(*Options)) (*ImportClientVpnClientCertificateRevocationListOutput, error) { - if params == nil { - params = &ImportClientVpnClientCertificateRevocationListInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ImportClientVpnClientCertificateRevocationList", params, optFns, c.addOperationImportClientVpnClientCertificateRevocationListMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ImportClientVpnClientCertificateRevocationListOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ImportClientVpnClientCertificateRevocationListInput struct { - - // The client certificate revocation list file. For more information, see Generate - // a Client Certificate Revocation List (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-certificates.html#cvpn-working-certificates-generate) - // in the Client VPN Administrator Guide. - // - // This member is required. - CertificateRevocationList *string - - // The ID of the Client VPN endpoint to which the client certificate revocation - // list applies. - // - // This member is required. - ClientVpnEndpointId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ImportClientVpnClientCertificateRevocationListOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationImportClientVpnClientCertificateRevocationListMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ImportClientVpnClientCertificateRevocationList"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpImportClientVpnClientCertificateRevocationListValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportClientVpnClientCertificateRevocationList(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opImportClientVpnClientCertificateRevocationList(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ImportClientVpnClientCertificateRevocationList", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportImage.go deleted file mode 100644 index 8719b1da2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportImage.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// To import your virtual machines (VMs) with a console-based experience, you can -// use the Import virtual machine images to Amazon Web Services template in the -// Migration Hub Orchestrator console (https://console.aws.amazon.com/migrationhub/orchestrator) -// . For more information, see the Migration Hub Orchestrator User Guide (https://docs.aws.amazon.com/migrationhub-orchestrator/latest/userguide/import-vm-images.html) -// . Import single or multi-volume disk images or EBS snapshots into an Amazon -// Machine Image (AMI). Amazon Web Services VM Import/Export strongly recommends -// specifying a value for either the --license-type or --usage-operation parameter -// when you create a new VM Import task. This ensures your operating system is -// licensed appropriately and your billing is optimized. For more information, see -// Importing a VM as an image using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html) -// in the VM Import/Export User Guide. -func (c *Client) ImportImage(ctx context.Context, params *ImportImageInput, optFns ...func(*Options)) (*ImportImageOutput, error) { - if params == nil { - params = &ImportImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ImportImage", params, optFns, c.addOperationImportImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ImportImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ImportImageInput struct { - - // The architecture of the virtual machine. Valid values: i386 | x86_64 - Architecture *string - - // The boot mode of the virtual machine. The uefi-preferred boot mode isn't - // supported for importing images. For more information, see Boot modes (https://docs.aws.amazon.com/vm-import/latest/userguide/prerequisites.html#vmimport-boot-modes) - // in the VM Import/Export User Guide. - BootMode types.BootModeValues - - // The client-specific data. - ClientData *types.ClientData - - // The token to enable idempotency for VM import requests. - ClientToken *string - - // A description string for the import image task. - Description *string - - // Information about the disk containers. - DiskContainers []types.ImageDiskContainer - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specifies whether the destination AMI of the imported image should be - // encrypted. The default KMS key for EBS is used unless you specify a non-default - // KMS key using KmsKeyId . For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool - - // The target hypervisor platform. Valid values: xen - Hypervisor *string - - // An identifier for the symmetric KMS key to use when creating the encrypted AMI. - // This parameter is only required if you want to use a non-default KMS key; if - // this parameter is not specified, the default KMS key for EBS is used. If a - // KmsKeyId is specified, the Encrypted flag must also be set. The KMS key - // identifier may be provided in any of the following formats: - // - Key ID - // - Key alias - // - ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by - // the Region of the key, the Amazon Web Services account ID of the key owner, the - // key namespace, and then the key ID. For example, - // arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the Region of the key, the Amazon Web Services account ID of the key - // owner, the alias namespace, and then the key alias. For example, - // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you - // call may appear to complete even though you provided an invalid identifier. This - // action will eventually report failure. The specified KMS key must exist in the - // Region that the AMI is being copied to. Amazon EBS does not support asymmetric - // KMS keys. - KmsKeyId *string - - // The ARNs of the license configurations. - LicenseSpecifications []types.ImportImageLicenseConfigurationRequest - - // The license type to be used for the Amazon Machine Image (AMI) after importing. - // Specify AWS to replace the source-system license with an Amazon Web Services - // license or BYOL to retain the source-system license. Leaving this parameter - // undefined is the same as choosing AWS when importing a Windows Server operating - // system, and the same as choosing BYOL when importing a Windows client operating - // system (such as Windows 10) or a Linux operating system. To use BYOL , you must - // have existing licenses with rights to use these licenses in a third party cloud, - // such as Amazon Web Services. For more information, see Prerequisites (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html#prerequisites-image) - // in the VM Import/Export User Guide. - LicenseType *string - - // The operating system of the virtual machine. If you import a VM that is - // compatible with Unified Extensible Firmware Interface (UEFI) using an EBS - // snapshot, you must specify a value for the platform. Valid values: Windows | - // Linux - Platform *string - - // The name of the role to use when not using the default role, 'vmimport'. - RoleName *string - - // The tags to apply to the import image task during creation. - TagSpecifications []types.TagSpecification - - // The usage operation value. For more information, see Licensing options (https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#prerequisites) - // in the VM Import/Export User Guide. - UsageOperation *string - - noSmithyDocumentSerde -} - -type ImportImageOutput struct { - - // The architecture of the virtual machine. - Architecture *string - - // A description of the import task. - Description *string - - // Indicates whether the AMI is encrypted. - Encrypted *bool - - // The target hypervisor of the import task. - Hypervisor *string - - // The ID of the Amazon Machine Image (AMI) created by the import task. - ImageId *string - - // The task ID of the import image task. - ImportTaskId *string - - // The identifier for the symmetric KMS key that was used to create the encrypted - // AMI. - KmsKeyId *string - - // The ARNs of the license configurations. - LicenseSpecifications []types.ImportImageLicenseConfigurationResponse - - // The license type of the virtual machine. - LicenseType *string - - // The operating system of the virtual machine. - Platform *string - - // The progress of the task. - Progress *string - - // Information about the snapshots. - SnapshotDetails []types.SnapshotDetail - - // A brief status of the task. - Status *string - - // A detailed status message of the import task. - StatusMessage *string - - // Any tags assigned to the import image task. - Tags []types.Tag - - // The usage operation value. - UsageOperation *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationImportImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpImportImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ImportImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opImportImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ImportImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportInstance.go deleted file mode 100644 index 42c269f09..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportInstance.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// We recommend that you use the ImportImage (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportImage.html) -// API. For more information, see Importing a VM as an image using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html) -// in the VM Import/Export User Guide. Creates an import instance task using -// metadata from the specified disk image. This API action is not supported by the -// Command Line Interface (CLI). For information about using the Amazon EC2 CLI, -// which is deprecated, see Importing a VM to Amazon EC2 (https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#UsingVirtualMachinesinAmazonEC2) -// in the Amazon EC2 CLI Reference PDF file. This API action supports only -// single-volume VMs. To import multi-volume VMs, use ImportImage instead. For -// information about the import manifest referenced by this API action, see VM -// Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html) -// . -func (c *Client) ImportInstance(ctx context.Context, params *ImportInstanceInput, optFns ...func(*Options)) (*ImportInstanceOutput, error) { - if params == nil { - params = &ImportInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ImportInstance", params, optFns, c.addOperationImportInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ImportInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ImportInstanceInput struct { - - // The instance operating system. - // - // This member is required. - Platform types.PlatformValues - - // A description for the instance being imported. - Description *string - - // The disk image. - DiskImages []types.DiskImage - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The launch specification. - LaunchSpecification *types.ImportInstanceLaunchSpecification - - noSmithyDocumentSerde -} - -type ImportInstanceOutput struct { - - // Information about the conversion task. - ConversionTask *types.ConversionTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationImportInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpImportInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ImportInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpImportInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opImportInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ImportInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportKeyPair.go deleted file mode 100644 index eed26737c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportKeyPair.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Imports the public key from an RSA or ED25519 key pair that you created with a -// third-party tool. Compare this with CreateKeyPair , in which Amazon Web Services -// creates the key pair and gives the keys to you (Amazon Web Services keeps a copy -// of the public key). With ImportKeyPair, you create the key pair and give Amazon -// Web Services just the public key. The private key is never transferred between -// you and Amazon Web Services. For more information about key pairs, see Amazon -// EC2 key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) ImportKeyPair(ctx context.Context, params *ImportKeyPairInput, optFns ...func(*Options)) (*ImportKeyPairOutput, error) { - if params == nil { - params = &ImportKeyPairInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ImportKeyPair", params, optFns, c.addOperationImportKeyPairMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ImportKeyPairOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ImportKeyPairInput struct { - - // A unique name for the key pair. - // - // This member is required. - KeyName *string - - // The public key. For API calls, the text must be base64-encoded. For command - // line tools, base64 encoding is performed for you. - // - // This member is required. - PublicKeyMaterial []byte - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the imported key pair. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type ImportKeyPairOutput struct { - - // - For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as - // specified in section 4 of RFC 4716. - // - For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 - // digest, which is the default for OpenSSH, starting with OpenSSH 6.8 (http://www.openssh.com/txt/release-6.8) - // . - KeyFingerprint *string - - // The key pair name that you provided. - KeyName *string - - // The ID of the resulting key pair. - KeyPairId *string - - // The tags applied to the imported key pair. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationImportKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpImportKeyPair{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportKeyPair{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ImportKeyPair"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpImportKeyPairValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportKeyPair(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opImportKeyPair(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ImportKeyPair", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportSnapshot.go deleted file mode 100644 index 6a1d9d1e0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportSnapshot.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Imports a disk into an EBS snapshot. For more information, see Importing a disk -// as a snapshot using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html) -// in the VM Import/Export User Guide. -func (c *Client) ImportSnapshot(ctx context.Context, params *ImportSnapshotInput, optFns ...func(*Options)) (*ImportSnapshotOutput, error) { - if params == nil { - params = &ImportSnapshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ImportSnapshot", params, optFns, c.addOperationImportSnapshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ImportSnapshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ImportSnapshotInput struct { - - // The client-specific data. - ClientData *types.ClientData - - // Token to enable idempotency for VM import requests. - ClientToken *string - - // The description string for the import snapshot task. - Description *string - - // Information about the disk container. - DiskContainer *types.SnapshotDiskContainer - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specifies whether the destination snapshot of the imported image should be - // encrypted. The default KMS key for EBS is used unless you specify a non-default - // KMS key using KmsKeyId . For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) - // in the Amazon Elastic Compute Cloud User Guide. - Encrypted *bool - - // An identifier for the symmetric KMS key to use when creating the encrypted - // snapshot. This parameter is only required if you want to use a non-default KMS - // key; if this parameter is not specified, the default KMS key for EBS is used. If - // a KmsKeyId is specified, the Encrypted flag must also be set. The KMS key - // identifier may be provided in any of the following formats: - // - Key ID - // - Key alias - // - ARN using key ID. The ID ARN contains the arn:aws:kms namespace, followed by - // the Region of the key, the Amazon Web Services account ID of the key owner, the - // key namespace, and then the key ID. For example, - // arn:aws:kms:us-east-1:012345678910:key/abcd1234-a123-456a-a12b-a123b4cd56ef. - // - ARN using key alias. The alias ARN contains the arn:aws:kms namespace, - // followed by the Region of the key, the Amazon Web Services account ID of the key - // owner, the alias namespace, and then the key alias. For example, - // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // Amazon Web Services parses KmsKeyId asynchronously, meaning that the action you - // call may appear to complete even though you provided an invalid identifier. This - // action will eventually report failure. The specified KMS key must exist in the - // Region that the snapshot is being copied to. Amazon EBS does not support - // asymmetric KMS keys. - KmsKeyId *string - - // The name of the role to use when not using the default role, 'vmimport'. - RoleName *string - - // The tags to apply to the import snapshot task during creation. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type ImportSnapshotOutput struct { - - // A description of the import snapshot task. - Description *string - - // The ID of the import snapshot task. - ImportTaskId *string - - // Information about the import snapshot task. - SnapshotTaskDetail *types.SnapshotTaskDetail - - // Any tags assigned to the import snapshot task. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationImportSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpImportSnapshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportSnapshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ImportSnapshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportSnapshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opImportSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ImportSnapshot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportVolume.go deleted file mode 100644 index 6c65a6961..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ImportVolume.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an import volume task using metadata from the specified disk image. -// This API action supports only single-volume VMs. To import multi-volume VMs, use -// ImportImage instead. To import a disk to a snapshot, use ImportSnapshot -// instead. This API action is not supported by the Command Line Interface (CLI). -// For information about using the Amazon EC2 CLI, which is deprecated, see -// Importing Disks to Amazon EBS (https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#importing-your-volumes-into-amazon-ebs) -// in the Amazon EC2 CLI Reference PDF file. For information about the import -// manifest referenced by this API action, see VM Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html) -// . -func (c *Client) ImportVolume(ctx context.Context, params *ImportVolumeInput, optFns ...func(*Options)) (*ImportVolumeOutput, error) { - if params == nil { - params = &ImportVolumeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ImportVolume", params, optFns, c.addOperationImportVolumeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ImportVolumeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ImportVolumeInput struct { - - // The Availability Zone for the resulting EBS volume. - // - // This member is required. - AvailabilityZone *string - - // The disk image. - // - // This member is required. - Image *types.DiskImageDetail - - // The volume size. - // - // This member is required. - Volume *types.VolumeDetail - - // A description of the volume. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ImportVolumeOutput struct { - - // Information about the conversion task. - ConversionTask *types.ConversionTask - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationImportVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpImportVolume{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpImportVolume{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ImportVolume"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpImportVolumeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportVolume(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opImportVolume(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ImportVolume", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ListImagesInRecycleBin.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ListImagesInRecycleBin.go deleted file mode 100644 index 57023a18b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ListImagesInRecycleBin.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists one or more AMIs that are currently in the Recycle Bin. For more -// information, see Recycle Bin (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html) -// in the Amazon EC2 User Guide. -func (c *Client) ListImagesInRecycleBin(ctx context.Context, params *ListImagesInRecycleBinInput, optFns ...func(*Options)) (*ListImagesInRecycleBinOutput, error) { - if params == nil { - params = &ListImagesInRecycleBinInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListImagesInRecycleBin", params, optFns, c.addOperationListImagesInRecycleBinMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListImagesInRecycleBinOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListImagesInRecycleBinInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of the AMIs to list. Omit this parameter to list all of the AMIs that - // are in the Recycle Bin. You can specify up to 20 IDs in a single request. - ImageIds []string - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - noSmithyDocumentSerde -} - -type ListImagesInRecycleBinOutput struct { - - // Information about the AMIs. - Images []types.ImageRecycleBinInfo - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListImagesInRecycleBinMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpListImagesInRecycleBin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpListImagesInRecycleBin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListImagesInRecycleBin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImagesInRecycleBin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// ListImagesInRecycleBinAPIClient is a client that implements the -// ListImagesInRecycleBin operation. -type ListImagesInRecycleBinAPIClient interface { - ListImagesInRecycleBin(context.Context, *ListImagesInRecycleBinInput, ...func(*Options)) (*ListImagesInRecycleBinOutput, error) -} - -var _ ListImagesInRecycleBinAPIClient = (*Client)(nil) - -// ListImagesInRecycleBinPaginatorOptions is the paginator options for -// ListImagesInRecycleBin -type ListImagesInRecycleBinPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListImagesInRecycleBinPaginator is a paginator for ListImagesInRecycleBin -type ListImagesInRecycleBinPaginator struct { - options ListImagesInRecycleBinPaginatorOptions - client ListImagesInRecycleBinAPIClient - params *ListImagesInRecycleBinInput - nextToken *string - firstPage bool -} - -// NewListImagesInRecycleBinPaginator returns a new ListImagesInRecycleBinPaginator -func NewListImagesInRecycleBinPaginator(client ListImagesInRecycleBinAPIClient, params *ListImagesInRecycleBinInput, optFns ...func(*ListImagesInRecycleBinPaginatorOptions)) *ListImagesInRecycleBinPaginator { - if params == nil { - params = &ListImagesInRecycleBinInput{} - } - - options := ListImagesInRecycleBinPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListImagesInRecycleBinPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListImagesInRecycleBinPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListImagesInRecycleBin page. -func (p *ListImagesInRecycleBinPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImagesInRecycleBinOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.ListImagesInRecycleBin(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opListImagesInRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListImagesInRecycleBin", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ListSnapshotsInRecycleBin.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ListSnapshotsInRecycleBin.go deleted file mode 100644 index 9bea0bc78..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ListSnapshotsInRecycleBin.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists one or more snapshots that are currently in the Recycle Bin. -func (c *Client) ListSnapshotsInRecycleBin(ctx context.Context, params *ListSnapshotsInRecycleBinInput, optFns ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) { - if params == nil { - params = &ListSnapshotsInRecycleBinInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListSnapshotsInRecycleBin", params, optFns, c.addOperationListSnapshotsInRecycleBinMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListSnapshotsInRecycleBinOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListSnapshotsInRecycleBinInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - MaxResults *int32 - - // The token returned from a previous paginated request. Pagination continues from - // the end of the items returned by the previous request. - NextToken *string - - // The IDs of the snapshots to list. Omit this parameter to list all of the - // snapshots that are in the Recycle Bin. - SnapshotIds []string - - noSmithyDocumentSerde -} - -type ListSnapshotsInRecycleBinOutput struct { - - // The token to include in another request to get the next page of items. This - // value is null when there are no more items to return. - NextToken *string - - // Information about the snapshots. - Snapshots []types.SnapshotRecycleBinInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListSnapshotsInRecycleBinMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpListSnapshotsInRecycleBin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpListSnapshotsInRecycleBin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListSnapshotsInRecycleBin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSnapshotsInRecycleBin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// ListSnapshotsInRecycleBinAPIClient is a client that implements the -// ListSnapshotsInRecycleBin operation. -type ListSnapshotsInRecycleBinAPIClient interface { - ListSnapshotsInRecycleBin(context.Context, *ListSnapshotsInRecycleBinInput, ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) -} - -var _ ListSnapshotsInRecycleBinAPIClient = (*Client)(nil) - -// ListSnapshotsInRecycleBinPaginatorOptions is the paginator options for -// ListSnapshotsInRecycleBin -type ListSnapshotsInRecycleBinPaginatorOptions struct { - // The maximum number of items to return for this request. To get the next page of - // items, make another request with the token returned in the output. For more - // information, see Pagination (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Query-Requests.html#api-pagination) - // . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListSnapshotsInRecycleBinPaginator is a paginator for ListSnapshotsInRecycleBin -type ListSnapshotsInRecycleBinPaginator struct { - options ListSnapshotsInRecycleBinPaginatorOptions - client ListSnapshotsInRecycleBinAPIClient - params *ListSnapshotsInRecycleBinInput - nextToken *string - firstPage bool -} - -// NewListSnapshotsInRecycleBinPaginator returns a new -// ListSnapshotsInRecycleBinPaginator -func NewListSnapshotsInRecycleBinPaginator(client ListSnapshotsInRecycleBinAPIClient, params *ListSnapshotsInRecycleBinInput, optFns ...func(*ListSnapshotsInRecycleBinPaginatorOptions)) *ListSnapshotsInRecycleBinPaginator { - if params == nil { - params = &ListSnapshotsInRecycleBinInput{} - } - - options := ListSnapshotsInRecycleBinPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListSnapshotsInRecycleBinPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListSnapshotsInRecycleBinPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListSnapshotsInRecycleBin page. -func (p *ListSnapshotsInRecycleBinPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSnapshotsInRecycleBinOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.ListSnapshotsInRecycleBin(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opListSnapshotsInRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListSnapshotsInRecycleBin", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_LockSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_LockSnapshot.go deleted file mode 100644 index 10e0ec6dd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_LockSnapshot.go +++ /dev/null @@ -1,234 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Locks an Amazon EBS snapshot in either governance or compliance mode to protect -// it against accidental or malicious deletions for a specific duration. A locked -// snapshot can't be deleted. You can also use this action to modify the lock -// settings for a snapshot that is already locked. The allowed modifications depend -// on the lock mode and lock state: -// - If the snapshot is locked in governance mode, you can modify the lock mode -// and the lock duration or lock expiration date. -// - If the snapshot is locked in compliance mode and it is in the cooling-off -// period, you can modify the lock mode and the lock duration or lock expiration -// date. -// - If the snapshot is locked in compliance mode and the cooling-off period has -// lapsed, you can only increase the lock duration or extend the lock expiration -// date. -func (c *Client) LockSnapshot(ctx context.Context, params *LockSnapshotInput, optFns ...func(*Options)) (*LockSnapshotOutput, error) { - if params == nil { - params = &LockSnapshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "LockSnapshot", params, optFns, c.addOperationLockSnapshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*LockSnapshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type LockSnapshotInput struct { - - // The mode in which to lock the snapshot. Specify one of the following: - // - governance - Locks the snapshot in governance mode. Snapshots locked in - // governance mode can't be deleted until one of the following conditions are met: - // - The lock duration expires. - // - The snapshot is unlocked by a user with the appropriate permissions. Users - // with the appropriate IAM permissions can unlock the snapshot, increase or - // decrease the lock duration, and change the lock mode to compliance at any - // time. If you lock a snapshot in governance mode, omit CoolOffPeriod. - // - compliance - Locks the snapshot in compliance mode. Snapshots locked in - // compliance mode can't be unlocked by any user. They can be deleted only after - // the lock duration expires. Users can't decrease the lock duration or change the - // lock mode to governance . However, users with appropriate IAM permissions can - // increase the lock duration at any time. If you lock a snapshot in compliance - // mode, you can optionally specify CoolOffPeriod. - // - // This member is required. - LockMode types.LockMode - - // The ID of the snapshot to lock. - // - // This member is required. - SnapshotId *string - - // The cooling-off period during which you can unlock the snapshot or modify the - // lock settings after locking the snapshot in compliance mode, in hours. After the - // cooling-off period expires, you can't unlock or delete the snapshot, decrease - // the lock duration, or change the lock mode. You can increase the lock duration - // after the cooling-off period expires. The cooling-off period is optional when - // locking a snapshot in compliance mode. If you are locking the snapshot in - // governance mode, omit this parameter. To lock the snapshot in compliance mode - // immediately without a cooling-off period, omit this parameter. If you are - // extending the lock duration for a snapshot that is locked in compliance mode - // after the cooling-off period has expired, omit this parameter. If you specify a - // cooling-period in a such a request, the request fails. Allowed values: Min 1, - // max 72. - CoolOffPeriod *int32 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The date and time at which the snapshot lock is to automatically expire, in the - // UTC time zone ( YYYY-MM-DDThh:mm:ss.sssZ ). You must specify either this - // parameter or LockDuration, but not both. - ExpirationDate *time.Time - - // The period of time for which to lock the snapshot, in days. The snapshot lock - // will automatically expire after this period lapses. You must specify either this - // parameter or ExpirationDate, but not both. Allowed values: Min: 1, max 36500 - LockDuration *int32 - - noSmithyDocumentSerde -} - -type LockSnapshotOutput struct { - - // The compliance mode cooling-off period, in hours. - CoolOffPeriod *int32 - - // The date and time at which the compliance mode cooling-off period expires, in - // the UTC time zone ( YYYY-MM-DDThh:mm:ss.sssZ ). - CoolOffPeriodExpiresOn *time.Time - - // The date and time at which the snapshot was locked, in the UTC time zone ( - // YYYY-MM-DDThh:mm:ss.sssZ ). - LockCreatedOn *time.Time - - // The period of time for which the snapshot is locked, in days. - LockDuration *int32 - - // The date and time at which the lock duration started, in the UTC time zone ( - // YYYY-MM-DDThh:mm:ss.sssZ ). - LockDurationStartTime *time.Time - - // The date and time at which the lock will expire, in the UTC time zone ( - // YYYY-MM-DDThh:mm:ss.sssZ ). - LockExpiresOn *time.Time - - // The state of the snapshot lock. Valid states include: - // - compliance-cooloff - The snapshot has been locked in compliance mode but it - // is still within the cooling-off period. The snapshot can't be deleted, but it - // can be unlocked and the lock settings can be modified by users with appropriate - // permissions. - // - governance - The snapshot is locked in governance mode. The snapshot can't - // be deleted, but it can be unlocked and the lock settings can be modified by - // users with appropriate permissions. - // - compliance - The snapshot is locked in compliance mode and the cooling-off - // period has expired. The snapshot can't be unlocked or deleted. The lock duration - // can only be increased by users with appropriate permissions. - // - expired - The snapshot was locked in compliance or governance mode but the - // lock duration has expired. The snapshot is not locked and can be deleted. - LockState types.LockState - - // The ID of the snapshot - SnapshotId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationLockSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpLockSnapshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpLockSnapshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "LockSnapshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpLockSnapshotValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLockSnapshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opLockSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "LockSnapshot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAddressAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAddressAttribute.go deleted file mode 100644 index 61a501a65..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAddressAttribute.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies an attribute of the specified Elastic IP address. For requirements, -// see Using reverse DNS for email applications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS) -// . -func (c *Client) ModifyAddressAttribute(ctx context.Context, params *ModifyAddressAttributeInput, optFns ...func(*Options)) (*ModifyAddressAttributeOutput, error) { - if params == nil { - params = &ModifyAddressAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyAddressAttribute", params, optFns, c.addOperationModifyAddressAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyAddressAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyAddressAttributeInput struct { - - // [EC2-VPC] The allocation ID. - // - // This member is required. - AllocationId *string - - // The domain name to modify for the IP address. - DomainName *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyAddressAttributeOutput struct { - - // Information about the Elastic IP address. - Address *types.AddressAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyAddressAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyAddressAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyAddressAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyAddressAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyAddressAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAddressAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyAddressAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyAddressAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAvailabilityZoneGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAvailabilityZoneGroup.go deleted file mode 100644 index 229ac46f4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyAvailabilityZoneGroup.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Changes the opt-in status of the Local Zone and Wavelength Zone group for your -// account. Use DescribeAvailabilityZones (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html) -// to view the value for GroupName . -func (c *Client) ModifyAvailabilityZoneGroup(ctx context.Context, params *ModifyAvailabilityZoneGroupInput, optFns ...func(*Options)) (*ModifyAvailabilityZoneGroupOutput, error) { - if params == nil { - params = &ModifyAvailabilityZoneGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyAvailabilityZoneGroup", params, optFns, c.addOperationModifyAvailabilityZoneGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyAvailabilityZoneGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyAvailabilityZoneGroupInput struct { - - // The name of the Availability Zone group, Local Zone group, or Wavelength Zone - // group. - // - // This member is required. - GroupName *string - - // Indicates whether you are opted in to the Local Zone group or Wavelength Zone - // group. The only valid value is opted-in . You must contact Amazon Web Services - // Support (https://console.aws.amazon.com/support/home#/case/create%3FissueType=customer-service%26serviceCode=general-info%26getting-started%26categoryCode=using-aws%26services) - // to opt out of a Local Zone or Wavelength Zone group. - // - // This member is required. - OptInStatus types.ModifyAvailabilityZoneOptInStatus - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyAvailabilityZoneGroupOutput struct { - - // Is true if the request succeeds, and an error otherwise. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyAvailabilityZoneGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyAvailabilityZoneGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyAvailabilityZoneGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyAvailabilityZoneGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyAvailabilityZoneGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyAvailabilityZoneGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyAvailabilityZoneGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyAvailabilityZoneGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservation.go deleted file mode 100644 index 5043a903e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservation.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Modifies a Capacity Reservation's capacity and the conditions under which it is -// to be released. You cannot change a Capacity Reservation's instance type, EBS -// optimization, instance store settings, platform, Availability Zone, or instance -// eligibility. If you need to modify any of these attributes, we recommend that -// you cancel the Capacity Reservation, and then create a new one with the required -// attributes. -func (c *Client) ModifyCapacityReservation(ctx context.Context, params *ModifyCapacityReservationInput, optFns ...func(*Options)) (*ModifyCapacityReservationOutput, error) { - if params == nil { - params = &ModifyCapacityReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyCapacityReservation", params, optFns, c.addOperationModifyCapacityReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyCapacityReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyCapacityReservationInput struct { - - // The ID of the Capacity Reservation. - // - // This member is required. - CapacityReservationId *string - - // Reserved. Capacity Reservations you have created are accepted by default. - Accept *bool - - // Reserved for future use. - AdditionalInfo *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The date and time at which the Capacity Reservation expires. When a Capacity - // Reservation expires, the reserved capacity is released and you can no longer - // launch instances into it. The Capacity Reservation's state changes to expired - // when it reaches its end date and time. The Capacity Reservation is cancelled - // within an hour from the specified time. For example, if you specify 5/31/2019, - // 13:30:55, the Capacity Reservation is guaranteed to end between 13:30:55 and - // 14:30:55 on 5/31/2019. You must provide an EndDate value if EndDateType is - // limited . Omit EndDate if EndDateType is unlimited . - EndDate *time.Time - - // Indicates the way in which the Capacity Reservation ends. A Capacity - // Reservation can have one of the following end types: - // - unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. Do not provide an EndDate value if EndDateType is unlimited . - // - limited - The Capacity Reservation expires automatically at a specified date - // and time. You must provide an EndDate value if EndDateType is limited . - EndDateType types.EndDateType - - // The number of instances for which to reserve capacity. The number of instances - // can't be increased or decreased by more than 1000 in a single request. - InstanceCount *int32 - - noSmithyDocumentSerde -} - -type ModifyCapacityReservationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyCapacityReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyCapacityReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyCapacityReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyCapacityReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyCapacityReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCapacityReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyCapacityReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyCapacityReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservationFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservationFleet.go deleted file mode 100644 index 3daa6057a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyCapacityReservationFleet.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Modifies a Capacity Reservation Fleet. When you modify the total target -// capacity of a Capacity Reservation Fleet, the Fleet automatically creates new -// Capacity Reservations, or modifies or cancels existing Capacity Reservations in -// the Fleet to meet the new total target capacity. When you modify the end date -// for the Fleet, the end dates for all of the individual Capacity Reservations in -// the Fleet are updated accordingly. -func (c *Client) ModifyCapacityReservationFleet(ctx context.Context, params *ModifyCapacityReservationFleetInput, optFns ...func(*Options)) (*ModifyCapacityReservationFleetOutput, error) { - if params == nil { - params = &ModifyCapacityReservationFleetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyCapacityReservationFleet", params, optFns, c.addOperationModifyCapacityReservationFleetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyCapacityReservationFleetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyCapacityReservationFleetInput struct { - - // The ID of the Capacity Reservation Fleet to modify. - // - // This member is required. - CapacityReservationFleetId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The date and time at which the Capacity Reservation Fleet expires. When the - // Capacity Reservation Fleet expires, its state changes to expired and all of the - // Capacity Reservations in the Fleet expire. The Capacity Reservation Fleet - // expires within an hour after the specified time. For example, if you specify - // 5/31/2019 , 13:30:55 , the Capacity Reservation Fleet is guaranteed to expire - // between 13:30:55 and 14:30:55 on 5/31/2019 . You can't specify EndDate and - // RemoveEndDate in the same request. - EndDate *time.Time - - // Indicates whether to remove the end date from the Capacity Reservation Fleet. - // If you remove the end date, the Capacity Reservation Fleet does not expire and - // it remains active until you explicitly cancel it using the - // CancelCapacityReservationFleet action. You can't specify RemoveEndDate and - // EndDate in the same request. - RemoveEndDate *bool - - // The total number of capacity units to be reserved by the Capacity Reservation - // Fleet. This value, together with the instance type weights that you assign to - // each instance type used by the Fleet determine the number of instances for which - // the Fleet reserves capacity. Both values are based on units that make sense for - // your workload. For more information, see Total target capacity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) - // in the Amazon EC2 User Guide. - TotalTargetCapacity *int32 - - noSmithyDocumentSerde -} - -type ModifyCapacityReservationFleetOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyCapacityReservationFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyCapacityReservationFleet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyCapacityReservationFleet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyCapacityReservationFleet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyCapacityReservationFleetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyCapacityReservationFleet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyCapacityReservationFleet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyCapacityReservationFleet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyClientVpnEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyClientVpnEndpoint.go deleted file mode 100644 index edf307298..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyClientVpnEndpoint.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified Client VPN endpoint. Modifying the DNS server resets -// existing client connections. -func (c *Client) ModifyClientVpnEndpoint(ctx context.Context, params *ModifyClientVpnEndpointInput, optFns ...func(*Options)) (*ModifyClientVpnEndpointOutput, error) { - if params == nil { - params = &ModifyClientVpnEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyClientVpnEndpoint", params, optFns, c.addOperationModifyClientVpnEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyClientVpnEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyClientVpnEndpointInput struct { - - // The ID of the Client VPN endpoint to modify. - // - // This member is required. - ClientVpnEndpointId *string - - // The options for managing connection authorization for new client connections. - ClientConnectOptions *types.ClientConnectOptions - - // Options for enabling a customizable text banner that will be displayed on - // Amazon Web Services provided clients when a VPN session is established. - ClientLoginBannerOptions *types.ClientLoginBannerOptions - - // Information about the client connection logging options. If you enable client - // connection logging, data about client connections is sent to a Cloudwatch Logs - // log stream. The following information is logged: - // - Client connection requests - // - Client connection results (successful and unsuccessful) - // - Reasons for unsuccessful client connection requests - // - Client connection termination time - ConnectionLogOptions *types.ConnectionLogOptions - - // A brief description of the Client VPN endpoint. - Description *string - - // Information about the DNS servers to be used by Client VPN connections. A - // Client VPN endpoint can have up to two DNS servers. - DnsServers *types.DnsServersOptionsModifyStructure - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of one or more security groups to apply to the target network. - SecurityGroupIds []string - - // Specify whether to enable the self-service portal for the Client VPN endpoint. - SelfServicePortal types.SelfServicePortal - - // The ARN of the server certificate to be used. The server certificate must be - // provisioned in Certificate Manager (ACM). - ServerCertificateArn *string - - // The maximum VPN session duration time in hours. Valid values: 8 | 10 | 12 | 24 - // Default value: 24 - SessionTimeoutHours *int32 - - // Indicates whether the VPN is split-tunnel. For information about split-tunnel - // VPN endpoints, see Split-tunnel Client VPN endpoint (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) - // in the Client VPN Administrator Guide. - SplitTunnel *bool - - // The ID of the VPC to associate with the Client VPN endpoint. - VpcId *string - - // The port number to assign to the Client VPN endpoint for TCP and UDP traffic. - // Valid Values: 443 | 1194 Default Value: 443 - VpnPort *int32 - - noSmithyDocumentSerde -} - -type ModifyClientVpnEndpointOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyClientVpnEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyClientVpnEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyClientVpnEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyClientVpnEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyClientVpnEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyClientVpnEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyClientVpnEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyClientVpnEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go deleted file mode 100644 index e3cb2148b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyDefaultCreditSpecification.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the default credit option for CPU usage of burstable performance -// instances. The default credit option is set at the account level per Amazon Web -// Services Region, and is specified per instance family. All new burstable -// performance instances in the account launch using the default credit option. -// ModifyDefaultCreditSpecification is an asynchronous operation, which works at an -// Amazon Web Services Region level and modifies the credit option for each -// Availability Zone. All zones in a Region are updated within five minutes. But if -// instances are launched during this operation, they might not get the new credit -// option until the zone is updated. To verify whether the update has occurred, you -// can call GetDefaultCreditSpecification and check DefaultCreditSpecification for -// updates. For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyDefaultCreditSpecification(ctx context.Context, params *ModifyDefaultCreditSpecificationInput, optFns ...func(*Options)) (*ModifyDefaultCreditSpecificationOutput, error) { - if params == nil { - params = &ModifyDefaultCreditSpecificationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyDefaultCreditSpecification", params, optFns, c.addOperationModifyDefaultCreditSpecificationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyDefaultCreditSpecificationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyDefaultCreditSpecificationInput struct { - - // The credit option for CPU usage of the instance family. Valid Values: standard - // | unlimited - // - // This member is required. - CpuCredits *string - - // The instance family. - // - // This member is required. - InstanceFamily types.UnlimitedSupportedInstanceFamily - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyDefaultCreditSpecificationOutput struct { - - // The default credit option for CPU usage of the instance family. - InstanceFamilyCreditSpecification *types.InstanceFamilyCreditSpecification - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyDefaultCreditSpecificationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyDefaultCreditSpecification{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyDefaultCreditSpecification{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyDefaultCreditSpecification"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyDefaultCreditSpecificationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyDefaultCreditSpecification(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyDefaultCreditSpecification(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyDefaultCreditSpecification", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go deleted file mode 100644 index 949509948..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyEbsDefaultKmsKeyId.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Changes the default KMS key for EBS encryption by default for your account in -// this Region. Amazon Web Services creates a unique Amazon Web Services managed -// KMS key in each Region for use with encryption by default. If you change the -// default KMS key to a symmetric customer managed KMS key, it is used instead of -// the Amazon Web Services managed KMS key. To reset the default KMS key to the -// Amazon Web Services managed KMS key for EBS, use ResetEbsDefaultKmsKeyId . -// Amazon EBS does not support asymmetric KMS keys. If you delete or disable the -// customer managed KMS key that you specified for use with encryption by default, -// your instances will fail to launch. For more information, see Amazon EBS -// encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) ModifyEbsDefaultKmsKeyId(ctx context.Context, params *ModifyEbsDefaultKmsKeyIdInput, optFns ...func(*Options)) (*ModifyEbsDefaultKmsKeyIdOutput, error) { - if params == nil { - params = &ModifyEbsDefaultKmsKeyIdInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyEbsDefaultKmsKeyId", params, optFns, c.addOperationModifyEbsDefaultKmsKeyIdMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyEbsDefaultKmsKeyIdOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyEbsDefaultKmsKeyIdInput struct { - - // The identifier of the Key Management Service (KMS) KMS key to use for Amazon - // EBS encryption. If this parameter is not specified, your KMS key for Amazon EBS - // is used. If KmsKeyId is specified, the encrypted state must be true . You can - // specify the KMS key using any of the following: - // - Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. - // - Key alias. For example, alias/ExampleAlias. - // - Key ARN. For example, - // arn:aws:kms:us-east-1:012345678910:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - Alias ARN. For example, - // arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. - // Amazon Web Services authenticates the KMS key asynchronously. Therefore, if you - // specify an ID, alias, or ARN that is not valid, the action can appear to - // complete, but eventually fails. Amazon EBS does not support asymmetric KMS keys. - // - // This member is required. - KmsKeyId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyEbsDefaultKmsKeyIdOutput struct { - - // The Amazon Resource Name (ARN) of the default KMS key for encryption by default. - KmsKeyId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyEbsDefaultKmsKeyIdMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyEbsDefaultKmsKeyId{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyEbsDefaultKmsKeyId"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyEbsDefaultKmsKeyIdValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyEbsDefaultKmsKeyId(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyEbsDefaultKmsKeyId(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyEbsDefaultKmsKeyId", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFleet.go deleted file mode 100644 index bf31dbf9a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFleet.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified EC2 Fleet. You can only modify an EC2 Fleet request of -// type maintain . While the EC2 Fleet is being modified, it is in the modifying -// state. To scale up your EC2 Fleet, increase its target capacity. The EC2 Fleet -// launches the additional Spot Instances according to the allocation strategy for -// the EC2 Fleet request. If the allocation strategy is lowest-price , the EC2 -// Fleet launches instances using the Spot Instance pool with the lowest price. If -// the allocation strategy is diversified , the EC2 Fleet distributes the instances -// across the Spot Instance pools. If the allocation strategy is capacity-optimized -// , EC2 Fleet launches instances from Spot Instance pools with optimal capacity -// for the number of instances that are launching. To scale down your EC2 Fleet, -// decrease its target capacity. First, the EC2 Fleet cancels any open requests -// that exceed the new target capacity. You can request that the EC2 Fleet -// terminate Spot Instances until the size of the fleet no longer exceeds the new -// target capacity. If the allocation strategy is lowest-price , the EC2 Fleet -// terminates the instances with the highest price per unit. If the allocation -// strategy is capacity-optimized , the EC2 Fleet terminates the instances in the -// Spot Instance pools that have the least available Spot Instance capacity. If the -// allocation strategy is diversified , the EC2 Fleet terminates instances across -// the Spot Instance pools. Alternatively, you can request that the EC2 Fleet keep -// the fleet at its current size, but not replace any Spot Instances that are -// interrupted or that you terminate manually. If you are finished with your EC2 -// Fleet for now, but will use it again later, you can set the target capacity to -// 0. -func (c *Client) ModifyFleet(ctx context.Context, params *ModifyFleetInput, optFns ...func(*Options)) (*ModifyFleetOutput, error) { - if params == nil { - params = &ModifyFleetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyFleet", params, optFns, c.addOperationModifyFleetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyFleetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyFleetInput struct { - - // The ID of the EC2 Fleet. - // - // This member is required. - FleetId *string - - // Reserved. - Context *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether running instances should be terminated if the total target - // capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet. - // Supported only for fleets of type maintain . - ExcessCapacityTerminationPolicy types.FleetExcessCapacityTerminationPolicy - - // The launch template and overrides. - LaunchTemplateConfigs []types.FleetLaunchTemplateConfigRequest - - // The size of the EC2 Fleet. - TargetCapacitySpecification *types.TargetCapacitySpecificationRequest - - noSmithyDocumentSerde -} - -type ModifyFleetOutput struct { - - // If the request succeeds, the response returns true . If the request fails, no - // response is returned, and instead an error message is returned. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyFleet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyFleet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyFleet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyFleetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyFleet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyFleet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyFleet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFpgaImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFpgaImageAttribute.go deleted file mode 100644 index 0c119680e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyFpgaImageAttribute.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified attribute of the specified Amazon FPGA Image (AFI). -func (c *Client) ModifyFpgaImageAttribute(ctx context.Context, params *ModifyFpgaImageAttributeInput, optFns ...func(*Options)) (*ModifyFpgaImageAttributeOutput, error) { - if params == nil { - params = &ModifyFpgaImageAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyFpgaImageAttribute", params, optFns, c.addOperationModifyFpgaImageAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyFpgaImageAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyFpgaImageAttributeInput struct { - - // The ID of the AFI. - // - // This member is required. - FpgaImageId *string - - // The name of the attribute. - Attribute types.FpgaImageAttributeName - - // A description for the AFI. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The load permission for the AFI. - LoadPermission *types.LoadPermissionModifications - - // A name for the AFI. - Name *string - - // The operation type. - OperationType types.OperationType - - // The product codes. After you add a product code to an AFI, it can't be removed. - // This parameter is valid only when modifying the productCodes attribute. - ProductCodes []string - - // The user groups. This parameter is valid only when modifying the loadPermission - // attribute. - UserGroups []string - - // The Amazon Web Services account IDs. This parameter is valid only when - // modifying the loadPermission attribute. - UserIds []string - - noSmithyDocumentSerde -} - -type ModifyFpgaImageAttributeOutput struct { - - // Information about the attribute. - FpgaImageAttribute *types.FpgaImageAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyFpgaImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyFpgaImageAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyFpgaImageAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyFpgaImageAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyFpgaImageAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyFpgaImageAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyFpgaImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyFpgaImageAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyHosts.go deleted file mode 100644 index 7a4d73a16..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyHosts.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modify the auto-placement setting of a Dedicated Host. When auto-placement is -// enabled, any instances that you launch with a tenancy of host but without a -// specific host ID are placed onto any available Dedicated Host in your account -// that has auto-placement enabled. When auto-placement is disabled, you need to -// provide a host ID to have the instance launch onto a specific host. If no host -// ID is provided, the instance is launched onto a suitable host with -// auto-placement enabled. You can also use this API action to modify a Dedicated -// Host to support either multiple instance types in an instance family, or to -// support a specific instance type only. -func (c *Client) ModifyHosts(ctx context.Context, params *ModifyHostsInput, optFns ...func(*Options)) (*ModifyHostsOutput, error) { - if params == nil { - params = &ModifyHostsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyHosts", params, optFns, c.addOperationModifyHostsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyHostsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyHostsInput struct { - - // The IDs of the Dedicated Hosts to modify. - // - // This member is required. - HostIds []string - - // Specify whether to enable or disable auto-placement. - AutoPlacement types.AutoPlacement - - // Indicates whether to enable or disable host maintenance for the Dedicated Host. - // For more information, see Host maintenance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-maintenance.html) - // in the Amazon EC2 User Guide. - HostMaintenance types.HostMaintenance - - // Indicates whether to enable or disable host recovery for the Dedicated Host. - // For more information, see Host recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) - // in the Amazon EC2 User Guide. - HostRecovery types.HostRecovery - - // Specifies the instance family to be supported by the Dedicated Host. Specify - // this parameter to modify a Dedicated Host to support multiple instance types - // within its current instance family. If you want to modify a Dedicated Host to - // support a specific instance type only, omit this parameter and specify - // InstanceType instead. You cannot specify InstanceFamily and InstanceType in the - // same request. - InstanceFamily *string - - // Specifies the instance type to be supported by the Dedicated Host. Specify this - // parameter to modify a Dedicated Host to support only a specific instance type. - // If you want to modify a Dedicated Host to support multiple instance types in its - // current instance family, omit this parameter and specify InstanceFamily instead. - // You cannot specify InstanceType and InstanceFamily in the same request. - InstanceType *string - - noSmithyDocumentSerde -} - -type ModifyHostsOutput struct { - - // The IDs of the Dedicated Hosts that were successfully modified. - Successful []string - - // The IDs of the Dedicated Hosts that could not be modified. Check whether the - // setting you requested can be used. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyHostsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyHosts{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyHosts{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyHosts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyHostsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyHosts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyHosts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyHosts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdFormat.go deleted file mode 100644 index 2b36ac4a5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdFormat.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the ID format for the specified resource on a per-Region basis. You -// can specify that resources should receive longer IDs (17-character IDs) when -// they are created. This request can only be used to modify longer ID settings for -// resource types that are within the opt-in period. Resources currently in their -// opt-in period include: bundle | conversion-task | customer-gateway | -// dhcp-options | elastic-ip-allocation | elastic-ip-association | export-task | -// flow-log | image | import-task | internet-gateway | network-acl | -// network-acl-association | network-interface | network-interface-attachment | -// prefix-list | route-table | route-table-association | security-group | subnet | -// subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint -// | vpc-peering-connection | vpn-connection | vpn-gateway . This setting applies -// to the IAM user who makes the request; it does not apply to the entire Amazon -// Web Services account. By default, an IAM user defaults to the same settings as -// the root user. If you're using this action as the root user, then these settings -// apply to the entire account, unless an IAM user explicitly overrides these -// settings for themselves. For more information, see Resource IDs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) -// in the Amazon Elastic Compute Cloud User Guide. Resources created with longer -// IDs are visible to all IAM roles and users, regardless of these settings and -// provided that they have permission to use the relevant Describe command for the -// resource type. -func (c *Client) ModifyIdFormat(ctx context.Context, params *ModifyIdFormatInput, optFns ...func(*Options)) (*ModifyIdFormatOutput, error) { - if params == nil { - params = &ModifyIdFormatInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIdFormat", params, optFns, c.addOperationModifyIdFormatMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIdFormatOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIdFormatInput struct { - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | - // image | import-task | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | route-table - // | route-table-association | security-group | subnet | - // subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint - // | vpc-peering-connection | vpn-connection | vpn-gateway . Alternatively, use the - // all-current option to include all resource types that are currently within their - // opt-in period for longer IDs. - // - // This member is required. - Resource *string - - // Indicate whether the resource should use longer IDs (17-character IDs). - // - // This member is required. - UseLongIds *bool - - noSmithyDocumentSerde -} - -type ModifyIdFormatOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIdFormat{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIdFormat{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIdFormat"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIdFormatValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIdFormat(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIdFormat", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdentityIdFormat.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdentityIdFormat.go deleted file mode 100644 index 2d8620ba1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIdentityIdFormat.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the ID format of a resource for a specified IAM user, IAM role, or the -// root user for an account; or all IAM users, IAM roles, and the root user for an -// account. You can specify that resources should receive longer IDs (17-character -// IDs) when they are created. This request can only be used to modify longer ID -// settings for resource types that are within the opt-in period. Resources -// currently in their opt-in period include: bundle | conversion-task | -// customer-gateway | dhcp-options | elastic-ip-allocation | elastic-ip-association -// | export-task | flow-log | image | import-task | internet-gateway | network-acl -// | network-acl-association | network-interface | network-interface-attachment | -// prefix-list | route-table | route-table-association | security-group | subnet | -// subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint -// | vpc-peering-connection | vpn-connection | vpn-gateway . For more information, -// see Resource IDs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resource-ids.html) -// in the Amazon Elastic Compute Cloud User Guide. This setting applies to the -// principal specified in the request; it does not apply to the principal that -// makes the request. Resources created with longer IDs are visible to all IAM -// roles and users, regardless of these settings and provided that they have -// permission to use the relevant Describe command for the resource type. -func (c *Client) ModifyIdentityIdFormat(ctx context.Context, params *ModifyIdentityIdFormatInput, optFns ...func(*Options)) (*ModifyIdentityIdFormatOutput, error) { - if params == nil { - params = &ModifyIdentityIdFormatInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIdentityIdFormat", params, optFns, c.addOperationModifyIdentityIdFormatMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIdentityIdFormatOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIdentityIdFormatInput struct { - - // The ARN of the principal, which can be an IAM user, IAM role, or the root user. - // Specify all to modify the ID format for all IAM users, IAM roles, and the root - // user of the account. - // - // This member is required. - PrincipalArn *string - - // The type of resource: bundle | conversion-task | customer-gateway | dhcp-options - // | elastic-ip-allocation | elastic-ip-association | export-task | flow-log | - // image | import-task | internet-gateway | network-acl | network-acl-association - // | network-interface | network-interface-attachment | prefix-list | route-table - // | route-table-association | security-group | subnet | - // subnet-cidr-block-association | vpc | vpc-cidr-block-association | vpc-endpoint - // | vpc-peering-connection | vpn-connection | vpn-gateway . Alternatively, use the - // all-current option to include all resource types that are currently within their - // opt-in period for longer IDs. - // - // This member is required. - Resource *string - - // Indicates whether the resource should use longer IDs (17-character IDs) - // - // This member is required. - UseLongIds *bool - - noSmithyDocumentSerde -} - -type ModifyIdentityIdFormatOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIdentityIdFormatMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIdentityIdFormat{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIdentityIdFormat{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIdentityIdFormat"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIdentityIdFormatValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIdentityIdFormat(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIdentityIdFormat(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIdentityIdFormat", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyImageAttribute.go deleted file mode 100644 index 1552bd03f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyImageAttribute.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified attribute of the specified AMI. You can specify only one -// attribute at a time. To specify the attribute, you can use the Attribute -// parameter, or one of the following parameters: Description , ImdsSupport , or -// LaunchPermission . Images with an Amazon Web Services Marketplace product code -// cannot be made public. To enable the SriovNetSupport enhanced networking -// attribute of an image, enable SriovNetSupport on an instance and create an AMI -// from the instance. -func (c *Client) ModifyImageAttribute(ctx context.Context, params *ModifyImageAttributeInput, optFns ...func(*Options)) (*ModifyImageAttributeOutput, error) { - if params == nil { - params = &ModifyImageAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyImageAttribute", params, optFns, c.addOperationModifyImageAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyImageAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for ModifyImageAttribute. -type ModifyImageAttributeInput struct { - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // The name of the attribute to modify. Valid values: description | imdsSupport | - // launchPermission - Attribute *string - - // A new description for the AMI. - Description *types.AttributeValue - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched - // from this AMI will have HttpTokens automatically set to required so that, by - // default, the instance requires that IMDSv2 is used when requesting instance - // metadata. In addition, HttpPutResponseHopLimit is set to 2 . For more - // information, see Configure the AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration) - // in the Amazon EC2 User Guide. Do not use this parameter unless your AMI software - // supports IMDSv2. After you set the value to v2.0 , you can't undo it. The only - // way to “reset” your AMI is to create a new AMI from the underlying snapshot. - ImdsSupport *types.AttributeValue - - // A new launch permission for the AMI. - LaunchPermission *types.LaunchPermissionModifications - - // The operation type. This parameter can be used only when the Attribute - // parameter is launchPermission . - OperationType types.OperationType - - // The Amazon Resource Name (ARN) of an organization. This parameter can be used - // only when the Attribute parameter is launchPermission . - OrganizationArns []string - - // The Amazon Resource Name (ARN) of an organizational unit (OU). This parameter - // can be used only when the Attribute parameter is launchPermission . - OrganizationalUnitArns []string - - // Not supported. - ProductCodes []string - - // The user groups. This parameter can be used only when the Attribute parameter - // is launchPermission . - UserGroups []string - - // The Amazon Web Services account IDs. This parameter can be used only when the - // Attribute parameter is launchPermission . - UserIds []string - - // The value of the attribute being modified. This parameter can be used only when - // the Attribute parameter is description or imdsSupport . - Value *string - - noSmithyDocumentSerde -} - -type ModifyImageAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyImageAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyImageAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyImageAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyImageAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyImageAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyImageAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go deleted file mode 100644 index e780a2ef4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceAttribute.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified attribute of the specified instance. You can specify -// only one attribute at a time. Note: Using this action to change the security -// groups associated with an elastic network interface (ENI) attached to an -// instance can result in an error if the instance has more than one ENI. To change -// the security groups associated with an ENI attached to an instance that has -// multiple ENIs, we recommend that you use the ModifyNetworkInterfaceAttribute -// action. To modify some attributes, the instance must be stopped. For more -// information, see Modify a stopped instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyInstanceAttribute(ctx context.Context, params *ModifyInstanceAttributeInput, optFns ...func(*Options)) (*ModifyInstanceAttributeOutput, error) { - if params == nil { - params = &ModifyInstanceAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceAttribute", params, optFns, c.addOperationModifyInstanceAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceAttributeInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // The name of the attribute to modify. You can modify the following attributes - // only: disableApiTermination | instanceType | kernel | ramdisk | - // instanceInitiatedShutdownBehavior | blockDeviceMapping | userData | - // sourceDestCheck | groupSet | ebsOptimized | sriovNetSupport | enaSupport | - // nvmeSupport | disableApiStop | enclaveOptions - Attribute types.InstanceAttributeName - - // Modifies the DeleteOnTermination attribute for volumes that are currently - // attached. The volume must be owned by the caller. If no value is specified for - // DeleteOnTermination , the default is true and the volume is deleted when the - // instance is terminated. You can't modify the DeleteOnTermination attribute for - // volumes that are attached to Fargate tasks. To add instance store volumes to an - // Amazon EBS-backed instance, you must add them when you launch the instance. For - // more information, see Update the block device mapping when launching an instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) - // in the Amazon EC2 User Guide. - BlockDeviceMappings []types.InstanceBlockDeviceMappingSpecification - - // Indicates whether an instance is enabled for stop protection. For more - // information, see Stop Protection (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection) - // . - DisableApiStop *types.AttributeBooleanValue - - // If the value is true , you can't terminate the instance using the Amazon EC2 - // console, CLI, or API; otherwise, you can. You cannot use this parameter for Spot - // Instances. - DisableApiTermination *types.AttributeBooleanValue - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specifies whether the instance is optimized for Amazon EBS I/O. This - // optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal EBS I/O performance. This optimization - // isn't available with all instance types. Additional usage charges apply when - // using an EBS Optimized instance. - EbsOptimized *types.AttributeBooleanValue - - // Set to true to enable enhanced networking with ENA for the instance. This - // option is supported only for HVM instances. Specifying this option with a PV - // instance can make it unreachable. - EnaSupport *types.AttributeBooleanValue - - // Replaces the security groups of the instance with the specified security - // groups. You must specify the ID of at least one security group, even if it's - // just the default security group for the VPC. - Groups []string - - // Specifies whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior *types.AttributeValue - - // Changes the instance type to the specified value. For more information, see - // Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. If the instance type is not valid, the error - // returned is InvalidInstanceAttributeValue . - InstanceType *types.AttributeValue - - // Changes the instance's kernel to the specified value. We recommend that you use - // PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html) - // . - Kernel *types.AttributeValue - - // Changes the instance's RAM disk to the specified value. We recommend that you - // use PV-GRUB instead of kernels and RAM disks. For more information, see PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html) - // . - Ramdisk *types.AttributeValue - - // Enable or disable source/destination checks, which ensure that the instance is - // either the source or the destination of any traffic that it receives. If the - // value is true , source/destination checks are enabled; otherwise, they are - // disabled. The default value is true . You must disable source/destination checks - // if the instance runs services such as network address translation, routing, or - // firewalls. - SourceDestCheck *types.AttributeBooleanValue - - // Set to simple to enable enhanced networking with the Intel 82599 Virtual - // Function interface for the instance. There is no way to disable enhanced - // networking with the Intel 82599 Virtual Function interface at this time. This - // option is supported only for HVM instances. Specifying this option with a PV - // instance can make it unreachable. - SriovNetSupport *types.AttributeValue - - // Changes the instance's user data to the specified value. If you are using an - // Amazon Web Services SDK or command line tool, base64-encoding is performed for - // you, and you can load the text from a file. Otherwise, you must provide - // base64-encoded text. - UserData *types.BlobAttributeValue - - // A new value for the attribute. Use only with the kernel , ramdisk , userData , - // disableApiTermination , or instanceInitiatedShutdownBehavior attribute. - Value *string - - noSmithyDocumentSerde -} - -type ModifyInstanceAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go deleted file mode 100644 index 6bff74877..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCapacityReservationAttributes.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the Capacity Reservation settings for a stopped instance. Use this -// action to configure an instance to target a specific Capacity Reservation, run -// in any open Capacity Reservation with matching attributes, or run On-Demand -// Instance capacity. -func (c *Client) ModifyInstanceCapacityReservationAttributes(ctx context.Context, params *ModifyInstanceCapacityReservationAttributesInput, optFns ...func(*Options)) (*ModifyInstanceCapacityReservationAttributesOutput, error) { - if params == nil { - params = &ModifyInstanceCapacityReservationAttributesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceCapacityReservationAttributes", params, optFns, c.addOperationModifyInstanceCapacityReservationAttributesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceCapacityReservationAttributesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceCapacityReservationAttributesInput struct { - - // Information about the Capacity Reservation targeting option. - // - // This member is required. - CapacityReservationSpecification *types.CapacityReservationSpecification - - // The ID of the instance to be modified. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyInstanceCapacityReservationAttributesOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceCapacityReservationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceCapacityReservationAttributes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceCapacityReservationAttributesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceCapacityReservationAttributes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceCapacityReservationAttributes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceCapacityReservationAttributes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go deleted file mode 100644 index 2d27d673e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceCreditSpecification.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the credit option for CPU usage on a running or stopped burstable -// performance instance. The credit options are standard and unlimited . For more -// information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyInstanceCreditSpecification(ctx context.Context, params *ModifyInstanceCreditSpecificationInput, optFns ...func(*Options)) (*ModifyInstanceCreditSpecificationOutput, error) { - if params == nil { - params = &ModifyInstanceCreditSpecificationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceCreditSpecification", params, optFns, c.addOperationModifyInstanceCreditSpecificationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceCreditSpecificationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceCreditSpecificationInput struct { - - // Information about the credit option for CPU usage. - // - // This member is required. - InstanceCreditSpecifications []types.InstanceCreditSpecificationRequest - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyInstanceCreditSpecificationOutput struct { - - // Information about the instances whose credit option for CPU usage was - // successfully modified. - SuccessfulInstanceCreditSpecifications []types.SuccessfulInstanceCreditSpecificationItem - - // Information about the instances whose credit option for CPU usage was not - // modified. - UnsuccessfulInstanceCreditSpecifications []types.UnsuccessfulInstanceCreditSpecificationItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceCreditSpecificationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceCreditSpecification{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceCreditSpecification{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceCreditSpecification"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceCreditSpecificationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceCreditSpecification(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceCreditSpecification(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceCreditSpecification", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go deleted file mode 100644 index 7a4d71937..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventStartTime.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Modifies the start time for a scheduled Amazon EC2 instance event. -func (c *Client) ModifyInstanceEventStartTime(ctx context.Context, params *ModifyInstanceEventStartTimeInput, optFns ...func(*Options)) (*ModifyInstanceEventStartTimeOutput, error) { - if params == nil { - params = &ModifyInstanceEventStartTimeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceEventStartTime", params, optFns, c.addOperationModifyInstanceEventStartTimeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceEventStartTimeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceEventStartTimeInput struct { - - // The ID of the event whose date and time you are modifying. - // - // This member is required. - InstanceEventId *string - - // The ID of the instance with the scheduled event. - // - // This member is required. - InstanceId *string - - // The new date and time when the event will take place. - // - // This member is required. - NotBefore *time.Time - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyInstanceEventStartTimeOutput struct { - - // Information about the event. - Event *types.InstanceStatusEvent - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceEventStartTimeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceEventStartTime{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceEventStartTime{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceEventStartTime"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceEventStartTimeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceEventStartTime(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceEventStartTime(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceEventStartTime", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventWindow.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventWindow.go deleted file mode 100644 index 67f101722..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceEventWindow.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified event window. You can define either a set of time ranges -// or a cron expression when modifying the event window, but not both. To modify -// the targets associated with the event window, use the -// AssociateInstanceEventWindow and DisassociateInstanceEventWindow API. If Amazon -// Web Services has already scheduled an event, modifying an event window won't -// change the time of the scheduled event. For more information, see Define event -// windows for scheduled events (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/event-windows.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyInstanceEventWindow(ctx context.Context, params *ModifyInstanceEventWindowInput, optFns ...func(*Options)) (*ModifyInstanceEventWindowOutput, error) { - if params == nil { - params = &ModifyInstanceEventWindowInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceEventWindow", params, optFns, c.addOperationModifyInstanceEventWindowMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceEventWindowOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceEventWindowInput struct { - - // The ID of the event window. - // - // This member is required. - InstanceEventWindowId *string - - // The cron expression of the event window, for example, * 0-4,20-23 * * 1,5 . - // Constraints: - // - Only hour and day of the week values are supported. - // - For day of the week values, you can specify either integers 0 through 6 , or - // alternative single values SUN through SAT . - // - The minute, month, and year must be specified by * . - // - The hour value must be one or a multiple range, for example, 0-4 or - // 0-4,20-23 . - // - Each hour range must be >= 2 hours, for example, 0-2 or 20-23 . - // - The event window must be >= 4 hours. The combined total time ranges in the - // event window must be >= 4 hours. - // For more information about cron expressions, see cron (https://en.wikipedia.org/wiki/Cron) - // on the Wikipedia website. - CronExpression *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name of the event window. - Name *string - - // The time ranges of the event window. - TimeRanges []types.InstanceEventWindowTimeRangeRequest - - noSmithyDocumentSerde -} - -type ModifyInstanceEventWindowOutput struct { - - // Information about the event window. - InstanceEventWindow *types.InstanceEventWindow - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceEventWindowMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceEventWindow{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceEventWindow"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceEventWindowValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceEventWindow(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceEventWindow(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceEventWindow", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go deleted file mode 100644 index d17dd5a4c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMaintenanceOptions.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the recovery behavior of your instance to disable simplified automatic -// recovery or set the recovery behavior to default. The default configuration will -// not enable simplified automatic recovery for an unsupported instance type. For -// more information, see Simplified automatic recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery) -// . -func (c *Client) ModifyInstanceMaintenanceOptions(ctx context.Context, params *ModifyInstanceMaintenanceOptionsInput, optFns ...func(*Options)) (*ModifyInstanceMaintenanceOptionsOutput, error) { - if params == nil { - params = &ModifyInstanceMaintenanceOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceMaintenanceOptions", params, optFns, c.addOperationModifyInstanceMaintenanceOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceMaintenanceOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceMaintenanceOptionsInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Disables the automatic recovery behavior of your instance or sets it to default. - AutoRecovery types.InstanceAutoRecoveryState - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyInstanceMaintenanceOptionsOutput struct { - - // Provides information on the current automatic recovery behavior of your - // instance. - AutoRecovery types.InstanceAutoRecoveryState - - // The ID of the instance. - InstanceId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceMaintenanceOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceMaintenanceOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceMaintenanceOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceMaintenanceOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceMaintenanceOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceMaintenanceOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceMaintenanceOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceMaintenanceOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataOptions.go deleted file mode 100644 index b17c10d35..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstanceMetadataOptions.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modify the instance metadata parameters on a running or stopped instance. When -// you modify the parameters on a stopped instance, they are applied when the -// instance is started. When you modify the parameters on a running instance, the -// API responds with a state of “pending”. After the parameter modifications are -// successfully applied to the instance, the state of the modifications changes -// from “pending” to “applied” in subsequent describe-instances API calls. For more -// information, see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyInstanceMetadataOptions(ctx context.Context, params *ModifyInstanceMetadataOptionsInput, optFns ...func(*Options)) (*ModifyInstanceMetadataOptionsOutput, error) { - if params == nil { - params = &ModifyInstanceMetadataOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstanceMetadataOptions", params, optFns, c.addOperationModifyInstanceMetadataOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstanceMetadataOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstanceMetadataOptionsInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Enables or disables the HTTP metadata endpoint on your instances. If this - // parameter is not specified, the existing state is maintained. If you specify a - // value of disabled , you cannot access your instance metadata. - HttpEndpoint types.InstanceMetadataEndpointState - - // Enables or disables the IPv6 endpoint for the instance metadata service. - // Applies only if you enabled the HTTP metadata endpoint. - HttpProtocolIpv6 types.InstanceMetadataProtocolState - - // The desired HTTP PUT response hop limit for instance metadata requests. The - // larger the number, the further instance metadata requests can travel. If no - // parameter is specified, the existing state is maintained. Possible values: - // Integers from 1 to 64 - HttpPutResponseHopLimit *int32 - - // Indicates whether IMDSv2 is required. - // - optional - IMDSv2 is optional. You can choose whether to send a session - // token in your instance metadata retrieval requests. If you retrieve IAM role - // credentials without a session token, you receive the IMDSv1 role credentials. If - // you retrieve IAM role credentials using a valid session token, you receive the - // IMDSv2 role credentials. - // - required - IMDSv2 is required. You must send a session token in your - // instance metadata retrieval requests. With this option, retrieving the IAM role - // credentials always returns IMDSv2 credentials; IMDSv1 credentials are not - // available. - // Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) for - // your instance is v2.0 , the default is required . - HttpTokens types.HttpTokensState - - // Set to enabled to allow access to instance tags from the instance metadata. Set - // to disabled to turn off access to instance tags from the instance metadata. For - // more information, see Work with instance tags using the instance metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS) - // . Default: disabled - InstanceMetadataTags types.InstanceMetadataTagsState - - noSmithyDocumentSerde -} - -type ModifyInstanceMetadataOptionsOutput struct { - - // The ID of the instance. - InstanceId *string - - // The metadata options for the instance. - InstanceMetadataOptions *types.InstanceMetadataOptionsResponse - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstanceMetadataOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstanceMetadataOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstanceMetadataOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstanceMetadataOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstanceMetadataOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstanceMetadataOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstanceMetadataOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstanceMetadataOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstancePlacement.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstancePlacement.go deleted file mode 100644 index 3b8baefb7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyInstancePlacement.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the placement attributes for a specified instance. You can do the -// following: -// - Modify the affinity between an instance and a Dedicated Host (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) -// . When affinity is set to host and the instance is not associated with a -// specific Dedicated Host, the next time the instance is launched, it is -// automatically associated with the host on which it lands. If the instance is -// restarted or rebooted, this relationship persists. -// - Change the Dedicated Host with which an instance is associated. -// - Change the instance tenancy of an instance. -// - Move an instance to or from a placement group (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// . -// -// At least one attribute for affinity, host ID, tenancy, or placement group name -// must be specified in the request. Affinity and tenancy can be modified in the -// same request. To modify the host ID, tenancy, placement group, or partition for -// an instance, the instance must be in the stopped state. -func (c *Client) ModifyInstancePlacement(ctx context.Context, params *ModifyInstancePlacementInput, optFns ...func(*Options)) (*ModifyInstancePlacementOutput, error) { - if params == nil { - params = &ModifyInstancePlacementInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyInstancePlacement", params, optFns, c.addOperationModifyInstancePlacementMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyInstancePlacementOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyInstancePlacementInput struct { - - // The ID of the instance that you are modifying. - // - // This member is required. - InstanceId *string - - // The affinity setting for the instance. - Affinity types.Affinity - - // The Group Id of a placement group. You must specify the Placement Group Group - // Id to launch an instance in a shared placement group. - GroupId *string - - // The name of the placement group in which to place the instance. For spread - // placement groups, the instance must have a tenancy of default . For cluster and - // partition placement groups, the instance must have a tenancy of default or - // dedicated . To remove an instance from a placement group, specify an empty - // string (""). - GroupName *string - - // The ID of the Dedicated Host with which to associate the instance. - HostId *string - - // The ARN of the host resource group in which to place the instance. The instance - // must have a tenancy of host to specify this parameter. - HostResourceGroupArn *string - - // The number of the partition in which to place the instance. Valid only if the - // placement group strategy is set to partition . - PartitionNumber *int32 - - // The tenancy for the instance. For T3 instances, you must launch the instance on - // a Dedicated Host to use a tenancy of host . You can't change the tenancy from - // host to dedicated or default . Attempting to make one of these unsupported - // tenancy changes results in an InvalidRequest error code. - Tenancy types.HostTenancy - - noSmithyDocumentSerde -} - -type ModifyInstancePlacementOutput struct { - - // Is true if the request succeeds, and an error otherwise. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyInstancePlacementMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyInstancePlacement{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyInstancePlacement{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyInstancePlacement"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyInstancePlacementValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyInstancePlacement(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyInstancePlacement(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyInstancePlacement", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpam.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpam.go deleted file mode 100644 index 3be528c47..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpam.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modify the configurations of an IPAM. -func (c *Client) ModifyIpam(ctx context.Context, params *ModifyIpamInput, optFns ...func(*Options)) (*ModifyIpamOutput, error) { - if params == nil { - params = &ModifyIpamInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIpam", params, optFns, c.addOperationModifyIpamMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIpamOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIpamInput struct { - - // The ID of the IPAM you want to modify. - // - // This member is required. - IpamId *string - - // Choose the operating Regions for the IPAM. Operating Regions are Amazon Web - // Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only - // discovers and monitors resources in the Amazon Web Services Regions you select - // as operating Regions. For more information about operating Regions, see Create - // an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) in the - // Amazon VPC IPAM User Guide. - AddOperatingRegions []types.AddIpamOperatingRegion - - // The description of the IPAM you want to modify. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The operating Regions to remove. - RemoveOperatingRegions []types.RemoveIpamOperatingRegion - - // IPAM is offered in a Free Tier and an Advanced Tier. For more information about - // the features available in each tier and the costs associated with the tiers, see - // Amazon VPC pricing > IPAM tab (http://aws.amazon.com/vpc/pricing/) . - Tier types.IpamTier - - noSmithyDocumentSerde -} - -type ModifyIpamOutput struct { - - // The results of the modification. - Ipam *types.Ipam - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIpamMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIpam{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIpam{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIpam"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIpamValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIpam(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIpam(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIpam", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamPool.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamPool.go deleted file mode 100644 index 5894e9848..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamPool.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modify the configurations of an IPAM pool. For more information, see Modify a -// pool (https://docs.aws.amazon.com/vpc/latest/ipam/mod-pool-ipam.html) in the -// Amazon VPC IPAM User Guide. -func (c *Client) ModifyIpamPool(ctx context.Context, params *ModifyIpamPoolInput, optFns ...func(*Options)) (*ModifyIpamPoolOutput, error) { - if params == nil { - params = &ModifyIpamPoolInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIpamPool", params, optFns, c.addOperationModifyIpamPoolMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIpamPoolOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIpamPoolInput struct { - - // The ID of the IPAM pool you want to modify. - // - // This member is required. - IpamPoolId *string - - // Add tag allocation rules to a pool. For more information about allocation - // rules, see Create a top-level pool (https://docs.aws.amazon.com/vpc/latest/ipam/create-top-ipam.html) - // in the Amazon VPC IPAM User Guide. - AddAllocationResourceTags []types.RequestIpamResourceTag - - // The default netmask length for allocations added to this pool. If, for example, - // the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new - // allocations will default to 10.0.0.0/16. - AllocationDefaultNetmaskLength *int32 - - // The maximum netmask length possible for CIDR allocations in this IPAM pool to - // be compliant. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible - // netmask lengths for IPv6 addresses are 0 - 128.The maximum netmask length must - // be greater than the minimum netmask length. - AllocationMaxNetmaskLength *int32 - - // The minimum netmask length required for CIDR allocations in this IPAM pool to - // be compliant. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible - // netmask lengths for IPv6 addresses are 0 - 128. The minimum netmask length must - // be less than the maximum netmask length. - AllocationMinNetmaskLength *int32 - - // If true, IPAM will continuously look for resources within the CIDR range of - // this pool and automatically import them as allocations into your IPAM. The CIDRs - // that will be allocated for these resources must not already be allocated to - // other resources in order for the import to succeed. IPAM will import a CIDR - // regardless of its compliance with the pool's allocation rules, so a resource - // might be imported and subsequently marked as noncompliant. If IPAM discovers - // multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM - // discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of - // them only. A locale must be set on the pool for this feature to work. - AutoImport *bool - - // Clear the default netmask length allocation rule for this pool. - ClearAllocationDefaultNetmaskLength *bool - - // The description of the IPAM pool you want to modify. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Remove tag allocation rules from a pool. - RemoveAllocationResourceTags []types.RequestIpamResourceTag - - noSmithyDocumentSerde -} - -type ModifyIpamPoolOutput struct { - - // The results of the modification. - IpamPool *types.IpamPool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIpamPoolMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIpamPool{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIpamPool{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIpamPool"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIpamPoolValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIpamPool(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIpamPool(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIpamPool", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamResourceCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamResourceCidr.go deleted file mode 100644 index 33ba04752..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamResourceCidr.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modify a resource CIDR. You can use this action to transfer resource CIDRs -// between scopes and ignore resource CIDRs that you do not want to manage. If set -// to false, the resource will not be tracked for overlap, it cannot be -// auto-imported into a pool, and it will be removed from any pool it has an -// allocation in. For more information, see Move resource CIDRs between scopes (https://docs.aws.amazon.com/vpc/latest/ipam/move-resource-ipam.html) -// and Change the monitoring state of resource CIDRs (https://docs.aws.amazon.com/vpc/latest/ipam/change-monitoring-state-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) ModifyIpamResourceCidr(ctx context.Context, params *ModifyIpamResourceCidrInput, optFns ...func(*Options)) (*ModifyIpamResourceCidrOutput, error) { - if params == nil { - params = &ModifyIpamResourceCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIpamResourceCidr", params, optFns, c.addOperationModifyIpamResourceCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIpamResourceCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIpamResourceCidrInput struct { - - // The ID of the current scope that the resource CIDR is in. - // - // This member is required. - CurrentIpamScopeId *string - - // Determines if the resource is monitored by IPAM. If a resource is monitored, - // the resource is discovered by IPAM and you can view details about the resource’s - // CIDR. - // - // This member is required. - Monitored *bool - - // The CIDR of the resource you want to modify. - // - // This member is required. - ResourceCidr *string - - // The ID of the resource you want to modify. - // - // This member is required. - ResourceId *string - - // The Amazon Web Services Region of the resource you want to modify. - // - // This member is required. - ResourceRegion *string - - // The ID of the scope you want to transfer the resource CIDR to. - DestinationIpamScopeId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyIpamResourceCidrOutput struct { - - // The CIDR of the resource. - IpamResourceCidr *types.IpamResourceCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIpamResourceCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIpamResourceCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIpamResourceCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIpamResourceCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIpamResourceCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIpamResourceCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIpamResourceCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIpamResourceCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamResourceDiscovery.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamResourceDiscovery.go deleted file mode 100644 index 546c2081f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamResourceDiscovery.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a resource discovery. A resource discovery is an IPAM component that -// enables IPAM to manage and monitor resources that belong to the owning account. -func (c *Client) ModifyIpamResourceDiscovery(ctx context.Context, params *ModifyIpamResourceDiscoveryInput, optFns ...func(*Options)) (*ModifyIpamResourceDiscoveryOutput, error) { - if params == nil { - params = &ModifyIpamResourceDiscoveryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIpamResourceDiscovery", params, optFns, c.addOperationModifyIpamResourceDiscoveryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIpamResourceDiscoveryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIpamResourceDiscoveryInput struct { - - // A resource discovery ID. - // - // This member is required. - IpamResourceDiscoveryId *string - - // Add operating Regions to the resource discovery. Operating Regions are Amazon - // Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM - // only discovers and monitors resources in the Amazon Web Services Regions you - // select as operating Regions. - AddOperatingRegions []types.AddIpamOperatingRegion - - // A resource discovery description. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Remove operating Regions. - RemoveOperatingRegions []types.RemoveIpamOperatingRegion - - noSmithyDocumentSerde -} - -type ModifyIpamResourceDiscoveryOutput struct { - - // A resource discovery. - IpamResourceDiscovery *types.IpamResourceDiscovery - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIpamResourceDiscoveryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIpamResourceDiscovery{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIpamResourceDiscovery"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIpamResourceDiscoveryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIpamResourceDiscovery(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIpamResourceDiscovery(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIpamResourceDiscovery", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamScope.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamScope.go deleted file mode 100644 index f4710a70a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyIpamScope.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modify an IPAM scope. -func (c *Client) ModifyIpamScope(ctx context.Context, params *ModifyIpamScopeInput, optFns ...func(*Options)) (*ModifyIpamScopeOutput, error) { - if params == nil { - params = &ModifyIpamScopeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyIpamScope", params, optFns, c.addOperationModifyIpamScopeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyIpamScopeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyIpamScopeInput struct { - - // The ID of the scope you want to modify. - // - // This member is required. - IpamScopeId *string - - // The description of the scope you want to modify. - Description *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyIpamScopeOutput struct { - - // The results of the modification. - IpamScope *types.IpamScope - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyIpamScopeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyIpamScope{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyIpamScope{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyIpamScope"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyIpamScopeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyIpamScope(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyIpamScope(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyIpamScope", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLaunchTemplate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLaunchTemplate.go deleted file mode 100644 index a86b3a7df..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLaunchTemplate.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a launch template. You can specify which version of the launch -// template to set as the default version. When launching an instance, the default -// version applies when a launch template version is not specified. -func (c *Client) ModifyLaunchTemplate(ctx context.Context, params *ModifyLaunchTemplateInput, optFns ...func(*Options)) (*ModifyLaunchTemplateOutput, error) { - if params == nil { - params = &ModifyLaunchTemplateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyLaunchTemplate", params, optFns, c.addOperationModifyLaunchTemplateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyLaunchTemplateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyLaunchTemplateInput struct { - - // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraint: Maximum 128 ASCII characters. - ClientToken *string - - // The version number of the launch template to set as the default version. - DefaultVersion *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the launch template. You must specify either the LaunchTemplateId or - // the LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify either the LaunchTemplateName - // or the LaunchTemplateId , but not both. - LaunchTemplateName *string - - noSmithyDocumentSerde -} - -type ModifyLaunchTemplateOutput struct { - - // Information about the launch template. - LaunchTemplate *types.LaunchTemplate - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyLaunchTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyLaunchTemplate{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyLaunchTemplate{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyLaunchTemplate"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyLaunchTemplate(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyLaunchTemplate(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyLaunchTemplate", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLocalGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLocalGatewayRoute.go deleted file mode 100644 index 0f1b5e1f8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyLocalGatewayRoute.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified local gateway route. -func (c *Client) ModifyLocalGatewayRoute(ctx context.Context, params *ModifyLocalGatewayRouteInput, optFns ...func(*Options)) (*ModifyLocalGatewayRouteOutput, error) { - if params == nil { - params = &ModifyLocalGatewayRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyLocalGatewayRoute", params, optFns, c.addOperationModifyLocalGatewayRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyLocalGatewayRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyLocalGatewayRouteInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // The CIDR block used for destination matches. The value that you provide must - // match the CIDR of an existing route in the table. - DestinationCidrBlock *string - - // The ID of the prefix list. Use a prefix list in place of DestinationCidrBlock . - // You cannot use DestinationPrefixListId and DestinationCidrBlock in the same - // request. - DestinationPrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the virtual interface group. - LocalGatewayVirtualInterfaceGroupId *string - - // The ID of the network interface. - NetworkInterfaceId *string - - noSmithyDocumentSerde -} - -type ModifyLocalGatewayRouteOutput struct { - - // Information about the local gateway route table. - Route *types.LocalGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyLocalGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyLocalGatewayRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyLocalGatewayRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyLocalGatewayRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyLocalGatewayRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyLocalGatewayRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyLocalGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyLocalGatewayRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyManagedPrefixList.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyManagedPrefixList.go deleted file mode 100644 index 42ed22ed4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyManagedPrefixList.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified managed prefix list. Adding or removing entries in a -// prefix list creates a new version of the prefix list. Changing the name of the -// prefix list does not affect the version. If you specify a current version number -// that does not match the true current version number, the request fails. -func (c *Client) ModifyManagedPrefixList(ctx context.Context, params *ModifyManagedPrefixListInput, optFns ...func(*Options)) (*ModifyManagedPrefixListOutput, error) { - if params == nil { - params = &ModifyManagedPrefixListInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyManagedPrefixList", params, optFns, c.addOperationModifyManagedPrefixListMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyManagedPrefixListOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyManagedPrefixListInput struct { - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // One or more entries to add to the prefix list. - AddEntries []types.AddPrefixListEntry - - // The current version of the prefix list. - CurrentVersion *int64 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of entries for the prefix list. You cannot modify the - // entries of a prefix list and modify the size of a prefix list at the same time. - // If any of the resources that reference the prefix list cannot support the new - // maximum size, the modify operation fails. Check the state message for the IDs of - // the first ten resources that do not support the new maximum size. - MaxEntries *int32 - - // A name for the prefix list. - PrefixListName *string - - // One or more entries to remove from the prefix list. - RemoveEntries []types.RemovePrefixListEntry - - noSmithyDocumentSerde -} - -type ModifyManagedPrefixListOutput struct { - - // Information about the prefix list. - PrefixList *types.ManagedPrefixList - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyManagedPrefixListMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyManagedPrefixList{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyManagedPrefixList{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyManagedPrefixList"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyManagedPrefixListValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyManagedPrefixList(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyManagedPrefixList(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyManagedPrefixList", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go deleted file mode 100644 index 79ecf14f7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyNetworkInterfaceAttribute.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified network interface attribute. You can specify only one -// attribute at a time. You can use this action to attach and detach security -// groups from an existing EC2 instance. -func (c *Client) ModifyNetworkInterfaceAttribute(ctx context.Context, params *ModifyNetworkInterfaceAttributeInput, optFns ...func(*Options)) (*ModifyNetworkInterfaceAttributeOutput, error) { - if params == nil { - params = &ModifyNetworkInterfaceAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyNetworkInterfaceAttribute", params, optFns, c.addOperationModifyNetworkInterfaceAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyNetworkInterfaceAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for ModifyNetworkInterfaceAttribute. -type ModifyNetworkInterfaceAttributeInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // Information about the interface attachment. If modifying the delete on - // termination attribute, you must specify the ID of the interface attachment. - Attachment *types.NetworkInterfaceAttachmentChanges - - // A connection tracking specification. - ConnectionTrackingSpecification *types.ConnectionTrackingSpecificationRequest - - // A description for the network interface. - Description *types.AttributeValue - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Updates the ENA Express configuration for the network interface that’s attached - // to the instance. - EnaSrdSpecification *types.EnaSrdSpecification - - // If you’re modifying a network interface in a dual-stack or IPv6-only subnet, - // you have the option to assign a primary IPv6 IP address. A primary IPv6 address - // is an IPv6 GUA address associated with an ENI that you have enabled to use a - // primary IPv6 address. Use this option if the instance that this ENI will be - // attached to relies on its IPv6 address not changing. Amazon Web Services will - // automatically assign an IPv6 address associated with the ENI attached to your - // instance to be the primary IPv6 address. Once you enable an IPv6 GUA address to - // be a primary IPv6, you cannot disable it. When you enable an IPv6 GUA address to - // be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 address - // until the instance is terminated or the network interface is detached. If you - // have multiple IPv6 addresses associated with an ENI attached to your instance - // and you enable a primary IPv6 address, the first IPv6 GUA address associated - // with the ENI becomes the primary IPv6 address. - EnablePrimaryIpv6 *bool - - // Changes the security groups for the network interface. The new set of groups - // you specify replaces the current set. You must specify at least one group, even - // if it's just the default security group in the VPC. You must specify the ID of - // the security group, not the name. - Groups []string - - // Enable or disable source/destination checks, which ensure that the instance is - // either the source or the destination of any traffic that it receives. If the - // value is true , source/destination checks are enabled; otherwise, they are - // disabled. The default value is true . You must disable source/destination checks - // if the instance runs services such as network address translation, routing, or - // firewalls. - SourceDestCheck *types.AttributeBooleanValue - - noSmithyDocumentSerde -} - -type ModifyNetworkInterfaceAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyNetworkInterfaceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyNetworkInterfaceAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyNetworkInterfaceAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyNetworkInterfaceAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyNetworkInterfaceAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyNetworkInterfaceAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyNetworkInterfaceAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyNetworkInterfaceAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyPrivateDnsNameOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyPrivateDnsNameOptions.go deleted file mode 100644 index 0fc7fd67d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyPrivateDnsNameOptions.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the options for instance hostnames for the specified instance. -func (c *Client) ModifyPrivateDnsNameOptions(ctx context.Context, params *ModifyPrivateDnsNameOptionsInput, optFns ...func(*Options)) (*ModifyPrivateDnsNameOptionsOutput, error) { - if params == nil { - params = &ModifyPrivateDnsNameOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyPrivateDnsNameOptions", params, optFns, c.addOperationModifyPrivateDnsNameOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyPrivateDnsNameOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyPrivateDnsNameOptionsInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - EnableResourceNameDnsAAAARecord *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecord *bool - - // The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS - // name must be based on the instance IPv4 address. For IPv6 only subnets, an - // instance DNS name must be based on the instance ID. For dual-stack subnets, you - // can specify whether DNS names use the instance IPv4 address or the instance ID. - PrivateDnsHostnameType types.HostnameType - - noSmithyDocumentSerde -} - -type ModifyPrivateDnsNameOptionsOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyPrivateDnsNameOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyPrivateDnsNameOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyPrivateDnsNameOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyPrivateDnsNameOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyPrivateDnsNameOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyPrivateDnsNameOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyPrivateDnsNameOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyPrivateDnsNameOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyReservedInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyReservedInstances.go deleted file mode 100644 index 807e16212..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyReservedInstances.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the configuration of your Reserved Instances, such as the Availability -// Zone, instance count, or instance type. The Reserved Instances to be modified -// must be identical, except for Availability Zone, network platform, and instance -// type. For more information, see Modifying Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyReservedInstances(ctx context.Context, params *ModifyReservedInstancesInput, optFns ...func(*Options)) (*ModifyReservedInstancesOutput, error) { - if params == nil { - params = &ModifyReservedInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyReservedInstances", params, optFns, c.addOperationModifyReservedInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyReservedInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for ModifyReservedInstances. -type ModifyReservedInstancesInput struct { - - // The IDs of the Reserved Instances to modify. - // - // This member is required. - ReservedInstancesIds []string - - // The configuration settings for the Reserved Instances to modify. - // - // This member is required. - TargetConfigurations []types.ReservedInstancesConfiguration - - // A unique, case-sensitive token you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - noSmithyDocumentSerde -} - -// Contains the output of ModifyReservedInstances. -type ModifyReservedInstancesOutput struct { - - // The ID for the modification. - ReservedInstancesModificationId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyReservedInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyReservedInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyReservedInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyReservedInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyReservedInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyReservedInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyReservedInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyReservedInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySecurityGroupRules.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySecurityGroupRules.go deleted file mode 100644 index cbc1011a5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySecurityGroupRules.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the rules of a security group. -func (c *Client) ModifySecurityGroupRules(ctx context.Context, params *ModifySecurityGroupRulesInput, optFns ...func(*Options)) (*ModifySecurityGroupRulesOutput, error) { - if params == nil { - params = &ModifySecurityGroupRulesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifySecurityGroupRules", params, optFns, c.addOperationModifySecurityGroupRulesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifySecurityGroupRulesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifySecurityGroupRulesInput struct { - - // The ID of the security group. - // - // This member is required. - GroupId *string - - // Information about the security group properties to update. - // - // This member is required. - SecurityGroupRules []types.SecurityGroupRuleUpdate - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifySecurityGroupRulesOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifySecurityGroupRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifySecurityGroupRules{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySecurityGroupRules{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifySecurityGroupRules"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifySecurityGroupRulesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySecurityGroupRules(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifySecurityGroupRules(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifySecurityGroupRules", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotAttribute.go deleted file mode 100644 index 6a3749323..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotAttribute.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds or removes permission settings for the specified snapshot. You may add or -// remove specified Amazon Web Services account IDs from a snapshot's list of -// create volume permissions, but you cannot do both in a single operation. If you -// need to both add and remove account IDs for a snapshot, you must use multiple -// operations. You can make up to 500 modifications to a snapshot in a single -// operation. Encrypted snapshots and snapshots with Amazon Web Services -// Marketplace product codes cannot be made public. Snapshots encrypted with your -// default KMS key cannot be shared with other accounts. For more information about -// modifying snapshot permissions, see Share a snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) ModifySnapshotAttribute(ctx context.Context, params *ModifySnapshotAttributeInput, optFns ...func(*Options)) (*ModifySnapshotAttributeOutput, error) { - if params == nil { - params = &ModifySnapshotAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifySnapshotAttribute", params, optFns, c.addOperationModifySnapshotAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifySnapshotAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifySnapshotAttributeInput struct { - - // The ID of the snapshot. - // - // This member is required. - SnapshotId *string - - // The snapshot attribute to modify. Only volume creation permissions can be - // modified. - Attribute types.SnapshotAttributeName - - // A JSON representation of the snapshot attribute modification. - CreateVolumePermission *types.CreateVolumePermissionModifications - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The group to modify for the snapshot. - GroupNames []string - - // The type of operation to perform to the attribute. - OperationType types.OperationType - - // The account ID to modify for the snapshot. - UserIds []string - - noSmithyDocumentSerde -} - -type ModifySnapshotAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifySnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifySnapshotAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySnapshotAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifySnapshotAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifySnapshotAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySnapshotAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifySnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifySnapshotAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotTier.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotTier.go deleted file mode 100644 index bae5f6e73..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySnapshotTier.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Archives an Amazon EBS snapshot. When you archive a snapshot, it is converted -// to a full snapshot that includes all of the blocks of data that were written to -// the volume at the time the snapshot was created, and moved from the standard -// tier to the archive tier. For more information, see Archive Amazon EBS snapshots (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-archive.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) ModifySnapshotTier(ctx context.Context, params *ModifySnapshotTierInput, optFns ...func(*Options)) (*ModifySnapshotTierOutput, error) { - if params == nil { - params = &ModifySnapshotTierInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifySnapshotTier", params, optFns, c.addOperationModifySnapshotTierMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifySnapshotTierOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifySnapshotTierInput struct { - - // The ID of the snapshot. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name of the storage tier. You must specify archive . - StorageTier types.TargetStorageTier - - noSmithyDocumentSerde -} - -type ModifySnapshotTierOutput struct { - - // The ID of the snapshot. - SnapshotId *string - - // The date and time when the archive process was started. - TieringStartTime *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifySnapshotTierMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifySnapshotTier{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySnapshotTier{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifySnapshotTier"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifySnapshotTierValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySnapshotTier(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifySnapshotTier(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifySnapshotTier", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySpotFleetRequest.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySpotFleetRequest.go deleted file mode 100644 index c9a12e27c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySpotFleetRequest.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified Spot Fleet request. You can only modify a Spot Fleet -// request of type maintain . While the Spot Fleet request is being modified, it is -// in the modifying state. To scale up your Spot Fleet, increase its target -// capacity. The Spot Fleet launches the additional Spot Instances according to the -// allocation strategy for the Spot Fleet request. If the allocation strategy is -// lowestPrice , the Spot Fleet launches instances using the Spot Instance pool -// with the lowest price. If the allocation strategy is diversified , the Spot -// Fleet distributes the instances across the Spot Instance pools. If the -// allocation strategy is capacityOptimized , Spot Fleet launches instances from -// Spot Instance pools with optimal capacity for the number of instances that are -// launching. To scale down your Spot Fleet, decrease its target capacity. First, -// the Spot Fleet cancels any open requests that exceed the new target capacity. -// You can request that the Spot Fleet terminate Spot Instances until the size of -// the fleet no longer exceeds the new target capacity. If the allocation strategy -// is lowestPrice , the Spot Fleet terminates the instances with the highest price -// per unit. If the allocation strategy is capacityOptimized , the Spot Fleet -// terminates the instances in the Spot Instance pools that have the least -// available Spot Instance capacity. If the allocation strategy is diversified , -// the Spot Fleet terminates instances across the Spot Instance pools. -// Alternatively, you can request that the Spot Fleet keep the fleet at its current -// size, but not replace any Spot Instances that are interrupted or that you -// terminate manually. If you are finished with your Spot Fleet for now, but will -// use it again later, you can set the target capacity to 0. -func (c *Client) ModifySpotFleetRequest(ctx context.Context, params *ModifySpotFleetRequestInput, optFns ...func(*Options)) (*ModifySpotFleetRequestOutput, error) { - if params == nil { - params = &ModifySpotFleetRequestInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifySpotFleetRequest", params, optFns, c.addOperationModifySpotFleetRequestMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifySpotFleetRequestOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for ModifySpotFleetRequest. -type ModifySpotFleetRequestInput struct { - - // The ID of the Spot Fleet request. - // - // This member is required. - SpotFleetRequestId *string - - // Reserved. - Context *string - - // Indicates whether running instances should be terminated if the target capacity - // of the Spot Fleet request is decreased below the current size of the Spot Fleet. - // Supported only for fleets of type maintain . - ExcessCapacityTerminationPolicy types.ExcessCapacityTerminationPolicy - - // The launch template and overrides. You can only use this parameter if you - // specified a launch template ( LaunchTemplateConfigs ) in your Spot Fleet - // request. If you specified LaunchSpecifications in your Spot Fleet request, then - // omit this parameter. - LaunchTemplateConfigs []types.LaunchTemplateConfig - - // The number of On-Demand Instances in the fleet. - OnDemandTargetCapacity *int32 - - // The size of the fleet. - TargetCapacity *int32 - - noSmithyDocumentSerde -} - -// Contains the output of ModifySpotFleetRequest. -type ModifySpotFleetRequestOutput struct { - - // If the request succeeds, the response returns true . If the request fails, no - // response is returned, and instead an error message is returned. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifySpotFleetRequestMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifySpotFleetRequest{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySpotFleetRequest{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifySpotFleetRequest"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifySpotFleetRequestValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySpotFleetRequest(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifySpotFleetRequest(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifySpotFleetRequest", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySubnetAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySubnetAttribute.go deleted file mode 100644 index 08894af0f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifySubnetAttribute.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a subnet attribute. You can only modify one attribute at a time. Use -// this action to modify subnets on Amazon Web Services Outposts. -// - To modify a subnet on an Outpost rack, set both MapCustomerOwnedIpOnLaunch -// and CustomerOwnedIpv4Pool . These two parameters act as a single attribute. -// - To modify a subnet on an Outpost server, set either EnableLniAtDeviceIndex -// or DisableLniAtDeviceIndex . -// -// For more information about Amazon Web Services Outposts, see the following: -// - Outpost servers (https://docs.aws.amazon.com/outposts/latest/userguide/how-servers-work.html) -// - Outpost racks (https://docs.aws.amazon.com/outposts/latest/userguide/how-racks-work.html) -func (c *Client) ModifySubnetAttribute(ctx context.Context, params *ModifySubnetAttributeInput, optFns ...func(*Options)) (*ModifySubnetAttributeOutput, error) { - if params == nil { - params = &ModifySubnetAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifySubnetAttribute", params, optFns, c.addOperationModifySubnetAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifySubnetAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifySubnetAttributeInput struct { - - // The ID of the subnet. - // - // This member is required. - SubnetId *string - - // Specify true to indicate that network interfaces created in the specified - // subnet should be assigned an IPv6 address. This includes a network interface - // that's created when launching an instance into the subnet (the instance - // therefore receives an IPv6 address). If you enable the IPv6 addressing feature - // for your subnet, your network interface or instance only receives an IPv6 - // address if it's created using version 2016-11-15 or later of the Amazon EC2 API. - AssignIpv6AddressOnCreation *types.AttributeBooleanValue - - // The customer-owned IPv4 address pool associated with the subnet. You must set - // this value when you specify true for MapCustomerOwnedIpOnLaunch . - CustomerOwnedIpv4Pool *string - - // Specify true to indicate that local network interfaces at the current position - // should be disabled. - DisableLniAtDeviceIndex *types.AttributeBooleanValue - - // Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this - // subnet should return synthetic IPv6 addresses for IPv4-only destinations. - EnableDns64 *types.AttributeBooleanValue - - // Indicates the device position for local network interfaces in this subnet. For - // example, 1 indicates local network interfaces in this subnet are the secondary - // network interface (eth1). A local network interface cannot be the primary - // network interface (eth0). - EnableLniAtDeviceIndex *int32 - - // Indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - EnableResourceNameDnsAAAARecordOnLaunch *types.AttributeBooleanValue - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecordOnLaunch *types.AttributeBooleanValue - - // Specify true to indicate that network interfaces attached to instances created - // in the specified subnet should be assigned a customer-owned IPv4 address. When - // this value is true , you must specify the customer-owned IP pool using - // CustomerOwnedIpv4Pool . - MapCustomerOwnedIpOnLaunch *types.AttributeBooleanValue - - // Specify true to indicate that network interfaces attached to instances created - // in the specified subnet should be assigned a public IPv4 address. Starting on - // February 1, 2024, Amazon Web Services will charge for all public IPv4 addresses, - // including public IPv4 addresses associated with running instances and Elastic IP - // addresses. For more information, see the Public IPv4 Address tab on the Amazon - // VPC pricing page (http://aws.amazon.com/vpc/pricing/) . - MapPublicIpOnLaunch *types.AttributeBooleanValue - - // The type of hostname to assign to instances in the subnet at launch. For - // IPv4-only and dual-stack (IPv4 and IPv6) subnets, an instance DNS name can be - // based on the instance IPv4 address (ip-name) or the instance ID (resource-name). - // For IPv6 only subnets, an instance DNS name must be based on the instance ID - // (resource-name). - PrivateDnsHostnameTypeOnLaunch types.HostnameType - - noSmithyDocumentSerde -} - -type ModifySubnetAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifySubnetAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifySubnetAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifySubnetAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifySubnetAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifySubnetAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifySubnetAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifySubnetAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifySubnetAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go deleted file mode 100644 index bac869743..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterNetworkServices.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Allows or restricts mirroring network services. By default, Amazon DNS network -// services are not eligible for Traffic Mirror. Use AddNetworkServices to add -// network services to a Traffic Mirror filter. When a network service is added to -// the Traffic Mirror filter, all traffic related to that network service will be -// mirrored. When you no longer want to mirror network services, use -// RemoveNetworkServices to remove the network services from the Traffic Mirror -// filter. -func (c *Client) ModifyTrafficMirrorFilterNetworkServices(ctx context.Context, params *ModifyTrafficMirrorFilterNetworkServicesInput, optFns ...func(*Options)) (*ModifyTrafficMirrorFilterNetworkServicesOutput, error) { - if params == nil { - params = &ModifyTrafficMirrorFilterNetworkServicesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyTrafficMirrorFilterNetworkServices", params, optFns, c.addOperationModifyTrafficMirrorFilterNetworkServicesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyTrafficMirrorFilterNetworkServicesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyTrafficMirrorFilterNetworkServicesInput struct { - - // The ID of the Traffic Mirror filter. - // - // This member is required. - TrafficMirrorFilterId *string - - // The network service, for example Amazon DNS, that you want to mirror. - AddNetworkServices []types.TrafficMirrorNetworkService - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The network service, for example Amazon DNS, that you no longer want to mirror. - RemoveNetworkServices []types.TrafficMirrorNetworkService - - noSmithyDocumentSerde -} - -type ModifyTrafficMirrorFilterNetworkServicesOutput struct { - - // The Traffic Mirror filter that the network service is associated with. - TrafficMirrorFilter *types.TrafficMirrorFilter - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyTrafficMirrorFilterNetworkServicesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyTrafficMirrorFilterNetworkServices"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyTrafficMirrorFilterNetworkServicesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTrafficMirrorFilterNetworkServices(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyTrafficMirrorFilterNetworkServices(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyTrafficMirrorFilterNetworkServices", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go deleted file mode 100644 index 729dcd52e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorFilterRule.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified Traffic Mirror rule. DestinationCidrBlock and -// SourceCidrBlock must both be an IPv4 range or an IPv6 range. -func (c *Client) ModifyTrafficMirrorFilterRule(ctx context.Context, params *ModifyTrafficMirrorFilterRuleInput, optFns ...func(*Options)) (*ModifyTrafficMirrorFilterRuleOutput, error) { - if params == nil { - params = &ModifyTrafficMirrorFilterRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyTrafficMirrorFilterRule", params, optFns, c.addOperationModifyTrafficMirrorFilterRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyTrafficMirrorFilterRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyTrafficMirrorFilterRuleInput struct { - - // The ID of the Traffic Mirror rule. - // - // This member is required. - TrafficMirrorFilterRuleId *string - - // The description to assign to the Traffic Mirror rule. - Description *string - - // The destination CIDR block to assign to the Traffic Mirror rule. - DestinationCidrBlock *string - - // The destination ports that are associated with the Traffic Mirror rule. - DestinationPortRange *types.TrafficMirrorPortRangeRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The protocol, for example TCP, to assign to the Traffic Mirror rule. - Protocol *int32 - - // The properties that you want to remove from the Traffic Mirror filter rule. - // When you remove a property from a Traffic Mirror filter rule, the property is - // set to the default. - RemoveFields []types.TrafficMirrorFilterRuleField - - // The action to assign to the rule. - RuleAction types.TrafficMirrorRuleAction - - // The number of the Traffic Mirror rule. This number must be unique for each - // Traffic Mirror rule in a given direction. The rules are processed in ascending - // order by rule number. - RuleNumber *int32 - - // The source CIDR block to assign to the Traffic Mirror rule. - SourceCidrBlock *string - - // The port range to assign to the Traffic Mirror rule. - SourcePortRange *types.TrafficMirrorPortRangeRequest - - // The type of traffic to assign to the rule. - TrafficDirection types.TrafficDirection - - noSmithyDocumentSerde -} - -type ModifyTrafficMirrorFilterRuleOutput struct { - - // Modifies a Traffic Mirror rule. - TrafficMirrorFilterRule *types.TrafficMirrorFilterRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyTrafficMirrorFilterRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTrafficMirrorFilterRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTrafficMirrorFilterRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyTrafficMirrorFilterRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyTrafficMirrorFilterRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTrafficMirrorFilterRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyTrafficMirrorFilterRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyTrafficMirrorFilterRule", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorSession.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorSession.go deleted file mode 100644 index 83d76b165..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTrafficMirrorSession.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a Traffic Mirror session. -func (c *Client) ModifyTrafficMirrorSession(ctx context.Context, params *ModifyTrafficMirrorSessionInput, optFns ...func(*Options)) (*ModifyTrafficMirrorSessionOutput, error) { - if params == nil { - params = &ModifyTrafficMirrorSessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyTrafficMirrorSession", params, optFns, c.addOperationModifyTrafficMirrorSessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyTrafficMirrorSessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyTrafficMirrorSessionInput struct { - - // The ID of the Traffic Mirror session. - // - // This member is required. - TrafficMirrorSessionId *string - - // The description to assign to the Traffic Mirror session. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The number of bytes in each packet to mirror. These are bytes after the VXLAN - // header. To mirror a subset, set this to the length (in bytes) to mirror. For - // example, if you set this value to 100, then the first 100 bytes that meet the - // filter criteria are copied to the target. Do not specify this parameter when you - // want to mirror the entire packet. For sessions with Network Load Balancer (NLB) - // traffic mirror targets, the default PacketLength will be set to 8500. Valid - // values are 1-8500. Setting a PacketLength greater than 8500 will result in an - // error response. - PacketLength *int32 - - // The properties that you want to remove from the Traffic Mirror session. When - // you remove a property from a Traffic Mirror session, the property is set to the - // default. - RemoveFields []types.TrafficMirrorSessionField - - // The session number determines the order in which sessions are evaluated when an - // interface is used by multiple sessions. The first session with a matching filter - // is the one that mirrors the packets. Valid values are 1-32766. - SessionNumber *int32 - - // The ID of the Traffic Mirror filter. - TrafficMirrorFilterId *string - - // The Traffic Mirror target. The target must be in the same VPC as the source, or - // have a VPC peering connection with the source. - TrafficMirrorTargetId *string - - // The virtual network ID of the Traffic Mirror session. - VirtualNetworkId *int32 - - noSmithyDocumentSerde -} - -type ModifyTrafficMirrorSessionOutput struct { - - // Information about the Traffic Mirror session. - TrafficMirrorSession *types.TrafficMirrorSession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyTrafficMirrorSessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTrafficMirrorSession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTrafficMirrorSession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyTrafficMirrorSession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyTrafficMirrorSessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTrafficMirrorSession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyTrafficMirrorSession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyTrafficMirrorSession", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGateway.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGateway.go deleted file mode 100644 index d94c463f9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGateway.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified transit gateway. When you modify a transit gateway, the -// modified options are applied to new transit gateway attachments only. Your -// existing transit gateway attachments are not modified. -func (c *Client) ModifyTransitGateway(ctx context.Context, params *ModifyTransitGatewayInput, optFns ...func(*Options)) (*ModifyTransitGatewayOutput, error) { - if params == nil { - params = &ModifyTransitGatewayInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyTransitGateway", params, optFns, c.addOperationModifyTransitGatewayMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyTransitGatewayOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyTransitGatewayInput struct { - - // The ID of the transit gateway. - // - // This member is required. - TransitGatewayId *string - - // The description for the transit gateway. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The options to modify. - Options *types.ModifyTransitGatewayOptions - - noSmithyDocumentSerde -} - -type ModifyTransitGatewayOutput struct { - - // Information about the transit gateway. - TransitGateway *types.TransitGateway - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyTransitGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTransitGateway{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTransitGateway{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyTransitGateway"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyTransitGatewayValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTransitGateway(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyTransitGateway(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyTransitGateway", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go deleted file mode 100644 index df9dd42dd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayPrefixListReference.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a reference (route) to a prefix list in a specified transit gateway -// route table. -func (c *Client) ModifyTransitGatewayPrefixListReference(ctx context.Context, params *ModifyTransitGatewayPrefixListReferenceInput, optFns ...func(*Options)) (*ModifyTransitGatewayPrefixListReferenceOutput, error) { - if params == nil { - params = &ModifyTransitGatewayPrefixListReferenceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyTransitGatewayPrefixListReference", params, optFns, c.addOperationModifyTransitGatewayPrefixListReferenceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyTransitGatewayPrefixListReferenceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyTransitGatewayPrefixListReferenceInput struct { - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Indicates whether to drop traffic that matches this route. - Blackhole *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the attachment to which traffic is routed. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -type ModifyTransitGatewayPrefixListReferenceOutput struct { - - // Information about the prefix list reference. - TransitGatewayPrefixListReference *types.TransitGatewayPrefixListReference - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyTransitGatewayPrefixListReferenceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTransitGatewayPrefixListReference{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyTransitGatewayPrefixListReference"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyTransitGatewayPrefixListReferenceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTransitGatewayPrefixListReference(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyTransitGatewayPrefixListReference(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyTransitGatewayPrefixListReference", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go deleted file mode 100644 index 849e4faed..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyTransitGatewayVpcAttachment.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified VPC attachment. -func (c *Client) ModifyTransitGatewayVpcAttachment(ctx context.Context, params *ModifyTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*ModifyTransitGatewayVpcAttachmentOutput, error) { - if params == nil { - params = &ModifyTransitGatewayVpcAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyTransitGatewayVpcAttachment", params, optFns, c.addOperationModifyTransitGatewayVpcAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyTransitGatewayVpcAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyTransitGatewayVpcAttachmentInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // The IDs of one or more subnets to add. You can specify at most one subnet per - // Availability Zone. - AddSubnetIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The new VPC attachment options. - Options *types.ModifyTransitGatewayVpcAttachmentRequestOptions - - // The IDs of one or more subnets to remove. - RemoveSubnetIds []string - - noSmithyDocumentSerde -} - -type ModifyTransitGatewayVpcAttachmentOutput struct { - - // Information about the modified attachment. - TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyTransitGatewayVpcAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyTransitGatewayVpcAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyTransitGatewayVpcAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go deleted file mode 100644 index 61d9c145f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessEndpoint.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the configuration of the specified Amazon Web Services Verified Access -// endpoint. -func (c *Client) ModifyVerifiedAccessEndpoint(ctx context.Context, params *ModifyVerifiedAccessEndpointInput, optFns ...func(*Options)) (*ModifyVerifiedAccessEndpointOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessEndpoint", params, optFns, c.addOperationModifyVerifiedAccessEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessEndpointInput struct { - - // The ID of the Verified Access endpoint. - // - // This member is required. - VerifiedAccessEndpointId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access endpoint. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The load balancer details if creating the Verified Access endpoint as - // load-balancer type. - LoadBalancerOptions *types.ModifyVerifiedAccessEndpointLoadBalancerOptions - - // The network interface options. - NetworkInterfaceOptions *types.ModifyVerifiedAccessEndpointEniOptions - - // The ID of the Verified Access group. - VerifiedAccessGroupId *string - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessEndpointOutput struct { - - // Details about the Verified Access endpoint. - VerifiedAccessEndpoint *types.VerifiedAccessEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessEndpoint struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessEndpoint) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessEndpointInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessEndpointMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessEndpoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go deleted file mode 100644 index 6b19f15e1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessEndpointPolicy.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified Amazon Web Services Verified Access endpoint policy. -func (c *Client) ModifyVerifiedAccessEndpointPolicy(ctx context.Context, params *ModifyVerifiedAccessEndpointPolicyInput, optFns ...func(*Options)) (*ModifyVerifiedAccessEndpointPolicyOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessEndpointPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessEndpointPolicy", params, optFns, c.addOperationModifyVerifiedAccessEndpointPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessEndpointPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessEndpointPolicyInput struct { - - // The ID of the Verified Access endpoint. - // - // This member is required. - VerifiedAccessEndpointId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Verified Access policy document. - PolicyDocument *string - - // The status of the Verified Access policy. - PolicyEnabled *bool - - // The options for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationRequest - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessEndpointPolicyOutput struct { - - // The Verified Access policy document. - PolicyDocument *string - - // The status of the Verified Access policy. - PolicyEnabled *bool - - // The options in use for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationResponse - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessEndpointPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessEndpointPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessEndpointPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessEndpointPolicyMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessEndpointPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessEndpointPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessEndpointPolicy struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessEndpointPolicy) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessEndpointPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessEndpointPolicyInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessEndpointPolicyMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessEndpointPolicy{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessEndpointPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessEndpointPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessGroup.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessGroup.go deleted file mode 100644 index 082ca25e9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessGroup.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified Amazon Web Services Verified Access group configuration. -func (c *Client) ModifyVerifiedAccessGroup(ctx context.Context, params *ModifyVerifiedAccessGroupInput, optFns ...func(*Options)) (*ModifyVerifiedAccessGroupOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessGroup", params, optFns, c.addOperationModifyVerifiedAccessGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessGroupInput struct { - - // The ID of the Verified Access group. - // - // This member is required. - VerifiedAccessGroupId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access group. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the Verified Access instance. - VerifiedAccessInstanceId *string - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessGroupOutput struct { - - // Details about the Verified Access group. - VerifiedAccessGroup *types.VerifiedAccessGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessGroupMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessGroup struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessGroup) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessGroupInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessGroupInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessGroupMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessGroup{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessGroup", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go deleted file mode 100644 index 967e70ed4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessGroupPolicy.go +++ /dev/null @@ -1,198 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified Amazon Web Services Verified Access group policy. -func (c *Client) ModifyVerifiedAccessGroupPolicy(ctx context.Context, params *ModifyVerifiedAccessGroupPolicyInput, optFns ...func(*Options)) (*ModifyVerifiedAccessGroupPolicyOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessGroupPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessGroupPolicy", params, optFns, c.addOperationModifyVerifiedAccessGroupPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessGroupPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessGroupPolicyInput struct { - - // The ID of the Verified Access group. - // - // This member is required. - VerifiedAccessGroupId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Verified Access policy document. - PolicyDocument *string - - // The status of the Verified Access policy. - PolicyEnabled *bool - - // The options for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationRequest - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessGroupPolicyOutput struct { - - // The Verified Access policy document. - PolicyDocument *string - - // The status of the Verified Access policy. - PolicyEnabled *bool - - // The options in use for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationResponse - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessGroupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessGroupPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessGroupPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessGroupPolicyMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessGroupPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessGroupPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessGroupPolicy struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessGroupPolicy) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessGroupPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessGroupPolicyInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessGroupPolicyMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessGroupPolicy{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessGroupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessGroupPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessInstance.go deleted file mode 100644 index 887ab4c35..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessInstance.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the configuration of the specified Amazon Web Services Verified Access -// instance. -func (c *Client) ModifyVerifiedAccessInstance(ctx context.Context, params *ModifyVerifiedAccessInstanceInput, optFns ...func(*Options)) (*ModifyVerifiedAccessInstanceOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessInstance", params, optFns, c.addOperationModifyVerifiedAccessInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessInstanceInput struct { - - // The ID of the Verified Access instance. - // - // This member is required. - VerifiedAccessInstanceId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access instance. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessInstanceOutput struct { - - // Details about the Verified Access instance. - VerifiedAccessInstance *types.VerifiedAccessInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessInstanceMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessInstance struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessInstance) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessInstanceInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessInstanceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessInstance{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go deleted file mode 100644 index 19cfb750f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the logging configuration for the specified Amazon Web Services -// Verified Access instance. -func (c *Client) ModifyVerifiedAccessInstanceLoggingConfiguration(ctx context.Context, params *ModifyVerifiedAccessInstanceLoggingConfigurationInput, optFns ...func(*Options)) (*ModifyVerifiedAccessInstanceLoggingConfigurationOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessInstanceLoggingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessInstanceLoggingConfiguration", params, optFns, c.addOperationModifyVerifiedAccessInstanceLoggingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessInstanceLoggingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessInstanceLoggingConfigurationInput struct { - - // The configuration options for Verified Access instances. - // - // This member is required. - AccessLogs *types.VerifiedAccessLogOptions - - // The ID of the Verified Access instance. - // - // This member is required. - VerifiedAccessInstanceId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessInstanceLoggingConfigurationOutput struct { - - // The logging configuration for the Verified Access instance. - LoggingConfiguration *types.VerifiedAccessInstanceLoggingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessInstanceLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessInstanceLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessInstanceLoggingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessInstanceLoggingConfigurationMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessInstanceLoggingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessInstanceLoggingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessInstanceLoggingConfiguration struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessInstanceLoggingConfiguration) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessInstanceLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceLoggingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessInstanceLoggingConfigurationInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessInstanceLoggingConfigurationMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessInstanceLoggingConfiguration{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessInstanceLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessInstanceLoggingConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go deleted file mode 100644 index 1a219de89..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVerifiedAccessTrustProvider.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the configuration of the specified Amazon Web Services Verified Access -// trust provider. -func (c *Client) ModifyVerifiedAccessTrustProvider(ctx context.Context, params *ModifyVerifiedAccessTrustProviderInput, optFns ...func(*Options)) (*ModifyVerifiedAccessTrustProviderOutput, error) { - if params == nil { - params = &ModifyVerifiedAccessTrustProviderInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVerifiedAccessTrustProvider", params, optFns, c.addOperationModifyVerifiedAccessTrustProviderMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVerifiedAccessTrustProviderOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVerifiedAccessTrustProviderInput struct { - - // The ID of the Verified Access trust provider. - // - // This member is required. - VerifiedAccessTrustProviderId *string - - // A unique, case-sensitive token that you provide to ensure idempotency of your - // modification request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A description for the Verified Access trust provider. - Description *string - - // The options for a device-based trust provider. This parameter is required when - // the provider type is device . - DeviceOptions *types.ModifyVerifiedAccessTrustProviderDeviceOptions - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The options for an OpenID Connect-compatible user-identity trust provider. - OidcOptions *types.ModifyVerifiedAccessTrustProviderOidcOptions - - // The options for server side encryption. - SseSpecification *types.VerifiedAccessSseSpecificationRequest - - noSmithyDocumentSerde -} - -type ModifyVerifiedAccessTrustProviderOutput struct { - - // Details about the Verified Access trust provider. - VerifiedAccessTrustProvider *types.VerifiedAccessTrustProvider - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVerifiedAccessTrustProviderMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVerifiedAccessTrustProvider"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opModifyVerifiedAccessTrustProviderMiddleware(stack, options); err != nil { - return err - } - if err = addOpModifyVerifiedAccessTrustProviderValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVerifiedAccessTrustProvider(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpModifyVerifiedAccessTrustProvider struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpModifyVerifiedAccessTrustProvider) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpModifyVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ModifyVerifiedAccessTrustProviderInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opModifyVerifiedAccessTrustProviderMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpModifyVerifiedAccessTrustProvider{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opModifyVerifiedAccessTrustProvider(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVerifiedAccessTrustProvider", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolume.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolume.go deleted file mode 100644 index fba74a341..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolume.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// You can modify several parameters of an existing EBS volume, including volume -// size, volume type, and IOPS capacity. If your EBS volume is attached to a -// current-generation EC2 instance type, you might be able to apply these changes -// without stopping the instance or detaching the volume from it. For more -// information about modifying EBS volumes, see Amazon EBS Elastic Volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html) -// (Linux instances) or Amazon EBS Elastic Volumes (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-modify-volume.html) -// (Windows instances). When you complete a resize operation on your volume, you -// need to extend the volume's file-system size to take advantage of the new -// storage capacity. For more information, see Extend a Linux file system (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux) -// or Extend a Windows file system (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows) -// . You can use CloudWatch Events to check the status of a modification to an EBS -// volume. For information about CloudWatch Events, see the Amazon CloudWatch -// Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/) -// . You can also track the status of a modification using -// DescribeVolumesModifications . For information about tracking status changes -// using either method, see Monitor the progress of volume modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html) -// . With previous-generation instance types, resizing an EBS volume might require -// detaching and reattaching the volume or stopping and restarting the instance. -// After modifying a volume, you must wait at least six hours and ensure that the -// volume is in the in-use or available state before you can modify the same -// volume. This is sometimes referred to as a cooldown period. -func (c *Client) ModifyVolume(ctx context.Context, params *ModifyVolumeInput, optFns ...func(*Options)) (*ModifyVolumeOutput, error) { - if params == nil { - params = &ModifyVolumeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVolume", params, optFns, c.addOperationModifyVolumeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVolumeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVolumeInput struct { - - // The ID of the volume. - // - // This member is required. - VolumeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The target IOPS rate of the volume. This parameter is valid only for gp3 , io1 , - // and io2 volumes. The following are the supported values for each volume type: - // - gp3 : 3,000 - 16,000 IOPS - // - io1 : 100 - 64,000 IOPS - // - io2 : 100 - 256,000 IOPS - // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the - // Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // . On other instances, you can achieve performance up to 32,000 IOPS. Default: - // The existing value is retained if you keep the same volume type. If you change - // the volume type to io1 , io2 , or gp3 , the default is 3,000. - Iops *int32 - - // Specifies whether to enable Amazon EBS Multi-Attach. If you enable - // Multi-Attach, you can attach the volume to up to 16 Nitro-based instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // in the same Availability Zone. This parameter is supported with io1 and io2 - // volumes only. For more information, see Amazon EBS Multi-Attach (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) - // in the Amazon Elastic Compute Cloud User Guide. - MultiAttachEnabled *bool - - // The target size of the volume, in GiB. The target volume size must be greater - // than or equal to the existing size of the volume. The following are the - // supported volumes sizes for each volume type: - // - gp2 and gp3 : 1 - 16,384 GiB - // - io1 : 4 - 16,384 GiB - // - io2 : 4 - 65,536 GiB - // - st1 and sc1 : 125 - 16,384 GiB - // - standard : 1 - 1024 GiB - // Default: The existing size is retained. - Size *int32 - - // The target throughput of the volume, in MiB/s. This parameter is valid only for - // gp3 volumes. The maximum value is 1,000. Default: The existing value is retained - // if the source and target volume type is gp3 . Otherwise, the default value is - // 125. Valid Range: Minimum value of 125. Maximum value of 1000. - Throughput *int32 - - // The target EBS volume type of the volume. For more information, see Amazon EBS - // volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. Default: The existing type is - // retained. - VolumeType types.VolumeType - - noSmithyDocumentSerde -} - -type ModifyVolumeOutput struct { - - // Information about the volume modification. - VolumeModification *types.VolumeModification - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVolumeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVolume{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVolume{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVolume"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVolumeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVolume(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVolume(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVolume", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolumeAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolumeAttribute.go deleted file mode 100644 index a9a398c1c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVolumeAttribute.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a volume attribute. By default, all I/O operations for the volume are -// suspended when the data on the volume is determined to be potentially -// inconsistent, to prevent undetectable, latent data corruption. The I/O access to -// the volume can be resumed by first enabling I/O access and then checking the -// data consistency on your volume. You can change the default behavior to resume -// I/O operations. We recommend that you change this only for boot volumes or for -// volumes that are stateless or disposable. -func (c *Client) ModifyVolumeAttribute(ctx context.Context, params *ModifyVolumeAttributeInput, optFns ...func(*Options)) (*ModifyVolumeAttributeOutput, error) { - if params == nil { - params = &ModifyVolumeAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVolumeAttribute", params, optFns, c.addOperationModifyVolumeAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVolumeAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVolumeAttributeInput struct { - - // The ID of the volume. - // - // This member is required. - VolumeId *string - - // Indicates whether the volume should be auto-enabled for I/O operations. - AutoEnableIO *types.AttributeBooleanValue - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVolumeAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVolumeAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVolumeAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVolumeAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVolumeAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVolumeAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVolumeAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVolumeAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVolumeAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcAttribute.go deleted file mode 100644 index 37d2fb30d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcAttribute.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the specified attribute of the specified VPC. -func (c *Client) ModifyVpcAttribute(ctx context.Context, params *ModifyVpcAttributeInput, optFns ...func(*Options)) (*ModifyVpcAttributeOutput, error) { - if params == nil { - params = &ModifyVpcAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcAttribute", params, optFns, c.addOperationModifyVpcAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcAttributeInput struct { - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Indicates whether the instances launched in the VPC get DNS hostnames. If - // enabled, instances in the VPC get DNS hostnames; otherwise, they do not. You - // cannot modify the DNS resolution and DNS hostnames attributes in the same - // request. Use separate requests for each attribute. You can only enable DNS - // hostnames if you've enabled DNS support. - EnableDnsHostnames *types.AttributeBooleanValue - - // Indicates whether the DNS resolution is supported for the VPC. If enabled, - // queries to the Amazon provided DNS server at the 169.254.169.253 IP address, or - // the reserved IP address at the base of the VPC network range "plus two" succeed. - // If disabled, the Amazon provided DNS service in the VPC that resolves public DNS - // hostnames to IP addresses is not enabled. You cannot modify the DNS resolution - // and DNS hostnames attributes in the same request. Use separate requests for each - // attribute. - EnableDnsSupport *types.AttributeBooleanValue - - // Indicates whether Network Address Usage metrics are enabled for your VPC. - EnableNetworkAddressUsageMetrics *types.AttributeBooleanValue - - noSmithyDocumentSerde -} - -type ModifyVpcAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpoint.go deleted file mode 100644 index 4007f5ae9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpoint.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies attributes of a specified VPC endpoint. The attributes that you can -// modify depend on the type of VPC endpoint (interface, gateway, or Gateway Load -// Balancer). For more information, see the Amazon Web Services PrivateLink Guide (https://docs.aws.amazon.com/vpc/latest/privatelink/) -// . -func (c *Client) ModifyVpcEndpoint(ctx context.Context, params *ModifyVpcEndpointInput, optFns ...func(*Options)) (*ModifyVpcEndpointOutput, error) { - if params == nil { - params = &ModifyVpcEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpoint", params, optFns, c.addOperationModifyVpcEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcEndpointInput struct { - - // The ID of the endpoint. - // - // This member is required. - VpcEndpointId *string - - // (Gateway endpoint) The IDs of the route tables to associate with the endpoint. - AddRouteTableIds []string - - // (Interface endpoint) The IDs of the security groups to associate with the - // endpoint network interfaces. - AddSecurityGroupIds []string - - // (Interface and Gateway Load Balancer endpoints) The IDs of the subnets in which - // to serve the endpoint. For a Gateway Load Balancer endpoint, you can specify - // only one subnet. - AddSubnetIds []string - - // The DNS options for the endpoint. - DnsOptions *types.DnsOptionsSpecification - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IP address type for the endpoint. - IpAddressType types.IpAddressType - - // (Interface and gateway endpoints) A policy to attach to the endpoint that - // controls access to the service. The policy must be in valid JSON format. - PolicyDocument *string - - // (Interface endpoint) Indicates whether a private hosted zone is associated with - // the VPC. - PrivateDnsEnabled *bool - - // (Gateway endpoint) The IDs of the route tables to disassociate from the - // endpoint. - RemoveRouteTableIds []string - - // (Interface endpoint) The IDs of the security groups to disassociate from the - // endpoint network interfaces. - RemoveSecurityGroupIds []string - - // (Interface endpoint) The IDs of the subnets from which to remove the endpoint. - RemoveSubnetIds []string - - // (Gateway endpoint) Specify true to reset the policy document to the default - // policy. The default policy allows full access to the service. - ResetPolicy *bool - - // The subnet configurations for the endpoint. - SubnetConfigurations []types.SubnetConfiguration - - noSmithyDocumentSerde -} - -type ModifyVpcEndpointOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcEndpointValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcEndpoint", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go deleted file mode 100644 index 1b76ee7b2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointConnectionNotification.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies a connection notification for VPC endpoint or VPC endpoint service. -// You can change the SNS topic for the notification, or the events for which to be -// notified. -func (c *Client) ModifyVpcEndpointConnectionNotification(ctx context.Context, params *ModifyVpcEndpointConnectionNotificationInput, optFns ...func(*Options)) (*ModifyVpcEndpointConnectionNotificationOutput, error) { - if params == nil { - params = &ModifyVpcEndpointConnectionNotificationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointConnectionNotification", params, optFns, c.addOperationModifyVpcEndpointConnectionNotificationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcEndpointConnectionNotificationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcEndpointConnectionNotificationInput struct { - - // The ID of the notification. - // - // This member is required. - ConnectionNotificationId *string - - // The events for the endpoint. Valid values are Accept , Connect , Delete , and - // Reject . - ConnectionEvents []string - - // The ARN for the SNS topic for the notification. - ConnectionNotificationArn *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVpcEndpointConnectionNotificationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcEndpointConnectionNotificationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointConnectionNotification{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcEndpointConnectionNotification"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcEndpointConnectionNotificationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointConnectionNotification(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcEndpointConnectionNotification(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcEndpointConnectionNotification", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go deleted file mode 100644 index 8872fa0bc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServiceConfiguration.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the attributes of your VPC endpoint service configuration. You can -// change the Network Load Balancers or Gateway Load Balancers for your service, -// and you can specify whether acceptance is required for requests to connect to -// your endpoint service through an interface VPC endpoint. If you set or modify -// the private DNS name, you must prove that you own the private DNS domain name. -func (c *Client) ModifyVpcEndpointServiceConfiguration(ctx context.Context, params *ModifyVpcEndpointServiceConfigurationInput, optFns ...func(*Options)) (*ModifyVpcEndpointServiceConfigurationOutput, error) { - if params == nil { - params = &ModifyVpcEndpointServiceConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointServiceConfiguration", params, optFns, c.addOperationModifyVpcEndpointServiceConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcEndpointServiceConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcEndpointServiceConfigurationInput struct { - - // The ID of the service. - // - // This member is required. - ServiceId *string - - // Indicates whether requests to create an endpoint to your service must be - // accepted. - AcceptanceRequired *bool - - // The Amazon Resource Names (ARNs) of Gateway Load Balancers to add to your - // service configuration. - AddGatewayLoadBalancerArns []string - - // The Amazon Resource Names (ARNs) of Network Load Balancers to add to your - // service configuration. - AddNetworkLoadBalancerArns []string - - // The IP address types to add to your service configuration. - AddSupportedIpAddressTypes []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // (Interface endpoint configuration) The private DNS name to assign to the - // endpoint service. - PrivateDnsName *string - - // The Amazon Resource Names (ARNs) of Gateway Load Balancers to remove from your - // service configuration. - RemoveGatewayLoadBalancerArns []string - - // The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your - // service configuration. - RemoveNetworkLoadBalancerArns []string - - // (Interface endpoint configuration) Removes the private DNS name of the endpoint - // service. - RemovePrivateDnsName *bool - - // The IP address types to remove from your service configuration. - RemoveSupportedIpAddressTypes []string - - noSmithyDocumentSerde -} - -type ModifyVpcEndpointServiceConfigurationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcEndpointServiceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcEndpointServiceConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcEndpointServiceConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointServiceConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcEndpointServiceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcEndpointServiceConfiguration", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go deleted file mode 100644 index 4a6f6d4d3..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePayerResponsibility.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the payer responsibility for your VPC endpoint service. -func (c *Client) ModifyVpcEndpointServicePayerResponsibility(ctx context.Context, params *ModifyVpcEndpointServicePayerResponsibilityInput, optFns ...func(*Options)) (*ModifyVpcEndpointServicePayerResponsibilityOutput, error) { - if params == nil { - params = &ModifyVpcEndpointServicePayerResponsibilityInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointServicePayerResponsibility", params, optFns, c.addOperationModifyVpcEndpointServicePayerResponsibilityMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcEndpointServicePayerResponsibilityOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcEndpointServicePayerResponsibilityInput struct { - - // The entity that is responsible for the endpoint costs. The default is the - // endpoint owner. If you set the payer responsibility to the service owner, you - // cannot set it back to the endpoint owner. - // - // This member is required. - PayerResponsibility types.PayerResponsibility - - // The ID of the service. - // - // This member is required. - ServiceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVpcEndpointServicePayerResponsibilityOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcEndpointServicePayerResponsibilityMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointServicePayerResponsibility{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcEndpointServicePayerResponsibility"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcEndpointServicePayerResponsibilityValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointServicePayerResponsibility(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcEndpointServicePayerResponsibility(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcEndpointServicePayerResponsibility", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go deleted file mode 100644 index 964a06747..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcEndpointServicePermissions.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the permissions for your VPC endpoint service. You can add or remove -// permissions for service consumers (Amazon Web Services accounts, users, and IAM -// roles) to connect to your endpoint service. If you grant permissions to all -// principals, the service is public. Any users who know the name of a public -// service can send a request to attach an endpoint. If the service does not -// require manual approval, attachments are automatically approved. -func (c *Client) ModifyVpcEndpointServicePermissions(ctx context.Context, params *ModifyVpcEndpointServicePermissionsInput, optFns ...func(*Options)) (*ModifyVpcEndpointServicePermissionsOutput, error) { - if params == nil { - params = &ModifyVpcEndpointServicePermissionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointServicePermissions", params, optFns, c.addOperationModifyVpcEndpointServicePermissionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcEndpointServicePermissionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcEndpointServicePermissionsInput struct { - - // The ID of the service. - // - // This member is required. - ServiceId *string - - // The Amazon Resource Names (ARN) of the principals. Permissions are granted to - // the principals in this list. To grant permissions to all principals, specify an - // asterisk (*). - AddAllowedPrincipals []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Amazon Resource Names (ARN) of the principals. Permissions are revoked for - // principals in this list. - RemoveAllowedPrincipals []string - - noSmithyDocumentSerde -} - -type ModifyVpcEndpointServicePermissionsOutput struct { - - // Information about the added principals. - AddedPrincipals []types.AddedPrincipal - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcEndpointServicePermissionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointServicePermissions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointServicePermissions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcEndpointServicePermissions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcEndpointServicePermissionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointServicePermissions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcEndpointServicePermissions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcEndpointServicePermissions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go deleted file mode 100644 index 360f33fca..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcPeeringConnectionOptions.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the VPC peering connection options on one side of a VPC peering -// connection. If the peered VPCs are in the same Amazon Web Services account, you -// can enable DNS resolution for queries from the local VPC. This ensures that -// queries from the local VPC resolve to private IP addresses in the peer VPC. This -// option is not available if the peered VPCs are in different Amazon Web Services -// accounts or different Regions. For peered VPCs in different Amazon Web Services -// accounts, each Amazon Web Services account owner must initiate a separate -// request to modify the peering connection options. For inter-region peering -// connections, you must use the Region for the requester VPC to modify the -// requester VPC peering options and the Region for the accepter VPC to modify the -// accepter VPC peering options. To verify which VPCs are the accepter and the -// requester for a VPC peering connection, use the DescribeVpcPeeringConnections -// command. -func (c *Client) ModifyVpcPeeringConnectionOptions(ctx context.Context, params *ModifyVpcPeeringConnectionOptionsInput, optFns ...func(*Options)) (*ModifyVpcPeeringConnectionOptionsOutput, error) { - if params == nil { - params = &ModifyVpcPeeringConnectionOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcPeeringConnectionOptions", params, optFns, c.addOperationModifyVpcPeeringConnectionOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcPeeringConnectionOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcPeeringConnectionOptionsInput struct { - - // The ID of the VPC peering connection. - // - // This member is required. - VpcPeeringConnectionId *string - - // The VPC peering connection options for the accepter VPC. - AccepterPeeringConnectionOptions *types.PeeringConnectionOptionsRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The VPC peering connection options for the requester VPC. - RequesterPeeringConnectionOptions *types.PeeringConnectionOptionsRequest - - noSmithyDocumentSerde -} - -type ModifyVpcPeeringConnectionOptionsOutput struct { - - // Information about the VPC peering connection options for the accepter VPC. - AccepterPeeringConnectionOptions *types.PeeringConnectionOptions - - // Information about the VPC peering connection options for the requester VPC. - RequesterPeeringConnectionOptions *types.PeeringConnectionOptions - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcPeeringConnectionOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcPeeringConnectionOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcPeeringConnectionOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcPeeringConnectionOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcPeeringConnectionOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcPeeringConnectionOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcPeeringConnectionOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcTenancy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcTenancy.go deleted file mode 100644 index 73b230400..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpcTenancy.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the instance tenancy attribute of the specified VPC. You can change -// the instance tenancy attribute of a VPC to default only. You cannot change the -// instance tenancy attribute to dedicated . After you modify the tenancy of the -// VPC, any new instances that you launch into the VPC have a tenancy of default , -// unless you specify otherwise during launch. The tenancy of any existing -// instances in the VPC is not affected. For more information, see Dedicated -// Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html) -// in the Amazon EC2 User Guide. -func (c *Client) ModifyVpcTenancy(ctx context.Context, params *ModifyVpcTenancyInput, optFns ...func(*Options)) (*ModifyVpcTenancyOutput, error) { - if params == nil { - params = &ModifyVpcTenancyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpcTenancy", params, optFns, c.addOperationModifyVpcTenancyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpcTenancyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpcTenancyInput struct { - - // The instance tenancy attribute for the VPC. - // - // This member is required. - InstanceTenancy types.VpcTenancy - - // The ID of the VPC. - // - // This member is required. - VpcId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVpcTenancyOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpcTenancyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcTenancy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcTenancy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpcTenancy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpcTenancyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcTenancy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpcTenancy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpcTenancy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnection.go deleted file mode 100644 index c61e6dc55..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnection.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the customer gateway or the target gateway of an Amazon Web Services -// Site-to-Site VPN connection. To modify the target gateway, the following -// migration options are available: -// - An existing virtual private gateway to a new virtual private gateway -// - An existing virtual private gateway to a transit gateway -// - An existing transit gateway to a new transit gateway -// - An existing transit gateway to a virtual private gateway -// -// Before you perform the migration to the new gateway, you must configure the new -// gateway. Use CreateVpnGateway to create a virtual private gateway, or -// CreateTransitGateway to create a transit gateway. This step is required when you -// migrate from a virtual private gateway with static routes to a transit gateway. -// You must delete the static routes before you migrate to the new gateway. Keep a -// copy of the static route before you delete it. You will need to add back these -// routes to the transit gateway after the VPN connection migration is complete. -// After you migrate to the new gateway, you might need to modify your VPC route -// table. Use CreateRoute and DeleteRoute to make the changes described in Update -// VPC route tables (https://docs.aws.amazon.com/vpn/latest/s2svpn/modify-vpn-target.html#step-update-routing) -// in the Amazon Web Services Site-to-Site VPN User Guide. When the new gateway is -// a transit gateway, modify the transit gateway route table to allow traffic -// between the VPC and the Amazon Web Services Site-to-Site VPN connection. Use -// CreateTransitGatewayRoute to add the routes. If you deleted VPN static routes, -// you must add the static routes to the transit gateway route table. After you -// perform this operation, the VPN endpoint's IP addresses on the Amazon Web -// Services side and the tunnel options remain intact. Your Amazon Web Services -// Site-to-Site VPN connection will be temporarily unavailable for a brief period -// while we provision the new endpoints. -func (c *Client) ModifyVpnConnection(ctx context.Context, params *ModifyVpnConnectionInput, optFns ...func(*Options)) (*ModifyVpnConnectionOutput, error) { - if params == nil { - params = &ModifyVpnConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpnConnection", params, optFns, c.addOperationModifyVpnConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpnConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpnConnectionInput struct { - - // The ID of the VPN connection. - // - // This member is required. - VpnConnectionId *string - - // The ID of the customer gateway at your end of the VPN connection. - CustomerGatewayId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the virtual private gateway at the Amazon Web Services side of the - // VPN connection. - VpnGatewayId *string - - noSmithyDocumentSerde -} - -type ModifyVpnConnectionOutput struct { - - // Information about the VPN connection. - VpnConnection *types.VpnConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpnConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpnConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpnConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpnConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpnConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnectionOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnectionOptions.go deleted file mode 100644 index d9fe9445c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnConnectionOptions.go +++ /dev/null @@ -1,162 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the connection options for your Site-to-Site VPN connection. When you -// modify the VPN connection options, the VPN endpoint IP addresses on the Amazon -// Web Services side do not change, and the tunnel options do not change. Your VPN -// connection will be temporarily unavailable for a brief period while the VPN -// connection is updated. -func (c *Client) ModifyVpnConnectionOptions(ctx context.Context, params *ModifyVpnConnectionOptionsInput, optFns ...func(*Options)) (*ModifyVpnConnectionOptionsOutput, error) { - if params == nil { - params = &ModifyVpnConnectionOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpnConnectionOptions", params, optFns, c.addOperationModifyVpnConnectionOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpnConnectionOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpnConnectionOptionsInput struct { - - // The ID of the Site-to-Site VPN connection. - // - // This member is required. - VpnConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection. - // Default: 0.0.0.0/0 - LocalIpv4NetworkCidr *string - - // The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection. - // Default: ::/0 - LocalIpv6NetworkCidr *string - - // The IPv4 CIDR on the Amazon Web Services side of the VPN connection. Default: - // 0.0.0.0/0 - RemoteIpv4NetworkCidr *string - - // The IPv6 CIDR on the Amazon Web Services side of the VPN connection. Default: - // ::/0 - RemoteIpv6NetworkCidr *string - - noSmithyDocumentSerde -} - -type ModifyVpnConnectionOptionsOutput struct { - - // Information about the VPN connection. - VpnConnection *types.VpnConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpnConnectionOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnConnectionOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnConnectionOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpnConnectionOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpnConnectionOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnConnectionOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpnConnectionOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpnConnectionOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelCertificate.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelCertificate.go deleted file mode 100644 index f82f45aef..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelCertificate.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the VPN tunnel endpoint certificate. -func (c *Client) ModifyVpnTunnelCertificate(ctx context.Context, params *ModifyVpnTunnelCertificateInput, optFns ...func(*Options)) (*ModifyVpnTunnelCertificateOutput, error) { - if params == nil { - params = &ModifyVpnTunnelCertificateInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpnTunnelCertificate", params, optFns, c.addOperationModifyVpnTunnelCertificateMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpnTunnelCertificateOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpnTunnelCertificateInput struct { - - // The ID of the Amazon Web Services Site-to-Site VPN connection. - // - // This member is required. - VpnConnectionId *string - - // The external IP address of the VPN tunnel. - // - // This member is required. - VpnTunnelOutsideIpAddress *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ModifyVpnTunnelCertificateOutput struct { - - // Information about the VPN connection. - VpnConnection *types.VpnConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpnTunnelCertificateMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnTunnelCertificate{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnTunnelCertificate{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpnTunnelCertificate"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpnTunnelCertificateValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnTunnelCertificate(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpnTunnelCertificate(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpnTunnelCertificate", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go deleted file mode 100644 index 16b65d3ba..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ModifyVpnTunnelOptions.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the options for a VPN tunnel in an Amazon Web Services Site-to-Site -// VPN connection. You can modify multiple options for a tunnel in a single -// request, but you can only modify one tunnel at a time. For more information, see -// Site-to-Site VPN tunnel options for your Site-to-Site VPN connection (https://docs.aws.amazon.com/vpn/latest/s2svpn/VPNTunnels.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -func (c *Client) ModifyVpnTunnelOptions(ctx context.Context, params *ModifyVpnTunnelOptionsInput, optFns ...func(*Options)) (*ModifyVpnTunnelOptionsOutput, error) { - if params == nil { - params = &ModifyVpnTunnelOptionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ModifyVpnTunnelOptions", params, optFns, c.addOperationModifyVpnTunnelOptionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ModifyVpnTunnelOptionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ModifyVpnTunnelOptionsInput struct { - - // The tunnel options to modify. - // - // This member is required. - TunnelOptions *types.ModifyVpnTunnelOptionsSpecification - - // The ID of the Amazon Web Services Site-to-Site VPN connection. - // - // This member is required. - VpnConnectionId *string - - // The external IP address of the VPN tunnel. - // - // This member is required. - VpnTunnelOutsideIpAddress *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Choose whether or not to trigger immediate tunnel replacement. This is only - // applicable when turning on or off EnableTunnelLifecycleControl . Valid values: - // True | False - SkipTunnelReplacement *bool - - noSmithyDocumentSerde -} - -type ModifyVpnTunnelOptionsOutput struct { - - // Information about the VPN connection. - VpnConnection *types.VpnConnection - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationModifyVpnTunnelOptionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpnTunnelOptions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpnTunnelOptions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyVpnTunnelOptions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpModifyVpnTunnelOptionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpnTunnelOptions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opModifyVpnTunnelOptions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ModifyVpnTunnelOptions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go deleted file mode 100644 index 3f439ca07..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MonitorInstances.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables detailed monitoring for a running instance. Otherwise, basic monitoring -// is enabled. For more information, see Monitor your instances using CloudWatch (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) -// in the Amazon EC2 User Guide. To disable detailed monitoring, see -// UnmonitorInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_UnmonitorInstances.html) -// . -func (c *Client) MonitorInstances(ctx context.Context, params *MonitorInstancesInput, optFns ...func(*Options)) (*MonitorInstancesOutput, error) { - if params == nil { - params = &MonitorInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "MonitorInstances", params, optFns, c.addOperationMonitorInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*MonitorInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type MonitorInstancesInput struct { - - // The IDs of the instances. - // - // This member is required. - InstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type MonitorInstancesOutput struct { - - // The monitoring information. - InstanceMonitorings []types.InstanceMonitoring - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationMonitorInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpMonitorInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpMonitorInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "MonitorInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpMonitorInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMonitorInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opMonitorInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "MonitorInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveAddressToVpc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveAddressToVpc.go deleted file mode 100644 index 5318547f1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveAddressToVpc.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Moves an Elastic IP address from the EC2-Classic -// platform to the EC2-VPC platform. The Elastic IP address must be allocated to -// your account for more than 24 hours, and it must not be associated with an -// instance. After the Elastic IP address is moved, it is no longer available for -// use in the EC2-Classic platform, unless you move it back using the -// RestoreAddressToClassic request. You cannot move an Elastic IP address that was -// originally allocated for use in the EC2-VPC platform to the EC2-Classic -// platform. -func (c *Client) MoveAddressToVpc(ctx context.Context, params *MoveAddressToVpcInput, optFns ...func(*Options)) (*MoveAddressToVpcOutput, error) { - if params == nil { - params = &MoveAddressToVpcInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "MoveAddressToVpc", params, optFns, c.addOperationMoveAddressToVpcMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*MoveAddressToVpcOutput) - out.ResultMetadata = metadata - return out, nil -} - -type MoveAddressToVpcInput struct { - - // The Elastic IP address. - // - // This member is required. - PublicIp *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type MoveAddressToVpcOutput struct { - - // The allocation ID for the Elastic IP address. - AllocationId *string - - // The status of the move of the IP address. - Status types.Status - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationMoveAddressToVpcMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpMoveAddressToVpc{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpMoveAddressToVpc{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "MoveAddressToVpc"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpMoveAddressToVpcValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMoveAddressToVpc(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opMoveAddressToVpc(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "MoveAddressToVpc", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveByoipCidrToIpam.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveByoipCidrToIpam.go deleted file mode 100644 index dd89eb6b7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_MoveByoipCidrToIpam.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Move a BYOIPv4 CIDR to IPAM from a public IPv4 pool. If you already have a -// BYOIPv4 CIDR with Amazon Web Services, you can move the CIDR to IPAM from a -// public IPv4 pool. You cannot move an IPv6 CIDR to IPAM. If you are bringing a -// new IP address to Amazon Web Services for the first time, complete the steps in -// Tutorial: BYOIP address CIDRs to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoip-ipam.html) -// . -func (c *Client) MoveByoipCidrToIpam(ctx context.Context, params *MoveByoipCidrToIpamInput, optFns ...func(*Options)) (*MoveByoipCidrToIpamOutput, error) { - if params == nil { - params = &MoveByoipCidrToIpamInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "MoveByoipCidrToIpam", params, optFns, c.addOperationMoveByoipCidrToIpamMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*MoveByoipCidrToIpamOutput) - out.ResultMetadata = metadata - return out, nil -} - -type MoveByoipCidrToIpamInput struct { - - // The BYOIP CIDR. - // - // This member is required. - Cidr *string - - // The IPAM pool ID. - // - // This member is required. - IpamPoolId *string - - // The Amazon Web Services account ID of the owner of the IPAM pool. - // - // This member is required. - IpamPoolOwner *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type MoveByoipCidrToIpamOutput struct { - - // The BYOIP CIDR. - ByoipCidr *types.ByoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationMoveByoipCidrToIpamMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpMoveByoipCidrToIpam{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpMoveByoipCidrToIpam{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "MoveByoipCidrToIpam"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpMoveByoipCidrToIpamValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMoveByoipCidrToIpam(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opMoveByoipCidrToIpam(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "MoveByoipCidrToIpam", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionByoipCidr.go deleted file mode 100644 index d4951b245..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionByoipCidr.go +++ /dev/null @@ -1,189 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services -// resources through bring your own IP addresses (BYOIP) and creates a -// corresponding address pool. After the address range is provisioned, it is ready -// to be advertised using AdvertiseByoipCidr . Amazon Web Services verifies that -// you own the address range and are authorized to advertise it. You must ensure -// that the address range is registered to you and that you created an RPKI ROA to -// authorize Amazon ASNs 16509 and 14618 to advertise the address range. For more -// information, see Bring your own IP addresses (BYOIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) -// in the Amazon Elastic Compute Cloud User Guide. Provisioning an address range is -// an asynchronous operation, so the call returns immediately, but the address -// range is not ready to use until its status changes from pending-provision to -// provisioned . To monitor the status of an address range, use DescribeByoipCidrs -// . To allocate an Elastic IP address from your IPv4 address pool, use -// AllocateAddress with either the specific address from the address pool or the ID -// of the address pool. -func (c *Client) ProvisionByoipCidr(ctx context.Context, params *ProvisionByoipCidrInput, optFns ...func(*Options)) (*ProvisionByoipCidrOutput, error) { - if params == nil { - params = &ProvisionByoipCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ProvisionByoipCidr", params, optFns, c.addOperationProvisionByoipCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ProvisionByoipCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ProvisionByoipCidrInput struct { - - // The public IPv4 or IPv6 address range, in CIDR notation. The most specific IPv4 - // prefix that you can specify is /24. The most specific IPv6 prefix you can - // specify is /56. The address range cannot overlap with another address range that - // you've brought to this or another Region. - // - // This member is required. - Cidr *string - - // A signed document that proves that you are authorized to bring the specified IP - // address range to Amazon using BYOIP. - CidrAuthorizationContext *types.CidrAuthorizationContext - - // A description for the address range and the address pool. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Reserved. - MultiRegion *bool - - // If you have Local Zones (https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html) - // enabled, you can choose a network border group for Local Zones when you - // provision and advertise a BYOIPv4 CIDR. Choose the network border group - // carefully as the EIP and the Amazon Web Services resource it is associated with - // must reside in the same network border group. You can provision BYOIP address - // ranges to and advertise them in the following Local Zone network border groups: - // - us-east-1-dfw-2 - // - us-west-2-lax-1 - // - us-west-2-phx-2 - // You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this - // time. - NetworkBorderGroup *string - - // The tags to apply to the address pool. - PoolTagSpecifications []types.TagSpecification - - // (IPv6 only) Indicate whether the address range will be publicly advertised to - // the internet. Default: true - PubliclyAdvertisable *bool - - noSmithyDocumentSerde -} - -type ProvisionByoipCidrOutput struct { - - // Information about the address range. - ByoipCidr *types.ByoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationProvisionByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpProvisionByoipCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpProvisionByoipCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ProvisionByoipCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpProvisionByoipCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionByoipCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opProvisionByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ProvisionByoipCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionIpamByoasn.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionIpamByoasn.go deleted file mode 100644 index 5b8fab589..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionIpamByoasn.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Provisions your Autonomous System Number (ASN) for use in your Amazon Web -// Services account. This action requires authorization context for Amazon to bring -// the ASN to an Amazon Web Services account. For more information, see Tutorial: -// Bring your ASN to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html) -// in the Amazon VPC IPAM guide. -func (c *Client) ProvisionIpamByoasn(ctx context.Context, params *ProvisionIpamByoasnInput, optFns ...func(*Options)) (*ProvisionIpamByoasnOutput, error) { - if params == nil { - params = &ProvisionIpamByoasnInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ProvisionIpamByoasn", params, optFns, c.addOperationProvisionIpamByoasnMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ProvisionIpamByoasnOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ProvisionIpamByoasnInput struct { - - // A public 2-byte or 4-byte ASN. - // - // This member is required. - Asn *string - - // An ASN authorization context. - // - // This member is required. - AsnAuthorizationContext *types.AsnAuthorizationContext - - // An IPAM ID. - // - // This member is required. - IpamId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ProvisionIpamByoasnOutput struct { - - // An ASN and BYOIP CIDR association. - Byoasn *types.Byoasn - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationProvisionIpamByoasnMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpProvisionIpamByoasn{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpProvisionIpamByoasn{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ProvisionIpamByoasn"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpProvisionIpamByoasnValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionIpamByoasn(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opProvisionIpamByoasn(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ProvisionIpamByoasn", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionIpamPoolCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionIpamPoolCidr.go deleted file mode 100644 index 6cf919591..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionIpamPoolCidr.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Provision a CIDR to an IPAM pool. You can use this action to provision new -// CIDRs to a top-level pool or to transfer a CIDR from a top-level pool to a pool -// within it. For more information, see Provision CIDRs to pools (https://docs.aws.amazon.com/vpc/latest/ipam/prov-cidr-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) ProvisionIpamPoolCidr(ctx context.Context, params *ProvisionIpamPoolCidrInput, optFns ...func(*Options)) (*ProvisionIpamPoolCidrOutput, error) { - if params == nil { - params = &ProvisionIpamPoolCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ProvisionIpamPoolCidr", params, optFns, c.addOperationProvisionIpamPoolCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ProvisionIpamPoolCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ProvisionIpamPoolCidrInput struct { - - // The ID of the IPAM pool to which you want to assign a CIDR. - // - // This member is required. - IpamPoolId *string - - // The CIDR you want to assign to the IPAM pool. Either "NetmaskLength" or "Cidr" - // is required. This value will be null if you specify "NetmaskLength" and will be - // filled in during the provisioning process. - Cidr *string - - // A signed document that proves that you are authorized to bring a specified IP - // address range to Amazon using BYOIP. This option applies to public pools only. - CidrAuthorizationContext *types.IpamCidrAuthorizationContext - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The netmask length of the CIDR you'd like to provision to a pool. Can be used - // for provisioning Amazon-provided IPv6 CIDRs to top-level pools and for - // provisioning CIDRs to pools with source pools. Cannot be used to provision BYOIP - // CIDRs to top-level pools. Either "NetmaskLength" or "Cidr" is required. - NetmaskLength *int32 - - noSmithyDocumentSerde -} - -type ProvisionIpamPoolCidrOutput struct { - - // Information about the provisioned CIDR. - IpamPoolCidr *types.IpamPoolCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationProvisionIpamPoolCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpProvisionIpamPoolCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpProvisionIpamPoolCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ProvisionIpamPoolCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opProvisionIpamPoolCidrMiddleware(stack, options); err != nil { - return err - } - if err = addOpProvisionIpamPoolCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionIpamPoolCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpProvisionIpamPoolCidr struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpProvisionIpamPoolCidr) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpProvisionIpamPoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*ProvisionIpamPoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *ProvisionIpamPoolCidrInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opProvisionIpamPoolCidrMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpProvisionIpamPoolCidr{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opProvisionIpamPoolCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ProvisionIpamPoolCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go deleted file mode 100644 index cff8c57fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ProvisionPublicIpv4PoolCidr.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Provision a CIDR to a public IPv4 pool. For more information about IPAM, see -// What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) -// in the Amazon VPC IPAM User Guide. -func (c *Client) ProvisionPublicIpv4PoolCidr(ctx context.Context, params *ProvisionPublicIpv4PoolCidrInput, optFns ...func(*Options)) (*ProvisionPublicIpv4PoolCidrOutput, error) { - if params == nil { - params = &ProvisionPublicIpv4PoolCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ProvisionPublicIpv4PoolCidr", params, optFns, c.addOperationProvisionPublicIpv4PoolCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ProvisionPublicIpv4PoolCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ProvisionPublicIpv4PoolCidrInput struct { - - // The ID of the IPAM pool you would like to use to allocate this CIDR. - // - // This member is required. - IpamPoolId *string - - // The netmask length of the CIDR you would like to allocate to the public IPv4 - // pool. - // - // This member is required. - NetmaskLength *int32 - - // The ID of the public IPv4 pool you would like to use for this CIDR. - // - // This member is required. - PoolId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ProvisionPublicIpv4PoolCidrOutput struct { - - // Information about the address range of the public IPv4 pool. - PoolAddressRange *types.PublicIpv4PoolRange - - // The ID of the pool that you want to provision the CIDR to. - PoolId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationProvisionPublicIpv4PoolCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpProvisionPublicIpv4PoolCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ProvisionPublicIpv4PoolCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpProvisionPublicIpv4PoolCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opProvisionPublicIpv4PoolCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opProvisionPublicIpv4PoolCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ProvisionPublicIpv4PoolCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseCapacityBlock.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseCapacityBlock.go deleted file mode 100644 index 1d39de5b0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseCapacityBlock.go +++ /dev/null @@ -1,152 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Purchase the Capacity Block for use with your account. With Capacity Blocks you -// ensure GPU capacity is available for machine learning (ML) workloads. You must -// specify the ID of the Capacity Block offering you are purchasing. -func (c *Client) PurchaseCapacityBlock(ctx context.Context, params *PurchaseCapacityBlockInput, optFns ...func(*Options)) (*PurchaseCapacityBlockOutput, error) { - if params == nil { - params = &PurchaseCapacityBlockInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PurchaseCapacityBlock", params, optFns, c.addOperationPurchaseCapacityBlockMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PurchaseCapacityBlockOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PurchaseCapacityBlockInput struct { - - // The ID of the Capacity Block offering. - // - // This member is required. - CapacityBlockOfferingId *string - - // The type of operating system for which to reserve capacity. - // - // This member is required. - InstancePlatform types.CapacityReservationInstancePlatform - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply to the Capacity Block during launch. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type PurchaseCapacityBlockOutput struct { - - // The Capacity Reservation. - CapacityReservation *types.CapacityReservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPurchaseCapacityBlockMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseCapacityBlock{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseCapacityBlock{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PurchaseCapacityBlock"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpPurchaseCapacityBlockValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseCapacityBlock(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPurchaseCapacityBlock(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PurchaseCapacityBlock", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseHostReservation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseHostReservation.go deleted file mode 100644 index 16627a9c8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseHostReservation.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Purchase a reservation with configurations that match those of your Dedicated -// Host. You must have active Dedicated Hosts in your account before you purchase a -// reservation. This action results in the specified reservation being purchased -// and charged to your account. -func (c *Client) PurchaseHostReservation(ctx context.Context, params *PurchaseHostReservationInput, optFns ...func(*Options)) (*PurchaseHostReservationOutput, error) { - if params == nil { - params = &PurchaseHostReservationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PurchaseHostReservation", params, optFns, c.addOperationPurchaseHostReservationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PurchaseHostReservationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PurchaseHostReservationInput struct { - - // The IDs of the Dedicated Hosts with which the reservation will be associated. - // - // This member is required. - HostIdSet []string - - // The ID of the offering. - // - // This member is required. - OfferingId *string - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The currency in which the totalUpfrontPrice , LimitPrice , and totalHourlyPrice - // amounts are specified. At this time, the only supported currency is USD . - CurrencyCode types.CurrencyCodeValues - - // The specified limit is checked against the total upfront cost of the - // reservation (calculated as the offering's upfront cost multiplied by the host - // count). If the total upfront cost is greater than the specified price limit, the - // request fails. This is used to ensure that the purchase does not exceed the - // expected upfront cost of the purchase. At this time, the only supported currency - // is USD . For example, to indicate a limit price of USD 100, specify 100.00. - LimitPrice *string - - // The tags to apply to the Dedicated Host Reservation during purchase. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type PurchaseHostReservationOutput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts are - // specified. At this time, the only supported currency is USD . - CurrencyCode types.CurrencyCodeValues - - // Describes the details of the purchase. - Purchase []types.Purchase - - // The total hourly price of the reservation calculated per hour. - TotalHourlyPrice *string - - // The total amount charged to your account when you purchase the reservation. - TotalUpfrontPrice *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPurchaseHostReservationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseHostReservation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseHostReservation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PurchaseHostReservation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpPurchaseHostReservationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseHostReservation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPurchaseHostReservation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PurchaseHostReservation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseReservedInstancesOffering.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseReservedInstancesOffering.go deleted file mode 100644 index c24f7a58a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseReservedInstancesOffering.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Purchases a Reserved Instance for use with your account. With Reserved -// Instances, you pay a lower hourly rate compared to On-Demand instance pricing. -// Use DescribeReservedInstancesOfferings to get a list of Reserved Instance -// offerings that match your specifications. After you've purchased a Reserved -// Instance, you can check for your new Reserved Instance with -// DescribeReservedInstances . To queue a purchase for a future date and time, -// specify a purchase time. If you do not specify a purchase time, the default is -// the current time. For more information, see Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) -// and Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon EC2 User Guide. -func (c *Client) PurchaseReservedInstancesOffering(ctx context.Context, params *PurchaseReservedInstancesOfferingInput, optFns ...func(*Options)) (*PurchaseReservedInstancesOfferingOutput, error) { - if params == nil { - params = &PurchaseReservedInstancesOfferingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PurchaseReservedInstancesOffering", params, optFns, c.addOperationPurchaseReservedInstancesOfferingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PurchaseReservedInstancesOfferingOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for PurchaseReservedInstancesOffering. -type PurchaseReservedInstancesOfferingInput struct { - - // The number of Reserved Instances to purchase. - // - // This member is required. - InstanceCount *int32 - - // The ID of the Reserved Instance offering to purchase. - // - // This member is required. - ReservedInstancesOfferingId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Specified for Reserved Instance Marketplace offerings to limit the total order - // and ensure that the Reserved Instances are not purchased at unexpected prices. - LimitPrice *types.ReservedInstanceLimitPrice - - // The time at which to purchase the Reserved Instance, in UTC format (for - // example, YYYY-MM-DDTHH:MM:SSZ). - PurchaseTime *time.Time - - noSmithyDocumentSerde -} - -// Contains the output of PurchaseReservedInstancesOffering. -type PurchaseReservedInstancesOfferingOutput struct { - - // The IDs of the purchased Reserved Instances. If your purchase crosses into a - // discounted pricing tier, the final Reserved Instances IDs might change. For more - // information, see Crossing pricing tiers (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-reserved-instances-application.html#crossing-pricing-tiers) - // in the Amazon Elastic Compute Cloud User Guide. - ReservedInstancesId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPurchaseReservedInstancesOfferingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseReservedInstancesOffering{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseReservedInstancesOffering{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PurchaseReservedInstancesOffering"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpPurchaseReservedInstancesOfferingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseReservedInstancesOffering(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPurchaseReservedInstancesOffering(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PurchaseReservedInstancesOffering", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseScheduledInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseScheduledInstances.go deleted file mode 100644 index b42388add..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_PurchaseScheduledInstances.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// You can no longer purchase Scheduled Instances. Purchases the Scheduled -// Instances with the specified schedule. Scheduled Instances enable you to -// purchase Amazon EC2 compute capacity by the hour for a one-year term. Before you -// can purchase a Scheduled Instance, you must call -// DescribeScheduledInstanceAvailability to check for available schedules and -// obtain a purchase token. After you purchase a Scheduled Instance, you must call -// RunScheduledInstances during each scheduled time period. After you purchase a -// Scheduled Instance, you can't cancel, modify, or resell your purchase. -func (c *Client) PurchaseScheduledInstances(ctx context.Context, params *PurchaseScheduledInstancesInput, optFns ...func(*Options)) (*PurchaseScheduledInstancesOutput, error) { - if params == nil { - params = &PurchaseScheduledInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PurchaseScheduledInstances", params, optFns, c.addOperationPurchaseScheduledInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PurchaseScheduledInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for PurchaseScheduledInstances. -type PurchaseScheduledInstancesInput struct { - - // The purchase requests. - // - // This member is required. - PurchaseRequests []types.PurchaseRequest - - // Unique, case-sensitive identifier that ensures the idempotency of the request. - // For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of PurchaseScheduledInstances. -type PurchaseScheduledInstancesOutput struct { - - // Information about the Scheduled Instances. - ScheduledInstanceSet []types.ScheduledInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPurchaseScheduledInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpPurchaseScheduledInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpPurchaseScheduledInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PurchaseScheduledInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opPurchaseScheduledInstancesMiddleware(stack, options); err != nil { - return err - } - if err = addOpPurchaseScheduledInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPurchaseScheduledInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpPurchaseScheduledInstances struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPurchaseScheduledInstances) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPurchaseScheduledInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*PurchaseScheduledInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PurchaseScheduledInstancesInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opPurchaseScheduledInstancesMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPurchaseScheduledInstances{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opPurchaseScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PurchaseScheduledInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go deleted file mode 100644 index 8adc5e691..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RebootInstances.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Requests a reboot of the specified instances. This operation is asynchronous; -// it only queues a request to reboot the specified instances. The operation -// succeeds if the instances are valid and belong to you. Requests to reboot -// terminated instances are ignored. If an instance does not cleanly shut down -// within a few minutes, Amazon EC2 performs a hard reboot. For more information -// about troubleshooting, see Troubleshoot an unreachable instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html) -// in the Amazon EC2 User Guide. -func (c *Client) RebootInstances(ctx context.Context, params *RebootInstancesInput, optFns ...func(*Options)) (*RebootInstancesOutput, error) { - if params == nil { - params = &RebootInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RebootInstances", params, optFns, c.addOperationRebootInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RebootInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RebootInstancesInput struct { - - // The instance IDs. - // - // This member is required. - InstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RebootInstancesOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRebootInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRebootInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRebootInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RebootInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRebootInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRebootInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRebootInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RebootInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go deleted file mode 100644 index d13430179..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterImage.go +++ /dev/null @@ -1,269 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Registers an AMI. When you're creating an AMI, this is the final step you must -// complete before you can launch an instance from the AMI. For more information -// about creating AMIs, see Create your own AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami.html) -// in the Amazon Elastic Compute Cloud User Guide. For Amazon EBS-backed instances, -// CreateImage creates and registers the AMI in a single request, so you don't -// have to register the AMI yourself. We recommend that you always use CreateImage -// unless you have a specific reason to use RegisterImage. If needed, you can -// deregister an AMI at any time. Any modifications you make to an AMI backed by an -// instance store volume invalidates its registration. If you make changes to an -// image, deregister the previous image and register the new image. Register a -// snapshot of a root device volume You can use RegisterImage to create an Amazon -// EBS-backed Linux AMI from a snapshot of a root device volume. You specify the -// snapshot using a block device mapping. You can't set the encryption state of the -// volume using the block device mapping. If the snapshot is encrypted, or -// encryption by default is enabled, the root volume of an instance launched from -// the AMI is encrypted. For more information, see Create a Linux AMI from a -// snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot) -// and Use encryption with Amazon EBS-backed AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. Amazon Web Services Marketplace -// product codes If any snapshots have Amazon Web Services Marketplace product -// codes, they are copied to the new AMI. Windows and some Linux distributions, -// such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), -// use the Amazon EC2 billing product code associated with an AMI to verify the -// subscription status for package updates. To create a new AMI for operating -// systems that require a billing product code, instead of registering the AMI, do -// the following to preserve the billing product code association: -// - Launch an instance from an existing AMI with that billing product code. -// - Customize the instance. -// - Create an AMI from the instance using CreateImage . -// -// If you purchase a Reserved Instance to apply to an On-Demand Instance that was -// launched from an AMI with a billing product code, make sure that the Reserved -// Instance has the matching billing product code. If you purchase a Reserved -// Instance without the matching billing product code, the Reserved Instance will -// not be applied to the On-Demand Instance. For information about how to obtain -// the platform details and billing information of an AMI, see Understand AMI -// billing information (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html) -// in the Amazon EC2 User Guide. -func (c *Client) RegisterImage(ctx context.Context, params *RegisterImageInput, optFns ...func(*Options)) (*RegisterImageOutput, error) { - if params == nil { - params = &RegisterImageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RegisterImage", params, optFns, c.addOperationRegisterImageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RegisterImageOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for RegisterImage. -type RegisterImageInput struct { - - // A name for your AMI. Constraints: 3-128 alphanumeric characters, parentheses - // (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), - // single quotes ('), at-signs (@), or underscores(_) - // - // This member is required. - Name *string - - // The architecture of the AMI. Default: For Amazon EBS-backed AMIs, i386 . For - // instance store-backed AMIs, the architecture specified in the manifest file. - Architecture types.ArchitectureValues - - // The billing product codes. Your account must be authorized to specify billing - // product codes. If your account is not authorized to specify billing product - // codes, you can publish AMIs that include billable software and list them on the - // Amazon Web Services Marketplace. You must first register as a seller on the - // Amazon Web Services Marketplace. For more information, see Getting started as a - // seller (https://docs.aws.amazon.com/marketplace/latest/userguide/user-guide-for-sellers.html) - // and AMI-based products (https://docs.aws.amazon.com/marketplace/latest/userguide/ami-products.html) - // in the Amazon Web Services Marketplace Seller Guide. - BillingProducts []string - - // The block device mapping entries. If you specify an Amazon EBS volume using the - // ID of an Amazon EBS snapshot, you can't specify the encryption state of the - // volume. If you create an AMI on an Outpost, then all backing snapshots must be - // on the same Outpost or in the Region of that Outpost. AMIs on an Outpost that - // include local snapshots can be used to launch instances on the same Outpost - // only. For more information, Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami) - // in the Amazon EC2 User Guide. - BlockDeviceMappings []types.BlockDeviceMapping - - // The boot mode of the AMI. A value of uefi-preferred indicates that the AMI - // supports both UEFI and Legacy BIOS. The operating system contained in the AMI - // must be configured to support the specified boot mode. For more information, see - // Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) - // in the Amazon EC2 User Guide. - BootMode types.BootModeValues - - // A description for your AMI. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Set to true to enable enhanced networking with ENA for the AMI and any - // instances that you launch from the AMI. This option is supported only for HVM - // AMIs. Specifying this option with a PV AMI can make instances launched from the - // AMI unreachable. - EnaSupport *bool - - // The full path to your AMI manifest in Amazon S3 storage. The specified bucket - // must have the aws-exec-read canned access control list (ACL) to ensure that it - // can be accessed by Amazon EC2. For more information, see Canned ACLs (https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html#canned-acl) - // in the Amazon S3 Service Developer Guide. - ImageLocation *string - - // Set to v2.0 to indicate that IMDSv2 is specified in the AMI. Instances launched - // from this AMI will have HttpTokens automatically set to required so that, by - // default, the instance requires that IMDSv2 is used when requesting instance - // metadata. In addition, HttpPutResponseHopLimit is set to 2 . For more - // information, see Configure the AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration) - // in the Amazon EC2 User Guide. If you set the value to v2.0 , make sure that your - // AMI software can support IMDSv2. - ImdsSupport types.ImdsSupportValues - - // The ID of the kernel. - KernelId *string - - // The ID of the RAM disk. - RamdiskId *string - - // The device name of the root device volume (for example, /dev/sda1 ). - RootDeviceName *string - - // Set to simple to enable enhanced networking with the Intel 82599 Virtual - // Function interface for the AMI and any instances that you launch from the AMI. - // There is no way to disable sriovNetSupport at this time. This option is - // supported only for HVM AMIs. Specifying this option with a PV AMI can make - // instances launched from the AMI unreachable. - SriovNetSupport *string - - // Set to v2.0 to enable Trusted Platform Module (TPM) support. For more - // information, see NitroTPM (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) - // in the Amazon EC2 User Guide. - TpmSupport types.TpmSupportValues - - // Base64 representation of the non-volatile UEFI variable store. To retrieve the - // UEFI data, use the GetInstanceUefiData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceUefiData) - // command. You can inspect and modify the UEFI data by using the python-uefivars - // tool (https://github.com/awslabs/python-uefivars) on GitHub. For more - // information, see UEFI Secure Boot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/uefi-secure-boot.html) - // in the Amazon EC2 User Guide. - UefiData *string - - // The type of virtualization ( hvm | paravirtual ). Default: paravirtual - VirtualizationType *string - - noSmithyDocumentSerde -} - -// Contains the output of RegisterImage. -type RegisterImageOutput struct { - - // The ID of the newly registered AMI. - ImageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRegisterImageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterImage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterImage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterImage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRegisterImageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterImage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRegisterImage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RegisterImage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go deleted file mode 100644 index 0e81dfde1..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterInstanceEventNotificationAttributes.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Registers a set of tag keys to include in scheduled event notifications for -// your resources. To remove tags, use -// DeregisterInstanceEventNotificationAttributes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DeregisterInstanceEventNotificationAttributes.html) -// . -func (c *Client) RegisterInstanceEventNotificationAttributes(ctx context.Context, params *RegisterInstanceEventNotificationAttributesInput, optFns ...func(*Options)) (*RegisterInstanceEventNotificationAttributesOutput, error) { - if params == nil { - params = &RegisterInstanceEventNotificationAttributesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RegisterInstanceEventNotificationAttributes", params, optFns, c.addOperationRegisterInstanceEventNotificationAttributesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RegisterInstanceEventNotificationAttributesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RegisterInstanceEventNotificationAttributesInput struct { - - // Information about the tag keys to register. - // - // This member is required. - InstanceTagAttribute *types.RegisterInstanceTagAttributeRequest - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RegisterInstanceEventNotificationAttributesOutput struct { - - // The resulting set of tag keys. - InstanceTagAttribute *types.InstanceTagNotificationAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRegisterInstanceEventNotificationAttributesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterInstanceEventNotificationAttributes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRegisterInstanceEventNotificationAttributesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterInstanceEventNotificationAttributes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRegisterInstanceEventNotificationAttributes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RegisterInstanceEventNotificationAttributes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go deleted file mode 100644 index d3ecf84ef..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupMembers.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Registers members (network interfaces) with the transit gateway multicast -// group. A member is a network interface associated with a supported EC2 instance -// that receives multicast traffic. For information about supported instances, see -// Multicast Consideration (https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits) -// in Amazon VPC Transit Gateways. After you add the members, use -// SearchTransitGatewayMulticastGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html) -// to verify that the members were added to the transit gateway multicast group. -func (c *Client) RegisterTransitGatewayMulticastGroupMembers(ctx context.Context, params *RegisterTransitGatewayMulticastGroupMembersInput, optFns ...func(*Options)) (*RegisterTransitGatewayMulticastGroupMembersOutput, error) { - if params == nil { - params = &RegisterTransitGatewayMulticastGroupMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RegisterTransitGatewayMulticastGroupMembers", params, optFns, c.addOperationRegisterTransitGatewayMulticastGroupMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RegisterTransitGatewayMulticastGroupMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RegisterTransitGatewayMulticastGroupMembersInput struct { - - // The group members' network interface IDs to register with the transit gateway - // multicast group. - // - // This member is required. - NetworkInterfaceIds []string - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - noSmithyDocumentSerde -} - -type RegisterTransitGatewayMulticastGroupMembersOutput struct { - - // Information about the registered transit gateway multicast group members. - RegisteredMulticastGroupMembers *types.TransitGatewayMulticastRegisteredGroupMembers - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRegisterTransitGatewayMulticastGroupMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterTransitGatewayMulticastGroupMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRegisterTransitGatewayMulticastGroupMembersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterTransitGatewayMulticastGroupMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRegisterTransitGatewayMulticastGroupMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RegisterTransitGatewayMulticastGroupMembers", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go deleted file mode 100644 index 6c50fedd6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RegisterTransitGatewayMulticastGroupSources.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Registers sources (network interfaces) with the specified transit gateway -// multicast group. A multicast source is a network interface attached to a -// supported instance that sends multicast traffic. For information about supported -// instances, see Multicast Considerations (https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-limits.html#multicast-limits) -// in Amazon VPC Transit Gateways. After you add the source, use -// SearchTransitGatewayMulticastGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SearchTransitGatewayMulticastGroups.html) -// to verify that the source was added to the multicast group. -func (c *Client) RegisterTransitGatewayMulticastGroupSources(ctx context.Context, params *RegisterTransitGatewayMulticastGroupSourcesInput, optFns ...func(*Options)) (*RegisterTransitGatewayMulticastGroupSourcesOutput, error) { - if params == nil { - params = &RegisterTransitGatewayMulticastGroupSourcesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RegisterTransitGatewayMulticastGroupSources", params, optFns, c.addOperationRegisterTransitGatewayMulticastGroupSourcesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RegisterTransitGatewayMulticastGroupSourcesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RegisterTransitGatewayMulticastGroupSourcesInput struct { - - // The group sources' network interface IDs to register with the transit gateway - // multicast group. - // - // This member is required. - NetworkInterfaceIds []string - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - noSmithyDocumentSerde -} - -type RegisterTransitGatewayMulticastGroupSourcesOutput struct { - - // Information about the transit gateway multicast group sources. - RegisteredMulticastGroupSources *types.TransitGatewayMulticastRegisteredGroupSources - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRegisterTransitGatewayMulticastGroupSourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterTransitGatewayMulticastGroupSources"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRegisterTransitGatewayMulticastGroupSourcesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterTransitGatewayMulticastGroupSources(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRegisterTransitGatewayMulticastGroupSources(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RegisterTransitGatewayMulticastGroupSources", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go deleted file mode 100644 index 6ef04a2f2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayMulticastDomainAssociations.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Rejects a request to associate cross-account subnets with a transit gateway -// multicast domain. -func (c *Client) RejectTransitGatewayMulticastDomainAssociations(ctx context.Context, params *RejectTransitGatewayMulticastDomainAssociationsInput, optFns ...func(*Options)) (*RejectTransitGatewayMulticastDomainAssociationsOutput, error) { - if params == nil { - params = &RejectTransitGatewayMulticastDomainAssociationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RejectTransitGatewayMulticastDomainAssociations", params, optFns, c.addOperationRejectTransitGatewayMulticastDomainAssociationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RejectTransitGatewayMulticastDomainAssociationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RejectTransitGatewayMulticastDomainAssociationsInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The IDs of the subnets to associate with the transit gateway multicast domain. - SubnetIds []string - - // The ID of the transit gateway attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -type RejectTransitGatewayMulticastDomainAssociationsOutput struct { - - // Information about the multicast domain associations. - Associations *types.TransitGatewayMulticastDomainAssociations - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRejectTransitGatewayMulticastDomainAssociationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RejectTransitGatewayMulticastDomainAssociations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectTransitGatewayMulticastDomainAssociations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRejectTransitGatewayMulticastDomainAssociations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RejectTransitGatewayMulticastDomainAssociations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go deleted file mode 100644 index 3342040f4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayPeeringAttachment.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Rejects a transit gateway peering attachment request. -func (c *Client) RejectTransitGatewayPeeringAttachment(ctx context.Context, params *RejectTransitGatewayPeeringAttachmentInput, optFns ...func(*Options)) (*RejectTransitGatewayPeeringAttachmentOutput, error) { - if params == nil { - params = &RejectTransitGatewayPeeringAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RejectTransitGatewayPeeringAttachment", params, optFns, c.addOperationRejectTransitGatewayPeeringAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RejectTransitGatewayPeeringAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RejectTransitGatewayPeeringAttachmentInput struct { - - // The ID of the transit gateway peering attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RejectTransitGatewayPeeringAttachmentOutput struct { - - // The transit gateway peering attachment. - TransitGatewayPeeringAttachment *types.TransitGatewayPeeringAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRejectTransitGatewayPeeringAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RejectTransitGatewayPeeringAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRejectTransitGatewayPeeringAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectTransitGatewayPeeringAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRejectTransitGatewayPeeringAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RejectTransitGatewayPeeringAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go deleted file mode 100644 index 27ef2117b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectTransitGatewayVpcAttachment.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Rejects a request to attach a VPC to a transit gateway. The VPC attachment must -// be in the pendingAcceptance state. Use DescribeTransitGatewayVpcAttachments to -// view your pending VPC attachment requests. Use AcceptTransitGatewayVpcAttachment -// to accept a VPC attachment request. -func (c *Client) RejectTransitGatewayVpcAttachment(ctx context.Context, params *RejectTransitGatewayVpcAttachmentInput, optFns ...func(*Options)) (*RejectTransitGatewayVpcAttachmentOutput, error) { - if params == nil { - params = &RejectTransitGatewayVpcAttachmentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RejectTransitGatewayVpcAttachment", params, optFns, c.addOperationRejectTransitGatewayVpcAttachmentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RejectTransitGatewayVpcAttachmentOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RejectTransitGatewayVpcAttachmentInput struct { - - // The ID of the attachment. - // - // This member is required. - TransitGatewayAttachmentId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RejectTransitGatewayVpcAttachmentOutput struct { - - // Information about the attachment. - TransitGatewayVpcAttachment *types.TransitGatewayVpcAttachment - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRejectTransitGatewayVpcAttachmentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRejectTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RejectTransitGatewayVpcAttachment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRejectTransitGatewayVpcAttachmentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectTransitGatewayVpcAttachment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRejectTransitGatewayVpcAttachment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RejectTransitGatewayVpcAttachment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcEndpointConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcEndpointConnections.go deleted file mode 100644 index 0738f753d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcEndpointConnections.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Rejects VPC endpoint connection requests to your VPC endpoint service. -func (c *Client) RejectVpcEndpointConnections(ctx context.Context, params *RejectVpcEndpointConnectionsInput, optFns ...func(*Options)) (*RejectVpcEndpointConnectionsOutput, error) { - if params == nil { - params = &RejectVpcEndpointConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RejectVpcEndpointConnections", params, optFns, c.addOperationRejectVpcEndpointConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RejectVpcEndpointConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RejectVpcEndpointConnectionsInput struct { - - // The ID of the service. - // - // This member is required. - ServiceId *string - - // The IDs of the VPC endpoints. - // - // This member is required. - VpcEndpointIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RejectVpcEndpointConnectionsOutput struct { - - // Information about the endpoints that were not rejected, if applicable. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRejectVpcEndpointConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRejectVpcEndpointConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectVpcEndpointConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RejectVpcEndpointConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRejectVpcEndpointConnectionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectVpcEndpointConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRejectVpcEndpointConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RejectVpcEndpointConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcPeeringConnection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcPeeringConnection.go deleted file mode 100644 index 719561af7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RejectVpcPeeringConnection.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Rejects a VPC peering connection request. The VPC peering connection must be in -// the pending-acceptance state. Use the DescribeVpcPeeringConnections request to -// view your outstanding VPC peering connection requests. To delete an active VPC -// peering connection, or to delete a VPC peering connection request that you -// initiated, use DeleteVpcPeeringConnection . -func (c *Client) RejectVpcPeeringConnection(ctx context.Context, params *RejectVpcPeeringConnectionInput, optFns ...func(*Options)) (*RejectVpcPeeringConnectionOutput, error) { - if params == nil { - params = &RejectVpcPeeringConnectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RejectVpcPeeringConnection", params, optFns, c.addOperationRejectVpcPeeringConnectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RejectVpcPeeringConnectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RejectVpcPeeringConnectionInput struct { - - // The ID of the VPC peering connection. - // - // This member is required. - VpcPeeringConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RejectVpcPeeringConnectionOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRejectVpcPeeringConnectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRejectVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRejectVpcPeeringConnection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RejectVpcPeeringConnection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRejectVpcPeeringConnectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectVpcPeeringConnection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRejectVpcPeeringConnection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RejectVpcPeeringConnection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseAddress.go deleted file mode 100644 index 9e488dd12..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseAddress.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Releases the specified Elastic IP address. [Default VPC] Releasing an Elastic -// IP address automatically disassociates it from any instance that it's associated -// with. To disassociate an Elastic IP address without releasing it, use -// DisassociateAddress . [Nondefault VPC] You must use DisassociateAddress to -// disassociate the Elastic IP address before you can release it. Otherwise, Amazon -// EC2 returns an error ( InvalidIPAddress.InUse ). After releasing an Elastic IP -// address, it is released to the IP address pool. Be sure to update your DNS -// records and any servers or devices that communicate with the address. If you -// attempt to release an Elastic IP address that you already released, you'll get -// an AuthFailure error if the address is already allocated to another Amazon Web -// Services account. After you release an Elastic IP address, you might be able to -// recover it. For more information, see AllocateAddress . -func (c *Client) ReleaseAddress(ctx context.Context, params *ReleaseAddressInput, optFns ...func(*Options)) (*ReleaseAddressOutput, error) { - if params == nil { - params = &ReleaseAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReleaseAddress", params, optFns, c.addOperationReleaseAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReleaseAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReleaseAddressInput struct { - - // The allocation ID. This parameter is required. - AllocationId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The set of Availability Zones, Local Zones, or Wavelength Zones from which - // Amazon Web Services advertises IP addresses. If you provide an incorrect network - // border group, you receive an InvalidAddress.NotFound error. - NetworkBorderGroup *string - - // Deprecated. - PublicIp *string - - noSmithyDocumentSerde -} - -type ReleaseAddressOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReleaseAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReleaseAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReleaseAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReleaseAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReleaseAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReleaseAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReleaseAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseHosts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseHosts.go deleted file mode 100644 index c819af5a2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseHosts.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// When you no longer want to use an On-Demand Dedicated Host it can be released. -// On-Demand billing is stopped and the host goes into released state. The host ID -// of Dedicated Hosts that have been released can no longer be specified in another -// request, for example, to modify the host. You must stop or terminate all -// instances on a host before it can be released. When Dedicated Hosts are -// released, it may take some time for them to stop counting toward your limit and -// you may receive capacity errors when trying to allocate new Dedicated Hosts. -// Wait a few minutes and then try again. Released hosts still appear in a -// DescribeHosts response. -func (c *Client) ReleaseHosts(ctx context.Context, params *ReleaseHostsInput, optFns ...func(*Options)) (*ReleaseHostsOutput, error) { - if params == nil { - params = &ReleaseHostsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReleaseHosts", params, optFns, c.addOperationReleaseHostsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReleaseHostsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReleaseHostsInput struct { - - // The IDs of the Dedicated Hosts to release. - // - // This member is required. - HostIds []string - - noSmithyDocumentSerde -} - -type ReleaseHostsOutput struct { - - // The IDs of the Dedicated Hosts that were successfully released. - Successful []string - - // The IDs of the Dedicated Hosts that could not be released, including an error - // message. - Unsuccessful []types.UnsuccessfulItem - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReleaseHostsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReleaseHosts{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReleaseHosts{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReleaseHosts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReleaseHostsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReleaseHosts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReleaseHosts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReleaseHosts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseIpamPoolAllocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseIpamPoolAllocation.go deleted file mode 100644 index 640960a41..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReleaseIpamPoolAllocation.go +++ /dev/null @@ -1,159 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Release an allocation within an IPAM pool. The Region you use should be the -// IPAM pool locale. The locale is the Amazon Web Services Region where this IPAM -// pool is available for allocations. You can only use this action to release -// manual allocations. To remove an allocation for a resource without deleting the -// resource, set its monitored state to false using ModifyIpamResourceCidr (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyIpamResourceCidr.html) -// . For more information, see Release an allocation (https://docs.aws.amazon.com/vpc/latest/ipam/release-alloc-ipam.html) -// in the Amazon VPC IPAM User Guide. All EC2 API actions follow an eventual -// consistency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html#eventual-consistency) -// model. -func (c *Client) ReleaseIpamPoolAllocation(ctx context.Context, params *ReleaseIpamPoolAllocationInput, optFns ...func(*Options)) (*ReleaseIpamPoolAllocationOutput, error) { - if params == nil { - params = &ReleaseIpamPoolAllocationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReleaseIpamPoolAllocation", params, optFns, c.addOperationReleaseIpamPoolAllocationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReleaseIpamPoolAllocationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReleaseIpamPoolAllocationInput struct { - - // The CIDR of the allocation you want to release. - // - // This member is required. - Cidr *string - - // The ID of the allocation. - // - // This member is required. - IpamPoolAllocationId *string - - // The ID of the IPAM pool which contains the allocation you want to release. - // - // This member is required. - IpamPoolId *string - - // A check for whether you have the required permissions for the action without - // actually making the request and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ReleaseIpamPoolAllocationOutput struct { - - // Indicates if the release was successful. - Success *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReleaseIpamPoolAllocationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReleaseIpamPoolAllocation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReleaseIpamPoolAllocation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReleaseIpamPoolAllocation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReleaseIpamPoolAllocationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReleaseIpamPoolAllocation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReleaseIpamPoolAllocation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReleaseIpamPoolAllocation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go deleted file mode 100644 index 4e1427079..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceIamInstanceProfileAssociation.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Replaces an IAM instance profile for the specified running instance. You can -// use this action to change the IAM instance profile that's associated with an -// instance without having to disassociate the existing IAM instance profile first. -// Use DescribeIamInstanceProfileAssociations to get the association ID. -func (c *Client) ReplaceIamInstanceProfileAssociation(ctx context.Context, params *ReplaceIamInstanceProfileAssociationInput, optFns ...func(*Options)) (*ReplaceIamInstanceProfileAssociationOutput, error) { - if params == nil { - params = &ReplaceIamInstanceProfileAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceIamInstanceProfileAssociation", params, optFns, c.addOperationReplaceIamInstanceProfileAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceIamInstanceProfileAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceIamInstanceProfileAssociationInput struct { - - // The ID of the existing IAM instance profile association. - // - // This member is required. - AssociationId *string - - // The IAM instance profile. - // - // This member is required. - IamInstanceProfile *types.IamInstanceProfileSpecification - - noSmithyDocumentSerde -} - -type ReplaceIamInstanceProfileAssociationOutput struct { - - // Information about the IAM instance profile association. - IamInstanceProfileAssociation *types.IamInstanceProfileAssociation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceIamInstanceProfileAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceIamInstanceProfileAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceIamInstanceProfileAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceIamInstanceProfileAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceIamInstanceProfileAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceIamInstanceProfileAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceIamInstanceProfileAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclAssociation.go deleted file mode 100644 index 600051fcc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclAssociation.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Changes which network ACL a subnet is associated with. By default when you -// create a subnet, it's automatically associated with the default network ACL. For -// more information, see Network ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) -// in the Amazon VPC User Guide. This is an idempotent operation. -func (c *Client) ReplaceNetworkAclAssociation(ctx context.Context, params *ReplaceNetworkAclAssociationInput, optFns ...func(*Options)) (*ReplaceNetworkAclAssociationOutput, error) { - if params == nil { - params = &ReplaceNetworkAclAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceNetworkAclAssociation", params, optFns, c.addOperationReplaceNetworkAclAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceNetworkAclAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceNetworkAclAssociationInput struct { - - // The ID of the current association between the original network ACL and the - // subnet. - // - // This member is required. - AssociationId *string - - // The ID of the new network ACL to associate with the subnet. - // - // This member is required. - NetworkAclId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ReplaceNetworkAclAssociationOutput struct { - - // The ID of the new association. - NewAssociationId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceNetworkAclAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceNetworkAclAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceNetworkAclAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceNetworkAclAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceNetworkAclAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceNetworkAclAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceNetworkAclAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceNetworkAclAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclEntry.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclEntry.go deleted file mode 100644 index 08b25ee85..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceNetworkAclEntry.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Replaces an entry (rule) in a network ACL. For more information, see Network -// ACLs (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html) in -// the Amazon VPC User Guide. -func (c *Client) ReplaceNetworkAclEntry(ctx context.Context, params *ReplaceNetworkAclEntryInput, optFns ...func(*Options)) (*ReplaceNetworkAclEntryOutput, error) { - if params == nil { - params = &ReplaceNetworkAclEntryInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceNetworkAclEntry", params, optFns, c.addOperationReplaceNetworkAclEntryMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceNetworkAclEntryOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceNetworkAclEntryInput struct { - - // Indicates whether to replace the egress rule. Default: If no value is - // specified, we replace the ingress rule. - // - // This member is required. - Egress *bool - - // The ID of the ACL. - // - // This member is required. - NetworkAclId *string - - // The protocol number. A value of "-1" means all protocols. If you specify "-1" - // or a protocol number other than "6" (TCP), "17" (UDP), or "1" (ICMP), traffic on - // all ports is allowed, regardless of any ports or ICMP types or codes that you - // specify. If you specify protocol "58" (ICMPv6) and specify an IPv4 CIDR block, - // traffic for all ICMP types and codes allowed, regardless of any that you - // specify. If you specify protocol "58" (ICMPv6) and specify an IPv6 CIDR block, - // you must specify an ICMP type and code. - // - // This member is required. - Protocol *string - - // Indicates whether to allow or deny the traffic that matches the rule. - // - // This member is required. - RuleAction types.RuleAction - - // The rule number of the entry to replace. - // - // This member is required. - RuleNumber *int32 - - // The IPv4 network range to allow or deny, in CIDR notation (for example - // 172.16.0.0/24 ). - CidrBlock *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // ICMP protocol: The ICMP or ICMPv6 type and code. Required if specifying - // protocol 1 (ICMP) or protocol 58 (ICMPv6) with an IPv6 CIDR block. - IcmpTypeCode *types.IcmpTypeCode - - // The IPv6 network range to allow or deny, in CIDR notation (for example - // 2001:bd8:1234:1a00::/64 ). - Ipv6CidrBlock *string - - // TCP or UDP protocols: The range of ports the rule applies to. Required if - // specifying protocol 6 (TCP) or 17 (UDP). - PortRange *types.PortRange - - noSmithyDocumentSerde -} - -type ReplaceNetworkAclEntryOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceNetworkAclEntryMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceNetworkAclEntry{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceNetworkAclEntry{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceNetworkAclEntry"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceNetworkAclEntryValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceNetworkAclEntry(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceNetworkAclEntry(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceNetworkAclEntry", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRoute.go deleted file mode 100644 index ba8e2294f..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRoute.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Replaces an existing route within a route table in a VPC. You must specify -// either a destination CIDR block or a prefix list ID. You must also specify -// exactly one of the resources from the parameter list, or reset the local route -// to its default target. For more information, see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. -func (c *Client) ReplaceRoute(ctx context.Context, params *ReplaceRouteInput, optFns ...func(*Options)) (*ReplaceRouteOutput, error) { - if params == nil { - params = &ReplaceRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceRoute", params, optFns, c.addOperationReplaceRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceRouteInput struct { - - // The ID of the route table. - // - // This member is required. - RouteTableId *string - - // [IPv4 traffic only] The ID of a carrier gateway. - CarrierGatewayId *string - - // The Amazon Resource Name (ARN) of the core network. - CoreNetworkArn *string - - // The IPv4 CIDR address block used for the destination match. The value that you - // provide must match the CIDR of an existing route in the table. - DestinationCidrBlock *string - - // The IPv6 CIDR address block used for the destination match. The value that you - // provide must match the CIDR of an existing route in the table. - DestinationIpv6CidrBlock *string - - // The ID of the prefix list for the route. - DestinationPrefixListId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // [IPv6 traffic only] The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string - - // The ID of an internet gateway or virtual private gateway. - GatewayId *string - - // The ID of a NAT instance in your VPC. - InstanceId *string - - // The ID of the local gateway. - LocalGatewayId *string - - // Specifies whether to reset the local route to its default target ( local ). - LocalTarget *bool - - // [IPv4 traffic only] The ID of a NAT gateway. - NatGatewayId *string - - // The ID of a network interface. - NetworkInterfaceId *string - - // The ID of a transit gateway. - TransitGatewayId *string - - // The ID of a VPC endpoint. Supported for Gateway Load Balancer endpoints only. - VpcEndpointId *string - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -type ReplaceRouteOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRouteTableAssociation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRouteTableAssociation.go deleted file mode 100644 index 6f3b406a8..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceRouteTableAssociation.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Changes the route table associated with a given subnet, internet gateway, or -// virtual private gateway in a VPC. After the operation completes, the subnet or -// gateway uses the routes in the new route table. For more information about route -// tables, see Route tables (https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Route_Tables.html) -// in the Amazon VPC User Guide. You can also use this operation to change which -// table is the main route table in the VPC. Specify the main route table's -// association ID and the route table ID of the new main route table. -func (c *Client) ReplaceRouteTableAssociation(ctx context.Context, params *ReplaceRouteTableAssociationInput, optFns ...func(*Options)) (*ReplaceRouteTableAssociationOutput, error) { - if params == nil { - params = &ReplaceRouteTableAssociationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceRouteTableAssociation", params, optFns, c.addOperationReplaceRouteTableAssociationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceRouteTableAssociationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceRouteTableAssociationInput struct { - - // The association ID. - // - // This member is required. - AssociationId *string - - // The ID of the new route table to associate with the subnet. - // - // This member is required. - RouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ReplaceRouteTableAssociationOutput struct { - - // The state of the association. - AssociationState *types.RouteTableAssociationState - - // The ID of the new association. - NewAssociationId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceRouteTableAssociationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceRouteTableAssociation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceRouteTableAssociation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceRouteTableAssociation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceRouteTableAssociationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceRouteTableAssociation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceRouteTableAssociation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceRouteTableAssociation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceTransitGatewayRoute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceTransitGatewayRoute.go deleted file mode 100644 index 9a96fc3fd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceTransitGatewayRoute.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Replaces the specified route in the specified transit gateway route table. -func (c *Client) ReplaceTransitGatewayRoute(ctx context.Context, params *ReplaceTransitGatewayRouteInput, optFns ...func(*Options)) (*ReplaceTransitGatewayRouteOutput, error) { - if params == nil { - params = &ReplaceTransitGatewayRouteInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceTransitGatewayRoute", params, optFns, c.addOperationReplaceTransitGatewayRouteMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceTransitGatewayRouteOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceTransitGatewayRouteInput struct { - - // The CIDR range used for the destination match. Routing decisions are based on - // the most specific match. - // - // This member is required. - DestinationCidrBlock *string - - // The ID of the route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Indicates whether traffic matching this route is to be dropped. - Blackhole *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -type ReplaceTransitGatewayRouteOutput struct { - - // Information about the modified route. - Route *types.TransitGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceTransitGatewayRouteMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceTransitGatewayRoute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceTransitGatewayRoute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceTransitGatewayRoute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceTransitGatewayRouteValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceTransitGatewayRoute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceTransitGatewayRoute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceTransitGatewayRoute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceVpnTunnel.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceVpnTunnel.go deleted file mode 100644 index feb29f0e2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReplaceVpnTunnel.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Trigger replacement of specified VPN tunnel. -func (c *Client) ReplaceVpnTunnel(ctx context.Context, params *ReplaceVpnTunnelInput, optFns ...func(*Options)) (*ReplaceVpnTunnelOutput, error) { - if params == nil { - params = &ReplaceVpnTunnelInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplaceVpnTunnel", params, optFns, c.addOperationReplaceVpnTunnelMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplaceVpnTunnelOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplaceVpnTunnelInput struct { - - // The ID of the Site-to-Site VPN connection. - // - // This member is required. - VpnConnectionId *string - - // The external IP address of the VPN tunnel. - // - // This member is required. - VpnTunnelOutsideIpAddress *string - - // Trigger pending tunnel endpoint maintenance. - ApplyPendingMaintenance *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ReplaceVpnTunnelOutput struct { - - // Confirmation of replace tunnel operation. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplaceVpnTunnelMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReplaceVpnTunnel{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReplaceVpnTunnel{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplaceVpnTunnel"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReplaceVpnTunnelValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplaceVpnTunnel(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplaceVpnTunnel(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplaceVpnTunnel", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go deleted file mode 100644 index eae11642c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ReportInstanceStatus.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Submits feedback about the status of an instance. The instance must be in the -// running state. If your experience with the instance differs from the instance -// status returned by DescribeInstanceStatus , use ReportInstanceStatus to report -// your experience with the instance. Amazon EC2 collects this information to -// improve the accuracy of status checks. Use of this action does not change the -// value returned by DescribeInstanceStatus . -func (c *Client) ReportInstanceStatus(ctx context.Context, params *ReportInstanceStatusInput, optFns ...func(*Options)) (*ReportInstanceStatusOutput, error) { - if params == nil { - params = &ReportInstanceStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReportInstanceStatus", params, optFns, c.addOperationReportInstanceStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReportInstanceStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReportInstanceStatusInput struct { - - // The instances. - // - // This member is required. - Instances []string - - // The reason codes that describe the health state of your instance. - // - instance-stuck-in-state : My instance is stuck in a state. - // - unresponsive : My instance is unresponsive. - // - not-accepting-credentials : My instance is not accepting my credentials. - // - password-not-available : A password is not available for my instance. - // - performance-network : My instance is experiencing performance problems that - // I believe are network related. - // - performance-instance-store : My instance is experiencing performance - // problems that I believe are related to the instance stores. - // - performance-ebs-volume : My instance is experiencing performance problems - // that I believe are related to an EBS volume. - // - performance-other : My instance is experiencing performance problems. - // - other : [explain using the description parameter] - // - // This member is required. - ReasonCodes []types.ReportInstanceReasonCodes - - // The status of all instances listed. - // - // This member is required. - Status types.ReportStatusType - - // Descriptive text about the health state of your instance. - Description *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The time at which the reported instance health state ended. - EndTime *time.Time - - // The time at which the reported instance health state began. - StartTime *time.Time - - noSmithyDocumentSerde -} - -type ReportInstanceStatusOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReportInstanceStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpReportInstanceStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpReportInstanceStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReportInstanceStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpReportInstanceStatusValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReportInstanceStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReportInstanceStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReportInstanceStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotFleet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotFleet.go deleted file mode 100644 index c73617e1b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotFleet.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a Spot Fleet request. The Spot Fleet request specifies the total target -// capacity and the On-Demand target capacity. Amazon EC2 calculates the difference -// between the total capacity and On-Demand capacity, and launches the difference -// as Spot capacity. You can submit a single request that includes multiple launch -// specifications that vary by instance type, AMI, Availability Zone, or subnet. By -// default, the Spot Fleet requests Spot Instances in the Spot Instance pool where -// the price per unit is the lowest. Each launch specification can include its own -// instance weighting that reflects the value of the instance type to your -// application workload. Alternatively, you can specify that the Spot Fleet -// distribute the target capacity across the Spot pools included in its launch -// specifications. By ensuring that the Spot Instances in your Spot Fleet are in -// different Spot pools, you can improve the availability of your fleet. You can -// specify tags for the Spot Fleet request and instances launched by the fleet. You -// cannot tag other resource types in a Spot Fleet request because only the -// spot-fleet-request and instance resource types are supported. For more -// information, see Spot Fleet requests (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html) -// in the Amazon EC2 User Guide. We strongly discourage using the RequestSpotFleet -// API because it is a legacy API with no planned investment. For options for -// requesting Spot Instances, see Which is the best Spot request method to use? (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) -// in the Amazon EC2 User Guide. -func (c *Client) RequestSpotFleet(ctx context.Context, params *RequestSpotFleetInput, optFns ...func(*Options)) (*RequestSpotFleetOutput, error) { - if params == nil { - params = &RequestSpotFleetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RequestSpotFleet", params, optFns, c.addOperationRequestSpotFleetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RequestSpotFleetOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for RequestSpotFleet. -type RequestSpotFleetInput struct { - - // The configuration for the Spot Fleet request. - // - // This member is required. - SpotFleetRequestConfig *types.SpotFleetRequestConfigData - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -// Contains the output of RequestSpotFleet. -type RequestSpotFleetOutput struct { - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRequestSpotFleetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRequestSpotFleet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRequestSpotFleet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RequestSpotFleet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRequestSpotFleetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRequestSpotFleet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRequestSpotFleet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RequestSpotFleet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotInstances.go deleted file mode 100644 index 12eddc42b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RequestSpotInstances.go +++ /dev/null @@ -1,222 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates a Spot Instance request. For more information, see Spot Instance -// requests (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html) -// in the Amazon EC2 User Guide for Linux Instances. We strongly discourage using -// the RequestSpotInstances API because it is a legacy API with no planned -// investment. For options for requesting Spot Instances, see Which is the best -// Spot request method to use? (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-best-practices.html#which-spot-request-method-to-use) -// in the Amazon EC2 User Guide for Linux Instances. -func (c *Client) RequestSpotInstances(ctx context.Context, params *RequestSpotInstancesInput, optFns ...func(*Options)) (*RequestSpotInstancesOutput, error) { - if params == nil { - params = &RequestSpotInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RequestSpotInstances", params, optFns, c.addOperationRequestSpotInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RequestSpotInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for RequestSpotInstances. -type RequestSpotInstancesInput struct { - - // The user-specified name for a logical grouping of requests. When you specify an - // Availability Zone group in a Spot Instance request, all Spot Instances in the - // request are launched in the same Availability Zone. Instance proximity is - // maintained with this parameter, but the choice of Availability Zone is not. The - // group applies only to requests for Spot Instances of the same instance type. Any - // additional Spot Instance requests that are specified with the same Availability - // Zone group name are launched in that same Availability Zone, as long as at least - // one instance from the group is still active. If there is no active instance - // running in the Availability Zone group that you specify for a new Spot Instance - // request (all instances are terminated, the request is expired, or the maximum - // price you specified falls below current Spot price), then Amazon EC2 launches - // the instance in any Availability Zone where the constraint can be met. - // Consequently, the subsequent set of Spot Instances could be placed in a - // different zone from the original request, even if you specified the same - // Availability Zone group. Default: Instances are launched in any available - // Availability Zone. - AvailabilityZoneGroup *string - - // Deprecated. - BlockDurationMinutes *int32 - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon EC2 User Guide for Linux Instances. - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of Spot Instances to launch. Default: 1 - InstanceCount *int32 - - // The behavior when a Spot Instance is interrupted. The default is terminate . - InstanceInterruptionBehavior types.InstanceInterruptionBehavior - - // The instance launch group. Launch groups are Spot Instances that launch - // together and terminate together. Default: Instances are launched and terminated - // individually - LaunchGroup *string - - // The launch specification. - LaunchSpecification *types.RequestSpotLaunchSpecification - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - SpotPrice *string - - // The key-value pair for tagging the Spot Instance request on creation. The value - // for ResourceType must be spot-instances-request , otherwise the Spot Instance - // request fails. To tag the Spot Instance request after it has been created, see - // CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html) - // . - TagSpecifications []types.TagSpecification - - // The Spot Instance request type. Default: one-time - Type types.SpotInstanceType - - // The start date of the request. If this is a one-time request, the request - // becomes active at this date and time and remains active until all instances - // launch, the request expires, or the request is canceled. If the request is - // persistent, the request becomes active at this date and time and remains active - // until it expires or is canceled. The specified start date and time cannot be - // equal to the current date and time. You must specify a start date and time that - // occurs after the current date and time. - ValidFrom *time.Time - - // The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). - // - For a persistent request, the request remains active until the ValidUntil - // date and time is reached. Otherwise, the request remains active until you cancel - // it. - // - For a one-time request, the request remains active until all instances - // launch, the request is canceled, or the ValidUntil date and time is reached. - // By default, the request is valid for 7 days from the date the request was - // created. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// Contains the output of RequestSpotInstances. -type RequestSpotInstancesOutput struct { - - // The Spot Instance requests. - SpotInstanceRequests []types.SpotInstanceRequest - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRequestSpotInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRequestSpotInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRequestSpotInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RequestSpotInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRequestSpotInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRequestSpotInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRequestSpotInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RequestSpotInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetAddressAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetAddressAttribute.go deleted file mode 100644 index 76bca3df5..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetAddressAttribute.go +++ /dev/null @@ -1,149 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets the attribute of the specified IP address. For requirements, see Using -// reverse DNS for email applications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS) -// . -func (c *Client) ResetAddressAttribute(ctx context.Context, params *ResetAddressAttributeInput, optFns ...func(*Options)) (*ResetAddressAttributeOutput, error) { - if params == nil { - params = &ResetAddressAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetAddressAttribute", params, optFns, c.addOperationResetAddressAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetAddressAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ResetAddressAttributeInput struct { - - // [EC2-VPC] The allocation ID. - // - // This member is required. - AllocationId *string - - // The attribute of the IP address. - // - // This member is required. - Attribute types.AddressAttributeName - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ResetAddressAttributeOutput struct { - - // Information about the IP address. - Address *types.AddressAttribute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetAddressAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetAddressAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetAddressAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetAddressAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpResetAddressAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetAddressAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetAddressAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetAddressAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go deleted file mode 100644 index 4da15811b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetEbsDefaultKmsKeyId.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets the default KMS key for EBS encryption for your account in this Region -// to the Amazon Web Services managed KMS key for EBS. After resetting the default -// KMS key to the Amazon Web Services managed KMS key, you can continue to encrypt -// by a customer managed KMS key by specifying it when you create the volume. For -// more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) ResetEbsDefaultKmsKeyId(ctx context.Context, params *ResetEbsDefaultKmsKeyIdInput, optFns ...func(*Options)) (*ResetEbsDefaultKmsKeyIdOutput, error) { - if params == nil { - params = &ResetEbsDefaultKmsKeyIdInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetEbsDefaultKmsKeyId", params, optFns, c.addOperationResetEbsDefaultKmsKeyIdMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetEbsDefaultKmsKeyIdOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ResetEbsDefaultKmsKeyIdInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ResetEbsDefaultKmsKeyIdOutput struct { - - // The Amazon Resource Name (ARN) of the default KMS key for EBS encryption by - // default. - KmsKeyId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetEbsDefaultKmsKeyIdMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetEbsDefaultKmsKeyId{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetEbsDefaultKmsKeyId{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetEbsDefaultKmsKeyId"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetEbsDefaultKmsKeyId(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetEbsDefaultKmsKeyId(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetEbsDefaultKmsKeyId", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetFpgaImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetFpgaImageAttribute.go deleted file mode 100644 index cd1e01ffb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetFpgaImageAttribute.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets the specified attribute of the specified Amazon FPGA Image (AFI) to its -// default value. You can only reset the load permission attribute. -func (c *Client) ResetFpgaImageAttribute(ctx context.Context, params *ResetFpgaImageAttributeInput, optFns ...func(*Options)) (*ResetFpgaImageAttributeOutput, error) { - if params == nil { - params = &ResetFpgaImageAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetFpgaImageAttribute", params, optFns, c.addOperationResetFpgaImageAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetFpgaImageAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ResetFpgaImageAttributeInput struct { - - // The ID of the AFI. - // - // This member is required. - FpgaImageId *string - - // The attribute. - Attribute types.ResetFpgaImageAttributeName - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ResetFpgaImageAttributeOutput struct { - - // Is true if the request succeeds, and an error otherwise. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetFpgaImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetFpgaImageAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetFpgaImageAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetFpgaImageAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpResetFpgaImageAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetFpgaImageAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetFpgaImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetFpgaImageAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetImageAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetImageAttribute.go deleted file mode 100644 index 7b4918ffe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetImageAttribute.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets an attribute of an AMI to its default value. -func (c *Client) ResetImageAttribute(ctx context.Context, params *ResetImageAttributeInput, optFns ...func(*Options)) (*ResetImageAttributeOutput, error) { - if params == nil { - params = &ResetImageAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetImageAttribute", params, optFns, c.addOperationResetImageAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetImageAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for ResetImageAttribute. -type ResetImageAttributeInput struct { - - // The attribute to reset (currently you can only reset the launch permission - // attribute). - // - // This member is required. - Attribute types.ResetImageAttributeName - - // The ID of the AMI. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ResetImageAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetImageAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetImageAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetImageAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetImageAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpResetImageAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetImageAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetImageAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetImageAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go deleted file mode 100644 index 6447cd3ae..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetInstanceAttribute.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets an attribute of an instance to its default value. To reset the kernel or -// ramdisk , the instance must be in a stopped state. To reset the sourceDestCheck -// , the instance can be either running or stopped. The sourceDestCheck attribute -// controls whether source/destination checking is enabled. The default value is -// true , which means checking is enabled. This value must be false for a NAT -// instance to perform NAT. For more information, see NAT Instances (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) -// in the Amazon VPC User Guide. -func (c *Client) ResetInstanceAttribute(ctx context.Context, params *ResetInstanceAttributeInput, optFns ...func(*Options)) (*ResetInstanceAttributeOutput, error) { - if params == nil { - params = &ResetInstanceAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetInstanceAttribute", params, optFns, c.addOperationResetInstanceAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetInstanceAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ResetInstanceAttributeInput struct { - - // The attribute to reset. You can only reset the following attributes: kernel | - // ramdisk | sourceDestCheck . - // - // This member is required. - Attribute types.InstanceAttributeName - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ResetInstanceAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetInstanceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetInstanceAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetInstanceAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetInstanceAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpResetInstanceAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetInstanceAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetInstanceAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetInstanceAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetNetworkInterfaceAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetNetworkInterfaceAttribute.go deleted file mode 100644 index c455168d2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetNetworkInterfaceAttribute.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets a network interface attribute. You can specify only one attribute at a -// time. -func (c *Client) ResetNetworkInterfaceAttribute(ctx context.Context, params *ResetNetworkInterfaceAttributeInput, optFns ...func(*Options)) (*ResetNetworkInterfaceAttributeOutput, error) { - if params == nil { - params = &ResetNetworkInterfaceAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetNetworkInterfaceAttribute", params, optFns, c.addOperationResetNetworkInterfaceAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetNetworkInterfaceAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for ResetNetworkInterfaceAttribute. -type ResetNetworkInterfaceAttributeInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The source/destination checking attribute. Resets the value to true . - SourceDestCheck *string - - noSmithyDocumentSerde -} - -type ResetNetworkInterfaceAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetNetworkInterfaceAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetNetworkInterfaceAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetNetworkInterfaceAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetNetworkInterfaceAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpResetNetworkInterfaceAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetNetworkInterfaceAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetNetworkInterfaceAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetNetworkInterfaceAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetSnapshotAttribute.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetSnapshotAttribute.go deleted file mode 100644 index adfce9103..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_ResetSnapshotAttribute.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Resets permission settings for the specified snapshot. For more information -// about modifying snapshot permissions, see Share a snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) ResetSnapshotAttribute(ctx context.Context, params *ResetSnapshotAttributeInput, optFns ...func(*Options)) (*ResetSnapshotAttributeOutput, error) { - if params == nil { - params = &ResetSnapshotAttributeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ResetSnapshotAttribute", params, optFns, c.addOperationResetSnapshotAttributeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ResetSnapshotAttributeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ResetSnapshotAttributeInput struct { - - // The attribute to reset. Currently, only the attribute for permission to create - // volumes can be reset. - // - // This member is required. - Attribute types.SnapshotAttributeName - - // The ID of the snapshot. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type ResetSnapshotAttributeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationResetSnapshotAttributeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpResetSnapshotAttribute{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpResetSnapshotAttribute{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ResetSnapshotAttribute"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpResetSnapshotAttributeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opResetSnapshotAttribute(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opResetSnapshotAttribute(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ResetSnapshotAttribute", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreAddressToClassic.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreAddressToClassic.go deleted file mode 100644 index e3b249fb9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreAddressToClassic.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This action is deprecated. Restores an Elastic IP address that was previously -// moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move -// an Elastic IP address that was originally allocated for use in EC2-VPC. The -// Elastic IP address must not be associated with an instance or network interface. -func (c *Client) RestoreAddressToClassic(ctx context.Context, params *RestoreAddressToClassicInput, optFns ...func(*Options)) (*RestoreAddressToClassicOutput, error) { - if params == nil { - params = &RestoreAddressToClassicInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RestoreAddressToClassic", params, optFns, c.addOperationRestoreAddressToClassicMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RestoreAddressToClassicOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RestoreAddressToClassicInput struct { - - // The Elastic IP address. - // - // This member is required. - PublicIp *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RestoreAddressToClassicOutput struct { - - // The Elastic IP address. - PublicIp *string - - // The move status for the IP address. - Status types.Status - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRestoreAddressToClassicMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreAddressToClassic{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreAddressToClassic{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreAddressToClassic"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRestoreAddressToClassicValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreAddressToClassic(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRestoreAddressToClassic(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RestoreAddressToClassic", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go deleted file mode 100644 index 1599feb88..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreImageFromRecycleBin.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Restores an AMI from the Recycle Bin. For more information, see Recycle Bin (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin.html) -// in the Amazon EC2 User Guide. -func (c *Client) RestoreImageFromRecycleBin(ctx context.Context, params *RestoreImageFromRecycleBinInput, optFns ...func(*Options)) (*RestoreImageFromRecycleBinOutput, error) { - if params == nil { - params = &RestoreImageFromRecycleBinInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RestoreImageFromRecycleBin", params, optFns, c.addOperationRestoreImageFromRecycleBinMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RestoreImageFromRecycleBinOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RestoreImageFromRecycleBinInput struct { - - // The ID of the AMI to restore. - // - // This member is required. - ImageId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RestoreImageFromRecycleBinOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRestoreImageFromRecycleBinMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreImageFromRecycleBin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreImageFromRecycleBin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreImageFromRecycleBin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRestoreImageFromRecycleBinValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreImageFromRecycleBin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRestoreImageFromRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RestoreImageFromRecycleBin", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreManagedPrefixListVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreManagedPrefixListVersion.go deleted file mode 100644 index c86efdb88..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreManagedPrefixListVersion.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Restores the entries from a previous version of a managed prefix list to a new -// version of the prefix list. -func (c *Client) RestoreManagedPrefixListVersion(ctx context.Context, params *RestoreManagedPrefixListVersionInput, optFns ...func(*Options)) (*RestoreManagedPrefixListVersionOutput, error) { - if params == nil { - params = &RestoreManagedPrefixListVersionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RestoreManagedPrefixListVersion", params, optFns, c.addOperationRestoreManagedPrefixListVersionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RestoreManagedPrefixListVersionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RestoreManagedPrefixListVersionInput struct { - - // The current version number for the prefix list. - // - // This member is required. - CurrentVersion *int64 - - // The ID of the prefix list. - // - // This member is required. - PrefixListId *string - - // The version to restore. - // - // This member is required. - PreviousVersion *int64 - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RestoreManagedPrefixListVersionOutput struct { - - // Information about the prefix list. - PrefixList *types.ManagedPrefixList - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRestoreManagedPrefixListVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreManagedPrefixListVersion{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreManagedPrefixListVersion{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreManagedPrefixListVersion"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRestoreManagedPrefixListVersionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreManagedPrefixListVersion(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRestoreManagedPrefixListVersion(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RestoreManagedPrefixListVersion", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go deleted file mode 100644 index 52cd456f2..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreSnapshotFromRecycleBin.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Restores a snapshot from the Recycle Bin. For more information, see Restore -// snapshots from the Recycle Bin (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recycle-bin-working-with-snaps.html#recycle-bin-restore-snaps) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) RestoreSnapshotFromRecycleBin(ctx context.Context, params *RestoreSnapshotFromRecycleBinInput, optFns ...func(*Options)) (*RestoreSnapshotFromRecycleBinOutput, error) { - if params == nil { - params = &RestoreSnapshotFromRecycleBinInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RestoreSnapshotFromRecycleBin", params, optFns, c.addOperationRestoreSnapshotFromRecycleBinMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RestoreSnapshotFromRecycleBinOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RestoreSnapshotFromRecycleBinInput struct { - - // The ID of the snapshot to restore. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type RestoreSnapshotFromRecycleBinOutput struct { - - // The description for the snapshot. - Description *string - - // Indicates whether the snapshot is encrypted. - Encrypted *bool - - // The ARN of the Outpost on which the snapshot is stored. For more information, - // see Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) - // in the Amazon Elastic Compute Cloud User Guide. - OutpostArn *string - - // The ID of the Amazon Web Services account that owns the EBS snapshot. - OwnerId *string - - // The progress of the snapshot, as a percentage. - Progress *string - - // The ID of the snapshot. - SnapshotId *string - - // Reserved for future use. - SseType types.SSEType - - // The time stamp when the snapshot was initiated. - StartTime *time.Time - - // The state of the snapshot. - State types.SnapshotState - - // The ID of the volume that was used to create the snapshot. - VolumeId *string - - // The size of the volume, in GiB. - VolumeSize *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRestoreSnapshotFromRecycleBinMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreSnapshotFromRecycleBin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreSnapshotFromRecycleBin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRestoreSnapshotFromRecycleBinValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreSnapshotFromRecycleBin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRestoreSnapshotFromRecycleBin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RestoreSnapshotFromRecycleBin", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreSnapshotTier.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreSnapshotTier.go deleted file mode 100644 index f26fbf5bc..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RestoreSnapshotTier.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Restores an archived Amazon EBS snapshot for use temporarily or permanently, or -// modifies the restore period or restore type for a snapshot that was previously -// temporarily restored. For more information see Restore an archived snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-snapshot-archiving.html#restore-archived-snapshot) -// and modify the restore period or restore type for a temporarily restored -// snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/working-with-snapshot-archiving.html#modify-temp-restore-period) -// in the Amazon Elastic Compute Cloud User Guide. -func (c *Client) RestoreSnapshotTier(ctx context.Context, params *RestoreSnapshotTierInput, optFns ...func(*Options)) (*RestoreSnapshotTierOutput, error) { - if params == nil { - params = &RestoreSnapshotTierInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RestoreSnapshotTier", params, optFns, c.addOperationRestoreSnapshotTierMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RestoreSnapshotTierOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RestoreSnapshotTierInput struct { - - // The ID of the snapshot to restore. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether to permanently restore an archived snapshot. To permanently - // restore an archived snapshot, specify true and omit the - // RestoreSnapshotTierRequest$TemporaryRestoreDays parameter. - PermanentRestore *bool - - // Specifies the number of days for which to temporarily restore an archived - // snapshot. Required for temporary restores only. The snapshot will be - // automatically re-archived after this period. To temporarily restore an archived - // snapshot, specify the number of days and omit the PermanentRestore parameter or - // set it to false . - TemporaryRestoreDays *int32 - - noSmithyDocumentSerde -} - -type RestoreSnapshotTierOutput struct { - - // Indicates whether the snapshot is permanently restored. true indicates a - // permanent restore. false indicates a temporary restore. - IsPermanentRestore *bool - - // For temporary restores only. The number of days for which the archived snapshot - // is temporarily restored. - RestoreDuration *int32 - - // The date and time when the snapshot restore process started. - RestoreStartTime *time.Time - - // The ID of the snapshot. - SnapshotId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRestoreSnapshotTierMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRestoreSnapshotTier{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRestoreSnapshotTier{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreSnapshotTier"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRestoreSnapshotTierValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreSnapshotTier(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRestoreSnapshotTier(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RestoreSnapshotTier", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeClientVpnIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeClientVpnIngress.go deleted file mode 100644 index d4abd0ad9..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeClientVpnIngress.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes an ingress authorization rule from a Client VPN endpoint. -func (c *Client) RevokeClientVpnIngress(ctx context.Context, params *RevokeClientVpnIngressInput, optFns ...func(*Options)) (*RevokeClientVpnIngressOutput, error) { - if params == nil { - params = &RevokeClientVpnIngressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RevokeClientVpnIngress", params, optFns, c.addOperationRevokeClientVpnIngressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RevokeClientVpnIngressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RevokeClientVpnIngressInput struct { - - // The ID of the Client VPN endpoint with which the authorization rule is - // associated. - // - // This member is required. - ClientVpnEndpointId *string - - // The IPv4 address range, in CIDR notation, of the network for which access is - // being removed. - // - // This member is required. - TargetNetworkCidr *string - - // The ID of the Active Directory group for which to revoke access. - AccessGroupId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether access should be revoked for all clients. - RevokeAllGroups *bool - - noSmithyDocumentSerde -} - -type RevokeClientVpnIngressOutput struct { - - // The current state of the authorization rule. - Status *types.ClientVpnAuthorizationRuleStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRevokeClientVpnIngressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRevokeClientVpnIngress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRevokeClientVpnIngress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RevokeClientVpnIngress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRevokeClientVpnIngressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeClientVpnIngress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRevokeClientVpnIngress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RevokeClientVpnIngress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupEgress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupEgress.go deleted file mode 100644 index 90ef8696a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupEgress.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes the specified outbound (egress) rules from the specified security -// group. You can specify rules using either rule IDs or security group rule -// properties. If you use rule properties, the values that you specify (for -// example, ports) must match the existing rule's values exactly. Each rule has a -// protocol, from and to ports, and destination (CIDR range, security group, or -// prefix list). For the TCP and UDP protocols, you must also specify the -// destination port or range of ports. For the ICMP protocol, you must also specify -// the ICMP type and code. If the security group rule has a description, you do not -// need to specify the description to revoke the rule. For a default VPC, if the -// values you specify do not match the existing rule's values, no error is -// returned, and the output describes the security group rules that were not -// revoked. Amazon Web Services recommends that you describe the security group to -// verify that the rules were removed. Rule changes are propagated to instances -// within the security group as quickly as possible. However, a small delay might -// occur. -func (c *Client) RevokeSecurityGroupEgress(ctx context.Context, params *RevokeSecurityGroupEgressInput, optFns ...func(*Options)) (*RevokeSecurityGroupEgressOutput, error) { - if params == nil { - params = &RevokeSecurityGroupEgressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RevokeSecurityGroupEgress", params, optFns, c.addOperationRevokeSecurityGroupEgressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RevokeSecurityGroupEgressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RevokeSecurityGroupEgressInput struct { - - // The ID of the security group. - // - // This member is required. - GroupId *string - - // Not supported. Use a set of IP permissions to specify the CIDR. - CidrIp *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Not supported. Use a set of IP permissions to specify the port. - FromPort *int32 - - // The sets of IP permissions. You can't specify a destination security group and - // a CIDR IP address range in the same set of permissions. - IpPermissions []types.IpPermission - - // Not supported. Use a set of IP permissions to specify the protocol name or - // number. - IpProtocol *string - - // The IDs of the security group rules. - SecurityGroupRuleIds []string - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupName *string - - // Not supported. Use a set of IP permissions to specify a destination security - // group. - SourceSecurityGroupOwnerId *string - - // Not supported. Use a set of IP permissions to specify the port. - ToPort *int32 - - noSmithyDocumentSerde -} - -type RevokeSecurityGroupEgressOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // The outbound rules that were unknown to the service. In some cases, - // unknownIpPermissionSet might be in a different format from the request parameter. - UnknownIpPermissions []types.IpPermission - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRevokeSecurityGroupEgressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRevokeSecurityGroupEgress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRevokeSecurityGroupEgress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RevokeSecurityGroupEgress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpRevokeSecurityGroupEgressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeSecurityGroupEgress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRevokeSecurityGroupEgress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RevokeSecurityGroupEgress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupIngress.go deleted file mode 100644 index 25ce86a70..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RevokeSecurityGroupIngress.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes the specified inbound (ingress) rules from a security group. You can -// specify rules using either rule IDs or security group rule properties. If you -// use rule properties, the values that you specify (for example, ports) must match -// the existing rule's values exactly. Each rule has a protocol, from and to ports, -// and source (CIDR range, security group, or prefix list). For the TCP and UDP -// protocols, you must also specify the destination port or range of ports. For the -// ICMP protocol, you must also specify the ICMP type and code. If the security -// group rule has a description, you do not need to specify the description to -// revoke the rule. For a default VPC, if the values you specify do not match the -// existing rule's values, no error is returned, and the output describes the -// security group rules that were not revoked. For a non-default VPC, if the values -// you specify do not match the existing rule's values, an -// InvalidPermission.NotFound client error is returned, and no rules are revoked. -// Amazon Web Services recommends that you describe the security group to verify -// that the rules were removed. Rule changes are propagated to instances within the -// security group as quickly as possible. However, a small delay might occur. -func (c *Client) RevokeSecurityGroupIngress(ctx context.Context, params *RevokeSecurityGroupIngressInput, optFns ...func(*Options)) (*RevokeSecurityGroupIngressOutput, error) { - if params == nil { - params = &RevokeSecurityGroupIngressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RevokeSecurityGroupIngress", params, optFns, c.addOperationRevokeSecurityGroupIngressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RevokeSecurityGroupIngressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RevokeSecurityGroupIngressInput struct { - - // The CIDR IP address range. You can't specify this parameter when specifying a - // source security group. - CidrIp *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // If the protocol is TCP or UDP, this is the start of the port range. If the - // protocol is ICMP, this is the type number. A value of -1 indicates all ICMP - // types. - FromPort *int32 - - // The ID of the security group. - GroupId *string - - // [Default VPC] The name of the security group. You must specify either the - // security group ID or the security group name in the request. For security groups - // in a nondefault VPC, you must specify the security group ID. - GroupName *string - - // The sets of IP permissions. You can't specify a source security group and a - // CIDR IP address range in the same set of permissions. - IpPermissions []types.IpPermission - - // The IP protocol name ( tcp , udp , icmp ) or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // ). Use -1 to specify all. - IpProtocol *string - - // The IDs of the security group rules. - SecurityGroupRuleIds []string - - // [Default VPC] The name of the source security group. You can't specify this - // parameter in combination with the following parameters: the CIDR IP address - // range, the start of the port range, the IP protocol, and the end of the port - // range. The source security group must be in the same VPC. To revoke a specific - // rule for an IP protocol and port range, use a set of IP permissions instead. - SourceSecurityGroupName *string - - // Not supported. - SourceSecurityGroupOwnerId *string - - // If the protocol is TCP or UDP, this is the end of the port range. If the - // protocol is ICMP, this is the code. A value of -1 indicates all ICMP codes. - ToPort *int32 - - noSmithyDocumentSerde -} - -type RevokeSecurityGroupIngressOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // The inbound rules that were unknown to the service. In some cases, - // unknownIpPermissionSet might be in a different format from the request parameter. - UnknownIpPermissions []types.IpPermission - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRevokeSecurityGroupIngressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRevokeSecurityGroupIngress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRevokeSecurityGroupIngress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RevokeSecurityGroupIngress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeSecurityGroupIngress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRevokeSecurityGroupIngress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RevokeSecurityGroupIngress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go deleted file mode 100644 index fe423d7e6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunInstances.go +++ /dev/null @@ -1,475 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Launches the specified number of instances using an AMI for which you have -// permissions. You can specify a number of options, or leave the default options. -// The following rules apply: -// - If you don't specify a subnet ID, we choose a default subnet from your -// default VPC for you. If you don't have a default VPC, you must specify a subnet -// ID in the request. -// - All instances have a network interface with a primary private IPv4 address. -// If you don't specify this address, we choose one from the IPv4 range of your -// subnet. -// - Not all instance types support IPv6 addresses. For more information, see -// Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) -// . -// - If you don't specify a security group ID, we use the default security -// group. For more information, see Security groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) -// . -// - If any of the AMIs have a product code attached for which the user has not -// subscribed, the request fails. -// -// You can create a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) -// , which is a resource that contains the parameters to launch an instance. When -// you launch an instance using RunInstances , you can specify the launch template -// instead of specifying the launch parameters. To ensure faster instance launches, -// break up large requests into smaller batches. For example, create five separate -// launch requests for 100 instances each instead of one launch request for 500 -// instances. An instance is ready for you to use when it's in the running state. -// You can check the state of your instance using DescribeInstances . You can tag -// instances and EBS volumes during launch, after launch, or both. For more -// information, see CreateTags and Tagging your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) -// . Linux instances have access to the public key of the key pair at boot. You can -// use this key to provide secure access to the instance. Amazon EC2 public images -// use this feature to provide secure access without passwords. For more -// information, see Key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// . For troubleshooting, see What to do if an instance immediately terminates (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html) -// , and Troubleshooting connecting to your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html) -// . -func (c *Client) RunInstances(ctx context.Context, params *RunInstancesInput, optFns ...func(*Options)) (*RunInstancesOutput, error) { - if params == nil { - params = &RunInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RunInstances", params, optFns, c.addOperationRunInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RunInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RunInstancesInput struct { - - // The maximum number of instances to launch. If you specify more instances than - // Amazon EC2 can launch in the target Availability Zone, Amazon EC2 launches the - // largest possible number of instances above MinCount . Constraints: Between 1 and - // the maximum number you're allowed for the specified instance type. For more - // information about the default limits, and how to request an increase, see How - // many instances can I run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) - // in the Amazon EC2 FAQ. - // - // This member is required. - MaxCount *int32 - - // The minimum number of instances to launch. If you specify a minimum that is - // more instances than Amazon EC2 can launch in the target Availability Zone, - // Amazon EC2 launches no instances. Constraints: Between 1 and the maximum number - // you're allowed for the specified instance type. For more information about the - // default limits, and how to request an increase, see How many instances can I - // run in Amazon EC2 (http://aws.amazon.com/ec2/faqs/#How_many_instances_can_I_run_in_Amazon_EC2) - // in the Amazon EC2 General FAQ. - // - // This member is required. - MinCount *int32 - - // Reserved. - AdditionalInfo *string - - // The block device mapping, which defines the EBS volumes and instance store - // volumes to attach to the instance at launch. For more information, see Block - // device mappings (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html) - // in the Amazon EC2 User Guide. - BlockDeviceMappings []types.BlockDeviceMapping - - // Information about the Capacity Reservation targeting option. If you do not - // specify this parameter, the instance's Capacity Reservation preference defaults - // to open , which enables it to run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - CapacityReservationSpecification *types.CapacityReservationSpecification - - // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. If you do not specify a client token, a randomly generated token is - // used for the request to ensure idempotency. For more information, see Ensuring - // Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraints: Maximum 64 ASCII characters - ClientToken *string - - // The CPU options for the instance. For more information, see Optimize CPU options (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon EC2 User Guide. - CpuOptions *types.CpuOptionsRequest - - // The credit option for CPU usage of the burstable performance instance. Valid - // values are standard and unlimited . To change this attribute after launch, use - // ModifyInstanceCreditSpecification (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html) - // . For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) - // in the Amazon EC2 User Guide. Default: standard (T2 instances) or unlimited - // (T3/T3a/T4g instances) For T3 instances with host tenancy, only standard is - // supported. - CreditSpecification *types.CreditSpecificationRequest - - // Indicates whether an instance is enabled for stop protection. For more - // information, see Stop protection (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection) - // . - DisableApiStop *bool - - // If you set this parameter to true , you can't terminate the instance using the - // Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute - // after launch, use ModifyInstanceAttribute (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html) - // . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you - // can terminate the instance by running the shutdown command from the instance. - // Default: false - DisableApiTermination *bool - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Indicates whether the instance is optimized for Amazon EBS I/O. This - // optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal Amazon EBS I/O performance. This - // optimization isn't available with all instance types. Additional usage charges - // apply when using an EBS-optimized instance. Default: false - EbsOptimized *bool - - // Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. For - // workloads that require graphics acceleration, we recommend that you use Amazon - // EC2 G4ad, G4dn, or G5 instances. - ElasticGpuSpecification []types.ElasticGpuSpecification - - // An elastic inference accelerator to associate with the instance. Elastic - // inference accelerators are a resource you can attach to your Amazon EC2 - // instances to accelerate your Deep Learning (DL) inference workloads. You cannot - // specify accelerators from different generations in the same request. Starting - // April 15, 2023, Amazon Web Services will not onboard new customers to Amazon - // Elastic Inference (EI), and will help current customers migrate their workloads - // to options that offer better price and performance. After April 15, 2023, new - // customers will not be able to launch instances with Amazon EI accelerators in - // Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used - // Amazon EI at least once during the past 30-day period are considered current - // customers and will be able to continue using the service. - ElasticInferenceAccelerators []types.ElasticInferenceAccelerator - - // If you’re launching an instance into a dual-stack or IPv6-only subnet, you can - // enable assigning a primary IPv6 address. A primary IPv6 address is an IPv6 GUA - // address associated with an ENI that you have enabled to use a primary IPv6 - // address. Use this option if an instance relies on its IPv6 address not changing. - // When you launch the instance, Amazon Web Services will automatically assign an - // IPv6 address associated with the ENI attached to your instance to be the primary - // IPv6 address. Once you enable an IPv6 GUA address to be a primary IPv6, you - // cannot disable it. When you enable an IPv6 GUA address to be a primary IPv6, the - // first IPv6 GUA will be made the primary IPv6 address until the instance is - // terminated or the network interface is detached. If you have multiple IPv6 - // addresses associated with an ENI attached to your instance and you enable a - // primary IPv6 address, the first IPv6 GUA address associated with the ENI becomes - // the primary IPv6 address. - EnablePrimaryIpv6 *bool - - // Indicates whether the instance is enabled for Amazon Web Services Nitro - // Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) - // in the Amazon Web Services Nitro Enclaves User Guide. You can't enable Amazon - // Web Services Nitro Enclaves and hibernation on the same instance. - EnclaveOptions *types.EnclaveOptionsRequest - - // Indicates whether an instance is enabled for hibernation. This parameter is - // valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html) - // . For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon EC2 User Guide. You can't enable hibernation and Amazon Web - // Services Nitro Enclaves on the same instance. - HibernationOptions *types.HibernationOptionsRequest - - // The name or Amazon Resource Name (ARN) of an IAM instance profile. - IamInstanceProfile *types.IamInstanceProfileSpecification - - // The ID of the AMI. An AMI ID is required to launch an instance and must be - // specified here or in a launch template. - ImageId *string - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - // Default: stop - InstanceInitiatedShutdownBehavior types.ShutdownBehavior - - // The market (purchasing) option for the instances. For RunInstances , persistent - // Spot Instance requests are only supported when InstanceInterruptionBehavior is - // set to either hibernate or stop . - InstanceMarketOptions *types.InstanceMarketOptionsRequest - - // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - InstanceType types.InstanceType - - // The number of IPv6 addresses to associate with the primary network interface. - // Amazon EC2 chooses the IPv6 addresses from the range of your subnet. You cannot - // specify this option and the option to assign specific IPv6 addresses in the same - // request. You can specify this option if you've specified a minimum number of - // instances to launch. You cannot specify this option and the network interfaces - // option in the same request. - Ipv6AddressCount *int32 - - // The IPv6 addresses from the range of the subnet to associate with the primary - // network interface. You cannot specify this option and the option to assign a - // number of IPv6 addresses in the same request. You cannot specify this option if - // you've specified a minimum number of instances to launch. You cannot specify - // this option and the network interfaces option in the same request. - Ipv6Addresses []types.InstanceIpv6Address - - // The ID of the kernel. We recommend that you use PV-GRUB instead of kernels and - // RAM disks. For more information, see PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon EC2 User Guide. - KernelId *string - - // The name of the key pair. You can create a key pair using CreateKeyPair (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html) - // or ImportKeyPair (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html) - // . If you do not specify a key pair, you can't connect to the instance unless you - // choose an AMI that is configured to allow users another way to log in. - KeyName *string - - // The launch template to use to launch the instances. Any parameters that you - // specify in RunInstances override the same parameters in the launch template. - // You can specify either the name or ID of a launch template, but not both. - LaunchTemplate *types.LaunchTemplateSpecification - - // The license configurations. - LicenseSpecifications []types.LicenseConfigurationRequest - - // The maintenance and recovery options for the instance. - MaintenanceOptions *types.InstanceMaintenanceOptionsRequest - - // The metadata options for the instance. For more information, see Instance - // metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // . - MetadataOptions *types.InstanceMetadataOptionsRequest - - // Specifies whether detailed monitoring is enabled for the instance. - Monitoring *types.RunInstancesMonitoringEnabled - - // The network interfaces to associate with the instance. If you specify a network - // interface, you must specify any security groups and subnets as part of the - // network interface. - NetworkInterfaces []types.InstanceNetworkInterfaceSpecification - - // The placement for the instance. - Placement *types.Placement - - // The options for the instance hostname. The default values are inherited from - // the subnet. Applies only if creating a network interface, not attaching an - // existing one. - PrivateDnsNameOptions *types.PrivateDnsNameOptionsRequest - - // The primary IPv4 address. You must specify a value from the IPv4 address range - // of the subnet. Only one private IP address can be designated as primary. You - // can't specify this option if you've specified the option to designate a private - // IP address as the primary IP address in a network interface specification. You - // cannot specify this option if you're launching more than one instance in the - // request. You cannot specify this option and the network interfaces option in the - // same request. - PrivateIpAddress *string - - // The ID of the RAM disk to select. Some kernels require additional drivers at - // launch. Check the kernel requirements for information about whether you need to - // specify a RAM disk. To find kernel requirements, go to the Amazon Web Services - // Resource Center and search for the kernel ID. We recommend that you use PV-GRUB - // instead of kernels and RAM disks. For more information, see PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon EC2 User Guide. - RamdiskId *string - - // The IDs of the security groups. You can create a security group using - // CreateSecurityGroup (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html) - // . If you specify a network interface, you must specify any security groups as - // part of the network interface. - SecurityGroupIds []string - - // [Default VPC] The names of the security groups. If you specify a network - // interface, you must specify any security groups as part of the network - // interface. Default: Amazon EC2 uses the default security group. - SecurityGroups []string - - // The ID of the subnet to launch the instance into. If you specify a network - // interface, you must specify any subnets as part of the network interface. - SubnetId *string - - // The tags to apply to the resources that are created during instance launch. You - // can specify tags for the following resources only: - // - Instances - // - Volumes - // - Spot Instance requests - // - Network interfaces - // To tag a resource after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html) - // . - TagSpecifications []types.TagSpecification - - // The user data script to make available to the instance. For more information, - // see Run commands on your Linux instance at launch (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) - // and Run commands on your Windows instance at launch (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html) - // . If you are using a command line tool, base64-encoding is performed for you, - // and you can load the text from a file. Otherwise, you must provide - // base64-encoded text. User data is limited to 16 KB. - UserData *string - - noSmithyDocumentSerde -} - -// Describes a launch request for one or more instances, and includes owner, -// requester, and security group information that applies to all instances in the -// launch request. -type RunInstancesOutput struct { - - // Not supported. - Groups []types.GroupIdentifier - - // The instances. - Instances []types.Instance - - // The ID of the Amazon Web Services account that owns the reservation. - OwnerId *string - - // The ID of the requester that launched the instances on your behalf (for - // example, Amazon Web Services Management Console or Auto Scaling). - RequesterId *string - - // The ID of the reservation. - ReservationId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRunInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRunInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRunInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RunInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opRunInstancesMiddleware(stack, options); err != nil { - return err - } - if err = addOpRunInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRunInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpRunInstances struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpRunInstances) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpRunInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*RunInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *RunInstancesInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opRunInstancesMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpRunInstances{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opRunInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RunInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunScheduledInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunScheduledInstances.go deleted file mode 100644 index e443205fe..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_RunScheduledInstances.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Launches the specified Scheduled Instances. Before you can launch a Scheduled -// Instance, you must purchase it and obtain an identifier using -// PurchaseScheduledInstances . You must launch a Scheduled Instance during its -// scheduled time period. You can't stop or reboot a Scheduled Instance, but you -// can terminate it as needed. If you terminate a Scheduled Instance before the -// current scheduled time period ends, you can launch it again after a few minutes. -// For more information, see Scheduled Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html) -// in the Amazon EC2 User Guide. -func (c *Client) RunScheduledInstances(ctx context.Context, params *RunScheduledInstancesInput, optFns ...func(*Options)) (*RunScheduledInstancesOutput, error) { - if params == nil { - params = &RunScheduledInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RunScheduledInstances", params, optFns, c.addOperationRunScheduledInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RunScheduledInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for RunScheduledInstances. -type RunScheduledInstancesInput struct { - - // The launch specification. You must match the instance type, Availability Zone, - // network, and platform of the schedule that you purchased. - // - // This member is required. - LaunchSpecification *types.ScheduledInstancesLaunchSpecification - - // The Scheduled Instance ID. - // - // This member is required. - ScheduledInstanceId *string - - // Unique, case-sensitive identifier that ensures the idempotency of the request. - // For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The number of instances. Default: 1 - InstanceCount *int32 - - noSmithyDocumentSerde -} - -// Contains the output of RunScheduledInstances. -type RunScheduledInstancesOutput struct { - - // The IDs of the newly launched instances. - InstanceIdSet []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRunScheduledInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpRunScheduledInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpRunScheduledInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RunScheduledInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opRunScheduledInstancesMiddleware(stack, options); err != nil { - return err - } - if err = addOpRunScheduledInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRunScheduledInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpRunScheduledInstances struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpRunScheduledInstances) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpRunScheduledInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*RunScheduledInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *RunScheduledInstancesInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opRunScheduledInstancesMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpRunScheduledInstances{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opRunScheduledInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RunScheduledInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchLocalGatewayRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchLocalGatewayRoutes.go deleted file mode 100644 index 5602f886c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchLocalGatewayRoutes.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Searches for routes in the specified local gateway route table. -func (c *Client) SearchLocalGatewayRoutes(ctx context.Context, params *SearchLocalGatewayRoutesInput, optFns ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error) { - if params == nil { - params = &SearchLocalGatewayRoutesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "SearchLocalGatewayRoutes", params, optFns, c.addOperationSearchLocalGatewayRoutesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*SearchLocalGatewayRoutesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type SearchLocalGatewayRoutesInput struct { - - // The ID of the local gateway route table. - // - // This member is required. - LocalGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. - // - prefix-list-id - The ID of the prefix list. - // - route-search.exact-match - The exact match of the specified filter. - // - route-search.longest-prefix-match - The longest prefix that matches the - // route. - // - route-search.subnet-of-match - The routes with a subnet that match the - // specified CIDR filter. - // - route-search.supernet-of-match - The routes with a CIDR that encompass the - // CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your - // route table and you specify supernet-of-match as 10.0.1.0/30, then the result - // returns 10.0.1.0/29. - // - state - The state of the route. - // - type - The route type. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type SearchLocalGatewayRoutesOutput struct { - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Information about the routes. - Routes []types.LocalGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationSearchLocalGatewayRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpSearchLocalGatewayRoutes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpSearchLocalGatewayRoutes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "SearchLocalGatewayRoutes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpSearchLocalGatewayRoutesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchLocalGatewayRoutes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// SearchLocalGatewayRoutesAPIClient is a client that implements the -// SearchLocalGatewayRoutes operation. -type SearchLocalGatewayRoutesAPIClient interface { - SearchLocalGatewayRoutes(context.Context, *SearchLocalGatewayRoutesInput, ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error) -} - -var _ SearchLocalGatewayRoutesAPIClient = (*Client)(nil) - -// SearchLocalGatewayRoutesPaginatorOptions is the paginator options for -// SearchLocalGatewayRoutes -type SearchLocalGatewayRoutesPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// SearchLocalGatewayRoutesPaginator is a paginator for SearchLocalGatewayRoutes -type SearchLocalGatewayRoutesPaginator struct { - options SearchLocalGatewayRoutesPaginatorOptions - client SearchLocalGatewayRoutesAPIClient - params *SearchLocalGatewayRoutesInput - nextToken *string - firstPage bool -} - -// NewSearchLocalGatewayRoutesPaginator returns a new -// SearchLocalGatewayRoutesPaginator -func NewSearchLocalGatewayRoutesPaginator(client SearchLocalGatewayRoutesAPIClient, params *SearchLocalGatewayRoutesInput, optFns ...func(*SearchLocalGatewayRoutesPaginatorOptions)) *SearchLocalGatewayRoutesPaginator { - if params == nil { - params = &SearchLocalGatewayRoutesInput{} - } - - options := SearchLocalGatewayRoutesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &SearchLocalGatewayRoutesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *SearchLocalGatewayRoutesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next SearchLocalGatewayRoutes page. -func (p *SearchLocalGatewayRoutesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchLocalGatewayRoutesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.SearchLocalGatewayRoutes(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opSearchLocalGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "SearchLocalGatewayRoutes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go deleted file mode 100644 index 1fbad212b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayMulticastGroups.go +++ /dev/null @@ -1,263 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Searches one or more transit gateway multicast groups and returns the group -// membership information. -func (c *Client) SearchTransitGatewayMulticastGroups(ctx context.Context, params *SearchTransitGatewayMulticastGroupsInput, optFns ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error) { - if params == nil { - params = &SearchTransitGatewayMulticastGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "SearchTransitGatewayMulticastGroups", params, optFns, c.addOperationSearchTransitGatewayMulticastGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*SearchTransitGatewayMulticastGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type SearchTransitGatewayMulticastGroupsInput struct { - - // The ID of the transit gateway multicast domain. - // - // This member is required. - TransitGatewayMulticastDomainId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // One or more filters. The possible values are: - // - group-ip-address - The IP address of the transit gateway multicast group. - // - is-group-member - The resource is a group member. Valid values are true | - // false . - // - is-group-source - The resource is a group source. Valid values are true | - // false . - // - member-type - The member type. Valid values are igmp | static . - // - resource-id - The ID of the resource. - // - resource-type - The type of resource. Valid values are vpc | vpn | - // direct-connect-gateway | tgw-peering . - // - source-type - The source type. Valid values are igmp | static . - // - subnet-id - The ID of the subnet. - // - transit-gateway-attachment-id - The id of the transit gateway attachment. - Filters []types.Filter - - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - MaxResults *int32 - - // The token for the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type SearchTransitGatewayMulticastGroupsOutput struct { - - // Information about the transit gateway multicast group. - MulticastGroups []types.TransitGatewayMulticastGroup - - // The token to use to retrieve the next page of results. This value is null when - // there are no more results to return. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationSearchTransitGatewayMulticastGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpSearchTransitGatewayMulticastGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "SearchTransitGatewayMulticastGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpSearchTransitGatewayMulticastGroupsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchTransitGatewayMulticastGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -// SearchTransitGatewayMulticastGroupsAPIClient is a client that implements the -// SearchTransitGatewayMulticastGroups operation. -type SearchTransitGatewayMulticastGroupsAPIClient interface { - SearchTransitGatewayMulticastGroups(context.Context, *SearchTransitGatewayMulticastGroupsInput, ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error) -} - -var _ SearchTransitGatewayMulticastGroupsAPIClient = (*Client)(nil) - -// SearchTransitGatewayMulticastGroupsPaginatorOptions is the paginator options -// for SearchTransitGatewayMulticastGroups -type SearchTransitGatewayMulticastGroupsPaginatorOptions struct { - // The maximum number of results to return with a single call. To retrieve the - // remaining results, make another call with the returned nextToken value. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// SearchTransitGatewayMulticastGroupsPaginator is a paginator for -// SearchTransitGatewayMulticastGroups -type SearchTransitGatewayMulticastGroupsPaginator struct { - options SearchTransitGatewayMulticastGroupsPaginatorOptions - client SearchTransitGatewayMulticastGroupsAPIClient - params *SearchTransitGatewayMulticastGroupsInput - nextToken *string - firstPage bool -} - -// NewSearchTransitGatewayMulticastGroupsPaginator returns a new -// SearchTransitGatewayMulticastGroupsPaginator -func NewSearchTransitGatewayMulticastGroupsPaginator(client SearchTransitGatewayMulticastGroupsAPIClient, params *SearchTransitGatewayMulticastGroupsInput, optFns ...func(*SearchTransitGatewayMulticastGroupsPaginatorOptions)) *SearchTransitGatewayMulticastGroupsPaginator { - if params == nil { - params = &SearchTransitGatewayMulticastGroupsInput{} - } - - options := SearchTransitGatewayMulticastGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &SearchTransitGatewayMulticastGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *SearchTransitGatewayMulticastGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next SearchTransitGatewayMulticastGroups page. -func (p *SearchTransitGatewayMulticastGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchTransitGatewayMulticastGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - result, err := p.client.SearchTransitGatewayMulticastGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -func newServiceMetadataMiddleware_opSearchTransitGatewayMulticastGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "SearchTransitGatewayMulticastGroups", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayRoutes.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayRoutes.go deleted file mode 100644 index 486961974..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SearchTransitGatewayRoutes.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Searches for routes in the specified transit gateway route table. -func (c *Client) SearchTransitGatewayRoutes(ctx context.Context, params *SearchTransitGatewayRoutesInput, optFns ...func(*Options)) (*SearchTransitGatewayRoutesOutput, error) { - if params == nil { - params = &SearchTransitGatewayRoutesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "SearchTransitGatewayRoutes", params, optFns, c.addOperationSearchTransitGatewayRoutesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*SearchTransitGatewayRoutesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type SearchTransitGatewayRoutesInput struct { - - // One or more filters. The possible values are: - // - attachment.transit-gateway-attachment-id - The id of the transit gateway - // attachment. - // - attachment.resource-id - The resource id of the transit gateway attachment. - // - attachment.resource-type - The attachment resource type. Valid values are - // vpc | vpn | direct-connect-gateway | peering | connect . - // - prefix-list-id - The ID of the prefix list. - // - route-search.exact-match - The exact match of the specified filter. - // - route-search.longest-prefix-match - The longest prefix that matches the - // route. - // - route-search.subnet-of-match - The routes with a subnet that match the - // specified CIDR filter. - // - route-search.supernet-of-match - The routes with a CIDR that encompass the - // CIDR filter. For example, if you have 10.0.1.0/29 and 10.0.1.0/31 routes in your - // route table and you specify supernet-of-match as 10.0.1.0/30, then the result - // returns 10.0.1.0/29. - // - state - The state of the route ( active | blackhole ). - // - type - The type of route ( propagated | static ). - // - // This member is required. - Filters []types.Filter - - // The ID of the transit gateway route table. - // - // This member is required. - TransitGatewayRouteTableId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum number of routes to return. - MaxResults *int32 - - noSmithyDocumentSerde -} - -type SearchTransitGatewayRoutesOutput struct { - - // Indicates whether there are additional routes available. - AdditionalRoutesAvailable *bool - - // Information about the routes. - Routes []types.TransitGatewayRoute - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationSearchTransitGatewayRoutesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpSearchTransitGatewayRoutes{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpSearchTransitGatewayRoutes{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "SearchTransitGatewayRoutes"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpSearchTransitGatewayRoutesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSearchTransitGatewayRoutes(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opSearchTransitGatewayRoutes(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "SearchTransitGatewayRoutes", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go deleted file mode 100644 index 9f168623d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_SendDiagnosticInterrupt.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Sends a diagnostic interrupt to the specified Amazon EC2 instance to trigger a -// kernel panic (on Linux instances), or a blue screen/stop error (on Windows -// instances). For instances based on Intel and AMD processors, the interrupt is -// received as a non-maskable interrupt (NMI). In general, the operating system -// crashes and reboots when a kernel panic or stop error is triggered. The -// operating system can also be configured to perform diagnostic tasks, such as -// generating a memory dump file, loading a secondary kernel, or obtaining a call -// trace. Before sending a diagnostic interrupt to your instance, ensure that its -// operating system is configured to perform the required diagnostic tasks. For -// more information about configuring your operating system to generate a crash -// dump when a kernel panic or stop error occurs, see Send a diagnostic interrupt -// (for advanced users) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/diagnostic-interrupt.html) -// (Linux instances) or Send a diagnostic interrupt (for advanced users) (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/diagnostic-interrupt.html) -// (Windows instances). -func (c *Client) SendDiagnosticInterrupt(ctx context.Context, params *SendDiagnosticInterruptInput, optFns ...func(*Options)) (*SendDiagnosticInterruptOutput, error) { - if params == nil { - params = &SendDiagnosticInterruptInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "SendDiagnosticInterrupt", params, optFns, c.addOperationSendDiagnosticInterruptMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*SendDiagnosticInterruptOutput) - out.ResultMetadata = metadata - return out, nil -} - -type SendDiagnosticInterruptInput struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type SendDiagnosticInterruptOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationSendDiagnosticInterruptMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpSendDiagnosticInterrupt{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpSendDiagnosticInterrupt{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "SendDiagnosticInterrupt"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpSendDiagnosticInterruptValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendDiagnosticInterrupt(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opSendDiagnosticInterrupt(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "SendDiagnosticInterrupt", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go deleted file mode 100644 index 5facb6173..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartInstances.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Starts an Amazon EBS-backed instance that you've previously stopped. Instances -// that use Amazon EBS volumes as their root devices can be quickly stopped and -// started. When an instance is stopped, the compute resources are released and you -// are not billed for instance usage. However, your root partition Amazon EBS -// volume remains and continues to persist your data, and you are charged for -// Amazon EBS volume usage. You can restart your instance at any time. Every time -// you start your instance, Amazon EC2 charges a one-minute minimum for instance -// usage, and thereafter charges per second for instance usage. Before stopping an -// instance, make sure it is in a state from which it can be restarted. Stopping an -// instance does not preserve data stored in RAM. Performing this operation on an -// instance that uses an instance store as its root device returns an error. If you -// attempt to start a T3 instance with host tenancy and the unlimited CPU credit -// option, the request fails. The unlimited CPU credit option is not supported on -// Dedicated Hosts. Before you start the instance, either change its CPU credit -// option to standard , or change its tenancy to default or dedicated . For more -// information, see Stop and start your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html) -// in the Amazon EC2 User Guide. -func (c *Client) StartInstances(ctx context.Context, params *StartInstancesInput, optFns ...func(*Options)) (*StartInstancesOutput, error) { - if params == nil { - params = &StartInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartInstances", params, optFns, c.addOperationStartInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartInstancesInput struct { - - // The IDs of the instances. - // - // This member is required. - InstanceIds []string - - // Reserved. - AdditionalInfo *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type StartInstancesOutput struct { - - // Information about the started instances. - StartingInstances []types.InstanceStateChange - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpStartInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpStartInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStartInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go deleted file mode 100644 index 98b7654f0..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAccessScopeAnalysis.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Starts analyzing the specified Network Access Scope. -func (c *Client) StartNetworkInsightsAccessScopeAnalysis(ctx context.Context, params *StartNetworkInsightsAccessScopeAnalysisInput, optFns ...func(*Options)) (*StartNetworkInsightsAccessScopeAnalysisOutput, error) { - if params == nil { - params = &StartNetworkInsightsAccessScopeAnalysisInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartNetworkInsightsAccessScopeAnalysis", params, optFns, c.addOperationStartNetworkInsightsAccessScopeAnalysisMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartNetworkInsightsAccessScopeAnalysisOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartNetworkInsightsAccessScopeAnalysisInput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - // - // This member is required. - ClientToken *string - - // The ID of the Network Access Scope. - // - // This member is required. - NetworkInsightsAccessScopeId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The tags to apply. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type StartNetworkInsightsAccessScopeAnalysisOutput struct { - - // The Network Access Scope analysis. - NetworkInsightsAccessScopeAnalysis *types.NetworkInsightsAccessScopeAnalysis - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartNetworkInsightsAccessScopeAnalysisMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpStartNetworkInsightsAccessScopeAnalysis{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartNetworkInsightsAccessScopeAnalysis"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opStartNetworkInsightsAccessScopeAnalysisMiddleware(stack, options); err != nil { - return err - } - if err = addOpStartNetworkInsightsAccessScopeAnalysisValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartNetworkInsightsAccessScopeAnalysis(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpStartNetworkInsightsAccessScopeAnalysis struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpStartNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpStartNetworkInsightsAccessScopeAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*StartNetworkInsightsAccessScopeAnalysisInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *StartNetworkInsightsAccessScopeAnalysisInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opStartNetworkInsightsAccessScopeAnalysisMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpStartNetworkInsightsAccessScopeAnalysis{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opStartNetworkInsightsAccessScopeAnalysis(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartNetworkInsightsAccessScopeAnalysis", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAnalysis.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAnalysis.go deleted file mode 100644 index cd41596d6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartNetworkInsightsAnalysis.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Starts analyzing the specified path. If the path is reachable, the operation -// returns the shortest feasible path. -func (c *Client) StartNetworkInsightsAnalysis(ctx context.Context, params *StartNetworkInsightsAnalysisInput, optFns ...func(*Options)) (*StartNetworkInsightsAnalysisOutput, error) { - if params == nil { - params = &StartNetworkInsightsAnalysisInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartNetworkInsightsAnalysis", params, optFns, c.addOperationStartNetworkInsightsAnalysisMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartNetworkInsightsAnalysisOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartNetworkInsightsAnalysisInput struct { - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see How to ensure idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - // - // This member is required. - ClientToken *string - - // The ID of the path. - // - // This member is required. - NetworkInsightsPathId *string - - // The member accounts that contain resources that the path can traverse. - AdditionalAccounts []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The Amazon Resource Names (ARN) of the resources that the path must traverse. - FilterInArns []string - - // The tags to apply. - TagSpecifications []types.TagSpecification - - noSmithyDocumentSerde -} - -type StartNetworkInsightsAnalysisOutput struct { - - // Information about the network insights analysis. - NetworkInsightsAnalysis *types.NetworkInsightsAnalysis - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartNetworkInsightsAnalysisMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpStartNetworkInsightsAnalysis{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartNetworkInsightsAnalysis{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartNetworkInsightsAnalysis"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opStartNetworkInsightsAnalysisMiddleware(stack, options); err != nil { - return err - } - if err = addOpStartNetworkInsightsAnalysisValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartNetworkInsightsAnalysis(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpStartNetworkInsightsAnalysis struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpStartNetworkInsightsAnalysis) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpStartNetworkInsightsAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*StartNetworkInsightsAnalysisInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *StartNetworkInsightsAnalysisInput ") - } - - if input.ClientToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opStartNetworkInsightsAnalysisMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpStartNetworkInsightsAnalysis{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opStartNetworkInsightsAnalysis(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartNetworkInsightsAnalysis", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go deleted file mode 100644 index 6c1a575e6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StartVpcEndpointServicePrivateDnsVerification.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Initiates the verification process to prove that the service provider owns the -// private DNS name domain for the endpoint service. The service provider must -// successfully perform the verification before the consumer can use the name to -// access the service. Before the service provider runs this command, they must add -// a record to the DNS server. -func (c *Client) StartVpcEndpointServicePrivateDnsVerification(ctx context.Context, params *StartVpcEndpointServicePrivateDnsVerificationInput, optFns ...func(*Options)) (*StartVpcEndpointServicePrivateDnsVerificationOutput, error) { - if params == nil { - params = &StartVpcEndpointServicePrivateDnsVerificationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartVpcEndpointServicePrivateDnsVerification", params, optFns, c.addOperationStartVpcEndpointServicePrivateDnsVerificationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartVpcEndpointServicePrivateDnsVerificationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartVpcEndpointServicePrivateDnsVerificationInput struct { - - // The ID of the endpoint service. - // - // This member is required. - ServiceId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type StartVpcEndpointServicePrivateDnsVerificationOutput struct { - - // Returns true if the request succeeds; otherwise, it returns an error. - ReturnValue *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartVpcEndpointServicePrivateDnsVerificationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartVpcEndpointServicePrivateDnsVerification"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpStartVpcEndpointServicePrivateDnsVerificationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartVpcEndpointServicePrivateDnsVerification(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStartVpcEndpointServicePrivateDnsVerification(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartVpcEndpointServicePrivateDnsVerification", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go deleted file mode 100644 index 7ba1e8951..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_StopInstances.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Stops an Amazon EBS-backed instance. For more information, see Stop and start -// your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html) -// in the Amazon EC2 User Guide. You can use the Stop action to hibernate an -// instance if the instance is enabled for hibernation (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enabling-hibernation.html) -// and it meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html) -// . For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon EC2 User Guide. We don't charge usage for a stopped instance, or -// data transfer fees; however, your root partition Amazon EBS volume remains and -// continues to persist your data, and you are charged for Amazon EBS volume usage. -// Every time you start your instance, Amazon EC2 charges a one-minute minimum for -// instance usage, and thereafter charges per second for instance usage. You can't -// stop or hibernate instance store-backed instances. You can't use the Stop action -// to hibernate Spot Instances, but you can specify that Amazon EC2 should -// hibernate Spot Instances when they are interrupted. For more information, see -// Hibernating interrupted Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances) -// in the Amazon EC2 User Guide. When you stop or hibernate an instance, we shut it -// down. You can restart your instance at any time. Before stopping or hibernating -// an instance, make sure it is in a state from which it can be restarted. Stopping -// an instance does not preserve data stored in RAM, but hibernating an instance -// does preserve data stored in RAM. If an instance cannot hibernate successfully, -// a normal shutdown occurs. Stopping and hibernating an instance is different to -// rebooting or terminating it. For example, when you stop or hibernate an -// instance, the root device and any other devices attached to the instance -// persist. When you terminate an instance, the root device and any other devices -// attached during the instance launch are automatically deleted. For more -// information about the differences between rebooting, stopping, hibernating, and -// terminating instances, see Instance lifecycle (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon EC2 User Guide. When you stop an instance, we attempt to shut it -// down forcibly after a short while. If your instance appears stuck in the -// stopping state after a period of time, there may be an issue with the underlying -// host computer. For more information, see Troubleshoot stopping your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html) -// in the Amazon EC2 User Guide. -func (c *Client) StopInstances(ctx context.Context, params *StopInstancesInput, optFns ...func(*Options)) (*StopInstancesOutput, error) { - if params == nil { - params = &StopInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StopInstances", params, optFns, c.addOperationStopInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StopInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StopInstancesInput struct { - - // The IDs of the instances. - // - // This member is required. - InstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // Forces the instances to stop. The instances do not have an opportunity to flush - // file system caches or file system metadata. If you use this option, you must - // perform file system check and repair procedures. This option is not recommended - // for Windows instances. Default: false - Force *bool - - // Hibernates the instance if the instance was enabled for hibernation at launch. - // If the instance cannot hibernate successfully, a normal shutdown occurs. For - // more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon EC2 User Guide. Default: false - Hibernate *bool - - noSmithyDocumentSerde -} - -type StopInstancesOutput struct { - - // Information about the stopped instances. - StoppingInstances []types.InstanceStateChange - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStopInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpStopInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpStopInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StopInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpStopInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStopInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StopInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateClientVpnConnections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateClientVpnConnections.go deleted file mode 100644 index 19b8e9e31..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateClientVpnConnections.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Terminates active Client VPN endpoint connections. This action can be used to -// terminate a specific client connection, or up to five connections established by -// a specific user. -func (c *Client) TerminateClientVpnConnections(ctx context.Context, params *TerminateClientVpnConnectionsInput, optFns ...func(*Options)) (*TerminateClientVpnConnectionsOutput, error) { - if params == nil { - params = &TerminateClientVpnConnectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TerminateClientVpnConnections", params, optFns, c.addOperationTerminateClientVpnConnectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TerminateClientVpnConnectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TerminateClientVpnConnectionsInput struct { - - // The ID of the Client VPN endpoint to which the client is connected. - // - // This member is required. - ClientVpnEndpointId *string - - // The ID of the client connection to be terminated. - ConnectionId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The name of the user who initiated the connection. Use this option to terminate - // all active connections for the specified user. This option can only be used if - // the user has established up to five connections. - Username *string - - noSmithyDocumentSerde -} - -type TerminateClientVpnConnectionsOutput struct { - - // The ID of the Client VPN endpoint. - ClientVpnEndpointId *string - - // The current state of the client connections. - ConnectionStatuses []types.TerminateConnectionStatus - - // The user who established the terminated client connections. - Username *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTerminateClientVpnConnectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpTerminateClientVpnConnections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpTerminateClientVpnConnections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TerminateClientVpnConnections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpTerminateClientVpnConnectionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateClientVpnConnections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTerminateClientVpnConnections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TerminateClientVpnConnections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go deleted file mode 100644 index 10bc40314..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_TerminateInstances.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Shuts down the specified instances. This operation is idempotent; if you -// terminate an instance more than once, each call succeeds. If you specify -// multiple instances and the request fails (for example, because of a single -// incorrect instance ID), none of the instances are terminated. If you terminate -// multiple instances across multiple Availability Zones, and one or more of the -// specified instances are enabled for termination protection, the request fails -// with the following results: -// - The specified instances that are in the same Availability Zone as the -// protected instance are not terminated. -// - The specified instances that are in different Availability Zones, where no -// other specified instances are protected, are successfully terminated. -// -// For example, say you have the following instances: -// - Instance A: us-east-1a ; Not protected -// - Instance B: us-east-1a ; Not protected -// - Instance C: us-east-1b ; Protected -// - Instance D: us-east-1b ; not protected -// -// If you attempt to terminate all of these instances in the same request, the -// request reports failure with the following results: -// - Instance A and Instance B are successfully terminated because none of the -// specified instances in us-east-1a are enabled for termination protection. -// - Instance C and Instance D fail to terminate because at least one of the -// specified instances in us-east-1b (Instance C) is enabled for termination -// protection. -// -// Terminated instances remain visible after termination (for approximately one -// hour). By default, Amazon EC2 deletes all EBS volumes that were attached when -// the instance launched. Volumes attached after instance launch continue running. -// You can stop, start, and terminate EBS-backed instances. You can only terminate -// instance store-backed instances. What happens to an instance differs if you stop -// it or terminate it. For example, when you stop an instance, the root device and -// any other devices attached to the instance persist. When you terminate an -// instance, any attached EBS volumes with the DeleteOnTermination block device -// mapping parameter set to true are automatically deleted. For more information -// about the differences between stopping and terminating instances, see Instance -// lifecycle (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon EC2 User Guide. For more information about troubleshooting, see -// Troubleshooting terminating your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html) -// in the Amazon EC2 User Guide. -func (c *Client) TerminateInstances(ctx context.Context, params *TerminateInstancesInput, optFns ...func(*Options)) (*TerminateInstancesOutput, error) { - if params == nil { - params = &TerminateInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TerminateInstances", params, optFns, c.addOperationTerminateInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TerminateInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TerminateInstancesInput struct { - - // The IDs of the instances. Constraints: Up to 1000 instance IDs. We recommend - // breaking up this request into smaller batches. - // - // This member is required. - InstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type TerminateInstancesOutput struct { - - // Information about the terminated instances. - TerminatingInstances []types.InstanceStateChange - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTerminateInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpTerminateInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpTerminateInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TerminateInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpTerminateInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTerminateInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTerminateInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TerminateInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignIpv6Addresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignIpv6Addresses.go deleted file mode 100644 index 048ba82da..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignIpv6Addresses.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Unassigns one or more IPv6 addresses IPv4 Prefix Delegation prefixes from a -// network interface. -func (c *Client) UnassignIpv6Addresses(ctx context.Context, params *UnassignIpv6AddressesInput, optFns ...func(*Options)) (*UnassignIpv6AddressesOutput, error) { - if params == nil { - params = &UnassignIpv6AddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UnassignIpv6Addresses", params, optFns, c.addOperationUnassignIpv6AddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UnassignIpv6AddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UnassignIpv6AddressesInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // The IPv6 addresses to unassign from the network interface. - Ipv6Addresses []string - - // The IPv6 prefixes to unassign from the network interface. - Ipv6Prefixes []string - - noSmithyDocumentSerde -} - -type UnassignIpv6AddressesOutput struct { - - // The ID of the network interface. - NetworkInterfaceId *string - - // The IPv6 addresses that have been unassigned from the network interface. - UnassignedIpv6Addresses []string - - // The IPv4 prefixes that have been unassigned from the network interface. - UnassignedIpv6Prefixes []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUnassignIpv6AddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUnassignIpv6Addresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnassignIpv6Addresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UnassignIpv6Addresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpUnassignIpv6AddressesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnassignIpv6Addresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUnassignIpv6Addresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UnassignIpv6Addresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateIpAddresses.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateIpAddresses.go deleted file mode 100644 index 0a8cad88b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateIpAddresses.go +++ /dev/null @@ -1,140 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Unassigns one or more secondary private IP addresses, or IPv4 Prefix Delegation -// prefixes from a network interface. -func (c *Client) UnassignPrivateIpAddresses(ctx context.Context, params *UnassignPrivateIpAddressesInput, optFns ...func(*Options)) (*UnassignPrivateIpAddressesOutput, error) { - if params == nil { - params = &UnassignPrivateIpAddressesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UnassignPrivateIpAddresses", params, optFns, c.addOperationUnassignPrivateIpAddressesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UnassignPrivateIpAddressesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Contains the parameters for UnassignPrivateIpAddresses. -type UnassignPrivateIpAddressesInput struct { - - // The ID of the network interface. - // - // This member is required. - NetworkInterfaceId *string - - // The IPv4 prefixes to unassign from the network interface. - Ipv4Prefixes []string - - // The secondary private IP addresses to unassign from the network interface. You - // can specify this option multiple times to unassign more than one IP address. - PrivateIpAddresses []string - - noSmithyDocumentSerde -} - -type UnassignPrivateIpAddressesOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUnassignPrivateIpAddressesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUnassignPrivateIpAddresses{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnassignPrivateIpAddresses{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UnassignPrivateIpAddresses"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpUnassignPrivateIpAddressesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnassignPrivateIpAddresses(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUnassignPrivateIpAddresses(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UnassignPrivateIpAddresses", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go deleted file mode 100644 index 7bfaf046d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnassignPrivateNatGatewayAddress.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Unassigns secondary private IPv4 addresses from a private NAT gateway. You -// cannot unassign your primary private IP. For more information, see Edit -// secondary IP address associations (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html#nat-gateway-edit-secondary) -// in the Amazon VPC User Guide. While unassigning is in progress, you cannot -// assign/unassign additional IP addresses while the connections are being drained. -// You are, however, allowed to delete the NAT gateway. A private IP address will -// only be released at the end of MaxDrainDurationSeconds. The private IP addresses -// stay associated and support the existing connections, but do not support any new -// connections (new connections are distributed across the remaining assigned -// private IP address). After the existing connections drain out, the private IP -// addresses are released. -func (c *Client) UnassignPrivateNatGatewayAddress(ctx context.Context, params *UnassignPrivateNatGatewayAddressInput, optFns ...func(*Options)) (*UnassignPrivateNatGatewayAddressOutput, error) { - if params == nil { - params = &UnassignPrivateNatGatewayAddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UnassignPrivateNatGatewayAddress", params, optFns, c.addOperationUnassignPrivateNatGatewayAddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UnassignPrivateNatGatewayAddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UnassignPrivateNatGatewayAddressInput struct { - - // The ID of the NAT gateway. - // - // This member is required. - NatGatewayId *string - - // The private IPv4 addresses you want to unassign. - // - // This member is required. - PrivateIpAddresses []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The maximum amount of time to wait (in seconds) before forcibly releasing the - // IP addresses if connections are still in progress. Default value is 350 seconds. - MaxDrainDurationSeconds *int32 - - noSmithyDocumentSerde -} - -type UnassignPrivateNatGatewayAddressOutput struct { - - // Information about the NAT gateway IP addresses. - NatGatewayAddresses []types.NatGatewayAddress - - // The ID of the NAT gateway. - NatGatewayId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUnassignPrivateNatGatewayAddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUnassignPrivateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UnassignPrivateNatGatewayAddress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpUnassignPrivateNatGatewayAddressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnassignPrivateNatGatewayAddress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUnassignPrivateNatGatewayAddress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UnassignPrivateNatGatewayAddress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnlockSnapshot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnlockSnapshot.go deleted file mode 100644 index 395db9dbb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnlockSnapshot.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Unlocks a snapshot that is locked in governance mode or that is locked in -// compliance mode but still in the cooling-off period. You can't unlock a snapshot -// that is locked in compliance mode after the cooling-off period has expired. -func (c *Client) UnlockSnapshot(ctx context.Context, params *UnlockSnapshotInput, optFns ...func(*Options)) (*UnlockSnapshotOutput, error) { - if params == nil { - params = &UnlockSnapshotInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UnlockSnapshot", params, optFns, c.addOperationUnlockSnapshotMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UnlockSnapshotOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UnlockSnapshotInput struct { - - // The ID of the snapshot to unlock. - // - // This member is required. - SnapshotId *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type UnlockSnapshotOutput struct { - - // The ID of the snapshot. - SnapshotId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUnlockSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUnlockSnapshot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnlockSnapshot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UnlockSnapshot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpUnlockSnapshotValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnlockSnapshot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUnlockSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UnlockSnapshot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go deleted file mode 100644 index 3ef2b363c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UnmonitorInstances.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables detailed monitoring for a running instance. For more information, see -// Monitoring your instances and volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) -// in the Amazon EC2 User Guide. -func (c *Client) UnmonitorInstances(ctx context.Context, params *UnmonitorInstancesInput, optFns ...func(*Options)) (*UnmonitorInstancesOutput, error) { - if params == nil { - params = &UnmonitorInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UnmonitorInstances", params, optFns, c.addOperationUnmonitorInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UnmonitorInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UnmonitorInstancesInput struct { - - // The IDs of the instances. - // - // This member is required. - InstanceIds []string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type UnmonitorInstancesOutput struct { - - // The monitoring information. - InstanceMonitorings []types.InstanceMonitoring - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUnmonitorInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUnmonitorInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUnmonitorInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UnmonitorInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpUnmonitorInstancesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUnmonitorInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUnmonitorInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UnmonitorInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go deleted file mode 100644 index cd5aa6adb..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsEgress.go +++ /dev/null @@ -1,154 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the description of an egress (outbound) security group rule. You can -// replace an existing description, or add a description to a rule that did not -// have one previously. You can remove a description for a security group rule by -// omitting the description parameter in the request. -func (c *Client) UpdateSecurityGroupRuleDescriptionsEgress(ctx context.Context, params *UpdateSecurityGroupRuleDescriptionsEgressInput, optFns ...func(*Options)) (*UpdateSecurityGroupRuleDescriptionsEgressOutput, error) { - if params == nil { - params = &UpdateSecurityGroupRuleDescriptionsEgressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSecurityGroupRuleDescriptionsEgress", params, optFns, c.addOperationUpdateSecurityGroupRuleDescriptionsEgressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSecurityGroupRuleDescriptionsEgressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSecurityGroupRuleDescriptionsEgressInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the security group. You must specify either the security group ID or - // the security group name in the request. For security groups in a nondefault VPC, - // you must specify the security group ID. - GroupId *string - - // [Default VPC] The name of the security group. You must specify either the - // security group ID or the security group name. - GroupName *string - - // The IP permissions for the security group rule. You must specify either the IP - // permissions or the description. - IpPermissions []types.IpPermission - - // The description for the egress security group rules. You must specify either - // the description or the IP permissions. - SecurityGroupRuleDescriptions []types.SecurityGroupRuleDescription - - noSmithyDocumentSerde -} - -type UpdateSecurityGroupRuleDescriptionsEgressOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSecurityGroupRuleDescriptionsEgressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSecurityGroupRuleDescriptionsEgress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityGroupRuleDescriptionsEgress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateSecurityGroupRuleDescriptionsEgress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSecurityGroupRuleDescriptionsEgress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go deleted file mode 100644 index 0099a84c7..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_UpdateSecurityGroupRuleDescriptionsIngress.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the description of an ingress (inbound) security group rule. You can -// replace an existing description, or add a description to a rule that did not -// have one previously. You can remove a description for a security group rule by -// omitting the description parameter in the request. -func (c *Client) UpdateSecurityGroupRuleDescriptionsIngress(ctx context.Context, params *UpdateSecurityGroupRuleDescriptionsIngressInput, optFns ...func(*Options)) (*UpdateSecurityGroupRuleDescriptionsIngressOutput, error) { - if params == nil { - params = &UpdateSecurityGroupRuleDescriptionsIngressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSecurityGroupRuleDescriptionsIngress", params, optFns, c.addOperationUpdateSecurityGroupRuleDescriptionsIngressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSecurityGroupRuleDescriptionsIngressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSecurityGroupRuleDescriptionsIngressInput struct { - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - // The ID of the security group. You must specify either the security group ID or - // the security group name in the request. For security groups in a nondefault VPC, - // you must specify the security group ID. - GroupId *string - - // [Default VPC] The name of the security group. You must specify either the - // security group ID or the security group name. For security groups in a - // nondefault VPC, you must specify the security group ID. - GroupName *string - - // The IP permissions for the security group rule. You must specify either IP - // permissions or a description. - IpPermissions []types.IpPermission - - // The description for the ingress security group rules. You must specify either a - // description or IP permissions. - SecurityGroupRuleDescriptions []types.SecurityGroupRuleDescription - - noSmithyDocumentSerde -} - -type UpdateSecurityGroupRuleDescriptionsIngressOutput struct { - - // Returns true if the request succeeds; otherwise, returns an error. - Return *bool - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSecurityGroupRuleDescriptionsIngressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSecurityGroupRuleDescriptionsIngress"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecurityGroupRuleDescriptionsIngress(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateSecurityGroupRuleDescriptionsIngress(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSecurityGroupRuleDescriptionsIngress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_WithdrawByoipCidr.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_WithdrawByoipCidr.go deleted file mode 100644 index b44a86360..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/api_op_WithdrawByoipCidr.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Stops advertising an address range that is provisioned as an address pool. You -// can perform this operation at most once every 10 seconds, even if you specify -// different address ranges each time. It can take a few minutes before traffic to -// the specified addresses stops routing to Amazon Web Services because of BGP -// propagation delays. -func (c *Client) WithdrawByoipCidr(ctx context.Context, params *WithdrawByoipCidrInput, optFns ...func(*Options)) (*WithdrawByoipCidrOutput, error) { - if params == nil { - params = &WithdrawByoipCidrInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "WithdrawByoipCidr", params, optFns, c.addOperationWithdrawByoipCidrMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*WithdrawByoipCidrOutput) - out.ResultMetadata = metadata - return out, nil -} - -type WithdrawByoipCidrInput struct { - - // The address range, in CIDR notation. - // - // This member is required. - Cidr *string - - // Checks whether you have the required permissions for the action, without - // actually making the request, and provides an error response. If you have the - // required permissions, the error response is DryRunOperation . Otherwise, it is - // UnauthorizedOperation . - DryRun *bool - - noSmithyDocumentSerde -} - -type WithdrawByoipCidrOutput struct { - - // Information about the address pool. - ByoipCidr *types.ByoipCidr - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationWithdrawByoipCidrMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsEc2query_serializeOpWithdrawByoipCidr{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsEc2query_deserializeOpWithdrawByoipCidr{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "WithdrawByoipCidr"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addOpWithdrawByoipCidrValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opWithdrawByoipCidr(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opWithdrawByoipCidr(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "WithdrawByoipCidr", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go deleted file mode 100644 index 2e29d836b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/auth.go +++ /dev/null @@ -1,284 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -func bindAuthParamsRegion(params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "ec2") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - params := bindAuthResolverParams(m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - for _, option := range options { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go deleted file mode 100644 index af45acc39..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/deserializers.go +++ /dev/null @@ -1,168613 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "bytes" - "context" - "encoding/base64" - "encoding/xml" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - smithyxml "github.com/aws/smithy-go/encoding/xml" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "io/ioutil" - "strconv" - "strings" -) - -type awsEc2query_deserializeOpAcceptAddressTransfer struct { -} - -func (*awsEc2query_deserializeOpAcceptAddressTransfer) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptAddressTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptAddressTransfer(response, &metadata) - } - output := &AcceptAddressTransferOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptAddressTransferOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptAddressTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote struct { -} - -func (*awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptReservedInstancesExchangeQuote) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptReservedInstancesExchangeQuote(response, &metadata) - } - output := &AcceptReservedInstancesExchangeQuoteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptReservedInstancesExchangeQuoteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptReservedInstancesExchangeQuote(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations struct { -} - -func (*awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptTransitGatewayMulticastDomainAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptTransitGatewayMulticastDomainAssociations(response, &metadata) - } - output := &AcceptTransitGatewayMulticastDomainAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptTransitGatewayMulticastDomainAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptTransitGatewayPeeringAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptTransitGatewayPeeringAttachment(response, &metadata) - } - output := &AcceptTransitGatewayPeeringAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptTransitGatewayPeeringAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptTransitGatewayPeeringAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptTransitGatewayVpcAttachment(response, &metadata) - } - output := &AcceptTransitGatewayVpcAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptTransitGatewayVpcAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAcceptVpcEndpointConnections struct { -} - -func (*awsEc2query_deserializeOpAcceptVpcEndpointConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptVpcEndpointConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptVpcEndpointConnections(response, &metadata) - } - output := &AcceptVpcEndpointConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptVpcEndpointConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptVpcEndpointConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAcceptVpcPeeringConnection struct { -} - -func (*awsEc2query_deserializeOpAcceptVpcPeeringConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAcceptVpcPeeringConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAcceptVpcPeeringConnection(response, &metadata) - } - output := &AcceptVpcPeeringConnectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAcceptVpcPeeringConnectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAcceptVpcPeeringConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAdvertiseByoipCidr struct { -} - -func (*awsEc2query_deserializeOpAdvertiseByoipCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAdvertiseByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAdvertiseByoipCidr(response, &metadata) - } - output := &AdvertiseByoipCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAdvertiseByoipCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAdvertiseByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAllocateAddress struct { -} - -func (*awsEc2query_deserializeOpAllocateAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAllocateAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAllocateAddress(response, &metadata) - } - output := &AllocateAddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAllocateAddressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAllocateAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAllocateHosts struct { -} - -func (*awsEc2query_deserializeOpAllocateHosts) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAllocateHosts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAllocateHosts(response, &metadata) - } - output := &AllocateHostsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAllocateHostsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAllocateHosts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAllocateIpamPoolCidr struct { -} - -func (*awsEc2query_deserializeOpAllocateIpamPoolCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAllocateIpamPoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAllocateIpamPoolCidr(response, &metadata) - } - output := &AllocateIpamPoolCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAllocateIpamPoolCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAllocateIpamPoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork struct { -} - -func (*awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpApplySecurityGroupsToClientVpnTargetNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorApplySecurityGroupsToClientVpnTargetNetwork(response, &metadata) - } - output := &ApplySecurityGroupsToClientVpnTargetNetworkOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorApplySecurityGroupsToClientVpnTargetNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssignIpv6Addresses struct { -} - -func (*awsEc2query_deserializeOpAssignIpv6Addresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssignIpv6Addresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssignIpv6Addresses(response, &metadata) - } - output := &AssignIpv6AddressesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssignIpv6AddressesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssignIpv6Addresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssignPrivateIpAddresses struct { -} - -func (*awsEc2query_deserializeOpAssignPrivateIpAddresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssignPrivateIpAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssignPrivateIpAddresses(response, &metadata) - } - output := &AssignPrivateIpAddressesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssignPrivateIpAddressesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssignPrivateIpAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssignPrivateNatGatewayAddress struct { -} - -func (*awsEc2query_deserializeOpAssignPrivateNatGatewayAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssignPrivateNatGatewayAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssignPrivateNatGatewayAddress(response, &metadata) - } - output := &AssignPrivateNatGatewayAddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssignPrivateNatGatewayAddressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssignPrivateNatGatewayAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateAddress struct { -} - -func (*awsEc2query_deserializeOpAssociateAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateAddress(response, &metadata) - } - output := &AssociateAddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateAddressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateClientVpnTargetNetwork struct { -} - -func (*awsEc2query_deserializeOpAssociateClientVpnTargetNetwork) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateClientVpnTargetNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateClientVpnTargetNetwork(response, &metadata) - } - output := &AssociateClientVpnTargetNetworkOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateClientVpnTargetNetworkOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateClientVpnTargetNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateDhcpOptions struct { -} - -func (*awsEc2query_deserializeOpAssociateDhcpOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateDhcpOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateDhcpOptions(response, &metadata) - } - output := &AssociateDhcpOptionsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateDhcpOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole struct { -} - -func (*awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateEnclaveCertificateIamRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateEnclaveCertificateIamRole(response, &metadata) - } - output := &AssociateEnclaveCertificateIamRoleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateEnclaveCertificateIamRoleOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateEnclaveCertificateIamRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateIamInstanceProfile struct { -} - -func (*awsEc2query_deserializeOpAssociateIamInstanceProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateIamInstanceProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateIamInstanceProfile(response, &metadata) - } - output := &AssociateIamInstanceProfileOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateIamInstanceProfileOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateIamInstanceProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateInstanceEventWindow struct { -} - -func (*awsEc2query_deserializeOpAssociateInstanceEventWindow) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateInstanceEventWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateInstanceEventWindow(response, &metadata) - } - output := &AssociateInstanceEventWindowOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateInstanceEventWindowOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateInstanceEventWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateIpamByoasn struct { -} - -func (*awsEc2query_deserializeOpAssociateIpamByoasn) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateIpamByoasn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateIpamByoasn(response, &metadata) - } - output := &AssociateIpamByoasnOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateIpamByoasnOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateIpamByoasn(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateIpamResourceDiscovery struct { -} - -func (*awsEc2query_deserializeOpAssociateIpamResourceDiscovery) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateIpamResourceDiscovery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateIpamResourceDiscovery(response, &metadata) - } - output := &AssociateIpamResourceDiscoveryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateIpamResourceDiscoveryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateIpamResourceDiscovery(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateNatGatewayAddress struct { -} - -func (*awsEc2query_deserializeOpAssociateNatGatewayAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateNatGatewayAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateNatGatewayAddress(response, &metadata) - } - output := &AssociateNatGatewayAddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateNatGatewayAddressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateNatGatewayAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateRouteTable struct { -} - -func (*awsEc2query_deserializeOpAssociateRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateRouteTable(response, &metadata) - } - output := &AssociateRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateSubnetCidrBlock struct { -} - -func (*awsEc2query_deserializeOpAssociateSubnetCidrBlock) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateSubnetCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response, &metadata) - } - output := &AssociateSubnetCidrBlockOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateSubnetCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateTransitGatewayMulticastDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(response, &metadata) - } - output := &AssociateTransitGatewayMulticastDomainOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayMulticastDomainOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateTransitGatewayMulticastDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateTransitGatewayPolicyTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(response, &metadata) - } - output := &AssociateTransitGatewayPolicyTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayPolicyTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateTransitGatewayPolicyTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateTransitGatewayRouteTable struct { -} - -func (*awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateTransitGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response, &metadata) - } - output := &AssociateTransitGatewayRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTransitGatewayRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateTransitGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateTrunkInterface struct { -} - -func (*awsEc2query_deserializeOpAssociateTrunkInterface) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateTrunkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateTrunkInterface(response, &metadata) - } - output := &AssociateTrunkInterfaceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateTrunkInterfaceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateTrunkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAssociateVpcCidrBlock struct { -} - -func (*awsEc2query_deserializeOpAssociateVpcCidrBlock) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAssociateVpcCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response, &metadata) - } - output := &AssociateVpcCidrBlockOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAssociateVpcCidrBlockOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAssociateVpcCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachClassicLinkVpc struct { -} - -func (*awsEc2query_deserializeOpAttachClassicLinkVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachClassicLinkVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachClassicLinkVpc(response, &metadata) - } - output := &AttachClassicLinkVpcOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachClassicLinkVpcOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachClassicLinkVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachInternetGateway struct { -} - -func (*awsEc2query_deserializeOpAttachInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachInternetGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachInternetGateway(response, &metadata) - } - output := &AttachInternetGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachNetworkInterface struct { -} - -func (*awsEc2query_deserializeOpAttachNetworkInterface) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachNetworkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachNetworkInterface(response, &metadata) - } - output := &AttachNetworkInterfaceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachNetworkInterfaceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachNetworkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(response, &metadata) - } - output := &AttachVerifiedAccessTrustProviderOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachVerifiedAccessTrustProviderOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachVolume struct { -} - -func (*awsEc2query_deserializeOpAttachVolume) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachVolume(response, &metadata) - } - output := &AttachVolumeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachVolumeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAttachVpnGateway struct { -} - -func (*awsEc2query_deserializeOpAttachVpnGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAttachVpnGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAttachVpnGateway(response, &metadata) - } - output := &AttachVpnGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAttachVpnGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAttachVpnGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAuthorizeClientVpnIngress struct { -} - -func (*awsEc2query_deserializeOpAuthorizeClientVpnIngress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAuthorizeClientVpnIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(response, &metadata) - } - output := &AuthorizeClientVpnIngressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAuthorizeClientVpnIngressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAuthorizeClientVpnIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAuthorizeSecurityGroupEgress struct { -} - -func (*awsEc2query_deserializeOpAuthorizeSecurityGroupEgress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAuthorizeSecurityGroupEgress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAuthorizeSecurityGroupEgress(response, &metadata) - } - output := &AuthorizeSecurityGroupEgressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupEgressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAuthorizeSecurityGroupEgress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpAuthorizeSecurityGroupIngress struct { -} - -func (*awsEc2query_deserializeOpAuthorizeSecurityGroupIngress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpAuthorizeSecurityGroupIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorAuthorizeSecurityGroupIngress(response, &metadata) - } - output := &AuthorizeSecurityGroupIngressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupIngressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorAuthorizeSecurityGroupIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpBundleInstance struct { -} - -func (*awsEc2query_deserializeOpBundleInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpBundleInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorBundleInstance(response, &metadata) - } - output := &BundleInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentBundleInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorBundleInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelBundleTask struct { -} - -func (*awsEc2query_deserializeOpCancelBundleTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelBundleTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelBundleTask(response, &metadata) - } - output := &CancelBundleTaskOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelBundleTaskOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelBundleTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelCapacityReservation struct { -} - -func (*awsEc2query_deserializeOpCancelCapacityReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelCapacityReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelCapacityReservation(response, &metadata) - } - output := &CancelCapacityReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelCapacityReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelCapacityReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelCapacityReservationFleets struct { -} - -func (*awsEc2query_deserializeOpCancelCapacityReservationFleets) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelCapacityReservationFleets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelCapacityReservationFleets(response, &metadata) - } - output := &CancelCapacityReservationFleetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelCapacityReservationFleetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelCapacityReservationFleets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelConversionTask struct { -} - -func (*awsEc2query_deserializeOpCancelConversionTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelConversionTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelConversionTask(response, &metadata) - } - output := &CancelConversionTaskOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelConversionTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelExportTask struct { -} - -func (*awsEc2query_deserializeOpCancelExportTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelExportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelExportTask(response, &metadata) - } - output := &CancelExportTaskOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelExportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelImageLaunchPermission struct { -} - -func (*awsEc2query_deserializeOpCancelImageLaunchPermission) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelImageLaunchPermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelImageLaunchPermission(response, &metadata) - } - output := &CancelImageLaunchPermissionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelImageLaunchPermissionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelImageLaunchPermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelImportTask struct { -} - -func (*awsEc2query_deserializeOpCancelImportTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelImportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelImportTask(response, &metadata) - } - output := &CancelImportTaskOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelImportTaskOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelImportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelReservedInstancesListing struct { -} - -func (*awsEc2query_deserializeOpCancelReservedInstancesListing) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelReservedInstancesListing) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelReservedInstancesListing(response, &metadata) - } - output := &CancelReservedInstancesListingOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelReservedInstancesListingOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelReservedInstancesListing(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelSpotFleetRequests struct { -} - -func (*awsEc2query_deserializeOpCancelSpotFleetRequests) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelSpotFleetRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelSpotFleetRequests(response, &metadata) - } - output := &CancelSpotFleetRequestsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelSpotFleetRequestsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelSpotFleetRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCancelSpotInstanceRequests struct { -} - -func (*awsEc2query_deserializeOpCancelSpotInstanceRequests) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCancelSpotInstanceRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCancelSpotInstanceRequests(response, &metadata) - } - output := &CancelSpotInstanceRequestsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCancelSpotInstanceRequestsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCancelSpotInstanceRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpConfirmProductInstance struct { -} - -func (*awsEc2query_deserializeOpConfirmProductInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpConfirmProductInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorConfirmProductInstance(response, &metadata) - } - output := &ConfirmProductInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentConfirmProductInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorConfirmProductInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCopyFpgaImage struct { -} - -func (*awsEc2query_deserializeOpCopyFpgaImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCopyFpgaImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCopyFpgaImage(response, &metadata) - } - output := &CopyFpgaImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCopyFpgaImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCopyFpgaImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCopyImage struct { -} - -func (*awsEc2query_deserializeOpCopyImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCopyImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCopyImage(response, &metadata) - } - output := &CopyImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCopyImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCopyImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCopySnapshot struct { -} - -func (*awsEc2query_deserializeOpCopySnapshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCopySnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCopySnapshot(response, &metadata) - } - output := &CopySnapshotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCopySnapshotOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCopySnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateCapacityReservation struct { -} - -func (*awsEc2query_deserializeOpCreateCapacityReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateCapacityReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateCapacityReservation(response, &metadata) - } - output := &CreateCapacityReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateCapacityReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateCapacityReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateCapacityReservationFleet struct { -} - -func (*awsEc2query_deserializeOpCreateCapacityReservationFleet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateCapacityReservationFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateCapacityReservationFleet(response, &metadata) - } - output := &CreateCapacityReservationFleetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateCapacityReservationFleetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateCapacityReservationFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateCarrierGateway struct { -} - -func (*awsEc2query_deserializeOpCreateCarrierGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateCarrierGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateCarrierGateway(response, &metadata) - } - output := &CreateCarrierGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateCarrierGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateCarrierGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateClientVpnEndpoint struct { -} - -func (*awsEc2query_deserializeOpCreateClientVpnEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateClientVpnEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateClientVpnEndpoint(response, &metadata) - } - output := &CreateClientVpnEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateClientVpnEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateClientVpnEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateClientVpnRoute struct { -} - -func (*awsEc2query_deserializeOpCreateClientVpnRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateClientVpnRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateClientVpnRoute(response, &metadata) - } - output := &CreateClientVpnRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateClientVpnRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateClientVpnRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateCoipCidr struct { -} - -func (*awsEc2query_deserializeOpCreateCoipCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateCoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateCoipCidr(response, &metadata) - } - output := &CreateCoipCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateCoipCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateCoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateCoipPool struct { -} - -func (*awsEc2query_deserializeOpCreateCoipPool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateCoipPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateCoipPool(response, &metadata) - } - output := &CreateCoipPoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateCoipPoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateCoipPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateCustomerGateway struct { -} - -func (*awsEc2query_deserializeOpCreateCustomerGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateCustomerGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateCustomerGateway(response, &metadata) - } - output := &CreateCustomerGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateCustomerGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateCustomerGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateDefaultSubnet struct { -} - -func (*awsEc2query_deserializeOpCreateDefaultSubnet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateDefaultSubnet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateDefaultSubnet(response, &metadata) - } - output := &CreateDefaultSubnetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateDefaultSubnetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateDefaultSubnet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateDefaultVpc struct { -} - -func (*awsEc2query_deserializeOpCreateDefaultVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateDefaultVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateDefaultVpc(response, &metadata) - } - output := &CreateDefaultVpcOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateDefaultVpcOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateDefaultVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateDhcpOptions struct { -} - -func (*awsEc2query_deserializeOpCreateDhcpOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateDhcpOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateDhcpOptions(response, &metadata) - } - output := &CreateDhcpOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateDhcpOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateDhcpOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateEgressOnlyInternetGateway struct { -} - -func (*awsEc2query_deserializeOpCreateEgressOnlyInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateEgressOnlyInternetGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateEgressOnlyInternetGateway(response, &metadata) - } - output := &CreateEgressOnlyInternetGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateEgressOnlyInternetGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateEgressOnlyInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateFleet struct { -} - -func (*awsEc2query_deserializeOpCreateFleet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateFleet(response, &metadata) - } - output := &CreateFleetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateFleetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateFlowLogs struct { -} - -func (*awsEc2query_deserializeOpCreateFlowLogs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateFlowLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateFlowLogs(response, &metadata) - } - output := &CreateFlowLogsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateFlowLogsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateFlowLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateFpgaImage struct { -} - -func (*awsEc2query_deserializeOpCreateFpgaImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateFpgaImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateFpgaImage(response, &metadata) - } - output := &CreateFpgaImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateFpgaImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateFpgaImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateImage struct { -} - -func (*awsEc2query_deserializeOpCreateImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateImage(response, &metadata) - } - output := &CreateImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateInstanceConnectEndpoint struct { -} - -func (*awsEc2query_deserializeOpCreateInstanceConnectEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateInstanceConnectEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateInstanceConnectEndpoint(response, &metadata) - } - output := &CreateInstanceConnectEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateInstanceConnectEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateInstanceConnectEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateInstanceEventWindow struct { -} - -func (*awsEc2query_deserializeOpCreateInstanceEventWindow) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateInstanceEventWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateInstanceEventWindow(response, &metadata) - } - output := &CreateInstanceEventWindowOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateInstanceEventWindowOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateInstanceEventWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateInstanceExportTask struct { -} - -func (*awsEc2query_deserializeOpCreateInstanceExportTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateInstanceExportTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateInstanceExportTask(response, &metadata) - } - output := &CreateInstanceExportTaskOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateInstanceExportTaskOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateInstanceExportTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateInternetGateway struct { -} - -func (*awsEc2query_deserializeOpCreateInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateInternetGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateInternetGateway(response, &metadata) - } - output := &CreateInternetGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateInternetGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateIpam struct { -} - -func (*awsEc2query_deserializeOpCreateIpam) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateIpam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateIpam(response, &metadata) - } - output := &CreateIpamOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateIpamOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateIpam(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateIpamPool struct { -} - -func (*awsEc2query_deserializeOpCreateIpamPool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateIpamPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateIpamPool(response, &metadata) - } - output := &CreateIpamPoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateIpamPoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateIpamPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateIpamResourceDiscovery struct { -} - -func (*awsEc2query_deserializeOpCreateIpamResourceDiscovery) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateIpamResourceDiscovery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateIpamResourceDiscovery(response, &metadata) - } - output := &CreateIpamResourceDiscoveryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateIpamResourceDiscoveryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateIpamResourceDiscovery(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateIpamScope struct { -} - -func (*awsEc2query_deserializeOpCreateIpamScope) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateIpamScope) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateIpamScope(response, &metadata) - } - output := &CreateIpamScopeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateIpamScopeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateIpamScope(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateKeyPair struct { -} - -func (*awsEc2query_deserializeOpCreateKeyPair) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateKeyPair) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateKeyPair(response, &metadata) - } - output := &CreateKeyPairOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateKeyPairOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateKeyPair(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateLaunchTemplate struct { -} - -func (*awsEc2query_deserializeOpCreateLaunchTemplate) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateLaunchTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateLaunchTemplate(response, &metadata) - } - output := &CreateLaunchTemplateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateLaunchTemplateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateLaunchTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateLaunchTemplateVersion struct { -} - -func (*awsEc2query_deserializeOpCreateLaunchTemplateVersion) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateLaunchTemplateVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateLaunchTemplateVersion(response, &metadata) - } - output := &CreateLaunchTemplateVersionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateLaunchTemplateVersionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateLaunchTemplateVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateLocalGatewayRoute struct { -} - -func (*awsEc2query_deserializeOpCreateLocalGatewayRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateLocalGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateLocalGatewayRoute(response, &metadata) - } - output := &CreateLocalGatewayRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateLocalGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateLocalGatewayRouteTable struct { -} - -func (*awsEc2query_deserializeOpCreateLocalGatewayRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateLocalGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTable(response, &metadata) - } - output := &CreateLocalGatewayRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { -} - -func (*awsEc2query_deserializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation(response, &metadata) - } - output := &CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation struct { -} - -func (*awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateLocalGatewayRouteTableVpcAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTableVpcAssociation(response, &metadata) - } - output := &CreateLocalGatewayRouteTableVpcAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateLocalGatewayRouteTableVpcAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateManagedPrefixList struct { -} - -func (*awsEc2query_deserializeOpCreateManagedPrefixList) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateManagedPrefixList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateManagedPrefixList(response, &metadata) - } - output := &CreateManagedPrefixListOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateManagedPrefixListOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateManagedPrefixList(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNatGateway struct { -} - -func (*awsEc2query_deserializeOpCreateNatGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNatGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNatGateway(response, &metadata) - } - output := &CreateNatGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateNatGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNatGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNetworkAcl struct { -} - -func (*awsEc2query_deserializeOpCreateNetworkAcl) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNetworkAcl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNetworkAcl(response, &metadata) - } - output := &CreateNetworkAclOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateNetworkAclOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNetworkAcl(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNetworkAclEntry struct { -} - -func (*awsEc2query_deserializeOpCreateNetworkAclEntry) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNetworkAclEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNetworkAclEntry(response, &metadata) - } - output := &CreateNetworkAclEntryOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNetworkAclEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNetworkInsightsAccessScope struct { -} - -func (*awsEc2query_deserializeOpCreateNetworkInsightsAccessScope) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNetworkInsightsAccessScope) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNetworkInsightsAccessScope(response, &metadata) - } - output := &CreateNetworkInsightsAccessScopeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateNetworkInsightsAccessScopeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNetworkInsightsAccessScope(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNetworkInsightsPath struct { -} - -func (*awsEc2query_deserializeOpCreateNetworkInsightsPath) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNetworkInsightsPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNetworkInsightsPath(response, &metadata) - } - output := &CreateNetworkInsightsPathOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateNetworkInsightsPathOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNetworkInsightsPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNetworkInterface struct { -} - -func (*awsEc2query_deserializeOpCreateNetworkInterface) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNetworkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNetworkInterface(response, &metadata) - } - output := &CreateNetworkInterfaceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateNetworkInterfaceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNetworkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateNetworkInterfacePermission struct { -} - -func (*awsEc2query_deserializeOpCreateNetworkInterfacePermission) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateNetworkInterfacePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateNetworkInterfacePermission(response, &metadata) - } - output := &CreateNetworkInterfacePermissionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateNetworkInterfacePermissionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateNetworkInterfacePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreatePlacementGroup struct { -} - -func (*awsEc2query_deserializeOpCreatePlacementGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreatePlacementGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreatePlacementGroup(response, &metadata) - } - output := &CreatePlacementGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreatePlacementGroupOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreatePlacementGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreatePublicIpv4Pool struct { -} - -func (*awsEc2query_deserializeOpCreatePublicIpv4Pool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreatePublicIpv4Pool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreatePublicIpv4Pool(response, &metadata) - } - output := &CreatePublicIpv4PoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreatePublicIpv4PoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreatePublicIpv4Pool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateReplaceRootVolumeTask struct { -} - -func (*awsEc2query_deserializeOpCreateReplaceRootVolumeTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateReplaceRootVolumeTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateReplaceRootVolumeTask(response, &metadata) - } - output := &CreateReplaceRootVolumeTaskOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateReplaceRootVolumeTaskOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateReplaceRootVolumeTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateReservedInstancesListing struct { -} - -func (*awsEc2query_deserializeOpCreateReservedInstancesListing) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateReservedInstancesListing) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateReservedInstancesListing(response, &metadata) - } - output := &CreateReservedInstancesListingOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateReservedInstancesListingOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateReservedInstancesListing(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateRestoreImageTask struct { -} - -func (*awsEc2query_deserializeOpCreateRestoreImageTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateRestoreImageTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateRestoreImageTask(response, &metadata) - } - output := &CreateRestoreImageTaskOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateRestoreImageTaskOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateRestoreImageTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateRoute struct { -} - -func (*awsEc2query_deserializeOpCreateRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateRoute(response, &metadata) - } - output := &CreateRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateRouteTable struct { -} - -func (*awsEc2query_deserializeOpCreateRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateRouteTable(response, &metadata) - } - output := &CreateRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateSecurityGroup struct { -} - -func (*awsEc2query_deserializeOpCreateSecurityGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateSecurityGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateSecurityGroup(response, &metadata) - } - output := &CreateSecurityGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateSecurityGroupOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateSecurityGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateSnapshot struct { -} - -func (*awsEc2query_deserializeOpCreateSnapshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateSnapshot(response, &metadata) - } - output := &CreateSnapshotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateSnapshotOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateSnapshots struct { -} - -func (*awsEc2query_deserializeOpCreateSnapshots) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateSnapshots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateSnapshots(response, &metadata) - } - output := &CreateSnapshotsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateSnapshotsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateSnapshots(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateSpotDatafeedSubscription struct { -} - -func (*awsEc2query_deserializeOpCreateSpotDatafeedSubscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateSpotDatafeedSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateSpotDatafeedSubscription(response, &metadata) - } - output := &CreateSpotDatafeedSubscriptionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateSpotDatafeedSubscriptionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateSpotDatafeedSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateStoreImageTask struct { -} - -func (*awsEc2query_deserializeOpCreateStoreImageTask) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateStoreImageTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateStoreImageTask(response, &metadata) - } - output := &CreateStoreImageTaskOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateStoreImageTaskOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateStoreImageTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateSubnet struct { -} - -func (*awsEc2query_deserializeOpCreateSubnet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateSubnet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateSubnet(response, &metadata) - } - output := &CreateSubnetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateSubnetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateSubnet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateSubnetCidrReservation struct { -} - -func (*awsEc2query_deserializeOpCreateSubnetCidrReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateSubnetCidrReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateSubnetCidrReservation(response, &metadata) - } - output := &CreateSubnetCidrReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateSubnetCidrReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateSubnetCidrReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTags struct { -} - -func (*awsEc2query_deserializeOpCreateTags) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTags(response, &metadata) - } - output := &CreateTagsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTrafficMirrorFilter struct { -} - -func (*awsEc2query_deserializeOpCreateTrafficMirrorFilter) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTrafficMirrorFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTrafficMirrorFilter(response, &metadata) - } - output := &CreateTrafficMirrorFilterOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTrafficMirrorFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTrafficMirrorFilterRule struct { -} - -func (*awsEc2query_deserializeOpCreateTrafficMirrorFilterRule) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTrafficMirrorFilterRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTrafficMirrorFilterRule(response, &metadata) - } - output := &CreateTrafficMirrorFilterRuleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterRuleOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTrafficMirrorFilterRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTrafficMirrorSession struct { -} - -func (*awsEc2query_deserializeOpCreateTrafficMirrorSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTrafficMirrorSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTrafficMirrorSession(response, &metadata) - } - output := &CreateTrafficMirrorSessionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTrafficMirrorSessionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTrafficMirrorSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTrafficMirrorTarget struct { -} - -func (*awsEc2query_deserializeOpCreateTrafficMirrorTarget) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTrafficMirrorTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTrafficMirrorTarget(response, &metadata) - } - output := &CreateTrafficMirrorTargetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTrafficMirrorTargetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTrafficMirrorTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGateway struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGateway(response, &metadata) - } - output := &CreateTransitGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayConnect struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayConnect) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayConnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayConnect(response, &metadata) - } - output := &CreateTransitGatewayConnectOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayConnect(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayConnectPeer struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayConnectPeer) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayConnectPeer(response, &metadata) - } - output := &CreateTransitGatewayConnectPeerOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectPeerOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayMulticastDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayMulticastDomain(response, &metadata) - } - output := &CreateTransitGatewayMulticastDomainOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayMulticastDomainOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayMulticastDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayPeeringAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayPeeringAttachment(response, &metadata) - } - output := &CreateTransitGatewayPeeringAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayPeeringAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayPeeringAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayPolicyTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayPolicyTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayPolicyTable(response, &metadata) - } - output := &CreateTransitGatewayPolicyTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayPolicyTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayPolicyTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayPrefixListReference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayPrefixListReference(response, &metadata) - } - output := &CreateTransitGatewayPrefixListReferenceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayPrefixListReferenceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayPrefixListReference(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayRoute struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayRoute(response, &metadata) - } - output := &CreateTransitGatewayRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayRouteTable struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayRouteTable(response, &metadata) - } - output := &CreateTransitGatewayRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayRouteTableAnnouncement struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayRouteTableAnnouncement) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayRouteTableAnnouncement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayRouteTableAnnouncement(response, &metadata) - } - output := &CreateTransitGatewayRouteTableAnnouncementOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteTableAnnouncementOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayRouteTableAnnouncement(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateTransitGatewayVpcAttachment(response, &metadata) - } - output := &CreateTransitGatewayVpcAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateTransitGatewayVpcAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVerifiedAccessEndpoint struct { -} - -func (*awsEc2query_deserializeOpCreateVerifiedAccessEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVerifiedAccessEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVerifiedAccessEndpoint(response, &metadata) - } - output := &CreateVerifiedAccessEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVerifiedAccessEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVerifiedAccessEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVerifiedAccessGroup struct { -} - -func (*awsEc2query_deserializeOpCreateVerifiedAccessGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVerifiedAccessGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVerifiedAccessGroup(response, &metadata) - } - output := &CreateVerifiedAccessGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVerifiedAccessGroupOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVerifiedAccessGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVerifiedAccessInstance struct { -} - -func (*awsEc2query_deserializeOpCreateVerifiedAccessInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVerifiedAccessInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVerifiedAccessInstance(response, &metadata) - } - output := &CreateVerifiedAccessInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVerifiedAccessInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVerifiedAccessInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_deserializeOpCreateVerifiedAccessTrustProvider) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVerifiedAccessTrustProvider(response, &metadata) - } - output := &CreateVerifiedAccessTrustProviderOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVerifiedAccessTrustProviderOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVolume struct { -} - -func (*awsEc2query_deserializeOpCreateVolume) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVolume(response, &metadata) - } - output := &CreateVolumeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVolumeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpc struct { -} - -func (*awsEc2query_deserializeOpCreateVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpc(response, &metadata) - } - output := &CreateVpcOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpcOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpcEndpoint struct { -} - -func (*awsEc2query_deserializeOpCreateVpcEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpcEndpoint(response, &metadata) - } - output := &CreateVpcEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpcEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification struct { -} - -func (*awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpcEndpointConnectionNotification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpcEndpointConnectionNotification(response, &metadata) - } - output := &CreateVpcEndpointConnectionNotificationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpcEndpointConnectionNotificationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpcEndpointConnectionNotification(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration struct { -} - -func (*awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpcEndpointServiceConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpcEndpointServiceConfiguration(response, &metadata) - } - output := &CreateVpcEndpointServiceConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpcEndpointServiceConfigurationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpcEndpointServiceConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpcPeeringConnection struct { -} - -func (*awsEc2query_deserializeOpCreateVpcPeeringConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpcPeeringConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpcPeeringConnection(response, &metadata) - } - output := &CreateVpcPeeringConnectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpcPeeringConnectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpcPeeringConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpnConnection struct { -} - -func (*awsEc2query_deserializeOpCreateVpnConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpnConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpnConnection(response, &metadata) - } - output := &CreateVpnConnectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpnConnectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpnConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpnConnectionRoute struct { -} - -func (*awsEc2query_deserializeOpCreateVpnConnectionRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpnConnectionRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpnConnectionRoute(response, &metadata) - } - output := &CreateVpnConnectionRouteOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpnConnectionRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpCreateVpnGateway struct { -} - -func (*awsEc2query_deserializeOpCreateVpnGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpCreateVpnGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorCreateVpnGateway(response, &metadata) - } - output := &CreateVpnGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentCreateVpnGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorCreateVpnGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteCarrierGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteCarrierGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteCarrierGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteCarrierGateway(response, &metadata) - } - output := &DeleteCarrierGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteCarrierGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteCarrierGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteClientVpnEndpoint struct { -} - -func (*awsEc2query_deserializeOpDeleteClientVpnEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteClientVpnEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteClientVpnEndpoint(response, &metadata) - } - output := &DeleteClientVpnEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteClientVpnEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteClientVpnEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteClientVpnRoute struct { -} - -func (*awsEc2query_deserializeOpDeleteClientVpnRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteClientVpnRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteClientVpnRoute(response, &metadata) - } - output := &DeleteClientVpnRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteClientVpnRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteClientVpnRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteCoipCidr struct { -} - -func (*awsEc2query_deserializeOpDeleteCoipCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteCoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteCoipCidr(response, &metadata) - } - output := &DeleteCoipCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteCoipCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteCoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteCoipPool struct { -} - -func (*awsEc2query_deserializeOpDeleteCoipPool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteCoipPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteCoipPool(response, &metadata) - } - output := &DeleteCoipPoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteCoipPoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteCoipPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteCustomerGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteCustomerGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteCustomerGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteCustomerGateway(response, &metadata) - } - output := &DeleteCustomerGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteCustomerGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteDhcpOptions struct { -} - -func (*awsEc2query_deserializeOpDeleteDhcpOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteDhcpOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteDhcpOptions(response, &metadata) - } - output := &DeleteDhcpOptionsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteDhcpOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteEgressOnlyInternetGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteEgressOnlyInternetGateway(response, &metadata) - } - output := &DeleteEgressOnlyInternetGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteEgressOnlyInternetGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteEgressOnlyInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteFleets struct { -} - -func (*awsEc2query_deserializeOpDeleteFleets) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteFleets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteFleets(response, &metadata) - } - output := &DeleteFleetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteFleetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteFleets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteFlowLogs struct { -} - -func (*awsEc2query_deserializeOpDeleteFlowLogs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteFlowLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteFlowLogs(response, &metadata) - } - output := &DeleteFlowLogsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteFlowLogsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteFlowLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteFpgaImage struct { -} - -func (*awsEc2query_deserializeOpDeleteFpgaImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteFpgaImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteFpgaImage(response, &metadata) - } - output := &DeleteFpgaImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteFpgaImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteFpgaImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteInstanceConnectEndpoint struct { -} - -func (*awsEc2query_deserializeOpDeleteInstanceConnectEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteInstanceConnectEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteInstanceConnectEndpoint(response, &metadata) - } - output := &DeleteInstanceConnectEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteInstanceConnectEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteInstanceConnectEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteInstanceEventWindow struct { -} - -func (*awsEc2query_deserializeOpDeleteInstanceEventWindow) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteInstanceEventWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteInstanceEventWindow(response, &metadata) - } - output := &DeleteInstanceEventWindowOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteInstanceEventWindowOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteInstanceEventWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteInternetGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteInternetGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteInternetGateway(response, &metadata) - } - output := &DeleteInternetGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteIpam struct { -} - -func (*awsEc2query_deserializeOpDeleteIpam) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteIpam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteIpam(response, &metadata) - } - output := &DeleteIpamOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteIpamOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteIpam(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteIpamPool struct { -} - -func (*awsEc2query_deserializeOpDeleteIpamPool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteIpamPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteIpamPool(response, &metadata) - } - output := &DeleteIpamPoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteIpamPoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteIpamPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteIpamResourceDiscovery struct { -} - -func (*awsEc2query_deserializeOpDeleteIpamResourceDiscovery) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteIpamResourceDiscovery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteIpamResourceDiscovery(response, &metadata) - } - output := &DeleteIpamResourceDiscoveryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteIpamResourceDiscoveryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteIpamResourceDiscovery(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteIpamScope struct { -} - -func (*awsEc2query_deserializeOpDeleteIpamScope) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteIpamScope) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteIpamScope(response, &metadata) - } - output := &DeleteIpamScopeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteIpamScopeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteIpamScope(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteKeyPair struct { -} - -func (*awsEc2query_deserializeOpDeleteKeyPair) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteKeyPair) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteKeyPair(response, &metadata) - } - output := &DeleteKeyPairOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteKeyPairOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteKeyPair(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteLaunchTemplate struct { -} - -func (*awsEc2query_deserializeOpDeleteLaunchTemplate) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteLaunchTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteLaunchTemplate(response, &metadata) - } - output := &DeleteLaunchTemplateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteLaunchTemplateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteLaunchTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteLaunchTemplateVersions struct { -} - -func (*awsEc2query_deserializeOpDeleteLaunchTemplateVersions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteLaunchTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteLaunchTemplateVersions(response, &metadata) - } - output := &DeleteLaunchTemplateVersionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteLaunchTemplateVersionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteLaunchTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteLocalGatewayRoute struct { -} - -func (*awsEc2query_deserializeOpDeleteLocalGatewayRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteLocalGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteLocalGatewayRoute(response, &metadata) - } - output := &DeleteLocalGatewayRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteLocalGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteLocalGatewayRouteTable struct { -} - -func (*awsEc2query_deserializeOpDeleteLocalGatewayRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteLocalGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTable(response, &metadata) - } - output := &DeleteLocalGatewayRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { -} - -func (*awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation(response, &metadata) - } - output := &DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation struct { -} - -func (*awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteLocalGatewayRouteTableVpcAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTableVpcAssociation(response, &metadata) - } - output := &DeleteLocalGatewayRouteTableVpcAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteLocalGatewayRouteTableVpcAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteManagedPrefixList struct { -} - -func (*awsEc2query_deserializeOpDeleteManagedPrefixList) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteManagedPrefixList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteManagedPrefixList(response, &metadata) - } - output := &DeleteManagedPrefixListOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteManagedPrefixListOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteManagedPrefixList(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNatGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteNatGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNatGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNatGateway(response, &metadata) - } - output := &DeleteNatGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteNatGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNatGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkAcl struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkAcl) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkAcl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkAcl(response, &metadata) - } - output := &DeleteNetworkAclOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkAcl(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkAclEntry struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkAclEntry) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkAclEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkAclEntry(response, &metadata) - } - output := &DeleteNetworkAclEntryOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkAclEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkInsightsAccessScope struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkInsightsAccessScope) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkInsightsAccessScope) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkInsightsAccessScope(response, &metadata) - } - output := &DeleteNetworkInsightsAccessScopeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAccessScopeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkInsightsAccessScope(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkInsightsAccessScopeAnalysis struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkInsightsAccessScopeAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkInsightsAccessScopeAnalysis(response, &metadata) - } - output := &DeleteNetworkInsightsAccessScopeAnalysisOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAccessScopeAnalysisOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkInsightsAccessScopeAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkInsightsAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkInsightsAnalysis(response, &metadata) - } - output := &DeleteNetworkInsightsAnalysisOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAnalysisOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkInsightsAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkInsightsPath struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkInsightsPath) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkInsightsPath) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkInsightsPath(response, &metadata) - } - output := &DeleteNetworkInsightsPathOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteNetworkInsightsPathOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkInsightsPath(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkInterface struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkInterface) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkInterface(response, &metadata) - } - output := &DeleteNetworkInterfaceOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteNetworkInterfacePermission struct { -} - -func (*awsEc2query_deserializeOpDeleteNetworkInterfacePermission) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteNetworkInterfacePermission) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteNetworkInterfacePermission(response, &metadata) - } - output := &DeleteNetworkInterfacePermissionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteNetworkInterfacePermissionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteNetworkInterfacePermission(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeletePlacementGroup struct { -} - -func (*awsEc2query_deserializeOpDeletePlacementGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeletePlacementGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeletePlacementGroup(response, &metadata) - } - output := &DeletePlacementGroupOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeletePlacementGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeletePublicIpv4Pool struct { -} - -func (*awsEc2query_deserializeOpDeletePublicIpv4Pool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeletePublicIpv4Pool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeletePublicIpv4Pool(response, &metadata) - } - output := &DeletePublicIpv4PoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeletePublicIpv4PoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeletePublicIpv4Pool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteQueuedReservedInstances struct { -} - -func (*awsEc2query_deserializeOpDeleteQueuedReservedInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteQueuedReservedInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteQueuedReservedInstances(response, &metadata) - } - output := &DeleteQueuedReservedInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteQueuedReservedInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteQueuedReservedInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteRoute struct { -} - -func (*awsEc2query_deserializeOpDeleteRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteRoute(response, &metadata) - } - output := &DeleteRouteOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteRouteTable struct { -} - -func (*awsEc2query_deserializeOpDeleteRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteRouteTable(response, &metadata) - } - output := &DeleteRouteTableOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteSecurityGroup struct { -} - -func (*awsEc2query_deserializeOpDeleteSecurityGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteSecurityGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteSecurityGroup(response, &metadata) - } - output := &DeleteSecurityGroupOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteSecurityGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteSnapshot struct { -} - -func (*awsEc2query_deserializeOpDeleteSnapshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteSnapshot(response, &metadata) - } - output := &DeleteSnapshotOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteSpotDatafeedSubscription struct { -} - -func (*awsEc2query_deserializeOpDeleteSpotDatafeedSubscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteSpotDatafeedSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteSpotDatafeedSubscription(response, &metadata) - } - output := &DeleteSpotDatafeedSubscriptionOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteSpotDatafeedSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteSubnet struct { -} - -func (*awsEc2query_deserializeOpDeleteSubnet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteSubnet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteSubnet(response, &metadata) - } - output := &DeleteSubnetOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteSubnet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteSubnetCidrReservation struct { -} - -func (*awsEc2query_deserializeOpDeleteSubnetCidrReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteSubnetCidrReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteSubnetCidrReservation(response, &metadata) - } - output := &DeleteSubnetCidrReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteSubnetCidrReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteSubnetCidrReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTags struct { -} - -func (*awsEc2query_deserializeOpDeleteTags) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTags(response, &metadata) - } - output := &DeleteTagsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTrafficMirrorFilter struct { -} - -func (*awsEc2query_deserializeOpDeleteTrafficMirrorFilter) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTrafficMirrorFilter) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilter(response, &metadata) - } - output := &DeleteTrafficMirrorFilterOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilter(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule struct { -} - -func (*awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTrafficMirrorFilterRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilterRule(response, &metadata) - } - output := &DeleteTrafficMirrorFilterRuleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterRuleOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTrafficMirrorFilterRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTrafficMirrorSession struct { -} - -func (*awsEc2query_deserializeOpDeleteTrafficMirrorSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTrafficMirrorSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTrafficMirrorSession(response, &metadata) - } - output := &DeleteTrafficMirrorSessionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorSessionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTrafficMirrorSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTrafficMirrorTarget struct { -} - -func (*awsEc2query_deserializeOpDeleteTrafficMirrorTarget) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTrafficMirrorTarget) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTrafficMirrorTarget(response, &metadata) - } - output := &DeleteTrafficMirrorTargetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTrafficMirrorTargetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTrafficMirrorTarget(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGateway(response, &metadata) - } - output := &DeleteTransitGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayConnect struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayConnect) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayConnect) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayConnect(response, &metadata) - } - output := &DeleteTransitGatewayConnectOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayConnect(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayConnectPeer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayConnectPeer(response, &metadata) - } - output := &DeleteTransitGatewayConnectPeerOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectPeerOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayConnectPeer(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayMulticastDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayMulticastDomain(response, &metadata) - } - output := &DeleteTransitGatewayMulticastDomainOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayMulticastDomainOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayMulticastDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayPeeringAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayPeeringAttachment(response, &metadata) - } - output := &DeleteTransitGatewayPeeringAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayPeeringAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayPeeringAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayPolicyTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayPolicyTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayPolicyTable(response, &metadata) - } - output := &DeleteTransitGatewayPolicyTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayPolicyTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayPolicyTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayPrefixListReference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayPrefixListReference(response, &metadata) - } - output := &DeleteTransitGatewayPrefixListReferenceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayPrefixListReferenceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayPrefixListReference(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayRoute struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayRoute(response, &metadata) - } - output := &DeleteTransitGatewayRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayRouteTable struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayRouteTable(response, &metadata) - } - output := &DeleteTransitGatewayRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayRouteTableAnnouncement struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayRouteTableAnnouncement) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayRouteTableAnnouncement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayRouteTableAnnouncement(response, &metadata) - } - output := &DeleteTransitGatewayRouteTableAnnouncementOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteTableAnnouncementOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayRouteTableAnnouncement(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteTransitGatewayVpcAttachment(response, &metadata) - } - output := &DeleteTransitGatewayVpcAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteTransitGatewayVpcAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVerifiedAccessEndpoint struct { -} - -func (*awsEc2query_deserializeOpDeleteVerifiedAccessEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVerifiedAccessEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVerifiedAccessEndpoint(response, &metadata) - } - output := &DeleteVerifiedAccessEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVerifiedAccessEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVerifiedAccessEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVerifiedAccessGroup struct { -} - -func (*awsEc2query_deserializeOpDeleteVerifiedAccessGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVerifiedAccessGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVerifiedAccessGroup(response, &metadata) - } - output := &DeleteVerifiedAccessGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVerifiedAccessGroupOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVerifiedAccessGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVerifiedAccessInstance struct { -} - -func (*awsEc2query_deserializeOpDeleteVerifiedAccessInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVerifiedAccessInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVerifiedAccessInstance(response, &metadata) - } - output := &DeleteVerifiedAccessInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVerifiedAccessInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVerifiedAccessInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_deserializeOpDeleteVerifiedAccessTrustProvider) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVerifiedAccessTrustProvider(response, &metadata) - } - output := &DeleteVerifiedAccessTrustProviderOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVerifiedAccessTrustProviderOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVolume struct { -} - -func (*awsEc2query_deserializeOpDeleteVolume) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVolume(response, &metadata) - } - output := &DeleteVolumeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpc struct { -} - -func (*awsEc2query_deserializeOpDeleteVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpc(response, &metadata) - } - output := &DeleteVpcOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications struct { -} - -func (*awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpcEndpointConnectionNotifications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpcEndpointConnectionNotifications(response, &metadata) - } - output := &DeleteVpcEndpointConnectionNotificationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVpcEndpointConnectionNotificationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpcEndpointConnectionNotifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpcEndpoints struct { -} - -func (*awsEc2query_deserializeOpDeleteVpcEndpoints) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpcEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpcEndpoints(response, &metadata) - } - output := &DeleteVpcEndpointsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVpcEndpointsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpcEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations struct { -} - -func (*awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpcEndpointServiceConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpcEndpointServiceConfigurations(response, &metadata) - } - output := &DeleteVpcEndpointServiceConfigurationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVpcEndpointServiceConfigurationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpcEndpointServiceConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpcPeeringConnection struct { -} - -func (*awsEc2query_deserializeOpDeleteVpcPeeringConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpcPeeringConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpcPeeringConnection(response, &metadata) - } - output := &DeleteVpcPeeringConnectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeleteVpcPeeringConnectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpcPeeringConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpnConnection struct { -} - -func (*awsEc2query_deserializeOpDeleteVpnConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpnConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpnConnection(response, &metadata) - } - output := &DeleteVpnConnectionOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpnConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpnConnectionRoute struct { -} - -func (*awsEc2query_deserializeOpDeleteVpnConnectionRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpnConnectionRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpnConnectionRoute(response, &metadata) - } - output := &DeleteVpnConnectionRouteOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpnConnectionRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeleteVpnGateway struct { -} - -func (*awsEc2query_deserializeOpDeleteVpnGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeleteVpnGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeleteVpnGateway(response, &metadata) - } - output := &DeleteVpnGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeleteVpnGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeprovisionByoipCidr struct { -} - -func (*awsEc2query_deserializeOpDeprovisionByoipCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeprovisionByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeprovisionByoipCidr(response, &metadata) - } - output := &DeprovisionByoipCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeprovisionByoipCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeprovisionByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeprovisionIpamByoasn struct { -} - -func (*awsEc2query_deserializeOpDeprovisionIpamByoasn) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeprovisionIpamByoasn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeprovisionIpamByoasn(response, &metadata) - } - output := &DeprovisionIpamByoasnOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeprovisionIpamByoasnOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeprovisionIpamByoasn(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeprovisionIpamPoolCidr struct { -} - -func (*awsEc2query_deserializeOpDeprovisionIpamPoolCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeprovisionIpamPoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeprovisionIpamPoolCidr(response, &metadata) - } - output := &DeprovisionIpamPoolCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeprovisionIpamPoolCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeprovisionIpamPoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeprovisionPublicIpv4PoolCidr struct { -} - -func (*awsEc2query_deserializeOpDeprovisionPublicIpv4PoolCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeprovisionPublicIpv4PoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeprovisionPublicIpv4PoolCidr(response, &metadata) - } - output := &DeprovisionPublicIpv4PoolCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeprovisionPublicIpv4PoolCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeprovisionPublicIpv4PoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeregisterImage struct { -} - -func (*awsEc2query_deserializeOpDeregisterImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeregisterImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeregisterImage(response, &metadata) - } - output := &DeregisterImageOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeregisterImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes struct { -} - -func (*awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeregisterInstanceEventNotificationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeregisterInstanceEventNotificationAttributes(response, &metadata) - } - output := &DeregisterInstanceEventNotificationAttributesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeregisterInstanceEventNotificationAttributesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeregisterInstanceEventNotificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers struct { -} - -func (*awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupMembers(response, &metadata) - } - output := &DeregisterTransitGatewayMulticastGroupMembersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources struct { -} - -func (*awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDeregisterTransitGatewayMulticastGroupSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupSources(response, &metadata) - } - output := &DeregisterTransitGatewayMulticastGroupSourcesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDeregisterTransitGatewayMulticastGroupSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAccountAttributes struct { -} - -func (*awsEc2query_deserializeOpDescribeAccountAttributes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAccountAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAccountAttributes(response, &metadata) - } - output := &DescribeAccountAttributesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAccountAttributesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAccountAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAddresses struct { -} - -func (*awsEc2query_deserializeOpDescribeAddresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAddresses(response, &metadata) - } - output := &DescribeAddressesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAddressesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAddressesAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeAddressesAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAddressesAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAddressesAttribute(response, &metadata) - } - output := &DescribeAddressesAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAddressesAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAddressesAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAddressTransfers struct { -} - -func (*awsEc2query_deserializeOpDescribeAddressTransfers) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAddressTransfers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAddressTransfers(response, &metadata) - } - output := &DescribeAddressTransfersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAddressTransfersOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAddressTransfers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAggregateIdFormat struct { -} - -func (*awsEc2query_deserializeOpDescribeAggregateIdFormat) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAggregateIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAggregateIdFormat(response, &metadata) - } - output := &DescribeAggregateIdFormatOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAggregateIdFormatOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAggregateIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAvailabilityZones struct { -} - -func (*awsEc2query_deserializeOpDescribeAvailabilityZones) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAvailabilityZones) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAvailabilityZones(response, &metadata) - } - output := &DescribeAvailabilityZonesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAvailabilityZonesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAvailabilityZones(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeAwsNetworkPerformanceMetricSubscriptions struct { -} - -func (*awsEc2query_deserializeOpDescribeAwsNetworkPerformanceMetricSubscriptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeAwsNetworkPerformanceMetricSubscriptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeAwsNetworkPerformanceMetricSubscriptions(response, &metadata) - } - output := &DescribeAwsNetworkPerformanceMetricSubscriptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeAwsNetworkPerformanceMetricSubscriptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeAwsNetworkPerformanceMetricSubscriptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeBundleTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeBundleTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeBundleTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeBundleTasks(response, &metadata) - } - output := &DescribeBundleTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeBundleTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeBundleTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeByoipCidrs struct { -} - -func (*awsEc2query_deserializeOpDescribeByoipCidrs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeByoipCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeByoipCidrs(response, &metadata) - } - output := &DescribeByoipCidrsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeByoipCidrsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeByoipCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeCapacityBlockOfferings struct { -} - -func (*awsEc2query_deserializeOpDescribeCapacityBlockOfferings) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeCapacityBlockOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeCapacityBlockOfferings(response, &metadata) - } - output := &DescribeCapacityBlockOfferingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeCapacityBlockOfferingsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeCapacityBlockOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeCapacityReservationFleets struct { -} - -func (*awsEc2query_deserializeOpDescribeCapacityReservationFleets) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeCapacityReservationFleets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeCapacityReservationFleets(response, &metadata) - } - output := &DescribeCapacityReservationFleetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeCapacityReservationFleetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeCapacityReservationFleets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeCapacityReservations struct { -} - -func (*awsEc2query_deserializeOpDescribeCapacityReservations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeCapacityReservations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeCapacityReservations(response, &metadata) - } - output := &DescribeCapacityReservationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeCapacityReservationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeCapacityReservations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeCarrierGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeCarrierGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeCarrierGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeCarrierGateways(response, &metadata) - } - output := &DescribeCarrierGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeCarrierGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeCarrierGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeClassicLinkInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeClassicLinkInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeClassicLinkInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeClassicLinkInstances(response, &metadata) - } - output := &DescribeClassicLinkInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeClassicLinkInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeClassicLinkInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules struct { -} - -func (*awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeClientVpnAuthorizationRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeClientVpnAuthorizationRules(response, &metadata) - } - output := &DescribeClientVpnAuthorizationRulesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeClientVpnAuthorizationRulesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeClientVpnAuthorizationRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeClientVpnConnections struct { -} - -func (*awsEc2query_deserializeOpDescribeClientVpnConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeClientVpnConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeClientVpnConnections(response, &metadata) - } - output := &DescribeClientVpnConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeClientVpnConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeClientVpnConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeClientVpnEndpoints struct { -} - -func (*awsEc2query_deserializeOpDescribeClientVpnEndpoints) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeClientVpnEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeClientVpnEndpoints(response, &metadata) - } - output := &DescribeClientVpnEndpointsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeClientVpnEndpointsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeClientVpnEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeClientVpnRoutes struct { -} - -func (*awsEc2query_deserializeOpDescribeClientVpnRoutes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeClientVpnRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeClientVpnRoutes(response, &metadata) - } - output := &DescribeClientVpnRoutesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeClientVpnRoutesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeClientVpnRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeClientVpnTargetNetworks struct { -} - -func (*awsEc2query_deserializeOpDescribeClientVpnTargetNetworks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeClientVpnTargetNetworks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeClientVpnTargetNetworks(response, &metadata) - } - output := &DescribeClientVpnTargetNetworksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeClientVpnTargetNetworksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeClientVpnTargetNetworks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeCoipPools struct { -} - -func (*awsEc2query_deserializeOpDescribeCoipPools) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeCoipPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeCoipPools(response, &metadata) - } - output := &DescribeCoipPoolsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeCoipPoolsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeCoipPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeConversionTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeConversionTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeConversionTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeConversionTasks(response, &metadata) - } - output := &DescribeConversionTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeConversionTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeConversionTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeCustomerGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeCustomerGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeCustomerGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeCustomerGateways(response, &metadata) - } - output := &DescribeCustomerGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeCustomerGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeCustomerGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeDhcpOptions struct { -} - -func (*awsEc2query_deserializeOpDescribeDhcpOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeDhcpOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeDhcpOptions(response, &metadata) - } - output := &DescribeDhcpOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeDhcpOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeDhcpOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeEgressOnlyInternetGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeEgressOnlyInternetGateways(response, &metadata) - } - output := &DescribeEgressOnlyInternetGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeEgressOnlyInternetGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeEgressOnlyInternetGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeElasticGpus struct { -} - -func (*awsEc2query_deserializeOpDescribeElasticGpus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeElasticGpus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeElasticGpus(response, &metadata) - } - output := &DescribeElasticGpusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeElasticGpusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeElasticGpus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeExportImageTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeExportImageTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeExportImageTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeExportImageTasks(response, &metadata) - } - output := &DescribeExportImageTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeExportImageTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeExportImageTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeExportTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeExportTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeExportTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeExportTasks(response, &metadata) - } - output := &DescribeExportTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeExportTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeExportTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFastLaunchImages struct { -} - -func (*awsEc2query_deserializeOpDescribeFastLaunchImages) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFastLaunchImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFastLaunchImages(response, &metadata) - } - output := &DescribeFastLaunchImagesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFastLaunchImagesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFastLaunchImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFastSnapshotRestores struct { -} - -func (*awsEc2query_deserializeOpDescribeFastSnapshotRestores) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFastSnapshotRestores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFastSnapshotRestores(response, &metadata) - } - output := &DescribeFastSnapshotRestoresOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFastSnapshotRestoresOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFastSnapshotRestores(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFleetHistory struct { -} - -func (*awsEc2query_deserializeOpDescribeFleetHistory) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFleetHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFleetHistory(response, &metadata) - } - output := &DescribeFleetHistoryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFleetHistoryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFleetHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFleetInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeFleetInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFleetInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFleetInstances(response, &metadata) - } - output := &DescribeFleetInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFleetInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFleetInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFleets struct { -} - -func (*awsEc2query_deserializeOpDescribeFleets) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFleets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFleets(response, &metadata) - } - output := &DescribeFleetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFleetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFleets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFlowLogs struct { -} - -func (*awsEc2query_deserializeOpDescribeFlowLogs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFlowLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFlowLogs(response, &metadata) - } - output := &DescribeFlowLogsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFlowLogsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFlowLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFpgaImageAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeFpgaImageAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFpgaImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFpgaImageAttribute(response, &metadata) - } - output := &DescribeFpgaImageAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFpgaImageAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFpgaImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeFpgaImages struct { -} - -func (*awsEc2query_deserializeOpDescribeFpgaImages) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeFpgaImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeFpgaImages(response, &metadata) - } - output := &DescribeFpgaImagesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeFpgaImagesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeFpgaImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeHostReservationOfferings struct { -} - -func (*awsEc2query_deserializeOpDescribeHostReservationOfferings) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeHostReservationOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeHostReservationOfferings(response, &metadata) - } - output := &DescribeHostReservationOfferingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeHostReservationOfferingsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeHostReservationOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeHostReservations struct { -} - -func (*awsEc2query_deserializeOpDescribeHostReservations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeHostReservations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeHostReservations(response, &metadata) - } - output := &DescribeHostReservationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeHostReservationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeHostReservations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeHosts struct { -} - -func (*awsEc2query_deserializeOpDescribeHosts) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeHosts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeHosts(response, &metadata) - } - output := &DescribeHostsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeHostsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeHosts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations struct { -} - -func (*awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIamInstanceProfileAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIamInstanceProfileAssociations(response, &metadata) - } - output := &DescribeIamInstanceProfileAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIamInstanceProfileAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIamInstanceProfileAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIdentityIdFormat struct { -} - -func (*awsEc2query_deserializeOpDescribeIdentityIdFormat) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIdentityIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIdentityIdFormat(response, &metadata) - } - output := &DescribeIdentityIdFormatOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIdentityIdFormatOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIdentityIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIdFormat struct { -} - -func (*awsEc2query_deserializeOpDescribeIdFormat) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIdFormat(response, &metadata) - } - output := &DescribeIdFormatOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIdFormatOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeImageAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeImageAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeImageAttribute(response, &metadata) - } - output := &DescribeImageAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeImageAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeImages struct { -} - -func (*awsEc2query_deserializeOpDescribeImages) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeImages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeImages(response, &metadata) - } - output := &DescribeImagesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeImagesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeImages(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeImportImageTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeImportImageTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeImportImageTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeImportImageTasks(response, &metadata) - } - output := &DescribeImportImageTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeImportImageTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeImportImageTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeImportSnapshotTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeImportSnapshotTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeImportSnapshotTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeImportSnapshotTasks(response, &metadata) - } - output := &DescribeImportSnapshotTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeImportSnapshotTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeImportSnapshotTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceAttribute(response, &metadata) - } - output := &DescribeInstanceAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceConnectEndpoints struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceConnectEndpoints) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceConnectEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceConnectEndpoints(response, &metadata) - } - output := &DescribeInstanceConnectEndpointsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceConnectEndpointsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceConnectEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceCreditSpecifications struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceCreditSpecifications) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceCreditSpecifications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceCreditSpecifications(response, &metadata) - } - output := &DescribeInstanceCreditSpecificationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceCreditSpecificationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceCreditSpecifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceEventNotificationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceEventNotificationAttributes(response, &metadata) - } - output := &DescribeInstanceEventNotificationAttributesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceEventNotificationAttributesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceEventNotificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceEventWindows struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceEventWindows) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceEventWindows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceEventWindows(response, &metadata) - } - output := &DescribeInstanceEventWindowsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceEventWindowsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceEventWindows(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstances(response, &metadata) - } - output := &DescribeInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceStatus struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceStatus(response, &metadata) - } - output := &DescribeInstanceStatusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceStatusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceTopology struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceTopology) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceTopology) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceTopology(response, &metadata) - } - output := &DescribeInstanceTopologyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceTopologyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceTopology(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceTypeOfferings struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceTypeOfferings) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceTypeOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceTypeOfferings(response, &metadata) - } - output := &DescribeInstanceTypeOfferingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceTypeOfferingsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceTypeOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInstanceTypes struct { -} - -func (*awsEc2query_deserializeOpDescribeInstanceTypes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInstanceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInstanceTypes(response, &metadata) - } - output := &DescribeInstanceTypesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInstanceTypesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInstanceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeInternetGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeInternetGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeInternetGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeInternetGateways(response, &metadata) - } - output := &DescribeInternetGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeInternetGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeInternetGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpamByoasn struct { -} - -func (*awsEc2query_deserializeOpDescribeIpamByoasn) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpamByoasn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamByoasn(response, &metadata) - } - output := &DescribeIpamByoasnOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamByoasnOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpamByoasn(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpamPools struct { -} - -func (*awsEc2query_deserializeOpDescribeIpamPools) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpamPools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamPools(response, &metadata) - } - output := &DescribeIpamPoolsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamPoolsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpamPools(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpamResourceDiscoveries struct { -} - -func (*awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(response, &metadata) - } - output := &DescribeIpamResourceDiscoveriesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveriesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveries(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations struct { -} - -func (*awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpamResourceDiscoveryAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(response, &metadata) - } - output := &DescribeIpamResourceDiscoveryAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpamResourceDiscoveryAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpams struct { -} - -func (*awsEc2query_deserializeOpDescribeIpams) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpams(response, &metadata) - } - output := &DescribeIpamsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpams(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpamScopes struct { -} - -func (*awsEc2query_deserializeOpDescribeIpamScopes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpamScopes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpamScopes(response, &metadata) - } - output := &DescribeIpamScopesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpamScopes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeIpv6Pools struct { -} - -func (*awsEc2query_deserializeOpDescribeIpv6Pools) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeIpv6Pools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeIpv6Pools(response, &metadata) - } - output := &DescribeIpv6PoolsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeIpv6Pools(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeKeyPairs struct { -} - -func (*awsEc2query_deserializeOpDescribeKeyPairs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeKeyPairs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeKeyPairs(response, &metadata) - } - output := &DescribeKeyPairsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeKeyPairs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLaunchTemplates struct { -} - -func (*awsEc2query_deserializeOpDescribeLaunchTemplates) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLaunchTemplates) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLaunchTemplates(response, &metadata) - } - output := &DescribeLaunchTemplatesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLaunchTemplates(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLaunchTemplateVersions struct { -} - -func (*awsEc2query_deserializeOpDescribeLaunchTemplateVersions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLaunchTemplateVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLaunchTemplateVersions(response, &metadata) - } - output := &DescribeLaunchTemplateVersionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLaunchTemplateVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLocalGatewayRouteTables struct { -} - -func (*awsEc2query_deserializeOpDescribeLocalGatewayRouteTables) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLocalGatewayRouteTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTables(response, &metadata) - } - output := &DescribeLocalGatewayRouteTablesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations struct { -} - -func (*awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(response, &metadata) - } - output := &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations struct { -} - -func (*awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLocalGatewayRouteTableVpcAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVpcAssociations(response, &metadata) - } - output := &DescribeLocalGatewayRouteTableVpcAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLocalGatewayRouteTableVpcAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLocalGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeLocalGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLocalGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLocalGateways(response, &metadata) - } - output := &DescribeLocalGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLocalGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups struct { -} - -func (*awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaceGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaceGroups(response, &metadata) - } - output := &DescribeLocalGatewayVirtualInterfaceGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaceGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces struct { -} - -func (*awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLocalGatewayVirtualInterfaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaces(response, &metadata) - } - output := &DescribeLocalGatewayVirtualInterfacesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLocalGatewayVirtualInterfaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeLockedSnapshots struct { -} - -func (*awsEc2query_deserializeOpDescribeLockedSnapshots) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeLockedSnapshots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeLockedSnapshots(response, &metadata) - } - output := &DescribeLockedSnapshotsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeLockedSnapshots(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeManagedPrefixLists struct { -} - -func (*awsEc2query_deserializeOpDescribeManagedPrefixLists) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeManagedPrefixLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeManagedPrefixLists(response, &metadata) - } - output := &DescribeManagedPrefixListsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeManagedPrefixLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeMovingAddresses struct { -} - -func (*awsEc2query_deserializeOpDescribeMovingAddresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeMovingAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeMovingAddresses(response, &metadata) - } - output := &DescribeMovingAddressesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeMovingAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNatGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeNatGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNatGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNatGateways(response, &metadata) - } - output := &DescribeNatGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNatGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkAcls struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkAcls) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkAcls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkAcls(response, &metadata) - } - output := &DescribeNetworkAclsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkAcls(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopeAnalyses struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopeAnalyses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopeAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInsightsAccessScopeAnalyses(response, &metadata) - } - output := &DescribeNetworkInsightsAccessScopeAnalysesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInsightsAccessScopeAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopes struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInsightsAccessScopes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInsightsAccessScopes(response, &metadata) - } - output := &DescribeNetworkInsightsAccessScopesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInsightsAccessScopes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInsightsAnalyses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInsightsAnalyses(response, &metadata) - } - output := &DescribeNetworkInsightsAnalysesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInsightsAnalyses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInsightsPaths struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInsightsPaths) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInsightsPaths) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInsightsPaths(response, &metadata) - } - output := &DescribeNetworkInsightsPathsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInsightsPaths(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInterfaceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInterfaceAttribute(response, &metadata) - } - output := &DescribeNetworkInterfaceAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInterfaceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInterfacePermissions struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInterfacePermissions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInterfacePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInterfacePermissions(response, &metadata) - } - output := &DescribeNetworkInterfacePermissionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInterfacePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeNetworkInterfaces struct { -} - -func (*awsEc2query_deserializeOpDescribeNetworkInterfaces) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeNetworkInterfaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeNetworkInterfaces(response, &metadata) - } - output := &DescribeNetworkInterfacesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeNetworkInterfaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribePlacementGroups struct { -} - -func (*awsEc2query_deserializeOpDescribePlacementGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribePlacementGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribePlacementGroups(response, &metadata) - } - output := &DescribePlacementGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribePlacementGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribePrefixLists struct { -} - -func (*awsEc2query_deserializeOpDescribePrefixLists) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribePrefixLists) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribePrefixLists(response, &metadata) - } - output := &DescribePrefixListsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribePrefixLists(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribePrincipalIdFormat struct { -} - -func (*awsEc2query_deserializeOpDescribePrincipalIdFormat) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribePrincipalIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribePrincipalIdFormat(response, &metadata) - } - output := &DescribePrincipalIdFormatOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribePrincipalIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribePublicIpv4Pools struct { -} - -func (*awsEc2query_deserializeOpDescribePublicIpv4Pools) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribePublicIpv4Pools) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribePublicIpv4Pools(response, &metadata) - } - output := &DescribePublicIpv4PoolsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribePublicIpv4Pools(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeRegions struct { -} - -func (*awsEc2query_deserializeOpDescribeRegions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeRegions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeRegions(response, &metadata) - } - output := &DescribeRegionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeRegionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeRegions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeReplaceRootVolumeTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeReplaceRootVolumeTasks(response, &metadata) - } - output := &DescribeReplaceRootVolumeTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeReplaceRootVolumeTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeReservedInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeReservedInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeReservedInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeReservedInstances(response, &metadata) - } - output := &DescribeReservedInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeReservedInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeReservedInstancesListings struct { -} - -func (*awsEc2query_deserializeOpDescribeReservedInstancesListings) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeReservedInstancesListings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeReservedInstancesListings(response, &metadata) - } - output := &DescribeReservedInstancesListingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeReservedInstancesListings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeReservedInstancesModifications struct { -} - -func (*awsEc2query_deserializeOpDescribeReservedInstancesModifications) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeReservedInstancesModifications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeReservedInstancesModifications(response, &metadata) - } - output := &DescribeReservedInstancesModificationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeReservedInstancesModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeReservedInstancesOfferings struct { -} - -func (*awsEc2query_deserializeOpDescribeReservedInstancesOfferings) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeReservedInstancesOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeReservedInstancesOfferings(response, &metadata) - } - output := &DescribeReservedInstancesOfferingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeReservedInstancesOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeRouteTables struct { -} - -func (*awsEc2query_deserializeOpDescribeRouteTables) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeRouteTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeRouteTables(response, &metadata) - } - output := &DescribeRouteTablesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeRouteTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeScheduledInstanceAvailability struct { -} - -func (*awsEc2query_deserializeOpDescribeScheduledInstanceAvailability) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeScheduledInstanceAvailability) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeScheduledInstanceAvailability(response, &metadata) - } - output := &DescribeScheduledInstanceAvailabilityOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeScheduledInstanceAvailability(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeScheduledInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeScheduledInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeScheduledInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeScheduledInstances(response, &metadata) - } - output := &DescribeScheduledInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeScheduledInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSecurityGroupReferences struct { -} - -func (*awsEc2query_deserializeOpDescribeSecurityGroupReferences) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSecurityGroupReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSecurityGroupReferences(response, &metadata) - } - output := &DescribeSecurityGroupReferencesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSecurityGroupReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSecurityGroupRules struct { -} - -func (*awsEc2query_deserializeOpDescribeSecurityGroupRules) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSecurityGroupRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSecurityGroupRules(response, &metadata) - } - output := &DescribeSecurityGroupRulesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSecurityGroupRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSecurityGroups struct { -} - -func (*awsEc2query_deserializeOpDescribeSecurityGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSecurityGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSecurityGroups(response, &metadata) - } - output := &DescribeSecurityGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSecurityGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSnapshotAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeSnapshotAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSnapshotAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response, &metadata) - } - output := &DescribeSnapshotAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSnapshotAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSnapshots struct { -} - -func (*awsEc2query_deserializeOpDescribeSnapshots) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSnapshots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshots(response, &metadata) - } - output := &DescribeSnapshotsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSnapshots(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSnapshotTierStatus struct { -} - -func (*awsEc2query_deserializeOpDescribeSnapshotTierStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSnapshotTierStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response, &metadata) - } - output := &DescribeSnapshotTierStatusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSnapshotTierStatusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSnapshotTierStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSpotDatafeedSubscription struct { -} - -func (*awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSpotDatafeedSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response, &metadata) - } - output := &DescribeSpotDatafeedSubscriptionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotDatafeedSubscriptionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSpotDatafeedSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSpotFleetInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeSpotFleetInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSpotFleetInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response, &metadata) - } - output := &DescribeSpotFleetInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotFleetInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSpotFleetInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSpotFleetRequestHistory struct { -} - -func (*awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSpotFleetRequestHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotFleetRequestHistory(response, &metadata) - } - output := &DescribeSpotFleetRequestHistoryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestHistoryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSpotFleetRequestHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSpotFleetRequests struct { -} - -func (*awsEc2query_deserializeOpDescribeSpotFleetRequests) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSpotFleetRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotFleetRequests(response, &metadata) - } - output := &DescribeSpotFleetRequestsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSpotFleetRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSpotInstanceRequests struct { -} - -func (*awsEc2query_deserializeOpDescribeSpotInstanceRequests) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSpotInstanceRequests) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotInstanceRequests(response, &metadata) - } - output := &DescribeSpotInstanceRequestsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotInstanceRequestsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSpotInstanceRequests(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSpotPriceHistory struct { -} - -func (*awsEc2query_deserializeOpDescribeSpotPriceHistory) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSpotPriceHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSpotPriceHistory(response, &metadata) - } - output := &DescribeSpotPriceHistoryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSpotPriceHistoryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSpotPriceHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeStaleSecurityGroups struct { -} - -func (*awsEc2query_deserializeOpDescribeStaleSecurityGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeStaleSecurityGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeStaleSecurityGroups(response, &metadata) - } - output := &DescribeStaleSecurityGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeStaleSecurityGroupsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeStaleSecurityGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeStoreImageTasks struct { -} - -func (*awsEc2query_deserializeOpDescribeStoreImageTasks) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeStoreImageTasks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeStoreImageTasks(response, &metadata) - } - output := &DescribeStoreImageTasksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeStoreImageTasksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeStoreImageTasks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeSubnets struct { -} - -func (*awsEc2query_deserializeOpDescribeSubnets) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeSubnets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeSubnets(response, &metadata) - } - output := &DescribeSubnetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeSubnetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeSubnets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTags struct { -} - -func (*awsEc2query_deserializeOpDescribeTags) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTags(response, &metadata) - } - output := &DescribeTagsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTagsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTrafficMirrorFilters struct { -} - -func (*awsEc2query_deserializeOpDescribeTrafficMirrorFilters) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTrafficMirrorFilters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTrafficMirrorFilters(response, &metadata) - } - output := &DescribeTrafficMirrorFiltersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTrafficMirrorFiltersOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTrafficMirrorFilters(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTrafficMirrorSessions struct { -} - -func (*awsEc2query_deserializeOpDescribeTrafficMirrorSessions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTrafficMirrorSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTrafficMirrorSessions(response, &metadata) - } - output := &DescribeTrafficMirrorSessionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTrafficMirrorSessionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTrafficMirrorSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTrafficMirrorTargets struct { -} - -func (*awsEc2query_deserializeOpDescribeTrafficMirrorTargets) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTrafficMirrorTargets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTrafficMirrorTargets(response, &metadata) - } - output := &DescribeTrafficMirrorTargetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTrafficMirrorTargetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTrafficMirrorTargets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayAttachments struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayAttachments) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayAttachments(response, &metadata) - } - output := &DescribeTransitGatewayAttachmentsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayAttachmentsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayConnectPeers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayConnectPeers(response, &metadata) - } - output := &DescribeTransitGatewayConnectPeersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectPeersOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayConnectPeers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayConnects struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayConnects) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayConnects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayConnects(response, &metadata) - } - output := &DescribeTransitGatewayConnectsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayConnects(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayMulticastDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayMulticastDomains(response, &metadata) - } - output := &DescribeTransitGatewayMulticastDomainsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayMulticastDomainsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayMulticastDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayPeeringAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayPeeringAttachments(response, &metadata) - } - output := &DescribeTransitGatewayPeeringAttachmentsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayPeeringAttachmentsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayPeeringAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayPolicyTables struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayPolicyTables) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayPolicyTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayPolicyTables(response, &metadata) - } - output := &DescribeTransitGatewayPolicyTablesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayPolicyTablesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayPolicyTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayRouteTableAnnouncements struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayRouteTableAnnouncements) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayRouteTableAnnouncements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayRouteTableAnnouncements(response, &metadata) - } - output := &DescribeTransitGatewayRouteTableAnnouncementsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayRouteTableAnnouncementsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayRouteTableAnnouncements(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayRouteTables struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayRouteTables) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayRouteTables) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayRouteTables(response, &metadata) - } - output := &DescribeTransitGatewayRouteTablesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayRouteTablesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayRouteTables(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGateways(response, &metadata) - } - output := &DescribeTransitGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments struct { -} - -func (*awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTransitGatewayVpcAttachments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTransitGatewayVpcAttachments(response, &metadata) - } - output := &DescribeTransitGatewayVpcAttachmentsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTransitGatewayVpcAttachmentsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTransitGatewayVpcAttachments(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations struct { -} - -func (*awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeTrunkInterfaceAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeTrunkInterfaceAssociations(response, &metadata) - } - output := &DescribeTrunkInterfaceAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeTrunkInterfaceAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeTrunkInterfaceAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVerifiedAccessEndpoints struct { -} - -func (*awsEc2query_deserializeOpDescribeVerifiedAccessEndpoints) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVerifiedAccessEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVerifiedAccessEndpoints(response, &metadata) - } - output := &DescribeVerifiedAccessEndpointsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVerifiedAccessEndpointsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVerifiedAccessEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVerifiedAccessGroups struct { -} - -func (*awsEc2query_deserializeOpDescribeVerifiedAccessGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVerifiedAccessGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVerifiedAccessGroups(response, &metadata) - } - output := &DescribeVerifiedAccessGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVerifiedAccessGroupsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVerifiedAccessGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVerifiedAccessInstanceLoggingConfigurations struct { -} - -func (*awsEc2query_deserializeOpDescribeVerifiedAccessInstanceLoggingConfigurations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVerifiedAccessInstanceLoggingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVerifiedAccessInstanceLoggingConfigurations(response, &metadata) - } - output := &DescribeVerifiedAccessInstanceLoggingConfigurationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVerifiedAccessInstanceLoggingConfigurationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVerifiedAccessInstanceLoggingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVerifiedAccessInstances struct { -} - -func (*awsEc2query_deserializeOpDescribeVerifiedAccessInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVerifiedAccessInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVerifiedAccessInstances(response, &metadata) - } - output := &DescribeVerifiedAccessInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVerifiedAccessInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVerifiedAccessInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVerifiedAccessTrustProviders struct { -} - -func (*awsEc2query_deserializeOpDescribeVerifiedAccessTrustProviders) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVerifiedAccessTrustProviders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVerifiedAccessTrustProviders(response, &metadata) - } - output := &DescribeVerifiedAccessTrustProvidersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVerifiedAccessTrustProvidersOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVerifiedAccessTrustProviders(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVolumeAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeVolumeAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVolumeAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVolumeAttribute(response, &metadata) - } - output := &DescribeVolumeAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVolumeAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVolumeAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVolumes struct { -} - -func (*awsEc2query_deserializeOpDescribeVolumes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVolumes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVolumes(response, &metadata) - } - output := &DescribeVolumesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVolumesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVolumes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVolumesModifications struct { -} - -func (*awsEc2query_deserializeOpDescribeVolumesModifications) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVolumesModifications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVolumesModifications(response, &metadata) - } - output := &DescribeVolumesModificationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVolumesModificationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVolumesModifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVolumeStatus struct { -} - -func (*awsEc2query_deserializeOpDescribeVolumeStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVolumeStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVolumeStatus(response, &metadata) - } - output := &DescribeVolumeStatusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVolumeStatusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVolumeStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcAttribute struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcAttribute(response, &metadata) - } - output := &DescribeVpcAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcClassicLink struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcClassicLink) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcClassicLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcClassicLink(response, &metadata) - } - output := &DescribeVpcClassicLinkOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcClassicLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcClassicLinkDnsSupport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcClassicLinkDnsSupport(response, &metadata) - } - output := &DescribeVpcClassicLinkDnsSupportOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkDnsSupportOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcClassicLinkDnsSupport(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcEndpointConnectionNotifications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcEndpointConnectionNotifications(response, &metadata) - } - output := &DescribeVpcEndpointConnectionNotificationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionNotificationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcEndpointConnectionNotifications(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcEndpointConnections struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcEndpointConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcEndpointConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcEndpointConnections(response, &metadata) - } - output := &DescribeVpcEndpointConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcEndpointConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcEndpoints struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcEndpoints) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcEndpoints(response, &metadata) - } - output := &DescribeVpcEndpointsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcEndpointsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcEndpointServiceConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcEndpointServiceConfigurations(response, &metadata) - } - output := &DescribeVpcEndpointServiceConfigurationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcEndpointServiceConfigurationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcEndpointServiceConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcEndpointServicePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcEndpointServicePermissions(response, &metadata) - } - output := &DescribeVpcEndpointServicePermissionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicePermissionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcEndpointServicePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcEndpointServices struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcEndpointServices) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcEndpointServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcEndpointServices(response, &metadata) - } - output := &DescribeVpcEndpointServicesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcEndpointServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcPeeringConnections struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcPeeringConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcPeeringConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcPeeringConnections(response, &metadata) - } - output := &DescribeVpcPeeringConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcPeeringConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcPeeringConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpcs struct { -} - -func (*awsEc2query_deserializeOpDescribeVpcs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpcs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpcs(response, &metadata) - } - output := &DescribeVpcsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpcsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpcs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpnConnections struct { -} - -func (*awsEc2query_deserializeOpDescribeVpnConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpnConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpnConnections(response, &metadata) - } - output := &DescribeVpnConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpnConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpnConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDescribeVpnGateways struct { -} - -func (*awsEc2query_deserializeOpDescribeVpnGateways) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDescribeVpnGateways) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDescribeVpnGateways(response, &metadata) - } - output := &DescribeVpnGatewaysOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDescribeVpnGatewaysOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDescribeVpnGateways(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDetachClassicLinkVpc struct { -} - -func (*awsEc2query_deserializeOpDetachClassicLinkVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDetachClassicLinkVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDetachClassicLinkVpc(response, &metadata) - } - output := &DetachClassicLinkVpcOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDetachClassicLinkVpcOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDetachClassicLinkVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDetachInternetGateway struct { -} - -func (*awsEc2query_deserializeOpDetachInternetGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDetachInternetGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDetachInternetGateway(response, &metadata) - } - output := &DetachInternetGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDetachInternetGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDetachNetworkInterface struct { -} - -func (*awsEc2query_deserializeOpDetachNetworkInterface) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDetachNetworkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDetachNetworkInterface(response, &metadata) - } - output := &DetachNetworkInterfaceOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDetachNetworkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDetachVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_deserializeOpDetachVerifiedAccessTrustProvider) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDetachVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDetachVerifiedAccessTrustProvider(response, &metadata) - } - output := &DetachVerifiedAccessTrustProviderOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDetachVerifiedAccessTrustProviderOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDetachVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDetachVolume struct { -} - -func (*awsEc2query_deserializeOpDetachVolume) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDetachVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDetachVolume(response, &metadata) - } - output := &DetachVolumeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDetachVolumeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDetachVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDetachVpnGateway struct { -} - -func (*awsEc2query_deserializeOpDetachVpnGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDetachVpnGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDetachVpnGateway(response, &metadata) - } - output := &DetachVpnGatewayOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDetachVpnGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableAddressTransfer struct { -} - -func (*awsEc2query_deserializeOpDisableAddressTransfer) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableAddressTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableAddressTransfer(response, &metadata) - } - output := &DisableAddressTransferOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableAddressTransferOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableAddressTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableAwsNetworkPerformanceMetricSubscription struct { -} - -func (*awsEc2query_deserializeOpDisableAwsNetworkPerformanceMetricSubscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableAwsNetworkPerformanceMetricSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableAwsNetworkPerformanceMetricSubscription(response, &metadata) - } - output := &DisableAwsNetworkPerformanceMetricSubscriptionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableAwsNetworkPerformanceMetricSubscriptionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableAwsNetworkPerformanceMetricSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableEbsEncryptionByDefault struct { -} - -func (*awsEc2query_deserializeOpDisableEbsEncryptionByDefault) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableEbsEncryptionByDefault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableEbsEncryptionByDefault(response, &metadata) - } - output := &DisableEbsEncryptionByDefaultOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableEbsEncryptionByDefaultOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableEbsEncryptionByDefault(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableFastLaunch struct { -} - -func (*awsEc2query_deserializeOpDisableFastLaunch) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableFastLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableFastLaunch(response, &metadata) - } - output := &DisableFastLaunchOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableFastLaunchOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableFastLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableFastSnapshotRestores struct { -} - -func (*awsEc2query_deserializeOpDisableFastSnapshotRestores) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableFastSnapshotRestores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableFastSnapshotRestores(response, &metadata) - } - output := &DisableFastSnapshotRestoresOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableFastSnapshotRestoresOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableFastSnapshotRestores(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableImage struct { -} - -func (*awsEc2query_deserializeOpDisableImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableImage(response, &metadata) - } - output := &DisableImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableImageBlockPublicAccess struct { -} - -func (*awsEc2query_deserializeOpDisableImageBlockPublicAccess) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableImageBlockPublicAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableImageBlockPublicAccess(response, &metadata) - } - output := &DisableImageBlockPublicAccessOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableImageBlockPublicAccessOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableImageBlockPublicAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableImageDeprecation struct { -} - -func (*awsEc2query_deserializeOpDisableImageDeprecation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableImageDeprecation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableImageDeprecation(response, &metadata) - } - output := &DisableImageDeprecationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableImageDeprecationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableImageDeprecation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableIpamOrganizationAdminAccount struct { -} - -func (*awsEc2query_deserializeOpDisableIpamOrganizationAdminAccount) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableIpamOrganizationAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableIpamOrganizationAdminAccount(response, &metadata) - } - output := &DisableIpamOrganizationAdminAccountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableIpamOrganizationAdminAccountOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableIpamOrganizationAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableSerialConsoleAccess struct { -} - -func (*awsEc2query_deserializeOpDisableSerialConsoleAccess) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableSerialConsoleAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableSerialConsoleAccess(response, &metadata) - } - output := &DisableSerialConsoleAccessOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableSerialConsoleAccessOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableSerialConsoleAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableSnapshotBlockPublicAccess struct { -} - -func (*awsEc2query_deserializeOpDisableSnapshotBlockPublicAccess) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableSnapshotBlockPublicAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableSnapshotBlockPublicAccess(response, &metadata) - } - output := &DisableSnapshotBlockPublicAccessOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableSnapshotBlockPublicAccessOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableSnapshotBlockPublicAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation struct { -} - -func (*awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableTransitGatewayRouteTablePropagation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableTransitGatewayRouteTablePropagation(response, &metadata) - } - output := &DisableTransitGatewayRouteTablePropagationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableTransitGatewayRouteTablePropagationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableTransitGatewayRouteTablePropagation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableVgwRoutePropagation struct { -} - -func (*awsEc2query_deserializeOpDisableVgwRoutePropagation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableVgwRoutePropagation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableVgwRoutePropagation(response, &metadata) - } - output := &DisableVgwRoutePropagationOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableVgwRoutePropagation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableVpcClassicLink struct { -} - -func (*awsEc2query_deserializeOpDisableVpcClassicLink) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableVpcClassicLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableVpcClassicLink(response, &metadata) - } - output := &DisableVpcClassicLinkOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableVpcClassicLinkOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableVpcClassicLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport struct { -} - -func (*awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisableVpcClassicLinkDnsSupport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisableVpcClassicLinkDnsSupport(response, &metadata) - } - output := &DisableVpcClassicLinkDnsSupportOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisableVpcClassicLinkDnsSupportOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisableVpcClassicLinkDnsSupport(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateAddress struct { -} - -func (*awsEc2query_deserializeOpDisassociateAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateAddress(response, &metadata) - } - output := &DisassociateAddressOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork struct { -} - -func (*awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateClientVpnTargetNetwork) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateClientVpnTargetNetwork(response, &metadata) - } - output := &DisassociateClientVpnTargetNetworkOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateClientVpnTargetNetworkOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateClientVpnTargetNetwork(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole struct { -} - -func (*awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateEnclaveCertificateIamRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateEnclaveCertificateIamRole(response, &metadata) - } - output := &DisassociateEnclaveCertificateIamRoleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateEnclaveCertificateIamRoleOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateEnclaveCertificateIamRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateIamInstanceProfile struct { -} - -func (*awsEc2query_deserializeOpDisassociateIamInstanceProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateIamInstanceProfile) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateIamInstanceProfile(response, &metadata) - } - output := &DisassociateIamInstanceProfileOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateIamInstanceProfileOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateIamInstanceProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateInstanceEventWindow struct { -} - -func (*awsEc2query_deserializeOpDisassociateInstanceEventWindow) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateInstanceEventWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateInstanceEventWindow(response, &metadata) - } - output := &DisassociateInstanceEventWindowOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateInstanceEventWindowOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateInstanceEventWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateIpamByoasn struct { -} - -func (*awsEc2query_deserializeOpDisassociateIpamByoasn) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateIpamByoasn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateIpamByoasn(response, &metadata) - } - output := &DisassociateIpamByoasnOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateIpamByoasnOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateIpamByoasn(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateIpamResourceDiscovery struct { -} - -func (*awsEc2query_deserializeOpDisassociateIpamResourceDiscovery) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateIpamResourceDiscovery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateIpamResourceDiscovery(response, &metadata) - } - output := &DisassociateIpamResourceDiscoveryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateIpamResourceDiscoveryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateIpamResourceDiscovery(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateNatGatewayAddress struct { -} - -func (*awsEc2query_deserializeOpDisassociateNatGatewayAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateNatGatewayAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateNatGatewayAddress(response, &metadata) - } - output := &DisassociateNatGatewayAddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateNatGatewayAddressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateNatGatewayAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateRouteTable struct { -} - -func (*awsEc2query_deserializeOpDisassociateRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateRouteTable(response, &metadata) - } - output := &DisassociateRouteTableOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateSubnetCidrBlock struct { -} - -func (*awsEc2query_deserializeOpDisassociateSubnetCidrBlock) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateSubnetCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response, &metadata) - } - output := &DisassociateSubnetCidrBlockOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateSubnetCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateTransitGatewayMulticastDomain) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(response, &metadata) - } - output := &DisassociateTransitGatewayMulticastDomainOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayMulticastDomainOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateTransitGatewayMulticastDomain(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateTransitGatewayPolicyTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(response, &metadata) - } - output := &DisassociateTransitGatewayPolicyTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayPolicyTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateTransitGatewayPolicyTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable struct { -} - -func (*awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateTransitGatewayRouteTable) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response, &metadata) - } - output := &DisassociateTransitGatewayRouteTableOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTransitGatewayRouteTableOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateTransitGatewayRouteTable(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateTrunkInterface struct { -} - -func (*awsEc2query_deserializeOpDisassociateTrunkInterface) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateTrunkInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response, &metadata) - } - output := &DisassociateTrunkInterfaceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateTrunkInterfaceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateTrunkInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpDisassociateVpcCidrBlock struct { -} - -func (*awsEc2query_deserializeOpDisassociateVpcCidrBlock) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpDisassociateVpcCidrBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response, &metadata) - } - output := &DisassociateVpcCidrBlockOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentDisassociateVpcCidrBlockOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorDisassociateVpcCidrBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableAddressTransfer struct { -} - -func (*awsEc2query_deserializeOpEnableAddressTransfer) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableAddressTransfer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableAddressTransfer(response, &metadata) - } - output := &EnableAddressTransferOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableAddressTransferOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableAddressTransfer(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription struct { -} - -func (*awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableAwsNetworkPerformanceMetricSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription(response, &metadata) - } - output := &EnableAwsNetworkPerformanceMetricSubscriptionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableAwsNetworkPerformanceMetricSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableEbsEncryptionByDefault struct { -} - -func (*awsEc2query_deserializeOpEnableEbsEncryptionByDefault) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableEbsEncryptionByDefault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response, &metadata) - } - output := &EnableEbsEncryptionByDefaultOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableEbsEncryptionByDefaultOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableEbsEncryptionByDefault(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableFastLaunch struct { -} - -func (*awsEc2query_deserializeOpEnableFastLaunch) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableFastLaunch) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableFastLaunch(response, &metadata) - } - output := &EnableFastLaunchOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableFastLaunchOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableFastLaunch(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableFastSnapshotRestores struct { -} - -func (*awsEc2query_deserializeOpEnableFastSnapshotRestores) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableFastSnapshotRestores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response, &metadata) - } - output := &EnableFastSnapshotRestoresOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableFastSnapshotRestores(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableImage struct { -} - -func (*awsEc2query_deserializeOpEnableImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImage(response, &metadata) - } - output := &EnableImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableImageBlockPublicAccess struct { -} - -func (*awsEc2query_deserializeOpEnableImageBlockPublicAccess) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableImageBlockPublicAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response, &metadata) - } - output := &EnableImageBlockPublicAccessOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageBlockPublicAccessOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableImageBlockPublicAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableImageDeprecation struct { -} - -func (*awsEc2query_deserializeOpEnableImageDeprecation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableImageDeprecation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableImageDeprecation(response, &metadata) - } - output := &EnableImageDeprecationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableImageDeprecation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount struct { -} - -func (*awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableIpamOrganizationAdminAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(response, &metadata) - } - output := &EnableIpamOrganizationAdminAccountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableIpamOrganizationAdminAccountOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableIpamOrganizationAdminAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing struct { -} - -func (*awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableReachabilityAnalyzerOrganizationSharing) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing(response, &metadata) - } - output := &EnableReachabilityAnalyzerOrganizationSharingOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableReachabilityAnalyzerOrganizationSharing(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableSerialConsoleAccess struct { -} - -func (*awsEc2query_deserializeOpEnableSerialConsoleAccess) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableSerialConsoleAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response, &metadata) - } - output := &EnableSerialConsoleAccessOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableSerialConsoleAccessOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableSerialConsoleAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess struct { -} - -func (*awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableSnapshotBlockPublicAccess) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(response, &metadata) - } - output := &EnableSnapshotBlockPublicAccessOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableSnapshotBlockPublicAccessOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableSnapshotBlockPublicAccess(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation struct { -} - -func (*awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableTransitGatewayRouteTablePropagation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(response, &metadata) - } - output := &EnableTransitGatewayRouteTablePropagationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableTransitGatewayRouteTablePropagationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableTransitGatewayRouteTablePropagation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableVgwRoutePropagation struct { -} - -func (*awsEc2query_deserializeOpEnableVgwRoutePropagation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableVgwRoutePropagation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(response, &metadata) - } - output := &EnableVgwRoutePropagationOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableVgwRoutePropagation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableVolumeIO struct { -} - -func (*awsEc2query_deserializeOpEnableVolumeIO) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableVolumeIO) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVolumeIO(response, &metadata) - } - output := &EnableVolumeIOOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableVolumeIO(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableVpcClassicLink struct { -} - -func (*awsEc2query_deserializeOpEnableVpcClassicLink) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableVpcClassicLink) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVpcClassicLink(response, &metadata) - } - output := &EnableVpcClassicLinkOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableVpcClassicLink(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport struct { -} - -func (*awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpEnableVpcClassicLinkDnsSupport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response, &metadata) - } - output := &EnableVpcClassicLinkDnsSupportOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentEnableVpcClassicLinkDnsSupportOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorEnableVpcClassicLinkDnsSupport(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList struct { -} - -func (*awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpExportClientVpnClientCertificateRevocationList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(response, &metadata) - } - output := &ExportClientVpnClientCertificateRevocationListOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportClientVpnClientCertificateRevocationListOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorExportClientVpnClientCertificateRevocationList(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpExportClientVpnClientConfiguration struct { -} - -func (*awsEc2query_deserializeOpExportClientVpnClientConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpExportClientVpnClientConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response, &metadata) - } - output := &ExportClientVpnClientConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportClientVpnClientConfigurationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorExportClientVpnClientConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpExportImage struct { -} - -func (*awsEc2query_deserializeOpExportImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpExportImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportImage(response, &metadata) - } - output := &ExportImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorExportImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpExportTransitGatewayRoutes struct { -} - -func (*awsEc2query_deserializeOpExportTransitGatewayRoutes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpExportTransitGatewayRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response, &metadata) - } - output := &ExportTransitGatewayRoutesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentExportTransitGatewayRoutesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorExportTransitGatewayRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles struct { -} - -func (*awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetAssociatedEnclaveCertificateIamRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(response, &metadata) - } - output := &GetAssociatedEnclaveCertificateIamRolesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetAssociatedEnclaveCertificateIamRolesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetAssociatedEnclaveCertificateIamRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs struct { -} - -func (*awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetAssociatedIpv6PoolCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response, &metadata) - } - output := &GetAssociatedIpv6PoolCidrsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetAssociatedIpv6PoolCidrsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetAssociatedIpv6PoolCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetAwsNetworkPerformanceData struct { -} - -func (*awsEc2query_deserializeOpGetAwsNetworkPerformanceData) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetAwsNetworkPerformanceData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(response, &metadata) - } - output := &GetAwsNetworkPerformanceDataOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetAwsNetworkPerformanceDataOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetAwsNetworkPerformanceData(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetCapacityReservationUsage struct { -} - -func (*awsEc2query_deserializeOpGetCapacityReservationUsage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetCapacityReservationUsage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response, &metadata) - } - output := &GetCapacityReservationUsageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetCapacityReservationUsageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetCapacityReservationUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetCoipPoolUsage struct { -} - -func (*awsEc2query_deserializeOpGetCoipPoolUsage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetCoipPoolUsage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetCoipPoolUsage(response, &metadata) - } - output := &GetCoipPoolUsageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetCoipPoolUsage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetConsoleOutput struct { -} - -func (*awsEc2query_deserializeOpGetConsoleOutput) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetConsoleOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetConsoleOutput(response, &metadata) - } - output := &GetConsoleOutputOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetConsoleOutputOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetConsoleOutput(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetConsoleScreenshot struct { -} - -func (*awsEc2query_deserializeOpGetConsoleScreenshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetConsoleScreenshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetConsoleScreenshot(response, &metadata) - } - output := &GetConsoleScreenshotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetConsoleScreenshotOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetConsoleScreenshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetDefaultCreditSpecification struct { -} - -func (*awsEc2query_deserializeOpGetDefaultCreditSpecification) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetDefaultCreditSpecification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response, &metadata) - } - output := &GetDefaultCreditSpecificationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetDefaultCreditSpecificationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetDefaultCreditSpecification(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetEbsDefaultKmsKeyId struct { -} - -func (*awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetEbsDefaultKmsKeyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response, &metadata) - } - output := &GetEbsDefaultKmsKeyIdOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetEbsDefaultKmsKeyIdOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetEbsDefaultKmsKeyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetEbsEncryptionByDefault struct { -} - -func (*awsEc2query_deserializeOpGetEbsEncryptionByDefault) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetEbsEncryptionByDefault) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response, &metadata) - } - output := &GetEbsEncryptionByDefaultOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetEbsEncryptionByDefaultOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetEbsEncryptionByDefault(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate struct { -} - -func (*awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetFlowLogsIntegrationTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response, &metadata) - } - output := &GetFlowLogsIntegrationTemplateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetFlowLogsIntegrationTemplateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetFlowLogsIntegrationTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetGroupsForCapacityReservation struct { -} - -func (*awsEc2query_deserializeOpGetGroupsForCapacityReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetGroupsForCapacityReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response, &metadata) - } - output := &GetGroupsForCapacityReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetGroupsForCapacityReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetGroupsForCapacityReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetHostReservationPurchasePreview struct { -} - -func (*awsEc2query_deserializeOpGetHostReservationPurchasePreview) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetHostReservationPurchasePreview) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response, &metadata) - } - output := &GetHostReservationPurchasePreviewOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetHostReservationPurchasePreview(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetImageBlockPublicAccessState struct { -} - -func (*awsEc2query_deserializeOpGetImageBlockPublicAccessState) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetImageBlockPublicAccessState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response, &metadata) - } - output := &GetImageBlockPublicAccessStateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetImageBlockPublicAccessStateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetImageBlockPublicAccessState(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements struct { -} - -func (*awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetInstanceTypesFromInstanceRequirements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(response, &metadata) - } - output := &GetInstanceTypesFromInstanceRequirementsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetInstanceTypesFromInstanceRequirementsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetInstanceTypesFromInstanceRequirements(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetInstanceUefiData struct { -} - -func (*awsEc2query_deserializeOpGetInstanceUefiData) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetInstanceUefiData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetInstanceUefiData(response, &metadata) - } - output := &GetInstanceUefiDataOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetInstanceUefiDataOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetInstanceUefiData(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamAddressHistory struct { -} - -func (*awsEc2query_deserializeOpGetIpamAddressHistory) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamAddressHistory) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamAddressHistory(response, &metadata) - } - output := &GetIpamAddressHistoryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamAddressHistoryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamAddressHistory(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamDiscoveredAccounts struct { -} - -func (*awsEc2query_deserializeOpGetIpamDiscoveredAccounts) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamDiscoveredAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(response, &metadata) - } - output := &GetIpamDiscoveredAccountsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredAccountsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamDiscoveredAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses struct { -} - -func (*awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamDiscoveredPublicAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(response, &metadata) - } - output := &GetIpamDiscoveredPublicAddressesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredPublicAddressesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamDiscoveredPublicAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs struct { -} - -func (*awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamDiscoveredResourceCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(response, &metadata) - } - output := &GetIpamDiscoveredResourceCidrsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamDiscoveredResourceCidrsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamDiscoveredResourceCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamPoolAllocations struct { -} - -func (*awsEc2query_deserializeOpGetIpamPoolAllocations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamPoolAllocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamPoolAllocations(response, &metadata) - } - output := &GetIpamPoolAllocationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamPoolAllocationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamPoolAllocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamPoolCidrs struct { -} - -func (*awsEc2query_deserializeOpGetIpamPoolCidrs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamPoolCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamPoolCidrs(response, &metadata) - } - output := &GetIpamPoolCidrsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamPoolCidrsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamPoolCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetIpamResourceCidrs struct { -} - -func (*awsEc2query_deserializeOpGetIpamResourceCidrs) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetIpamResourceCidrs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetIpamResourceCidrs(response, &metadata) - } - output := &GetIpamResourceCidrsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetIpamResourceCidrsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetIpamResourceCidrs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetLaunchTemplateData struct { -} - -func (*awsEc2query_deserializeOpGetLaunchTemplateData) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetLaunchTemplateData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetLaunchTemplateData(response, &metadata) - } - output := &GetLaunchTemplateDataOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetLaunchTemplateDataOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetLaunchTemplateData(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetManagedPrefixListAssociations struct { -} - -func (*awsEc2query_deserializeOpGetManagedPrefixListAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetManagedPrefixListAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response, &metadata) - } - output := &GetManagedPrefixListAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetManagedPrefixListAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetManagedPrefixListAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetManagedPrefixListEntries struct { -} - -func (*awsEc2query_deserializeOpGetManagedPrefixListEntries) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetManagedPrefixListEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response, &metadata) - } - output := &GetManagedPrefixListEntriesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetManagedPrefixListEntriesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetManagedPrefixListEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings struct { -} - -func (*awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeAnalysisFindings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings(response, &metadata) - } - output := &GetNetworkInsightsAccessScopeAnalysisFindingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeAnalysisFindings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent struct { -} - -func (*awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetNetworkInsightsAccessScopeContent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(response, &metadata) - } - output := &GetNetworkInsightsAccessScopeContentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeContentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetNetworkInsightsAccessScopeContent(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetPasswordData struct { -} - -func (*awsEc2query_deserializeOpGetPasswordData) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetPasswordData) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetPasswordData(response, &metadata) - } - output := &GetPasswordDataOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetPasswordDataOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetPasswordData(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetReservedInstancesExchangeQuote struct { -} - -func (*awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetReservedInstancesExchangeQuote) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response, &metadata) - } - output := &GetReservedInstancesExchangeQuoteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetReservedInstancesExchangeQuote(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetSecurityGroupsForVpc struct { -} - -func (*awsEc2query_deserializeOpGetSecurityGroupsForVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetSecurityGroupsForVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response, &metadata) - } - output := &GetSecurityGroupsForVpcOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSecurityGroupsForVpcOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetSecurityGroupsForVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetSerialConsoleAccessStatus struct { -} - -func (*awsEc2query_deserializeOpGetSerialConsoleAccessStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetSerialConsoleAccessStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response, &metadata) - } - output := &GetSerialConsoleAccessStatusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetSerialConsoleAccessStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState struct { -} - -func (*awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetSnapshotBlockPublicAccessState) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(response, &metadata) - } - output := &GetSnapshotBlockPublicAccessStateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSnapshotBlockPublicAccessStateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetSnapshotBlockPublicAccessState(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetSpotPlacementScores struct { -} - -func (*awsEc2query_deserializeOpGetSpotPlacementScores) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetSpotPlacementScores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSpotPlacementScores(response, &metadata) - } - output := &GetSpotPlacementScoresOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSpotPlacementScoresOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetSpotPlacementScores(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetSubnetCidrReservations struct { -} - -func (*awsEc2query_deserializeOpGetSubnetCidrReservations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetSubnetCidrReservations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response, &metadata) - } - output := &GetSubnetCidrReservationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetSubnetCidrReservationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetSubnetCidrReservations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayAttachmentPropagations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(response, &metadata) - } - output := &GetTransitGatewayAttachmentPropagationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayAttachmentPropagationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayAttachmentPropagations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayMulticastDomainAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(response, &metadata) - } - output := &GetTransitGatewayMulticastDomainAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayMulticastDomainAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(response, &metadata) - } - output := &GetTransitGatewayPolicyTableAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayPolicyTableEntries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(response, &metadata) - } - output := &GetTransitGatewayPolicyTableEntriesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableEntriesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayPolicyTableEntries(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayPrefixListReferences) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(response, &metadata) - } - output := &GetTransitGatewayPrefixListReferencesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayPrefixListReferencesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayPrefixListReferences(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTableAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(response, &metadata) - } - output := &GetTransitGatewayRouteTableAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTableAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTableAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations struct { -} - -func (*awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetTransitGatewayRouteTablePropagations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(response, &metadata) - } - output := &GetTransitGatewayRouteTablePropagationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTablePropagationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetTransitGatewayRouteTablePropagations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy struct { -} - -func (*awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetVerifiedAccessEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(response, &metadata) - } - output := &GetVerifiedAccessEndpointPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVerifiedAccessEndpointPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetVerifiedAccessEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy struct { -} - -func (*awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetVerifiedAccessGroupPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(response, &metadata) - } - output := &GetVerifiedAccessGroupPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVerifiedAccessGroupPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetVerifiedAccessGroupPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration struct { -} - -func (*awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceSampleConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(response, &metadata) - } - output := &GetVpnConnectionDeviceSampleConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceSampleConfigurationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceSampleConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetVpnConnectionDeviceTypes struct { -} - -func (*awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetVpnConnectionDeviceTypes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response, &metadata) - } - output := &GetVpnConnectionDeviceTypesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceTypesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetVpnConnectionDeviceTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpGetVpnTunnelReplacementStatus struct { -} - -func (*awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpGetVpnTunnelReplacementStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(response, &metadata) - } - output := &GetVpnTunnelReplacementStatusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentGetVpnTunnelReplacementStatusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorGetVpnTunnelReplacementStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList struct { -} - -func (*awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpImportClientVpnClientCertificateRevocationList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(response, &metadata) - } - output := &ImportClientVpnClientCertificateRevocationListOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportClientVpnClientCertificateRevocationListOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorImportClientVpnClientCertificateRevocationList(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpImportImage struct { -} - -func (*awsEc2query_deserializeOpImportImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpImportImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportImage(response, &metadata) - } - output := &ImportImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorImportImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpImportInstance struct { -} - -func (*awsEc2query_deserializeOpImportInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpImportInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportInstance(response, &metadata) - } - output := &ImportInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorImportInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpImportKeyPair struct { -} - -func (*awsEc2query_deserializeOpImportKeyPair) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpImportKeyPair) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportKeyPair(response, &metadata) - } - output := &ImportKeyPairOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportKeyPairOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorImportKeyPair(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpImportSnapshot struct { -} - -func (*awsEc2query_deserializeOpImportSnapshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpImportSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportSnapshot(response, &metadata) - } - output := &ImportSnapshotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportSnapshotOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorImportSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpImportVolume struct { -} - -func (*awsEc2query_deserializeOpImportVolume) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpImportVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorImportVolume(response, &metadata) - } - output := &ImportVolumeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentImportVolumeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorImportVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpListImagesInRecycleBin struct { -} - -func (*awsEc2query_deserializeOpListImagesInRecycleBin) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpListImagesInRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorListImagesInRecycleBin(response, &metadata) - } - output := &ListImagesInRecycleBinOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentListImagesInRecycleBinOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorListImagesInRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpListSnapshotsInRecycleBin struct { -} - -func (*awsEc2query_deserializeOpListSnapshotsInRecycleBin) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpListSnapshotsInRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response, &metadata) - } - output := &ListSnapshotsInRecycleBinOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentListSnapshotsInRecycleBinOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorListSnapshotsInRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpLockSnapshot struct { -} - -func (*awsEc2query_deserializeOpLockSnapshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpLockSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorLockSnapshot(response, &metadata) - } - output := &LockSnapshotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentLockSnapshotOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorLockSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyAddressAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyAddressAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyAddressAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyAddressAttribute(response, &metadata) - } - output := &ModifyAddressAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyAddressAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyAvailabilityZoneGroup struct { -} - -func (*awsEc2query_deserializeOpModifyAvailabilityZoneGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyAvailabilityZoneGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response, &metadata) - } - output := &ModifyAvailabilityZoneGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyAvailabilityZoneGroupOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyAvailabilityZoneGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyCapacityReservation struct { -} - -func (*awsEc2query_deserializeOpModifyCapacityReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyCapacityReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyCapacityReservation(response, &metadata) - } - output := &ModifyCapacityReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyCapacityReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyCapacityReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyCapacityReservationFleet struct { -} - -func (*awsEc2query_deserializeOpModifyCapacityReservationFleet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyCapacityReservationFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(response, &metadata) - } - output := &ModifyCapacityReservationFleetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyCapacityReservationFleetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyCapacityReservationFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyClientVpnEndpoint struct { -} - -func (*awsEc2query_deserializeOpModifyClientVpnEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyClientVpnEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response, &metadata) - } - output := &ModifyClientVpnEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyClientVpnEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyClientVpnEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyDefaultCreditSpecification struct { -} - -func (*awsEc2query_deserializeOpModifyDefaultCreditSpecification) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyDefaultCreditSpecification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response, &metadata) - } - output := &ModifyDefaultCreditSpecificationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyDefaultCreditSpecificationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyDefaultCreditSpecification(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId struct { -} - -func (*awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyEbsDefaultKmsKeyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response, &metadata) - } - output := &ModifyEbsDefaultKmsKeyIdOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyEbsDefaultKmsKeyIdOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyEbsDefaultKmsKeyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyFleet struct { -} - -func (*awsEc2query_deserializeOpModifyFleet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyFleet(response, &metadata) - } - output := &ModifyFleetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyFleetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyFpgaImageAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyFpgaImageAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyFpgaImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response, &metadata) - } - output := &ModifyFpgaImageAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyFpgaImageAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyFpgaImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyHosts struct { -} - -func (*awsEc2query_deserializeOpModifyHosts) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyHosts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyHosts(response, &metadata) - } - output := &ModifyHostsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyHostsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyHosts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIdentityIdFormat struct { -} - -func (*awsEc2query_deserializeOpModifyIdentityIdFormat) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIdentityIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response, &metadata) - } - output := &ModifyIdentityIdFormatOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIdentityIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIdFormat struct { -} - -func (*awsEc2query_deserializeOpModifyIdFormat) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIdFormat) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIdFormat(response, &metadata) - } - output := &ModifyIdFormatOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIdFormat(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyImageAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyImageAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyImageAttribute(response, &metadata) - } - output := &ModifyImageAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceAttribute(response, &metadata) - } - output := &ModifyInstanceAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceCapacityReservationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(response, &metadata) - } - output := &ModifyInstanceCapacityReservationAttributesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttributesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceCapacityReservationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceCreditSpecification struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceCreditSpecification) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceCreditSpecification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response, &metadata) - } - output := &ModifyInstanceCreditSpecificationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceCreditSpecification(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceEventStartTime struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceEventStartTime) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceEventStartTime) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response, &metadata) - } - output := &ModifyInstanceEventStartTimeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceEventStartTimeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceEventStartTime(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceEventWindow struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceEventWindow) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceEventWindow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response, &metadata) - } - output := &ModifyInstanceEventWindowOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceEventWindowOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceEventWindow(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceMaintenanceOptions struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceMaintenanceOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(response, &metadata) - } - output := &ModifyInstanceMaintenanceOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceMaintenanceOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceMaintenanceOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstanceMetadataOptions struct { -} - -func (*awsEc2query_deserializeOpModifyInstanceMetadataOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstanceMetadataOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response, &metadata) - } - output := &ModifyInstanceMetadataOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstanceMetadataOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstanceMetadataOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyInstancePlacement struct { -} - -func (*awsEc2query_deserializeOpModifyInstancePlacement) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyInstancePlacement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyInstancePlacement(response, &metadata) - } - output := &ModifyInstancePlacementOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyInstancePlacementOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyInstancePlacement(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIpam struct { -} - -func (*awsEc2query_deserializeOpModifyIpam) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIpam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpam(response, &metadata) - } - output := &ModifyIpamOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIpam(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIpamPool struct { -} - -func (*awsEc2query_deserializeOpModifyIpamPool) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIpamPool) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamPool(response, &metadata) - } - output := &ModifyIpamPoolOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamPoolOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIpamPool(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIpamResourceCidr struct { -} - -func (*awsEc2query_deserializeOpModifyIpamResourceCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIpamResourceCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamResourceCidr(response, &metadata) - } - output := &ModifyIpamResourceCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamResourceCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIpamResourceCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIpamResourceDiscovery struct { -} - -func (*awsEc2query_deserializeOpModifyIpamResourceDiscovery) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIpamResourceDiscovery) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(response, &metadata) - } - output := &ModifyIpamResourceDiscoveryOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamResourceDiscoveryOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIpamResourceDiscovery(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyIpamScope struct { -} - -func (*awsEc2query_deserializeOpModifyIpamScope) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyIpamScope) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyIpamScope(response, &metadata) - } - output := &ModifyIpamScopeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyIpamScopeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyIpamScope(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyLaunchTemplate struct { -} - -func (*awsEc2query_deserializeOpModifyLaunchTemplate) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyLaunchTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyLaunchTemplate(response, &metadata) - } - output := &ModifyLaunchTemplateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyLaunchTemplateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyLaunchTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyLocalGatewayRoute struct { -} - -func (*awsEc2query_deserializeOpModifyLocalGatewayRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyLocalGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(response, &metadata) - } - output := &ModifyLocalGatewayRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyLocalGatewayRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyLocalGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyManagedPrefixList struct { -} - -func (*awsEc2query_deserializeOpModifyManagedPrefixList) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyManagedPrefixList) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyManagedPrefixList(response, &metadata) - } - output := &ModifyManagedPrefixListOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyManagedPrefixList(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyNetworkInterfaceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response, &metadata) - } - output := &ModifyNetworkInterfaceAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyNetworkInterfaceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyPrivateDnsNameOptions struct { -} - -func (*awsEc2query_deserializeOpModifyPrivateDnsNameOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyPrivateDnsNameOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response, &metadata) - } - output := &ModifyPrivateDnsNameOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyPrivateDnsNameOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyPrivateDnsNameOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyReservedInstances struct { -} - -func (*awsEc2query_deserializeOpModifyReservedInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyReservedInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyReservedInstances(response, &metadata) - } - output := &ModifyReservedInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyReservedInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifySecurityGroupRules struct { -} - -func (*awsEc2query_deserializeOpModifySecurityGroupRules) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifySecurityGroupRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySecurityGroupRules(response, &metadata) - } - output := &ModifySecurityGroupRulesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifySecurityGroupRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifySnapshotAttribute struct { -} - -func (*awsEc2query_deserializeOpModifySnapshotAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifySnapshotAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotAttribute(response, &metadata) - } - output := &ModifySnapshotAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifySnapshotAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifySnapshotTier struct { -} - -func (*awsEc2query_deserializeOpModifySnapshotTier) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifySnapshotTier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySnapshotTier(response, &metadata) - } - output := &ModifySnapshotTierOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySnapshotTierOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifySnapshotTier(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifySpotFleetRequest struct { -} - -func (*awsEc2query_deserializeOpModifySpotFleetRequest) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifySpotFleetRequest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySpotFleetRequest(response, &metadata) - } - output := &ModifySpotFleetRequestOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifySpotFleetRequest(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifySubnetAttribute struct { -} - -func (*awsEc2query_deserializeOpModifySubnetAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifySubnetAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifySubnetAttribute(response, &metadata) - } - output := &ModifySubnetAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifySubnetAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices struct { -} - -func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterNetworkServices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(response, &metadata) - } - output := &ModifyTrafficMirrorFilterNetworkServicesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterNetworkServicesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterNetworkServices(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyTrafficMirrorFilterRule struct { -} - -func (*awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyTrafficMirrorFilterRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response, &metadata) - } - output := &ModifyTrafficMirrorFilterRuleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterRuleOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyTrafficMirrorFilterRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyTrafficMirrorSession struct { -} - -func (*awsEc2query_deserializeOpModifyTrafficMirrorSession) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyTrafficMirrorSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response, &metadata) - } - output := &ModifyTrafficMirrorSessionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTrafficMirrorSessionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyTrafficMirrorSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyTransitGateway struct { -} - -func (*awsEc2query_deserializeOpModifyTransitGateway) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyTransitGateway) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGateway(response, &metadata) - } - output := &ModifyTransitGatewayOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTransitGatewayOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyTransitGateway(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference struct { -} - -func (*awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyTransitGatewayPrefixListReference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(response, &metadata) - } - output := &ModifyTransitGatewayPrefixListReferenceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTransitGatewayPrefixListReferenceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyTransitGatewayPrefixListReference(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response, &metadata) - } - output := &ModifyTransitGatewayVpcAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyTransitGatewayVpcAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessEndpoint struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(response, &metadata) - } - output := &ModifyVerifiedAccessEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessEndpointPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(response, &metadata) - } - output := &ModifyVerifiedAccessEndpointPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessEndpointPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessGroup struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(response, &metadata) - } - output := &ModifyVerifiedAccessGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessGroupPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(response, &metadata) - } - output := &ModifyVerifiedAccessGroupPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessGroupPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessInstance struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(response, &metadata) - } - output := &ModifyVerifiedAccessInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessInstanceLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfiguration(response, &metadata) - } - output := &ModifyVerifiedAccessInstanceLoggingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessInstanceLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVerifiedAccessTrustProvider) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(response, &metadata) - } - output := &ModifyVerifiedAccessTrustProviderOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVerifiedAccessTrustProviderOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVerifiedAccessTrustProvider(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVolume struct { -} - -func (*awsEc2query_deserializeOpModifyVolume) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVolume) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVolume(response, &metadata) - } - output := &ModifyVolumeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVolumeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVolume(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVolumeAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyVolumeAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVolumeAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVolumeAttribute(response, &metadata) - } - output := &ModifyVolumeAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVolumeAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcAttribute struct { -} - -func (*awsEc2query_deserializeOpModifyVpcAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcAttribute(response, &metadata) - } - output := &ModifyVpcAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcEndpoint struct { -} - -func (*awsEc2query_deserializeOpModifyVpcEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpoint(response, &metadata) - } - output := &ModifyVpcEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification struct { -} - -func (*awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcEndpointConnectionNotification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(response, &metadata) - } - output := &ModifyVpcEndpointConnectionNotificationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointConnectionNotificationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcEndpointConnectionNotification(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration struct { -} - -func (*awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(response, &metadata) - } - output := &ModifyVpcEndpointServiceConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServiceConfigurationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcEndpointServiceConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility struct { -} - -func (*awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePayerResponsibility) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(response, &metadata) - } - output := &ModifyVpcEndpointServicePayerResponsibilityOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePayerResponsibilityOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePayerResponsibility(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcEndpointServicePermissions struct { -} - -func (*awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcEndpointServicePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response, &metadata) - } - output := &ModifyVpcEndpointServicePermissionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePermissionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcEndpointServicePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions struct { -} - -func (*awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcPeeringConnectionOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response, &metadata) - } - output := &ModifyVpcPeeringConnectionOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcPeeringConnectionOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcPeeringConnectionOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpcTenancy struct { -} - -func (*awsEc2query_deserializeOpModifyVpcTenancy) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpcTenancy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpcTenancy(response, &metadata) - } - output := &ModifyVpcTenancyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpcTenancyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpcTenancy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpnConnection struct { -} - -func (*awsEc2query_deserializeOpModifyVpnConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpnConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnConnection(response, &metadata) - } - output := &ModifyVpnConnectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnConnectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpnConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpnConnectionOptions struct { -} - -func (*awsEc2query_deserializeOpModifyVpnConnectionOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpnConnectionOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response, &metadata) - } - output := &ModifyVpnConnectionOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnConnectionOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpnConnectionOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpnTunnelCertificate struct { -} - -func (*awsEc2query_deserializeOpModifyVpnTunnelCertificate) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpnTunnelCertificate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response, &metadata) - } - output := &ModifyVpnTunnelCertificateOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnTunnelCertificateOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpnTunnelCertificate(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpModifyVpnTunnelOptions struct { -} - -func (*awsEc2query_deserializeOpModifyVpnTunnelOptions) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpModifyVpnTunnelOptions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response, &metadata) - } - output := &ModifyVpnTunnelOptionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentModifyVpnTunnelOptionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorModifyVpnTunnelOptions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpMonitorInstances struct { -} - -func (*awsEc2query_deserializeOpMonitorInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpMonitorInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMonitorInstances(response, &metadata) - } - output := &MonitorInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMonitorInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorMonitorInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpMoveAddressToVpc struct { -} - -func (*awsEc2query_deserializeOpMoveAddressToVpc) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpMoveAddressToVpc) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMoveAddressToVpc(response, &metadata) - } - output := &MoveAddressToVpcOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMoveAddressToVpcOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorMoveAddressToVpc(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpMoveByoipCidrToIpam struct { -} - -func (*awsEc2query_deserializeOpMoveByoipCidrToIpam) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpMoveByoipCidrToIpam) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(response, &metadata) - } - output := &MoveByoipCidrToIpamOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentMoveByoipCidrToIpamOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorMoveByoipCidrToIpam(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpProvisionByoipCidr struct { -} - -func (*awsEc2query_deserializeOpProvisionByoipCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpProvisionByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionByoipCidr(response, &metadata) - } - output := &ProvisionByoipCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionByoipCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorProvisionByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpProvisionIpamByoasn struct { -} - -func (*awsEc2query_deserializeOpProvisionIpamByoasn) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpProvisionIpamByoasn) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionIpamByoasn(response, &metadata) - } - output := &ProvisionIpamByoasnOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionIpamByoasnOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorProvisionIpamByoasn(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpProvisionIpamPoolCidr struct { -} - -func (*awsEc2query_deserializeOpProvisionIpamPoolCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpProvisionIpamPoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(response, &metadata) - } - output := &ProvisionIpamPoolCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionIpamPoolCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorProvisionIpamPoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr struct { -} - -func (*awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpProvisionPublicIpv4PoolCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(response, &metadata) - } - output := &ProvisionPublicIpv4PoolCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentProvisionPublicIpv4PoolCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorProvisionPublicIpv4PoolCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpPurchaseCapacityBlock struct { -} - -func (*awsEc2query_deserializeOpPurchaseCapacityBlock) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpPurchaseCapacityBlock) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseCapacityBlock(response, &metadata) - } - output := &PurchaseCapacityBlockOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseCapacityBlockOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorPurchaseCapacityBlock(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpPurchaseHostReservation struct { -} - -func (*awsEc2query_deserializeOpPurchaseHostReservation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpPurchaseHostReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseHostReservation(response, &metadata) - } - output := &PurchaseHostReservationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseHostReservationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorPurchaseHostReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpPurchaseReservedInstancesOffering struct { -} - -func (*awsEc2query_deserializeOpPurchaseReservedInstancesOffering) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpPurchaseReservedInstancesOffering) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response, &metadata) - } - output := &PurchaseReservedInstancesOfferingOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseReservedInstancesOfferingOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorPurchaseReservedInstancesOffering(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpPurchaseScheduledInstances struct { -} - -func (*awsEc2query_deserializeOpPurchaseScheduledInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpPurchaseScheduledInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response, &metadata) - } - output := &PurchaseScheduledInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentPurchaseScheduledInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorPurchaseScheduledInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRebootInstances struct { -} - -func (*awsEc2query_deserializeOpRebootInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRebootInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRebootInstances(response, &metadata) - } - output := &RebootInstancesOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRebootInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRegisterImage struct { -} - -func (*awsEc2query_deserializeOpRegisterImage) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRegisterImage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterImage(response, &metadata) - } - output := &RegisterImageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterImageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRegisterImage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes struct { -} - -func (*awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRegisterInstanceEventNotificationAttributes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(response, &metadata) - } - output := &RegisterInstanceEventNotificationAttributesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterInstanceEventNotificationAttributesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRegisterInstanceEventNotificationAttributes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers struct { -} - -func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupMembers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(response, &metadata) - } - output := &RegisterTransitGatewayMulticastGroupMembersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupMembersOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources struct { -} - -func (*awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRegisterTransitGatewayMulticastGroupSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(response, &metadata) - } - output := &RegisterTransitGatewayMulticastGroupSourcesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRegisterTransitGatewayMulticastGroupSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations struct { -} - -func (*awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRejectTransitGatewayMulticastDomainAssociations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(response, &metadata) - } - output := &RejectTransitGatewayMulticastDomainAssociationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRejectTransitGatewayMulticastDomainAssociations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRejectTransitGatewayPeeringAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(response, &metadata) - } - output := &RejectTransitGatewayPeeringAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectTransitGatewayPeeringAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRejectTransitGatewayPeeringAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRejectTransitGatewayVpcAttachment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response, &metadata) - } - output := &RejectTransitGatewayVpcAttachmentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectTransitGatewayVpcAttachmentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRejectTransitGatewayVpcAttachment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRejectVpcEndpointConnections struct { -} - -func (*awsEc2query_deserializeOpRejectVpcEndpointConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRejectVpcEndpointConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response, &metadata) - } - output := &RejectVpcEndpointConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectVpcEndpointConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRejectVpcEndpointConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRejectVpcPeeringConnection struct { -} - -func (*awsEc2query_deserializeOpRejectVpcPeeringConnection) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRejectVpcPeeringConnection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response, &metadata) - } - output := &RejectVpcPeeringConnectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRejectVpcPeeringConnectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRejectVpcPeeringConnection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReleaseAddress struct { -} - -func (*awsEc2query_deserializeOpReleaseAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReleaseAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReleaseAddress(response, &metadata) - } - output := &ReleaseAddressOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReleaseAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReleaseHosts struct { -} - -func (*awsEc2query_deserializeOpReleaseHosts) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReleaseHosts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReleaseHosts(response, &metadata) - } - output := &ReleaseHostsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReleaseHostsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReleaseHosts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReleaseIpamPoolAllocation struct { -} - -func (*awsEc2query_deserializeOpReleaseIpamPoolAllocation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReleaseIpamPoolAllocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(response, &metadata) - } - output := &ReleaseIpamPoolAllocationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReleaseIpamPoolAllocationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReleaseIpamPoolAllocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation struct { -} - -func (*awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceIamInstanceProfileAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response, &metadata) - } - output := &ReplaceIamInstanceProfileAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceIamInstanceProfileAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceIamInstanceProfileAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceNetworkAclAssociation struct { -} - -func (*awsEc2query_deserializeOpReplaceNetworkAclAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceNetworkAclAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response, &metadata) - } - output := &ReplaceNetworkAclAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceNetworkAclAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceNetworkAclAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceNetworkAclEntry struct { -} - -func (*awsEc2query_deserializeOpReplaceNetworkAclEntry) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceNetworkAclEntry) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response, &metadata) - } - output := &ReplaceNetworkAclEntryOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceNetworkAclEntry(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceRoute struct { -} - -func (*awsEc2query_deserializeOpReplaceRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceRoute(response, &metadata) - } - output := &ReplaceRouteOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceRouteTableAssociation struct { -} - -func (*awsEc2query_deserializeOpReplaceRouteTableAssociation) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceRouteTableAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response, &metadata) - } - output := &ReplaceRouteTableAssociationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceRouteTableAssociationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceRouteTableAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceTransitGatewayRoute struct { -} - -func (*awsEc2query_deserializeOpReplaceTransitGatewayRoute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceTransitGatewayRoute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response, &metadata) - } - output := &ReplaceTransitGatewayRouteOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceTransitGatewayRouteOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceTransitGatewayRoute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReplaceVpnTunnel struct { -} - -func (*awsEc2query_deserializeOpReplaceVpnTunnel) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReplaceVpnTunnel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReplaceVpnTunnel(response, &metadata) - } - output := &ReplaceVpnTunnelOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentReplaceVpnTunnelOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReplaceVpnTunnel(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpReportInstanceStatus struct { -} - -func (*awsEc2query_deserializeOpReportInstanceStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpReportInstanceStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorReportInstanceStatus(response, &metadata) - } - output := &ReportInstanceStatusOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorReportInstanceStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRequestSpotFleet struct { -} - -func (*awsEc2query_deserializeOpRequestSpotFleet) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRequestSpotFleet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRequestSpotFleet(response, &metadata) - } - output := &RequestSpotFleetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRequestSpotFleetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRequestSpotFleet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRequestSpotInstances struct { -} - -func (*awsEc2query_deserializeOpRequestSpotInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRequestSpotInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRequestSpotInstances(response, &metadata) - } - output := &RequestSpotInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRequestSpotInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRequestSpotInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetAddressAttribute struct { -} - -func (*awsEc2query_deserializeOpResetAddressAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetAddressAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetAddressAttribute(response, &metadata) - } - output := &ResetAddressAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentResetAddressAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetAddressAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetEbsDefaultKmsKeyId struct { -} - -func (*awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetEbsDefaultKmsKeyId) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response, &metadata) - } - output := &ResetEbsDefaultKmsKeyIdOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentResetEbsDefaultKmsKeyIdOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetEbsDefaultKmsKeyId(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetFpgaImageAttribute struct { -} - -func (*awsEc2query_deserializeOpResetFpgaImageAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetFpgaImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response, &metadata) - } - output := &ResetFpgaImageAttributeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentResetFpgaImageAttributeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetFpgaImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetImageAttribute struct { -} - -func (*awsEc2query_deserializeOpResetImageAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetImageAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetImageAttribute(response, &metadata) - } - output := &ResetImageAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetImageAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetInstanceAttribute struct { -} - -func (*awsEc2query_deserializeOpResetInstanceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetInstanceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetInstanceAttribute(response, &metadata) - } - output := &ResetInstanceAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetInstanceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_deserializeOpResetNetworkInterfaceAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetNetworkInterfaceAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response, &metadata) - } - output := &ResetNetworkInterfaceAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetNetworkInterfaceAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpResetSnapshotAttribute struct { -} - -func (*awsEc2query_deserializeOpResetSnapshotAttribute) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpResetSnapshotAttribute) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorResetSnapshotAttribute(response, &metadata) - } - output := &ResetSnapshotAttributeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorResetSnapshotAttribute(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRestoreAddressToClassic struct { -} - -func (*awsEc2query_deserializeOpRestoreAddressToClassic) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRestoreAddressToClassic) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreAddressToClassic(response, &metadata) - } - output := &RestoreAddressToClassicOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreAddressToClassicOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRestoreAddressToClassic(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRestoreImageFromRecycleBin struct { -} - -func (*awsEc2query_deserializeOpRestoreImageFromRecycleBin) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRestoreImageFromRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(response, &metadata) - } - output := &RestoreImageFromRecycleBinOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreImageFromRecycleBinOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRestoreImageFromRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRestoreManagedPrefixListVersion struct { -} - -func (*awsEc2query_deserializeOpRestoreManagedPrefixListVersion) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRestoreManagedPrefixListVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response, &metadata) - } - output := &RestoreManagedPrefixListVersionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRestoreManagedPrefixListVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin struct { -} - -func (*awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRestoreSnapshotFromRecycleBin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response, &metadata) - } - output := &RestoreSnapshotFromRecycleBinOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreSnapshotFromRecycleBinOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRestoreSnapshotFromRecycleBin(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRestoreSnapshotTier struct { -} - -func (*awsEc2query_deserializeOpRestoreSnapshotTier) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRestoreSnapshotTier) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRestoreSnapshotTier(response, &metadata) - } - output := &RestoreSnapshotTierOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRestoreSnapshotTierOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRestoreSnapshotTier(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRevokeClientVpnIngress struct { -} - -func (*awsEc2query_deserializeOpRevokeClientVpnIngress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRevokeClientVpnIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response, &metadata) - } - output := &RevokeClientVpnIngressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRevokeClientVpnIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRevokeSecurityGroupEgress struct { -} - -func (*awsEc2query_deserializeOpRevokeSecurityGroupEgress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRevokeSecurityGroupEgress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response, &metadata) - } - output := &RevokeSecurityGroupEgressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRevokeSecurityGroupEgress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRevokeSecurityGroupIngress struct { -} - -func (*awsEc2query_deserializeOpRevokeSecurityGroupIngress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRevokeSecurityGroupIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response, &metadata) - } - output := &RevokeSecurityGroupIngressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRevokeSecurityGroupIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRunInstances struct { -} - -func (*awsEc2query_deserializeOpRunInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRunInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRunInstances(response, &metadata) - } - output := &RunInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRunInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRunInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpRunScheduledInstances struct { -} - -func (*awsEc2query_deserializeOpRunScheduledInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpRunScheduledInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorRunScheduledInstances(response, &metadata) - } - output := &RunScheduledInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentRunScheduledInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorRunScheduledInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpSearchLocalGatewayRoutes struct { -} - -func (*awsEc2query_deserializeOpSearchLocalGatewayRoutes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpSearchLocalGatewayRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response, &metadata) - } - output := &SearchLocalGatewayRoutesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentSearchLocalGatewayRoutesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorSearchLocalGatewayRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups struct { -} - -func (*awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpSearchTransitGatewayMulticastGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response, &metadata) - } - output := &SearchTransitGatewayMulticastGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentSearchTransitGatewayMulticastGroupsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorSearchTransitGatewayMulticastGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpSearchTransitGatewayRoutes struct { -} - -func (*awsEc2query_deserializeOpSearchTransitGatewayRoutes) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpSearchTransitGatewayRoutes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(response, &metadata) - } - output := &SearchTransitGatewayRoutesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentSearchTransitGatewayRoutesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorSearchTransitGatewayRoutes(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpSendDiagnosticInterrupt struct { -} - -func (*awsEc2query_deserializeOpSendDiagnosticInterrupt) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpSendDiagnosticInterrupt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response, &metadata) - } - output := &SendDiagnosticInterruptOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorSendDiagnosticInterrupt(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpStartInstances struct { -} - -func (*awsEc2query_deserializeOpStartInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpStartInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartInstances(response, &metadata) - } - output := &StartInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorStartInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis struct { -} - -func (*awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpStartNetworkInsightsAccessScopeAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(response, &metadata) - } - output := &StartNetworkInsightsAccessScopeAnalysisOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartNetworkInsightsAccessScopeAnalysisOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorStartNetworkInsightsAccessScopeAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpStartNetworkInsightsAnalysis struct { -} - -func (*awsEc2query_deserializeOpStartNetworkInsightsAnalysis) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpStartNetworkInsightsAnalysis) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response, &metadata) - } - output := &StartNetworkInsightsAnalysisOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartNetworkInsightsAnalysisOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorStartNetworkInsightsAnalysis(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification struct { -} - -func (*awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpStartVpcEndpointServicePrivateDnsVerification) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(response, &metadata) - } - output := &StartVpcEndpointServicePrivateDnsVerificationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorStartVpcEndpointServicePrivateDnsVerification(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpStopInstances struct { -} - -func (*awsEc2query_deserializeOpStopInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpStopInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorStopInstances(response, &metadata) - } - output := &StopInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentStopInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorStopInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpTerminateClientVpnConnections struct { -} - -func (*awsEc2query_deserializeOpTerminateClientVpnConnections) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpTerminateClientVpnConnections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response, &metadata) - } - output := &TerminateClientVpnConnectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentTerminateClientVpnConnectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorTerminateClientVpnConnections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpTerminateInstances struct { -} - -func (*awsEc2query_deserializeOpTerminateInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpTerminateInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorTerminateInstances(response, &metadata) - } - output := &TerminateInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentTerminateInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorTerminateInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUnassignIpv6Addresses struct { -} - -func (*awsEc2query_deserializeOpUnassignIpv6Addresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUnassignIpv6Addresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnassignIpv6Addresses(response, &metadata) - } - output := &UnassignIpv6AddressesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnassignIpv6AddressesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUnassignIpv6Addresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUnassignPrivateIpAddresses struct { -} - -func (*awsEc2query_deserializeOpUnassignPrivateIpAddresses) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUnassignPrivateIpAddresses) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response, &metadata) - } - output := &UnassignPrivateIpAddressesOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUnassignPrivateIpAddresses(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress struct { -} - -func (*awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUnassignPrivateNatGatewayAddress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(response, &metadata) - } - output := &UnassignPrivateNatGatewayAddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnassignPrivateNatGatewayAddressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUnassignPrivateNatGatewayAddress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUnlockSnapshot struct { -} - -func (*awsEc2query_deserializeOpUnlockSnapshot) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUnlockSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnlockSnapshot(response, &metadata) - } - output := &UnlockSnapshotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnlockSnapshotOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUnlockSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUnmonitorInstances struct { -} - -func (*awsEc2query_deserializeOpUnmonitorInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUnmonitorInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUnmonitorInstances(response, &metadata) - } - output := &UnmonitorInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUnmonitorInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUnmonitorInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress struct { -} - -func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsEgress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(response, &metadata) - } - output := &UpdateSecurityGroupRuleDescriptionsEgressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsEgress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress struct { -} - -func (*awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpUpdateSecurityGroupRuleDescriptionsIngress) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(response, &metadata) - } - output := &UpdateSecurityGroupRuleDescriptionsIngressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorUpdateSecurityGroupRuleDescriptionsIngress(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsEc2query_deserializeOpWithdrawByoipCidr struct { -} - -func (*awsEc2query_deserializeOpWithdrawByoipCidr) ID() string { - return "OperationDeserializer" -} - -func (m *awsEc2query_deserializeOpWithdrawByoipCidr) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsEc2query_deserializeOpErrorWithdrawByoipCidr(response, &metadata) - } - output := &WithdrawByoipCidrOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsEc2query_deserializeOpDocumentWithdrawByoipCidrOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsEc2query_deserializeOpErrorWithdrawByoipCidr(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := ec2query.GetErrorResponseComponents(errorBody) - if err != nil { - return err - } - awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsEc2query_deserializeDocumentAcceleratorCount(v **types.AcceleratorCount, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AcceleratorCount - if *v == nil { - sv = &types.AcceleratorCount{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Max = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Min = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAcceleratorManufacturerSet(v *[]types.AcceleratorManufacturer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AcceleratorManufacturer - if *v == nil { - sv = make([]types.AcceleratorManufacturer, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AcceleratorManufacturer - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.AcceleratorManufacturer(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAcceleratorManufacturerSetUnwrapped(v *[]types.AcceleratorManufacturer, decoder smithyxml.NodeDecoder) error { - var sv []types.AcceleratorManufacturer - if *v == nil { - sv = make([]types.AcceleratorManufacturer, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AcceleratorManufacturer - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.AcceleratorManufacturer(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAcceleratorNameSet(v *[]types.AcceleratorName, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AcceleratorName - if *v == nil { - sv = make([]types.AcceleratorName, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AcceleratorName - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.AcceleratorName(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAcceleratorNameSetUnwrapped(v *[]types.AcceleratorName, decoder smithyxml.NodeDecoder) error { - var sv []types.AcceleratorName - if *v == nil { - sv = make([]types.AcceleratorName, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AcceleratorName - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.AcceleratorName(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAcceleratorTotalMemoryMiB(v **types.AcceleratorTotalMemoryMiB, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AcceleratorTotalMemoryMiB - if *v == nil { - sv = &types.AcceleratorTotalMemoryMiB{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Max = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Min = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAcceleratorTypeSet(v *[]types.AcceleratorType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AcceleratorType - if *v == nil { - sv = make([]types.AcceleratorType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AcceleratorType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.AcceleratorType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAcceleratorTypeSetUnwrapped(v *[]types.AcceleratorType, decoder smithyxml.NodeDecoder) error { - var sv []types.AcceleratorType - if *v == nil { - sv = make([]types.AcceleratorType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AcceleratorType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.AcceleratorType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAccessScopeAnalysisFinding(v **types.AccessScopeAnalysisFinding, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AccessScopeAnalysisFinding - if *v == nil { - sv = &types.AccessScopeAnalysisFinding{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("findingComponentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathComponentList(&sv.FindingComponents, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("findingId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FindingId = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeAnalysisId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeAnalysisId = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccessScopeAnalysisFindingList(v *[]types.AccessScopeAnalysisFinding, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AccessScopeAnalysisFinding - if *v == nil { - sv = make([]types.AccessScopeAnalysisFinding, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AccessScopeAnalysisFinding - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAccessScopeAnalysisFinding(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccessScopeAnalysisFindingListUnwrapped(v *[]types.AccessScopeAnalysisFinding, decoder smithyxml.NodeDecoder) error { - var sv []types.AccessScopeAnalysisFinding - if *v == nil { - sv = make([]types.AccessScopeAnalysisFinding, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AccessScopeAnalysisFinding - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAccessScopeAnalysisFinding(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAccessScopePath(v **types.AccessScopePath, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AccessScopePath - if *v == nil { - sv = &types.AccessScopePath{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destination", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathStatement(&sv.Destination, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("source", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathStatement(&sv.Source, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("throughResourceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentThroughResourcesStatementList(&sv.ThroughResources, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccessScopePathList(v *[]types.AccessScopePath, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AccessScopePath - if *v == nil { - sv = make([]types.AccessScopePath, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AccessScopePath - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAccessScopePath(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccessScopePathListUnwrapped(v *[]types.AccessScopePath, decoder smithyxml.NodeDecoder) error { - var sv []types.AccessScopePath - if *v == nil { - sv = make([]types.AccessScopePath, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AccessScopePath - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAccessScopePath(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAccountAttribute(v **types.AccountAttribute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AccountAttribute - if *v == nil { - sv = &types.AccountAttribute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attributeName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttributeName = ptr.String(xtv) - } - - case strings.EqualFold("attributeValueSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAccountAttributeValueList(&sv.AttributeValues, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccountAttributeList(v *[]types.AccountAttribute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AccountAttribute - if *v == nil { - sv = make([]types.AccountAttribute, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AccountAttribute - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAccountAttribute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccountAttributeListUnwrapped(v *[]types.AccountAttribute, decoder smithyxml.NodeDecoder) error { - var sv []types.AccountAttribute - if *v == nil { - sv = make([]types.AccountAttribute, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AccountAttribute - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAccountAttribute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAccountAttributeValue(v **types.AccountAttributeValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AccountAttributeValue - if *v == nil { - sv = &types.AccountAttributeValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attributeValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttributeValue = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccountAttributeValueList(v *[]types.AccountAttributeValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AccountAttributeValue - if *v == nil { - sv = make([]types.AccountAttributeValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AccountAttributeValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAccountAttributeValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAccountAttributeValueListUnwrapped(v *[]types.AccountAttributeValue, decoder smithyxml.NodeDecoder) error { - var sv []types.AccountAttributeValue - if *v == nil { - sv = make([]types.AccountAttributeValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AccountAttributeValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAccountAttributeValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentActiveInstance(v **types.ActiveInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ActiveInstance - if *v == nil { - sv = &types.ActiveInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceHealth", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceHealth = types.InstanceHealthStatus(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("spotInstanceRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotInstanceRequestId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentActiveInstanceSet(v *[]types.ActiveInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ActiveInstance - if *v == nil { - sv = make([]types.ActiveInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ActiveInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentActiveInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentActiveInstanceSetUnwrapped(v *[]types.ActiveInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.ActiveInstance - if *v == nil { - sv = make([]types.ActiveInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ActiveInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentActiveInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAddedPrincipal(v **types.AddedPrincipal, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AddedPrincipal - if *v == nil { - sv = &types.AddedPrincipal{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("principal", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Principal = ptr.String(xtv) - } - - case strings.EqualFold("principalType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrincipalType = types.PrincipalType(xtv) - } - - case strings.EqualFold("serviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceId = ptr.String(xtv) - } - - case strings.EqualFold("servicePermissionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServicePermissionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddedPrincipalSet(v *[]types.AddedPrincipal, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AddedPrincipal - if *v == nil { - sv = make([]types.AddedPrincipal, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AddedPrincipal - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAddedPrincipal(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddedPrincipalSetUnwrapped(v *[]types.AddedPrincipal, decoder smithyxml.NodeDecoder) error { - var sv []types.AddedPrincipal - if *v == nil { - sv = make([]types.AddedPrincipal, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AddedPrincipal - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAddedPrincipal(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAdditionalDetail(v **types.AdditionalDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AdditionalDetail - if *v == nil { - sv = &types.AdditionalDetail{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("additionalDetailType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AdditionalDetailType = ptr.String(xtv) - } - - case strings.EqualFold("component", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Component, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("loadBalancerSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponentList(&sv.LoadBalancers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ruleGroupRuleOptionsPairSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRuleGroupRuleOptionsPairList(&sv.RuleGroupRuleOptionsPairs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ruleGroupTypePairSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRuleGroupTypePairList(&sv.RuleGroupTypePairs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ruleOptionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRuleOptionList(&sv.RuleOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("serviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceName = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointService", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpcEndpointService, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAdditionalDetailList(v *[]types.AdditionalDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AdditionalDetail - if *v == nil { - sv = make([]types.AdditionalDetail, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AdditionalDetail - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAdditionalDetail(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAdditionalDetailListUnwrapped(v *[]types.AdditionalDetail, decoder smithyxml.NodeDecoder) error { - var sv []types.AdditionalDetail - if *v == nil { - sv = make([]types.AdditionalDetail, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AdditionalDetail - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAdditionalDetail(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAddress(v **types.Address, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Address - if *v == nil { - sv = &types.Address{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("carrierIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierIp = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIp = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIpv4Pool", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIpv4Pool = ptr.String(xtv) - } - - case strings.EqualFold("domain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Domain = types.DomainType(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - case strings.EqualFold("publicIpv4Pool", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIpv4Pool = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddressAttribute(v **types.AddressAttribute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AddressAttribute - if *v == nil { - sv = &types.AddressAttribute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("ptrRecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PtrRecord = ptr.String(xtv) - } - - case strings.EqualFold("ptrRecordUpdate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPtrUpdateStatus(&sv.PtrRecordUpdate, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddressList(v *[]types.Address, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Address - if *v == nil { - sv = make([]types.Address, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Address - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAddress(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddressListUnwrapped(v *[]types.Address, decoder smithyxml.NodeDecoder) error { - var sv []types.Address - if *v == nil { - sv = make([]types.Address, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Address - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAddress(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAddressSet(v *[]types.AddressAttribute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AddressAttribute - if *v == nil { - sv = make([]types.AddressAttribute, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AddressAttribute - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAddressAttribute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddressSetUnwrapped(v *[]types.AddressAttribute, decoder smithyxml.NodeDecoder) error { - var sv []types.AddressAttribute - if *v == nil { - sv = make([]types.AddressAttribute, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AddressAttribute - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAddressAttribute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAddressTransfer(v **types.AddressTransfer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AddressTransfer - if *v == nil { - sv = &types.AddressTransfer{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressTransferStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressTransferStatus = types.AddressTransferStatus(xtv) - } - - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - case strings.EqualFold("transferAccountId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransferAccountId = ptr.String(xtv) - } - - case strings.EqualFold("transferOfferAcceptedTimestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.TransferOfferAcceptedTimestamp = ptr.Time(t) - } - - case strings.EqualFold("transferOfferExpirationTimestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.TransferOfferExpirationTimestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddressTransferList(v *[]types.AddressTransfer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AddressTransfer - if *v == nil { - sv = make([]types.AddressTransfer, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AddressTransfer - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAddressTransfer(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAddressTransferListUnwrapped(v *[]types.AddressTransfer, decoder smithyxml.NodeDecoder) error { - var sv []types.AddressTransfer - if *v == nil { - sv = make([]types.AddressTransfer, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AddressTransfer - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAddressTransfer(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAllowedInstanceTypeSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAllowedInstanceTypeSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAllowedPrincipal(v **types.AllowedPrincipal, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AllowedPrincipal - if *v == nil { - sv = &types.AllowedPrincipal{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("principal", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Principal = ptr.String(xtv) - } - - case strings.EqualFold("principalType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrincipalType = types.PrincipalType(xtv) - } - - case strings.EqualFold("serviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceId = ptr.String(xtv) - } - - case strings.EqualFold("servicePermissionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServicePermissionId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAllowedPrincipalSet(v *[]types.AllowedPrincipal, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AllowedPrincipal - if *v == nil { - sv = make([]types.AllowedPrincipal, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AllowedPrincipal - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAllowedPrincipal(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAllowedPrincipalSetUnwrapped(v *[]types.AllowedPrincipal, decoder smithyxml.NodeDecoder) error { - var sv []types.AllowedPrincipal - if *v == nil { - sv = make([]types.AllowedPrincipal, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AllowedPrincipal - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAllowedPrincipal(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAlternatePathHint(v **types.AlternatePathHint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AlternatePathHint - if *v == nil { - sv = &types.AlternatePathHint{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("componentArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ComponentArn = ptr.String(xtv) - } - - case strings.EqualFold("componentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ComponentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAlternatePathHintList(v *[]types.AlternatePathHint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AlternatePathHint - if *v == nil { - sv = make([]types.AlternatePathHint, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AlternatePathHint - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAlternatePathHint(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAlternatePathHintListUnwrapped(v *[]types.AlternatePathHint, decoder smithyxml.NodeDecoder) error { - var sv []types.AlternatePathHint - if *v == nil { - sv = make([]types.AlternatePathHint, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AlternatePathHint - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAlternatePathHint(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAnalysisAclRule(v **types.AnalysisAclRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisAclRule - if *v == nil { - sv = &types.AnalysisAclRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("egress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Egress = ptr.Bool(xtv) - } - - case strings.EqualFold("portRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRange(&sv.PortRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("ruleAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleAction = ptr.String(xtv) - } - - case strings.EqualFold("ruleNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RuleNumber = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisComponent(v **types.AnalysisComponent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisComponent - if *v == nil { - sv = &types.AnalysisComponent{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisComponentList(v *[]types.AnalysisComponent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AnalysisComponent - if *v == nil { - sv = make([]types.AnalysisComponent, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AnalysisComponent - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAnalysisComponent(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisComponentListUnwrapped(v *[]types.AnalysisComponent, decoder smithyxml.NodeDecoder) error { - var sv []types.AnalysisComponent - if *v == nil { - sv = make([]types.AnalysisComponent, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AnalysisComponent - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAnalysisComponent(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAnalysisLoadBalancerListener(v **types.AnalysisLoadBalancerListener, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisLoadBalancerListener - if *v == nil { - sv = &types.AnalysisLoadBalancerListener{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancePort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstancePort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("loadBalancerPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LoadBalancerPort = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisLoadBalancerTarget(v **types.AnalysisLoadBalancerTarget, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisLoadBalancerTarget - if *v == nil { - sv = &types.AnalysisLoadBalancerTarget{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Address = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("instance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Instance, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("port", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Port = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisPacketHeader(v **types.AnalysisPacketHeader, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisPacketHeader - if *v == nil { - sv = &types.AnalysisPacketHeader{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpAddressList(&sv.DestinationAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationPortRangeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.DestinationPortRanges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("sourceAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpAddressList(&sv.SourceAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourcePortRangeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.SourcePortRanges, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisRouteTableRoute(v **types.AnalysisRouteTableRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisRouteTableRoute - if *v == nil { - sv = &types.AnalysisRouteTableRoute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("coreNetworkArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoreNetworkArn = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidr = ptr.String(xtv) - } - - case strings.EqualFold("destinationPrefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationPrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("egressOnlyInternetGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EgressOnlyInternetGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("gatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GatewayId = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("origin", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Origin = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcPeeringConnectionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAnalysisSecurityGroupRule(v **types.AnalysisSecurityGroupRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AnalysisSecurityGroupRule - if *v == nil { - sv = &types.AnalysisSecurityGroupRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("direction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Direction = ptr.String(xtv) - } - - case strings.EqualFold("portRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRange(&sv.PortRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SecurityGroupId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentArchitectureTypeList(v *[]types.ArchitectureType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ArchitectureType - if *v == nil { - sv = make([]types.ArchitectureType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ArchitectureType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.ArchitectureType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentArchitectureTypeListUnwrapped(v *[]types.ArchitectureType, decoder smithyxml.NodeDecoder) error { - var sv []types.ArchitectureType - if *v == nil { - sv = make([]types.ArchitectureType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ArchitectureType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.ArchitectureType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentArnList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentArnListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAsnAssociation(v **types.AsnAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AsnAssociation - if *v == nil { - sv = &types.AsnAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("asn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Asn = ptr.String(xtv) - } - - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.AsnAssociationState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAsnAssociationSet(v *[]types.AsnAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AsnAssociation - if *v == nil { - sv = make([]types.AsnAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AsnAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAsnAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAsnAssociationSetUnwrapped(v *[]types.AsnAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.AsnAssociation - if *v == nil { - sv = make([]types.AsnAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AsnAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAsnAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAssignedPrivateIpAddress(v **types.AssignedPrivateIpAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AssignedPrivateIpAddress - if *v == nil { - sv = &types.AssignedPrivateIpAddress{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAssignedPrivateIpAddressList(v *[]types.AssignedPrivateIpAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AssignedPrivateIpAddress - if *v == nil { - sv = make([]types.AssignedPrivateIpAddress, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AssignedPrivateIpAddress - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAssignedPrivateIpAddress(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAssignedPrivateIpAddressListUnwrapped(v *[]types.AssignedPrivateIpAddress, decoder smithyxml.NodeDecoder) error { - var sv []types.AssignedPrivateIpAddress - if *v == nil { - sv = make([]types.AssignedPrivateIpAddress, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AssignedPrivateIpAddress - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAssignedPrivateIpAddress(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAssociatedRole(v **types.AssociatedRole, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AssociatedRole - if *v == nil { - sv = &types.AssociatedRole{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedRoleArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociatedRoleArn = ptr.String(xtv) - } - - case strings.EqualFold("certificateS3BucketName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateS3BucketName = ptr.String(xtv) - } - - case strings.EqualFold("certificateS3ObjectKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateS3ObjectKey = ptr.String(xtv) - } - - case strings.EqualFold("encryptionKmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EncryptionKmsKeyId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAssociatedRolesList(v *[]types.AssociatedRole, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AssociatedRole - if *v == nil { - sv = make([]types.AssociatedRole, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AssociatedRole - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAssociatedRole(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAssociatedRolesListUnwrapped(v *[]types.AssociatedRole, decoder smithyxml.NodeDecoder) error { - var sv []types.AssociatedRole - if *v == nil { - sv = make([]types.AssociatedRole, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AssociatedRole - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAssociatedRole(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAssociatedTargetNetwork(v **types.AssociatedTargetNetwork, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AssociatedTargetNetwork - if *v == nil { - sv = &types.AssociatedTargetNetwork{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkId = ptr.String(xtv) - } - - case strings.EqualFold("networkType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkType = types.AssociatedNetworkType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAssociatedTargetNetworkSet(v *[]types.AssociatedTargetNetwork, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AssociatedTargetNetwork - if *v == nil { - sv = make([]types.AssociatedTargetNetwork, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AssociatedTargetNetwork - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAssociatedTargetNetwork(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAssociatedTargetNetworkSetUnwrapped(v *[]types.AssociatedTargetNetwork, decoder smithyxml.NodeDecoder) error { - var sv []types.AssociatedTargetNetwork - if *v == nil { - sv = make([]types.AssociatedTargetNetwork, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AssociatedTargetNetwork - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAssociatedTargetNetwork(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAssociationStatus(v **types.AssociationStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AssociationStatus - if *v == nil { - sv = &types.AssociationStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.AssociationStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAttachmentEnaSrdSpecification(v **types.AttachmentEnaSrdSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AttachmentEnaSrdSpecification - if *v == nil { - sv = &types.AttachmentEnaSrdSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enaSrdEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("enaSrdUdpSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttachmentEnaSrdUdpSpecification(&sv.EnaSrdUdpSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAttachmentEnaSrdUdpSpecification(v **types.AttachmentEnaSrdUdpSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AttachmentEnaSrdUdpSpecification - if *v == nil { - sv = &types.AttachmentEnaSrdUdpSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enaSrdUdpEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdUdpEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAttributeBooleanValue(v **types.AttributeBooleanValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AttributeBooleanValue - if *v == nil { - sv = &types.AttributeBooleanValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Value = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAttributeValue(v **types.AttributeValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AttributeValue - if *v == nil { - sv = &types.AttributeValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAuthorizationRule(v **types.AuthorizationRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AuthorizationRule - if *v == nil { - sv = &types.AuthorizationRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accessAll", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AccessAll = ptr.Bool(xtv) - } - - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidr = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAuthorizationRuleSet(v *[]types.AuthorizationRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AuthorizationRule - if *v == nil { - sv = make([]types.AuthorizationRule, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AuthorizationRule - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAuthorizationRule(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAuthorizationRuleSetUnwrapped(v *[]types.AuthorizationRule, decoder smithyxml.NodeDecoder) error { - var sv []types.AuthorizationRule - if *v == nil { - sv = make([]types.AuthorizationRule, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AuthorizationRule - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAuthorizationRule(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAvailabilityZone(v **types.AvailabilityZone, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AvailabilityZone - if *v == nil { - sv = &types.AvailabilityZone{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("messageSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAvailabilityZoneMessageList(&sv.Messages, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - case strings.EqualFold("optInStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OptInStatus = types.AvailabilityZoneOptInStatus(xtv) - } - - case strings.EqualFold("parentZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ParentZoneId = ptr.String(xtv) - } - - case strings.EqualFold("parentZoneName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ParentZoneName = ptr.String(xtv) - } - - case strings.EqualFold("regionName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RegionName = ptr.String(xtv) - } - - case strings.EqualFold("zoneState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.AvailabilityZoneState(xtv) - } - - case strings.EqualFold("zoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ZoneId = ptr.String(xtv) - } - - case strings.EqualFold("zoneName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ZoneName = ptr.String(xtv) - } - - case strings.EqualFold("zoneType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ZoneType = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAvailabilityZoneList(v *[]types.AvailabilityZone, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AvailabilityZone - if *v == nil { - sv = make([]types.AvailabilityZone, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AvailabilityZone - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAvailabilityZone(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAvailabilityZoneListUnwrapped(v *[]types.AvailabilityZone, decoder smithyxml.NodeDecoder) error { - var sv []types.AvailabilityZone - if *v == nil { - sv = make([]types.AvailabilityZone, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AvailabilityZone - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAvailabilityZone(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAvailabilityZoneMessage(v **types.AvailabilityZoneMessage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AvailabilityZoneMessage - if *v == nil { - sv = &types.AvailabilityZoneMessage{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAvailabilityZoneMessageList(v *[]types.AvailabilityZoneMessage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AvailabilityZoneMessage - if *v == nil { - sv = make([]types.AvailabilityZoneMessage, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AvailabilityZoneMessage - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAvailabilityZoneMessage(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAvailabilityZoneMessageListUnwrapped(v *[]types.AvailabilityZoneMessage, decoder smithyxml.NodeDecoder) error { - var sv []types.AvailabilityZoneMessage - if *v == nil { - sv = make([]types.AvailabilityZoneMessage, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AvailabilityZoneMessage - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAvailabilityZoneMessage(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentAvailableCapacity(v **types.AvailableCapacity, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AvailableCapacity - if *v == nil { - sv = &types.AvailableCapacity{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availableInstanceCapacity", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAvailableInstanceCapacityList(&sv.AvailableInstanceCapacity, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("availableVCpus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableVCpus = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAvailableInstanceCapacityList(v *[]types.InstanceCapacity, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceCapacity - if *v == nil { - sv = make([]types.InstanceCapacity, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceCapacity - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceCapacity(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentAvailableInstanceCapacityListUnwrapped(v *[]types.InstanceCapacity, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceCapacity - if *v == nil { - sv = make([]types.InstanceCapacity, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceCapacity - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceCapacity(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentBaselineEbsBandwidthMbps(v **types.BaselineEbsBandwidthMbps, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.BaselineEbsBandwidthMbps - if *v == nil { - sv = &types.BaselineEbsBandwidthMbps{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Max = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Min = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBlockDeviceMapping(v **types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.BlockDeviceMapping - if *v == nil { - sv = &types.BlockDeviceMapping{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceName = ptr.String(xtv) - } - - case strings.EqualFold("ebs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEbsBlockDevice(&sv.Ebs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("noDevice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NoDevice = ptr.String(xtv) - } - - case strings.EqualFold("virtualName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VirtualName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBlockDeviceMappingList(v *[]types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.BlockDeviceMapping - if *v == nil { - sv = make([]types.BlockDeviceMapping, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.BlockDeviceMapping - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentBlockDeviceMapping(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBlockDeviceMappingListUnwrapped(v *[]types.BlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - var sv []types.BlockDeviceMapping - if *v == nil { - sv = make([]types.BlockDeviceMapping, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.BlockDeviceMapping - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentBlockDeviceMapping(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentBootModeTypeList(v *[]types.BootModeType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.BootModeType - if *v == nil { - sv = make([]types.BootModeType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.BootModeType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.BootModeType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBootModeTypeListUnwrapped(v *[]types.BootModeType, decoder smithyxml.NodeDecoder) error { - var sv []types.BootModeType - if *v == nil { - sv = make([]types.BootModeType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.BootModeType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.BootModeType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentBundleTask(v **types.BundleTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.BundleTask - if *v == nil { - sv = &types.BundleTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bundleId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BundleId = ptr.String(xtv) - } - - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBundleTaskError(&sv.BundleTaskError, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.BundleTaskState(xtv) - } - - case strings.EqualFold("storage", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStorage(&sv.Storage, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("updateTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UpdateTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBundleTaskError(v **types.BundleTaskError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.BundleTaskError - if *v == nil { - sv = &types.BundleTaskError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBundleTaskList(v *[]types.BundleTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.BundleTask - if *v == nil { - sv = make([]types.BundleTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.BundleTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentBundleTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentBundleTaskListUnwrapped(v *[]types.BundleTask, decoder smithyxml.NodeDecoder) error { - var sv []types.BundleTask - if *v == nil { - sv = make([]types.BundleTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.BundleTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentBundleTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentByoasn(v **types.Byoasn, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Byoasn - if *v == nil { - sv = &types.Byoasn{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("asn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Asn = ptr.String(xtv) - } - - case strings.EqualFold("ipamId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.AsnState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentByoasnSet(v *[]types.Byoasn, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Byoasn - if *v == nil { - sv = make([]types.Byoasn, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Byoasn - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentByoasn(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentByoasnSetUnwrapped(v *[]types.Byoasn, decoder smithyxml.NodeDecoder) error { - var sv []types.Byoasn - if *v == nil { - sv = make([]types.Byoasn, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Byoasn - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentByoasn(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentByoipCidr(v **types.ByoipCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ByoipCidr - if *v == nil { - sv = &types.ByoipCidr{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("asnAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAsnAssociationSet(&sv.AsnAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ByoipCidrState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentByoipCidrSet(v *[]types.ByoipCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ByoipCidr - if *v == nil { - sv = make([]types.ByoipCidr, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ByoipCidr - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentByoipCidr(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentByoipCidrSetUnwrapped(v *[]types.ByoipCidr, decoder smithyxml.NodeDecoder) error { - var sv []types.ByoipCidr - if *v == nil { - sv = make([]types.ByoipCidr, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ByoipCidr - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentByoipCidr(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCancelCapacityReservationFleetError(v **types.CancelCapacityReservationFleetError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CancelCapacityReservationFleetError - if *v == nil { - sv = &types.CancelCapacityReservationFleetError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelledSpotInstanceRequest(v **types.CancelledSpotInstanceRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CancelledSpotInstanceRequest - if *v == nil { - sv = &types.CancelledSpotInstanceRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("spotInstanceRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotInstanceRequestId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.CancelSpotInstanceRequestState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelledSpotInstanceRequestList(v *[]types.CancelledSpotInstanceRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CancelledSpotInstanceRequest - if *v == nil { - sv = make([]types.CancelledSpotInstanceRequest, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CancelledSpotInstanceRequest - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCancelledSpotInstanceRequest(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelledSpotInstanceRequestListUnwrapped(v *[]types.CancelledSpotInstanceRequest, decoder smithyxml.NodeDecoder) error { - var sv []types.CancelledSpotInstanceRequest - if *v == nil { - sv = make([]types.CancelledSpotInstanceRequest, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CancelledSpotInstanceRequest - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCancelledSpotInstanceRequest(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsError(v **types.CancelSpotFleetRequestsError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CancelSpotFleetRequestsError - if *v == nil { - sv = &types.CancelSpotFleetRequestsError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.CancelBatchErrorCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorItem(v **types.CancelSpotFleetRequestsErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CancelSpotFleetRequestsErrorItem - if *v == nil { - sv = &types.CancelSpotFleetRequestsErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsError(&sv.Error, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("spotFleetRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorSet(v *[]types.CancelSpotFleetRequestsErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CancelSpotFleetRequestsErrorItem - if *v == nil { - sv = make([]types.CancelSpotFleetRequestsErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CancelSpotFleetRequestsErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorSetUnwrapped(v *[]types.CancelSpotFleetRequestsErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.CancelSpotFleetRequestsErrorItem - if *v == nil { - sv = make([]types.CancelSpotFleetRequestsErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CancelSpotFleetRequestsErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessItem(v **types.CancelSpotFleetRequestsSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CancelSpotFleetRequestsSuccessItem - if *v == nil { - sv = &types.CancelSpotFleetRequestsSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currentSpotFleetRequestState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrentSpotFleetRequestState = types.BatchState(xtv) - } - - case strings.EqualFold("previousSpotFleetRequestState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PreviousSpotFleetRequestState = types.BatchState(xtv) - } - - case strings.EqualFold("spotFleetRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSet(v *[]types.CancelSpotFleetRequestsSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CancelSpotFleetRequestsSuccessItem - if *v == nil { - sv = make([]types.CancelSpotFleetRequestsSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CancelSpotFleetRequestsSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSetUnwrapped(v *[]types.CancelSpotFleetRequestsSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.CancelSpotFleetRequestsSuccessItem - if *v == nil { - sv = make([]types.CancelSpotFleetRequestsSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CancelSpotFleetRequestsSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityAllocation(v **types.CapacityAllocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityAllocation - if *v == nil { - sv = &types.CapacityAllocation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationType = types.AllocationType(xtv) - } - - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityAllocations(v *[]types.CapacityAllocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CapacityAllocation - if *v == nil { - sv = make([]types.CapacityAllocation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CapacityAllocation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCapacityAllocation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityAllocationsUnwrapped(v *[]types.CapacityAllocation, decoder smithyxml.NodeDecoder) error { - var sv []types.CapacityAllocation - if *v == nil { - sv = make([]types.CapacityAllocation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CapacityAllocation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCapacityAllocation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityBlockOffering(v **types.CapacityBlockOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityBlockOffering - if *v == nil { - sv = &types.CapacityBlockOffering{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("capacityBlockDurationHours", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.CapacityBlockDurationHours = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("capacityBlockOfferingId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityBlockOfferingId = ptr.String(xtv) - } - - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = ptr.String(xtv) - } - - case strings.EqualFold("endDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndDate = ptr.Time(t) - } - - case strings.EqualFold("instanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("startDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartDate = ptr.Time(t) - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.CapacityReservationTenancy(xtv) - } - - case strings.EqualFold("upfrontFee", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UpfrontFee = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityBlockOfferingSet(v *[]types.CapacityBlockOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CapacityBlockOffering - if *v == nil { - sv = make([]types.CapacityBlockOffering, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CapacityBlockOffering - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCapacityBlockOffering(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityBlockOfferingSetUnwrapped(v *[]types.CapacityBlockOffering, decoder smithyxml.NodeDecoder) error { - var sv []types.CapacityBlockOffering - if *v == nil { - sv = make([]types.CapacityBlockOffering, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CapacityBlockOffering - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCapacityBlockOffering(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityReservation(v **types.CapacityReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservation - if *v == nil { - sv = &types.CapacityReservation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZoneId = ptr.String(xtv) - } - - case strings.EqualFold("availableInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableInstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("capacityAllocationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityAllocations(&sv.CapacityAllocations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("capacityReservationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationArn = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationFleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationFleetId = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationId = ptr.String(xtv) - } - - case strings.EqualFold("createDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateDate = ptr.Time(t) - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsOptimized = ptr.Bool(xtv) - } - - case strings.EqualFold("endDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndDate = ptr.Time(t) - } - - case strings.EqualFold("endDateType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EndDateType = types.EndDateType(xtv) - } - - case strings.EqualFold("ephemeralStorage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EphemeralStorage = ptr.Bool(xtv) - } - - case strings.EqualFold("instanceMatchCriteria", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceMatchCriteria = types.InstanceMatchCriteria(xtv) - } - - case strings.EqualFold("instancePlatform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstancePlatform = types.CapacityReservationInstancePlatform(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("placementGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PlacementGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("reservationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservationType = types.CapacityReservationType(xtv) - } - - case strings.EqualFold("startDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartDate = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.CapacityReservationState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.CapacityReservationTenancy(xtv) - } - - case strings.EqualFold("totalInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalInstanceCount = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationFleet(v **types.CapacityReservationFleet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservationFleet - if *v == nil { - sv = &types.CapacityReservationFleet{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationStrategy = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationFleetArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationFleetArn = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationFleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationFleetId = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("endDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndDate = ptr.Time(t) - } - - case strings.EqualFold("instanceMatchCriteria", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceMatchCriteria = types.FleetInstanceMatchCriteria(xtv) - } - - case strings.EqualFold("instanceTypeSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetCapacityReservationSet(&sv.InstanceTypeSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.CapacityReservationFleetState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.FleetCapacityReservationTenancy(xtv) - } - - case strings.EqualFold("totalFulfilledCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.TotalFulfilledCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("totalTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalTargetCapacity = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationFleetCancellationState(v **types.CapacityReservationFleetCancellationState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservationFleetCancellationState - if *v == nil { - sv = &types.CapacityReservationFleetCancellationState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationFleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationFleetId = ptr.String(xtv) - } - - case strings.EqualFold("currentFleetState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrentFleetState = types.CapacityReservationFleetState(xtv) - } - - case strings.EqualFold("previousFleetState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PreviousFleetState = types.CapacityReservationFleetState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationFleetCancellationStateSet(v *[]types.CapacityReservationFleetCancellationState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CapacityReservationFleetCancellationState - if *v == nil { - sv = make([]types.CapacityReservationFleetCancellationState, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CapacityReservationFleetCancellationState - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCapacityReservationFleetCancellationState(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationFleetCancellationStateSetUnwrapped(v *[]types.CapacityReservationFleetCancellationState, decoder smithyxml.NodeDecoder) error { - var sv []types.CapacityReservationFleetCancellationState - if *v == nil { - sv = make([]types.CapacityReservationFleetCancellationState, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CapacityReservationFleetCancellationState - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCapacityReservationFleetCancellationState(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityReservationFleetSet(v *[]types.CapacityReservationFleet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CapacityReservationFleet - if *v == nil { - sv = make([]types.CapacityReservationFleet, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CapacityReservationFleet - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCapacityReservationFleet(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationFleetSetUnwrapped(v *[]types.CapacityReservationFleet, decoder smithyxml.NodeDecoder) error { - var sv []types.CapacityReservationFleet - if *v == nil { - sv = make([]types.CapacityReservationFleet, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CapacityReservationFleet - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCapacityReservationFleet(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityReservationGroup(v **types.CapacityReservationGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservationGroup - if *v == nil { - sv = &types.CapacityReservationGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationGroupSet(v *[]types.CapacityReservationGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CapacityReservationGroup - if *v == nil { - sv = make([]types.CapacityReservationGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CapacityReservationGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCapacityReservationGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationGroupSetUnwrapped(v *[]types.CapacityReservationGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.CapacityReservationGroup - if *v == nil { - sv = make([]types.CapacityReservationGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CapacityReservationGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCapacityReservationGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityReservationOptions(v **types.CapacityReservationOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservationOptions - if *v == nil { - sv = &types.CapacityReservationOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("usageStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UsageStrategy = types.FleetCapacityReservationUsageStrategy(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationSet(v *[]types.CapacityReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CapacityReservation - if *v == nil { - sv = make([]types.CapacityReservation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CapacityReservation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCapacityReservation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationSetUnwrapped(v *[]types.CapacityReservation, decoder smithyxml.NodeDecoder) error { - var sv []types.CapacityReservation - if *v == nil { - sv = make([]types.CapacityReservation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CapacityReservation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCapacityReservation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCapacityReservationSpecificationResponse(v **types.CapacityReservationSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservationSpecificationResponse - if *v == nil { - sv = &types.CapacityReservationSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationPreference", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationPreference = types.CapacityReservationPreference(xtv) - } - - case strings.EqualFold("capacityReservationTarget", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationTargetResponse(&sv.CapacityReservationTarget, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCapacityReservationTargetResponse(v **types.CapacityReservationTargetResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CapacityReservationTargetResponse - if *v == nil { - sv = &types.CapacityReservationTargetResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationId = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationResourceGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationResourceGroupArn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCarrierGateway(v **types.CarrierGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CarrierGateway - if *v == nil { - sv = &types.CarrierGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.CarrierGatewayState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCarrierGatewaySet(v *[]types.CarrierGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CarrierGateway - if *v == nil { - sv = make([]types.CarrierGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CarrierGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCarrierGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCarrierGatewaySetUnwrapped(v *[]types.CarrierGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.CarrierGateway - if *v == nil { - sv = make([]types.CarrierGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CarrierGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCarrierGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCertificateAuthentication(v **types.CertificateAuthentication, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CertificateAuthentication - if *v == nil { - sv = &types.CertificateAuthentication{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientRootCertificateChain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientRootCertificateChain = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCidrBlock(v **types.CidrBlock, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrBlock - if *v == nil { - sv = &types.CidrBlock{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCidrBlockSet(v *[]types.CidrBlock, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CidrBlock - if *v == nil { - sv = make([]types.CidrBlock, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CidrBlock - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCidrBlock(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCidrBlockSetUnwrapped(v *[]types.CidrBlock, decoder smithyxml.NodeDecoder) error { - var sv []types.CidrBlock - if *v == nil { - sv = make([]types.CidrBlock, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CidrBlock - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCidrBlock(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClassicLinkDnsSupport(v **types.ClassicLinkDnsSupport, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClassicLinkDnsSupport - if *v == nil { - sv = &types.ClassicLinkDnsSupport{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("classicLinkDnsSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ClassicLinkDnsSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClassicLinkDnsSupportList(v *[]types.ClassicLinkDnsSupport, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClassicLinkDnsSupport - if *v == nil { - sv = make([]types.ClassicLinkDnsSupport, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClassicLinkDnsSupport - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClassicLinkDnsSupport(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClassicLinkDnsSupportListUnwrapped(v *[]types.ClassicLinkDnsSupport, decoder smithyxml.NodeDecoder) error { - var sv []types.ClassicLinkDnsSupport - if *v == nil { - sv = make([]types.ClassicLinkDnsSupport, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClassicLinkDnsSupport - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClassicLinkDnsSupport(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClassicLinkInstance(v **types.ClassicLinkInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClassicLinkInstance - if *v == nil { - sv = &types.ClassicLinkInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClassicLinkInstanceList(v *[]types.ClassicLinkInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClassicLinkInstance - if *v == nil { - sv = make([]types.ClassicLinkInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClassicLinkInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClassicLinkInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClassicLinkInstanceListUnwrapped(v *[]types.ClassicLinkInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.ClassicLinkInstance - if *v == nil { - sv = make([]types.ClassicLinkInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClassicLinkInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClassicLinkInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClassicLoadBalancer(v **types.ClassicLoadBalancer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClassicLoadBalancer - if *v == nil { - sv = &types.ClassicLoadBalancer{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClassicLoadBalancers(v *[]types.ClassicLoadBalancer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClassicLoadBalancer - if *v == nil { - sv = make([]types.ClassicLoadBalancer, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClassicLoadBalancer - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClassicLoadBalancer(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClassicLoadBalancersUnwrapped(v *[]types.ClassicLoadBalancer, decoder smithyxml.NodeDecoder) error { - var sv []types.ClassicLoadBalancer - if *v == nil { - sv = make([]types.ClassicLoadBalancer, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClassicLoadBalancer - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClassicLoadBalancer(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClassicLoadBalancersConfig(v **types.ClassicLoadBalancersConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClassicLoadBalancersConfig - if *v == nil { - sv = &types.ClassicLoadBalancersConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("classicLoadBalancers", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClassicLoadBalancers(&sv.ClassicLoadBalancers, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientCertificateRevocationListStatus(v **types.ClientCertificateRevocationListStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientCertificateRevocationListStatus - if *v == nil { - sv = &types.ClientCertificateRevocationListStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.ClientCertificateRevocationListStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientConnectResponseOptions(v **types.ClientConnectResponseOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientConnectResponseOptions - if *v == nil { - sv = &types.ClientConnectResponseOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - case strings.EqualFold("lambdaFunctionArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LambdaFunctionArn = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnEndpointAttributeStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientLoginBannerResponseOptions(v **types.ClientLoginBannerResponseOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientLoginBannerResponseOptions - if *v == nil { - sv = &types.ClientLoginBannerResponseOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bannerText", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BannerText = ptr.String(xtv) - } - - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnAuthentication(v **types.ClientVpnAuthentication, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnAuthentication - if *v == nil { - sv = &types.ClientVpnAuthentication{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("activeDirectory", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDirectoryServiceAuthentication(&sv.ActiveDirectory, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("federatedAuthentication", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFederatedAuthentication(&sv.FederatedAuthentication, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("mutualAuthentication", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCertificateAuthentication(&sv.MutualAuthentication, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.ClientVpnAuthenticationType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnAuthenticationList(v *[]types.ClientVpnAuthentication, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClientVpnAuthentication - if *v == nil { - sv = make([]types.ClientVpnAuthentication, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClientVpnAuthentication - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClientVpnAuthentication(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnAuthenticationListUnwrapped(v *[]types.ClientVpnAuthentication, decoder smithyxml.NodeDecoder) error { - var sv []types.ClientVpnAuthentication - if *v == nil { - sv = make([]types.ClientVpnAuthentication, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClientVpnAuthentication - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClientVpnAuthentication(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(v **types.ClientVpnAuthorizationRuleStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnAuthorizationRuleStatus - if *v == nil { - sv = &types.ClientVpnAuthorizationRuleStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.ClientVpnAuthorizationRuleStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnConnection(v **types.ClientVpnConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnConnection - if *v == nil { - sv = &types.ClientVpnConnection{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientIp = ptr.String(xtv) - } - - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("commonName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CommonName = ptr.String(xtv) - } - - case strings.EqualFold("connectionEndTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionEndTime = ptr.String(xtv) - } - - case strings.EqualFold("connectionEstablishedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionEstablishedTime = ptr.String(xtv) - } - - case strings.EqualFold("connectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionId = ptr.String(xtv) - } - - case strings.EqualFold("egressBytes", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EgressBytes = ptr.String(xtv) - } - - case strings.EqualFold("egressPackets", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EgressPackets = ptr.String(xtv) - } - - case strings.EqualFold("ingressBytes", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IngressBytes = ptr.String(xtv) - } - - case strings.EqualFold("ingressPackets", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IngressPackets = ptr.String(xtv) - } - - case strings.EqualFold("postureComplianceStatusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.PostureComplianceStatuses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnConnectionStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Timestamp = ptr.String(xtv) - } - - case strings.EqualFold("username", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Username = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnConnectionSet(v *[]types.ClientVpnConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClientVpnConnection - if *v == nil { - sv = make([]types.ClientVpnConnection, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClientVpnConnection - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClientVpnConnection(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnConnectionSetUnwrapped(v *[]types.ClientVpnConnection, decoder smithyxml.NodeDecoder) error { - var sv []types.ClientVpnConnection - if *v == nil { - sv = make([]types.ClientVpnConnection, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClientVpnConnection - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClientVpnConnection(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClientVpnConnectionStatus(v **types.ClientVpnConnectionStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnConnectionStatus - if *v == nil { - sv = &types.ClientVpnConnectionStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.ClientVpnConnectionStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnEndpoint(v **types.ClientVpnEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnEndpoint - if *v == nil { - sv = &types.ClientVpnEndpoint{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedTargetNetwork", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAssociatedTargetNetworkSet(&sv.AssociatedTargetNetworks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("authenticationOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnAuthenticationList(&sv.AuthenticationOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("clientCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("clientConnectOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientConnectResponseOptions(&sv.ClientConnectOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("clientLoginBannerOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientLoginBannerResponseOptions(&sv.ClientLoginBannerOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("connectionLogOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionLogResponseOptions(&sv.ConnectionLogOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreationTime = ptr.String(xtv) - } - - case strings.EqualFold("deletionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeletionTime = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("dnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsName = ptr.String(xtv) - } - - case strings.EqualFold("dnsServer", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.DnsServers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSet(&sv.SecurityGroupIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("selfServicePortalUrl", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SelfServicePortalUrl = ptr.String(xtv) - } - - case strings.EqualFold("serverCertificateArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServerCertificateArn = ptr.String(xtv) - } - - case strings.EqualFold("sessionTimeoutHours", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SessionTimeoutHours = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("splitTunnel", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SplitTunnel = ptr.Bool(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnEndpointStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transportProtocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransportProtocol = types.TransportProtocol(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - case strings.EqualFold("vpnPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VpnPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("vpnProtocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnProtocol = types.VpnProtocol(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnEndpointAttributeStatus(v **types.ClientVpnEndpointAttributeStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnEndpointAttributeStatus - if *v == nil { - sv = &types.ClientVpnEndpointAttributeStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.ClientVpnEndpointAttributeStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnEndpointStatus(v **types.ClientVpnEndpointStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnEndpointStatus - if *v == nil { - sv = &types.ClientVpnEndpointStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.ClientVpnEndpointStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnRoute(v **types.ClientVpnRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnRoute - if *v == nil { - sv = &types.ClientVpnRoute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidr = ptr.String(xtv) - } - - case strings.EqualFold("origin", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Origin = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnRouteStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetSubnet", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetSubnet = ptr.String(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnRouteSet(v *[]types.ClientVpnRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClientVpnRoute - if *v == nil { - sv = make([]types.ClientVpnRoute, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClientVpnRoute - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClientVpnRoute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnRouteSetUnwrapped(v *[]types.ClientVpnRoute, decoder smithyxml.NodeDecoder) error { - var sv []types.ClientVpnRoute - if *v == nil { - sv = make([]types.ClientVpnRoute, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClientVpnRoute - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClientVpnRoute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentClientVpnRouteStatus(v **types.ClientVpnRouteStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ClientVpnRouteStatus - if *v == nil { - sv = &types.ClientVpnRouteStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.ClientVpnRouteStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCloudWatchLogOptions(v **types.CloudWatchLogOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CloudWatchLogOptions - if *v == nil { - sv = &types.CloudWatchLogOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("logEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.LogEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("logGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("logOutputFormat", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogOutputFormat = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoipAddressUsage(v **types.CoipAddressUsage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CoipAddressUsage - if *v == nil { - sv = &types.CoipAddressUsage{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("awsAccountId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AwsAccountId = ptr.String(xtv) - } - - case strings.EqualFold("awsService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AwsService = ptr.String(xtv) - } - - case strings.EqualFold("coIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoIp = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoipAddressUsageSet(v *[]types.CoipAddressUsage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CoipAddressUsage - if *v == nil { - sv = make([]types.CoipAddressUsage, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CoipAddressUsage - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCoipAddressUsage(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoipAddressUsageSetUnwrapped(v *[]types.CoipAddressUsage, decoder smithyxml.NodeDecoder) error { - var sv []types.CoipAddressUsage - if *v == nil { - sv = make([]types.CoipAddressUsage, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CoipAddressUsage - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCoipAddressUsage(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCoipCidr(v **types.CoipCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CoipCidr - if *v == nil { - sv = &types.CoipCidr{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("coipPoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoipPoolId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoipPool(v **types.CoipPool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CoipPool - if *v == nil { - sv = &types.CoipPool{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("poolArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolArn = ptr.String(xtv) - } - - case strings.EqualFold("poolCidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.PoolCidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("poolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoipPoolSet(v *[]types.CoipPool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CoipPool - if *v == nil { - sv = make([]types.CoipPool, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CoipPool - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCoipPool(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoipPoolSetUnwrapped(v *[]types.CoipPool, decoder smithyxml.NodeDecoder) error { - var sv []types.CoipPool - if *v == nil { - sv = make([]types.CoipPool, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CoipPool - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCoipPool(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentConnectionLogResponseOptions(v **types.ConnectionLogResponseOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConnectionLogResponseOptions - if *v == nil { - sv = &types.ConnectionLogResponseOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CloudwatchLogGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CloudwatchLogGroup = ptr.String(xtv) - } - - case strings.EqualFold("CloudwatchLogStream", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CloudwatchLogStream = ptr.String(xtv) - } - - case strings.EqualFold("Enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConnectionNotification(v **types.ConnectionNotification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConnectionNotification - if *v == nil { - sv = &types.ConnectionNotification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("connectionEvents", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.ConnectionEvents, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("connectionNotificationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionNotificationArn = ptr.String(xtv) - } - - case strings.EqualFold("connectionNotificationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionNotificationId = ptr.String(xtv) - } - - case strings.EqualFold("connectionNotificationState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionNotificationState = types.ConnectionNotificationState(xtv) - } - - case strings.EqualFold("connectionNotificationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionNotificationType = types.ConnectionNotificationType(xtv) - } - - case strings.EqualFold("serviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceId = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConnectionNotificationSet(v *[]types.ConnectionNotification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ConnectionNotification - if *v == nil { - sv = make([]types.ConnectionNotification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ConnectionNotification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentConnectionNotification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConnectionNotificationSetUnwrapped(v *[]types.ConnectionNotification, decoder smithyxml.NodeDecoder) error { - var sv []types.ConnectionNotification - if *v == nil { - sv = make([]types.ConnectionNotification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ConnectionNotification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentConnectionNotification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentConnectionTrackingConfiguration(v **types.ConnectionTrackingConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConnectionTrackingConfiguration - if *v == nil { - sv = &types.ConnectionTrackingConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("tcpEstablishedTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TcpEstablishedTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("udpStreamTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpStreamTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("udpTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpTimeout = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConnectionTrackingSpecification(v **types.ConnectionTrackingSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConnectionTrackingSpecification - if *v == nil { - sv = &types.ConnectionTrackingSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("tcpEstablishedTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TcpEstablishedTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("udpStreamTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpStreamTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("udpTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpTimeout = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConnectionTrackingSpecificationRequest(v **types.ConnectionTrackingSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConnectionTrackingSpecificationRequest - if *v == nil { - sv = &types.ConnectionTrackingSpecificationRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TcpEstablishedTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TcpEstablishedTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("UdpStreamTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpStreamTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("UdpTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpTimeout = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConnectionTrackingSpecificationResponse(v **types.ConnectionTrackingSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConnectionTrackingSpecificationResponse - if *v == nil { - sv = &types.ConnectionTrackingSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("tcpEstablishedTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TcpEstablishedTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("udpStreamTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpStreamTimeout = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("udpTimeout", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UdpTimeout = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentConversionTask(v **types.ConversionTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConversionTask - if *v == nil { - sv = &types.ConversionTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("conversionTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConversionTaskId = ptr.String(xtv) - } - - case strings.EqualFold("expirationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExpirationTime = ptr.String(xtv) - } - - case strings.EqualFold("importInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportInstanceTaskDetails(&sv.ImportInstance, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("importVolume", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportVolumeTaskDetails(&sv.ImportVolume, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ConversionTaskState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoreCountList(v *[]int32, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col int32 - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - col = int32(i64) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCoreCountListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - switch { - default: - var mv int32 - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - mv = int32(i64) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCpuManufacturerSet(v *[]types.CpuManufacturer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CpuManufacturer - if *v == nil { - sv = make([]types.CpuManufacturer, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CpuManufacturer - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.CpuManufacturer(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCpuManufacturerSetUnwrapped(v *[]types.CpuManufacturer, decoder smithyxml.NodeDecoder) error { - var sv []types.CpuManufacturer - if *v == nil { - sv = make([]types.CpuManufacturer, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CpuManufacturer - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.CpuManufacturer(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCpuOptions(v **types.CpuOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CpuOptions - if *v == nil { - sv = &types.CpuOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amdSevSnp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AmdSevSnp = types.AmdSevSnpSpecification(xtv) - } - - case strings.EqualFold("coreCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.CoreCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("threadsPerCore", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ThreadsPerCore = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateFleetError(v **types.CreateFleetError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CreateFleetError - if *v == nil { - sv = &types.CreateFleetError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("errorCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ErrorCode = ptr.String(xtv) - } - - case strings.EqualFold("errorMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ErrorMessage = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lifecycle", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Lifecycle = types.InstanceLifecycle(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateFleetErrorsSet(v *[]types.CreateFleetError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CreateFleetError - if *v == nil { - sv = make([]types.CreateFleetError, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CreateFleetError - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCreateFleetError(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateFleetErrorsSetUnwrapped(v *[]types.CreateFleetError, decoder smithyxml.NodeDecoder) error { - var sv []types.CreateFleetError - if *v == nil { - sv = make([]types.CreateFleetError, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CreateFleetError - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCreateFleetError(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCreateFleetInstance(v **types.CreateFleetInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CreateFleetInstance - if *v == nil { - sv = &types.CreateFleetInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIdsSet(&sv.InstanceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lifecycle", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Lifecycle = types.InstanceLifecycle(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = types.PlatformValues(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateFleetInstancesSet(v *[]types.CreateFleetInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CreateFleetInstance - if *v == nil { - sv = make([]types.CreateFleetInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CreateFleetInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCreateFleetInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateFleetInstancesSetUnwrapped(v *[]types.CreateFleetInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.CreateFleetInstance - if *v == nil { - sv = make([]types.CreateFleetInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CreateFleetInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCreateFleetInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCreateVolumePermission(v **types.CreateVolumePermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CreateVolumePermission - if *v == nil { - sv = &types.CreateVolumePermission{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("group", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Group = types.PermissionGroup(xtv) - } - - case strings.EqualFold("userId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateVolumePermissionList(v *[]types.CreateVolumePermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CreateVolumePermission - if *v == nil { - sv = make([]types.CreateVolumePermission, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CreateVolumePermission - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCreateVolumePermission(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCreateVolumePermissionListUnwrapped(v *[]types.CreateVolumePermission, decoder smithyxml.NodeDecoder) error { - var sv []types.CreateVolumePermission - if *v == nil { - sv = make([]types.CreateVolumePermission, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CreateVolumePermission - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCreateVolumePermission(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentCreditSpecification(v **types.CreditSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CreditSpecification - if *v == nil { - sv = &types.CreditSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cpuCredits", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CpuCredits = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCustomerGateway(v **types.CustomerGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CustomerGateway - if *v == nil { - sv = &types.CustomerGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bgpAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BgpAsn = ptr.String(xtv) - } - - case strings.EqualFold("certificateArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateArn = ptr.String(xtv) - } - - case strings.EqualFold("customerGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("deviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceName = ptr.String(xtv) - } - - case strings.EqualFold("ipAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpAddress = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCustomerGatewayList(v *[]types.CustomerGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CustomerGateway - if *v == nil { - sv = make([]types.CustomerGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.CustomerGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentCustomerGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentCustomerGatewayListUnwrapped(v *[]types.CustomerGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.CustomerGateway - if *v == nil { - sv = make([]types.CustomerGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CustomerGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentCustomerGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDataResponse(v **types.DataResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DataResponse - if *v == nil { - sv = &types.DataResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Destination = ptr.String(xtv) - } - - case strings.EqualFold("id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("metric", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Metric = types.MetricType(xtv) - } - - case strings.EqualFold("metricPointSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMetricPoints(&sv.MetricPoints, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("period", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Period = types.PeriodType(xtv) - } - - case strings.EqualFold("source", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Source = ptr.String(xtv) - } - - case strings.EqualFold("statistic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Statistic = types.StatisticType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDataResponses(v *[]types.DataResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DataResponse - if *v == nil { - sv = make([]types.DataResponse, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DataResponse - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDataResponse(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDataResponsesUnwrapped(v *[]types.DataResponse, decoder smithyxml.NodeDecoder) error { - var sv []types.DataResponse - if *v == nil { - sv = make([]types.DataResponse, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DataResponse - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDataResponse(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDedicatedHostIdList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDedicatedHostIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDeleteFleetError(v **types.DeleteFleetError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeleteFleetError - if *v == nil { - sv = &types.DeleteFleetError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.DeleteFleetErrorCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteFleetErrorItem(v **types.DeleteFleetErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeleteFleetErrorItem - if *v == nil { - sv = &types.DeleteFleetErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeleteFleetError(&sv.Error, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("fleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteFleetErrorSet(v *[]types.DeleteFleetErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DeleteFleetErrorItem - if *v == nil { - sv = make([]types.DeleteFleetErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DeleteFleetErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDeleteFleetErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteFleetErrorSetUnwrapped(v *[]types.DeleteFleetErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DeleteFleetErrorItem - if *v == nil { - sv = make([]types.DeleteFleetErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DeleteFleetErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDeleteFleetErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDeleteFleetSuccessItem(v **types.DeleteFleetSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeleteFleetSuccessItem - if *v == nil { - sv = &types.DeleteFleetSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currentFleetState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrentFleetState = types.FleetStateCode(xtv) - } - - case strings.EqualFold("fleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetId = ptr.String(xtv) - } - - case strings.EqualFold("previousFleetState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PreviousFleetState = types.FleetStateCode(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteFleetSuccessSet(v *[]types.DeleteFleetSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DeleteFleetSuccessItem - if *v == nil { - sv = make([]types.DeleteFleetSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DeleteFleetSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDeleteFleetSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteFleetSuccessSetUnwrapped(v *[]types.DeleteFleetSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DeleteFleetSuccessItem - if *v == nil { - sv = make([]types.DeleteFleetSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DeleteFleetSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDeleteFleetSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorItem(v **types.DeleteLaunchTemplateVersionsResponseErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeleteLaunchTemplateVersionsResponseErrorItem - if *v == nil { - sv = &types.DeleteLaunchTemplateVersionsResponseErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateName = ptr.String(xtv) - } - - case strings.EqualFold("responseError", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseError(&sv.ResponseError, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("versionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VersionNumber = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorSet(v *[]types.DeleteLaunchTemplateVersionsResponseErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DeleteLaunchTemplateVersionsResponseErrorItem - if *v == nil { - sv = make([]types.DeleteLaunchTemplateVersionsResponseErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DeleteLaunchTemplateVersionsResponseErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorSetUnwrapped(v *[]types.DeleteLaunchTemplateVersionsResponseErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DeleteLaunchTemplateVersionsResponseErrorItem - if *v == nil { - sv = make([]types.DeleteLaunchTemplateVersionsResponseErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DeleteLaunchTemplateVersionsResponseErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessItem(v **types.DeleteLaunchTemplateVersionsResponseSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeleteLaunchTemplateVersionsResponseSuccessItem - if *v == nil { - sv = &types.DeleteLaunchTemplateVersionsResponseSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateName = ptr.String(xtv) - } - - case strings.EqualFold("versionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VersionNumber = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessSet(v *[]types.DeleteLaunchTemplateVersionsResponseSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DeleteLaunchTemplateVersionsResponseSuccessItem - if *v == nil { - sv = make([]types.DeleteLaunchTemplateVersionsResponseSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DeleteLaunchTemplateVersionsResponseSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessSetUnwrapped(v *[]types.DeleteLaunchTemplateVersionsResponseSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DeleteLaunchTemplateVersionsResponseSuccessItem - if *v == nil { - sv = make([]types.DeleteLaunchTemplateVersionsResponseSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DeleteLaunchTemplateVersionsResponseSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDeleteQueuedReservedInstancesError(v **types.DeleteQueuedReservedInstancesError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeleteQueuedReservedInstancesError - if *v == nil { - sv = &types.DeleteQueuedReservedInstancesError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.DeleteQueuedReservedInstancesErrorCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeprovisionedAddressSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeprovisionedAddressSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDescribeConversionTaskList(v *[]types.ConversionTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ConversionTask - if *v == nil { - sv = make([]types.ConversionTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ConversionTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentConversionTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeConversionTaskListUnwrapped(v *[]types.ConversionTask, decoder smithyxml.NodeDecoder) error { - var sv []types.ConversionTask - if *v == nil { - sv = make([]types.ConversionTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ConversionTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentConversionTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDescribeFastLaunchImagesSuccessItem(v **types.DescribeFastLaunchImagesSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DescribeFastLaunchImagesSuccessItem - if *v == nil { - sv = &types.DescribeFastLaunchImagesSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFastLaunchLaunchTemplateSpecificationResponse(&sv.LaunchTemplate, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxParallelLaunches", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxParallelLaunches = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.FastLaunchResourceType(xtv) - } - - case strings.EqualFold("snapshotConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFastLaunchSnapshotConfigurationResponse(&sv.SnapshotConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.FastLaunchStateCode(xtv) - } - - case strings.EqualFold("stateTransitionReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - case strings.EqualFold("stateTransitionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StateTransitionTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFastLaunchImagesSuccessSet(v *[]types.DescribeFastLaunchImagesSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DescribeFastLaunchImagesSuccessItem - if *v == nil { - sv = make([]types.DescribeFastLaunchImagesSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DescribeFastLaunchImagesSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDescribeFastLaunchImagesSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFastLaunchImagesSuccessSetUnwrapped(v *[]types.DescribeFastLaunchImagesSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DescribeFastLaunchImagesSuccessItem - if *v == nil { - sv = make([]types.DescribeFastLaunchImagesSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DescribeFastLaunchImagesSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDescribeFastLaunchImagesSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessItem(v **types.DescribeFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DescribeFastSnapshotRestoreSuccessItem - if *v == nil { - sv = &types.DescribeFastSnapshotRestoreSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("disabledTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DisabledTime = ptr.Time(t) - } - - case strings.EqualFold("disablingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DisablingTime = ptr.Time(t) - } - - case strings.EqualFold("enabledTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EnabledTime = ptr.Time(t) - } - - case strings.EqualFold("enablingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EnablingTime = ptr.Time(t) - } - - case strings.EqualFold("optimizingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.OptimizingTime = ptr.Time(t) - } - - case strings.EqualFold("ownerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.FastSnapshotRestoreStateCode(xtv) - } - - case strings.EqualFold("stateTransitionReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessSet(v *[]types.DescribeFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DescribeFastSnapshotRestoreSuccessItem - if *v == nil { - sv = make([]types.DescribeFastSnapshotRestoreSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DescribeFastSnapshotRestoreSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessSetUnwrapped(v *[]types.DescribeFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DescribeFastSnapshotRestoreSuccessItem - if *v == nil { - sv = make([]types.DescribeFastSnapshotRestoreSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DescribeFastSnapshotRestoreSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDescribeFleetError(v **types.DescribeFleetError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DescribeFleetError - if *v == nil { - sv = &types.DescribeFleetError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("errorCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ErrorCode = ptr.String(xtv) - } - - case strings.EqualFold("errorMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ErrorMessage = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lifecycle", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Lifecycle = types.InstanceLifecycle(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFleetsErrorSet(v *[]types.DescribeFleetError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DescribeFleetError - if *v == nil { - sv = make([]types.DescribeFleetError, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DescribeFleetError - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDescribeFleetError(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFleetsErrorSetUnwrapped(v *[]types.DescribeFleetError, decoder smithyxml.NodeDecoder) error { - var sv []types.DescribeFleetError - if *v == nil { - sv = make([]types.DescribeFleetError, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DescribeFleetError - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDescribeFleetError(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDescribeFleetsInstances(v **types.DescribeFleetsInstances, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DescribeFleetsInstances - if *v == nil { - sv = &types.DescribeFleetsInstances{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIdsSet(&sv.InstanceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("launchTemplateAndOverrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(&sv.LaunchTemplateAndOverrides, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lifecycle", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Lifecycle = types.InstanceLifecycle(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = types.PlatformValues(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFleetsInstancesSet(v *[]types.DescribeFleetsInstances, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DescribeFleetsInstances - if *v == nil { - sv = make([]types.DescribeFleetsInstances, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DescribeFleetsInstances - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDescribeFleetsInstances(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDescribeFleetsInstancesSetUnwrapped(v *[]types.DescribeFleetsInstances, decoder smithyxml.NodeDecoder) error { - var sv []types.DescribeFleetsInstances - if *v == nil { - sv = make([]types.DescribeFleetsInstances, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DescribeFleetsInstances - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDescribeFleetsInstances(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDestinationOptionsResponse(v **types.DestinationOptionsResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DestinationOptionsResponse - if *v == nil { - sv = &types.DestinationOptionsResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fileFormat", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FileFormat = types.DestinationFileFormat(xtv) - } - - case strings.EqualFold("hiveCompatiblePartitions", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.HiveCompatiblePartitions = ptr.Bool(xtv) - } - - case strings.EqualFold("perHourPartition", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PerHourPartition = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDeviceOptions(v **types.DeviceOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DeviceOptions - if *v == nil { - sv = &types.DeviceOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("publicSigningKeyUrl", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicSigningKeyUrl = ptr.String(xtv) - } - - case strings.EqualFold("tenantId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TenantId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDhcpConfiguration(v **types.DhcpConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DhcpConfiguration - if *v == nil { - sv = &types.DhcpConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Key = ptr.String(xtv) - } - - case strings.EqualFold("valueSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDhcpConfigurationValueList(&sv.Values, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDhcpConfigurationList(v *[]types.DhcpConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DhcpConfiguration - if *v == nil { - sv = make([]types.DhcpConfiguration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DhcpConfiguration - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDhcpConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDhcpConfigurationListUnwrapped(v *[]types.DhcpConfiguration, decoder smithyxml.NodeDecoder) error { - var sv []types.DhcpConfiguration - if *v == nil { - sv = make([]types.DhcpConfiguration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DhcpConfiguration - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDhcpConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDhcpConfigurationValueList(v *[]types.AttributeValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.AttributeValue - if *v == nil { - sv = make([]types.AttributeValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.AttributeValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentAttributeValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDhcpConfigurationValueListUnwrapped(v *[]types.AttributeValue, decoder smithyxml.NodeDecoder) error { - var sv []types.AttributeValue - if *v == nil { - sv = make([]types.AttributeValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.AttributeValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentAttributeValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDhcpOptions(v **types.DhcpOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DhcpOptions - if *v == nil { - sv = &types.DhcpOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dhcpConfigurationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDhcpConfigurationList(&sv.DhcpConfigurations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("dhcpOptionsId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DhcpOptionsId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDhcpOptionsList(v *[]types.DhcpOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DhcpOptions - if *v == nil { - sv = make([]types.DhcpOptions, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DhcpOptions - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDhcpOptions(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDhcpOptionsListUnwrapped(v *[]types.DhcpOptions, decoder smithyxml.NodeDecoder) error { - var sv []types.DhcpOptions - if *v == nil { - sv = make([]types.DhcpOptions, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DhcpOptions - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDhcpOptions(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDirectoryServiceAuthentication(v **types.DirectoryServiceAuthentication, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DirectoryServiceAuthentication - if *v == nil { - sv = &types.DirectoryServiceAuthentication{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("directoryId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DirectoryId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorItem(v **types.DisableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DisableFastSnapshotRestoreErrorItem - if *v == nil { - sv = &types.DisableFastSnapshotRestoreErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fastSnapshotRestoreStateErrorSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorSet(&sv.FastSnapshotRestoreStateErrors, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorSet(v *[]types.DisableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DisableFastSnapshotRestoreErrorItem - if *v == nil { - sv = make([]types.DisableFastSnapshotRestoreErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DisableFastSnapshotRestoreErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorSetUnwrapped(v *[]types.DisableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DisableFastSnapshotRestoreErrorItem - if *v == nil { - sv = make([]types.DisableFastSnapshotRestoreErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DisableFastSnapshotRestoreErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateError(v **types.DisableFastSnapshotRestoreStateError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DisableFastSnapshotRestoreStateError - if *v == nil { - sv = &types.DisableFastSnapshotRestoreStateError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorItem(v **types.DisableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DisableFastSnapshotRestoreStateErrorItem - if *v == nil { - sv = &types.DisableFastSnapshotRestoreStateErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateError(&sv.Error, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorSet(v *[]types.DisableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DisableFastSnapshotRestoreStateErrorItem - if *v == nil { - sv = make([]types.DisableFastSnapshotRestoreStateErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DisableFastSnapshotRestoreStateErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorSetUnwrapped(v *[]types.DisableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DisableFastSnapshotRestoreStateErrorItem - if *v == nil { - sv = make([]types.DisableFastSnapshotRestoreStateErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DisableFastSnapshotRestoreStateErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreStateErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessItem(v **types.DisableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DisableFastSnapshotRestoreSuccessItem - if *v == nil { - sv = &types.DisableFastSnapshotRestoreSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("disabledTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DisabledTime = ptr.Time(t) - } - - case strings.EqualFold("disablingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DisablingTime = ptr.Time(t) - } - - case strings.EqualFold("enabledTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EnabledTime = ptr.Time(t) - } - - case strings.EqualFold("enablingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EnablingTime = ptr.Time(t) - } - - case strings.EqualFold("optimizingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.OptimizingTime = ptr.Time(t) - } - - case strings.EqualFold("ownerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.FastSnapshotRestoreStateCode(xtv) - } - - case strings.EqualFold("stateTransitionReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessSet(v *[]types.DisableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DisableFastSnapshotRestoreSuccessItem - if *v == nil { - sv = make([]types.DisableFastSnapshotRestoreSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DisableFastSnapshotRestoreSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessSetUnwrapped(v *[]types.DisableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.DisableFastSnapshotRestoreSuccessItem - if *v == nil { - sv = make([]types.DisableFastSnapshotRestoreSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DisableFastSnapshotRestoreSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDiskImageDescription(v **types.DiskImageDescription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DiskImageDescription - if *v == nil { - sv = &types.DiskImageDescription{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("checksum", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Checksum = ptr.String(xtv) - } - - case strings.EqualFold("format", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Format = types.DiskImageFormat(xtv) - } - - case strings.EqualFold("importManifestUrl", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImportManifestUrl = ptr.String(xtv) - } - - case strings.EqualFold("size", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Size = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDiskImageVolumeDescription(v **types.DiskImageVolumeDescription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DiskImageVolumeDescription - if *v == nil { - sv = &types.DiskImageVolumeDescription{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("size", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Size = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDiskInfo(v **types.DiskInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DiskInfo - if *v == nil { - sv = &types.DiskInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("sizeInGB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SizeInGB = ptr.Int64(i64) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.DiskType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDiskInfoList(v *[]types.DiskInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DiskInfo - if *v == nil { - sv = make([]types.DiskInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DiskInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDiskInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDiskInfoListUnwrapped(v *[]types.DiskInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.DiskInfo - if *v == nil { - sv = make([]types.DiskInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DiskInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDiskInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDnsEntry(v **types.DnsEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DnsEntry - if *v == nil { - sv = &types.DnsEntry{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsName = ptr.String(xtv) - } - - case strings.EqualFold("hostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDnsEntrySet(v *[]types.DnsEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DnsEntry - if *v == nil { - sv = make([]types.DnsEntry, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.DnsEntry - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentDnsEntry(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentDnsEntrySetUnwrapped(v *[]types.DnsEntry, decoder smithyxml.NodeDecoder) error { - var sv []types.DnsEntry - if *v == nil { - sv = make([]types.DnsEntry, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DnsEntry - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentDnsEntry(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentDnsOptions(v **types.DnsOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DnsOptions - if *v == nil { - sv = &types.DnsOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dnsRecordIpType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsRecordIpType = types.DnsRecordIpType(xtv) - } - - case strings.EqualFold("privateDnsOnlyForInboundResolverEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PrivateDnsOnlyForInboundResolverEndpoint = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEbsBlockDevice(v **types.EbsBlockDevice, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EbsBlockDevice - if *v == nil { - sv = &types.EbsBlockDevice{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("iops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Iops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("throughput", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Throughput = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("volumeSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VolumeSize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("volumeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeType = types.VolumeType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEbsInfo(v **types.EbsInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EbsInfo - if *v == nil { - sv = &types.EbsInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ebsOptimizedInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEbsOptimizedInfo(&sv.EbsOptimizedInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ebsOptimizedSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EbsOptimizedSupport = types.EbsOptimizedSupport(xtv) - } - - case strings.EqualFold("encryptionSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EncryptionSupport = types.EbsEncryptionSupport(xtv) - } - - case strings.EqualFold("nvmeSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NvmeSupport = types.EbsNvmeSupport(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEbsInstanceBlockDevice(v **types.EbsInstanceBlockDevice, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EbsInstanceBlockDevice - if *v == nil { - sv = &types.EbsInstanceBlockDevice{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedResource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociatedResource = ptr.String(xtv) - } - - case strings.EqualFold("attachTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AttachTime = ptr.Time(t) - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.AttachmentStatus(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeOwnerId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEbsOptimizedInfo(v **types.EbsOptimizedInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EbsOptimizedInfo - if *v == nil { - sv = &types.EbsOptimizedInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("baselineBandwidthInMbps", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.BaselineBandwidthInMbps = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("baselineIops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.BaselineIops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("baselineThroughputInMBps", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.BaselineThroughputInMBps = ptr.Float64(f64) - } - - case strings.EqualFold("maximumBandwidthInMbps", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaximumBandwidthInMbps = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("maximumIops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaximumIops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("maximumThroughputInMBps", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.MaximumThroughputInMBps = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEc2InstanceConnectEndpoint(v **types.Ec2InstanceConnectEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ec2InstanceConnectEndpoint - if *v == nil { - sv = &types.Ec2InstanceConnectEndpoint{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("createdAt", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } - - case strings.EqualFold("dnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsName = ptr.String(xtv) - } - - case strings.EqualFold("fipsDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FipsDnsName = ptr.String(xtv) - } - - case strings.EqualFold("instanceConnectEndpointArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceConnectEndpointArn = ptr.String(xtv) - } - - case strings.EqualFold("instanceConnectEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceConnectEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceIdSet(&sv.NetworkInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("preserveClientIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PreserveClientIp = ptr.Bool(xtv) - } - - case strings.EqualFold("securityGroupIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupIdSet(&sv.SecurityGroupIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.Ec2InstanceConnectEndpointState(xtv) - } - - case strings.EqualFold("stateMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateMessage = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEfaInfo(v **types.EfaInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EfaInfo - if *v == nil { - sv = &types.EfaInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("maximumEfaInterfaces", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaximumEfaInterfaces = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEgressOnlyInternetGateway(v **types.EgressOnlyInternetGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EgressOnlyInternetGateway - if *v == nil { - sv = &types.EgressOnlyInternetGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInternetGatewayAttachmentList(&sv.Attachments, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("egressOnlyInternetGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EgressOnlyInternetGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEgressOnlyInternetGatewayList(v *[]types.EgressOnlyInternetGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.EgressOnlyInternetGateway - if *v == nil { - sv = make([]types.EgressOnlyInternetGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.EgressOnlyInternetGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentEgressOnlyInternetGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEgressOnlyInternetGatewayListUnwrapped(v *[]types.EgressOnlyInternetGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.EgressOnlyInternetGateway - if *v == nil { - sv = make([]types.EgressOnlyInternetGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.EgressOnlyInternetGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentEgressOnlyInternetGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentElasticGpuAssociation(v **types.ElasticGpuAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ElasticGpuAssociation - if *v == nil { - sv = &types.ElasticGpuAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("elasticGpuAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("elasticGpuAssociationState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuAssociationState = ptr.String(xtv) - } - - case strings.EqualFold("elasticGpuAssociationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuAssociationTime = ptr.String(xtv) - } - - case strings.EqualFold("elasticGpuId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpuAssociationList(v *[]types.ElasticGpuAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ElasticGpuAssociation - if *v == nil { - sv = make([]types.ElasticGpuAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ElasticGpuAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentElasticGpuAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpuAssociationListUnwrapped(v *[]types.ElasticGpuAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.ElasticGpuAssociation - if *v == nil { - sv = make([]types.ElasticGpuAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ElasticGpuAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentElasticGpuAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentElasticGpuHealth(v **types.ElasticGpuHealth, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ElasticGpuHealth - if *v == nil { - sv = &types.ElasticGpuHealth{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.ElasticGpuStatus(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpus(v **types.ElasticGpus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ElasticGpus - if *v == nil { - sv = &types.ElasticGpus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("elasticGpuHealth", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentElasticGpuHealth(&sv.ElasticGpuHealth, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("elasticGpuId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuId = ptr.String(xtv) - } - - case strings.EqualFold("elasticGpuState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuState = types.ElasticGpuState(xtv) - } - - case strings.EqualFold("elasticGpuType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticGpuType = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpuSet(v *[]types.ElasticGpus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ElasticGpus - if *v == nil { - sv = make([]types.ElasticGpus, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ElasticGpus - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentElasticGpus(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpuSetUnwrapped(v *[]types.ElasticGpus, decoder smithyxml.NodeDecoder) error { - var sv []types.ElasticGpus - if *v == nil { - sv = make([]types.ElasticGpus, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ElasticGpus - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentElasticGpus(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentElasticGpuSpecificationResponse(v **types.ElasticGpuSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ElasticGpuSpecificationResponse - if *v == nil { - sv = &types.ElasticGpuSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpuSpecificationResponseList(v *[]types.ElasticGpuSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ElasticGpuSpecificationResponse - if *v == nil { - sv = make([]types.ElasticGpuSpecificationResponse, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ElasticGpuSpecificationResponse - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentElasticGpuSpecificationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticGpuSpecificationResponseListUnwrapped(v *[]types.ElasticGpuSpecificationResponse, decoder smithyxml.NodeDecoder) error { - var sv []types.ElasticGpuSpecificationResponse - if *v == nil { - sv = make([]types.ElasticGpuSpecificationResponse, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ElasticGpuSpecificationResponse - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentElasticGpuSpecificationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociation(v **types.ElasticInferenceAcceleratorAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ElasticInferenceAcceleratorAssociation - if *v == nil { - sv = &types.ElasticInferenceAcceleratorAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("elasticInferenceAcceleratorArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticInferenceAcceleratorArn = ptr.String(xtv) - } - - case strings.EqualFold("elasticInferenceAcceleratorAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticInferenceAcceleratorAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("elasticInferenceAcceleratorAssociationState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ElasticInferenceAcceleratorAssociationState = ptr.String(xtv) - } - - case strings.EqualFold("elasticInferenceAcceleratorAssociationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ElasticInferenceAcceleratorAssociationTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociationList(v *[]types.ElasticInferenceAcceleratorAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ElasticInferenceAcceleratorAssociation - if *v == nil { - sv = make([]types.ElasticInferenceAcceleratorAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ElasticInferenceAcceleratorAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociationListUnwrapped(v *[]types.ElasticInferenceAcceleratorAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.ElasticInferenceAcceleratorAssociation - if *v == nil { - sv = make([]types.ElasticInferenceAcceleratorAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ElasticInferenceAcceleratorAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorItem(v **types.EnableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnableFastSnapshotRestoreErrorItem - if *v == nil { - sv = &types.EnableFastSnapshotRestoreErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fastSnapshotRestoreStateErrorSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorSet(&sv.FastSnapshotRestoreStateErrors, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorSet(v *[]types.EnableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.EnableFastSnapshotRestoreErrorItem - if *v == nil { - sv = make([]types.EnableFastSnapshotRestoreErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.EnableFastSnapshotRestoreErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorSetUnwrapped(v *[]types.EnableFastSnapshotRestoreErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.EnableFastSnapshotRestoreErrorItem - if *v == nil { - sv = make([]types.EnableFastSnapshotRestoreErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.EnableFastSnapshotRestoreErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateError(v **types.EnableFastSnapshotRestoreStateError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnableFastSnapshotRestoreStateError - if *v == nil { - sv = &types.EnableFastSnapshotRestoreStateError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorItem(v **types.EnableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnableFastSnapshotRestoreStateErrorItem - if *v == nil { - sv = &types.EnableFastSnapshotRestoreStateErrorItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateError(&sv.Error, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorSet(v *[]types.EnableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.EnableFastSnapshotRestoreStateErrorItem - if *v == nil { - sv = make([]types.EnableFastSnapshotRestoreStateErrorItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.EnableFastSnapshotRestoreStateErrorItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorSetUnwrapped(v *[]types.EnableFastSnapshotRestoreStateErrorItem, decoder smithyxml.NodeDecoder) error { - var sv []types.EnableFastSnapshotRestoreStateErrorItem - if *v == nil { - sv = make([]types.EnableFastSnapshotRestoreStateErrorItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.EnableFastSnapshotRestoreStateErrorItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreStateErrorItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessItem(v **types.EnableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnableFastSnapshotRestoreSuccessItem - if *v == nil { - sv = &types.EnableFastSnapshotRestoreSuccessItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("disabledTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DisabledTime = ptr.Time(t) - } - - case strings.EqualFold("disablingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DisablingTime = ptr.Time(t) - } - - case strings.EqualFold("enabledTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EnabledTime = ptr.Time(t) - } - - case strings.EqualFold("enablingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EnablingTime = ptr.Time(t) - } - - case strings.EqualFold("optimizingTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.OptimizingTime = ptr.Time(t) - } - - case strings.EqualFold("ownerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.FastSnapshotRestoreStateCode(xtv) - } - - case strings.EqualFold("stateTransitionReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessSet(v *[]types.EnableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.EnableFastSnapshotRestoreSuccessItem - if *v == nil { - sv = make([]types.EnableFastSnapshotRestoreSuccessItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.EnableFastSnapshotRestoreSuccessItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessSetUnwrapped(v *[]types.EnableFastSnapshotRestoreSuccessItem, decoder smithyxml.NodeDecoder) error { - var sv []types.EnableFastSnapshotRestoreSuccessItem - if *v == nil { - sv = make([]types.EnableFastSnapshotRestoreSuccessItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.EnableFastSnapshotRestoreSuccessItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentEnaSrdSpecificationRequest(v **types.EnaSrdSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnaSrdSpecificationRequest - if *v == nil { - sv = &types.EnaSrdSpecificationRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("EnaSrdEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("EnaSrdUdpSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnaSrdUdpSpecificationRequest(&sv.EnaSrdUdpSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnaSrdUdpSpecificationRequest(v **types.EnaSrdUdpSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnaSrdUdpSpecificationRequest - if *v == nil { - sv = &types.EnaSrdUdpSpecificationRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("EnaSrdUdpEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdUdpEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEnclaveOptions(v **types.EnclaveOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EnclaveOptions - if *v == nil { - sv = &types.EnclaveOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEndpointSet(v *[]types.ClientVpnEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ClientVpnEndpoint - if *v == nil { - sv = make([]types.ClientVpnEndpoint, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ClientVpnEndpoint - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentClientVpnEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentEndpointSetUnwrapped(v *[]types.ClientVpnEndpoint, decoder smithyxml.NodeDecoder) error { - var sv []types.ClientVpnEndpoint - if *v == nil { - sv = make([]types.ClientVpnEndpoint, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ClientVpnEndpoint - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentClientVpnEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentErrorSet(v *[]types.ValidationError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ValidationError - if *v == nil { - sv = make([]types.ValidationError, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ValidationError - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentValidationError(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentErrorSetUnwrapped(v *[]types.ValidationError, decoder smithyxml.NodeDecoder) error { - var sv []types.ValidationError - if *v == nil { - sv = make([]types.ValidationError, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ValidationError - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentValidationError(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentEventInformation(v **types.EventInformation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.EventInformation - if *v == nil { - sv = &types.EventInformation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("eventDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventDescription = ptr.String(xtv) - } - - case strings.EqualFold("eventSubType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventSubType = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExcludedInstanceTypeSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExcludedInstanceTypeSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentExplanation(v **types.Explanation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Explanation - if *v == nil { - sv = &types.Explanation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("acl", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Acl, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("aclRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisAclRule(&sv.AclRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Address = ptr.String(xtv) - } - - case strings.EqualFold("addressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpAddressList(&sv.Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("attachedTo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.AttachedTo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("availabilityZoneSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.AvailabilityZones, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("cidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Cidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("classicLoadBalancerListener", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisLoadBalancerListener(&sv.ClassicLoadBalancerListener, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("component", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Component, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("componentAccount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ComponentAccount = ptr.String(xtv) - } - - case strings.EqualFold("componentRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ComponentRegion = ptr.String(xtv) - } - - case strings.EqualFold("customerGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.CustomerGateway, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destination", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Destination, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationVpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.DestinationVpc, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("direction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Direction = ptr.String(xtv) - } - - case strings.EqualFold("elasticLoadBalancerListener", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.ElasticLoadBalancerListener, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("explanationCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExplanationCode = ptr.String(xtv) - } - - case strings.EqualFold("firewallStatefulRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFirewallStatefulRule(&sv.FirewallStatefulRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("firewallStatelessRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFirewallStatelessRule(&sv.FirewallStatelessRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ingressRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.IngressRouteTable, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("internetGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.InternetGateway, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("loadBalancerArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LoadBalancerArn = ptr.String(xtv) - } - - case strings.EqualFold("loadBalancerListenerPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LoadBalancerListenerPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("loadBalancerTarget", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisLoadBalancerTarget(&sv.LoadBalancerTarget, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("loadBalancerTargetGroup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.LoadBalancerTargetGroup, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("loadBalancerTargetGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponentList(&sv.LoadBalancerTargetGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("loadBalancerTargetPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LoadBalancerTargetPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("missingComponent", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MissingComponent = ptr.String(xtv) - } - - case strings.EqualFold("natGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.NatGateway, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterface", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.NetworkInterface, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("packetField", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PacketField = ptr.String(xtv) - } - - case strings.EqualFold("port", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Port = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("portRangeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.PortRanges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("prefixList", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.PrefixList, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStringList(&sv.Protocols, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("routeTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.RouteTable, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("routeTableRoute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisRouteTableRoute(&sv.RouteTableRoute, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SecurityGroup, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisSecurityGroupRule(&sv.SecurityGroupRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponentList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceVpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SourceVpc, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("subnet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Subnet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("subnetRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SubnetRouteTable, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.TransitGateway, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.TransitGatewayAttachment, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.TransitGatewayRouteTable, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayRouteTableRoute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableRoute(&sv.TransitGatewayRouteTableRoute, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Vpc, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpcEndpoint, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcPeeringConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpcPeeringConnection, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpnConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpnConnection, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpnGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpnGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExplanationList(v *[]types.Explanation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Explanation - if *v == nil { - sv = make([]types.Explanation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Explanation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentExplanation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExplanationListUnwrapped(v *[]types.Explanation, decoder smithyxml.NodeDecoder) error { - var sv []types.Explanation - if *v == nil { - sv = make([]types.Explanation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Explanation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentExplanation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentExportImageTask(v **types.ExportImageTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ExportImageTask - if *v == nil { - sv = &types.ExportImageTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("exportImageTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExportImageTaskId = ptr.String(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("s3ExportLocation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExportTaskS3Location(&sv.S3ExportLocation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExportImageTaskList(v *[]types.ExportImageTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ExportImageTask - if *v == nil { - sv = make([]types.ExportImageTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ExportImageTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentExportImageTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExportImageTaskListUnwrapped(v *[]types.ExportImageTask, decoder smithyxml.NodeDecoder) error { - var sv []types.ExportImageTask - if *v == nil { - sv = make([]types.ExportImageTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ExportImageTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentExportImageTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentExportTask(v **types.ExportTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ExportTask - if *v == nil { - sv = &types.ExportTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("exportTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExportTaskId = ptr.String(xtv) - } - - case strings.EqualFold("exportToS3", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExportToS3Task(&sv.ExportToS3Task, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceExport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceExportDetails(&sv.InstanceExportDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ExportTaskState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExportTaskList(v *[]types.ExportTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ExportTask - if *v == nil { - sv = make([]types.ExportTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ExportTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentExportTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExportTaskListUnwrapped(v *[]types.ExportTask, decoder smithyxml.NodeDecoder) error { - var sv []types.ExportTask - if *v == nil { - sv = make([]types.ExportTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ExportTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentExportTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentExportTaskS3Location(v **types.ExportTaskS3Location, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ExportTaskS3Location - if *v == nil { - sv = &types.ExportTaskS3Location{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("s3Bucket", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Bucket = ptr.String(xtv) - } - - case strings.EqualFold("s3Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentExportToS3Task(v **types.ExportToS3Task, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ExportToS3Task - if *v == nil { - sv = &types.ExportToS3Task{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("containerFormat", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ContainerFormat = types.ContainerFormat(xtv) - } - - case strings.EqualFold("diskImageFormat", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DiskImageFormat = types.DiskImageFormat(xtv) - } - - case strings.EqualFold("s3Bucket", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Bucket = ptr.String(xtv) - } - - case strings.EqualFold("s3Key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Key = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFailedCapacityReservationFleetCancellationResult(v **types.FailedCapacityReservationFleetCancellationResult, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FailedCapacityReservationFleetCancellationResult - if *v == nil { - sv = &types.FailedCapacityReservationFleetCancellationResult{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cancelCapacityReservationFleetError", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCancelCapacityReservationFleetError(&sv.CancelCapacityReservationFleetError, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("capacityReservationFleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationFleetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFailedCapacityReservationFleetCancellationResultSet(v *[]types.FailedCapacityReservationFleetCancellationResult, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FailedCapacityReservationFleetCancellationResult - if *v == nil { - sv = make([]types.FailedCapacityReservationFleetCancellationResult, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FailedCapacityReservationFleetCancellationResult - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFailedCapacityReservationFleetCancellationResult(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFailedCapacityReservationFleetCancellationResultSetUnwrapped(v *[]types.FailedCapacityReservationFleetCancellationResult, decoder smithyxml.NodeDecoder) error { - var sv []types.FailedCapacityReservationFleetCancellationResult - if *v == nil { - sv = make([]types.FailedCapacityReservationFleetCancellationResult, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FailedCapacityReservationFleetCancellationResult - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFailedCapacityReservationFleetCancellationResult(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletion(v **types.FailedQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FailedQueuedPurchaseDeletion - if *v == nil { - sv = &types.FailedQueuedPurchaseDeletion{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeleteQueuedReservedInstancesError(&sv.Error, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletionSet(v *[]types.FailedQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FailedQueuedPurchaseDeletion - if *v == nil { - sv = make([]types.FailedQueuedPurchaseDeletion, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FailedQueuedPurchaseDeletion - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletion(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletionSetUnwrapped(v *[]types.FailedQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error { - var sv []types.FailedQueuedPurchaseDeletion - if *v == nil { - sv = make([]types.FailedQueuedPurchaseDeletion, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FailedQueuedPurchaseDeletion - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletion(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFastLaunchLaunchTemplateSpecificationResponse(v **types.FastLaunchLaunchTemplateSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FastLaunchLaunchTemplateSpecificationResponse - if *v == nil { - sv = &types.FastLaunchLaunchTemplateSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateName = ptr.String(xtv) - } - - case strings.EqualFold("version", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Version = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFastLaunchSnapshotConfigurationResponse(v **types.FastLaunchSnapshotConfigurationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FastLaunchSnapshotConfigurationResponse - if *v == nil { - sv = &types.FastLaunchSnapshotConfigurationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("targetResourceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TargetResourceCount = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFederatedAuthentication(v **types.FederatedAuthentication, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FederatedAuthentication - if *v == nil { - sv = &types.FederatedAuthentication{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("samlProviderArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SamlProviderArn = ptr.String(xtv) - } - - case strings.EqualFold("selfServiceSamlProviderArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SelfServiceSamlProviderArn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFilterPortRange(v **types.FilterPortRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FilterPortRange - if *v == nil { - sv = &types.FilterPortRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fromPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.FromPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("toPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ToPort = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFirewallStatefulRule(v **types.FirewallStatefulRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FirewallStatefulRule - if *v == nil { - sv = &types.FirewallStatefulRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationPortSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.DestinationPorts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Destinations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("direction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Direction = ptr.String(xtv) - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("ruleAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleAction = ptr.String(xtv) - } - - case strings.EqualFold("ruleGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("sourcePortSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.SourcePorts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Sources, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFirewallStatelessRule(v **types.FirewallStatelessRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FirewallStatelessRule - if *v == nil { - sv = &types.FirewallStatelessRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationPortSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.DestinationPorts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Destinations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("priority", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Priority = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("protocolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProtocolIntList(&sv.Protocols, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ruleAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleAction = ptr.String(xtv) - } - - case strings.EqualFold("ruleGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("sourcePortSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRangeList(&sv.SourcePorts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Sources, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetCapacityReservation(v **types.FleetCapacityReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetCapacityReservation - if *v == nil { - sv = &types.FleetCapacityReservation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZoneId = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationId = ptr.String(xtv) - } - - case strings.EqualFold("createDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateDate = ptr.Time(t) - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsOptimized = ptr.Bool(xtv) - } - - case strings.EqualFold("fulfilledCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.FulfilledCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("instancePlatform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstancePlatform = types.CapacityReservationInstancePlatform(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("priority", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Priority = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("totalInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalInstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("weight", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Weight = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetCapacityReservationSet(v *[]types.FleetCapacityReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FleetCapacityReservation - if *v == nil { - sv = make([]types.FleetCapacityReservation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FleetCapacityReservation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFleetCapacityReservation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetCapacityReservationSetUnwrapped(v *[]types.FleetCapacityReservation, decoder smithyxml.NodeDecoder) error { - var sv []types.FleetCapacityReservation - if *v == nil { - sv = make([]types.FleetCapacityReservation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FleetCapacityReservation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFleetCapacityReservation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFleetData(v **types.FleetData, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetData - if *v == nil { - sv = &types.FleetData{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("activityStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ActivityStatus = types.FleetActivityStatus(xtv) - } - - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("context", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Context = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("errorSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDescribeFleetsErrorSet(&sv.Errors, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("excessCapacityTerminationPolicy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExcessCapacityTerminationPolicy = types.FleetExcessCapacityTerminationPolicy(xtv) - } - - case strings.EqualFold("fleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetId = ptr.String(xtv) - } - - case strings.EqualFold("fleetState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetState = types.FleetStateCode(xtv) - } - - case strings.EqualFold("fulfilledCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.FulfilledCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("fulfilledOnDemandCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.FulfilledOnDemandCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("fleetInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDescribeFleetsInstancesSet(&sv.Instances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("launchTemplateConfigs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateConfigList(&sv.LaunchTemplateConfigs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("onDemandOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentOnDemandOptions(&sv.OnDemandOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("replaceUnhealthyInstances", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReplaceUnhealthyInstances = ptr.Bool(xtv) - } - - case strings.EqualFold("spotOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotOptions(&sv.SpotOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetCapacitySpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTargetCapacitySpecification(&sv.TargetCapacitySpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("terminateInstancesWithExpiration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.TerminateInstancesWithExpiration = ptr.Bool(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.FleetType(xtv) - } - - case strings.EqualFold("validFrom", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidFrom = ptr.Time(t) - } - - case strings.EqualFold("validUntil", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidUntil = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetLaunchTemplateConfig(v **types.FleetLaunchTemplateConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetLaunchTemplateConfig - if *v == nil { - sv = &types.FleetLaunchTemplateConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("overrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverridesList(&sv.Overrides, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetLaunchTemplateConfigList(v *[]types.FleetLaunchTemplateConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FleetLaunchTemplateConfig - if *v == nil { - sv = make([]types.FleetLaunchTemplateConfig, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FleetLaunchTemplateConfig - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateConfig(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetLaunchTemplateConfigListUnwrapped(v *[]types.FleetLaunchTemplateConfig, decoder smithyxml.NodeDecoder) error { - var sv []types.FleetLaunchTemplateConfig - if *v == nil { - sv = make([]types.FleetLaunchTemplateConfig, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FleetLaunchTemplateConfig - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateConfig(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(v **types.FleetLaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetLaunchTemplateOverrides - if *v == nil { - sv = &types.FleetLaunchTemplateOverrides{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceRequirements", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceRequirements(&sv.InstanceRequirements, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("maxPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MaxPrice = ptr.String(xtv) - } - - case strings.EqualFold("placement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacementResponse(&sv.Placement, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("priority", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Priority = ptr.Float64(f64) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("weightedCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.WeightedCapacity = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetLaunchTemplateOverridesList(v *[]types.FleetLaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FleetLaunchTemplateOverrides - if *v == nil { - sv = make([]types.FleetLaunchTemplateOverrides, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FleetLaunchTemplateOverrides - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetLaunchTemplateOverridesListUnwrapped(v *[]types.FleetLaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error { - var sv []types.FleetLaunchTemplateOverrides - if *v == nil { - sv = make([]types.FleetLaunchTemplateOverrides, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FleetLaunchTemplateOverrides - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(v **types.FleetLaunchTemplateSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetLaunchTemplateSpecification - if *v == nil { - sv = &types.FleetLaunchTemplateSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateName = ptr.String(xtv) - } - - case strings.EqualFold("version", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Version = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetSet(v *[]types.FleetData, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FleetData - if *v == nil { - sv = make([]types.FleetData, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FleetData - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFleetData(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetSetUnwrapped(v *[]types.FleetData, decoder smithyxml.NodeDecoder) error { - var sv []types.FleetData - if *v == nil { - sv = make([]types.FleetData, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FleetData - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFleetData(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFleetSpotCapacityRebalance(v **types.FleetSpotCapacityRebalance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetSpotCapacityRebalance - if *v == nil { - sv = &types.FleetSpotCapacityRebalance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("replacementStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReplacementStrategy = types.FleetReplacementStrategy(xtv) - } - - case strings.EqualFold("terminationDelay", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TerminationDelay = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFleetSpotMaintenanceStrategies(v **types.FleetSpotMaintenanceStrategies, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FleetSpotMaintenanceStrategies - if *v == nil { - sv = &types.FleetSpotMaintenanceStrategies{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityRebalance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetSpotCapacityRebalance(&sv.CapacityRebalance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFlowLog(v **types.FlowLog, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FlowLog - if *v == nil { - sv = &types.FlowLog{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("deliverCrossAccountRole", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeliverCrossAccountRole = ptr.String(xtv) - } - - case strings.EqualFold("deliverLogsErrorMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeliverLogsErrorMessage = ptr.String(xtv) - } - - case strings.EqualFold("deliverLogsPermissionArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeliverLogsPermissionArn = ptr.String(xtv) - } - - case strings.EqualFold("deliverLogsStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeliverLogsStatus = ptr.String(xtv) - } - - case strings.EqualFold("destinationOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDestinationOptionsResponse(&sv.DestinationOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("flowLogId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FlowLogId = ptr.String(xtv) - } - - case strings.EqualFold("flowLogStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FlowLogStatus = ptr.String(xtv) - } - - case strings.EqualFold("logDestination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogDestination = ptr.String(xtv) - } - - case strings.EqualFold("logDestinationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogDestinationType = types.LogDestinationType(xtv) - } - - case strings.EqualFold("logFormat", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogFormat = ptr.String(xtv) - } - - case strings.EqualFold("logGroupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogGroupName = ptr.String(xtv) - } - - case strings.EqualFold("maxAggregationInterval", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxAggregationInterval = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trafficType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficType = types.TrafficType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFlowLogSet(v *[]types.FlowLog, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FlowLog - if *v == nil { - sv = make([]types.FlowLog, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FlowLog - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFlowLog(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFlowLogSetUnwrapped(v *[]types.FlowLog, decoder smithyxml.NodeDecoder) error { - var sv []types.FlowLog - if *v == nil { - sv = make([]types.FlowLog, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FlowLog - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFlowLog(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFpgaDeviceInfo(v **types.FpgaDeviceInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FpgaDeviceInfo - if *v == nil { - sv = &types.FpgaDeviceInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("manufacturer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Manufacturer = ptr.String(xtv) - } - - case strings.EqualFold("memoryInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaDeviceMemoryInfo(&sv.MemoryInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaDeviceInfoList(v *[]types.FpgaDeviceInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FpgaDeviceInfo - if *v == nil { - sv = make([]types.FpgaDeviceInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FpgaDeviceInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFpgaDeviceInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaDeviceInfoListUnwrapped(v *[]types.FpgaDeviceInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.FpgaDeviceInfo - if *v == nil { - sv = make([]types.FpgaDeviceInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FpgaDeviceInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFpgaDeviceInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFpgaDeviceMemoryInfo(v **types.FpgaDeviceMemoryInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FpgaDeviceMemoryInfo - if *v == nil { - sv = &types.FpgaDeviceMemoryInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("sizeInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SizeInMiB = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaImage(v **types.FpgaImage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FpgaImage - if *v == nil { - sv = &types.FpgaImage{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("dataRetentionSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DataRetentionSupport = ptr.Bool(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("fpgaImageGlobalId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FpgaImageGlobalId = ptr.String(xtv) - } - - case strings.EqualFold("fpgaImageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FpgaImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceTypes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTypesList(&sv.InstanceTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("ownerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("pciId", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPciId(&sv.PciId, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("public", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Public = ptr.Bool(xtv) - } - - case strings.EqualFold("shellVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ShellVersion = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaImageState(&sv.State, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tags", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("updateTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UpdateTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaImageAttribute(v **types.FpgaImageAttribute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FpgaImageAttribute - if *v == nil { - sv = &types.FpgaImageAttribute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("fpgaImageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FpgaImageId = ptr.String(xtv) - } - - case strings.EqualFold("loadPermissions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLoadPermissionList(&sv.LoadPermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaImageList(v *[]types.FpgaImage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.FpgaImage - if *v == nil { - sv = make([]types.FpgaImage, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.FpgaImage - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentFpgaImage(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaImageListUnwrapped(v *[]types.FpgaImage, decoder smithyxml.NodeDecoder) error { - var sv []types.FpgaImage - if *v == nil { - sv = make([]types.FpgaImage, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.FpgaImage - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentFpgaImage(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentFpgaImageState(v **types.FpgaImageState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FpgaImageState - if *v == nil { - sv = &types.FpgaImageState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.FpgaImageStateCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentFpgaInfo(v **types.FpgaInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FpgaInfo - if *v == nil { - sv = &types.FpgaInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fpgas", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaDeviceInfoList(&sv.Fpgas, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("totalFpgaMemoryInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalFpgaMemoryInMiB = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGpuDeviceInfo(v **types.GpuDeviceInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GpuDeviceInfo - if *v == nil { - sv = &types.GpuDeviceInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("manufacturer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Manufacturer = ptr.String(xtv) - } - - case strings.EqualFold("memoryInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGpuDeviceMemoryInfo(&sv.MemoryInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGpuDeviceInfoList(v *[]types.GpuDeviceInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.GpuDeviceInfo - if *v == nil { - sv = make([]types.GpuDeviceInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.GpuDeviceInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentGpuDeviceInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGpuDeviceInfoListUnwrapped(v *[]types.GpuDeviceInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.GpuDeviceInfo - if *v == nil { - sv = make([]types.GpuDeviceInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.GpuDeviceInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentGpuDeviceInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentGpuDeviceMemoryInfo(v **types.GpuDeviceMemoryInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GpuDeviceMemoryInfo - if *v == nil { - sv = &types.GpuDeviceMemoryInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("sizeInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SizeInMiB = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGpuInfo(v **types.GpuInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GpuInfo - if *v == nil { - sv = &types.GpuInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("gpus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGpuDeviceInfoList(&sv.Gpus, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("totalGpuMemoryInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalGpuMemoryInMiB = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGroupIdentifier(v **types.GroupIdentifier, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GroupIdentifier - if *v == nil { - sv = &types.GroupIdentifier{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGroupIdentifierList(v *[]types.GroupIdentifier, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.GroupIdentifier - if *v == nil { - sv = make([]types.GroupIdentifier, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.GroupIdentifier - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentGroupIdentifier(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGroupIdentifierListUnwrapped(v *[]types.GroupIdentifier, decoder smithyxml.NodeDecoder) error { - var sv []types.GroupIdentifier - if *v == nil { - sv = make([]types.GroupIdentifier, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.GroupIdentifier - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentGroupIdentifier(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentGroupIdentifierSet(v *[]types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SecurityGroupIdentifier - if *v == nil { - sv = make([]types.SecurityGroupIdentifier, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SecurityGroupIdentifier - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSecurityGroupIdentifier(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGroupIdentifierSetUnwrapped(v *[]types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error { - var sv []types.SecurityGroupIdentifier - if *v == nil { - sv = make([]types.SecurityGroupIdentifier, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SecurityGroupIdentifier - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSecurityGroupIdentifier(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentGroupIdStringList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("groupId", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentGroupIdStringListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentHibernationOptions(v **types.HibernationOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HibernationOptions - if *v == nil { - sv = &types.HibernationOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("configured", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Configured = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHistoryRecord(v **types.HistoryRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HistoryRecord - if *v == nil { - sv = &types.HistoryRecord{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("eventInformation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEventInformation(&sv.EventInformation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("eventType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventType = types.EventType(xtv) - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Timestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHistoryRecordEntry(v **types.HistoryRecordEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HistoryRecordEntry - if *v == nil { - sv = &types.HistoryRecordEntry{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("eventInformation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEventInformation(&sv.EventInformation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("eventType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventType = types.FleetEventType(xtv) - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Timestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHistoryRecords(v *[]types.HistoryRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HistoryRecord - if *v == nil { - sv = make([]types.HistoryRecord, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.HistoryRecord - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentHistoryRecord(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHistoryRecordsUnwrapped(v *[]types.HistoryRecord, decoder smithyxml.NodeDecoder) error { - var sv []types.HistoryRecord - if *v == nil { - sv = make([]types.HistoryRecord, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HistoryRecord - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentHistoryRecord(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentHistoryRecordSet(v *[]types.HistoryRecordEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HistoryRecordEntry - if *v == nil { - sv = make([]types.HistoryRecordEntry, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.HistoryRecordEntry - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentHistoryRecordEntry(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHistoryRecordSetUnwrapped(v *[]types.HistoryRecordEntry, decoder smithyxml.NodeDecoder) error { - var sv []types.HistoryRecordEntry - if *v == nil { - sv = make([]types.HistoryRecordEntry, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HistoryRecordEntry - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentHistoryRecordEntry(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentHost(v **types.Host, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Host - if *v == nil { - sv = &types.Host{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AllocationTime = ptr.Time(t) - } - - case strings.EqualFold("allowsMultipleInstanceTypes", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllowsMultipleInstanceTypes = types.AllowsMultipleInstanceTypes(xtv) - } - - case strings.EqualFold("assetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssetId = ptr.String(xtv) - } - - case strings.EqualFold("autoPlacement", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AutoPlacement = types.AutoPlacement(xtv) - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZoneId = ptr.String(xtv) - } - - case strings.EqualFold("availableCapacity", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAvailableCapacity(&sv.AvailableCapacity, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("hostId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostId = ptr.String(xtv) - } - - case strings.EqualFold("hostMaintenance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostMaintenance = types.HostMaintenance(xtv) - } - - case strings.EqualFold("hostProperties", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHostProperties(&sv.HostProperties, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hostRecovery", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostRecovery = types.HostRecovery(xtv) - } - - case strings.EqualFold("hostReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostReservationId = ptr.String(xtv) - } - - case strings.EqualFold("instances", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHostInstanceList(&sv.Instances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("memberOfServiceLinkedResourceGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.MemberOfServiceLinkedResourceGroup = ptr.Bool(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("releaseTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ReleaseTime = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.AllocationState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostInstance(v **types.HostInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostInstance - if *v == nil { - sv = &types.HostInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostInstanceList(v *[]types.HostInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HostInstance - if *v == nil { - sv = make([]types.HostInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.HostInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentHostInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostInstanceListUnwrapped(v *[]types.HostInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.HostInstance - if *v == nil { - sv = make([]types.HostInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HostInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentHostInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentHostList(v *[]types.Host, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Host - if *v == nil { - sv = make([]types.Host, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Host - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentHost(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostListUnwrapped(v *[]types.Host, decoder smithyxml.NodeDecoder) error { - var sv []types.Host - if *v == nil { - sv = make([]types.Host, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Host - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentHost(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentHostOffering(v **types.HostOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostOffering - if *v == nil { - sv = &types.HostOffering{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("duration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Duration = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("hourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("instanceFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceFamily = ptr.String(xtv) - } - - case strings.EqualFold("offeringId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingId = ptr.String(xtv) - } - - case strings.EqualFold("paymentOption", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PaymentOption = types.PaymentOption(xtv) - } - - case strings.EqualFold("upfrontPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UpfrontPrice = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostOfferingSet(v *[]types.HostOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HostOffering - if *v == nil { - sv = make([]types.HostOffering, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.HostOffering - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentHostOffering(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostOfferingSetUnwrapped(v *[]types.HostOffering, decoder smithyxml.NodeDecoder) error { - var sv []types.HostOffering - if *v == nil { - sv = make([]types.HostOffering, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HostOffering - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentHostOffering(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentHostProperties(v **types.HostProperties, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostProperties - if *v == nil { - sv = &types.HostProperties{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cores", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Cores = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceFamily = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("sockets", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Sockets = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("totalVCpus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalVCpus = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostReservation(v **types.HostReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostReservation - if *v == nil { - sv = &types.HostReservation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("duration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Duration = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("end", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.End = ptr.Time(t) - } - - case strings.EqualFold("hostIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseHostIdSet(&sv.HostIdSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hostReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostReservationId = ptr.String(xtv) - } - - case strings.EqualFold("hourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("instanceFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceFamily = ptr.String(xtv) - } - - case strings.EqualFold("offeringId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingId = ptr.String(xtv) - } - - case strings.EqualFold("paymentOption", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PaymentOption = types.PaymentOption(xtv) - } - - case strings.EqualFold("start", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Start = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ReservationState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("upfrontPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UpfrontPrice = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostReservationSet(v *[]types.HostReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HostReservation - if *v == nil { - sv = make([]types.HostReservation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.HostReservation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentHostReservation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentHostReservationSetUnwrapped(v *[]types.HostReservation, decoder smithyxml.NodeDecoder) error { - var sv []types.HostReservation - if *v == nil { - sv = make([]types.HostReservation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HostReservation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentHostReservation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIamInstanceProfile(v **types.IamInstanceProfile, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IamInstanceProfile - if *v == nil { - sv = &types.IamInstanceProfile{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIamInstanceProfileAssociation(v **types.IamInstanceProfileAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IamInstanceProfileAssociation - if *v == nil { - sv = &types.IamInstanceProfileAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("iamInstanceProfile", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfile(&sv.IamInstanceProfile, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IamInstanceProfileAssociationState(xtv) - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Timestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIamInstanceProfileAssociationSet(v *[]types.IamInstanceProfileAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IamInstanceProfileAssociation - if *v == nil { - sv = make([]types.IamInstanceProfileAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IamInstanceProfileAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIamInstanceProfileAssociationSetUnwrapped(v *[]types.IamInstanceProfileAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.IamInstanceProfileAssociation - if *v == nil { - sv = make([]types.IamInstanceProfileAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IamInstanceProfileAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIamInstanceProfileSpecification(v **types.IamInstanceProfileSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IamInstanceProfileSpecification - if *v == nil { - sv = &types.IamInstanceProfileSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIcmpTypeCode(v **types.IcmpTypeCode, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IcmpTypeCode - if *v == nil { - sv = &types.IcmpTypeCode{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Code = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Type = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIdFormat(v **types.IdFormat, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IdFormat - if *v == nil { - sv = &types.IdFormat{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deadline", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Deadline = ptr.Time(t) - } - - case strings.EqualFold("resource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Resource = ptr.String(xtv) - } - - case strings.EqualFold("useLongIds", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.UseLongIds = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIdFormatList(v *[]types.IdFormat, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IdFormat - if *v == nil { - sv = make([]types.IdFormat, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IdFormat - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIdFormat(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIdFormatListUnwrapped(v *[]types.IdFormat, decoder smithyxml.NodeDecoder) error { - var sv []types.IdFormat - if *v == nil { - sv = make([]types.IdFormat, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IdFormat - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIdFormat(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIKEVersionsList(v *[]types.IKEVersionsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IKEVersionsListValue - if *v == nil { - sv = make([]types.IKEVersionsListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IKEVersionsListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIKEVersionsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIKEVersionsListUnwrapped(v *[]types.IKEVersionsListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.IKEVersionsListValue - if *v == nil { - sv = make([]types.IKEVersionsListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IKEVersionsListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIKEVersionsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIKEVersionsListValue(v **types.IKEVersionsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IKEVersionsListValue - if *v == nil { - sv = &types.IKEVersionsListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImage(v **types.Image, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Image - if *v == nil { - sv = &types.Image{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("architecture", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Architecture = types.ArchitectureValues(xtv) - } - - case strings.EqualFold("blockDeviceMapping", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("bootMode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BootMode = types.BootModeValues(xtv) - } - - case strings.EqualFold("creationDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreationDate = ptr.String(xtv) - } - - case strings.EqualFold("deprecationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeprecationTime = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("enaSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSupport = ptr.Bool(xtv) - } - - case strings.EqualFold("hypervisor", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Hypervisor = types.HypervisorType(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("imageLocation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageLocation = ptr.String(xtv) - } - - case strings.EqualFold("imageOwnerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageOwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("imageType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageType = types.ImageTypeValues(xtv) - } - - case strings.EqualFold("imdsSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImdsSupport = types.ImdsSupportValues(xtv) - } - - case strings.EqualFold("kernelId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KernelId = ptr.String(xtv) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("imageOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = types.PlatformValues(xtv) - } - - case strings.EqualFold("platformDetails", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PlatformDetails = ptr.String(xtv) - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("isPublic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Public = ptr.Bool(xtv) - } - - case strings.EqualFold("ramdiskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RamdiskId = ptr.String(xtv) - } - - case strings.EqualFold("rootDeviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RootDeviceName = ptr.String(xtv) - } - - case strings.EqualFold("rootDeviceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RootDeviceType = types.DeviceType(xtv) - } - - case strings.EqualFold("sourceInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceInstanceId = ptr.String(xtv) - } - - case strings.EqualFold("sriovNetSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SriovNetSupport = ptr.String(xtv) - } - - case strings.EqualFold("imageState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ImageState(xtv) - } - - case strings.EqualFold("stateReason", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStateReason(&sv.StateReason, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tpmSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TpmSupport = types.TpmSupportValues(xtv) - } - - case strings.EqualFold("usageOperation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UsageOperation = ptr.String(xtv) - } - - case strings.EqualFold("virtualizationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VirtualizationType = types.VirtualizationType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImageList(v *[]types.Image, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Image - if *v == nil { - sv = make([]types.Image, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Image - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentImage(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImageListUnwrapped(v *[]types.Image, decoder smithyxml.NodeDecoder) error { - var sv []types.Image - if *v == nil { - sv = make([]types.Image, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Image - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentImage(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentImageRecycleBinInfo(v **types.ImageRecycleBinInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImageRecycleBinInfo - if *v == nil { - sv = &types.ImageRecycleBinInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("recycleBinEnterTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RecycleBinEnterTime = ptr.Time(t) - } - - case strings.EqualFold("recycleBinExitTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RecycleBinExitTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImageRecycleBinInfoList(v *[]types.ImageRecycleBinInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ImageRecycleBinInfo - if *v == nil { - sv = make([]types.ImageRecycleBinInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ImageRecycleBinInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentImageRecycleBinInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImageRecycleBinInfoListUnwrapped(v *[]types.ImageRecycleBinInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.ImageRecycleBinInfo - if *v == nil { - sv = make([]types.ImageRecycleBinInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ImageRecycleBinInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentImageRecycleBinInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentImportImageLicenseConfigurationResponse(v **types.ImportImageLicenseConfigurationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImportImageLicenseConfigurationResponse - if *v == nil { - sv = &types.ImportImageLicenseConfigurationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("licenseConfigurationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LicenseConfigurationArn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponse(v *[]types.ImportImageLicenseConfigurationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ImportImageLicenseConfigurationResponse - if *v == nil { - sv = make([]types.ImportImageLicenseConfigurationResponse, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ImportImageLicenseConfigurationResponse - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentImportImageLicenseConfigurationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponseUnwrapped(v *[]types.ImportImageLicenseConfigurationResponse, decoder smithyxml.NodeDecoder) error { - var sv []types.ImportImageLicenseConfigurationResponse - if *v == nil { - sv = make([]types.ImportImageLicenseConfigurationResponse, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ImportImageLicenseConfigurationResponse - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentImportImageLicenseConfigurationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentImportImageTask(v **types.ImportImageTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImportImageTask - if *v == nil { - sv = &types.ImportImageTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("architecture", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Architecture = ptr.String(xtv) - } - - case strings.EqualFold("bootMode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BootMode = types.BootModeValues(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("hypervisor", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Hypervisor = ptr.String(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("importTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImportTaskId = ptr.String(xtv) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("licenseSpecifications", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponse(&sv.LicenseSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("licenseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LicenseType = ptr.String(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("snapshotDetailSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotDetailList(&sv.SnapshotDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("usageOperation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UsageOperation = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportImageTaskList(v *[]types.ImportImageTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ImportImageTask - if *v == nil { - sv = make([]types.ImportImageTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ImportImageTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentImportImageTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportImageTaskListUnwrapped(v *[]types.ImportImageTask, decoder smithyxml.NodeDecoder) error { - var sv []types.ImportImageTask - if *v == nil { - sv = make([]types.ImportImageTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ImportImageTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentImportImageTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentImportInstanceTaskDetails(v **types.ImportInstanceTaskDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImportInstanceTaskDetails - if *v == nil { - sv = &types.ImportInstanceTaskDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = types.PlatformValues(xtv) - } - - case strings.EqualFold("volumes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportInstanceVolumeDetailSet(&sv.Volumes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportInstanceVolumeDetailItem(v **types.ImportInstanceVolumeDetailItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImportInstanceVolumeDetailItem - if *v == nil { - sv = &types.ImportInstanceVolumeDetailItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("bytesConverted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.BytesConverted = ptr.Int64(i64) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("image", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDiskImageDescription(&sv.Image, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("volume", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDiskImageVolumeDescription(&sv.Volume, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportInstanceVolumeDetailSet(v *[]types.ImportInstanceVolumeDetailItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ImportInstanceVolumeDetailItem - if *v == nil { - sv = make([]types.ImportInstanceVolumeDetailItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ImportInstanceVolumeDetailItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentImportInstanceVolumeDetailItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportInstanceVolumeDetailSetUnwrapped(v *[]types.ImportInstanceVolumeDetailItem, decoder smithyxml.NodeDecoder) error { - var sv []types.ImportInstanceVolumeDetailItem - if *v == nil { - sv = make([]types.ImportInstanceVolumeDetailItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ImportInstanceVolumeDetailItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentImportInstanceVolumeDetailItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentImportSnapshotTask(v **types.ImportSnapshotTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImportSnapshotTask - if *v == nil { - sv = &types.ImportSnapshotTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("importTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImportTaskId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotTaskDetail", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotTaskDetail(&sv.SnapshotTaskDetail, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportSnapshotTaskList(v *[]types.ImportSnapshotTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ImportSnapshotTask - if *v == nil { - sv = make([]types.ImportSnapshotTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ImportSnapshotTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentImportSnapshotTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentImportSnapshotTaskListUnwrapped(v *[]types.ImportSnapshotTask, decoder smithyxml.NodeDecoder) error { - var sv []types.ImportSnapshotTask - if *v == nil { - sv = make([]types.ImportSnapshotTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ImportSnapshotTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentImportSnapshotTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentImportVolumeTaskDetails(v **types.ImportVolumeTaskDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ImportVolumeTaskDetails - if *v == nil { - sv = &types.ImportVolumeTaskDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("bytesConverted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.BytesConverted = ptr.Int64(i64) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("image", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDiskImageDescription(&sv.Image, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("volume", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDiskImageVolumeDescription(&sv.Volume, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInferenceAcceleratorInfo(v **types.InferenceAcceleratorInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InferenceAcceleratorInfo - if *v == nil { - sv = &types.InferenceAcceleratorInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accelerators", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInferenceDeviceInfoList(&sv.Accelerators, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("totalInferenceMemoryInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalInferenceMemoryInMiB = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInferenceDeviceInfo(v **types.InferenceDeviceInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InferenceDeviceInfo - if *v == nil { - sv = &types.InferenceDeviceInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("manufacturer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Manufacturer = ptr.String(xtv) - } - - case strings.EqualFold("memoryInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInferenceDeviceMemoryInfo(&sv.MemoryInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInferenceDeviceInfoList(v *[]types.InferenceDeviceInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InferenceDeviceInfo - if *v == nil { - sv = make([]types.InferenceDeviceInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("member", t.Name.Local): - var col types.InferenceDeviceInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInferenceDeviceInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInferenceDeviceInfoListUnwrapped(v *[]types.InferenceDeviceInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.InferenceDeviceInfo - if *v == nil { - sv = make([]types.InferenceDeviceInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InferenceDeviceInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInferenceDeviceInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInferenceDeviceMemoryInfo(v **types.InferenceDeviceMemoryInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InferenceDeviceMemoryInfo - if *v == nil { - sv = &types.InferenceDeviceMemoryInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("sizeInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SizeInMiB = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInsideCidrBlocksStringList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInsideCidrBlocksStringListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstance(v **types.Instance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Instance - if *v == nil { - sv = &types.Instance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amiLaunchIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AmiLaunchIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("architecture", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Architecture = types.ArchitectureValues(xtv) - } - - case strings.EqualFold("blockDeviceMapping", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("bootMode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BootMode = types.BootModeValues(xtv) - } - - case strings.EqualFold("capacityReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationId = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationSpecificationResponse(&sv.CapacityReservationSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("cpuOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCpuOptions(&sv.CpuOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("currentInstanceBootMode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrentInstanceBootMode = types.InstanceBootModeValues(xtv) - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsOptimized = ptr.Bool(xtv) - } - - case strings.EqualFold("elasticGpuAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentElasticGpuAssociationList(&sv.ElasticGpuAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("elasticInferenceAcceleratorAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentElasticInferenceAcceleratorAssociationList(&sv.ElasticInferenceAcceleratorAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enaSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSupport = ptr.Bool(xtv) - } - - case strings.EqualFold("enclaveOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnclaveOptions(&sv.EnclaveOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hibernationOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHibernationOptions(&sv.HibernationOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hypervisor", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Hypervisor = types.HypervisorType(xtv) - } - - case strings.EqualFold("iamInstanceProfile", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfile(&sv.IamInstanceProfile, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceLifecycle", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceLifecycle = types.InstanceLifecycleType(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("ipv6Address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Address = ptr.String(xtv) - } - - case strings.EqualFold("kernelId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KernelId = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("launchTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LaunchTime = ptr.Time(t) - } - - case strings.EqualFold("licenseSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLicenseList(&sv.Licenses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maintenanceOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceMaintenanceOptions(&sv.MaintenanceOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("metadataOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceMetadataOptionsResponse(&sv.MetadataOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("monitoring", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMonitoring(&sv.Monitoring, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceList(&sv.NetworkInterfaces, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("placement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacement(&sv.Placement, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = types.PlatformValues(xtv) - } - - case strings.EqualFold("platformDetails", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PlatformDetails = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsNameOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrivateDnsNameOptionsResponse(&sv.PrivateDnsNameOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("dnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicDnsName = ptr.String(xtv) - } - - case strings.EqualFold("ipAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("ramdiskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RamdiskId = ptr.String(xtv) - } - - case strings.EqualFold("rootDeviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RootDeviceName = ptr.String(xtv) - } - - case strings.EqualFold("rootDeviceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RootDeviceType = types.DeviceType(xtv) - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceDestCheck", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SourceDestCheck = ptr.Bool(xtv) - } - - case strings.EqualFold("spotInstanceRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotInstanceRequestId = ptr.String(xtv) - } - - case strings.EqualFold("sriovNetSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SriovNetSupport = ptr.String(xtv) - } - - case strings.EqualFold("instanceState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceState(&sv.State, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("stateReason", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStateReason(&sv.StateReason, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tpmSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TpmSupport = ptr.String(xtv) - } - - case strings.EqualFold("usageOperation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UsageOperation = ptr.String(xtv) - } - - case strings.EqualFold("usageOperationUpdateTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UsageOperationUpdateTime = ptr.Time(t) - } - - case strings.EqualFold("virtualizationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VirtualizationType = types.VirtualizationType(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceAttachmentEnaSrdSpecification(v **types.InstanceAttachmentEnaSrdSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceAttachmentEnaSrdSpecification - if *v == nil { - sv = &types.InstanceAttachmentEnaSrdSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enaSrdEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("enaSrdUdpSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceAttachmentEnaSrdUdpSpecification(&sv.EnaSrdUdpSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceAttachmentEnaSrdUdpSpecification(v **types.InstanceAttachmentEnaSrdUdpSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceAttachmentEnaSrdUdpSpecification - if *v == nil { - sv = &types.InstanceAttachmentEnaSrdUdpSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enaSrdUdpEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdUdpEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceBlockDeviceMapping(v **types.InstanceBlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceBlockDeviceMapping - if *v == nil { - sv = &types.InstanceBlockDeviceMapping{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceName = ptr.String(xtv) - } - - case strings.EqualFold("ebs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEbsInstanceBlockDevice(&sv.Ebs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceBlockDeviceMappingList(v *[]types.InstanceBlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceBlockDeviceMapping - if *v == nil { - sv = make([]types.InstanceBlockDeviceMapping, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceBlockDeviceMapping - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMapping(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceBlockDeviceMappingListUnwrapped(v *[]types.InstanceBlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceBlockDeviceMapping - if *v == nil { - sv = make([]types.InstanceBlockDeviceMapping, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceBlockDeviceMapping - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMapping(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceCapacity(v **types.InstanceCapacity, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceCapacity - if *v == nil { - sv = &types.InstanceCapacity{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availableCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("totalCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalCapacity = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceConnectEndpointSet(v *[]types.Ec2InstanceConnectEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ec2InstanceConnectEndpoint - if *v == nil { - sv = make([]types.Ec2InstanceConnectEndpoint, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ec2InstanceConnectEndpoint - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentEc2InstanceConnectEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceConnectEndpointSetUnwrapped(v *[]types.Ec2InstanceConnectEndpoint, decoder smithyxml.NodeDecoder) error { - var sv []types.Ec2InstanceConnectEndpoint - if *v == nil { - sv = make([]types.Ec2InstanceConnectEndpoint, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ec2InstanceConnectEndpoint - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentEc2InstanceConnectEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceCount(v **types.InstanceCount, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceCount - if *v == nil { - sv = &types.InstanceCount{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ListingState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceCountList(v *[]types.InstanceCount, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceCount - if *v == nil { - sv = make([]types.InstanceCount, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceCount - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceCount(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceCountListUnwrapped(v *[]types.InstanceCount, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceCount - if *v == nil { - sv = make([]types.InstanceCount, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceCount - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceCount(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceCreditSpecification(v **types.InstanceCreditSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceCreditSpecification - if *v == nil { - sv = &types.InstanceCreditSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cpuCredits", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CpuCredits = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceCreditSpecificationList(v *[]types.InstanceCreditSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceCreditSpecification - if *v == nil { - sv = make([]types.InstanceCreditSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceCreditSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceCreditSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceCreditSpecificationListUnwrapped(v *[]types.InstanceCreditSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceCreditSpecification - if *v == nil { - sv = make([]types.InstanceCreditSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceCreditSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceCreditSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceEventWindow(v **types.InstanceEventWindow, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceEventWindow - if *v == nil { - sv = &types.InstanceEventWindow{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationTarget", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindowAssociationTarget(&sv.AssociationTarget, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("cronExpression", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CronExpression = ptr.String(xtv) - } - - case strings.EqualFold("instanceEventWindowId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceEventWindowId = ptr.String(xtv) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.InstanceEventWindowState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("timeRangeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindowTimeRangeList(&sv.TimeRanges, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceEventWindowAssociationTarget(v **types.InstanceEventWindowAssociationTarget, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceEventWindowAssociationTarget - if *v == nil { - sv = &types.InstanceEventWindowAssociationTarget{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dedicatedHostIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDedicatedHostIdList(&sv.DedicatedHostIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIdList(&sv.InstanceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceEventWindowSet(v *[]types.InstanceEventWindow, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceEventWindow - if *v == nil { - sv = make([]types.InstanceEventWindow, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceEventWindow - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceEventWindow(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceEventWindowSetUnwrapped(v *[]types.InstanceEventWindow, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceEventWindow - if *v == nil { - sv = make([]types.InstanceEventWindow, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceEventWindow - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceEventWindow(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceEventWindowStateChange(v **types.InstanceEventWindowStateChange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceEventWindowStateChange - if *v == nil { - sv = &types.InstanceEventWindowStateChange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindowId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceEventWindowId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.InstanceEventWindowState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceEventWindowTimeRange(v **types.InstanceEventWindowTimeRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceEventWindowTimeRange - if *v == nil { - sv = &types.InstanceEventWindowTimeRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("endHour", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.EndHour = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("endWeekDay", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EndWeekDay = types.WeekDay(xtv) - } - - case strings.EqualFold("startHour", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.StartHour = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("startWeekDay", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StartWeekDay = types.WeekDay(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceEventWindowTimeRangeList(v *[]types.InstanceEventWindowTimeRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceEventWindowTimeRange - if *v == nil { - sv = make([]types.InstanceEventWindowTimeRange, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceEventWindowTimeRange - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceEventWindowTimeRange(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceEventWindowTimeRangeListUnwrapped(v *[]types.InstanceEventWindowTimeRange, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceEventWindowTimeRange - if *v == nil { - sv = make([]types.InstanceEventWindowTimeRange, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceEventWindowTimeRange - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceEventWindowTimeRange(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceExportDetails(v **types.InstanceExportDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceExportDetails - if *v == nil { - sv = &types.InstanceExportDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("targetEnvironment", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetEnvironment = types.ExportEnvironment(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceFamilyCreditSpecification(v **types.InstanceFamilyCreditSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceFamilyCreditSpecification - if *v == nil { - sv = &types.InstanceFamilyCreditSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cpuCredits", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CpuCredits = ptr.String(xtv) - } - - case strings.EqualFold("instanceFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceFamily = types.UnlimitedSupportedInstanceFamily(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceGenerationSet(v *[]types.InstanceGeneration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceGeneration - if *v == nil { - sv = make([]types.InstanceGeneration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceGeneration - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.InstanceGeneration(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceGenerationSetUnwrapped(v *[]types.InstanceGeneration, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceGeneration - if *v == nil { - sv = make([]types.InstanceGeneration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceGeneration - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.InstanceGeneration(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceIdList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceIdsSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIdsSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceIpv4Prefix(v **types.InstanceIpv4Prefix, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceIpv4Prefix - if *v == nil { - sv = &types.InstanceIpv4Prefix{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv4Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv4Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIpv4PrefixList(v *[]types.InstanceIpv4Prefix, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceIpv4Prefix - if *v == nil { - sv = make([]types.InstanceIpv4Prefix, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceIpv4Prefix - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceIpv4Prefix(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIpv4PrefixListUnwrapped(v *[]types.InstanceIpv4Prefix, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceIpv4Prefix - if *v == nil { - sv = make([]types.InstanceIpv4Prefix, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceIpv4Prefix - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceIpv4Prefix(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceIpv6Address(v **types.InstanceIpv6Address, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceIpv6Address - if *v == nil { - sv = &types.InstanceIpv6Address{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6Address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Address = ptr.String(xtv) - } - - case strings.EqualFold("isPrimaryIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsPrimaryIpv6 = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIpv6AddressList(v *[]types.InstanceIpv6Address, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceIpv6Address - if *v == nil { - sv = make([]types.InstanceIpv6Address, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceIpv6Address - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceIpv6Address(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIpv6AddressListUnwrapped(v *[]types.InstanceIpv6Address, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceIpv6Address - if *v == nil { - sv = make([]types.InstanceIpv6Address, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceIpv6Address - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceIpv6Address(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceIpv6Prefix(v **types.InstanceIpv6Prefix, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceIpv6Prefix - if *v == nil { - sv = &types.InstanceIpv6Prefix{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIpv6PrefixList(v *[]types.InstanceIpv6Prefix, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceIpv6Prefix - if *v == nil { - sv = make([]types.InstanceIpv6Prefix, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceIpv6Prefix - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceIpv6Prefix(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceIpv6PrefixListUnwrapped(v *[]types.InstanceIpv6Prefix, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceIpv6Prefix - if *v == nil { - sv = make([]types.InstanceIpv6Prefix, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceIpv6Prefix - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceIpv6Prefix(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceList(v *[]types.Instance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Instance - if *v == nil { - sv = make([]types.Instance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Instance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceListUnwrapped(v *[]types.Instance, decoder smithyxml.NodeDecoder) error { - var sv []types.Instance - if *v == nil { - sv = make([]types.Instance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Instance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceMaintenanceOptions(v **types.InstanceMaintenanceOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceMaintenanceOptions - if *v == nil { - sv = &types.InstanceMaintenanceOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("autoRecovery", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AutoRecovery = types.InstanceAutoRecoveryState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceMetadataOptionsResponse(v **types.InstanceMetadataOptionsResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceMetadataOptionsResponse - if *v == nil { - sv = &types.InstanceMetadataOptionsResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("httpEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HttpEndpoint = types.InstanceMetadataEndpointState(xtv) - } - - case strings.EqualFold("httpProtocolIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HttpProtocolIpv6 = types.InstanceMetadataProtocolState(xtv) - } - - case strings.EqualFold("httpPutResponseHopLimit", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.HttpPutResponseHopLimit = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("httpTokens", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HttpTokens = types.HttpTokensState(xtv) - } - - case strings.EqualFold("instanceMetadataTags", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceMetadataTags = types.InstanceMetadataTagsState(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.InstanceMetadataOptionsState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceMonitoring(v **types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceMonitoring - if *v == nil { - sv = &types.InstanceMonitoring{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("monitoring", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMonitoring(&sv.Monitoring, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceMonitoringList(v *[]types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceMonitoring - if *v == nil { - sv = make([]types.InstanceMonitoring, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceMonitoring - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceMonitoring(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceMonitoringListUnwrapped(v *[]types.InstanceMonitoring, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceMonitoring - if *v == nil { - sv = make([]types.InstanceMonitoring, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceMonitoring - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceMonitoring(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceNetworkInterface(v **types.InstanceNetworkInterface, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceNetworkInterface - if *v == nil { - sv = &types.InstanceNetworkInterface{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("attachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("connectionTrackingConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionTrackingSpecificationResponse(&sv.ConnectionTrackingConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("interfaceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InterfaceType = ptr.String(xtv) - } - - case strings.EqualFold("ipv4PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIpv4PrefixList(&sv.Ipv4Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6AddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIpv6AddressList(&sv.Ipv6Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIpv6PrefixList(&sv.Ipv6Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("macAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MacAddress = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstancePrivateIpAddressList(&sv.PrivateIpAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceDestCheck", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SourceDestCheck = ptr.Bool(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.NetworkInterfaceStatus(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceAssociation(v **types.InstanceNetworkInterfaceAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceNetworkInterfaceAssociation - if *v == nil { - sv = &types.InstanceNetworkInterfaceAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierIp = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIp = ptr.String(xtv) - } - - case strings.EqualFold("ipOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("publicDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicDnsName = ptr.String(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceAttachment(v **types.InstanceNetworkInterfaceAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceNetworkInterfaceAttachment - if *v == nil { - sv = &types.InstanceNetworkInterfaceAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("attachTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AttachTime = ptr.Time(t) - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("deviceIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DeviceIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("enaSrdSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceAttachmentEnaSrdSpecification(&sv.EnaSrdSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetworkCardIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.AttachmentStatus(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceList(v *[]types.InstanceNetworkInterface, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceNetworkInterface - if *v == nil { - sv = make([]types.InstanceNetworkInterface, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceNetworkInterface - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceNetworkInterface(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceListUnwrapped(v *[]types.InstanceNetworkInterface, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceNetworkInterface - if *v == nil { - sv = make([]types.InstanceNetworkInterface, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceNetworkInterface - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceNetworkInterface(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecification(v **types.InstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceNetworkInterfaceSpecification - if *v == nil { - sv = &types.InstanceNetworkInterfaceSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AssociateCarrierIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AssociateCarrierIpAddress = ptr.Bool(xtv) - } - - case strings.EqualFold("associatePublicIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AssociatePublicIpAddress = ptr.Bool(xtv) - } - - case strings.EqualFold("ConnectionTrackingSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionTrackingSpecificationRequest(&sv.ConnectionTrackingSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("deviceIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DeviceIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("EnaSrdSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnaSrdSpecificationRequest(&sv.EnaSrdSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("SecurityGroupId", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupIdStringList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("InterfaceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InterfaceType = ptr.String(xtv) - } - - case strings.EqualFold("Ipv4PrefixCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv4PrefixCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Ipv4Prefix", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv4PrefixList(&sv.Ipv4Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6AddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv6AddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv6AddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIpv6AddressList(&sv.Ipv6Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Ipv6PrefixCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv6PrefixCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Ipv6Prefix", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6PrefixList(&sv.Ipv6Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("NetworkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetworkCardIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("PrimaryIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PrimaryIpv6 = ptr.Bool(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecificationList(&sv.PrivateIpAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("secondaryPrivateIpAddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SecondaryPrivateIpAddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationList(v *[]types.InstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceNetworkInterfaceSpecification - if *v == nil { - sv = make([]types.InstanceNetworkInterfaceSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceNetworkInterfaceSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationListUnwrapped(v *[]types.InstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceNetworkInterfaceSpecification - if *v == nil { - sv = make([]types.InstanceNetworkInterfaceSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceNetworkInterfaceSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstancePrivateIpAddress(v **types.InstancePrivateIpAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstancePrivateIpAddress - if *v == nil { - sv = &types.InstancePrivateIpAddress{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("primary", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Primary = ptr.Bool(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstancePrivateIpAddressList(v *[]types.InstancePrivateIpAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstancePrivateIpAddress - if *v == nil { - sv = make([]types.InstancePrivateIpAddress, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstancePrivateIpAddress - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstancePrivateIpAddress(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstancePrivateIpAddressListUnwrapped(v *[]types.InstancePrivateIpAddress, decoder smithyxml.NodeDecoder) error { - var sv []types.InstancePrivateIpAddress - if *v == nil { - sv = make([]types.InstancePrivateIpAddress, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstancePrivateIpAddress - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstancePrivateIpAddress(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceRequirements(v **types.InstanceRequirements, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceRequirements - if *v == nil { - sv = &types.InstanceRequirements{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("acceleratorCount", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAcceleratorCount(&sv.AcceleratorCount, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("acceleratorManufacturerSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAcceleratorManufacturerSet(&sv.AcceleratorManufacturers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("acceleratorNameSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAcceleratorNameSet(&sv.AcceleratorNames, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("acceleratorTotalMemoryMiB", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAcceleratorTotalMemoryMiB(&sv.AcceleratorTotalMemoryMiB, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("acceleratorTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAcceleratorTypeSet(&sv.AcceleratorTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("allowedInstanceTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAllowedInstanceTypeSet(&sv.AllowedInstanceTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("bareMetal", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BareMetal = types.BareMetal(xtv) - } - - case strings.EqualFold("baselineEbsBandwidthMbps", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBaselineEbsBandwidthMbps(&sv.BaselineEbsBandwidthMbps, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("burstablePerformance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BurstablePerformance = types.BurstablePerformance(xtv) - } - - case strings.EqualFold("cpuManufacturerSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCpuManufacturerSet(&sv.CpuManufacturers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("excludedInstanceTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExcludedInstanceTypeSet(&sv.ExcludedInstanceTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceGenerationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceGenerationSet(&sv.InstanceGenerations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("localStorage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalStorage = types.LocalStorage(xtv) - } - - case strings.EqualFold("localStorageTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalStorageTypeSet(&sv.LocalStorageTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxSpotPriceAsPercentageOfOptimalOnDemandPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("memoryGiBPerVCpu", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMemoryGiBPerVCpu(&sv.MemoryGiBPerVCpu, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("memoryMiB", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMemoryMiB(&sv.MemoryMiB, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkBandwidthGbps", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkBandwidthGbps(&sv.NetworkBandwidthGbps, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceCount", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceCount(&sv.NetworkInterfaceCount, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("onDemandMaxPricePercentageOverLowestPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.OnDemandMaxPricePercentageOverLowestPrice = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("requireHibernateSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.RequireHibernateSupport = ptr.Bool(xtv) - } - - case strings.EqualFold("spotMaxPricePercentageOverLowestPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SpotMaxPricePercentageOverLowestPrice = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("totalLocalStorageGB", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTotalLocalStorageGB(&sv.TotalLocalStorageGB, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vCpuCount", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVCpuCountRange(&sv.VCpuCount, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceSet(v *[]types.InstanceTopology, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceTopology - if *v == nil { - sv = make([]types.InstanceTopology, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceTopology - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceTopology(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceSetUnwrapped(v *[]types.InstanceTopology, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceTopology - if *v == nil { - sv = make([]types.InstanceTopology, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceTopology - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceTopology(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceState(v **types.InstanceState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceState - if *v == nil { - sv = &types.InstanceState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Code = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = types.InstanceStateName(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStateChange(v **types.InstanceStateChange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceStateChange - if *v == nil { - sv = &types.InstanceStateChange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currentState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceState(&sv.CurrentState, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("previousState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceState(&sv.PreviousState, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStateChangeList(v *[]types.InstanceStateChange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceStateChange - if *v == nil { - sv = make([]types.InstanceStateChange, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceStateChange - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceStateChange(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStateChangeListUnwrapped(v *[]types.InstanceStateChange, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceStateChange - if *v == nil { - sv = make([]types.InstanceStateChange, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceStateChange - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceStateChange(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceStatus(v **types.InstanceStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceStatus - if *v == nil { - sv = &types.InstanceStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("eventsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStatusEventList(&sv.Events, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceState(&sv.InstanceState, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStatusSummary(&sv.InstanceStatus, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("systemStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStatusSummary(&sv.SystemStatus, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStatusDetails(v **types.InstanceStatusDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceStatusDetails - if *v == nil { - sv = &types.InstanceStatusDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("impairedSince", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ImpairedSince = ptr.Time(t) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = types.StatusName(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.StatusType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStatusDetailsList(v *[]types.InstanceStatusDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceStatusDetails - if *v == nil { - sv = make([]types.InstanceStatusDetails, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceStatusDetails - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceStatusDetails(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStatusDetailsListUnwrapped(v *[]types.InstanceStatusDetails, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceStatusDetails - if *v == nil { - sv = make([]types.InstanceStatusDetails, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceStatusDetails - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceStatusDetails(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceStatusEvent(v **types.InstanceStatusEvent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceStatusEvent - if *v == nil { - sv = &types.InstanceStatusEvent{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.EventCode(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("instanceEventId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceEventId = ptr.String(xtv) - } - - case strings.EqualFold("notAfter", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.NotAfter = ptr.Time(t) - } - - case strings.EqualFold("notBefore", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.NotBefore = ptr.Time(t) - } - - case strings.EqualFold("notBeforeDeadline", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.NotBeforeDeadline = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStatusEventList(v *[]types.InstanceStatusEvent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceStatusEvent - if *v == nil { - sv = make([]types.InstanceStatusEvent, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceStatusEvent - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceStatusEvent(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStatusEventListUnwrapped(v *[]types.InstanceStatusEvent, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceStatusEvent - if *v == nil { - sv = make([]types.InstanceStatusEvent, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceStatusEvent - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceStatusEvent(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceStatusList(v *[]types.InstanceStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceStatus - if *v == nil { - sv = make([]types.InstanceStatus, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceStatus - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceStatus(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStatusListUnwrapped(v *[]types.InstanceStatus, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceStatus - if *v == nil { - sv = make([]types.InstanceStatus, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceStatus - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceStatus(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceStatusSummary(v **types.InstanceStatusSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceStatusSummary - if *v == nil { - sv = &types.InstanceStatusSummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("details", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStatusDetailsList(&sv.Details, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.SummaryStatus(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceStorageInfo(v **types.InstanceStorageInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceStorageInfo - if *v == nil { - sv = &types.InstanceStorageInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("disks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDiskInfoList(&sv.Disks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("encryptionSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EncryptionSupport = types.InstanceStorageEncryptionSupport(xtv) - } - - case strings.EqualFold("nvmeSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NvmeSupport = types.EphemeralNvmeSupport(xtv) - } - - case strings.EqualFold("totalSizeInGB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalSizeInGB = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTagKeySet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTagKeySetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(v **types.InstanceTagNotificationAttribute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceTagNotificationAttribute - if *v == nil { - sv = &types.InstanceTagNotificationAttribute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("includeAllTagsOfInstance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IncludeAllTagsOfInstance = ptr.Bool(xtv) - } - - case strings.EqualFold("instanceTagKeySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTagKeySet(&sv.InstanceTagKeys, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTopology(v **types.InstanceTopology, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceTopology - if *v == nil { - sv = &types.InstanceTopology{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("networkNodeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkNodesList(&sv.NetworkNodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("zoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ZoneId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeInfo(v **types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceTypeInfo - if *v == nil { - sv = &types.InstanceTypeInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("autoRecoverySupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected AutoRecoveryFlag to be of type *bool, got %T instead", val) - } - sv.AutoRecoverySupported = ptr.Bool(xtv) - } - - case strings.EqualFold("bareMetal", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected BareMetalFlag to be of type *bool, got %T instead", val) - } - sv.BareMetal = ptr.Bool(xtv) - } - - case strings.EqualFold("burstablePerformanceSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected BurstablePerformanceFlag to be of type *bool, got %T instead", val) - } - sv.BurstablePerformanceSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("currentGeneration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected CurrentGenerationFlag to be of type *bool, got %T instead", val) - } - sv.CurrentGeneration = ptr.Bool(xtv) - } - - case strings.EqualFold("dedicatedHostsSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected DedicatedHostFlag to be of type *bool, got %T instead", val) - } - sv.DedicatedHostsSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("ebsInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEbsInfo(&sv.EbsInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("fpgaInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaInfo(&sv.FpgaInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("freeTierEligible", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected FreeTierEligibleFlag to be of type *bool, got %T instead", val) - } - sv.FreeTierEligible = ptr.Bool(xtv) - } - - case strings.EqualFold("gpuInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGpuInfo(&sv.GpuInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hibernationSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected HibernationFlag to be of type *bool, got %T instead", val) - } - sv.HibernationSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("hypervisor", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Hypervisor = types.InstanceTypeHypervisor(xtv) - } - - case strings.EqualFold("inferenceAcceleratorInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInferenceAcceleratorInfo(&sv.InferenceAcceleratorInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceStorageInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStorageInfo(&sv.InstanceStorageInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceStorageSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected InstanceStorageFlag to be of type *bool, got %T instead", val) - } - sv.InstanceStorageSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("memoryInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMemoryInfo(&sv.MemoryInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInfo(&sv.NetworkInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nitroEnclavesSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NitroEnclavesSupport = types.NitroEnclavesSupport(xtv) - } - - case strings.EqualFold("nitroTpmInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNitroTpmInfo(&sv.NitroTpmInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nitroTpmSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NitroTpmSupport = types.NitroTpmSupport(xtv) - } - - case strings.EqualFold("placementGroupInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacementGroupInfo(&sv.PlacementGroupInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("processorInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProcessorInfo(&sv.ProcessorInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedBootModes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBootModeTypeList(&sv.SupportedBootModes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedRootDeviceTypes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRootDeviceTypeList(&sv.SupportedRootDeviceTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedUsageClasses", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUsageClassTypeList(&sv.SupportedUsageClasses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedVirtualizationTypes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVirtualizationTypeList(&sv.SupportedVirtualizationTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vCpuInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVCpuInfo(&sv.VCpuInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeInfoFromInstanceRequirements(v **types.InstanceTypeInfoFromInstanceRequirements, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceTypeInfoFromInstanceRequirements - if *v == nil { - sv = &types.InstanceTypeInfoFromInstanceRequirements{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeInfoFromInstanceRequirementsSet(v *[]types.InstanceTypeInfoFromInstanceRequirements, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceTypeInfoFromInstanceRequirements - if *v == nil { - sv = make([]types.InstanceTypeInfoFromInstanceRequirements, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceTypeInfoFromInstanceRequirements - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceTypeInfoFromInstanceRequirements(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeInfoFromInstanceRequirementsSetUnwrapped(v *[]types.InstanceTypeInfoFromInstanceRequirements, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceTypeInfoFromInstanceRequirements - if *v == nil { - sv = make([]types.InstanceTypeInfoFromInstanceRequirements, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceTypeInfoFromInstanceRequirements - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceTypeInfoFromInstanceRequirements(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceTypeInfoList(v *[]types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceTypeInfo - if *v == nil { - sv = make([]types.InstanceTypeInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceTypeInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceTypeInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeInfoListUnwrapped(v *[]types.InstanceTypeInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceTypeInfo - if *v == nil { - sv = make([]types.InstanceTypeInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceTypeInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceTypeInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceTypeOffering(v **types.InstanceTypeOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceTypeOffering - if *v == nil { - sv = &types.InstanceTypeOffering{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("location", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Location = ptr.String(xtv) - } - - case strings.EqualFold("locationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocationType = types.LocationType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeOfferingsList(v *[]types.InstanceTypeOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceTypeOffering - if *v == nil { - sv = make([]types.InstanceTypeOffering, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceTypeOffering - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceTypeOffering(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypeOfferingsListUnwrapped(v *[]types.InstanceTypeOffering, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceTypeOffering - if *v == nil { - sv = make([]types.InstanceTypeOffering, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceTypeOffering - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceTypeOffering(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceTypesList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceTypesListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInstanceUsage(v **types.InstanceUsage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InstanceUsage - if *v == nil { - sv = &types.InstanceUsage{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accountId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AccountId = ptr.String(xtv) - } - - case strings.EqualFold("usedInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.UsedInstanceCount = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceUsageSet(v *[]types.InstanceUsage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InstanceUsage - if *v == nil { - sv = make([]types.InstanceUsage, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InstanceUsage - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInstanceUsage(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInstanceUsageSetUnwrapped(v *[]types.InstanceUsage, decoder smithyxml.NodeDecoder) error { - var sv []types.InstanceUsage - if *v == nil { - sv = make([]types.InstanceUsage, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InstanceUsage - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInstanceUsage(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInternetGateway(v **types.InternetGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InternetGateway - if *v == nil { - sv = &types.InternetGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInternetGatewayAttachmentList(&sv.Attachments, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("internetGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InternetGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInternetGatewayAttachment(v **types.InternetGatewayAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InternetGatewayAttachment - if *v == nil { - sv = &types.InternetGatewayAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.AttachmentStatus(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInternetGatewayAttachmentList(v *[]types.InternetGatewayAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InternetGatewayAttachment - if *v == nil { - sv = make([]types.InternetGatewayAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InternetGatewayAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInternetGatewayAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInternetGatewayAttachmentListUnwrapped(v *[]types.InternetGatewayAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.InternetGatewayAttachment - if *v == nil { - sv = make([]types.InternetGatewayAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InternetGatewayAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInternetGatewayAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentInternetGatewayList(v *[]types.InternetGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.InternetGateway - if *v == nil { - sv = make([]types.InternetGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.InternetGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentInternetGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentInternetGatewayListUnwrapped(v *[]types.InternetGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.InternetGateway - if *v == nil { - sv = make([]types.InternetGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.InternetGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentInternetGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpAddressList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpAddressListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpam(v **types.Ipam, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipam - if *v == nil { - sv = &types.Ipam{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("defaultResourceDiscoveryAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DefaultResourceDiscoveryAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("defaultResourceDiscoveryId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DefaultResourceDiscoveryId = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ipamArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamId = ptr.String(xtv) - } - - case strings.EqualFold("ipamRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamRegion = ptr.String(xtv) - } - - case strings.EqualFold("operatingRegionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamOperatingRegionSet(&sv.OperatingRegions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("privateDefaultScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDefaultScopeId = ptr.String(xtv) - } - - case strings.EqualFold("publicDefaultScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicDefaultScopeId = ptr.String(xtv) - } - - case strings.EqualFold("resourceDiscoveryAssociationCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ResourceDiscoveryAssociationCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("scopeCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ScopeCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IpamState(xtv) - } - - case strings.EqualFold("stateMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tier = types.IpamTier(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamAddressHistoryRecord(v **types.IpamAddressHistoryRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamAddressHistoryRecord - if *v == nil { - sv = &types.IpamAddressHistoryRecord{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceCidr = ptr.String(xtv) - } - - case strings.EqualFold("resourceComplianceStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceComplianceStatus = types.IpamComplianceStatus(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceName = ptr.String(xtv) - } - - case strings.EqualFold("resourceOverlapStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOverlapStatus = types.IpamOverlapStatus(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceRegion = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.IpamAddressHistoryResourceType(xtv) - } - - case strings.EqualFold("sampledEndTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.SampledEndTime = ptr.Time(t) - } - - case strings.EqualFold("sampledStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.SampledStartTime = ptr.Time(t) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamAddressHistoryRecordSet(v *[]types.IpamAddressHistoryRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamAddressHistoryRecord - if *v == nil { - sv = make([]types.IpamAddressHistoryRecord, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamAddressHistoryRecord - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamAddressHistoryRecord(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamAddressHistoryRecordSetUnwrapped(v *[]types.IpamAddressHistoryRecord, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamAddressHistoryRecord - if *v == nil { - sv = make([]types.IpamAddressHistoryRecord, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamAddressHistoryRecord - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamAddressHistoryRecord(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamDiscoveredAccount(v **types.IpamDiscoveredAccount, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamDiscoveredAccount - if *v == nil { - sv = &types.IpamDiscoveredAccount{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accountId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AccountId = ptr.String(xtv) - } - - case strings.EqualFold("discoveryRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DiscoveryRegion = ptr.String(xtv) - } - - case strings.EqualFold("failureReason", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamDiscoveryFailureReason(&sv.FailureReason, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lastAttemptedDiscoveryTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastAttemptedDiscoveryTime = ptr.Time(t) - } - - case strings.EqualFold("lastSuccessfulDiscoveryTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastSuccessfulDiscoveryTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamDiscoveredAccountSet(v *[]types.IpamDiscoveredAccount, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamDiscoveredAccount - if *v == nil { - sv = make([]types.IpamDiscoveredAccount, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamDiscoveredAccount - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamDiscoveredAccount(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamDiscoveredAccountSetUnwrapped(v *[]types.IpamDiscoveredAccount, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamDiscoveredAccount - if *v == nil { - sv = make([]types.IpamDiscoveredAccount, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamDiscoveredAccount - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamDiscoveredAccount(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamDiscoveredPublicAddress(v **types.IpamDiscoveredPublicAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamDiscoveredPublicAddress - if *v == nil { - sv = &types.IpamDiscoveredPublicAddress{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Address = ptr.String(xtv) - } - - case strings.EqualFold("addressAllocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressAllocationId = ptr.String(xtv) - } - - case strings.EqualFold("addressOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("addressRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressRegion = ptr.String(xtv) - } - - case strings.EqualFold("addressType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressType = types.IpamPublicAddressType(xtv) - } - - case strings.EqualFold("associationStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationStatus = types.IpamPublicAddressAssociationStatus(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryId = ptr.String(xtv) - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceDescription = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("publicIpv4PoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIpv4PoolId = ptr.String(xtv) - } - - case strings.EqualFold("sampleTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.SampleTime = ptr.Time(t) - } - - case strings.EqualFold("securityGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPublicAddressSecurityGroupList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("service", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Service = types.IpamPublicAddressAwsService(xtv) - } - - case strings.EqualFold("serviceResource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceResource = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tags", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPublicAddressTags(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamDiscoveredPublicAddressSet(v *[]types.IpamDiscoveredPublicAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamDiscoveredPublicAddress - if *v == nil { - sv = make([]types.IpamDiscoveredPublicAddress, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamDiscoveredPublicAddress - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamDiscoveredPublicAddress(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamDiscoveredPublicAddressSetUnwrapped(v *[]types.IpamDiscoveredPublicAddress, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamDiscoveredPublicAddress - if *v == nil { - sv = make([]types.IpamDiscoveredPublicAddress, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamDiscoveredPublicAddress - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamDiscoveredPublicAddress(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamDiscoveredResourceCidr(v **types.IpamDiscoveredResourceCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamDiscoveredResourceCidr - if *v == nil { - sv = &types.IpamDiscoveredResourceCidr{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscoveryId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryId = ptr.String(xtv) - } - - case strings.EqualFold("ipUsage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.IpUsage = ptr.Float64(f64) - } - - case strings.EqualFold("resourceCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceCidr = ptr.String(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceRegion = ptr.String(xtv) - } - - case strings.EqualFold("resourceTagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceTagList(&sv.ResourceTags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.IpamResourceType(xtv) - } - - case strings.EqualFold("sampleTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.SampleTime = ptr.Time(t) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamDiscoveredResourceCidrSet(v *[]types.IpamDiscoveredResourceCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamDiscoveredResourceCidr - if *v == nil { - sv = make([]types.IpamDiscoveredResourceCidr, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamDiscoveredResourceCidr - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamDiscoveredResourceCidr(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamDiscoveredResourceCidrSetUnwrapped(v *[]types.IpamDiscoveredResourceCidr, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamDiscoveredResourceCidr - if *v == nil { - sv = make([]types.IpamDiscoveredResourceCidr, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamDiscoveredResourceCidr - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamDiscoveredResourceCidr(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamDiscoveryFailureReason(v **types.IpamDiscoveryFailureReason, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamDiscoveryFailureReason - if *v == nil { - sv = &types.IpamDiscoveryFailureReason{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.IpamDiscoveryFailureCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamOperatingRegion(v **types.IpamOperatingRegion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamOperatingRegion - if *v == nil { - sv = &types.IpamOperatingRegion{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("regionName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RegionName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamOperatingRegionSet(v *[]types.IpamOperatingRegion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamOperatingRegion - if *v == nil { - sv = make([]types.IpamOperatingRegion, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamOperatingRegion - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamOperatingRegion(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamOperatingRegionSetUnwrapped(v *[]types.IpamOperatingRegion, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamOperatingRegion - if *v == nil { - sv = make([]types.IpamOperatingRegion, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamOperatingRegion - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamOperatingRegion(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamPool(v **types.IpamPool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPool - if *v == nil { - sv = &types.IpamPool{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressFamily = types.AddressFamily(xtv) - } - - case strings.EqualFold("allocationDefaultNetmaskLength", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AllocationDefaultNetmaskLength = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("allocationMaxNetmaskLength", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AllocationMaxNetmaskLength = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("allocationMinNetmaskLength", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AllocationMinNetmaskLength = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("allocationResourceTagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceTagList(&sv.AllocationResourceTags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("autoImport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AutoImport = ptr.Bool(xtv) - } - - case strings.EqualFold("awsService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AwsService = types.IpamPoolAwsService(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ipamArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamPoolArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamPoolArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamPoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamPoolId = ptr.String(xtv) - } - - case strings.EqualFold("ipamRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamRegion = ptr.String(xtv) - } - - case strings.EqualFold("ipamScopeArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamScopeArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamScopeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamScopeType = types.IpamScopeType(xtv) - } - - case strings.EqualFold("locale", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Locale = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("poolDepth", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PoolDepth = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("publicIpSource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIpSource = types.IpamPoolPublicIpSource(xtv) - } - - case strings.EqualFold("publiclyAdvertisable", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PubliclyAdvertisable = ptr.Bool(xtv) - } - - case strings.EqualFold("sourceIpamPoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceIpamPoolId = ptr.String(xtv) - } - - case strings.EqualFold("sourceResource", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolSourceResource(&sv.SourceResource, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IpamPoolState(xtv) - } - - case strings.EqualFold("stateMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolAllocation(v **types.IpamPoolAllocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPoolAllocation - if *v == nil { - sv = &types.IpamPoolAllocation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ipamPoolAllocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamPoolAllocationId = ptr.String(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwner = ptr.String(xtv) - } - - case strings.EqualFold("resourceRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceRegion = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.IpamPoolAllocationResourceType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolAllocationSet(v *[]types.IpamPoolAllocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamPoolAllocation - if *v == nil { - sv = make([]types.IpamPoolAllocation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamPoolAllocation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamPoolAllocation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolAllocationSetUnwrapped(v *[]types.IpamPoolAllocation, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamPoolAllocation - if *v == nil { - sv = make([]types.IpamPoolAllocation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamPoolAllocation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamPoolAllocation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamPoolCidr(v **types.IpamPoolCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPoolCidr - if *v == nil { - sv = &types.IpamPoolCidr{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("failureReason", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolCidrFailureReason(&sv.FailureReason, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipamPoolCidrId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamPoolCidrId = ptr.String(xtv) - } - - case strings.EqualFold("netmaskLength", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetmaskLength = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IpamPoolCidrState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolCidrFailureReason(v **types.IpamPoolCidrFailureReason, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPoolCidrFailureReason - if *v == nil { - sv = &types.IpamPoolCidrFailureReason{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.IpamPoolCidrFailureCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolCidrSet(v *[]types.IpamPoolCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamPoolCidr - if *v == nil { - sv = make([]types.IpamPoolCidr, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamPoolCidr - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamPoolCidr(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolCidrSetUnwrapped(v *[]types.IpamPoolCidr, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamPoolCidr - if *v == nil { - sv = make([]types.IpamPoolCidr, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamPoolCidr - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamPoolCidr(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamPoolSet(v *[]types.IpamPool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamPool - if *v == nil { - sv = make([]types.IpamPool, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamPool - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamPool(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPoolSetUnwrapped(v *[]types.IpamPool, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamPool - if *v == nil { - sv = make([]types.IpamPool, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamPool - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamPool(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamPoolSourceResource(v **types.IpamPoolSourceResource, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPoolSourceResource - if *v == nil { - sv = &types.IpamPoolSourceResource{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwner = ptr.String(xtv) - } - - case strings.EqualFold("resourceRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceRegion = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.IpamPoolSourceResourceType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPublicAddressSecurityGroup(v **types.IpamPublicAddressSecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPublicAddressSecurityGroup - if *v == nil { - sv = &types.IpamPublicAddressSecurityGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPublicAddressSecurityGroupList(v *[]types.IpamPublicAddressSecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamPublicAddressSecurityGroup - if *v == nil { - sv = make([]types.IpamPublicAddressSecurityGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamPublicAddressSecurityGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamPublicAddressSecurityGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPublicAddressSecurityGroupListUnwrapped(v *[]types.IpamPublicAddressSecurityGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamPublicAddressSecurityGroup - if *v == nil { - sv = make([]types.IpamPublicAddressSecurityGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamPublicAddressSecurityGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamPublicAddressSecurityGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamPublicAddressTag(v **types.IpamPublicAddressTag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPublicAddressTag - if *v == nil { - sv = &types.IpamPublicAddressTag{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Key = ptr.String(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPublicAddressTagList(v *[]types.IpamPublicAddressTag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamPublicAddressTag - if *v == nil { - sv = make([]types.IpamPublicAddressTag, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamPublicAddressTag - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamPublicAddressTag(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamPublicAddressTagListUnwrapped(v *[]types.IpamPublicAddressTag, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamPublicAddressTag - if *v == nil { - sv = make([]types.IpamPublicAddressTag, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamPublicAddressTag - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamPublicAddressTag(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamPublicAddressTags(v **types.IpamPublicAddressTags, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamPublicAddressTags - if *v == nil { - sv = &types.IpamPublicAddressTags{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("eipTagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPublicAddressTagList(&sv.EipTags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceCidr(v **types.IpamResourceCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamResourceCidr - if *v == nil { - sv = &types.IpamResourceCidr{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("complianceStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ComplianceStatus = types.IpamComplianceStatus(xtv) - } - - case strings.EqualFold("ipamId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamId = ptr.String(xtv) - } - - case strings.EqualFold("ipamPoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamPoolId = ptr.String(xtv) - } - - case strings.EqualFold("ipamScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamScopeId = ptr.String(xtv) - } - - case strings.EqualFold("ipUsage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.IpUsage = ptr.Float64(f64) - } - - case strings.EqualFold("managementState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ManagementState = types.IpamManagementState(xtv) - } - - case strings.EqualFold("overlapStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OverlapStatus = types.IpamOverlapStatus(xtv) - } - - case strings.EqualFold("resourceCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceCidr = ptr.String(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceName = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceRegion = ptr.String(xtv) - } - - case strings.EqualFold("resourceTagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceTagList(&sv.ResourceTags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.IpamResourceType(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceCidrSet(v *[]types.IpamResourceCidr, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamResourceCidr - if *v == nil { - sv = make([]types.IpamResourceCidr, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamResourceCidr - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamResourceCidr(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceCidrSetUnwrapped(v *[]types.IpamResourceCidr, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamResourceCidr - if *v == nil { - sv = make([]types.IpamResourceCidr, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamResourceCidr - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamResourceCidr(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamResourceDiscovery(v **types.IpamResourceDiscovery, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamResourceDiscovery - if *v == nil { - sv = &types.IpamResourceDiscovery{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryId = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryRegion = ptr.String(xtv) - } - - case strings.EqualFold("isDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsDefault = ptr.Bool(xtv) - } - - case strings.EqualFold("operatingRegionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamOperatingRegionSet(&sv.OperatingRegions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IpamResourceDiscoveryState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociation(v **types.IpamResourceDiscoveryAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamResourceDiscoveryAssociation - if *v == nil { - sv = &types.IpamResourceDiscoveryAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamId = ptr.String(xtv) - } - - case strings.EqualFold("ipamRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamRegion = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryAssociationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryAssociationArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("ipamResourceDiscoveryId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamResourceDiscoveryId = ptr.String(xtv) - } - - case strings.EqualFold("isDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsDefault = ptr.Bool(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceDiscoveryStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceDiscoveryStatus = types.IpamAssociatedResourceDiscoveryStatus(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IpamResourceDiscoveryAssociationState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociationSet(v *[]types.IpamResourceDiscoveryAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamResourceDiscoveryAssociation - if *v == nil { - sv = make([]types.IpamResourceDiscoveryAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamResourceDiscoveryAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociationSetUnwrapped(v *[]types.IpamResourceDiscoveryAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamResourceDiscoveryAssociation - if *v == nil { - sv = make([]types.IpamResourceDiscoveryAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamResourceDiscoveryAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamResourceDiscoverySet(v *[]types.IpamResourceDiscovery, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamResourceDiscovery - if *v == nil { - sv = make([]types.IpamResourceDiscovery, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamResourceDiscovery - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamResourceDiscovery(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceDiscoverySetUnwrapped(v *[]types.IpamResourceDiscovery, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamResourceDiscovery - if *v == nil { - sv = make([]types.IpamResourceDiscovery, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamResourceDiscovery - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamResourceDiscovery(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamResourceTag(v **types.IpamResourceTag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamResourceTag - if *v == nil { - sv = &types.IpamResourceTag{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Key = ptr.String(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceTagList(v *[]types.IpamResourceTag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamResourceTag - if *v == nil { - sv = make([]types.IpamResourceTag, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamResourceTag - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamResourceTag(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamResourceTagListUnwrapped(v *[]types.IpamResourceTag, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamResourceTag - if *v == nil { - sv = make([]types.IpamResourceTag, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamResourceTag - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamResourceTag(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamScope(v **types.IpamScope, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpamScope - if *v == nil { - sv = &types.IpamScope{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ipamArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamRegion = ptr.String(xtv) - } - - case strings.EqualFold("ipamScopeArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamScopeArn = ptr.String(xtv) - } - - case strings.EqualFold("ipamScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamScopeId = ptr.String(xtv) - } - - case strings.EqualFold("ipamScopeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpamScopeType = types.IpamScopeType(xtv) - } - - case strings.EqualFold("isDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsDefault = ptr.Bool(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("poolCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PoolCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.IpamScopeState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamScopeSet(v *[]types.IpamScope, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpamScope - if *v == nil { - sv = make([]types.IpamScope, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpamScope - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpamScope(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamScopeSetUnwrapped(v *[]types.IpamScope, decoder smithyxml.NodeDecoder) error { - var sv []types.IpamScope - if *v == nil { - sv = make([]types.IpamScope, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpamScope - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpamScope(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpamSet(v *[]types.Ipam, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipam - if *v == nil { - sv = make([]types.Ipam, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipam - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpam(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpamSetUnwrapped(v *[]types.Ipam, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipam - if *v == nil { - sv = make([]types.Ipam, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipam - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpam(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpPermission(v **types.IpPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpPermission - if *v == nil { - sv = &types.IpPermission{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fromPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.FromPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipProtocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpProtocol = ptr.String(xtv) - } - - case strings.EqualFold("ipRanges", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpRangeList(&sv.IpRanges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6Ranges", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6RangeList(&sv.Ipv6Ranges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("prefixListIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrefixListIdList(&sv.PrefixListIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("toPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ToPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("groups", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUserIdGroupPairList(&sv.UserIdGroupPairs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpPermissionList(v *[]types.IpPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpPermission - if *v == nil { - sv = make([]types.IpPermission, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpPermission - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpPermission(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpPermissionListUnwrapped(v *[]types.IpPermission, decoder smithyxml.NodeDecoder) error { - var sv []types.IpPermission - if *v == nil { - sv = make([]types.IpPermission, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpPermission - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpPermission(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpPrefixList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpPrefixListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpRange(v **types.IpRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IpRange - if *v == nil { - sv = &types.IpRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrIp = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpRangeList(v *[]types.IpRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.IpRange - if *v == nil { - sv = make([]types.IpRange, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.IpRange - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpRange(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpRangeListUnwrapped(v *[]types.IpRange, decoder smithyxml.NodeDecoder) error { - var sv []types.IpRange - if *v == nil { - sv = make([]types.IpRange, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.IpRange - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpRange(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpRanges(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpRangesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv4PrefixesList(v *[]types.Ipv4PrefixSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv4PrefixSpecification - if *v == nil { - sv = make([]types.Ipv4PrefixSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv4PrefixSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv4PrefixSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv4PrefixesListUnwrapped(v *[]types.Ipv4PrefixSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv4PrefixSpecification - if *v == nil { - sv = make([]types.Ipv4PrefixSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv4PrefixSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv4PrefixSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv4PrefixList(v *[]types.Ipv4PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv4PrefixSpecificationRequest - if *v == nil { - sv = make([]types.Ipv4PrefixSpecificationRequest, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv4PrefixSpecificationRequest - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationRequest(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv4PrefixListUnwrapped(v *[]types.Ipv4PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv4PrefixSpecificationRequest - if *v == nil { - sv = make([]types.Ipv4PrefixSpecificationRequest, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv4PrefixSpecificationRequest - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationRequest(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv4PrefixListResponse(v *[]types.Ipv4PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv4PrefixSpecificationResponse - if *v == nil { - sv = make([]types.Ipv4PrefixSpecificationResponse, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv4PrefixSpecificationResponse - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv4PrefixListResponseUnwrapped(v *[]types.Ipv4PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv4PrefixSpecificationResponse - if *v == nil { - sv = make([]types.Ipv4PrefixSpecificationResponse, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv4PrefixSpecificationResponse - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv4PrefixSpecificationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv4PrefixSpecification(v **types.Ipv4PrefixSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv4PrefixSpecification - if *v == nil { - sv = &types.Ipv4PrefixSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv4Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv4Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv4PrefixSpecificationRequest(v **types.Ipv4PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv4PrefixSpecificationRequest - if *v == nil { - sv = &types.Ipv4PrefixSpecificationRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Ipv4Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv4Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv4PrefixSpecificationResponse(v **types.Ipv4PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv4PrefixSpecificationResponse - if *v == nil { - sv = &types.Ipv4PrefixSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv4Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv4Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6AddressList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6AddressListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6CidrAssociation(v **types.Ipv6CidrAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6CidrAssociation - if *v == nil { - sv = &types.Ipv6CidrAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedResource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociatedResource = ptr.String(xtv) - } - - case strings.EqualFold("ipv6Cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Cidr = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6CidrAssociationSet(v *[]types.Ipv6CidrAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6CidrAssociation - if *v == nil { - sv = make([]types.Ipv6CidrAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6CidrAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6CidrAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6CidrAssociationSetUnwrapped(v *[]types.Ipv6CidrAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6CidrAssociation - if *v == nil { - sv = make([]types.Ipv6CidrAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6CidrAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6CidrAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6CidrBlock(v **types.Ipv6CidrBlock, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6CidrBlock - if *v == nil { - sv = &types.Ipv6CidrBlock{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6CidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6CidrBlock = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6CidrBlockSet(v *[]types.Ipv6CidrBlock, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6CidrBlock - if *v == nil { - sv = make([]types.Ipv6CidrBlock, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6CidrBlock - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6CidrBlock(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6CidrBlockSetUnwrapped(v *[]types.Ipv6CidrBlock, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6CidrBlock - if *v == nil { - sv = make([]types.Ipv6CidrBlock, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6CidrBlock - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6CidrBlock(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6Pool(v **types.Ipv6Pool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6Pool - if *v == nil { - sv = &types.Ipv6Pool{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("poolCidrBlockSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPoolCidrBlocksSet(&sv.PoolCidrBlocks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("poolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PoolSet(v *[]types.Ipv6Pool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6Pool - if *v == nil { - sv = make([]types.Ipv6Pool, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6Pool - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6Pool(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PoolSetUnwrapped(v *[]types.Ipv6Pool, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6Pool - if *v == nil { - sv = make([]types.Ipv6Pool, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6Pool - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6Pool(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6PrefixesList(v *[]types.Ipv6PrefixSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6PrefixSpecification - if *v == nil { - sv = make([]types.Ipv6PrefixSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6PrefixSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6PrefixSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PrefixesListUnwrapped(v *[]types.Ipv6PrefixSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6PrefixSpecification - if *v == nil { - sv = make([]types.Ipv6PrefixSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6PrefixSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6PrefixSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6PrefixList(v *[]types.Ipv6PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6PrefixSpecificationRequest - if *v == nil { - sv = make([]types.Ipv6PrefixSpecificationRequest, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6PrefixSpecificationRequest - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationRequest(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PrefixListUnwrapped(v *[]types.Ipv6PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6PrefixSpecificationRequest - if *v == nil { - sv = make([]types.Ipv6PrefixSpecificationRequest, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6PrefixSpecificationRequest - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationRequest(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6PrefixListResponse(v *[]types.Ipv6PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6PrefixSpecificationResponse - if *v == nil { - sv = make([]types.Ipv6PrefixSpecificationResponse, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6PrefixSpecificationResponse - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PrefixListResponseUnwrapped(v *[]types.Ipv6PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6PrefixSpecificationResponse - if *v == nil { - sv = make([]types.Ipv6PrefixSpecificationResponse, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6PrefixSpecificationResponse - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6PrefixSpecificationResponse(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentIpv6PrefixSpecification(v **types.Ipv6PrefixSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6PrefixSpecification - if *v == nil { - sv = &types.Ipv6PrefixSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PrefixSpecificationRequest(v **types.Ipv6PrefixSpecificationRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6PrefixSpecificationRequest - if *v == nil { - sv = &types.Ipv6PrefixSpecificationRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Ipv6Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6PrefixSpecificationResponse(v **types.Ipv6PrefixSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6PrefixSpecificationResponse - if *v == nil { - sv = &types.Ipv6PrefixSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6Prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6Range(v **types.Ipv6Range, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Ipv6Range - if *v == nil { - sv = &types.Ipv6Range{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrIpv6 = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6RangeList(v *[]types.Ipv6Range, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Ipv6Range - if *v == nil { - sv = make([]types.Ipv6Range, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Ipv6Range - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentIpv6Range(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentIpv6RangeListUnwrapped(v *[]types.Ipv6Range, decoder smithyxml.NodeDecoder) error { - var sv []types.Ipv6Range - if *v == nil { - sv = make([]types.Ipv6Range, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Ipv6Range - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentIpv6Range(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentKeyPairInfo(v **types.KeyPairInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.KeyPairInfo - if *v == nil { - sv = &types.KeyPairInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("keyFingerprint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyFingerprint = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("keyPairId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyPairId = ptr.String(xtv) - } - - case strings.EqualFold("keyType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyType = types.KeyType(xtv) - } - - case strings.EqualFold("publicKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicKey = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentKeyPairList(v *[]types.KeyPairInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.KeyPairInfo - if *v == nil { - sv = make([]types.KeyPairInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.KeyPairInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentKeyPairInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentKeyPairListUnwrapped(v *[]types.KeyPairInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.KeyPairInfo - if *v == nil { - sv = make([]types.KeyPairInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.KeyPairInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentKeyPairInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLastError(v **types.LastError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LastError - if *v == nil { - sv = &types.LastError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchPermission(v **types.LaunchPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchPermission - if *v == nil { - sv = &types.LaunchPermission{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("group", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Group = types.PermissionGroup(xtv) - } - - case strings.EqualFold("organizationalUnitArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OrganizationalUnitArn = ptr.String(xtv) - } - - case strings.EqualFold("organizationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OrganizationArn = ptr.String(xtv) - } - - case strings.EqualFold("userId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchPermissionList(v *[]types.LaunchPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchPermission - if *v == nil { - sv = make([]types.LaunchPermission, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchPermission - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchPermission(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchPermissionListUnwrapped(v *[]types.LaunchPermission, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchPermission - if *v == nil { - sv = make([]types.LaunchPermission, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchPermission - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchPermission(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchSpecification(v **types.LaunchSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchSpecification - if *v == nil { - sv = &types.LaunchSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressingType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressingType = ptr.String(xtv) - } - - case strings.EqualFold("blockDeviceMapping", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsOptimized = ptr.Bool(xtv) - } - - case strings.EqualFold("iamInstanceProfile", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfileSpecification(&sv.IamInstanceProfile, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("kernelId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KernelId = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("monitoring", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRunInstancesMonitoringEnabled(&sv.Monitoring, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationList(&sv.NetworkInterfaces, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("placement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotPlacement(&sv.Placement, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ramdiskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RamdiskId = ptr.String(xtv) - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("userData", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserData = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchSpecsList(v *[]types.SpotFleetLaunchSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SpotFleetLaunchSpecification - if *v == nil { - sv = make([]types.SpotFleetLaunchSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SpotFleetLaunchSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSpotFleetLaunchSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchSpecsListUnwrapped(v *[]types.SpotFleetLaunchSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.SpotFleetLaunchSpecification - if *v == nil { - sv = make([]types.SpotFleetLaunchSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SpotFleetLaunchSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSpotFleetLaunchSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplate(v **types.LaunchTemplate, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplate - if *v == nil { - sv = &types.LaunchTemplate{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createdBy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreatedBy = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("defaultVersionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DefaultVersionNumber = ptr.Int64(i64) - } - - case strings.EqualFold("latestVersionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LatestVersionNumber = ptr.Int64(i64) - } - - case strings.EqualFold("launchTemplateId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateName = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateAndOverridesResponse(v **types.LaunchTemplateAndOverridesResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateAndOverridesResponse - if *v == nil { - sv = &types.LaunchTemplateAndOverridesResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("overrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(&sv.Overrides, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMapping(v **types.LaunchTemplateBlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateBlockDeviceMapping - if *v == nil { - sv = &types.LaunchTemplateBlockDeviceMapping{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceName = ptr.String(xtv) - } - - case strings.EqualFold("ebs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateEbsBlockDevice(&sv.Ebs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("noDevice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NoDevice = ptr.String(xtv) - } - - case strings.EqualFold("virtualName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VirtualName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMappingList(v *[]types.LaunchTemplateBlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateBlockDeviceMapping - if *v == nil { - sv = make([]types.LaunchTemplateBlockDeviceMapping, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateBlockDeviceMapping - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMapping(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMappingListUnwrapped(v *[]types.LaunchTemplateBlockDeviceMapping, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateBlockDeviceMapping - if *v == nil { - sv = make([]types.LaunchTemplateBlockDeviceMapping, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateBlockDeviceMapping - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMapping(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplateCapacityReservationSpecificationResponse(v **types.LaunchTemplateCapacityReservationSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateCapacityReservationSpecificationResponse - if *v == nil { - sv = &types.LaunchTemplateCapacityReservationSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationPreference", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationPreference = types.CapacityReservationPreference(xtv) - } - - case strings.EqualFold("capacityReservationTarget", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationTargetResponse(&sv.CapacityReservationTarget, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateConfig(v **types.LaunchTemplateConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateConfig - if *v == nil { - sv = &types.LaunchTemplateConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetLaunchTemplateSpecification(&sv.LaunchTemplateSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("overrides", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateOverridesList(&sv.Overrides, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateConfigList(v *[]types.LaunchTemplateConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateConfig - if *v == nil { - sv = make([]types.LaunchTemplateConfig, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateConfig - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateConfig(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateConfigListUnwrapped(v *[]types.LaunchTemplateConfig, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateConfig - if *v == nil { - sv = make([]types.LaunchTemplateConfig, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateConfig - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateConfig(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplateCpuOptions(v **types.LaunchTemplateCpuOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateCpuOptions - if *v == nil { - sv = &types.LaunchTemplateCpuOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amdSevSnp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AmdSevSnp = types.AmdSevSnpSpecification(xtv) - } - - case strings.EqualFold("coreCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.CoreCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("threadsPerCore", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ThreadsPerCore = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateEbsBlockDevice(v **types.LaunchTemplateEbsBlockDevice, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateEbsBlockDevice - if *v == nil { - sv = &types.LaunchTemplateEbsBlockDevice{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("iops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Iops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("throughput", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Throughput = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("volumeSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VolumeSize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("volumeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeType = types.VolumeType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponse(v **types.LaunchTemplateElasticInferenceAcceleratorResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateElasticInferenceAcceleratorResponse - if *v == nil { - sv = &types.LaunchTemplateElasticInferenceAcceleratorResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponseList(v *[]types.LaunchTemplateElasticInferenceAcceleratorResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateElasticInferenceAcceleratorResponse - if *v == nil { - sv = make([]types.LaunchTemplateElasticInferenceAcceleratorResponse, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateElasticInferenceAcceleratorResponse - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponse(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponseListUnwrapped(v *[]types.LaunchTemplateElasticInferenceAcceleratorResponse, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateElasticInferenceAcceleratorResponse - if *v == nil { - sv = make([]types.LaunchTemplateElasticInferenceAcceleratorResponse, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateElasticInferenceAcceleratorResponse - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponse(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplateEnaSrdSpecification(v **types.LaunchTemplateEnaSrdSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateEnaSrdSpecification - if *v == nil { - sv = &types.LaunchTemplateEnaSrdSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enaSrdEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("enaSrdUdpSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateEnaSrdUdpSpecification(&sv.EnaSrdUdpSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateEnaSrdUdpSpecification(v **types.LaunchTemplateEnaSrdUdpSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateEnaSrdUdpSpecification - if *v == nil { - sv = &types.LaunchTemplateEnaSrdUdpSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enaSrdUdpEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnaSrdUdpEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateEnclaveOptions(v **types.LaunchTemplateEnclaveOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateEnclaveOptions - if *v == nil { - sv = &types.LaunchTemplateEnclaveOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateHibernationOptions(v **types.LaunchTemplateHibernationOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateHibernationOptions - if *v == nil { - sv = &types.LaunchTemplateHibernationOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("configured", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Configured = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateIamInstanceProfileSpecification(v **types.LaunchTemplateIamInstanceProfileSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateIamInstanceProfileSpecification - if *v == nil { - sv = &types.LaunchTemplateIamInstanceProfileSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateInstanceMaintenanceOptions(v **types.LaunchTemplateInstanceMaintenanceOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateInstanceMaintenanceOptions - if *v == nil { - sv = &types.LaunchTemplateInstanceMaintenanceOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("autoRecovery", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AutoRecovery = types.LaunchTemplateAutoRecoveryState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateInstanceMarketOptions(v **types.LaunchTemplateInstanceMarketOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateInstanceMarketOptions - if *v == nil { - sv = &types.LaunchTemplateInstanceMarketOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("marketType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MarketType = types.MarketType(xtv) - } - - case strings.EqualFold("spotOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateSpotMarketOptions(&sv.SpotOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateInstanceMetadataOptions(v **types.LaunchTemplateInstanceMetadataOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateInstanceMetadataOptions - if *v == nil { - sv = &types.LaunchTemplateInstanceMetadataOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("httpEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HttpEndpoint = types.LaunchTemplateInstanceMetadataEndpointState(xtv) - } - - case strings.EqualFold("httpProtocolIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HttpProtocolIpv6 = types.LaunchTemplateInstanceMetadataProtocolIpv6(xtv) - } - - case strings.EqualFold("httpPutResponseHopLimit", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.HttpPutResponseHopLimit = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("httpTokens", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HttpTokens = types.LaunchTemplateHttpTokensState(xtv) - } - - case strings.EqualFold("instanceMetadataTags", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceMetadataTags = types.LaunchTemplateInstanceMetadataTagsState(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.LaunchTemplateInstanceMetadataOptionsState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecification(v **types.LaunchTemplateInstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateInstanceNetworkInterfaceSpecification - if *v == nil { - sv = &types.LaunchTemplateInstanceNetworkInterfaceSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associateCarrierIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AssociateCarrierIpAddress = ptr.Bool(xtv) - } - - case strings.EqualFold("associatePublicIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AssociatePublicIpAddress = ptr.Bool(xtv) - } - - case strings.EqualFold("connectionTrackingSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionTrackingSpecification(&sv.ConnectionTrackingSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("deviceIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DeviceIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("enaSrdSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateEnaSrdSpecification(&sv.EnaSrdSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdStringList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("interfaceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InterfaceType = ptr.String(xtv) - } - - case strings.EqualFold("ipv4PrefixCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv4PrefixCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv4PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv4PrefixListResponse(&sv.Ipv4Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6AddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv6AddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv6AddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIpv6AddressList(&sv.Ipv6Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6PrefixCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv6PrefixCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv6PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6PrefixListResponse(&sv.Ipv6Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetworkCardIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("primaryIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PrimaryIpv6 = ptr.Bool(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecificationList(&sv.PrivateIpAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("secondaryPrivateIpAddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SecondaryPrivateIpAddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationList(v *[]types.LaunchTemplateInstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateInstanceNetworkInterfaceSpecification - if *v == nil { - sv = make([]types.LaunchTemplateInstanceNetworkInterfaceSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateInstanceNetworkInterfaceSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationListUnwrapped(v *[]types.LaunchTemplateInstanceNetworkInterfaceSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateInstanceNetworkInterfaceSpecification - if *v == nil { - sv = make([]types.LaunchTemplateInstanceNetworkInterfaceSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateInstanceNetworkInterfaceSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplateLicenseConfiguration(v **types.LaunchTemplateLicenseConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateLicenseConfiguration - if *v == nil { - sv = &types.LaunchTemplateLicenseConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("licenseConfigurationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LicenseConfigurationArn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateLicenseList(v *[]types.LaunchTemplateLicenseConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateLicenseConfiguration - if *v == nil { - sv = make([]types.LaunchTemplateLicenseConfiguration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateLicenseConfiguration - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateLicenseConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateLicenseListUnwrapped(v *[]types.LaunchTemplateLicenseConfiguration, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateLicenseConfiguration - if *v == nil { - sv = make([]types.LaunchTemplateLicenseConfiguration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateLicenseConfiguration - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateLicenseConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplateOverrides(v **types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateOverrides - if *v == nil { - sv = &types.LaunchTemplateOverrides{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("instanceRequirements", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceRequirements(&sv.InstanceRequirements, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("priority", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Priority = ptr.Float64(f64) - } - - case strings.EqualFold("spotPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotPrice = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("weightedCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.WeightedCapacity = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateOverridesList(v *[]types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateOverrides - if *v == nil { - sv = make([]types.LaunchTemplateOverrides, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateOverrides - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateOverridesListUnwrapped(v *[]types.LaunchTemplateOverrides, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateOverrides - if *v == nil { - sv = make([]types.LaunchTemplateOverrides, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateOverrides - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateOverrides(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplatePlacement(v **types.LaunchTemplatePlacement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplatePlacement - if *v == nil { - sv = &types.LaunchTemplatePlacement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("affinity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Affinity = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("hostId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostId = ptr.String(xtv) - } - - case strings.EqualFold("hostResourceGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostResourceGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("partitionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PartitionNumber = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("spreadDomain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpreadDomain = ptr.String(xtv) - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.Tenancy(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplatePrivateDnsNameOptions(v **types.LaunchTemplatePrivateDnsNameOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplatePrivateDnsNameOptions - if *v == nil { - sv = &types.LaunchTemplatePrivateDnsNameOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enableResourceNameDnsAAAARecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableResourceNameDnsAAAARecord = ptr.Bool(xtv) - } - - case strings.EqualFold("enableResourceNameDnsARecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableResourceNameDnsARecord = ptr.Bool(xtv) - } - - case strings.EqualFold("hostnameType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostnameType = types.HostnameType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateSet(v *[]types.LaunchTemplate, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplate - if *v == nil { - sv = make([]types.LaunchTemplate, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplate - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplate(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateSetUnwrapped(v *[]types.LaunchTemplate, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplate - if *v == nil { - sv = make([]types.LaunchTemplate, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplate - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplate(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplatesMonitoring(v **types.LaunchTemplatesMonitoring, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplatesMonitoring - if *v == nil { - sv = &types.LaunchTemplatesMonitoring{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateSpotMarketOptions(v **types.LaunchTemplateSpotMarketOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateSpotMarketOptions - if *v == nil { - sv = &types.LaunchTemplateSpotMarketOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("blockDurationMinutes", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.BlockDurationMinutes = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceInterruptionBehavior = types.InstanceInterruptionBehavior(xtv) - } - - case strings.EqualFold("maxPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MaxPrice = ptr.String(xtv) - } - - case strings.EqualFold("spotInstanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotInstanceType = types.SpotInstanceType(xtv) - } - - case strings.EqualFold("validUntil", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidUntil = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateTagSpecification(v **types.LaunchTemplateTagSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateTagSpecification - if *v == nil { - sv = &types.LaunchTemplateTagSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.ResourceType(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateTagSpecificationList(v *[]types.LaunchTemplateTagSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateTagSpecification - if *v == nil { - sv = make([]types.LaunchTemplateTagSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateTagSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateTagSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateTagSpecificationListUnwrapped(v *[]types.LaunchTemplateTagSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateTagSpecification - if *v == nil { - sv = make([]types.LaunchTemplateTagSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateTagSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateTagSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLaunchTemplateVersion(v **types.LaunchTemplateVersion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LaunchTemplateVersion - if *v == nil { - sv = &types.LaunchTemplateVersion{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createdBy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreatedBy = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("defaultVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DefaultVersion = ptr.Bool(xtv) - } - - case strings.EqualFold("launchTemplateData", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseLaunchTemplateData(&sv.LaunchTemplateData, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("launchTemplateId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplateName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchTemplateName = ptr.String(xtv) - } - - case strings.EqualFold("versionDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VersionDescription = ptr.String(xtv) - } - - case strings.EqualFold("versionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VersionNumber = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateVersionSet(v *[]types.LaunchTemplateVersion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LaunchTemplateVersion - if *v == nil { - sv = make([]types.LaunchTemplateVersion, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LaunchTemplateVersion - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLaunchTemplateVersion(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLaunchTemplateVersionSetUnwrapped(v *[]types.LaunchTemplateVersion, decoder smithyxml.NodeDecoder) error { - var sv []types.LaunchTemplateVersion - if *v == nil { - sv = make([]types.LaunchTemplateVersion, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LaunchTemplateVersion - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLaunchTemplateVersion(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLicenseConfiguration(v **types.LicenseConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LicenseConfiguration - if *v == nil { - sv = &types.LicenseConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("licenseConfigurationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LicenseConfigurationArn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLicenseList(v *[]types.LicenseConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LicenseConfiguration - if *v == nil { - sv = make([]types.LicenseConfiguration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LicenseConfiguration - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLicenseConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLicenseListUnwrapped(v *[]types.LicenseConfiguration, decoder smithyxml.NodeDecoder) error { - var sv []types.LicenseConfiguration - if *v == nil { - sv = make([]types.LicenseConfiguration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LicenseConfiguration - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLicenseConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLoadBalancersConfig(v **types.LoadBalancersConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LoadBalancersConfig - if *v == nil { - sv = &types.LoadBalancersConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("classicLoadBalancersConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClassicLoadBalancersConfig(&sv.ClassicLoadBalancersConfig, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetGroupsConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTargetGroupsConfig(&sv.TargetGroupsConfig, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLoadPermission(v **types.LoadPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LoadPermission - if *v == nil { - sv = &types.LoadPermission{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("group", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Group = types.PermissionGroup(xtv) - } - - case strings.EqualFold("userId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLoadPermissionList(v *[]types.LoadPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LoadPermission - if *v == nil { - sv = make([]types.LoadPermission, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LoadPermission - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLoadPermission(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLoadPermissionListUnwrapped(v *[]types.LoadPermission, decoder smithyxml.NodeDecoder) error { - var sv []types.LoadPermission - if *v == nil { - sv = make([]types.LoadPermission, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LoadPermission - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLoadPermission(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGateway(v **types.LocalGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGateway - if *v == nil { - sv = &types.LocalGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRoute(v **types.LocalGatewayRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGatewayRoute - if *v == nil { - sv = &types.LocalGatewayRoute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipPoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoipPoolId = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("destinationPrefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationPrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableArn = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayVirtualInterfaceGroupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayVirtualInterfaceGroupId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.LocalGatewayRouteState(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.LocalGatewayRouteType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteList(v *[]types.LocalGatewayRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGatewayRoute - if *v == nil { - sv = make([]types.LocalGatewayRoute, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGatewayRoute - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteListUnwrapped(v *[]types.LocalGatewayRoute, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGatewayRoute - if *v == nil { - sv = make([]types.LocalGatewayRoute, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGatewayRoute - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewayRouteTable(v **types.LocalGatewayRouteTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGatewayRouteTable - if *v == nil { - sv = &types.LocalGatewayRouteTable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableArn = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("mode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Mode = types.LocalGatewayRouteTableMode(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("stateReason", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStateReason(&sv.StateReason, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteTableSet(v *[]types.LocalGatewayRouteTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGatewayRouteTable - if *v == nil { - sv = make([]types.LocalGatewayRouteTable, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGatewayRouteTable - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTable(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteTableSetUnwrapped(v *[]types.LocalGatewayRouteTable, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGatewayRouteTable - if *v == nil { - sv = make([]types.LocalGatewayRouteTable, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGatewayRouteTable - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTable(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(v **types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - if *v == nil { - sv = &types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableArn = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayVirtualInterfaceGroupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayVirtualInterfaceGroupId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSet(v *[]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - if *v == nil { - sv = make([]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSetUnwrapped(v *[]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - if *v == nil { - sv = make([]types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGatewayRouteTableVirtualInterfaceGroupAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(v **types.LocalGatewayRouteTableVpcAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGatewayRouteTableVpcAssociation - if *v == nil { - sv = &types.LocalGatewayRouteTableVpcAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableArn = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableVpcAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableVpcAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSet(v *[]types.LocalGatewayRouteTableVpcAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGatewayRouteTableVpcAssociation - if *v == nil { - sv = make([]types.LocalGatewayRouteTableVpcAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGatewayRouteTableVpcAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSetUnwrapped(v *[]types.LocalGatewayRouteTableVpcAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGatewayRouteTableVpcAssociation - if *v == nil { - sv = make([]types.LocalGatewayRouteTableVpcAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGatewayRouteTableVpcAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewaySet(v *[]types.LocalGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGateway - if *v == nil { - sv = make([]types.LocalGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewaySetUnwrapped(v *[]types.LocalGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGateway - if *v == nil { - sv = make([]types.LocalGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterface(v **types.LocalGatewayVirtualInterface, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGatewayVirtualInterface - if *v == nil { - sv = &types.LocalGatewayVirtualInterface{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalAddress = ptr.String(xtv) - } - - case strings.EqualFold("localBgpAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LocalBgpAsn = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayVirtualInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayVirtualInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("peerAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeerAddress = ptr.String(xtv) - } - - case strings.EqualFold("peerBgpAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PeerBgpAsn = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vlan", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Vlan = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroup(v **types.LocalGatewayVirtualInterfaceGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocalGatewayVirtualInterfaceGroup - if *v == nil { - sv = &types.LocalGatewayVirtualInterfaceGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayVirtualInterfaceGroupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayVirtualInterfaceGroupId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayVirtualInterfaceIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceIdSet(&sv.LocalGatewayVirtualInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSet(v *[]types.LocalGatewayVirtualInterfaceGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGatewayVirtualInterfaceGroup - if *v == nil { - sv = make([]types.LocalGatewayVirtualInterfaceGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGatewayVirtualInterfaceGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSetUnwrapped(v *[]types.LocalGatewayVirtualInterfaceGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGatewayVirtualInterfaceGroup - if *v == nil { - sv = make([]types.LocalGatewayVirtualInterfaceGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGatewayVirtualInterfaceGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSet(v *[]types.LocalGatewayVirtualInterface, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalGatewayVirtualInterface - if *v == nil { - sv = make([]types.LocalGatewayVirtualInterface, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalGatewayVirtualInterface - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterface(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSetUnwrapped(v *[]types.LocalGatewayVirtualInterface, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalGatewayVirtualInterface - if *v == nil { - sv = make([]types.LocalGatewayVirtualInterface, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalGatewayVirtualInterface - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterface(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLocalStorageTypeSet(v *[]types.LocalStorageType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocalStorageType - if *v == nil { - sv = make([]types.LocalStorageType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LocalStorageType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.LocalStorageType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLocalStorageTypeSetUnwrapped(v *[]types.LocalStorageType, decoder smithyxml.NodeDecoder) error { - var sv []types.LocalStorageType - if *v == nil { - sv = make([]types.LocalStorageType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocalStorageType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.LocalStorageType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentLockedSnapshotsInfo(v **types.LockedSnapshotsInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LockedSnapshotsInfo - if *v == nil { - sv = &types.LockedSnapshotsInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coolOffPeriod", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.CoolOffPeriod = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("coolOffPeriodExpiresOn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CoolOffPeriodExpiresOn = ptr.Time(t) - } - - case strings.EqualFold("lockCreatedOn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LockCreatedOn = ptr.Time(t) - } - - case strings.EqualFold("lockDuration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LockDuration = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("lockDurationStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LockDurationStartTime = ptr.Time(t) - } - - case strings.EqualFold("lockExpiresOn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LockExpiresOn = ptr.Time(t) - } - - case strings.EqualFold("lockState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LockState = types.LockState(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLockedSnapshotsInfoList(v *[]types.LockedSnapshotsInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LockedSnapshotsInfo - if *v == nil { - sv = make([]types.LockedSnapshotsInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.LockedSnapshotsInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentLockedSnapshotsInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentLockedSnapshotsInfoListUnwrapped(v *[]types.LockedSnapshotsInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.LockedSnapshotsInfo - if *v == nil { - sv = make([]types.LockedSnapshotsInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LockedSnapshotsInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentLockedSnapshotsInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentMaintenanceDetails(v **types.MaintenanceDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MaintenanceDetails - if *v == nil { - sv = &types.MaintenanceDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("lastMaintenanceApplied", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastMaintenanceApplied = ptr.Time(t) - } - - case strings.EqualFold("maintenanceAutoAppliedAfter", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.MaintenanceAutoAppliedAfter = ptr.Time(t) - } - - case strings.EqualFold("pendingMaintenance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PendingMaintenance = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentManagedPrefixList(v **types.ManagedPrefixList, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ManagedPrefixList - if *v == nil { - sv = &types.ManagedPrefixList{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressFamily = ptr.String(xtv) - } - - case strings.EqualFold("maxEntries", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxEntries = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("prefixListArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListArn = ptr.String(xtv) - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("prefixListName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListName = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.PrefixListState(xtv) - } - - case strings.EqualFold("stateMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("version", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Version = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentManagedPrefixListSet(v *[]types.ManagedPrefixList, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ManagedPrefixList - if *v == nil { - sv = make([]types.ManagedPrefixList, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ManagedPrefixList - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentManagedPrefixList(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentManagedPrefixListSetUnwrapped(v *[]types.ManagedPrefixList, decoder smithyxml.NodeDecoder) error { - var sv []types.ManagedPrefixList - if *v == nil { - sv = make([]types.ManagedPrefixList, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ManagedPrefixList - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentManagedPrefixList(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentMemoryGiBPerVCpu(v **types.MemoryGiBPerVCpu, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MemoryGiBPerVCpu - if *v == nil { - sv = &types.MemoryGiBPerVCpu{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Max = ptr.Float64(f64) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Min = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMemoryInfo(v **types.MemoryInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MemoryInfo - if *v == nil { - sv = &types.MemoryInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("sizeInMiB", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SizeInMiB = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMemoryMiB(v **types.MemoryMiB, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MemoryMiB - if *v == nil { - sv = &types.MemoryMiB{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Max = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Min = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMetricPoint(v **types.MetricPoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MetricPoint - if *v == nil { - sv = &types.MetricPoint{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("endDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndDate = ptr.Time(t) - } - - case strings.EqualFold("startDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartDate = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Value = ptr.Float32(float32(f64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMetricPoints(v *[]types.MetricPoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.MetricPoint - if *v == nil { - sv = make([]types.MetricPoint, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.MetricPoint - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentMetricPoint(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMetricPointsUnwrapped(v *[]types.MetricPoint, decoder smithyxml.NodeDecoder) error { - var sv []types.MetricPoint - if *v == nil { - sv = make([]types.MetricPoint, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.MetricPoint - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentMetricPoint(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentMonitoring(v **types.Monitoring, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Monitoring - if *v == nil { - sv = &types.Monitoring{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.MonitoringState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMovingAddressStatus(v **types.MovingAddressStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MovingAddressStatus - if *v == nil { - sv = &types.MovingAddressStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("moveStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MoveStatus = types.MoveStatus(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMovingAddressStatusSet(v *[]types.MovingAddressStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.MovingAddressStatus - if *v == nil { - sv = make([]types.MovingAddressStatus, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.MovingAddressStatus - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentMovingAddressStatus(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentMovingAddressStatusSetUnwrapped(v *[]types.MovingAddressStatus, decoder smithyxml.NodeDecoder) error { - var sv []types.MovingAddressStatus - if *v == nil { - sv = make([]types.MovingAddressStatus, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.MovingAddressStatus - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentMovingAddressStatus(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNatGateway(v **types.NatGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NatGateway - if *v == nil { - sv = &types.NatGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("connectivityType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectivityType = types.ConnectivityType(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("deleteTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.DeleteTime = ptr.Time(t) - } - - case strings.EqualFold("failureCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FailureCode = ptr.String(xtv) - } - - case strings.EqualFold("failureMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FailureMessage = ptr.String(xtv) - } - - case strings.EqualFold("natGatewayAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayAddressList(&sv.NatGatewayAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("provisionedBandwidth", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProvisionedBandwidth(&sv.ProvisionedBandwidth, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.NatGatewayState(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNatGatewayAddress(v **types.NatGatewayAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NatGatewayAddress - if *v == nil { - sv = &types.NatGatewayAddress{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("failureMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FailureMessage = ptr.String(xtv) - } - - case strings.EqualFold("isPrimary", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsPrimary = ptr.Bool(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("privateIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIp = ptr.String(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.NatGatewayAddressStatus(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNatGatewayAddressList(v *[]types.NatGatewayAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NatGatewayAddress - if *v == nil { - sv = make([]types.NatGatewayAddress, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NatGatewayAddress - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNatGatewayAddress(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNatGatewayAddressListUnwrapped(v *[]types.NatGatewayAddress, decoder smithyxml.NodeDecoder) error { - var sv []types.NatGatewayAddress - if *v == nil { - sv = make([]types.NatGatewayAddress, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NatGatewayAddress - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNatGatewayAddress(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNatGatewayList(v *[]types.NatGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NatGateway - if *v == nil { - sv = make([]types.NatGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NatGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNatGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNatGatewayListUnwrapped(v *[]types.NatGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.NatGateway - if *v == nil { - sv = make([]types.NatGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NatGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNatGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkAcl(v **types.NetworkAcl, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkAcl - if *v == nil { - sv = &types.NetworkAcl{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkAclAssociationList(&sv.Associations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("entrySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkAclEntryList(&sv.Entries, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("default", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsDefault = ptr.Bool(xtv) - } - - case strings.EqualFold("networkAclId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkAclId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkAclAssociation(v **types.NetworkAclAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkAclAssociation - if *v == nil { - sv = &types.NetworkAclAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkAclAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkAclAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("networkAclId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkAclId = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkAclAssociationList(v *[]types.NetworkAclAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkAclAssociation - if *v == nil { - sv = make([]types.NetworkAclAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkAclAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkAclAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkAclAssociationListUnwrapped(v *[]types.NetworkAclAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkAclAssociation - if *v == nil { - sv = make([]types.NetworkAclAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkAclAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkAclAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkAclEntry(v **types.NetworkAclEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkAclEntry - if *v == nil { - sv = &types.NetworkAclEntry{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("egress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Egress = ptr.Bool(xtv) - } - - case strings.EqualFold("icmpTypeCode", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIcmpTypeCode(&sv.IcmpTypeCode, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6CidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("portRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPortRange(&sv.PortRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("ruleAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleAction = types.RuleAction(xtv) - } - - case strings.EqualFold("ruleNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RuleNumber = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkAclEntryList(v *[]types.NetworkAclEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkAclEntry - if *v == nil { - sv = make([]types.NetworkAclEntry, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkAclEntry - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkAclEntry(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkAclEntryListUnwrapped(v *[]types.NetworkAclEntry, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkAclEntry - if *v == nil { - sv = make([]types.NetworkAclEntry, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkAclEntry - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkAclEntry(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkAclList(v *[]types.NetworkAcl, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkAcl - if *v == nil { - sv = make([]types.NetworkAcl, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkAcl - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkAcl(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkAclListUnwrapped(v *[]types.NetworkAcl, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkAcl - if *v == nil { - sv = make([]types.NetworkAcl, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkAcl - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkAcl(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkBandwidthGbps(v **types.NetworkBandwidthGbps, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkBandwidthGbps - if *v == nil { - sv = &types.NetworkBandwidthGbps{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Max = ptr.Float64(f64) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Min = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkCardInfo(v **types.NetworkCardInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkCardInfo - if *v == nil { - sv = &types.NetworkCardInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("baselineBandwidthInGbps", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.BaselineBandwidthInGbps = ptr.Float64(f64) - } - - case strings.EqualFold("maximumNetworkInterfaces", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaximumNetworkInterfaces = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("networkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetworkCardIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("networkPerformance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkPerformance = ptr.String(xtv) - } - - case strings.EqualFold("peakBandwidthInGbps", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.PeakBandwidthInGbps = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkCardInfoList(v *[]types.NetworkCardInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkCardInfo - if *v == nil { - sv = make([]types.NetworkCardInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkCardInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkCardInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkCardInfoListUnwrapped(v *[]types.NetworkCardInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkCardInfo - if *v == nil { - sv = make([]types.NetworkCardInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkCardInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkCardInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInfo(v **types.NetworkInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInfo - if *v == nil { - sv = &types.NetworkInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("defaultNetworkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DefaultNetworkCardIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("efaInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEfaInfo(&sv.EfaInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("efaSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected EfaSupportedFlag to be of type *bool, got %T instead", val) - } - sv.EfaSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("enaSrdSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected EnaSrdSupported to be of type *bool, got %T instead", val) - } - sv.EnaSrdSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("enaSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EnaSupport = types.EnaSupport(xtv) - } - - case strings.EqualFold("encryptionInTransitSupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected EncryptionInTransitSupported to be of type *bool, got %T instead", val) - } - sv.EncryptionInTransitSupported = ptr.Bool(xtv) - } - - case strings.EqualFold("ipv4AddressesPerInterface", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv4AddressesPerInterface = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv6AddressesPerInterface", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Ipv6AddressesPerInterface = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv6Supported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Ipv6Flag to be of type *bool, got %T instead", val) - } - sv.Ipv6Supported = ptr.Bool(xtv) - } - - case strings.EqualFold("maximumNetworkCards", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaximumNetworkCards = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("maximumNetworkInterfaces", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaximumNetworkInterfaces = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("networkCards", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkCardInfoList(&sv.NetworkCards, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkPerformance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkPerformance = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAccessScope(v **types.NetworkInsightsAccessScope, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInsightsAccessScope - if *v == nil { - sv = &types.NetworkInsightsAccessScope{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createdDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(t) - } - - case strings.EqualFold("networkInsightsAccessScopeArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeArn = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("updatedDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UpdatedDate = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysis(v **types.NetworkInsightsAccessScopeAnalysis, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInsightsAccessScopeAnalysis - if *v == nil { - sv = &types.NetworkInsightsAccessScopeAnalysis{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("analyzedEniCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AnalyzedEniCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("endDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndDate = ptr.Time(t) - } - - case strings.EqualFold("findingsFound", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FindingsFound = types.FindingsFound(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeAnalysisArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeAnalysisArn = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeAnalysisId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeAnalysisId = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeId = ptr.String(xtv) - } - - case strings.EqualFold("startDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartDate = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.AnalysisStatus(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("warningMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.WarningMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysisList(v *[]types.NetworkInsightsAccessScopeAnalysis, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInsightsAccessScopeAnalysis - if *v == nil { - sv = make([]types.NetworkInsightsAccessScopeAnalysis, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInsightsAccessScopeAnalysis - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysis(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysisListUnwrapped(v *[]types.NetworkInsightsAccessScopeAnalysis, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInsightsAccessScopeAnalysis - if *v == nil { - sv = make([]types.NetworkInsightsAccessScopeAnalysis, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInsightsAccessScopeAnalysis - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysis(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInsightsAccessScopeContent(v **types.NetworkInsightsAccessScopeContent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInsightsAccessScopeContent - if *v == nil { - sv = &types.NetworkInsightsAccessScopeContent{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("excludePathSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAccessScopePathList(&sv.ExcludePaths, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("matchPathSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAccessScopePathList(&sv.MatchPaths, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInsightsAccessScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAccessScopeList(v *[]types.NetworkInsightsAccessScope, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInsightsAccessScope - if *v == nil { - sv = make([]types.NetworkInsightsAccessScope, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInsightsAccessScope - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScope(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAccessScopeListUnwrapped(v *[]types.NetworkInsightsAccessScope, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInsightsAccessScope - if *v == nil { - sv = make([]types.NetworkInsightsAccessScope, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInsightsAccessScope - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScope(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInsightsAnalysis(v **types.NetworkInsightsAnalysis, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInsightsAnalysis - if *v == nil { - sv = &types.NetworkInsightsAnalysis{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("additionalAccountSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.AdditionalAccounts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("alternatePathHintSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAlternatePathHintList(&sv.AlternatePathHints, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("explanationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExplanationList(&sv.Explanations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("filterInArnSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentArnList(&sv.FilterInArns, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("forwardPathComponentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathComponentList(&sv.ForwardPathComponents, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInsightsAnalysisArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAnalysisArn = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsAnalysisId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAnalysisId = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsPathId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsPathId = ptr.String(xtv) - } - - case strings.EqualFold("networkPathFound", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.NetworkPathFound = ptr.Bool(xtv) - } - - case strings.EqualFold("returnPathComponentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathComponentList(&sv.ReturnPathComponents, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("startDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartDate = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.AnalysisStatus(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("suggestedAccountSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SuggestedAccounts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("warningMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.WarningMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAnalysisList(v *[]types.NetworkInsightsAnalysis, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInsightsAnalysis - if *v == nil { - sv = make([]types.NetworkInsightsAnalysis, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInsightsAnalysis - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysis(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsAnalysisListUnwrapped(v *[]types.NetworkInsightsAnalysis, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInsightsAnalysis - if *v == nil { - sv = make([]types.NetworkInsightsAnalysis, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInsightsAnalysis - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysis(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInsightsPath(v **types.NetworkInsightsPath, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInsightsPath - if *v == nil { - sv = &types.NetworkInsightsPath{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createdDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(t) - } - - case strings.EqualFold("destination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Destination = ptr.String(xtv) - } - - case strings.EqualFold("destinationArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationArn = ptr.String(xtv) - } - - case strings.EqualFold("destinationIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationIp = ptr.String(xtv) - } - - case strings.EqualFold("destinationPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DestinationPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("filterAtDestination", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathFilter(&sv.FilterAtDestination, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("filterAtSource", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPathFilter(&sv.FilterAtSource, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInsightsPathArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsPathArn = ptr.String(xtv) - } - - case strings.EqualFold("networkInsightsPathId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsPathId = ptr.String(xtv) - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = types.Protocol(xtv) - } - - case strings.EqualFold("source", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Source = ptr.String(xtv) - } - - case strings.EqualFold("sourceArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceArn = ptr.String(xtv) - } - - case strings.EqualFold("sourceIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceIp = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsPathList(v *[]types.NetworkInsightsPath, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInsightsPath - if *v == nil { - sv = make([]types.NetworkInsightsPath, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInsightsPath - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInsightsPath(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInsightsPathListUnwrapped(v *[]types.NetworkInsightsPath, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInsightsPath - if *v == nil { - sv = make([]types.NetworkInsightsPath, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInsightsPath - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInsightsPath(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInterface(v **types.NetworkInterface, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterface - if *v == nil { - sv = &types.NetworkInterface{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("attachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("connectionTrackingConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionTrackingConfiguration(&sv.ConnectionTrackingConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("denyAllIgwTraffic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DenyAllIgwTraffic = ptr.Bool(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("interfaceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InterfaceType = types.NetworkInterfaceType(xtv) - } - - case strings.EqualFold("ipv4PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv4PrefixesList(&sv.Ipv4Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6Address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Address = ptr.String(xtv) - } - - case strings.EqualFold("ipv6AddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesList(&sv.Ipv6Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6Native", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Ipv6Native = ptr.Bool(xtv) - } - - case strings.EqualFold("ipv6PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6PrefixesList(&sv.Ipv6Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("macAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MacAddress = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressList(&sv.PrivateIpAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("requesterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RequesterId = ptr.String(xtv) - } - - case strings.EqualFold("requesterManaged", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.RequesterManaged = ptr.Bool(xtv) - } - - case strings.EqualFold("sourceDestCheck", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SourceDestCheck = ptr.Bool(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.NetworkInterfaceStatus(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.TagSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceAssociation(v **types.NetworkInterfaceAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfaceAssociation - if *v == nil { - sv = &types.NetworkInterfaceAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("carrierIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierIp = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIp = ptr.String(xtv) - } - - case strings.EqualFold("ipOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("publicDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicDnsName = ptr.String(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceAttachment(v **types.NetworkInterfaceAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfaceAttachment - if *v == nil { - sv = &types.NetworkInterfaceAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("attachTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AttachTime = ptr.Time(t) - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("deviceIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DeviceIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("enaSrdSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttachmentEnaSrdSpecification(&sv.EnaSrdSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("networkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetworkCardIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.AttachmentStatus(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceCount(v **types.NetworkInterfaceCount, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfaceCount - if *v == nil { - sv = &types.NetworkInterfaceCount{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Max = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Min = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInterfaceIpv6Address(v **types.NetworkInterfaceIpv6Address, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfaceIpv6Address - if *v == nil { - sv = &types.NetworkInterfaceIpv6Address{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6Address", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Address = ptr.String(xtv) - } - - case strings.EqualFold("isPrimaryIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsPrimaryIpv6 = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesList(v *[]types.NetworkInterfaceIpv6Address, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInterfaceIpv6Address - if *v == nil { - sv = make([]types.NetworkInterfaceIpv6Address, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInterfaceIpv6Address - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6Address(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceIpv6AddressesListUnwrapped(v *[]types.NetworkInterfaceIpv6Address, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInterfaceIpv6Address - if *v == nil { - sv = make([]types.NetworkInterfaceIpv6Address, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInterfaceIpv6Address - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInterfaceIpv6Address(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInterfaceList(v *[]types.NetworkInterface, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInterface - if *v == nil { - sv = make([]types.NetworkInterface, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInterface - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInterface(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfaceListUnwrapped(v *[]types.NetworkInterface, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInterface - if *v == nil { - sv = make([]types.NetworkInterface, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInterface - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInterface(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInterfacePermission(v **types.NetworkInterfacePermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfacePermission - if *v == nil { - sv = &types.NetworkInterfacePermission{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("awsAccountId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AwsAccountId = ptr.String(xtv) - } - - case strings.EqualFold("awsService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AwsService = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfacePermissionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfacePermissionId = ptr.String(xtv) - } - - case strings.EqualFold("permission", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Permission = types.InterfacePermissionType(xtv) - } - - case strings.EqualFold("permissionState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfacePermissionState(&sv.PermissionState, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfacePermissionList(v *[]types.NetworkInterfacePermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInterfacePermission - if *v == nil { - sv = make([]types.NetworkInterfacePermission, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInterfacePermission - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInterfacePermission(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfacePermissionListUnwrapped(v *[]types.NetworkInterfacePermission, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInterfacePermission - if *v == nil { - sv = make([]types.NetworkInterfacePermission, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInterfacePermission - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInterfacePermission(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkInterfacePermissionState(v **types.NetworkInterfacePermissionState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfacePermissionState - if *v == nil { - sv = &types.NetworkInterfacePermissionState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.NetworkInterfacePermissionStateCode(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddress(v **types.NetworkInterfacePrivateIpAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NetworkInterfacePrivateIpAddress - if *v == nil { - sv = &types.NetworkInterfacePrivateIpAddress{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("primary", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Primary = ptr.Bool(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressList(v *[]types.NetworkInterfacePrivateIpAddress, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.NetworkInterfacePrivateIpAddress - if *v == nil { - sv = make([]types.NetworkInterfacePrivateIpAddress, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.NetworkInterfacePrivateIpAddress - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddress(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddressListUnwrapped(v *[]types.NetworkInterfacePrivateIpAddress, decoder smithyxml.NodeDecoder) error { - var sv []types.NetworkInterfacePrivateIpAddress - if *v == nil { - sv = make([]types.NetworkInterfacePrivateIpAddress, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.NetworkInterfacePrivateIpAddress - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentNetworkInterfacePrivateIpAddress(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNetworkNodesList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNetworkNodesListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentNitroTpmInfo(v **types.NitroTpmInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NitroTpmInfo - if *v == nil { - sv = &types.NitroTpmInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("supportedVersions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNitroTpmSupportedVersionsList(&sv.SupportedVersions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNitroTpmSupportedVersionsList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentNitroTpmSupportedVersionsListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentOccurrenceDaySet(v *[]int32, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col int32 - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - col = int32(i64) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentOccurrenceDaySetUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - switch { - default: - var mv int32 - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - mv = int32(i64) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentOidcOptions(v **types.OidcOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.OidcOptions - if *v == nil { - sv = &types.OidcOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("authorizationEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AuthorizationEndpoint = ptr.String(xtv) - } - - case strings.EqualFold("clientId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientId = ptr.String(xtv) - } - - case strings.EqualFold("clientSecret", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientSecret = ptr.String(xtv) - } - - case strings.EqualFold("issuer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Issuer = ptr.String(xtv) - } - - case strings.EqualFold("scope", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Scope = ptr.String(xtv) - } - - case strings.EqualFold("tokenEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TokenEndpoint = ptr.String(xtv) - } - - case strings.EqualFold("userInfoEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserInfoEndpoint = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentOnDemandOptions(v **types.OnDemandOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.OnDemandOptions - if *v == nil { - sv = &types.OnDemandOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationStrategy = types.FleetOnDemandAllocationStrategy(xtv) - } - - case strings.EqualFold("capacityReservationOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationOptions(&sv.CapacityReservationOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxTotalPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MaxTotalPrice = ptr.String(xtv) - } - - case strings.EqualFold("minTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MinTargetCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("singleAvailabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SingleAvailabilityZone = ptr.Bool(xtv) - } - - case strings.EqualFold("singleInstanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SingleInstanceType = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPacketHeaderStatement(v **types.PacketHeaderStatement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PacketHeaderStatement - if *v == nil { - sv = &types.PacketHeaderStatement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.DestinationAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationPortSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.DestinationPorts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationPrefixListSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.DestinationPrefixLists, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProtocolList(&sv.Protocols, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SourceAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourcePortSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SourcePorts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourcePrefixListSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SourcePrefixLists, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPathComponent(v **types.PathComponent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PathComponent - if *v == nil { - sv = &types.PathComponent{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("aclRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisAclRule(&sv.AclRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("additionalDetailSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAdditionalDetailList(&sv.AdditionalDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("attachedTo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.AttachedTo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("component", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Component, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("destinationVpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.DestinationVpc, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("elasticLoadBalancerListener", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.ElasticLoadBalancerListener, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("explanationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExplanationList(&sv.Explanations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("firewallStatefulRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFirewallStatefulRule(&sv.FirewallStatefulRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("firewallStatelessRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFirewallStatelessRule(&sv.FirewallStatelessRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("inboundHeader", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisPacketHeader(&sv.InboundHeader, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("outboundHeader", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisPacketHeader(&sv.OutboundHeader, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("routeTableRoute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisRouteTableRoute(&sv.RouteTableRoute, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisSecurityGroupRule(&sv.SecurityGroupRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sequenceNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SequenceNumber = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("serviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceName = ptr.String(xtv) - } - - case strings.EqualFold("sourceVpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SourceVpc, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("subnet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Subnet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.TransitGateway, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayRouteTableRoute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableRoute(&sv.TransitGatewayRouteTableRoute, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.Vpc, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPathComponentList(v *[]types.PathComponent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PathComponent - if *v == nil { - sv = make([]types.PathComponent, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PathComponent - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPathComponent(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPathComponentListUnwrapped(v *[]types.PathComponent, decoder smithyxml.NodeDecoder) error { - var sv []types.PathComponent - if *v == nil { - sv = make([]types.PathComponent, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PathComponent - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPathComponent(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPathFilter(v **types.PathFilter, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PathFilter - if *v == nil { - sv = &types.PathFilter{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationAddress = ptr.String(xtv) - } - - case strings.EqualFold("destinationPortRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFilterPortRange(&sv.DestinationPortRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceAddress = ptr.String(xtv) - } - - case strings.EqualFold("sourcePortRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFilterPortRange(&sv.SourcePortRange, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPathStatement(v **types.PathStatement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PathStatement - if *v == nil { - sv = &types.PathStatement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("packetHeaderStatement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPacketHeaderStatement(&sv.PacketHeaderStatement, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("resourceStatement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResourceStatement(&sv.ResourceStatement, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPciId(v **types.PciId, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PciId - if *v == nil { - sv = &types.PciId{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DeviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceId = ptr.String(xtv) - } - - case strings.EqualFold("SubsystemId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubsystemId = ptr.String(xtv) - } - - case strings.EqualFold("SubsystemVendorId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubsystemVendorId = ptr.String(xtv) - } - - case strings.EqualFold("VendorId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VendorId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPeeringAttachmentStatus(v **types.PeeringAttachmentStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PeeringAttachmentStatus - if *v == nil { - sv = &types.PeeringAttachmentStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPeeringConnectionOptions(v **types.PeeringConnectionOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PeeringConnectionOptions - if *v == nil { - sv = &types.PeeringConnectionOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allowDnsResolutionFromRemoteVpc", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AllowDnsResolutionFromRemoteVpc = ptr.Bool(xtv) - } - - case strings.EqualFold("allowEgressFromLocalClassicLinkToRemoteVpc", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AllowEgressFromLocalClassicLinkToRemoteVpc = ptr.Bool(xtv) - } - - case strings.EqualFold("allowEgressFromLocalVpcToRemoteClassicLink", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AllowEgressFromLocalVpcToRemoteClassicLink = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPeeringTgwInfo(v **types.PeeringTgwInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PeeringTgwInfo - if *v == nil { - sv = &types.PeeringTgwInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coreNetworkId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoreNetworkId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("region", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Region = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase1DHGroupNumbersList(v *[]types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Phase1DHGroupNumbersListValue - if *v == nil { - sv = make([]types.Phase1DHGroupNumbersListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Phase1DHGroupNumbersListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPhase1DHGroupNumbersListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase1DHGroupNumbersListUnwrapped(v *[]types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.Phase1DHGroupNumbersListValue - if *v == nil { - sv = make([]types.Phase1DHGroupNumbersListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Phase1DHGroupNumbersListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPhase1DHGroupNumbersListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPhase1DHGroupNumbersListValue(v **types.Phase1DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Phase1DHGroupNumbersListValue - if *v == nil { - sv = &types.Phase1DHGroupNumbersListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Value = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsList(v *[]types.Phase1EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Phase1EncryptionAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase1EncryptionAlgorithmsListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Phase1EncryptionAlgorithmsListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListUnwrapped(v *[]types.Phase1EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.Phase1EncryptionAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase1EncryptionAlgorithmsListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Phase1EncryptionAlgorithmsListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsListValue(v **types.Phase1EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Phase1EncryptionAlgorithmsListValue - if *v == nil { - sv = &types.Phase1EncryptionAlgorithmsListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsList(v *[]types.Phase1IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Phase1IntegrityAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase1IntegrityAlgorithmsListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Phase1IntegrityAlgorithmsListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListUnwrapped(v *[]types.Phase1IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.Phase1IntegrityAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase1IntegrityAlgorithmsListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Phase1IntegrityAlgorithmsListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsListValue(v **types.Phase1IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Phase1IntegrityAlgorithmsListValue - if *v == nil { - sv = &types.Phase1IntegrityAlgorithmsListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase2DHGroupNumbersList(v *[]types.Phase2DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Phase2DHGroupNumbersListValue - if *v == nil { - sv = make([]types.Phase2DHGroupNumbersListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Phase2DHGroupNumbersListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPhase2DHGroupNumbersListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase2DHGroupNumbersListUnwrapped(v *[]types.Phase2DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.Phase2DHGroupNumbersListValue - if *v == nil { - sv = make([]types.Phase2DHGroupNumbersListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Phase2DHGroupNumbersListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPhase2DHGroupNumbersListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPhase2DHGroupNumbersListValue(v **types.Phase2DHGroupNumbersListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Phase2DHGroupNumbersListValue - if *v == nil { - sv = &types.Phase2DHGroupNumbersListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Value = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsList(v *[]types.Phase2EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Phase2EncryptionAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase2EncryptionAlgorithmsListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Phase2EncryptionAlgorithmsListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListUnwrapped(v *[]types.Phase2EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.Phase2EncryptionAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase2EncryptionAlgorithmsListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Phase2EncryptionAlgorithmsListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsListValue(v **types.Phase2EncryptionAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Phase2EncryptionAlgorithmsListValue - if *v == nil { - sv = &types.Phase2EncryptionAlgorithmsListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsList(v *[]types.Phase2IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Phase2IntegrityAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase2IntegrityAlgorithmsListValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Phase2IntegrityAlgorithmsListValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListUnwrapped(v *[]types.Phase2IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - var sv []types.Phase2IntegrityAlgorithmsListValue - if *v == nil { - sv = make([]types.Phase2IntegrityAlgorithmsListValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Phase2IntegrityAlgorithmsListValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsListValue(v **types.Phase2IntegrityAlgorithmsListValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Phase2IntegrityAlgorithmsListValue - if *v == nil { - sv = &types.Phase2IntegrityAlgorithmsListValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPlacement(v **types.Placement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Placement - if *v == nil { - sv = &types.Placement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("affinity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Affinity = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("hostId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostId = ptr.String(xtv) - } - - case strings.EqualFold("hostResourceGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostResourceGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("partitionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PartitionNumber = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("spreadDomain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpreadDomain = ptr.String(xtv) - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.Tenancy(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPlacementGroup(v **types.PlacementGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PlacementGroup - if *v == nil { - sv = &types.PlacementGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupArn = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("partitionCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PartitionCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("spreadLevel", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpreadLevel = types.SpreadLevel(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.PlacementGroupState(xtv) - } - - case strings.EqualFold("strategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Strategy = types.PlacementStrategy(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPlacementGroupInfo(v **types.PlacementGroupInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PlacementGroupInfo - if *v == nil { - sv = &types.PlacementGroupInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("supportedStrategies", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacementGroupStrategyList(&sv.SupportedStrategies, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPlacementGroupList(v *[]types.PlacementGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PlacementGroup - if *v == nil { - sv = make([]types.PlacementGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PlacementGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPlacementGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPlacementGroupListUnwrapped(v *[]types.PlacementGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.PlacementGroup - if *v == nil { - sv = make([]types.PlacementGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PlacementGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPlacementGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPlacementGroupStrategyList(v *[]types.PlacementGroupStrategy, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PlacementGroupStrategy - if *v == nil { - sv = make([]types.PlacementGroupStrategy, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PlacementGroupStrategy - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.PlacementGroupStrategy(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPlacementGroupStrategyListUnwrapped(v *[]types.PlacementGroupStrategy, decoder smithyxml.NodeDecoder) error { - var sv []types.PlacementGroupStrategy - if *v == nil { - sv = make([]types.PlacementGroupStrategy, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PlacementGroupStrategy - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.PlacementGroupStrategy(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPlacementResponse(v **types.PlacementResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PlacementResponse - if *v == nil { - sv = &types.PlacementResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPoolCidrBlock(v **types.PoolCidrBlock, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PoolCidrBlock - if *v == nil { - sv = &types.PoolCidrBlock{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("poolCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPoolCidrBlocksSet(v *[]types.PoolCidrBlock, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PoolCidrBlock - if *v == nil { - sv = make([]types.PoolCidrBlock, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PoolCidrBlock - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPoolCidrBlock(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPoolCidrBlocksSetUnwrapped(v *[]types.PoolCidrBlock, decoder smithyxml.NodeDecoder) error { - var sv []types.PoolCidrBlock - if *v == nil { - sv = make([]types.PoolCidrBlock, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PoolCidrBlock - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPoolCidrBlock(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPortRange(v **types.PortRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PortRange - if *v == nil { - sv = &types.PortRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("from", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.From = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("to", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.To = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPortRangeList(v *[]types.PortRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PortRange - if *v == nil { - sv = make([]types.PortRange, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PortRange - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPortRange(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPortRangeListUnwrapped(v *[]types.PortRange, decoder smithyxml.NodeDecoder) error { - var sv []types.PortRange - if *v == nil { - sv = make([]types.PortRange, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PortRange - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPortRange(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrefixList(v **types.PrefixList, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrefixList - if *v == nil { - sv = &types.PrefixList{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Cidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("prefixListName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListAssociation(v **types.PrefixListAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrefixListAssociation - if *v == nil { - sv = &types.PrefixListAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwner = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListAssociationSet(v *[]types.PrefixListAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrefixListAssociation - if *v == nil { - sv = make([]types.PrefixListAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrefixListAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrefixListAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListAssociationSetUnwrapped(v *[]types.PrefixListAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.PrefixListAssociation - if *v == nil { - sv = make([]types.PrefixListAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrefixListAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrefixListAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrefixListEntry(v **types.PrefixListEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrefixListEntry - if *v == nil { - sv = &types.PrefixListEntry{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListEntrySet(v *[]types.PrefixListEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrefixListEntry - if *v == nil { - sv = make([]types.PrefixListEntry, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrefixListEntry - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrefixListEntry(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListEntrySetUnwrapped(v *[]types.PrefixListEntry, decoder smithyxml.NodeDecoder) error { - var sv []types.PrefixListEntry - if *v == nil { - sv = make([]types.PrefixListEntry, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrefixListEntry - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrefixListEntry(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrefixListId(v **types.PrefixListId, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrefixListId - if *v == nil { - sv = &types.PrefixListId{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListIdList(v *[]types.PrefixListId, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrefixListId - if *v == nil { - sv = make([]types.PrefixListId, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrefixListId - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrefixListId(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListIdListUnwrapped(v *[]types.PrefixListId, decoder smithyxml.NodeDecoder) error { - var sv []types.PrefixListId - if *v == nil { - sv = make([]types.PrefixListId, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrefixListId - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrefixListId(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrefixListIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrefixListSet(v *[]types.PrefixList, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrefixList - if *v == nil { - sv = make([]types.PrefixList, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrefixList - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrefixList(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrefixListSetUnwrapped(v *[]types.PrefixList, decoder smithyxml.NodeDecoder) error { - var sv []types.PrefixList - if *v == nil { - sv = make([]types.PrefixList, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrefixList - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrefixList(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPriceSchedule(v **types.PriceSchedule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PriceSchedule - if *v == nil { - sv = &types.PriceSchedule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("active", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Active = ptr.Bool(xtv) - } - - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("price", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Price = ptr.Float64(f64) - } - - case strings.EqualFold("term", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Term = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPriceScheduleList(v *[]types.PriceSchedule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PriceSchedule - if *v == nil { - sv = make([]types.PriceSchedule, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PriceSchedule - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPriceSchedule(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPriceScheduleListUnwrapped(v *[]types.PriceSchedule, decoder smithyxml.NodeDecoder) error { - var sv []types.PriceSchedule - if *v == nil { - sv = make([]types.PriceSchedule, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PriceSchedule - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPriceSchedule(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPricingDetail(v **types.PricingDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PricingDetail - if *v == nil { - sv = &types.PricingDetail{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("price", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Price = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPricingDetailsList(v *[]types.PricingDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PricingDetail - if *v == nil { - sv = make([]types.PricingDetail, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PricingDetail - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPricingDetail(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPricingDetailsListUnwrapped(v *[]types.PricingDetail, decoder smithyxml.NodeDecoder) error { - var sv []types.PricingDetail - if *v == nil { - sv = make([]types.PricingDetail, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PricingDetail - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPricingDetail(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrincipalIdFormat(v **types.PrincipalIdFormat, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrincipalIdFormat - if *v == nil { - sv = &types.PrincipalIdFormat{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("statusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrincipalIdFormatList(v *[]types.PrincipalIdFormat, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrincipalIdFormat - if *v == nil { - sv = make([]types.PrincipalIdFormat, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrincipalIdFormat - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrincipalIdFormat(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrincipalIdFormatListUnwrapped(v *[]types.PrincipalIdFormat, decoder smithyxml.NodeDecoder) error { - var sv []types.PrincipalIdFormat - if *v == nil { - sv = make([]types.PrincipalIdFormat, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrincipalIdFormat - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrincipalIdFormat(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrivateDnsDetails(v **types.PrivateDnsDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrivateDnsDetails - if *v == nil { - sv = &types.PrivateDnsDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateDnsDetailsSet(v *[]types.PrivateDnsDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrivateDnsDetails - if *v == nil { - sv = make([]types.PrivateDnsDetails, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrivateDnsDetails - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrivateDnsDetails(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateDnsDetailsSetUnwrapped(v *[]types.PrivateDnsDetails, decoder smithyxml.NodeDecoder) error { - var sv []types.PrivateDnsDetails - if *v == nil { - sv = make([]types.PrivateDnsDetails, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrivateDnsDetails - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrivateDnsDetails(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPrivateDnsNameConfiguration(v **types.PrivateDnsNameConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrivateDnsNameConfiguration - if *v == nil { - sv = &types.PrivateDnsNameConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.DnsNameState(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = ptr.String(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateDnsNameOptionsOnLaunch(v **types.PrivateDnsNameOptionsOnLaunch, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrivateDnsNameOptionsOnLaunch - if *v == nil { - sv = &types.PrivateDnsNameOptionsOnLaunch{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enableResourceNameDnsAAAARecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableResourceNameDnsAAAARecord = ptr.Bool(xtv) - } - - case strings.EqualFold("enableResourceNameDnsARecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableResourceNameDnsARecord = ptr.Bool(xtv) - } - - case strings.EqualFold("hostnameType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostnameType = types.HostnameType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateDnsNameOptionsResponse(v **types.PrivateDnsNameOptionsResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrivateDnsNameOptionsResponse - if *v == nil { - sv = &types.PrivateDnsNameOptionsResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enableResourceNameDnsAAAARecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableResourceNameDnsAAAARecord = ptr.Bool(xtv) - } - - case strings.EqualFold("enableResourceNameDnsARecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableResourceNameDnsARecord = ptr.Bool(xtv) - } - - case strings.EqualFold("hostnameType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostnameType = types.HostnameType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateIpAddressSpecification(v **types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PrivateIpAddressSpecification - if *v == nil { - sv = &types.PrivateIpAddressSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("primary", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Primary = ptr.Bool(xtv) - } - - case strings.EqualFold("privateIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateIpAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateIpAddressSpecificationList(v *[]types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PrivateIpAddressSpecification - if *v == nil { - sv = make([]types.PrivateIpAddressSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PrivateIpAddressSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPrivateIpAddressSpecificationListUnwrapped(v *[]types.PrivateIpAddressSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.PrivateIpAddressSpecification - if *v == nil { - sv = make([]types.PrivateIpAddressSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PrivateIpAddressSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPrivateIpAddressSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentProcessorInfo(v **types.ProcessorInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ProcessorInfo - if *v == nil { - sv = &types.ProcessorInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("manufacturer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Manufacturer = ptr.String(xtv) - } - - case strings.EqualFold("supportedArchitectures", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentArchitectureTypeList(&sv.SupportedArchitectures, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedFeatures", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSupportedAdditionalProcessorFeatureList(&sv.SupportedFeatures, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sustainedClockSpeedInGhz", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.SustainedClockSpeedInGhz = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentProductCode(v **types.ProductCode, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ProductCode - if *v == nil { - sv = &types.ProductCode{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("productCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ProductCodeId = ptr.String(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ProductCodeType = types.ProductCodeValues(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentProductCodeList(v *[]types.ProductCode, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ProductCode - if *v == nil { - sv = make([]types.ProductCode, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ProductCode - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentProductCode(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentProductCodeListUnwrapped(v *[]types.ProductCode, decoder smithyxml.NodeDecoder) error { - var sv []types.ProductCode - if *v == nil { - sv = make([]types.ProductCode, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ProductCode - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentProductCode(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPropagatingVgw(v **types.PropagatingVgw, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PropagatingVgw - if *v == nil { - sv = &types.PropagatingVgw{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("gatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPropagatingVgwList(v *[]types.PropagatingVgw, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PropagatingVgw - if *v == nil { - sv = make([]types.PropagatingVgw, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PropagatingVgw - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPropagatingVgw(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPropagatingVgwListUnwrapped(v *[]types.PropagatingVgw, decoder smithyxml.NodeDecoder) error { - var sv []types.PropagatingVgw - if *v == nil { - sv = make([]types.PropagatingVgw, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PropagatingVgw - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPropagatingVgw(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentProtocolIntList(v *[]int32, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col int32 - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - col = int32(i64) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentProtocolIntListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - switch { - default: - var mv int32 - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - mv = int32(i64) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentProtocolList(v *[]types.Protocol, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Protocol - if *v == nil { - sv = make([]types.Protocol, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Protocol - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.Protocol(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentProtocolListUnwrapped(v *[]types.Protocol, decoder smithyxml.NodeDecoder) error { - var sv []types.Protocol - if *v == nil { - sv = make([]types.Protocol, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Protocol - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.Protocol(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentProvisionedBandwidth(v **types.ProvisionedBandwidth, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ProvisionedBandwidth - if *v == nil { - sv = &types.ProvisionedBandwidth{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("provisioned", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Provisioned = ptr.String(xtv) - } - - case strings.EqualFold("provisionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ProvisionTime = ptr.Time(t) - } - - case strings.EqualFold("requested", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Requested = ptr.String(xtv) - } - - case strings.EqualFold("requestTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RequestTime = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPtrUpdateStatus(v **types.PtrUpdateStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PtrUpdateStatus - if *v == nil { - sv = &types.PtrUpdateStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Reason = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPublicIpv4Pool(v **types.PublicIpv4Pool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PublicIpv4Pool - if *v == nil { - sv = &types.PublicIpv4Pool{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - case strings.EqualFold("poolAddressRangeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPublicIpv4PoolRangeSet(&sv.PoolAddressRanges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("poolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("totalAddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalAddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("totalAvailableAddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalAvailableAddressCount = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPublicIpv4PoolRange(v **types.PublicIpv4PoolRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PublicIpv4PoolRange - if *v == nil { - sv = &types.PublicIpv4PoolRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("availableAddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableAddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("firstAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FirstAddress = ptr.String(xtv) - } - - case strings.EqualFold("lastAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPublicIpv4PoolRangeSet(v *[]types.PublicIpv4PoolRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PublicIpv4PoolRange - if *v == nil { - sv = make([]types.PublicIpv4PoolRange, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PublicIpv4PoolRange - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPublicIpv4PoolRange(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPublicIpv4PoolRangeSetUnwrapped(v *[]types.PublicIpv4PoolRange, decoder smithyxml.NodeDecoder) error { - var sv []types.PublicIpv4PoolRange - if *v == nil { - sv = make([]types.PublicIpv4PoolRange, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PublicIpv4PoolRange - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPublicIpv4PoolRange(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPublicIpv4PoolSet(v *[]types.PublicIpv4Pool, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.PublicIpv4Pool - if *v == nil { - sv = make([]types.PublicIpv4Pool, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.PublicIpv4Pool - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPublicIpv4Pool(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPublicIpv4PoolSetUnwrapped(v *[]types.PublicIpv4Pool, decoder smithyxml.NodeDecoder) error { - var sv []types.PublicIpv4Pool - if *v == nil { - sv = make([]types.PublicIpv4Pool, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.PublicIpv4Pool - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPublicIpv4Pool(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPurchase(v **types.Purchase, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Purchase - if *v == nil { - sv = &types.Purchase{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("duration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Duration = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("hostIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseHostIdSet(&sv.HostIdSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hostReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostReservationId = ptr.String(xtv) - } - - case strings.EqualFold("hourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("instanceFamily", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceFamily = ptr.String(xtv) - } - - case strings.EqualFold("paymentOption", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PaymentOption = types.PaymentOption(xtv) - } - - case strings.EqualFold("upfrontPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UpfrontPrice = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPurchasedScheduledInstanceSet(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ScheduledInstance - if *v == nil { - sv = make([]types.ScheduledInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ScheduledInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentScheduledInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPurchasedScheduledInstanceSetUnwrapped(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.ScheduledInstance - if *v == nil { - sv = make([]types.ScheduledInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ScheduledInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentScheduledInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentPurchaseSet(v *[]types.Purchase, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Purchase - if *v == nil { - sv = make([]types.Purchase, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Purchase - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentPurchase(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentPurchaseSetUnwrapped(v *[]types.Purchase, decoder smithyxml.NodeDecoder) error { - var sv []types.Purchase - if *v == nil { - sv = make([]types.Purchase, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Purchase - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentPurchase(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRecurringCharge(v **types.RecurringCharge, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RecurringCharge - if *v == nil { - sv = &types.RecurringCharge{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Amount = ptr.Float64(f64) - } - - case strings.EqualFold("frequency", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Frequency = types.RecurringChargeFrequency(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRecurringChargesList(v *[]types.RecurringCharge, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RecurringCharge - if *v == nil { - sv = make([]types.RecurringCharge, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RecurringCharge - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRecurringCharge(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRecurringChargesListUnwrapped(v *[]types.RecurringCharge, decoder smithyxml.NodeDecoder) error { - var sv []types.RecurringCharge - if *v == nil { - sv = make([]types.RecurringCharge, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RecurringCharge - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRecurringCharge(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReferencedSecurityGroup(v **types.ReferencedSecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReferencedSecurityGroup - if *v == nil { - sv = &types.ReferencedSecurityGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("peeringStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeeringStatus = ptr.String(xtv) - } - - case strings.EqualFold("userId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserId = ptr.String(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcPeeringConnectionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRegion(v **types.Region, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Region - if *v == nil { - sv = &types.Region{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("regionEndpoint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Endpoint = ptr.String(xtv) - } - - case strings.EqualFold("optInStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OptInStatus = ptr.String(xtv) - } - - case strings.EqualFold("regionName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RegionName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRegionList(v *[]types.Region, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Region - if *v == nil { - sv = make([]types.Region, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Region - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRegion(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRegionListUnwrapped(v *[]types.Region, decoder smithyxml.NodeDecoder) error { - var sv []types.Region - if *v == nil { - sv = make([]types.Region, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Region - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRegion(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReplaceRootVolumeTask(v **types.ReplaceRootVolumeTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReplaceRootVolumeTask - if *v == nil { - sv = &types.ReplaceRootVolumeTask{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("completeTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CompleteTime = ptr.String(xtv) - } - - case strings.EqualFold("deleteReplacedRootVolume", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteReplacedRootVolume = ptr.Bool(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("replaceRootVolumeTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReplaceRootVolumeTaskId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StartTime = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("taskState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TaskState = types.ReplaceRootVolumeTaskState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReplaceRootVolumeTasks(v *[]types.ReplaceRootVolumeTask, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReplaceRootVolumeTask - if *v == nil { - sv = make([]types.ReplaceRootVolumeTask, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReplaceRootVolumeTask - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReplaceRootVolumeTask(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReplaceRootVolumeTasksUnwrapped(v *[]types.ReplaceRootVolumeTask, decoder smithyxml.NodeDecoder) error { - var sv []types.ReplaceRootVolumeTask - if *v == nil { - sv = make([]types.ReplaceRootVolumeTask, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReplaceRootVolumeTask - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReplaceRootVolumeTask(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservation(v **types.Reservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Reservation - if *v == nil { - sv = &types.Reservation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceList(&sv.Instances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("requesterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RequesterId = ptr.String(xtv) - } - - case strings.EqualFold("reservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservationId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservationList(v *[]types.Reservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Reservation - if *v == nil { - sv = make([]types.Reservation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Reservation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservationListUnwrapped(v *[]types.Reservation, decoder smithyxml.NodeDecoder) error { - var sv []types.Reservation - if *v == nil { - sv = make([]types.Reservation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Reservation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservationValue(v **types.ReservationValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservationValue - if *v == nil { - sv = &types.ReservationValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("hourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("remainingTotalValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RemainingTotalValue = ptr.String(xtv) - } - - case strings.EqualFold("remainingUpfrontValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RemainingUpfrontValue = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstanceReservationValue(v **types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstanceReservationValue - if *v == nil { - sv = &types.ReservedInstanceReservationValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservationValue", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservationValue(&sv.ReservationValue, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstanceReservationValueSet(v *[]types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstanceReservationValue - if *v == nil { - sv = make([]types.ReservedInstanceReservationValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstanceReservationValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstanceReservationValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstanceReservationValueSetUnwrapped(v *[]types.ReservedInstanceReservationValue, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstanceReservationValue - if *v == nil { - sv = make([]types.ReservedInstanceReservationValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstanceReservationValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstanceReservationValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservedInstances(v **types.ReservedInstances, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstances - if *v == nil { - sv = &types.ReservedInstances{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("duration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Duration = ptr.Int64(i64) - } - - case strings.EqualFold("end", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.End = ptr.Time(t) - } - - case strings.EqualFold("fixedPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.FixedPrice = ptr.Float32(float32(f64)) - } - - case strings.EqualFold("instanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceTenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceTenancy = types.Tenancy(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("offeringClass", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingClass = types.OfferingClassType(xtv) - } - - case strings.EqualFold("offeringType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingType = types.OfferingTypeValues(xtv) - } - - case strings.EqualFold("productDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ProductDescription = types.RIProductDescription(xtv) - } - - case strings.EqualFold("recurringCharges", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRecurringChargesList(&sv.RecurringCharges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - case strings.EqualFold("scope", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Scope = types.Scope(xtv) - } - - case strings.EqualFold("start", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Start = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.ReservedInstanceState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("usagePrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.UsagePrice = ptr.Float32(float32(f64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesConfiguration(v **types.ReservedInstancesConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstancesConfiguration - if *v == nil { - sv = &types.ReservedInstancesConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("instanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = ptr.String(xtv) - } - - case strings.EqualFold("scope", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Scope = types.Scope(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesId(v **types.ReservedInstancesId, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstancesId - if *v == nil { - sv = &types.ReservedInstancesId{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesList(v *[]types.ReservedInstances, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstances - if *v == nil { - sv = make([]types.ReservedInstances, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstances - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstances(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesListUnwrapped(v *[]types.ReservedInstances, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstances - if *v == nil { - sv = make([]types.ReservedInstances, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstances - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstances(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservedInstancesListing(v **types.ReservedInstancesListing, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstancesListing - if *v == nil { - sv = &types.ReservedInstancesListing{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("createDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateDate = ptr.Time(t) - } - - case strings.EqualFold("instanceCounts", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceCountList(&sv.InstanceCounts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("priceSchedules", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPriceScheduleList(&sv.PriceSchedules, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - case strings.EqualFold("reservedInstancesListingId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesListingId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.ListingStatus(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("updateDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UpdateDate = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesListingList(v *[]types.ReservedInstancesListing, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstancesListing - if *v == nil { - sv = make([]types.ReservedInstancesListing, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstancesListing - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstancesListing(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesListingListUnwrapped(v *[]types.ReservedInstancesListing, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstancesListing - if *v == nil { - sv = make([]types.ReservedInstancesListing, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstancesListing - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstancesListing(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservedInstancesModification(v **types.ReservedInstancesModification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstancesModification - if *v == nil { - sv = &types.ReservedInstancesModification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("createDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateDate = ptr.Time(t) - } - - case strings.EqualFold("effectiveDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EffectiveDate = ptr.Time(t) - } - - case strings.EqualFold("modificationResultSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesModificationResultList(&sv.ModificationResults, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedIntancesIds(&sv.ReservedInstancesIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstancesModificationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesModificationId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("updateDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UpdateDate = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesModificationList(v *[]types.ReservedInstancesModification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstancesModification - if *v == nil { - sv = make([]types.ReservedInstancesModification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstancesModification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstancesModification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesModificationListUnwrapped(v *[]types.ReservedInstancesModification, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstancesModification - if *v == nil { - sv = make([]types.ReservedInstancesModification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstancesModification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstancesModification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservedInstancesModificationResult(v **types.ReservedInstancesModificationResult, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstancesModificationResult - if *v == nil { - sv = &types.ReservedInstancesModificationResult{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - case strings.EqualFold("targetConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesConfiguration(&sv.TargetConfiguration, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesModificationResultList(v *[]types.ReservedInstancesModificationResult, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstancesModificationResult - if *v == nil { - sv = make([]types.ReservedInstancesModificationResult, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstancesModificationResult - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstancesModificationResult(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesModificationResultListUnwrapped(v *[]types.ReservedInstancesModificationResult, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstancesModificationResult - if *v == nil { - sv = make([]types.ReservedInstancesModificationResult, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstancesModificationResult - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstancesModificationResult(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservedInstancesOffering(v **types.ReservedInstancesOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReservedInstancesOffering - if *v == nil { - sv = &types.ReservedInstancesOffering{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("duration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Duration = ptr.Int64(i64) - } - - case strings.EqualFold("fixedPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.FixedPrice = ptr.Float32(float32(f64)) - } - - case strings.EqualFold("instanceTenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceTenancy = types.Tenancy(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("marketplace", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Marketplace = ptr.Bool(xtv) - } - - case strings.EqualFold("offeringClass", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingClass = types.OfferingClassType(xtv) - } - - case strings.EqualFold("offeringType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingType = types.OfferingTypeValues(xtv) - } - - case strings.EqualFold("pricingDetailsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPricingDetailsList(&sv.PricingDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ProductDescription = types.RIProductDescription(xtv) - } - - case strings.EqualFold("recurringCharges", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRecurringChargesList(&sv.RecurringCharges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstancesOfferingId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesOfferingId = ptr.String(xtv) - } - - case strings.EqualFold("scope", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Scope = types.Scope(xtv) - } - - case strings.EqualFold("usagePrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.UsagePrice = ptr.Float32(float32(f64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesOfferingList(v *[]types.ReservedInstancesOffering, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstancesOffering - if *v == nil { - sv = make([]types.ReservedInstancesOffering, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstancesOffering - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstancesOffering(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedInstancesOfferingListUnwrapped(v *[]types.ReservedInstancesOffering, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstancesOffering - if *v == nil { - sv = make([]types.ReservedInstancesOffering, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstancesOffering - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstancesOffering(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentReservedIntancesIds(v *[]types.ReservedInstancesId, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ReservedInstancesId - if *v == nil { - sv = make([]types.ReservedInstancesId, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ReservedInstancesId - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentReservedInstancesId(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentReservedIntancesIdsUnwrapped(v *[]types.ReservedInstancesId, decoder smithyxml.NodeDecoder) error { - var sv []types.ReservedInstancesId - if *v == nil { - sv = make([]types.ReservedInstancesId, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ReservedInstancesId - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentReservedInstancesId(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentResourceStatement(v **types.ResourceStatement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ResourceStatement - if *v == nil { - sv = &types.ResourceStatement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.Resources, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("resourceTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.ResourceTypes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentResponseError(v **types.ResponseError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ResponseError - if *v == nil { - sv = &types.ResponseError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.LaunchTemplateErrorCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentResponseHostIdList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentResponseHostIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentResponseHostIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentResponseHostIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentResponseLaunchTemplateData(v **types.ResponseLaunchTemplateData, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ResponseLaunchTemplateData - if *v == nil { - sv = &types.ResponseLaunchTemplateData{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("blockDeviceMappingSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("capacityReservationSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateCapacityReservationSpecificationResponse(&sv.CapacityReservationSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("cpuOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateCpuOptions(&sv.CpuOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("creditSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCreditSpecification(&sv.CreditSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("disableApiStop", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DisableApiStop = ptr.Bool(xtv) - } - - case strings.EqualFold("disableApiTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DisableApiTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsOptimized = ptr.Bool(xtv) - } - - case strings.EqualFold("elasticGpuSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentElasticGpuSpecificationResponseList(&sv.ElasticGpuSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("elasticInferenceAcceleratorSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateElasticInferenceAcceleratorResponseList(&sv.ElasticInferenceAccelerators, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enclaveOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateEnclaveOptions(&sv.EnclaveOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("hibernationOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateHibernationOptions(&sv.HibernationOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("iamInstanceProfile", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateIamInstanceProfileSpecification(&sv.IamInstanceProfile, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceInitiatedShutdownBehavior", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceInitiatedShutdownBehavior = types.ShutdownBehavior(xtv) - } - - case strings.EqualFold("instanceMarketOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceMarketOptions(&sv.InstanceMarketOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceRequirements", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceRequirements(&sv.InstanceRequirements, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("kernelId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KernelId = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("licenseSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateLicenseList(&sv.LicenseSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maintenanceOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceMaintenanceOptions(&sv.MaintenanceOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("metadataOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceMetadataOptions(&sv.MetadataOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("monitoring", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplatesMonitoring(&sv.Monitoring, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationList(&sv.NetworkInterfaces, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("placement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplatePlacement(&sv.Placement, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("privateDnsNameOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplatePrivateDnsNameOptions(&sv.PrivateDnsNameOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ramDiskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RamDiskId = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SecurityGroupIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateTagSpecificationList(&sv.TagSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("userData", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserData = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRootDeviceTypeList(v *[]types.RootDeviceType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RootDeviceType - if *v == nil { - sv = make([]types.RootDeviceType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RootDeviceType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.RootDeviceType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRootDeviceTypeListUnwrapped(v *[]types.RootDeviceType, decoder smithyxml.NodeDecoder) error { - var sv []types.RootDeviceType - if *v == nil { - sv = make([]types.RootDeviceType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RootDeviceType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.RootDeviceType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRoute(v **types.Route, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Route - if *v == nil { - sv = &types.Route{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("coreNetworkArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoreNetworkArn = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("destinationIpv6CidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationIpv6CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("destinationPrefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationPrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("egressOnlyInternetGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EgressOnlyInternetGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("gatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GatewayId = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("origin", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Origin = types.RouteOrigin(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.RouteState(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcPeeringConnectionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteList(v *[]types.Route, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Route - if *v == nil { - sv = make([]types.Route, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Route - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRoute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteListUnwrapped(v *[]types.Route, decoder smithyxml.NodeDecoder) error { - var sv []types.Route - if *v == nil { - sv = make([]types.Route, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Route - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRoute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRouteTable(v **types.RouteTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RouteTable - if *v == nil { - sv = &types.RouteTable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTableAssociationList(&sv.Associations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("propagatingVgwSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPropagatingVgwList(&sv.PropagatingVgws, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("routeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteList(&sv.Routes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("routeTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteTableAssociation(v **types.RouteTableAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RouteTableAssociation - if *v == nil { - sv = &types.RouteTableAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTableAssociationState(&sv.AssociationState, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("gatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GatewayId = ptr.String(xtv) - } - - case strings.EqualFold("main", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Main = ptr.Bool(xtv) - } - - case strings.EqualFold("routeTableAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RouteTableAssociationId = ptr.String(xtv) - } - - case strings.EqualFold("routeTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteTableAssociationList(v *[]types.RouteTableAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RouteTableAssociation - if *v == nil { - sv = make([]types.RouteTableAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RouteTableAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRouteTableAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteTableAssociationListUnwrapped(v *[]types.RouteTableAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.RouteTableAssociation - if *v == nil { - sv = make([]types.RouteTableAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RouteTableAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRouteTableAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRouteTableAssociationState(v **types.RouteTableAssociationState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RouteTableAssociationState - if *v == nil { - sv = &types.RouteTableAssociationState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.RouteTableAssociationStateCode(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteTableList(v *[]types.RouteTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RouteTable - if *v == nil { - sv = make([]types.RouteTable, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RouteTable - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRouteTable(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRouteTableListUnwrapped(v *[]types.RouteTable, decoder smithyxml.NodeDecoder) error { - var sv []types.RouteTable - if *v == nil { - sv = make([]types.RouteTable, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RouteTable - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRouteTable(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRuleGroupRuleOptionsPair(v **types.RuleGroupRuleOptionsPair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RuleGroupRuleOptionsPair - if *v == nil { - sv = &types.RuleGroupRuleOptionsPair{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ruleGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("ruleOptionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRuleOptionList(&sv.RuleOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRuleGroupRuleOptionsPairList(v *[]types.RuleGroupRuleOptionsPair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RuleGroupRuleOptionsPair - if *v == nil { - sv = make([]types.RuleGroupRuleOptionsPair, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RuleGroupRuleOptionsPair - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRuleGroupRuleOptionsPair(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRuleGroupRuleOptionsPairListUnwrapped(v *[]types.RuleGroupRuleOptionsPair, decoder smithyxml.NodeDecoder) error { - var sv []types.RuleGroupRuleOptionsPair - if *v == nil { - sv = make([]types.RuleGroupRuleOptionsPair, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RuleGroupRuleOptionsPair - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRuleGroupRuleOptionsPair(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRuleGroupTypePair(v **types.RuleGroupTypePair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RuleGroupTypePair - if *v == nil { - sv = &types.RuleGroupTypePair{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ruleGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("ruleGroupType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleGroupType = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRuleGroupTypePairList(v *[]types.RuleGroupTypePair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RuleGroupTypePair - if *v == nil { - sv = make([]types.RuleGroupTypePair, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RuleGroupTypePair - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRuleGroupTypePair(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRuleGroupTypePairListUnwrapped(v *[]types.RuleGroupTypePair, decoder smithyxml.NodeDecoder) error { - var sv []types.RuleGroupTypePair - if *v == nil { - sv = make([]types.RuleGroupTypePair, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RuleGroupTypePair - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRuleGroupTypePair(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRuleOption(v **types.RuleOption, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RuleOption - if *v == nil { - sv = &types.RuleOption{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("keyword", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Keyword = ptr.String(xtv) - } - - case strings.EqualFold("settingSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStringList(&sv.Settings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRuleOptionList(v *[]types.RuleOption, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.RuleOption - if *v == nil { - sv = make([]types.RuleOption, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.RuleOption - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentRuleOption(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentRuleOptionListUnwrapped(v *[]types.RuleOption, decoder smithyxml.NodeDecoder) error { - var sv []types.RuleOption - if *v == nil { - sv = make([]types.RuleOption, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.RuleOption - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentRuleOption(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentRunInstancesMonitoringEnabled(v **types.RunInstancesMonitoringEnabled, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RunInstancesMonitoringEnabled - if *v == nil { - sv = &types.RunInstancesMonitoringEnabled{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentS3Storage(v **types.S3Storage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.S3Storage - if *v == nil { - sv = &types.S3Storage{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AWSAccessKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AWSAccessKeyId = ptr.String(xtv) - } - - case strings.EqualFold("bucket", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Bucket = ptr.String(xtv) - } - - case strings.EqualFold("prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Prefix = ptr.String(xtv) - } - - case strings.EqualFold("uploadPolicy", t.Name.Local): - var data string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - data = xtv - } - sv.UploadPolicy, err = base64.StdEncoding.DecodeString(data) - if err != nil { - return err - } - - case strings.EqualFold("uploadPolicySignature", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UploadPolicySignature = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentScheduledInstance(v **types.ScheduledInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ScheduledInstance - if *v == nil { - sv = &types.ScheduledInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("createDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateDate = ptr.Time(t) - } - - case strings.EqualFold("hourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("instanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("networkPlatform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkPlatform = ptr.String(xtv) - } - - case strings.EqualFold("nextSlotStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.NextSlotStartTime = ptr.Time(t) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = ptr.String(xtv) - } - - case strings.EqualFold("previousSlotEndTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.PreviousSlotEndTime = ptr.Time(t) - } - - case strings.EqualFold("recurrence", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceRecurrence(&sv.Recurrence, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("scheduledInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ScheduledInstanceId = ptr.String(xtv) - } - - case strings.EqualFold("slotDurationInHours", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SlotDurationInHours = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("termEndDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.TermEndDate = ptr.Time(t) - } - - case strings.EqualFold("termStartDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.TermStartDate = ptr.Time(t) - } - - case strings.EqualFold("totalScheduledInstanceHours", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalScheduledInstanceHours = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentScheduledInstanceAvailability(v **types.ScheduledInstanceAvailability, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ScheduledInstanceAvailability - if *v == nil { - sv = &types.ScheduledInstanceAvailability{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("availableInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableInstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("firstSlotStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.FirstSlotStartTime = ptr.Time(t) - } - - case strings.EqualFold("hourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("maxTermDurationInDays", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxTermDurationInDays = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("minTermDurationInDays", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MinTermDurationInDays = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("networkPlatform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkPlatform = ptr.String(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = ptr.String(xtv) - } - - case strings.EqualFold("purchaseToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PurchaseToken = ptr.String(xtv) - } - - case strings.EqualFold("recurrence", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceRecurrence(&sv.Recurrence, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("slotDurationInHours", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SlotDurationInHours = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("totalScheduledInstanceHours", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalScheduledInstanceHours = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySet(v *[]types.ScheduledInstanceAvailability, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ScheduledInstanceAvailability - if *v == nil { - sv = make([]types.ScheduledInstanceAvailability, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ScheduledInstanceAvailability - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentScheduledInstanceAvailability(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySetUnwrapped(v *[]types.ScheduledInstanceAvailability, decoder smithyxml.NodeDecoder) error { - var sv []types.ScheduledInstanceAvailability - if *v == nil { - sv = make([]types.ScheduledInstanceAvailability, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ScheduledInstanceAvailability - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentScheduledInstanceAvailability(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentScheduledInstanceRecurrence(v **types.ScheduledInstanceRecurrence, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ScheduledInstanceRecurrence - if *v == nil { - sv = &types.ScheduledInstanceRecurrence{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("frequency", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Frequency = ptr.String(xtv) - } - - case strings.EqualFold("interval", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Interval = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("occurrenceDaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentOccurrenceDaySet(&sv.OccurrenceDaySet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("occurrenceRelativeToEnd", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.OccurrenceRelativeToEnd = ptr.Bool(xtv) - } - - case strings.EqualFold("occurrenceUnit", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OccurrenceUnit = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentScheduledInstanceSet(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ScheduledInstance - if *v == nil { - sv = make([]types.ScheduledInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ScheduledInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentScheduledInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentScheduledInstanceSetUnwrapped(v *[]types.ScheduledInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.ScheduledInstance - if *v == nil { - sv = make([]types.ScheduledInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ScheduledInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentScheduledInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroup(v **types.SecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SecurityGroup - if *v == nil { - sv = &types.SecurityGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("ipPermissions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.IpPermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipPermissionsEgress", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.IpPermissionsEgress, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupForVpc(v **types.SecurityGroupForVpc, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SecurityGroupForVpc - if *v == nil { - sv = &types.SecurityGroupForVpc{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("primaryVpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrimaryVpcId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupForVpcList(v *[]types.SecurityGroupForVpc, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SecurityGroupForVpc - if *v == nil { - sv = make([]types.SecurityGroupForVpc, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SecurityGroupForVpc - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSecurityGroupForVpc(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupForVpcListUnwrapped(v *[]types.SecurityGroupForVpc, decoder smithyxml.NodeDecoder) error { - var sv []types.SecurityGroupForVpc - if *v == nil { - sv = make([]types.SecurityGroupForVpc, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SecurityGroupForVpc - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSecurityGroupForVpc(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroupIdentifier(v **types.SecurityGroupIdentifier, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SecurityGroupIdentifier - if *v == nil { - sv = &types.SecurityGroupIdentifier{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupIdList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroupIdSet(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupIdSetUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroupIdStringList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("SecurityGroupId", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupIdStringListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroupList(v *[]types.SecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SecurityGroup - if *v == nil { - sv = make([]types.SecurityGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SecurityGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSecurityGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupListUnwrapped(v *[]types.SecurityGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.SecurityGroup - if *v == nil { - sv = make([]types.SecurityGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SecurityGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSecurityGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroupReference(v **types.SecurityGroupReference, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SecurityGroupReference - if *v == nil { - sv = &types.SecurityGroupReference{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("referencingVpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReferencingVpcId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcPeeringConnectionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupReferences(v *[]types.SecurityGroupReference, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SecurityGroupReference - if *v == nil { - sv = make([]types.SecurityGroupReference, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SecurityGroupReference - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSecurityGroupReference(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupReferencesUnwrapped(v *[]types.SecurityGroupReference, decoder smithyxml.NodeDecoder) error { - var sv []types.SecurityGroupReference - if *v == nil { - sv = make([]types.SecurityGroupReference, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SecurityGroupReference - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSecurityGroupReference(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSecurityGroupRule(v **types.SecurityGroupRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SecurityGroupRule - if *v == nil { - sv = &types.SecurityGroupRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrIpv4", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrIpv4 = ptr.String(xtv) - } - - case strings.EqualFold("cidrIpv6", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrIpv6 = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("fromPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.FromPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("ipProtocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpProtocol = ptr.String(xtv) - } - - case strings.EqualFold("isEgress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsEgress = ptr.Bool(xtv) - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("referencedGroupInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReferencedSecurityGroup(&sv.ReferencedGroupInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupRuleId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SecurityGroupRuleId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("toPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ToPort = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupRuleList(v *[]types.SecurityGroupRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SecurityGroupRule - if *v == nil { - sv = make([]types.SecurityGroupRule, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SecurityGroupRule - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSecurityGroupRule(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSecurityGroupRuleListUnwrapped(v *[]types.SecurityGroupRule, decoder smithyxml.NodeDecoder) error { - var sv []types.SecurityGroupRule - if *v == nil { - sv = make([]types.SecurityGroupRule, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SecurityGroupRule - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSecurityGroupRule(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentServiceConfiguration(v **types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ServiceConfiguration - if *v == nil { - sv = &types.ServiceConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("acceptanceRequired", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AcceptanceRequired = ptr.Bool(xtv) - } - - case strings.EqualFold("availabilityZoneSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.AvailabilityZones, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("baseEndpointDnsNameSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.BaseEndpointDnsNames, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("gatewayLoadBalancerArnSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.GatewayLoadBalancerArns, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("managesVpcEndpoints", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ManagesVpcEndpoints = ptr.Bool(xtv) - } - - case strings.EqualFold("networkLoadBalancerArnSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.NetworkLoadBalancerArns, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("payerResponsibility", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PayerResponsibility = types.PayerResponsibility(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsNameConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrivateDnsNameConfiguration(&sv.PrivateDnsNameConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("serviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceId = ptr.String(xtv) - } - - case strings.EqualFold("serviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceName = ptr.String(xtv) - } - - case strings.EqualFold("serviceState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceState = types.ServiceState(xtv) - } - - case strings.EqualFold("serviceType", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentServiceTypeDetailSet(&sv.ServiceType, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedIpAddressTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSupportedIpAddressTypes(&sv.SupportedIpAddressTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentServiceConfigurationSet(v *[]types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ServiceConfiguration - if *v == nil { - sv = make([]types.ServiceConfiguration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ServiceConfiguration - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentServiceConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentServiceConfigurationSetUnwrapped(v *[]types.ServiceConfiguration, decoder smithyxml.NodeDecoder) error { - var sv []types.ServiceConfiguration - if *v == nil { - sv = make([]types.ServiceConfiguration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ServiceConfiguration - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentServiceConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentServiceDetail(v **types.ServiceDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ServiceDetail - if *v == nil { - sv = &types.ServiceDetail{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("acceptanceRequired", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AcceptanceRequired = ptr.Bool(xtv) - } - - case strings.EqualFold("availabilityZoneSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.AvailabilityZones, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("baseEndpointDnsNameSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.BaseEndpointDnsNames, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("managesVpcEndpoints", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ManagesVpcEndpoints = ptr.Bool(xtv) - } - - case strings.EqualFold("owner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Owner = ptr.String(xtv) - } - - case strings.EqualFold("payerResponsibility", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PayerResponsibility = types.PayerResponsibility(xtv) - } - - case strings.EqualFold("privateDnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsName = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsNameSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrivateDnsDetailsSet(&sv.PrivateDnsNames, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("privateDnsNameVerificationState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrivateDnsNameVerificationState = types.DnsNameState(xtv) - } - - case strings.EqualFold("serviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceId = ptr.String(xtv) - } - - case strings.EqualFold("serviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceName = ptr.String(xtv) - } - - case strings.EqualFold("serviceType", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentServiceTypeDetailSet(&sv.ServiceType, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("supportedIpAddressTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSupportedIpAddressTypes(&sv.SupportedIpAddressTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcEndpointPolicySupported", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.VpcEndpointPolicySupported = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentServiceDetailSet(v *[]types.ServiceDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ServiceDetail - if *v == nil { - sv = make([]types.ServiceDetail, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ServiceDetail - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentServiceDetail(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentServiceDetailSetUnwrapped(v *[]types.ServiceDetail, decoder smithyxml.NodeDecoder) error { - var sv []types.ServiceDetail - if *v == nil { - sv = make([]types.ServiceDetail, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ServiceDetail - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentServiceDetail(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentServiceTypeDetail(v **types.ServiceTypeDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ServiceTypeDetail - if *v == nil { - sv = &types.ServiceTypeDetail{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("serviceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceType = types.ServiceType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentServiceTypeDetailSet(v *[]types.ServiceTypeDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ServiceTypeDetail - if *v == nil { - sv = make([]types.ServiceTypeDetail, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ServiceTypeDetail - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentServiceTypeDetail(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentServiceTypeDetailSetUnwrapped(v *[]types.ServiceTypeDetail, decoder smithyxml.NodeDecoder) error { - var sv []types.ServiceTypeDetail - if *v == nil { - sv = make([]types.ServiceTypeDetail, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ServiceTypeDetail - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentServiceTypeDetail(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSnapshot(v **types.Snapshot, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Snapshot - if *v == nil { - sv = &types.Snapshot{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dataEncryptionKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DataEncryptionKeyId = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("restoreExpiryTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RestoreExpiryTime = ptr.Time(t) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateMessage = ptr.String(xtv) - } - - case strings.EqualFold("storageTier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StorageTier = types.StorageTier(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VolumeSize = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotDetail(v **types.SnapshotDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SnapshotDetail - if *v == nil { - sv = &types.SnapshotDetail{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("deviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceName = ptr.String(xtv) - } - - case strings.EqualFold("diskImageSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.DiskImageSize = ptr.Float64(f64) - } - - case strings.EqualFold("format", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Format = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("url", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Url = ptr.String(xtv) - } - - case strings.EqualFold("userBucket", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUserBucketDetails(&sv.UserBucket, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotDetailList(v *[]types.SnapshotDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SnapshotDetail - if *v == nil { - sv = make([]types.SnapshotDetail, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SnapshotDetail - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSnapshotDetail(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotDetailListUnwrapped(v *[]types.SnapshotDetail, decoder smithyxml.NodeDecoder) error { - var sv []types.SnapshotDetail - if *v == nil { - sv = make([]types.SnapshotDetail, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SnapshotDetail - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSnapshotDetail(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSnapshotInfo(v **types.SnapshotInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SnapshotInfo - if *v == nil { - sv = &types.SnapshotInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VolumeSize = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotList(v *[]types.Snapshot, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Snapshot - if *v == nil { - sv = make([]types.Snapshot, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Snapshot - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSnapshot(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotListUnwrapped(v *[]types.Snapshot, decoder smithyxml.NodeDecoder) error { - var sv []types.Snapshot - if *v == nil { - sv = make([]types.Snapshot, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Snapshot - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSnapshot(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSnapshotRecycleBinInfo(v **types.SnapshotRecycleBinInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SnapshotRecycleBinInfo - if *v == nil { - sv = &types.SnapshotRecycleBinInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("recycleBinEnterTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RecycleBinEnterTime = ptr.Time(t) - } - - case strings.EqualFold("recycleBinExitTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RecycleBinExitTime = ptr.Time(t) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotRecycleBinInfoList(v *[]types.SnapshotRecycleBinInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SnapshotRecycleBinInfo - if *v == nil { - sv = make([]types.SnapshotRecycleBinInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SnapshotRecycleBinInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSnapshotRecycleBinInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotRecycleBinInfoListUnwrapped(v *[]types.SnapshotRecycleBinInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.SnapshotRecycleBinInfo - if *v == nil { - sv = make([]types.SnapshotRecycleBinInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SnapshotRecycleBinInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSnapshotRecycleBinInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSnapshotSet(v *[]types.SnapshotInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SnapshotInfo - if *v == nil { - sv = make([]types.SnapshotInfo, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SnapshotInfo - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSnapshotInfo(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotSetUnwrapped(v *[]types.SnapshotInfo, decoder smithyxml.NodeDecoder) error { - var sv []types.SnapshotInfo - if *v == nil { - sv = make([]types.SnapshotInfo, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SnapshotInfo - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSnapshotInfo(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSnapshotTaskDetail(v **types.SnapshotTaskDetail, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SnapshotTaskDetail - if *v == nil { - sv = &types.SnapshotTaskDetail{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("diskImageSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.DiskImageSize = ptr.Float64(f64) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("format", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Format = ptr.String(xtv) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("url", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Url = ptr.String(xtv) - } - - case strings.EqualFold("userBucket", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUserBucketDetails(&sv.UserBucket, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotTierStatus(v **types.SnapshotTierStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SnapshotTierStatus - if *v == nil { - sv = &types.SnapshotTierStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("archivalCompleteTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ArchivalCompleteTime = ptr.Time(t) - } - - case strings.EqualFold("lastTieringOperationStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastTieringOperationStatus = types.TieringOperationStatus(xtv) - } - - case strings.EqualFold("lastTieringOperationStatusDetail", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastTieringOperationStatusDetail = ptr.String(xtv) - } - - case strings.EqualFold("lastTieringProgress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LastTieringProgress = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("lastTieringStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastTieringStartTime = ptr.Time(t) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("restoreExpiryTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RestoreExpiryTime = ptr.Time(t) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.SnapshotState(xtv) - } - - case strings.EqualFold("storageTier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StorageTier = types.StorageTier(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotTierStatusSet(v *[]types.SnapshotTierStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SnapshotTierStatus - if *v == nil { - sv = make([]types.SnapshotTierStatus, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SnapshotTierStatus - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSnapshotTierStatus(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSnapshotTierStatusSetUnwrapped(v *[]types.SnapshotTierStatus, decoder smithyxml.NodeDecoder) error { - var sv []types.SnapshotTierStatus - if *v == nil { - sv = make([]types.SnapshotTierStatus, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SnapshotTierStatus - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSnapshotTierStatus(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSpotCapacityRebalance(v **types.SpotCapacityRebalance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotCapacityRebalance - if *v == nil { - sv = &types.SpotCapacityRebalance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("replacementStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReplacementStrategy = types.ReplacementStrategy(xtv) - } - - case strings.EqualFold("terminationDelay", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TerminationDelay = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotDatafeedSubscription(v **types.SpotDatafeedSubscription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotDatafeedSubscription - if *v == nil { - sv = &types.SpotDatafeedSubscription{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bucket", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Bucket = ptr.String(xtv) - } - - case strings.EqualFold("fault", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotInstanceStateFault(&sv.Fault, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Prefix = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.DatafeedSubscriptionState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetLaunchSpecification(v **types.SpotFleetLaunchSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotFleetLaunchSpecification - if *v == nil { - sv = &types.SpotFleetLaunchSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressingType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AddressingType = ptr.String(xtv) - } - - case strings.EqualFold("blockDeviceMapping", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsOptimized = ptr.Bool(xtv) - } - - case strings.EqualFold("iamInstanceProfile", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfileSpecification(&sv.IamInstanceProfile, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("instanceRequirements", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceRequirements(&sv.InstanceRequirements, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("kernelId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KernelId = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("monitoring", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotFleetMonitoring(&sv.Monitoring, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceNetworkInterfaceSpecificationList(&sv.NetworkInterfaces, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("placement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotPlacement(&sv.Placement, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ramdiskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RamdiskId = ptr.String(xtv) - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("spotPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotPrice = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotFleetTagSpecificationList(&sv.TagSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("userData", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserData = ptr.String(xtv) - } - - case strings.EqualFold("weightedCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.WeightedCapacity = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetMonitoring(v **types.SpotFleetMonitoring, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotFleetMonitoring - if *v == nil { - sv = &types.SpotFleetMonitoring{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetRequestConfig(v **types.SpotFleetRequestConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotFleetRequestConfig - if *v == nil { - sv = &types.SpotFleetRequestConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("activityStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ActivityStatus = types.ActivityStatus(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("spotFleetRequestConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotFleetRequestConfigData(&sv.SpotFleetRequestConfig, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("spotFleetRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestId = ptr.String(xtv) - } - - case strings.EqualFold("spotFleetRequestState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestState = types.BatchState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetRequestConfigData(v **types.SpotFleetRequestConfigData, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotFleetRequestConfigData - if *v == nil { - sv = &types.SpotFleetRequestConfigData{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationStrategy = types.AllocationStrategy(xtv) - } - - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("context", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Context = ptr.String(xtv) - } - - case strings.EqualFold("excessCapacityTerminationPolicy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExcessCapacityTerminationPolicy = types.ExcessCapacityTerminationPolicy(xtv) - } - - case strings.EqualFold("fulfilledCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.FulfilledCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("iamFleetRole", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IamFleetRole = ptr.String(xtv) - } - - case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceInterruptionBehavior = types.InstanceInterruptionBehavior(xtv) - } - - case strings.EqualFold("instancePoolsToUseCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstancePoolsToUseCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("launchSpecifications", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchSpecsList(&sv.LaunchSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("launchTemplateConfigs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateConfigList(&sv.LaunchTemplateConfigs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("loadBalancersConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLoadBalancersConfig(&sv.LoadBalancersConfig, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("onDemandAllocationStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OnDemandAllocationStrategy = types.OnDemandAllocationStrategy(xtv) - } - - case strings.EqualFold("onDemandFulfilledCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.OnDemandFulfilledCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("onDemandMaxTotalPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OnDemandMaxTotalPrice = ptr.String(xtv) - } - - case strings.EqualFold("onDemandTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.OnDemandTargetCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("replaceUnhealthyInstances", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReplaceUnhealthyInstances = ptr.Bool(xtv) - } - - case strings.EqualFold("spotMaintenanceStrategies", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotMaintenanceStrategies(&sv.SpotMaintenanceStrategies, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("spotMaxTotalPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotMaxTotalPrice = ptr.String(xtv) - } - - case strings.EqualFold("spotPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotPrice = ptr.String(xtv) - } - - case strings.EqualFold("TagSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagSpecificationList(&sv.TagSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TargetCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("targetCapacityUnitType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetCapacityUnitType = types.TargetCapacityUnitType(xtv) - } - - case strings.EqualFold("terminateInstancesWithExpiration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.TerminateInstancesWithExpiration = ptr.Bool(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.FleetType(xtv) - } - - case strings.EqualFold("validFrom", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidFrom = ptr.Time(t) - } - - case strings.EqualFold("validUntil", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidUntil = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetRequestConfigSet(v *[]types.SpotFleetRequestConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SpotFleetRequestConfig - if *v == nil { - sv = make([]types.SpotFleetRequestConfig, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SpotFleetRequestConfig - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSpotFleetRequestConfig(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetRequestConfigSetUnwrapped(v *[]types.SpotFleetRequestConfig, decoder smithyxml.NodeDecoder) error { - var sv []types.SpotFleetRequestConfig - if *v == nil { - sv = make([]types.SpotFleetRequestConfig, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SpotFleetRequestConfig - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSpotFleetRequestConfig(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSpotFleetTagSpecification(v **types.SpotFleetTagSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotFleetTagSpecification - if *v == nil { - sv = &types.SpotFleetTagSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.ResourceType(xtv) - } - - case strings.EqualFold("tag", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetTagSpecificationList(v *[]types.SpotFleetTagSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SpotFleetTagSpecification - if *v == nil { - sv = make([]types.SpotFleetTagSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SpotFleetTagSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSpotFleetTagSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotFleetTagSpecificationListUnwrapped(v *[]types.SpotFleetTagSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.SpotFleetTagSpecification - if *v == nil { - sv = make([]types.SpotFleetTagSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SpotFleetTagSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSpotFleetTagSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSpotInstanceRequest(v **types.SpotInstanceRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotInstanceRequest - if *v == nil { - sv = &types.SpotInstanceRequest{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("actualBlockHourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ActualBlockHourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZoneGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZoneGroup = ptr.String(xtv) - } - - case strings.EqualFold("blockDurationMinutes", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.BlockDurationMinutes = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("fault", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotInstanceStateFault(&sv.Fault, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceInterruptionBehavior = types.InstanceInterruptionBehavior(xtv) - } - - case strings.EqualFold("launchedAvailabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchedAvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("launchGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LaunchGroup = ptr.String(xtv) - } - - case strings.EqualFold("launchSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchSpecification(&sv.LaunchSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ProductDescription = types.RIProductDescription(xtv) - } - - case strings.EqualFold("spotInstanceRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotInstanceRequestId = ptr.String(xtv) - } - - case strings.EqualFold("spotPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotPrice = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SpotInstanceState(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotInstanceStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.SpotInstanceType(xtv) - } - - case strings.EqualFold("validFrom", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidFrom = ptr.Time(t) - } - - case strings.EqualFold("validUntil", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ValidUntil = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotInstanceRequestList(v *[]types.SpotInstanceRequest, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SpotInstanceRequest - if *v == nil { - sv = make([]types.SpotInstanceRequest, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SpotInstanceRequest - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSpotInstanceRequest(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotInstanceRequestListUnwrapped(v *[]types.SpotInstanceRequest, decoder smithyxml.NodeDecoder) error { - var sv []types.SpotInstanceRequest - if *v == nil { - sv = make([]types.SpotInstanceRequest, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SpotInstanceRequest - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSpotInstanceRequest(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSpotInstanceStateFault(v **types.SpotInstanceStateFault, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotInstanceStateFault - if *v == nil { - sv = &types.SpotInstanceStateFault{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotInstanceStatus(v **types.SpotInstanceStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotInstanceStatus - if *v == nil { - sv = &types.SpotInstanceStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - case strings.EqualFold("updateTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.UpdateTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotMaintenanceStrategies(v **types.SpotMaintenanceStrategies, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotMaintenanceStrategies - if *v == nil { - sv = &types.SpotMaintenanceStrategies{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityRebalance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotCapacityRebalance(&sv.CapacityRebalance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotOptions(v **types.SpotOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotOptions - if *v == nil { - sv = &types.SpotOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationStrategy = types.SpotAllocationStrategy(xtv) - } - - case strings.EqualFold("instanceInterruptionBehavior", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceInterruptionBehavior = types.SpotInstanceInterruptionBehavior(xtv) - } - - case strings.EqualFold("instancePoolsToUseCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstancePoolsToUseCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("maintenanceStrategies", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetSpotMaintenanceStrategies(&sv.MaintenanceStrategies, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxTotalPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MaxTotalPrice = ptr.String(xtv) - } - - case strings.EqualFold("minTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MinTargetCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("singleAvailabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SingleAvailabilityZone = ptr.Bool(xtv) - } - - case strings.EqualFold("singleInstanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SingleInstanceType = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotPlacement(v **types.SpotPlacement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotPlacement - if *v == nil { - sv = &types.SpotPlacement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.Tenancy(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotPlacementScore(v **types.SpotPlacementScore, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotPlacementScore - if *v == nil { - sv = &types.SpotPlacementScore{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZoneId = ptr.String(xtv) - } - - case strings.EqualFold("region", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Region = ptr.String(xtv) - } - - case strings.EqualFold("score", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Score = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotPlacementScores(v *[]types.SpotPlacementScore, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SpotPlacementScore - if *v == nil { - sv = make([]types.SpotPlacementScore, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SpotPlacementScore - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSpotPlacementScore(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotPlacementScoresUnwrapped(v *[]types.SpotPlacementScore, decoder smithyxml.NodeDecoder) error { - var sv []types.SpotPlacementScore - if *v == nil { - sv = make([]types.SpotPlacementScore, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SpotPlacementScore - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSpotPlacementScore(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSpotPrice(v **types.SpotPrice, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SpotPrice - if *v == nil { - sv = &types.SpotPrice{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = types.InstanceType(xtv) - } - - case strings.EqualFold("productDescription", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ProductDescription = types.RIProductDescription(xtv) - } - - case strings.EqualFold("spotPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotPrice = ptr.String(xtv) - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Timestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotPriceHistoryList(v *[]types.SpotPrice, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SpotPrice - if *v == nil { - sv = make([]types.SpotPrice, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SpotPrice - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSpotPrice(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSpotPriceHistoryListUnwrapped(v *[]types.SpotPrice, decoder smithyxml.NodeDecoder) error { - var sv []types.SpotPrice - if *v == nil { - sv = make([]types.SpotPrice, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SpotPrice - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSpotPrice(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentStaleIpPermission(v **types.StaleIpPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.StaleIpPermission - if *v == nil { - sv = &types.StaleIpPermission{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fromPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.FromPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipProtocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpProtocol = ptr.String(xtv) - } - - case strings.EqualFold("ipRanges", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpRanges(&sv.IpRanges, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("prefixListIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrefixListIdSet(&sv.PrefixListIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("toPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ToPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("groups", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUserIdGroupPairSet(&sv.UserIdGroupPairs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStaleIpPermissionSet(v *[]types.StaleIpPermission, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.StaleIpPermission - if *v == nil { - sv = make([]types.StaleIpPermission, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.StaleIpPermission - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentStaleIpPermission(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStaleIpPermissionSetUnwrapped(v *[]types.StaleIpPermission, decoder smithyxml.NodeDecoder) error { - var sv []types.StaleIpPermission - if *v == nil { - sv = make([]types.StaleIpPermission, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.StaleIpPermission - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentStaleIpPermission(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentStaleSecurityGroup(v **types.StaleSecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.StaleSecurityGroup - if *v == nil { - sv = &types.StaleSecurityGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("staleIpPermissions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStaleIpPermissionSet(&sv.StaleIpPermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("staleIpPermissionsEgress", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStaleIpPermissionSet(&sv.StaleIpPermissionsEgress, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStaleSecurityGroupSet(v *[]types.StaleSecurityGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.StaleSecurityGroup - if *v == nil { - sv = make([]types.StaleSecurityGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.StaleSecurityGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentStaleSecurityGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStaleSecurityGroupSetUnwrapped(v *[]types.StaleSecurityGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.StaleSecurityGroup - if *v == nil { - sv = make([]types.StaleSecurityGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.StaleSecurityGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentStaleSecurityGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentStateReason(v **types.StateReason, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.StateReason - if *v == nil { - sv = &types.StateReason{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStorage(v **types.Storage, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Storage - if *v == nil { - sv = &types.Storage{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("S3", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentS3Storage(&sv.S3, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStoreImageTaskResult(v **types.StoreImageTaskResult, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.StoreImageTaskResult - if *v == nil { - sv = &types.StoreImageTaskResult{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amiId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AmiId = ptr.String(xtv) - } - - case strings.EqualFold("bucket", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Bucket = ptr.String(xtv) - } - - case strings.EqualFold("progressPercentage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ProgressPercentage = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("s3objectKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3objectKey = ptr.String(xtv) - } - - case strings.EqualFold("storeTaskFailureReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StoreTaskFailureReason = ptr.String(xtv) - } - - case strings.EqualFold("storeTaskState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StoreTaskState = ptr.String(xtv) - } - - case strings.EqualFold("taskStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.TaskStartTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStoreImageTaskResultSet(v *[]types.StoreImageTaskResult, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.StoreImageTaskResult - if *v == nil { - sv = make([]types.StoreImageTaskResult, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.StoreImageTaskResult - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentStoreImageTaskResult(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStoreImageTaskResultSetUnwrapped(v *[]types.StoreImageTaskResult, decoder smithyxml.NodeDecoder) error { - var sv []types.StoreImageTaskResult - if *v == nil { - sv = make([]types.StoreImageTaskResult, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.StoreImageTaskResult - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentStoreImageTaskResult(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentStringList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentStringListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSubnet(v **types.Subnet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Subnet - if *v == nil { - sv = &types.Subnet{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("assignIpv6AddressOnCreation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AssignIpv6AddressOnCreation = ptr.Bool(xtv) - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("availabilityZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZoneId = ptr.String(xtv) - } - - case strings.EqualFold("availableIpAddressCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableIpAddressCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("cidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIpv4Pool", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIpv4Pool = ptr.String(xtv) - } - - case strings.EqualFold("defaultForAz", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DefaultForAz = ptr.Bool(xtv) - } - - case strings.EqualFold("enableDns64", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableDns64 = ptr.Bool(xtv) - } - - case strings.EqualFold("enableLniAtDeviceIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.EnableLniAtDeviceIndex = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ipv6CidrBlockAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociationSet(&sv.Ipv6CidrBlockAssociationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6Native", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Ipv6Native = ptr.Bool(xtv) - } - - case strings.EqualFold("mapCustomerOwnedIpOnLaunch", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.MapCustomerOwnedIpOnLaunch = ptr.Bool(xtv) - } - - case strings.EqualFold("mapPublicIpOnLaunch", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.MapPublicIpOnLaunch = ptr.Bool(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsNameOptionsOnLaunch", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrivateDnsNameOptionsOnLaunch(&sv.PrivateDnsNameOptionsOnLaunch, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SubnetState(xtv) - } - - case strings.EqualFold("subnetArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetArn = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetAssociation(v **types.SubnetAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SubnetAssociation - if *v == nil { - sv = &types.SubnetAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayMulitcastDomainAssociationState(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetAssociationList(v *[]types.SubnetAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SubnetAssociation - if *v == nil { - sv = make([]types.SubnetAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SubnetAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSubnetAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetAssociationListUnwrapped(v *[]types.SubnetAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.SubnetAssociation - if *v == nil { - sv = make([]types.SubnetAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SubnetAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSubnetAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSubnetCidrBlockState(v **types.SubnetCidrBlockState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SubnetCidrBlockState - if *v == nil { - sv = &types.SubnetCidrBlockState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SubnetCidrBlockStateCode(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetCidrReservation(v **types.SubnetCidrReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SubnetCidrReservation - if *v == nil { - sv = &types.SubnetCidrReservation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Cidr = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("reservationType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservationType = types.SubnetCidrReservationType(xtv) - } - - case strings.EqualFold("subnetCidrReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetCidrReservationId = ptr.String(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetCidrReservationList(v *[]types.SubnetCidrReservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SubnetCidrReservation - if *v == nil { - sv = make([]types.SubnetCidrReservation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SubnetCidrReservation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetCidrReservationListUnwrapped(v *[]types.SubnetCidrReservation, decoder smithyxml.NodeDecoder) error { - var sv []types.SubnetCidrReservation - if *v == nil { - sv = make([]types.SubnetCidrReservation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SubnetCidrReservation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(v **types.SubnetIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SubnetIpv6CidrBlockAssociation - if *v == nil { - sv = &types.SubnetIpv6CidrBlockAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("ipv6CidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("ipv6CidrBlockState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetCidrBlockState(&sv.Ipv6CidrBlockState, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociationSet(v *[]types.SubnetIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SubnetIpv6CidrBlockAssociation - if *v == nil { - sv = make([]types.SubnetIpv6CidrBlockAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SubnetIpv6CidrBlockAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociationSetUnwrapped(v *[]types.SubnetIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.SubnetIpv6CidrBlockAssociation - if *v == nil { - sv = make([]types.SubnetIpv6CidrBlockAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SubnetIpv6CidrBlockAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSubnetList(v *[]types.Subnet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Subnet - if *v == nil { - sv = make([]types.Subnet, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Subnet - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSubnet(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubnetListUnwrapped(v *[]types.Subnet, decoder smithyxml.NodeDecoder) error { - var sv []types.Subnet - if *v == nil { - sv = make([]types.Subnet, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Subnet - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSubnet(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSubscription(v **types.Subscription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Subscription - if *v == nil { - sv = &types.Subscription{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Destination = ptr.String(xtv) - } - - case strings.EqualFold("metric", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Metric = types.MetricType(xtv) - } - - case strings.EqualFold("period", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Period = types.PeriodType(xtv) - } - - case strings.EqualFold("source", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Source = ptr.String(xtv) - } - - case strings.EqualFold("statistic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Statistic = types.StatisticType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubscriptionList(v *[]types.Subscription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Subscription - if *v == nil { - sv = make([]types.Subscription, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Subscription - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSubscription(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSubscriptionListUnwrapped(v *[]types.Subscription, decoder smithyxml.NodeDecoder) error { - var sv []types.Subscription - if *v == nil { - sv = make([]types.Subscription, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Subscription - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSubscription(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationItem(v **types.SuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SuccessfulInstanceCreditSpecificationItem - if *v == nil { - sv = &types.SuccessfulInstanceCreditSpecificationItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationSet(v *[]types.SuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SuccessfulInstanceCreditSpecificationItem - if *v == nil { - sv = make([]types.SuccessfulInstanceCreditSpecificationItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SuccessfulInstanceCreditSpecificationItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationSetUnwrapped(v *[]types.SuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error { - var sv []types.SuccessfulInstanceCreditSpecificationItem - if *v == nil { - sv = make([]types.SuccessfulInstanceCreditSpecificationItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SuccessfulInstanceCreditSpecificationItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletion(v **types.SuccessfulQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.SuccessfulQueuedPurchaseDeletion - if *v == nil { - sv = &types.SuccessfulQueuedPurchaseDeletion{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletionSet(v *[]types.SuccessfulQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SuccessfulQueuedPurchaseDeletion - if *v == nil { - sv = make([]types.SuccessfulQueuedPurchaseDeletion, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SuccessfulQueuedPurchaseDeletion - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletion(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletionSetUnwrapped(v *[]types.SuccessfulQueuedPurchaseDeletion, decoder smithyxml.NodeDecoder) error { - var sv []types.SuccessfulQueuedPurchaseDeletion - if *v == nil { - sv = make([]types.SuccessfulQueuedPurchaseDeletion, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SuccessfulQueuedPurchaseDeletion - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletion(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSupportedAdditionalProcessorFeatureList(v *[]types.SupportedAdditionalProcessorFeature, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.SupportedAdditionalProcessorFeature - if *v == nil { - sv = make([]types.SupportedAdditionalProcessorFeature, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.SupportedAdditionalProcessorFeature - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.SupportedAdditionalProcessorFeature(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSupportedAdditionalProcessorFeatureListUnwrapped(v *[]types.SupportedAdditionalProcessorFeature, decoder smithyxml.NodeDecoder) error { - var sv []types.SupportedAdditionalProcessorFeature - if *v == nil { - sv = make([]types.SupportedAdditionalProcessorFeature, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.SupportedAdditionalProcessorFeature - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.SupportedAdditionalProcessorFeature(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentSupportedIpAddressTypes(v *[]types.ServiceConnectivityType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ServiceConnectivityType - if *v == nil { - sv = make([]types.ServiceConnectivityType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ServiceConnectivityType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.ServiceConnectivityType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentSupportedIpAddressTypesUnwrapped(v *[]types.ServiceConnectivityType, decoder smithyxml.NodeDecoder) error { - var sv []types.ServiceConnectivityType - if *v == nil { - sv = make([]types.ServiceConnectivityType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ServiceConnectivityType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.ServiceConnectivityType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Tag - if *v == nil { - sv = &types.Tag{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Key = ptr.String(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTagDescription(v **types.TagDescription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TagDescription - if *v == nil { - sv = &types.TagDescription{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Key = ptr.String(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.ResourceType(xtv) - } - - case strings.EqualFold("value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTagDescriptionList(v *[]types.TagDescription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TagDescription - if *v == nil { - sv = make([]types.TagDescription, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TagDescription - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTagDescription(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTagDescriptionListUnwrapped(v *[]types.TagDescription, decoder smithyxml.NodeDecoder) error { - var sv []types.TagDescription - if *v == nil { - sv = make([]types.TagDescription, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TagDescription - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTagDescription(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTagList(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Tag - if *v == nil { - sv = make([]types.Tag, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Tag - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTagListUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { - var sv []types.Tag - if *v == nil { - sv = make([]types.Tag, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Tag - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTagSpecification(v **types.TagSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TagSpecification - if *v == nil { - sv = &types.TagSpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.ResourceType(xtv) - } - - case strings.EqualFold("Tag", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTagSpecificationList(v *[]types.TagSpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TagSpecification - if *v == nil { - sv = make([]types.TagSpecification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TagSpecification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTagSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTagSpecificationListUnwrapped(v *[]types.TagSpecification, decoder smithyxml.NodeDecoder) error { - var sv []types.TagSpecification - if *v == nil { - sv = make([]types.TagSpecification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TagSpecification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTagSpecification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTargetCapacitySpecification(v **types.TargetCapacitySpecification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TargetCapacitySpecification - if *v == nil { - sv = &types.TargetCapacitySpecification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("defaultTargetCapacityType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DefaultTargetCapacityType = types.DefaultTargetCapacityType(xtv) - } - - case strings.EqualFold("onDemandTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.OnDemandTargetCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("spotTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SpotTargetCapacity = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("targetCapacityUnitType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetCapacityUnitType = types.TargetCapacityUnitType(xtv) - } - - case strings.EqualFold("totalTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalTargetCapacity = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetConfiguration(v **types.TargetConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TargetConfiguration - if *v == nil { - sv = &types.TargetConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.InstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("offeringId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OfferingId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetGroup(v **types.TargetGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TargetGroup - if *v == nil { - sv = &types.TargetGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetGroups(v *[]types.TargetGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TargetGroup - if *v == nil { - sv = make([]types.TargetGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TargetGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTargetGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetGroupsUnwrapped(v *[]types.TargetGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.TargetGroup - if *v == nil { - sv = make([]types.TargetGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TargetGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTargetGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTargetGroupsConfig(v **types.TargetGroupsConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TargetGroupsConfig - if *v == nil { - sv = &types.TargetGroupsConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("targetGroups", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTargetGroups(&sv.TargetGroups, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetNetwork(v **types.TargetNetwork, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TargetNetwork - if *v == nil { - sv = &types.TargetNetwork{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("securityGroups", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAssociationStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetNetworkId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetNetworkId = ptr.String(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetNetworkSet(v *[]types.TargetNetwork, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TargetNetwork - if *v == nil { - sv = make([]types.TargetNetwork, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TargetNetwork - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTargetNetwork(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetNetworkSetUnwrapped(v *[]types.TargetNetwork, decoder smithyxml.NodeDecoder) error { - var sv []types.TargetNetwork - if *v == nil { - sv = make([]types.TargetNetwork, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TargetNetwork - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTargetNetwork(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTargetReservationValue(v **types.TargetReservationValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TargetReservationValue - if *v == nil { - sv = &types.TargetReservationValue{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservationValue", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservationValue(&sv.ReservationValue, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTargetConfiguration(&sv.TargetConfiguration, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetReservationValueSet(v *[]types.TargetReservationValue, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TargetReservationValue - if *v == nil { - sv = make([]types.TargetReservationValue, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TargetReservationValue - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTargetReservationValue(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTargetReservationValueSetUnwrapped(v *[]types.TargetReservationValue, decoder smithyxml.NodeDecoder) error { - var sv []types.TargetReservationValue - if *v == nil { - sv = make([]types.TargetReservationValue, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TargetReservationValue - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTargetReservationValue(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTerminateConnectionStatus(v **types.TerminateConnectionStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TerminateConnectionStatus - if *v == nil { - sv = &types.TerminateConnectionStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("connectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ConnectionId = ptr.String(xtv) - } - - case strings.EqualFold("currentStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnConnectionStatus(&sv.CurrentStatus, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("previousStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnConnectionStatus(&sv.PreviousStatus, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTerminateConnectionStatusSet(v *[]types.TerminateConnectionStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TerminateConnectionStatus - if *v == nil { - sv = make([]types.TerminateConnectionStatus, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TerminateConnectionStatus - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTerminateConnectionStatus(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTerminateConnectionStatusSetUnwrapped(v *[]types.TerminateConnectionStatus, decoder smithyxml.NodeDecoder) error { - var sv []types.TerminateConnectionStatus - if *v == nil { - sv = make([]types.TerminateConnectionStatus, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TerminateConnectionStatus - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTerminateConnectionStatus(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentThreadsPerCoreList(v *[]int32, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col int32 - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - col = int32(i64) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentThreadsPerCoreListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { - var sv []int32 - if *v == nil { - sv = make([]int32, 0) - } else { - sv = *v - } - - switch { - default: - var mv int32 - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - mv = int32(i64) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentThroughResourcesStatement(v **types.ThroughResourcesStatement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ThroughResourcesStatement - if *v == nil { - sv = &types.ThroughResourcesStatement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceStatement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResourceStatement(&sv.ResourceStatement, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentThroughResourcesStatementList(v *[]types.ThroughResourcesStatement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ThroughResourcesStatement - if *v == nil { - sv = make([]types.ThroughResourcesStatement, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.ThroughResourcesStatement - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentThroughResourcesStatement(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentThroughResourcesStatementListUnwrapped(v *[]types.ThroughResourcesStatement, decoder smithyxml.NodeDecoder) error { - var sv []types.ThroughResourcesStatement - if *v == nil { - sv = make([]types.ThroughResourcesStatement, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ThroughResourcesStatement - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentThroughResourcesStatement(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTotalLocalStorageGB(v **types.TotalLocalStorageGB, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TotalLocalStorageGB - if *v == nil { - sv = &types.TotalLocalStorageGB{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Max = ptr.Float64(f64) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Min = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorFilter(v **types.TrafficMirrorFilter, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficMirrorFilter - if *v == nil { - sv = &types.TrafficMirrorFilter{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("egressFilterRuleSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRuleList(&sv.EgressFilterRules, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ingressFilterRuleSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRuleList(&sv.IngressFilterRules, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkServiceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorNetworkServiceList(&sv.NetworkServices, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trafficMirrorFilterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorFilterId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorFilterRule(v **types.TrafficMirrorFilterRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficMirrorFilterRule - if *v == nil { - sv = &types.TrafficMirrorFilterRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("destinationPortRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorPortRange(&sv.DestinationPortRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Protocol = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ruleAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RuleAction = types.TrafficMirrorRuleAction(xtv) - } - - case strings.EqualFold("ruleNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RuleNumber = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("sourceCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("sourcePortRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorPortRange(&sv.SourcePortRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trafficDirection", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficDirection = types.TrafficDirection(xtv) - } - - case strings.EqualFold("trafficMirrorFilterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorFilterId = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorFilterRuleId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorFilterRuleId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorFilterRuleList(v *[]types.TrafficMirrorFilterRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficMirrorFilterRule - if *v == nil { - sv = make([]types.TrafficMirrorFilterRule, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TrafficMirrorFilterRule - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorFilterRuleListUnwrapped(v *[]types.TrafficMirrorFilterRule, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficMirrorFilterRule - if *v == nil { - sv = make([]types.TrafficMirrorFilterRule, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficMirrorFilterRule - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTrafficMirrorFilterSet(v *[]types.TrafficMirrorFilter, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficMirrorFilter - if *v == nil { - sv = make([]types.TrafficMirrorFilter, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TrafficMirrorFilter - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorFilterSetUnwrapped(v *[]types.TrafficMirrorFilter, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficMirrorFilter - if *v == nil { - sv = make([]types.TrafficMirrorFilter, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficMirrorFilter - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTrafficMirrorNetworkServiceList(v *[]types.TrafficMirrorNetworkService, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficMirrorNetworkService - if *v == nil { - sv = make([]types.TrafficMirrorNetworkService, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TrafficMirrorNetworkService - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.TrafficMirrorNetworkService(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorNetworkServiceListUnwrapped(v *[]types.TrafficMirrorNetworkService, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficMirrorNetworkService - if *v == nil { - sv = make([]types.TrafficMirrorNetworkService, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficMirrorNetworkService - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.TrafficMirrorNetworkService(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTrafficMirrorPortRange(v **types.TrafficMirrorPortRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficMirrorPortRange - if *v == nil { - sv = &types.TrafficMirrorPortRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fromPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.FromPort = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("toPort", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ToPort = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorSession(v **types.TrafficMirrorSession, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficMirrorSession - if *v == nil { - sv = &types.TrafficMirrorSession{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("packetLength", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PacketLength = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("sessionNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SessionNumber = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trafficMirrorFilterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorFilterId = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorSessionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorSessionId = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorTargetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorTargetId = ptr.String(xtv) - } - - case strings.EqualFold("virtualNetworkId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VirtualNetworkId = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorSessionSet(v *[]types.TrafficMirrorSession, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficMirrorSession - if *v == nil { - sv = make([]types.TrafficMirrorSession, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TrafficMirrorSession - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorSessionSetUnwrapped(v *[]types.TrafficMirrorSession, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficMirrorSession - if *v == nil { - sv = make([]types.TrafficMirrorSession, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficMirrorSession - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTrafficMirrorTarget(v **types.TrafficMirrorTarget, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficMirrorTarget - if *v == nil { - sv = &types.TrafficMirrorTarget{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("gatewayLoadBalancerEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GatewayLoadBalancerEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("networkLoadBalancerArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkLoadBalancerArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trafficMirrorTargetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorTargetId = ptr.String(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.TrafficMirrorTargetType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorTargetSet(v *[]types.TrafficMirrorTarget, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficMirrorTarget - if *v == nil { - sv = make([]types.TrafficMirrorTarget, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TrafficMirrorTarget - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTrafficMirrorTarget(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrafficMirrorTargetSetUnwrapped(v *[]types.TrafficMirrorTarget, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficMirrorTarget - if *v == nil { - sv = make([]types.TrafficMirrorTarget, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficMirrorTarget - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTrafficMirrorTarget(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGateway(v **types.TransitGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGateway - if *v == nil { - sv = &types.TransitGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("options", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayOptions(&sv.Options, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayArn = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAssociation(v **types.TransitGatewayAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayAssociation - if *v == nil { - sv = &types.TransitGatewayAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAssociationState(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachment(v **types.TransitGatewayAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayAttachment - if *v == nil { - sv = &types.TransitGatewayAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAttachmentState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayOwnerId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentAssociation(v **types.TransitGatewayAttachmentAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayAttachmentAssociation - if *v == nil { - sv = &types.TransitGatewayAttachmentAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAssociationState(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfiguration(v **types.TransitGatewayAttachmentBgpConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayAttachmentBgpConfiguration - if *v == nil { - sv = &types.TransitGatewayAttachmentBgpConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bgpStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BgpStatus = types.BgpStatus(xtv) - } - - case strings.EqualFold("peerAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeerAddress = ptr.String(xtv) - } - - case strings.EqualFold("peerAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PeerAsn = ptr.Int64(i64) - } - - case strings.EqualFold("transitGatewayAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAddress = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TransitGatewayAsn = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfigurationList(v *[]types.TransitGatewayAttachmentBgpConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayAttachmentBgpConfiguration - if *v == nil { - sv = make([]types.TransitGatewayAttachmentBgpConfiguration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayAttachmentBgpConfiguration - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfigurationListUnwrapped(v *[]types.TransitGatewayAttachmentBgpConfiguration, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayAttachmentBgpConfiguration - if *v == nil { - sv = make([]types.TransitGatewayAttachmentBgpConfiguration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayAttachmentBgpConfiguration - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayAttachmentList(v *[]types.TransitGatewayAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayAttachment - if *v == nil { - sv = make([]types.TransitGatewayAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentListUnwrapped(v *[]types.TransitGatewayAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayAttachment - if *v == nil { - sv = make([]types.TransitGatewayAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagation(v **types.TransitGatewayAttachmentPropagation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayAttachmentPropagation - if *v == nil { - sv = &types.TransitGatewayAttachmentPropagation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayPropagationState(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagationList(v *[]types.TransitGatewayAttachmentPropagation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayAttachmentPropagation - if *v == nil { - sv = make([]types.TransitGatewayAttachmentPropagation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayAttachmentPropagation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagationListUnwrapped(v *[]types.TransitGatewayAttachmentPropagation, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayAttachmentPropagation - if *v == nil { - sv = make([]types.TransitGatewayAttachmentPropagation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayAttachmentPropagation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayConnect(v **types.TransitGatewayConnect, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayConnect - if *v == nil { - sv = &types.TransitGatewayConnect{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("options", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnectOptions(&sv.Options, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAttachmentState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("transportTransitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransportTransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayConnectList(v *[]types.TransitGatewayConnect, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayConnect - if *v == nil { - sv = make([]types.TransitGatewayConnect, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayConnect - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayConnectListUnwrapped(v *[]types.TransitGatewayConnect, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayConnect - if *v == nil { - sv = make([]types.TransitGatewayConnect, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayConnect - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayConnectOptions(v **types.TransitGatewayConnectOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayConnectOptions - if *v == nil { - sv = &types.TransitGatewayConnectOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = types.ProtocolValue(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayConnectPeer(v **types.TransitGatewayConnectPeer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayConnectPeer - if *v == nil { - sv = &types.TransitGatewayConnectPeer{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("connectPeerConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeerConfiguration(&sv.ConnectPeerConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayConnectPeerState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayConnectPeerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayConnectPeerId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayConnectPeerConfiguration(v **types.TransitGatewayConnectPeerConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayConnectPeerConfiguration - if *v == nil { - sv = &types.TransitGatewayConnectPeerConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bgpConfigurations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentBgpConfigurationList(&sv.BgpConfigurations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("insideCidrBlocks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInsideCidrBlocksStringList(&sv.InsideCidrBlocks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("peerAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeerAddress = ptr.String(xtv) - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = types.ProtocolValue(xtv) - } - - case strings.EqualFold("transitGatewayAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayConnectPeerList(v *[]types.TransitGatewayConnectPeer, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayConnectPeer - if *v == nil { - sv = make([]types.TransitGatewayConnectPeer, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayConnectPeer - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayConnectPeerListUnwrapped(v *[]types.TransitGatewayConnectPeer, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayConnectPeer - if *v == nil { - sv = make([]types.TransitGatewayConnectPeer, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayConnectPeer - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayList(v *[]types.TransitGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGateway - if *v == nil { - sv = make([]types.TransitGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayListUnwrapped(v *[]types.TransitGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGateway - if *v == nil { - sv = make([]types.TransitGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupMembers(v **types.TransitGatewayMulticastDeregisteredGroupMembers, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastDeregisteredGroupMembers - if *v == nil { - sv = &types.TransitGatewayMulticastDeregisteredGroupMembers{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deregisteredNetworkInterfaceIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.DeregisteredNetworkInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("groupIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupSources(v **types.TransitGatewayMulticastDeregisteredGroupSources, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastDeregisteredGroupSources - if *v == nil { - sv = &types.TransitGatewayMulticastDeregisteredGroupSources{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deregisteredNetworkInterfaceIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.DeregisteredNetworkInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("groupIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(v **types.TransitGatewayMulticastDomain, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastDomain - if *v == nil { - sv = &types.TransitGatewayMulticastDomain{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("options", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainOptions(&sv.Options, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayMulticastDomainState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayMulticastDomainArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainArn = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociation(v **types.TransitGatewayMulticastDomainAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastDomainAssociation - if *v == nil { - sv = &types.TransitGatewayMulticastDomainAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("subnet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetAssociation(&sv.Subnet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociationList(v *[]types.TransitGatewayMulticastDomainAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayMulticastDomainAssociation - if *v == nil { - sv = make([]types.TransitGatewayMulticastDomainAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayMulticastDomainAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociationListUnwrapped(v *[]types.TransitGatewayMulticastDomainAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayMulticastDomainAssociation - if *v == nil { - sv = make([]types.TransitGatewayMulticastDomainAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayMulticastDomainAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(v **types.TransitGatewayMulticastDomainAssociations, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastDomainAssociations - if *v == nil { - sv = &types.TransitGatewayMulticastDomainAssociations{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("subnets", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetAssociationList(&sv.Subnets, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainList(v *[]types.TransitGatewayMulticastDomain, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayMulticastDomain - if *v == nil { - sv = make([]types.TransitGatewayMulticastDomain, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayMulticastDomain - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainListUnwrapped(v *[]types.TransitGatewayMulticastDomain, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayMulticastDomain - if *v == nil { - sv = make([]types.TransitGatewayMulticastDomain, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayMulticastDomain - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayMulticastDomainOptions(v **types.TransitGatewayMulticastDomainOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastDomainOptions - if *v == nil { - sv = &types.TransitGatewayMulticastDomainOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("autoAcceptSharedAssociations", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AutoAcceptSharedAssociations = types.AutoAcceptSharedAssociationsValue(xtv) - } - - case strings.EqualFold("igmpv2Support", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Igmpv2Support = types.Igmpv2SupportValue(xtv) - } - - case strings.EqualFold("staticSourcesSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StaticSourcesSupport = types.StaticSourcesSupportValue(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastGroup(v **types.TransitGatewayMulticastGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastGroup - if *v == nil { - sv = &types.TransitGatewayMulticastGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("groupMember", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.GroupMember = ptr.Bool(xtv) - } - - case strings.EqualFold("groupSource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.GroupSource = ptr.Bool(xtv) - } - - case strings.EqualFold("memberType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MemberType = types.MembershipType(xtv) - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("sourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceType = types.MembershipType(xtv) - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastGroupList(v *[]types.TransitGatewayMulticastGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayMulticastGroup - if *v == nil { - sv = make([]types.TransitGatewayMulticastGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayMulticastGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastGroupListUnwrapped(v *[]types.TransitGatewayMulticastGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayMulticastGroup - if *v == nil { - sv = make([]types.TransitGatewayMulticastGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayMulticastGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupMembers(v **types.TransitGatewayMulticastRegisteredGroupMembers, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastRegisteredGroupMembers - if *v == nil { - sv = &types.TransitGatewayMulticastRegisteredGroupMembers{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("registeredNetworkInterfaceIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.RegisteredNetworkInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupSources(v **types.TransitGatewayMulticastRegisteredGroupSources, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayMulticastRegisteredGroupSources - if *v == nil { - sv = &types.TransitGatewayMulticastRegisteredGroupSources{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("registeredNetworkInterfaceIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.RegisteredNetworkInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayMulticastDomainId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayMulticastDomainId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayOptions(v **types.TransitGatewayOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayOptions - if *v == nil { - sv = &types.TransitGatewayOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amazonSideAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AmazonSideAsn = ptr.Int64(i64) - } - - case strings.EqualFold("associationDefaultRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationDefaultRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("autoAcceptSharedAttachments", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AutoAcceptSharedAttachments = types.AutoAcceptSharedAttachmentsValue(xtv) - } - - case strings.EqualFold("defaultRouteTableAssociation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DefaultRouteTableAssociation = types.DefaultRouteTableAssociationValue(xtv) - } - - case strings.EqualFold("defaultRouteTablePropagation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DefaultRouteTablePropagation = types.DefaultRouteTablePropagationValue(xtv) - } - - case strings.EqualFold("dnsSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsSupport = types.DnsSupportValue(xtv) - } - - case strings.EqualFold("multicastSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MulticastSupport = types.MulticastSupportValue(xtv) - } - - case strings.EqualFold("propagationDefaultRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PropagationDefaultRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupReferencingSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SecurityGroupReferencingSupport = types.SecurityGroupReferencingSupportValue(xtv) - } - - case strings.EqualFold("transitGatewayCidrBlocks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.TransitGatewayCidrBlocks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpnEcmpSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnEcmpSupport = types.VpnEcmpSupportValue(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(v **types.TransitGatewayPeeringAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPeeringAttachment - if *v == nil { - sv = &types.TransitGatewayPeeringAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accepterTgwInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPeeringTgwInfo(&sv.AccepterTgwInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("accepterTransitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AccepterTransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("options", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentOptions(&sv.Options, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("requesterTgwInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPeeringTgwInfo(&sv.RequesterTgwInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAttachmentState(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPeeringAttachmentStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentList(v *[]types.TransitGatewayPeeringAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayPeeringAttachment - if *v == nil { - sv = make([]types.TransitGatewayPeeringAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayPeeringAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentListUnwrapped(v *[]types.TransitGatewayPeeringAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayPeeringAttachment - if *v == nil { - sv = make([]types.TransitGatewayPeeringAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayPeeringAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentOptions(v **types.TransitGatewayPeeringAttachmentOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPeeringAttachmentOptions - if *v == nil { - sv = &types.TransitGatewayPeeringAttachmentOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dynamicRouting", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DynamicRouting = types.DynamicRoutingValue(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyRule(v **types.TransitGatewayPolicyRule, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPolicyRule - if *v == nil { - sv = &types.TransitGatewayPolicyRule{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("destinationPortRange", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationPortRange = ptr.String(xtv) - } - - case strings.EqualFold("metaData", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyRuleMetaData(&sv.MetaData, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("sourceCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("sourcePortRange", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourcePortRange = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyRuleMetaData(v **types.TransitGatewayPolicyRuleMetaData, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPolicyRuleMetaData - if *v == nil { - sv = &types.TransitGatewayPolicyRuleMetaData{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("metaDataKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MetaDataKey = ptr.String(xtv) - } - - case strings.EqualFold("metaDataValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MetaDataValue = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTable(v **types.TransitGatewayPolicyTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPolicyTable - if *v == nil { - sv = &types.TransitGatewayPolicyTable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayPolicyTableState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayPolicyTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayPolicyTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociation(v **types.TransitGatewayPolicyTableAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPolicyTableAssociation - if *v == nil { - sv = &types.TransitGatewayPolicyTableAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAssociationState(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayPolicyTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayPolicyTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociationList(v *[]types.TransitGatewayPolicyTableAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayPolicyTableAssociation - if *v == nil { - sv = make([]types.TransitGatewayPolicyTableAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayPolicyTableAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociationListUnwrapped(v *[]types.TransitGatewayPolicyTableAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayPolicyTableAssociation - if *v == nil { - sv = make([]types.TransitGatewayPolicyTableAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayPolicyTableAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableEntry(v **types.TransitGatewayPolicyTableEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPolicyTableEntry - if *v == nil { - sv = &types.TransitGatewayPolicyTableEntry{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("policyRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyRule(&sv.PolicyRule, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("policyRuleNumber", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyRuleNumber = ptr.String(xtv) - } - - case strings.EqualFold("targetRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableEntryList(v *[]types.TransitGatewayPolicyTableEntry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayPolicyTableEntry - if *v == nil { - sv = make([]types.TransitGatewayPolicyTableEntry, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayPolicyTableEntry - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableEntry(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableEntryListUnwrapped(v *[]types.TransitGatewayPolicyTableEntry, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayPolicyTableEntry - if *v == nil { - sv = make([]types.TransitGatewayPolicyTableEntry, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayPolicyTableEntry - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableEntry(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableList(v *[]types.TransitGatewayPolicyTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayPolicyTable - if *v == nil { - sv = make([]types.TransitGatewayPolicyTable, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayPolicyTable - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTable(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPolicyTableListUnwrapped(v *[]types.TransitGatewayPolicyTable, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayPolicyTable - if *v == nil { - sv = make([]types.TransitGatewayPolicyTable, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayPolicyTable - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTable(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayPrefixListAttachment(v **types.TransitGatewayPrefixListAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPrefixListAttachment - if *v == nil { - sv = &types.TransitGatewayPrefixListAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(v **types.TransitGatewayPrefixListReference, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPrefixListReference - if *v == nil { - sv = &types.TransitGatewayPrefixListReference{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("blackhole", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Blackhole = ptr.Bool(xtv) - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("prefixListOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListOwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayPrefixListReferenceState(xtv) - } - - case strings.EqualFold("transitGatewayAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListAttachment(&sv.TransitGatewayAttachment, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPrefixListReferenceSet(v *[]types.TransitGatewayPrefixListReference, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayPrefixListReference - if *v == nil { - sv = make([]types.TransitGatewayPrefixListReference, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayPrefixListReference - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayPrefixListReferenceSetUnwrapped(v *[]types.TransitGatewayPrefixListReference, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayPrefixListReference - if *v == nil { - sv = make([]types.TransitGatewayPrefixListReference, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayPrefixListReference - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayPropagation(v **types.TransitGatewayPropagation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayPropagation - if *v == nil { - sv = &types.TransitGatewayPropagation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayPropagationState(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableAnnouncementId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableAnnouncementId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRoute(v **types.TransitGatewayRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRoute - if *v == nil { - sv = &types.TransitGatewayRoute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayRouteState(xtv) - } - - case strings.EqualFold("transitGatewayAttachments", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteAttachmentList(&sv.TransitGatewayAttachments, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayRouteTableAnnouncementId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableAnnouncementId = ptr.String(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.TransitGatewayRouteType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteAttachment(v **types.TransitGatewayRouteAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRouteAttachment - if *v == nil { - sv = &types.TransitGatewayRouteAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteAttachmentList(v *[]types.TransitGatewayRouteAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayRouteAttachment - if *v == nil { - sv = make([]types.TransitGatewayRouteAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayRouteAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayRouteAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteAttachmentListUnwrapped(v *[]types.TransitGatewayRouteAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayRouteAttachment - if *v == nil { - sv = make([]types.TransitGatewayRouteAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayRouteAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayRouteAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayRouteList(v *[]types.TransitGatewayRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayRoute - if *v == nil { - sv = make([]types.TransitGatewayRoute, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayRoute - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteListUnwrapped(v *[]types.TransitGatewayRoute, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayRoute - if *v == nil { - sv = make([]types.TransitGatewayRoute, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayRoute - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayRouteTable(v **types.TransitGatewayRouteTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRouteTable - if *v == nil { - sv = &types.TransitGatewayRouteTable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("defaultAssociationRouteTable", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DefaultAssociationRouteTable = ptr.Bool(xtv) - } - - case strings.EqualFold("defaultPropagationRouteTable", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DefaultPropagationRouteTable = ptr.Bool(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayRouteTableState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncement(v **types.TransitGatewayRouteTableAnnouncement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRouteTableAnnouncement - if *v == nil { - sv = &types.TransitGatewayRouteTableAnnouncement{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("announcementDirection", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AnnouncementDirection = types.TransitGatewayRouteTableAnnouncementDirection(xtv) - } - - case strings.EqualFold("coreNetworkId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoreNetworkId = ptr.String(xtv) - } - - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("peerCoreNetworkId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeerCoreNetworkId = ptr.String(xtv) - } - - case strings.EqualFold("peeringAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeeringAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("peerTransitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeerTransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayRouteTableAnnouncementState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableAnnouncementId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableAnnouncementId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncementList(v *[]types.TransitGatewayRouteTableAnnouncement, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayRouteTableAnnouncement - if *v == nil { - sv = make([]types.TransitGatewayRouteTableAnnouncement, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayRouteTableAnnouncement - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncement(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncementListUnwrapped(v *[]types.TransitGatewayRouteTableAnnouncement, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayRouteTableAnnouncement - if *v == nil { - sv = make([]types.TransitGatewayRouteTableAnnouncement, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayRouteTableAnnouncement - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncement(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociation(v **types.TransitGatewayRouteTableAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRouteTableAssociation - if *v == nil { - sv = &types.TransitGatewayRouteTableAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAssociationState(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociationList(v *[]types.TransitGatewayRouteTableAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayRouteTableAssociation - if *v == nil { - sv = make([]types.TransitGatewayRouteTableAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayRouteTableAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociationListUnwrapped(v *[]types.TransitGatewayRouteTableAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayRouteTableAssociation - if *v == nil { - sv = make([]types.TransitGatewayRouteTableAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayRouteTableAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayRouteTableList(v *[]types.TransitGatewayRouteTable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayRouteTable - if *v == nil { - sv = make([]types.TransitGatewayRouteTable, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayRouteTable - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTableListUnwrapped(v *[]types.TransitGatewayRouteTable, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayRouteTable - if *v == nil { - sv = make([]types.TransitGatewayRouteTable, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayRouteTable - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagation(v **types.TransitGatewayRouteTablePropagation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRouteTablePropagation - if *v == nil { - sv = &types.TransitGatewayRouteTablePropagation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TransitGatewayAttachmentResourceType(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayPropagationState(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableAnnouncementId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayRouteTableAnnouncementId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagationList(v *[]types.TransitGatewayRouteTablePropagation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayRouteTablePropagation - if *v == nil { - sv = make([]types.TransitGatewayRouteTablePropagation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayRouteTablePropagation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagationListUnwrapped(v *[]types.TransitGatewayRouteTablePropagation, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayRouteTablePropagation - if *v == nil { - sv = make([]types.TransitGatewayRouteTablePropagation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayRouteTablePropagation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayRouteTableRoute(v **types.TransitGatewayRouteTableRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayRouteTableRoute - if *v == nil { - sv = &types.TransitGatewayRouteTableRoute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("destinationCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidr = ptr.String(xtv) - } - - case strings.EqualFold("prefixListId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PrefixListId = ptr.String(xtv) - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = ptr.String(xtv) - } - - case strings.EqualFold("routeOrigin", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RouteOrigin = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(v **types.TransitGatewayVpcAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayVpcAttachment - if *v == nil { - sv = &types.TransitGatewayVpcAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case strings.EqualFold("options", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentOptions(&sv.Options, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.TransitGatewayAttachmentState(xtv) - } - - case strings.EqualFold("subnetIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SubnetIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - case strings.EqualFold("vpcOwnerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcOwnerId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentList(v *[]types.TransitGatewayVpcAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TransitGatewayVpcAttachment - if *v == nil { - sv = make([]types.TransitGatewayVpcAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TransitGatewayVpcAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentListUnwrapped(v *[]types.TransitGatewayVpcAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.TransitGatewayVpcAttachment - if *v == nil { - sv = make([]types.TransitGatewayVpcAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TransitGatewayVpcAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentOptions(v **types.TransitGatewayVpcAttachmentOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TransitGatewayVpcAttachmentOptions - if *v == nil { - sv = &types.TransitGatewayVpcAttachmentOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("applianceModeSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ApplianceModeSupport = types.ApplianceModeSupportValue(xtv) - } - - case strings.EqualFold("dnsSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsSupport = types.DnsSupportValue(xtv) - } - - case strings.EqualFold("ipv6Support", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Support = types.Ipv6SupportValue(xtv) - } - - case strings.EqualFold("securityGroupReferencingSupport", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SecurityGroupReferencingSupport = types.SecurityGroupReferencingSupportValue(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrunkInterfaceAssociation(v **types.TrunkInterfaceAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrunkInterfaceAssociation - if *v == nil { - sv = &types.TrunkInterfaceAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("branchInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BranchInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("greKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.GreKey = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("interfaceProtocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InterfaceProtocol = types.InterfaceProtocolType(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trunkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrunkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("vlanId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VlanId = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrunkInterfaceAssociationList(v *[]types.TrunkInterfaceAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrunkInterfaceAssociation - if *v == nil { - sv = make([]types.TrunkInterfaceAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TrunkInterfaceAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTrunkInterfaceAssociationListUnwrapped(v *[]types.TrunkInterfaceAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.TrunkInterfaceAssociation - if *v == nil { - sv = make([]types.TrunkInterfaceAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrunkInterfaceAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentTunnelOption(v **types.TunnelOption, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TunnelOption - if *v == nil { - sv = &types.TunnelOption{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dpdTimeoutAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DpdTimeoutAction = ptr.String(xtv) - } - - case strings.EqualFold("dpdTimeoutSeconds", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DpdTimeoutSeconds = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("enableTunnelLifecycleControl", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableTunnelLifecycleControl = ptr.Bool(xtv) - } - - case strings.EqualFold("ikeVersionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIKEVersionsList(&sv.IkeVersions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("logOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnTunnelLogOptions(&sv.LogOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("outsideIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutsideIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("phase1DHGroupNumberSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPhase1DHGroupNumbersList(&sv.Phase1DHGroupNumbers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("phase1EncryptionAlgorithmSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPhase1EncryptionAlgorithmsList(&sv.Phase1EncryptionAlgorithms, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("phase1IntegrityAlgorithmSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPhase1IntegrityAlgorithmsList(&sv.Phase1IntegrityAlgorithms, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("phase1LifetimeSeconds", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Phase1LifetimeSeconds = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("phase2DHGroupNumberSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPhase2DHGroupNumbersList(&sv.Phase2DHGroupNumbers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("phase2EncryptionAlgorithmSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPhase2EncryptionAlgorithmsList(&sv.Phase2EncryptionAlgorithms, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("phase2IntegrityAlgorithmSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPhase2IntegrityAlgorithmsList(&sv.Phase2IntegrityAlgorithms, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("phase2LifetimeSeconds", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Phase2LifetimeSeconds = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("preSharedKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PreSharedKey = ptr.String(xtv) - } - - case strings.EqualFold("rekeyFuzzPercentage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RekeyFuzzPercentage = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("rekeyMarginTimeSeconds", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RekeyMarginTimeSeconds = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("replayWindowSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ReplayWindowSize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("startupAction", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StartupAction = ptr.String(xtv) - } - - case strings.EqualFold("tunnelInsideCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TunnelInsideCidr = ptr.String(xtv) - } - - case strings.EqualFold("tunnelInsideIpv6Cidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TunnelInsideIpv6Cidr = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTunnelOptionsList(v *[]types.TunnelOption, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TunnelOption - if *v == nil { - sv = make([]types.TunnelOption, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.TunnelOption - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentTunnelOption(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentTunnelOptionsListUnwrapped(v *[]types.TunnelOption, decoder smithyxml.NodeDecoder) error { - var sv []types.TunnelOption - if *v == nil { - sv = make([]types.TunnelOption, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TunnelOption - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentTunnelOption(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItem(v **types.UnsuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UnsuccessfulInstanceCreditSpecificationItem - if *v == nil { - sv = &types.UnsuccessfulInstanceCreditSpecificationItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItemError(&sv.Error, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItemError(v **types.UnsuccessfulInstanceCreditSpecificationItemError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UnsuccessfulInstanceCreditSpecificationItemError - if *v == nil { - sv = &types.UnsuccessfulInstanceCreditSpecificationItemError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.UnsuccessfulInstanceCreditSpecificationErrorCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationSet(v *[]types.UnsuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.UnsuccessfulInstanceCreditSpecificationItem - if *v == nil { - sv = make([]types.UnsuccessfulInstanceCreditSpecificationItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.UnsuccessfulInstanceCreditSpecificationItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationSetUnwrapped(v *[]types.UnsuccessfulInstanceCreditSpecificationItem, decoder smithyxml.NodeDecoder) error { - var sv []types.UnsuccessfulInstanceCreditSpecificationItem - if *v == nil { - sv = make([]types.UnsuccessfulInstanceCreditSpecificationItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.UnsuccessfulInstanceCreditSpecificationItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentUnsuccessfulItem(v **types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UnsuccessfulItem - if *v == nil { - sv = &types.UnsuccessfulItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("error", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemError(&sv.Error, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("resourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulItemError(v **types.UnsuccessfulItemError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UnsuccessfulItemError - if *v == nil { - sv = &types.UnsuccessfulItemError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulItemList(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.UnsuccessfulItem - if *v == nil { - sv = make([]types.UnsuccessfulItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.UnsuccessfulItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulItemListUnwrapped(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error { - var sv []types.UnsuccessfulItem - if *v == nil { - sv = make([]types.UnsuccessfulItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.UnsuccessfulItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentUnsuccessfulItemSet(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.UnsuccessfulItem - if *v == nil { - sv = make([]types.UnsuccessfulItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.UnsuccessfulItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUnsuccessfulItemSetUnwrapped(v *[]types.UnsuccessfulItem, decoder smithyxml.NodeDecoder) error { - var sv []types.UnsuccessfulItem - if *v == nil { - sv = make([]types.UnsuccessfulItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.UnsuccessfulItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentUnsuccessfulItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentUsageClassTypeList(v *[]types.UsageClassType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.UsageClassType - if *v == nil { - sv = make([]types.UsageClassType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.UsageClassType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.UsageClassType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUsageClassTypeListUnwrapped(v *[]types.UsageClassType, decoder smithyxml.NodeDecoder) error { - var sv []types.UsageClassType - if *v == nil { - sv = make([]types.UsageClassType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.UsageClassType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.UsageClassType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentUserBucketDetails(v **types.UserBucketDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UserBucketDetails - if *v == nil { - sv = &types.UserBucketDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("s3Bucket", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Bucket = ptr.String(xtv) - } - - case strings.EqualFold("s3Key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Key = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUserIdGroupPair(v **types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.UserIdGroupPair - if *v == nil { - sv = &types.UserIdGroupPair{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("groupName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupName = ptr.String(xtv) - } - - case strings.EqualFold("peeringStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PeeringStatus = ptr.String(xtv) - } - - case strings.EqualFold("userId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserId = ptr.String(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcPeeringConnectionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUserIdGroupPairList(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.UserIdGroupPair - if *v == nil { - sv = make([]types.UserIdGroupPair, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.UserIdGroupPair - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentUserIdGroupPair(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUserIdGroupPairListUnwrapped(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error { - var sv []types.UserIdGroupPair - if *v == nil { - sv = make([]types.UserIdGroupPair, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.UserIdGroupPair - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentUserIdGroupPair(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentUserIdGroupPairSet(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.UserIdGroupPair - if *v == nil { - sv = make([]types.UserIdGroupPair, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.UserIdGroupPair - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentUserIdGroupPair(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentUserIdGroupPairSetUnwrapped(v *[]types.UserIdGroupPair, decoder smithyxml.NodeDecoder) error { - var sv []types.UserIdGroupPair - if *v == nil { - sv = make([]types.UserIdGroupPair, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.UserIdGroupPair - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentUserIdGroupPair(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentValidationError(v **types.ValidationError, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ValidationError - if *v == nil { - sv = &types.ValidationError{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentValidationWarning(v **types.ValidationWarning, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ValidationWarning - if *v == nil { - sv = &types.ValidationWarning{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("errorSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentErrorSet(&sv.Errors, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentValueStringList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentValueStringListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVCpuCountRange(v **types.VCpuCountRange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VCpuCountRange - if *v == nil { - sv = &types.VCpuCountRange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("max", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Max = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("min", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Min = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVCpuInfo(v **types.VCpuInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VCpuInfo - if *v == nil { - sv = &types.VCpuInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("defaultCores", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DefaultCores = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("defaultThreadsPerCore", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DefaultThreadsPerCore = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("defaultVCpus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DefaultVCpus = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("validCores", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoreCountList(&sv.ValidCores, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("validThreadsPerCore", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentThreadsPerCoreList(&sv.ValidThreadsPerCore, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpoint(v **types.VerifiedAccessEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessEndpoint - if *v == nil { - sv = &types.VerifiedAccessEndpoint{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("applicationDomain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ApplicationDomain = ptr.String(xtv) - } - - case strings.EqualFold("attachmentType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttachmentType = types.VerifiedAccessEndpointAttachmentType(xtv) - } - - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreationTime = ptr.String(xtv) - } - - case strings.EqualFold("deletionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeletionTime = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("deviceValidationDomain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceValidationDomain = ptr.String(xtv) - } - - case strings.EqualFold("domainCertificateArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DomainCertificateArn = ptr.String(xtv) - } - - case strings.EqualFold("endpointDomain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EndpointDomain = ptr.String(xtv) - } - - case strings.EqualFold("endpointType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EndpointType = types.VerifiedAccessEndpointType(xtv) - } - - case strings.EqualFold("lastUpdatedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastUpdatedTime = ptr.String(xtv) - } - - case strings.EqualFold("loadBalancerOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpointLoadBalancerOptions(&sv.LoadBalancerOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpointEniOptions(&sv.NetworkInterfaceOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("securityGroupIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupIdList(&sv.SecurityGroupIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sseSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessSseSpecificationResponse(&sv.SseSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpointStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("verifiedAccessEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessGroupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessGroupId = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessInstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpointEniOptions(v **types.VerifiedAccessEndpointEniOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessEndpointEniOptions - if *v == nil { - sv = &types.VerifiedAccessEndpointEniOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("port", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Port = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = types.VerifiedAccessEndpointProtocol(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpointList(v *[]types.VerifiedAccessEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VerifiedAccessEndpoint - if *v == nil { - sv = make([]types.VerifiedAccessEndpoint, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VerifiedAccessEndpoint - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpointListUnwrapped(v *[]types.VerifiedAccessEndpoint, decoder smithyxml.NodeDecoder) error { - var sv []types.VerifiedAccessEndpoint - if *v == nil { - sv = make([]types.VerifiedAccessEndpoint, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VerifiedAccessEndpoint - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVerifiedAccessEndpointLoadBalancerOptions(v **types.VerifiedAccessEndpointLoadBalancerOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessEndpointLoadBalancerOptions - if *v == nil { - sv = &types.VerifiedAccessEndpointLoadBalancerOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("loadBalancerArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LoadBalancerArn = ptr.String(xtv) - } - - case strings.EqualFold("port", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Port = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = types.VerifiedAccessEndpointProtocol(xtv) - } - - case strings.EqualFold("subnetIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpointSubnetIdList(&sv.SubnetIds, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpointStatus(v **types.VerifiedAccessEndpointStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessEndpointStatus - if *v == nil { - sv = &types.VerifiedAccessEndpointStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.VerifiedAccessEndpointStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpointSubnetIdList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessEndpointSubnetIdListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVerifiedAccessGroup(v **types.VerifiedAccessGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessGroup - if *v == nil { - sv = &types.VerifiedAccessGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreationTime = ptr.String(xtv) - } - - case strings.EqualFold("deletionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeletionTime = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("lastUpdatedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastUpdatedTime = ptr.String(xtv) - } - - case strings.EqualFold("owner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Owner = ptr.String(xtv) - } - - case strings.EqualFold("sseSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessSseSpecificationResponse(&sv.SseSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("verifiedAccessGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessGroupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessGroupId = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessInstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessGroupList(v *[]types.VerifiedAccessGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VerifiedAccessGroup - if *v == nil { - sv = make([]types.VerifiedAccessGroup, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VerifiedAccessGroup - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVerifiedAccessGroup(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessGroupListUnwrapped(v *[]types.VerifiedAccessGroup, decoder smithyxml.NodeDecoder) error { - var sv []types.VerifiedAccessGroup - if *v == nil { - sv = make([]types.VerifiedAccessGroup, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VerifiedAccessGroup - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVerifiedAccessGroup(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVerifiedAccessInstance(v **types.VerifiedAccessInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessInstance - if *v == nil { - sv = &types.VerifiedAccessInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreationTime = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("fipsEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.FipsEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("lastUpdatedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastUpdatedTime = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("verifiedAccessInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessInstanceId = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessTrustProviderSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProviderCondensedList(&sv.VerifiedAccessTrustProviders, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessInstanceList(v *[]types.VerifiedAccessInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VerifiedAccessInstance - if *v == nil { - sv = make([]types.VerifiedAccessInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VerifiedAccessInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessInstanceListUnwrapped(v *[]types.VerifiedAccessInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.VerifiedAccessInstance - if *v == nil { - sv = make([]types.VerifiedAccessInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VerifiedAccessInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfiguration(v **types.VerifiedAccessInstanceLoggingConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessInstanceLoggingConfiguration - if *v == nil { - sv = &types.VerifiedAccessInstanceLoggingConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accessLogs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogs(&sv.AccessLogs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("verifiedAccessInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessInstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfigurationList(v *[]types.VerifiedAccessInstanceLoggingConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VerifiedAccessInstanceLoggingConfiguration - if *v == nil { - sv = make([]types.VerifiedAccessInstanceLoggingConfiguration, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VerifiedAccessInstanceLoggingConfiguration - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfigurationListUnwrapped(v *[]types.VerifiedAccessInstanceLoggingConfiguration, decoder smithyxml.NodeDecoder) error { - var sv []types.VerifiedAccessInstanceLoggingConfiguration - if *v == nil { - sv = make([]types.VerifiedAccessInstanceLoggingConfiguration, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VerifiedAccessInstanceLoggingConfiguration - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfiguration(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVerifiedAccessLogCloudWatchLogsDestination(v **types.VerifiedAccessLogCloudWatchLogsDestination, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessLogCloudWatchLogsDestination - if *v == nil { - sv = &types.VerifiedAccessLogCloudWatchLogsDestination{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deliveryStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogDeliveryStatus(&sv.DeliveryStatus, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - case strings.EqualFold("logGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogGroup = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessLogDeliveryStatus(v **types.VerifiedAccessLogDeliveryStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessLogDeliveryStatus - if *v == nil { - sv = &types.VerifiedAccessLogDeliveryStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.VerifiedAccessLogDeliveryStatusCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessLogKinesisDataFirehoseDestination(v **types.VerifiedAccessLogKinesisDataFirehoseDestination, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessLogKinesisDataFirehoseDestination - if *v == nil { - sv = &types.VerifiedAccessLogKinesisDataFirehoseDestination{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deliveryStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogDeliveryStatus(&sv.DeliveryStatus, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("deliveryStream", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeliveryStream = ptr.String(xtv) - } - - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessLogs(v **types.VerifiedAccessLogs, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessLogs - if *v == nil { - sv = &types.VerifiedAccessLogs{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cloudWatchLogs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogCloudWatchLogsDestination(&sv.CloudWatchLogs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("includeTrustContext", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IncludeTrustContext = ptr.Bool(xtv) - } - - case strings.EqualFold("kinesisDataFirehose", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogKinesisDataFirehoseDestination(&sv.KinesisDataFirehose, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("logVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LogVersion = ptr.String(xtv) - } - - case strings.EqualFold("s3", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogS3Destination(&sv.S3, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessLogS3Destination(v **types.VerifiedAccessLogS3Destination, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessLogS3Destination - if *v == nil { - sv = &types.VerifiedAccessLogS3Destination{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bucketName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BucketName = ptr.String(xtv) - } - - case strings.EqualFold("bucketOwner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.BucketOwner = ptr.String(xtv) - } - - case strings.EqualFold("deliveryStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessLogDeliveryStatus(&sv.DeliveryStatus, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Enabled = ptr.Bool(xtv) - } - - case strings.EqualFold("prefix", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Prefix = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessSseSpecificationResponse(v **types.VerifiedAccessSseSpecificationResponse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessSseSpecificationResponse - if *v == nil { - sv = &types.VerifiedAccessSseSpecificationResponse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("customerManagedKeyEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.CustomerManagedKeyEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("kmsKeyArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyArn = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(v **types.VerifiedAccessTrustProvider, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessTrustProvider - if *v == nil { - sv = &types.VerifiedAccessTrustProvider{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CreationTime = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("deviceOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeviceOptions(&sv.DeviceOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("deviceTrustProviderType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceTrustProviderType = types.DeviceTrustProviderType(xtv) - } - - case strings.EqualFold("lastUpdatedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LastUpdatedTime = ptr.String(xtv) - } - - case strings.EqualFold("oidcOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentOidcOptions(&sv.OidcOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("policyReferenceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyReferenceName = ptr.String(xtv) - } - - case strings.EqualFold("sseSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessSseSpecificationResponse(&sv.SseSpecification, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("trustProviderType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrustProviderType = types.TrustProviderType(xtv) - } - - case strings.EqualFold("userTrustProviderType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserTrustProviderType = types.UserTrustProviderType(xtv) - } - - case strings.EqualFold("verifiedAccessTrustProviderId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessTrustProviderId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessTrustProviderCondensed(v **types.VerifiedAccessTrustProviderCondensed, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VerifiedAccessTrustProviderCondensed - if *v == nil { - sv = &types.VerifiedAccessTrustProviderCondensed{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("deviceTrustProviderType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DeviceTrustProviderType = types.DeviceTrustProviderType(xtv) - } - - case strings.EqualFold("trustProviderType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrustProviderType = types.TrustProviderType(xtv) - } - - case strings.EqualFold("userTrustProviderType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserTrustProviderType = types.UserTrustProviderType(xtv) - } - - case strings.EqualFold("verifiedAccessTrustProviderId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VerifiedAccessTrustProviderId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessTrustProviderCondensedList(v *[]types.VerifiedAccessTrustProviderCondensed, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VerifiedAccessTrustProviderCondensed - if *v == nil { - sv = make([]types.VerifiedAccessTrustProviderCondensed, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VerifiedAccessTrustProviderCondensed - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProviderCondensed(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessTrustProviderCondensedListUnwrapped(v *[]types.VerifiedAccessTrustProviderCondensed, decoder smithyxml.NodeDecoder) error { - var sv []types.VerifiedAccessTrustProviderCondensed - if *v == nil { - sv = make([]types.VerifiedAccessTrustProviderCondensed, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VerifiedAccessTrustProviderCondensed - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProviderCondensed(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVerifiedAccessTrustProviderList(v *[]types.VerifiedAccessTrustProvider, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VerifiedAccessTrustProvider - if *v == nil { - sv = make([]types.VerifiedAccessTrustProvider, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VerifiedAccessTrustProvider - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVerifiedAccessTrustProviderListUnwrapped(v *[]types.VerifiedAccessTrustProvider, decoder smithyxml.NodeDecoder) error { - var sv []types.VerifiedAccessTrustProvider - if *v == nil { - sv = make([]types.VerifiedAccessTrustProvider, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VerifiedAccessTrustProvider - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVgwTelemetry(v **types.VgwTelemetry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VgwTelemetry - if *v == nil { - sv = &types.VgwTelemetry{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("acceptedRouteCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AcceptedRouteCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("certificateArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateArn = ptr.String(xtv) - } - - case strings.EqualFold("lastStatusChange", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastStatusChange = ptr.Time(t) - } - - case strings.EqualFold("outsideIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutsideIpAddress = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.TelemetryStatus(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVgwTelemetryList(v *[]types.VgwTelemetry, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VgwTelemetry - if *v == nil { - sv = make([]types.VgwTelemetry, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VgwTelemetry - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVgwTelemetry(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVgwTelemetryListUnwrapped(v *[]types.VgwTelemetry, decoder smithyxml.NodeDecoder) error { - var sv []types.VgwTelemetry - if *v == nil { - sv = make([]types.VgwTelemetry, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VgwTelemetry - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVgwTelemetry(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVirtualizationTypeList(v *[]types.VirtualizationType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VirtualizationType - if *v == nil { - sv = make([]types.VirtualizationType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VirtualizationType - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.VirtualizationType(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVirtualizationTypeListUnwrapped(v *[]types.VirtualizationType, decoder smithyxml.NodeDecoder) error { - var sv []types.VirtualizationType - if *v == nil { - sv = make([]types.VirtualizationType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VirtualizationType - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.VirtualizationType(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolume(v **types.Volume, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Volume - if *v == nil { - sv = &types.Volume{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeAttachmentList(&sv.Attachments, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("fastRestored", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.FastRestored = ptr.Bool(xtv) - } - - case strings.EqualFold("iops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Iops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("multiAttachEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.MultiAttachEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("size", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Size = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VolumeState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("throughput", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Throughput = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeType = types.VolumeType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeAttachment(v **types.VolumeAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeAttachment - if *v == nil { - sv = &types.VolumeAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedResource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociatedResource = ptr.String(xtv) - } - - case strings.EqualFold("attachTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AttachTime = ptr.Time(t) - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("device", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Device = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceOwningService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceOwningService = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VolumeAttachmentState(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeAttachmentList(v *[]types.VolumeAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeAttachment - if *v == nil { - sv = make([]types.VolumeAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeAttachmentListUnwrapped(v *[]types.VolumeAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeAttachment - if *v == nil { - sv = make([]types.VolumeAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeList(v *[]types.Volume, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Volume - if *v == nil { - sv = make([]types.Volume, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Volume - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolume(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeListUnwrapped(v *[]types.Volume, decoder smithyxml.NodeDecoder) error { - var sv []types.Volume - if *v == nil { - sv = make([]types.Volume, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Volume - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolume(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeModification(v **types.VolumeModification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeModification - if *v == nil { - sv = &types.VolumeModification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("endTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndTime = ptr.Time(t) - } - - case strings.EqualFold("modificationState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ModificationState = types.VolumeModificationState(xtv) - } - - case strings.EqualFold("originalIops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.OriginalIops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("originalMultiAttachEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.OriginalMultiAttachEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("originalSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.OriginalSize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("originalThroughput", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.OriginalThroughput = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("originalVolumeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OriginalVolumeType = types.VolumeType(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Progress = ptr.Int64(i64) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("targetIops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TargetIops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("targetMultiAttachEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.TargetMultiAttachEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("targetSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TargetSize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("targetThroughput", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TargetThroughput = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("targetVolumeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TargetVolumeType = types.VolumeType(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeModificationList(v *[]types.VolumeModification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeModification - if *v == nil { - sv = make([]types.VolumeModification, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeModification - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeModification(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeModificationListUnwrapped(v *[]types.VolumeModification, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeModification - if *v == nil { - sv = make([]types.VolumeModification, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeModification - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeModification(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeStatusAction(v **types.VolumeStatusAction, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeStatusAction - if *v == nil { - sv = &types.VolumeStatusAction{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("eventId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventId = ptr.String(xtv) - } - - case strings.EqualFold("eventType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventType = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusActionsList(v *[]types.VolumeStatusAction, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeStatusAction - if *v == nil { - sv = make([]types.VolumeStatusAction, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeStatusAction - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeStatusAction(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusActionsListUnwrapped(v *[]types.VolumeStatusAction, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeStatusAction - if *v == nil { - sv = make([]types.VolumeStatusAction, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeStatusAction - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeStatusAction(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeStatusAttachmentStatus(v **types.VolumeStatusAttachmentStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeStatusAttachmentStatus - if *v == nil { - sv = &types.VolumeStatusAttachmentStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("ioPerformance", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IoPerformance = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusAttachmentStatusList(v *[]types.VolumeStatusAttachmentStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeStatusAttachmentStatus - if *v == nil { - sv = make([]types.VolumeStatusAttachmentStatus, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeStatusAttachmentStatus - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeStatusAttachmentStatus(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusAttachmentStatusListUnwrapped(v *[]types.VolumeStatusAttachmentStatus, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeStatusAttachmentStatus - if *v == nil { - sv = make([]types.VolumeStatusAttachmentStatus, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeStatusAttachmentStatus - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeStatusAttachmentStatus(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeStatusDetails(v **types.VolumeStatusDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeStatusDetails - if *v == nil { - sv = &types.VolumeStatusDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = types.VolumeStatusName(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusDetailsList(v *[]types.VolumeStatusDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeStatusDetails - if *v == nil { - sv = make([]types.VolumeStatusDetails, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeStatusDetails - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeStatusDetails(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusDetailsListUnwrapped(v *[]types.VolumeStatusDetails, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeStatusDetails - if *v == nil { - sv = make([]types.VolumeStatusDetails, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeStatusDetails - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeStatusDetails(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeStatusEvent(v **types.VolumeStatusEvent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeStatusEvent - if *v == nil { - sv = &types.VolumeStatusEvent{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("eventId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventId = ptr.String(xtv) - } - - case strings.EqualFold("eventType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EventType = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("notAfter", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.NotAfter = ptr.Time(t) - } - - case strings.EqualFold("notBefore", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.NotBefore = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusEventsList(v *[]types.VolumeStatusEvent, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeStatusEvent - if *v == nil { - sv = make([]types.VolumeStatusEvent, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeStatusEvent - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeStatusEvent(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusEventsListUnwrapped(v *[]types.VolumeStatusEvent, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeStatusEvent - if *v == nil { - sv = make([]types.VolumeStatusEvent, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeStatusEvent - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeStatusEvent(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVolumeStatusInfo(v **types.VolumeStatusInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeStatusInfo - if *v == nil { - sv = &types.VolumeStatusInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("details", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeStatusDetailsList(&sv.Details, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.VolumeStatusInfoStatus(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusItem(v **types.VolumeStatusItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VolumeStatusItem - if *v == nil { - sv = &types.VolumeStatusItem{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("actionsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeStatusActionsList(&sv.Actions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("attachmentStatuses", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeStatusAttachmentStatusList(&sv.AttachmentStatuses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("eventsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeStatusEventsList(&sv.Events, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeStatus", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeStatusInfo(&sv.VolumeStatus, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusList(v *[]types.VolumeStatusItem, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VolumeStatusItem - if *v == nil { - sv = make([]types.VolumeStatusItem, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VolumeStatusItem - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVolumeStatusItem(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVolumeStatusListUnwrapped(v *[]types.VolumeStatusItem, decoder smithyxml.NodeDecoder) error { - var sv []types.VolumeStatusItem - if *v == nil { - sv = make([]types.VolumeStatusItem, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VolumeStatusItem - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVolumeStatusItem(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpc(v **types.Vpc, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Vpc - if *v == nil { - sv = &types.Vpc{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("cidrBlockAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociationSet(&sv.CidrBlockAssociationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("dhcpOptionsId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DhcpOptionsId = ptr.String(xtv) - } - - case strings.EqualFold("instanceTenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceTenancy = types.Tenancy(xtv) - } - - case strings.EqualFold("ipv6CidrBlockAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociationSet(&sv.Ipv6CidrBlockAssociationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("isDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsDefault = ptr.Bool(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VpcState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcAttachment(v **types.VpcAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcAttachment - if *v == nil { - sv = &types.VpcAttachment{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.AttachmentStatus(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcAttachmentList(v *[]types.VpcAttachment, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcAttachment - if *v == nil { - sv = make([]types.VpcAttachment, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcAttachment - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcAttachmentListUnwrapped(v *[]types.VpcAttachment, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcAttachment - if *v == nil { - sv = make([]types.VpcAttachment, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcAttachment - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcAttachment(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcCidrBlockAssociation(v **types.VpcCidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcCidrBlockAssociation - if *v == nil { - sv = &types.VpcCidrBlockAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("cidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("cidrBlockState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcCidrBlockState(&sv.CidrBlockState, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcCidrBlockAssociationSet(v *[]types.VpcCidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcCidrBlockAssociation - if *v == nil { - sv = make([]types.VpcCidrBlockAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcCidrBlockAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcCidrBlockAssociationSetUnwrapped(v *[]types.VpcCidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcCidrBlockAssociation - if *v == nil { - sv = make([]types.VpcCidrBlockAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcCidrBlockAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcCidrBlockState(v **types.VpcCidrBlockState, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcCidrBlockState - if *v == nil { - sv = &types.VpcCidrBlockState{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VpcCidrBlockStateCode(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcClassicLink(v **types.VpcClassicLink, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcClassicLink - if *v == nil { - sv = &types.VpcClassicLink{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("classicLinkEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ClassicLinkEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcClassicLinkList(v *[]types.VpcClassicLink, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcClassicLink - if *v == nil { - sv = make([]types.VpcClassicLink, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcClassicLink - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcClassicLink(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcClassicLinkListUnwrapped(v *[]types.VpcClassicLink, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcClassicLink - if *v == nil { - sv = make([]types.VpcClassicLink, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcClassicLink - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcClassicLink(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcEndpoint(v **types.VpcEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcEndpoint - if *v == nil { - sv = &types.VpcEndpoint{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTimestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTimestamp = ptr.Time(t) - } - - case strings.EqualFold("dnsEntrySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDnsEntrySet(&sv.DnsEntries, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("dnsOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDnsOptions(&sv.DnsOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierSet(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipAddressType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpAddressType = types.IpAddressType(xtv) - } - - case strings.EqualFold("lastError", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLastError(&sv.LastError, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.NetworkInterfaceIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("policyDocument", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyDocument = ptr.String(xtv) - } - - case strings.EqualFold("privateDnsEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PrivateDnsEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("requesterManaged", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.RequesterManaged = ptr.Bool(xtv) - } - - case strings.EqualFold("routeTableIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.RouteTableIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("serviceName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceName = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.State(xtv) - } - - case strings.EqualFold("subnetIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.SubnetIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointType = types.VpcEndpointType(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcEndpointConnection(v **types.VpcEndpointConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcEndpointConnection - if *v == nil { - sv = &types.VpcEndpointConnection{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("creationTimestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreationTimestamp = ptr.Time(t) - } - - case strings.EqualFold("dnsEntrySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDnsEntrySet(&sv.DnsEntries, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("gatewayLoadBalancerArnSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.GatewayLoadBalancerArns, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipAddressType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IpAddressType = types.IpAddressType(xtv) - } - - case strings.EqualFold("networkLoadBalancerArnSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.NetworkLoadBalancerArns, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("serviceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServiceId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcEndpointConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointConnectionId = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointOwner", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointOwner = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcEndpointState = types.State(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcEndpointConnectionSet(v *[]types.VpcEndpointConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcEndpointConnection - if *v == nil { - sv = make([]types.VpcEndpointConnection, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcEndpointConnection - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcEndpointConnection(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcEndpointConnectionSetUnwrapped(v *[]types.VpcEndpointConnection, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcEndpointConnection - if *v == nil { - sv = make([]types.VpcEndpointConnection, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcEndpointConnection - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcEndpointConnection(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcEndpointSet(v *[]types.VpcEndpoint, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcEndpoint - if *v == nil { - sv = make([]types.VpcEndpoint, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcEndpoint - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcEndpointSetUnwrapped(v *[]types.VpcEndpoint, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcEndpoint - if *v == nil { - sv = make([]types.VpcEndpoint, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcEndpoint - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcEndpoint(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(v **types.VpcIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcIpv6CidrBlockAssociation - if *v == nil { - sv = &types.VpcIpv6CidrBlockAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("ipv6CidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("ipv6CidrBlockState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcCidrBlockState(&sv.Ipv6CidrBlockState, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6Pool", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Ipv6Pool = ptr.String(xtv) - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociationSet(v *[]types.VpcIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcIpv6CidrBlockAssociation - if *v == nil { - sv = make([]types.VpcIpv6CidrBlockAssociation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcIpv6CidrBlockAssociation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociationSetUnwrapped(v *[]types.VpcIpv6CidrBlockAssociation, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcIpv6CidrBlockAssociation - if *v == nil { - sv = make([]types.VpcIpv6CidrBlockAssociation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcIpv6CidrBlockAssociation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcList(v *[]types.Vpc, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Vpc - if *v == nil { - sv = make([]types.Vpc, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.Vpc - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpc(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcListUnwrapped(v *[]types.Vpc, decoder smithyxml.NodeDecoder) error { - var sv []types.Vpc - if *v == nil { - sv = make([]types.Vpc, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Vpc - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpc(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcPeeringConnection(v **types.VpcPeeringConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcPeeringConnection - if *v == nil { - sv = &types.VpcPeeringConnection{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accepterVpcInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnectionVpcInfo(&sv.AccepterVpcInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("expirationTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.ExpirationTime = ptr.Time(t) - } - - case strings.EqualFold("requesterVpcInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnectionVpcInfo(&sv.RequesterVpcInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnectionStateReason(&sv.Status, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcPeeringConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcPeeringConnectionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcPeeringConnectionList(v *[]types.VpcPeeringConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpcPeeringConnection - if *v == nil { - sv = make([]types.VpcPeeringConnection, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpcPeeringConnection - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcPeeringConnectionListUnwrapped(v *[]types.VpcPeeringConnection, decoder smithyxml.NodeDecoder) error { - var sv []types.VpcPeeringConnection - if *v == nil { - sv = make([]types.VpcPeeringConnection, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpcPeeringConnection - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpcPeeringConnectionOptionsDescription(v **types.VpcPeeringConnectionOptionsDescription, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcPeeringConnectionOptionsDescription - if *v == nil { - sv = &types.VpcPeeringConnectionOptionsDescription{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allowDnsResolutionFromRemoteVpc", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AllowDnsResolutionFromRemoteVpc = ptr.Bool(xtv) - } - - case strings.EqualFold("allowEgressFromLocalClassicLinkToRemoteVpc", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AllowEgressFromLocalClassicLinkToRemoteVpc = ptr.Bool(xtv) - } - - case strings.EqualFold("allowEgressFromLocalVpcToRemoteClassicLink", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AllowEgressFromLocalVpcToRemoteClassicLink = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcPeeringConnectionStateReason(v **types.VpcPeeringConnectionStateReason, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcPeeringConnectionStateReason - if *v == nil { - sv = &types.VpcPeeringConnectionStateReason{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("code", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Code = types.VpcPeeringConnectionStateReasonCode(xtv) - } - - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpcPeeringConnectionVpcInfo(v **types.VpcPeeringConnectionVpcInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpcPeeringConnectionVpcInfo - if *v == nil { - sv = &types.VpcPeeringConnectionVpcInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("cidrBlockSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCidrBlockSet(&sv.CidrBlockSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6CidrBlockSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6CidrBlockSet(&sv.Ipv6CidrBlockSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("peeringOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnectionOptionsDescription(&sv.PeeringOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("region", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Region = ptr.String(xtv) - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnConnection(v **types.VpnConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpnConnection - if *v == nil { - sv = &types.VpnConnection{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("category", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Category = ptr.String(xtv) - } - - case strings.EqualFold("coreNetworkArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoreNetworkArn = ptr.String(xtv) - } - - case strings.EqualFold("coreNetworkAttachmentArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoreNetworkAttachmentArn = ptr.String(xtv) - } - - case strings.EqualFold("customerGatewayConfiguration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerGatewayConfiguration = ptr.String(xtv) - } - - case strings.EqualFold("customerGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("gatewayAssociationState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GatewayAssociationState = types.GatewayAssociationState(xtv) - } - - case strings.EqualFold("options", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnectionOptions(&sv.Options, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("routes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnStaticRouteList(&sv.Routes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VpnState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.GatewayType(xtv) - } - - case strings.EqualFold("vgwTelemetry", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVgwTelemetryList(&sv.VgwTelemetry, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpnConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnConnectionId = ptr.String(xtv) - } - - case strings.EqualFold("vpnGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnConnectionDeviceType(v **types.VpnConnectionDeviceType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpnConnectionDeviceType - if *v == nil { - sv = &types.VpnConnectionDeviceType{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = ptr.String(xtv) - } - - case strings.EqualFold("software", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Software = ptr.String(xtv) - } - - case strings.EqualFold("vendor", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Vendor = ptr.String(xtv) - } - - case strings.EqualFold("vpnConnectionDeviceTypeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnConnectionDeviceTypeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnConnectionDeviceTypeList(v *[]types.VpnConnectionDeviceType, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpnConnectionDeviceType - if *v == nil { - sv = make([]types.VpnConnectionDeviceType, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpnConnectionDeviceType - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpnConnectionDeviceType(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnConnectionDeviceTypeListUnwrapped(v *[]types.VpnConnectionDeviceType, decoder smithyxml.NodeDecoder) error { - var sv []types.VpnConnectionDeviceType - if *v == nil { - sv = make([]types.VpnConnectionDeviceType, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpnConnectionDeviceType - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpnConnectionDeviceType(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpnConnectionList(v *[]types.VpnConnection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpnConnection - if *v == nil { - sv = make([]types.VpnConnection, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpnConnection - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpnConnection(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnConnectionListUnwrapped(v *[]types.VpnConnection, decoder smithyxml.NodeDecoder) error { - var sv []types.VpnConnection - if *v == nil { - sv = make([]types.VpnConnection, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpnConnection - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpnConnection(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpnConnectionOptions(v **types.VpnConnectionOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpnConnectionOptions - if *v == nil { - sv = &types.VpnConnectionOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enableAcceleration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EnableAcceleration = ptr.Bool(xtv) - } - - case strings.EqualFold("localIpv4NetworkCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalIpv4NetworkCidr = ptr.String(xtv) - } - - case strings.EqualFold("localIpv6NetworkCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalIpv6NetworkCidr = ptr.String(xtv) - } - - case strings.EqualFold("outsideIpAddressType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutsideIpAddressType = ptr.String(xtv) - } - - case strings.EqualFold("remoteIpv4NetworkCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RemoteIpv4NetworkCidr = ptr.String(xtv) - } - - case strings.EqualFold("remoteIpv6NetworkCidr", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RemoteIpv6NetworkCidr = ptr.String(xtv) - } - - case strings.EqualFold("staticRoutesOnly", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.StaticRoutesOnly = ptr.Bool(xtv) - } - - case strings.EqualFold("transportTransitGatewayAttachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransportTransitGatewayAttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("tunnelInsideIpVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TunnelInsideIpVersion = types.TunnelInsideIpVersion(xtv) - } - - case strings.EqualFold("tunnelOptionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTunnelOptionsList(&sv.TunnelOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnGateway(v **types.VpnGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpnGateway - if *v == nil { - sv = &types.VpnGateway{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("amazonSideAsn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AmazonSideAsn = ptr.Int64(i64) - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VpnState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.GatewayType(xtv) - } - - case strings.EqualFold("attachments", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcAttachmentList(&sv.VpcAttachments, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpnGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnGatewayList(v *[]types.VpnGateway, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpnGateway - if *v == nil { - sv = make([]types.VpnGateway, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpnGateway - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpnGateway(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnGatewayListUnwrapped(v *[]types.VpnGateway, decoder smithyxml.NodeDecoder) error { - var sv []types.VpnGateway - if *v == nil { - sv = make([]types.VpnGateway, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpnGateway - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpnGateway(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpnStaticRoute(v **types.VpnStaticRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpnStaticRoute - if *v == nil { - sv = &types.VpnStaticRoute{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("destinationCidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DestinationCidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("source", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Source = types.VpnStaticRouteSource(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VpnState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnStaticRouteList(v *[]types.VpnStaticRoute, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VpnStaticRoute - if *v == nil { - sv = make([]types.VpnStaticRoute, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("item", t.Name.Local): - var col types.VpnStaticRoute - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsEc2query_deserializeDocumentVpnStaticRoute(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeDocumentVpnStaticRouteListUnwrapped(v *[]types.VpnStaticRoute, decoder smithyxml.NodeDecoder) error { - var sv []types.VpnStaticRoute - if *v == nil { - sv = make([]types.VpnStaticRoute, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VpnStaticRoute - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsEc2query_deserializeDocumentVpnStaticRoute(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsEc2query_deserializeDocumentVpnTunnelLogOptions(v **types.VpnTunnelLogOptions, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VpnTunnelLogOptions - if *v == nil { - sv = &types.VpnTunnelLogOptions{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cloudWatchLogOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCloudWatchLogOptions(&sv.CloudWatchLogOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptAddressTransferOutput(v **AcceptAddressTransferOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptAddressTransferOutput - if *v == nil { - sv = &AcceptAddressTransferOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressTransfer", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressTransfer(&sv.AddressTransfer, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptReservedInstancesExchangeQuoteOutput(v **AcceptReservedInstancesExchangeQuoteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptReservedInstancesExchangeQuoteOutput - if *v == nil { - sv = &AcceptReservedInstancesExchangeQuoteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("exchangeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExchangeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsOutput(v **AcceptTransitGatewayMulticastDomainAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptTransitGatewayMulticastDomainAssociationsOutput - if *v == nil { - sv = &AcceptTransitGatewayMulticastDomainAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptTransitGatewayPeeringAttachmentOutput(v **AcceptTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptTransitGatewayPeeringAttachmentOutput - if *v == nil { - sv = &AcceptTransitGatewayPeeringAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPeeringAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptTransitGatewayVpcAttachmentOutput(v **AcceptTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptTransitGatewayVpcAttachmentOutput - if *v == nil { - sv = &AcceptTransitGatewayVpcAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayVpcAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptVpcEndpointConnectionsOutput(v **AcceptVpcEndpointConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptVpcEndpointConnectionsOutput - if *v == nil { - sv = &AcceptVpcEndpointConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAcceptVpcPeeringConnectionOutput(v **AcceptVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AcceptVpcPeeringConnectionOutput - if *v == nil { - sv = &AcceptVpcPeeringConnectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpcPeeringConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&sv.VpcPeeringConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAdvertiseByoipCidrOutput(v **AdvertiseByoipCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AdvertiseByoipCidrOutput - if *v == nil { - sv = &AdvertiseByoipCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAllocateAddressOutput(v **AllocateAddressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AllocateAddressOutput - if *v == nil { - sv = &AllocateAddressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("carrierIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CarrierIp = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIp = ptr.String(xtv) - } - - case strings.EqualFold("customerOwnedIpv4Pool", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerOwnedIpv4Pool = ptr.String(xtv) - } - - case strings.EqualFold("domain", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Domain = types.DomainType(xtv) - } - - case strings.EqualFold("networkBorderGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkBorderGroup = ptr.String(xtv) - } - - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - case strings.EqualFold("publicIpv4Pool", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIpv4Pool = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAllocateHostsOutput(v **AllocateHostsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AllocateHostsOutput - if *v == nil { - sv = &AllocateHostsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("hostIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseHostIdList(&sv.HostIds, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAllocateIpamPoolCidrOutput(v **AllocateIpamPoolCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AllocateIpamPoolCidrOutput - if *v == nil { - sv = &AllocateIpamPoolCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPoolAllocation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolAllocation(&sv.IpamPoolAllocation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkOutput(v **ApplySecurityGroupsToClientVpnTargetNetworkOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ApplySecurityGroupsToClientVpnTargetNetworkOutput - if *v == nil { - sv = &ApplySecurityGroupsToClientVpnTargetNetworkOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("securityGroupIds", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnSecurityGroupIdSet(&sv.SecurityGroupIds, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssignIpv6AddressesOutput(v **AssignIpv6AddressesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssignIpv6AddressesOutput - if *v == nil { - sv = &AssignIpv6AddressesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("assignedIpv6Addresses", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6AddressList(&sv.AssignedIpv6Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("assignedIpv6PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpPrefixList(&sv.AssignedIpv6Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssignPrivateIpAddressesOutput(v **AssignPrivateIpAddressesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssignPrivateIpAddressesOutput - if *v == nil { - sv = &AssignPrivateIpAddressesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("assignedIpv4PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv4PrefixesList(&sv.AssignedIpv4Prefixes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("assignedPrivateIpAddressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAssignedPrivateIpAddressList(&sv.AssignedPrivateIpAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssignPrivateNatGatewayAddressOutput(v **AssignPrivateNatGatewayAddressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssignPrivateNatGatewayAddressOutput - if *v == nil { - sv = &AssignPrivateNatGatewayAddressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("natGatewayAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayAddressList(&sv.NatGatewayAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateAddressOutput(v **AssociateAddressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateAddressOutput - if *v == nil { - sv = &AssociateAddressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateClientVpnTargetNetworkOutput(v **AssociateClientVpnTargetNetworkOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateClientVpnTargetNetworkOutput - if *v == nil { - sv = &AssociateClientVpnTargetNetworkOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAssociationStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateEnclaveCertificateIamRoleOutput(v **AssociateEnclaveCertificateIamRoleOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateEnclaveCertificateIamRoleOutput - if *v == nil { - sv = &AssociateEnclaveCertificateIamRoleOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("certificateS3BucketName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateS3BucketName = ptr.String(xtv) - } - - case strings.EqualFold("certificateS3ObjectKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateS3ObjectKey = ptr.String(xtv) - } - - case strings.EqualFold("encryptionKmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.EncryptionKmsKeyId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateIamInstanceProfileOutput(v **AssociateIamInstanceProfileOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateIamInstanceProfileOutput - if *v == nil { - sv = &AssociateIamInstanceProfileOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("iamInstanceProfileAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&sv.IamInstanceProfileAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateInstanceEventWindowOutput(v **AssociateInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateInstanceEventWindowOutput - if *v == nil { - sv = &AssociateInstanceEventWindowOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindow", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateIpamByoasnOutput(v **AssociateIpamByoasnOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateIpamByoasnOutput - if *v == nil { - sv = &AssociateIpamByoasnOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("asnAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAsnAssociation(&sv.AsnAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateIpamResourceDiscoveryOutput(v **AssociateIpamResourceDiscoveryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateIpamResourceDiscoveryOutput - if *v == nil { - sv = &AssociateIpamResourceDiscoveryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscoveryAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociation(&sv.IpamResourceDiscoveryAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateNatGatewayAddressOutput(v **AssociateNatGatewayAddressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateNatGatewayAddressOutput - if *v == nil { - sv = &AssociateNatGatewayAddressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("natGatewayAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayAddressList(&sv.NatGatewayAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateRouteTableOutput(v **AssociateRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateRouteTableOutput - if *v == nil { - sv = &AssociateRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("associationState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTableAssociationState(&sv.AssociationState, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateSubnetCidrBlockOutput(v **AssociateSubnetCidrBlockOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateSubnetCidrBlockOutput - if *v == nil { - sv = &AssociateSubnetCidrBlockOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6CidrBlockAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateTransitGatewayMulticastDomainOutput(v **AssociateTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateTransitGatewayMulticastDomainOutput - if *v == nil { - sv = &AssociateTransitGatewayMulticastDomainOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateTransitGatewayPolicyTableOutput(v **AssociateTransitGatewayPolicyTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateTransitGatewayPolicyTableOutput - if *v == nil { - sv = &AssociateTransitGatewayPolicyTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateTransitGatewayRouteTableOutput(v **AssociateTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateTransitGatewayRouteTableOutput - if *v == nil { - sv = &AssociateTransitGatewayRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateTrunkInterfaceOutput(v **AssociateTrunkInterfaceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateTrunkInterfaceOutput - if *v == nil { - sv = &AssociateTrunkInterfaceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("interfaceAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociation(&sv.InterfaceAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAssociateVpcCidrBlockOutput(v **AssociateVpcCidrBlockOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateVpcCidrBlockOutput - if *v == nil { - sv = &AssociateVpcCidrBlockOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrBlockAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&sv.CidrBlockAssociation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6CidrBlockAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAttachClassicLinkVpcOutput(v **AttachClassicLinkVpcOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AttachClassicLinkVpcOutput - if *v == nil { - sv = &AttachClassicLinkVpcOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAttachNetworkInterfaceOutput(v **AttachNetworkInterfaceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AttachNetworkInterfaceOutput - if *v == nil { - sv = &AttachNetworkInterfaceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AttachmentId = ptr.String(xtv) - } - - case strings.EqualFold("networkCardIndex", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.NetworkCardIndex = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAttachVerifiedAccessTrustProviderOutput(v **AttachVerifiedAccessTrustProviderOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AttachVerifiedAccessTrustProviderOutput - if *v == nil { - sv = &AttachVerifiedAccessTrustProviderOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&sv.VerifiedAccessInstance, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("verifiedAccessTrustProvider", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&sv.VerifiedAccessTrustProvider, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAttachVolumeOutput(v **AttachVolumeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AttachVolumeOutput - if *v == nil { - sv = &AttachVolumeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedResource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociatedResource = ptr.String(xtv) - } - - case strings.EqualFold("attachTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AttachTime = ptr.Time(t) - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("device", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Device = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceOwningService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceOwningService = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VolumeAttachmentState(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAttachVpnGatewayOutput(v **AttachVpnGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AttachVpnGatewayOutput - if *v == nil { - sv = &AttachVpnGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcAttachment(&sv.VpcAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAuthorizeClientVpnIngressOutput(v **AuthorizeClientVpnIngressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AuthorizeClientVpnIngressOutput - if *v == nil { - sv = &AuthorizeClientVpnIngressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupEgressOutput(v **AuthorizeSecurityGroupEgressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AuthorizeSecurityGroupEgressOutput - if *v == nil { - sv = &AuthorizeSecurityGroupEgressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - case strings.EqualFold("securityGroupRuleSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentAuthorizeSecurityGroupIngressOutput(v **AuthorizeSecurityGroupIngressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AuthorizeSecurityGroupIngressOutput - if *v == nil { - sv = &AuthorizeSecurityGroupIngressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - case strings.EqualFold("securityGroupRuleSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentBundleInstanceOutput(v **BundleInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *BundleInstanceOutput - if *v == nil { - sv = &BundleInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bundleInstanceTask", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBundleTask(&sv.BundleTask, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelBundleTaskOutput(v **CancelBundleTaskOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelBundleTaskOutput - if *v == nil { - sv = &CancelBundleTaskOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bundleInstanceTask", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBundleTask(&sv.BundleTask, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelCapacityReservationFleetsOutput(v **CancelCapacityReservationFleetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelCapacityReservationFleetsOutput - if *v == nil { - sv = &CancelCapacityReservationFleetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("failedFleetCancellationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFailedCapacityReservationFleetCancellationResultSet(&sv.FailedFleetCancellations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("successfulFleetCancellationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationFleetCancellationStateSet(&sv.SuccessfulFleetCancellations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelCapacityReservationOutput(v **CancelCapacityReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelCapacityReservationOutput - if *v == nil { - sv = &CancelCapacityReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelImageLaunchPermissionOutput(v **CancelImageLaunchPermissionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelImageLaunchPermissionOutput - if *v == nil { - sv = &CancelImageLaunchPermissionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelImportTaskOutput(v **CancelImportTaskOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelImportTaskOutput - if *v == nil { - sv = &CancelImportTaskOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("importTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImportTaskId = ptr.String(xtv) - } - - case strings.EqualFold("previousState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PreviousState = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelReservedInstancesListingOutput(v **CancelReservedInstancesListingOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelReservedInstancesListingOutput - if *v == nil { - sv = &CancelReservedInstancesListingOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesListingsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelSpotFleetRequestsOutput(v **CancelSpotFleetRequestsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelSpotFleetRequestsOutput - if *v == nil { - sv = &CancelSpotFleetRequestsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successfulFleetRequestSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsSuccessSet(&sv.SuccessfulFleetRequests, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessfulFleetRequestSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCancelSpotFleetRequestsErrorSet(&sv.UnsuccessfulFleetRequests, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCancelSpotInstanceRequestsOutput(v **CancelSpotInstanceRequestsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CancelSpotInstanceRequestsOutput - if *v == nil { - sv = &CancelSpotInstanceRequestsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("spotInstanceRequestSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCancelledSpotInstanceRequestList(&sv.CancelledSpotInstanceRequests, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentConfirmProductInstanceOutput(v **ConfirmProductInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ConfirmProductInstanceOutput - if *v == nil { - sv = &ConfirmProductInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCopyFpgaImageOutput(v **CopyFpgaImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CopyFpgaImageOutput - if *v == nil { - sv = &CopyFpgaImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fpgaImageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FpgaImageId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCopyImageOutput(v **CopyImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CopyImageOutput - if *v == nil { - sv = &CopyImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCopySnapshotOutput(v **CopySnapshotOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CopySnapshotOutput - if *v == nil { - sv = &CopySnapshotOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateCapacityReservationFleetOutput(v **CreateCapacityReservationFleetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCapacityReservationFleetOutput - if *v == nil { - sv = &CreateCapacityReservationFleetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationStrategy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationStrategy = ptr.String(xtv) - } - - case strings.EqualFold("capacityReservationFleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationFleetId = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("endDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.EndDate = ptr.Time(t) - } - - case strings.EqualFold("fleetCapacityReservationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetCapacityReservationSet(&sv.FleetCapacityReservations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceMatchCriteria", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceMatchCriteria = types.FleetInstanceMatchCriteria(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.CapacityReservationFleetState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tenancy", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Tenancy = types.FleetCapacityReservationTenancy(xtv) - } - - case strings.EqualFold("totalFulfilledCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.TotalFulfilledCapacity = ptr.Float64(f64) - } - - case strings.EqualFold("totalTargetCapacity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalTargetCapacity = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateCapacityReservationOutput(v **CreateCapacityReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCapacityReservationOutput - if *v == nil { - sv = &CreateCapacityReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservation(&sv.CapacityReservation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateCarrierGatewayOutput(v **CreateCarrierGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCarrierGatewayOutput - if *v == nil { - sv = &CreateCarrierGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCarrierGateway(&sv.CarrierGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateClientVpnEndpointOutput(v **CreateClientVpnEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateClientVpnEndpointOutput - if *v == nil { - sv = &CreateClientVpnEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("dnsName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DnsName = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnEndpointStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateClientVpnRouteOutput(v **CreateClientVpnRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateClientVpnRouteOutput - if *v == nil { - sv = &CreateClientVpnRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnRouteStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateCoipCidrOutput(v **CreateCoipCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCoipCidrOutput - if *v == nil { - sv = &CreateCoipCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoipCidr(&sv.CoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateCoipPoolOutput(v **CreateCoipPoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCoipPoolOutput - if *v == nil { - sv = &CreateCoipPoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipPool", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoipPool(&sv.CoipPool, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateCustomerGatewayOutput(v **CreateCustomerGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCustomerGatewayOutput - if *v == nil { - sv = &CreateCustomerGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("customerGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCustomerGateway(&sv.CustomerGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateDefaultSubnetOutput(v **CreateDefaultSubnetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateDefaultSubnetOutput - if *v == nil { - sv = &CreateDefaultSubnetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("subnet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnet(&sv.Subnet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateDefaultVpcOutput(v **CreateDefaultVpcOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateDefaultVpcOutput - if *v == nil { - sv = &CreateDefaultVpcOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpc(&sv.Vpc, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateDhcpOptionsOutput(v **CreateDhcpOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateDhcpOptionsOutput - if *v == nil { - sv = &CreateDhcpOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dhcpOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDhcpOptions(&sv.DhcpOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateEgressOnlyInternetGatewayOutput(v **CreateEgressOnlyInternetGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateEgressOnlyInternetGatewayOutput - if *v == nil { - sv = &CreateEgressOnlyInternetGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("egressOnlyInternetGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEgressOnlyInternetGateway(&sv.EgressOnlyInternetGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateFleetOutput(v **CreateFleetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateFleetOutput - if *v == nil { - sv = &CreateFleetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("errorSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCreateFleetErrorsSet(&sv.Errors, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("fleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetId = ptr.String(xtv) - } - - case strings.EqualFold("fleetInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCreateFleetInstancesSet(&sv.Instances, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateFlowLogsOutput(v **CreateFlowLogsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateFlowLogsOutput - if *v == nil { - sv = &CreateFlowLogsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("flowLogIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.FlowLogIds, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateFpgaImageOutput(v **CreateFpgaImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateFpgaImageOutput - if *v == nil { - sv = &CreateFpgaImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fpgaImageGlobalId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FpgaImageGlobalId = ptr.String(xtv) - } - - case strings.EqualFold("fpgaImageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FpgaImageId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateImageOutput(v **CreateImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateImageOutput - if *v == nil { - sv = &CreateImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateInstanceConnectEndpointOutput(v **CreateInstanceConnectEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateInstanceConnectEndpointOutput - if *v == nil { - sv = &CreateInstanceConnectEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("instanceConnectEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEc2InstanceConnectEndpoint(&sv.InstanceConnectEndpoint, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateInstanceEventWindowOutput(v **CreateInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateInstanceEventWindowOutput - if *v == nil { - sv = &CreateInstanceEventWindowOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindow", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateInstanceExportTaskOutput(v **CreateInstanceExportTaskOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateInstanceExportTaskOutput - if *v == nil { - sv = &CreateInstanceExportTaskOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("exportTask", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExportTask(&sv.ExportTask, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateInternetGatewayOutput(v **CreateInternetGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateInternetGatewayOutput - if *v == nil { - sv = &CreateInternetGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("internetGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInternetGateway(&sv.InternetGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateIpamOutput(v **CreateIpamOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateIpamOutput - if *v == nil { - sv = &CreateIpamOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipam", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpam(&sv.Ipam, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateIpamPoolOutput(v **CreateIpamPoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateIpamPoolOutput - if *v == nil { - sv = &CreateIpamPoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPool", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPool(&sv.IpamPool, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateIpamResourceDiscoveryOutput(v **CreateIpamResourceDiscoveryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateIpamResourceDiscoveryOutput - if *v == nil { - sv = &CreateIpamResourceDiscoveryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscovery", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscovery(&sv.IpamResourceDiscovery, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateIpamScopeOutput(v **CreateIpamScopeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateIpamScopeOutput - if *v == nil { - sv = &CreateIpamScopeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamScope", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamScope(&sv.IpamScope, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateKeyPairOutput(v **CreateKeyPairOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateKeyPairOutput - if *v == nil { - sv = &CreateKeyPairOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("keyFingerprint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyFingerprint = ptr.String(xtv) - } - - case strings.EqualFold("keyMaterial", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyMaterial = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("keyPairId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyPairId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateLaunchTemplateOutput(v **CreateLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateLaunchTemplateOutput - if *v == nil { - sv = &CreateLaunchTemplateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("warning", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValidationWarning(&sv.Warning, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateLaunchTemplateVersionOutput(v **CreateLaunchTemplateVersionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateLaunchTemplateVersionOutput - if *v == nil { - sv = &CreateLaunchTemplateVersionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateVersion", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateVersion(&sv.LaunchTemplateVersion, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("warning", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValidationWarning(&sv.Warning, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteOutput(v **CreateLocalGatewayRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateLocalGatewayRouteOutput - if *v == nil { - sv = &CreateLocalGatewayRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("route", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&sv.Route, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableOutput(v **CreateLocalGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateLocalGatewayRouteTableOutput - if *v == nil { - sv = &CreateLocalGatewayRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTable(&sv.LocalGatewayRouteTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput(v **CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput - if *v == nil { - sv = &CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(&sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationOutput(v **CreateLocalGatewayRouteTableVpcAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateLocalGatewayRouteTableVpcAssociationOutput - if *v == nil { - sv = &CreateLocalGatewayRouteTableVpcAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableVpcAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&sv.LocalGatewayRouteTableVpcAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateManagedPrefixListOutput(v **CreateManagedPrefixListOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateManagedPrefixListOutput - if *v == nil { - sv = &CreateManagedPrefixListOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("prefixList", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateNatGatewayOutput(v **CreateNatGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateNatGatewayOutput - if *v == nil { - sv = &CreateNatGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("natGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGateway(&sv.NatGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateNetworkAclOutput(v **CreateNetworkAclOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateNetworkAclOutput - if *v == nil { - sv = &CreateNetworkAclOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("networkAcl", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkAcl(&sv.NetworkAcl, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateNetworkInsightsAccessScopeOutput(v **CreateNetworkInsightsAccessScopeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateNetworkInsightsAccessScopeOutput - if *v == nil { - sv = &CreateNetworkInsightsAccessScopeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScope", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScope(&sv.NetworkInsightsAccessScope, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInsightsAccessScopeContent", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeContent(&sv.NetworkInsightsAccessScopeContent, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateNetworkInsightsPathOutput(v **CreateNetworkInsightsPathOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateNetworkInsightsPathOutput - if *v == nil { - sv = &CreateNetworkInsightsPathOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsPath", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsPath(&sv.NetworkInsightsPath, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateNetworkInterfaceOutput(v **CreateNetworkInterfaceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateNetworkInterfaceOutput - if *v == nil { - sv = &CreateNetworkInterfaceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("networkInterface", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterface(&sv.NetworkInterface, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateNetworkInterfacePermissionOutput(v **CreateNetworkInterfacePermissionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateNetworkInterfacePermissionOutput - if *v == nil { - sv = &CreateNetworkInterfacePermissionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("interfacePermission", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfacePermission(&sv.InterfacePermission, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreatePlacementGroupOutput(v **CreatePlacementGroupOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreatePlacementGroupOutput - if *v == nil { - sv = &CreatePlacementGroupOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("placementGroup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacementGroup(&sv.PlacementGroup, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreatePublicIpv4PoolOutput(v **CreatePublicIpv4PoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreatePublicIpv4PoolOutput - if *v == nil { - sv = &CreatePublicIpv4PoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("poolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateReplaceRootVolumeTaskOutput(v **CreateReplaceRootVolumeTaskOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateReplaceRootVolumeTaskOutput - if *v == nil { - sv = &CreateReplaceRootVolumeTaskOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("replaceRootVolumeTask", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReplaceRootVolumeTask(&sv.ReplaceRootVolumeTask, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateReservedInstancesListingOutput(v **CreateReservedInstancesListingOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateReservedInstancesListingOutput - if *v == nil { - sv = &CreateReservedInstancesListingOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesListingsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateRestoreImageTaskOutput(v **CreateRestoreImageTaskOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateRestoreImageTaskOutput - if *v == nil { - sv = &CreateRestoreImageTaskOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateRouteOutput(v **CreateRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateRouteOutput - if *v == nil { - sv = &CreateRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateRouteTableOutput(v **CreateRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateRouteTableOutput - if *v == nil { - sv = &CreateRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("routeTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTable(&sv.RouteTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateSecurityGroupOutput(v **CreateSecurityGroupOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateSecurityGroupOutput - if *v == nil { - sv = &CreateSecurityGroupOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.GroupId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateSnapshotOutput(v **CreateSnapshotOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateSnapshotOutput - if *v == nil { - sv = &CreateSnapshotOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dataEncryptionKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DataEncryptionKeyId = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerAlias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerAlias = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("restoreExpiryTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RestoreExpiryTime = ptr.Time(t) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotState(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateMessage = ptr.String(xtv) - } - - case strings.EqualFold("storageTier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StorageTier = types.StorageTier(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VolumeSize = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateSnapshotsOutput(v **CreateSnapshotsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateSnapshotsOutput - if *v == nil { - sv = &CreateSnapshotsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("snapshotSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotSet(&sv.Snapshots, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateSpotDatafeedSubscriptionOutput(v **CreateSpotDatafeedSubscriptionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateSpotDatafeedSubscriptionOutput - if *v == nil { - sv = &CreateSpotDatafeedSubscriptionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("spotDatafeedSubscription", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotDatafeedSubscription(&sv.SpotDatafeedSubscription, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateStoreImageTaskOutput(v **CreateStoreImageTaskOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateStoreImageTaskOutput - if *v == nil { - sv = &CreateStoreImageTaskOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("objectKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ObjectKey = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateSubnetCidrReservationOutput(v **CreateSubnetCidrReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateSubnetCidrReservationOutput - if *v == nil { - sv = &CreateSubnetCidrReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("subnetCidrReservation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&sv.SubnetCidrReservation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateSubnetOutput(v **CreateSubnetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateSubnetOutput - if *v == nil { - sv = &CreateSubnetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("subnet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnet(&sv.Subnet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterOutput(v **CreateTrafficMirrorFilterOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficMirrorFilterOutput - if *v == nil { - sv = &CreateTrafficMirrorFilterOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorFilter", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&sv.TrafficMirrorFilter, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTrafficMirrorFilterRuleOutput(v **CreateTrafficMirrorFilterRuleOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficMirrorFilterRuleOutput - if *v == nil { - sv = &CreateTrafficMirrorFilterRuleOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorFilterRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&sv.TrafficMirrorFilterRule, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTrafficMirrorSessionOutput(v **CreateTrafficMirrorSessionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficMirrorSessionOutput - if *v == nil { - sv = &CreateTrafficMirrorSessionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorSession", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&sv.TrafficMirrorSession, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTrafficMirrorTargetOutput(v **CreateTrafficMirrorTargetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficMirrorTargetOutput - if *v == nil { - sv = &CreateTrafficMirrorTargetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorTarget", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorTarget(&sv.TrafficMirrorTarget, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectOutput(v **CreateTransitGatewayConnectOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayConnectOutput - if *v == nil { - sv = &CreateTransitGatewayConnectOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayConnect", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&sv.TransitGatewayConnect, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayConnectPeerOutput(v **CreateTransitGatewayConnectPeerOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayConnectPeerOutput - if *v == nil { - sv = &CreateTransitGatewayConnectPeerOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayConnectPeer", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&sv.TransitGatewayConnectPeer, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayMulticastDomainOutput(v **CreateTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayMulticastDomainOutput - if *v == nil { - sv = &CreateTransitGatewayMulticastDomainOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayMulticastDomain", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&sv.TransitGatewayMulticastDomain, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayOutput(v **CreateTransitGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayOutput - if *v == nil { - sv = &CreateTransitGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGateway(&sv.TransitGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayPeeringAttachmentOutput(v **CreateTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayPeeringAttachmentOutput - if *v == nil { - sv = &CreateTransitGatewayPeeringAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPeeringAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayPolicyTableOutput(v **CreateTransitGatewayPolicyTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayPolicyTableOutput - if *v == nil { - sv = &CreateTransitGatewayPolicyTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPolicyTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTable(&sv.TransitGatewayPolicyTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayPrefixListReferenceOutput(v **CreateTransitGatewayPrefixListReferenceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayPrefixListReferenceOutput - if *v == nil { - sv = &CreateTransitGatewayPrefixListReferenceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPrefixListReference", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&sv.TransitGatewayPrefixListReference, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteOutput(v **CreateTransitGatewayRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayRouteOutput - if *v == nil { - sv = &CreateTransitGatewayRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("route", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&sv.Route, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteTableAnnouncementOutput(v **CreateTransitGatewayRouteTableAnnouncementOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayRouteTableAnnouncementOutput - if *v == nil { - sv = &CreateTransitGatewayRouteTableAnnouncementOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayRouteTableAnnouncement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncement(&sv.TransitGatewayRouteTableAnnouncement, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayRouteTableOutput(v **CreateTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayRouteTableOutput - if *v == nil { - sv = &CreateTransitGatewayRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&sv.TransitGatewayRouteTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateTransitGatewayVpcAttachmentOutput(v **CreateTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTransitGatewayVpcAttachmentOutput - if *v == nil { - sv = &CreateTransitGatewayVpcAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayVpcAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVerifiedAccessEndpointOutput(v **CreateVerifiedAccessEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVerifiedAccessEndpointOutput - if *v == nil { - sv = &CreateVerifiedAccessEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpoint(&sv.VerifiedAccessEndpoint, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVerifiedAccessGroupOutput(v **CreateVerifiedAccessGroupOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVerifiedAccessGroupOutput - if *v == nil { - sv = &CreateVerifiedAccessGroupOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessGroup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessGroup(&sv.VerifiedAccessGroup, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVerifiedAccessInstanceOutput(v **CreateVerifiedAccessInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVerifiedAccessInstanceOutput - if *v == nil { - sv = &CreateVerifiedAccessInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&sv.VerifiedAccessInstance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVerifiedAccessTrustProviderOutput(v **CreateVerifiedAccessTrustProviderOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVerifiedAccessTrustProviderOutput - if *v == nil { - sv = &CreateVerifiedAccessTrustProviderOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessTrustProvider", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&sv.VerifiedAccessTrustProvider, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVolumeOutput(v **CreateVolumeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVolumeOutput - if *v == nil { - sv = &CreateVolumeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachmentSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeAttachmentList(&sv.Attachments, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("availabilityZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AvailabilityZone = ptr.String(xtv) - } - - case strings.EqualFold("createTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreateTime = ptr.Time(t) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("fastRestored", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.FastRestored = ptr.Bool(xtv) - } - - case strings.EqualFold("iops", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Iops = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("multiAttachEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.MultiAttachEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("size", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Size = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VolumeState(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("throughput", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Throughput = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeType = types.VolumeType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpcEndpointConnectionNotificationOutput(v **CreateVpcEndpointConnectionNotificationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpcEndpointConnectionNotificationOutput - if *v == nil { - sv = &CreateVpcEndpointConnectionNotificationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("connectionNotification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionNotification(&sv.ConnectionNotification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpcEndpointOutput(v **CreateVpcEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpcEndpointOutput - if *v == nil { - sv = &CreateVpcEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcEndpoint(&sv.VpcEndpoint, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpcEndpointServiceConfigurationOutput(v **CreateVpcEndpointServiceConfigurationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpcEndpointServiceConfigurationOutput - if *v == nil { - sv = &CreateVpcEndpointServiceConfigurationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("serviceConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentServiceConfiguration(&sv.ServiceConfiguration, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpcOutput(v **CreateVpcOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpcOutput - if *v == nil { - sv = &CreateVpcOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpc", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpc(&sv.Vpc, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpcPeeringConnectionOutput(v **CreateVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpcPeeringConnectionOutput - if *v == nil { - sv = &CreateVpcPeeringConnectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpcPeeringConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnection(&sv.VpcPeeringConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpnConnectionOutput(v **CreateVpnConnectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpnConnectionOutput - if *v == nil { - sv = &CreateVpnConnectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentCreateVpnGatewayOutput(v **CreateVpnGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVpnGatewayOutput - if *v == nil { - sv = &CreateVpnGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnGateway(&sv.VpnGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteCarrierGatewayOutput(v **DeleteCarrierGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteCarrierGatewayOutput - if *v == nil { - sv = &DeleteCarrierGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCarrierGateway(&sv.CarrierGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteClientVpnEndpointOutput(v **DeleteClientVpnEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteClientVpnEndpointOutput - if *v == nil { - sv = &DeleteClientVpnEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnEndpointStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteClientVpnRouteOutput(v **DeleteClientVpnRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteClientVpnRouteOutput - if *v == nil { - sv = &DeleteClientVpnRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnRouteStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteCoipCidrOutput(v **DeleteCoipCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteCoipCidrOutput - if *v == nil { - sv = &DeleteCoipCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoipCidr(&sv.CoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteCoipPoolOutput(v **DeleteCoipPoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteCoipPoolOutput - if *v == nil { - sv = &DeleteCoipPoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipPool", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoipPool(&sv.CoipPool, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteEgressOnlyInternetGatewayOutput(v **DeleteEgressOnlyInternetGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteEgressOnlyInternetGatewayOutput - if *v == nil { - sv = &DeleteEgressOnlyInternetGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("returnCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnCode = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteFleetsOutput(v **DeleteFleetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteFleetsOutput - if *v == nil { - sv = &DeleteFleetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successfulFleetDeletionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeleteFleetSuccessSet(&sv.SuccessfulFleetDeletions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessfulFleetDeletionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeleteFleetErrorSet(&sv.UnsuccessfulFleetDeletions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteFlowLogsOutput(v **DeleteFlowLogsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteFlowLogsOutput - if *v == nil { - sv = &DeleteFlowLogsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteFpgaImageOutput(v **DeleteFpgaImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteFpgaImageOutput - if *v == nil { - sv = &DeleteFpgaImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteInstanceConnectEndpointOutput(v **DeleteInstanceConnectEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteInstanceConnectEndpointOutput - if *v == nil { - sv = &DeleteInstanceConnectEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceConnectEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEc2InstanceConnectEndpoint(&sv.InstanceConnectEndpoint, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteInstanceEventWindowOutput(v **DeleteInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteInstanceEventWindowOutput - if *v == nil { - sv = &DeleteInstanceEventWindowOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindowState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindowStateChange(&sv.InstanceEventWindowState, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteIpamOutput(v **DeleteIpamOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteIpamOutput - if *v == nil { - sv = &DeleteIpamOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipam", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpam(&sv.Ipam, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteIpamPoolOutput(v **DeleteIpamPoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteIpamPoolOutput - if *v == nil { - sv = &DeleteIpamPoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPool", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPool(&sv.IpamPool, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteIpamResourceDiscoveryOutput(v **DeleteIpamResourceDiscoveryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteIpamResourceDiscoveryOutput - if *v == nil { - sv = &DeleteIpamResourceDiscoveryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscovery", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscovery(&sv.IpamResourceDiscovery, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteIpamScopeOutput(v **DeleteIpamScopeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteIpamScopeOutput - if *v == nil { - sv = &DeleteIpamScopeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamScope", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamScope(&sv.IpamScope, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteKeyPairOutput(v **DeleteKeyPairOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteKeyPairOutput - if *v == nil { - sv = &DeleteKeyPairOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("keyPairId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyPairId = ptr.String(xtv) - } - - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteLaunchTemplateOutput(v **DeleteLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteLaunchTemplateOutput - if *v == nil { - sv = &DeleteLaunchTemplateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteLaunchTemplateVersionsOutput(v **DeleteLaunchTemplateVersionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteLaunchTemplateVersionsOutput - if *v == nil { - sv = &DeleteLaunchTemplateVersionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successfullyDeletedLaunchTemplateVersionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseSuccessSet(&sv.SuccessfullyDeletedLaunchTemplateVersions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessfullyDeletedLaunchTemplateVersionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeleteLaunchTemplateVersionsResponseErrorSet(&sv.UnsuccessfullyDeletedLaunchTemplateVersions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteOutput(v **DeleteLocalGatewayRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteLocalGatewayRouteOutput - if *v == nil { - sv = &DeleteLocalGatewayRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("route", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&sv.Route, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableOutput(v **DeleteLocalGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteLocalGatewayRouteTableOutput - if *v == nil { - sv = &DeleteLocalGatewayRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTable(&sv.LocalGatewayRouteTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput(v **DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput - if *v == nil { - sv = &DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociation(&sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationOutput(v **DeleteLocalGatewayRouteTableVpcAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteLocalGatewayRouteTableVpcAssociationOutput - if *v == nil { - sv = &DeleteLocalGatewayRouteTableVpcAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableVpcAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociation(&sv.LocalGatewayRouteTableVpcAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteManagedPrefixListOutput(v **DeleteManagedPrefixListOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteManagedPrefixListOutput - if *v == nil { - sv = &DeleteManagedPrefixListOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("prefixList", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteNatGatewayOutput(v **DeleteNatGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteNatGatewayOutput - if *v == nil { - sv = &DeleteNatGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAccessScopeAnalysisOutput(v **DeleteNetworkInsightsAccessScopeAnalysisOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteNetworkInsightsAccessScopeAnalysisOutput - if *v == nil { - sv = &DeleteNetworkInsightsAccessScopeAnalysisOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScopeAnalysisId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeAnalysisId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAccessScopeOutput(v **DeleteNetworkInsightsAccessScopeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteNetworkInsightsAccessScopeOutput - if *v == nil { - sv = &DeleteNetworkInsightsAccessScopeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScopeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteNetworkInsightsAnalysisOutput(v **DeleteNetworkInsightsAnalysisOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteNetworkInsightsAnalysisOutput - if *v == nil { - sv = &DeleteNetworkInsightsAnalysisOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAnalysisId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAnalysisId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteNetworkInsightsPathOutput(v **DeleteNetworkInsightsPathOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteNetworkInsightsPathOutput - if *v == nil { - sv = &DeleteNetworkInsightsPathOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsPathId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsPathId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteNetworkInterfacePermissionOutput(v **DeleteNetworkInterfacePermissionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteNetworkInterfacePermissionOutput - if *v == nil { - sv = &DeleteNetworkInterfacePermissionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeletePublicIpv4PoolOutput(v **DeletePublicIpv4PoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeletePublicIpv4PoolOutput - if *v == nil { - sv = &DeletePublicIpv4PoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("returnValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteQueuedReservedInstancesOutput(v **DeleteQueuedReservedInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteQueuedReservedInstancesOutput - if *v == nil { - sv = &DeleteQueuedReservedInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("failedQueuedPurchaseDeletionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFailedQueuedPurchaseDeletionSet(&sv.FailedQueuedPurchaseDeletions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("successfulQueuedPurchaseDeletionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSuccessfulQueuedPurchaseDeletionSet(&sv.SuccessfulQueuedPurchaseDeletions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteSubnetCidrReservationOutput(v **DeleteSubnetCidrReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteSubnetCidrReservationOutput - if *v == nil { - sv = &DeleteSubnetCidrReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deletedSubnetCidrReservation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetCidrReservation(&sv.DeletedSubnetCidrReservation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterOutput(v **DeleteTrafficMirrorFilterOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTrafficMirrorFilterOutput - if *v == nil { - sv = &DeleteTrafficMirrorFilterOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorFilterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorFilterId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTrafficMirrorFilterRuleOutput(v **DeleteTrafficMirrorFilterRuleOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTrafficMirrorFilterRuleOutput - if *v == nil { - sv = &DeleteTrafficMirrorFilterRuleOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorFilterRuleId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorFilterRuleId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTrafficMirrorSessionOutput(v **DeleteTrafficMirrorSessionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTrafficMirrorSessionOutput - if *v == nil { - sv = &DeleteTrafficMirrorSessionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorSessionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorSessionId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTrafficMirrorTargetOutput(v **DeleteTrafficMirrorTargetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTrafficMirrorTargetOutput - if *v == nil { - sv = &DeleteTrafficMirrorTargetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorTargetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficMirrorTargetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectOutput(v **DeleteTransitGatewayConnectOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayConnectOutput - if *v == nil { - sv = &DeleteTransitGatewayConnectOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayConnect", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnect(&sv.TransitGatewayConnect, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayConnectPeerOutput(v **DeleteTransitGatewayConnectPeerOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayConnectPeerOutput - if *v == nil { - sv = &DeleteTransitGatewayConnectPeerOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayConnectPeer", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeer(&sv.TransitGatewayConnectPeer, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayMulticastDomainOutput(v **DeleteTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayMulticastDomainOutput - if *v == nil { - sv = &DeleteTransitGatewayMulticastDomainOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayMulticastDomain", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomain(&sv.TransitGatewayMulticastDomain, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayOutput(v **DeleteTransitGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayOutput - if *v == nil { - sv = &DeleteTransitGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGateway(&sv.TransitGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayPeeringAttachmentOutput(v **DeleteTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayPeeringAttachmentOutput - if *v == nil { - sv = &DeleteTransitGatewayPeeringAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPeeringAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayPolicyTableOutput(v **DeleteTransitGatewayPolicyTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayPolicyTableOutput - if *v == nil { - sv = &DeleteTransitGatewayPolicyTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPolicyTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTable(&sv.TransitGatewayPolicyTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayPrefixListReferenceOutput(v **DeleteTransitGatewayPrefixListReferenceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayPrefixListReferenceOutput - if *v == nil { - sv = &DeleteTransitGatewayPrefixListReferenceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPrefixListReference", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&sv.TransitGatewayPrefixListReference, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteOutput(v **DeleteTransitGatewayRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayRouteOutput - if *v == nil { - sv = &DeleteTransitGatewayRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("route", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&sv.Route, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteTableAnnouncementOutput(v **DeleteTransitGatewayRouteTableAnnouncementOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayRouteTableAnnouncementOutput - if *v == nil { - sv = &DeleteTransitGatewayRouteTableAnnouncementOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayRouteTableAnnouncement", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncement(&sv.TransitGatewayRouteTableAnnouncement, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayRouteTableOutput(v **DeleteTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayRouteTableOutput - if *v == nil { - sv = &DeleteTransitGatewayRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayRouteTable", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTable(&sv.TransitGatewayRouteTable, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteTransitGatewayVpcAttachmentOutput(v **DeleteTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteTransitGatewayVpcAttachmentOutput - if *v == nil { - sv = &DeleteTransitGatewayVpcAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayVpcAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVerifiedAccessEndpointOutput(v **DeleteVerifiedAccessEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVerifiedAccessEndpointOutput - if *v == nil { - sv = &DeleteVerifiedAccessEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpoint(&sv.VerifiedAccessEndpoint, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVerifiedAccessGroupOutput(v **DeleteVerifiedAccessGroupOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVerifiedAccessGroupOutput - if *v == nil { - sv = &DeleteVerifiedAccessGroupOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessGroup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessGroup(&sv.VerifiedAccessGroup, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVerifiedAccessInstanceOutput(v **DeleteVerifiedAccessInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVerifiedAccessInstanceOutput - if *v == nil { - sv = &DeleteVerifiedAccessInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&sv.VerifiedAccessInstance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVerifiedAccessTrustProviderOutput(v **DeleteVerifiedAccessTrustProviderOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVerifiedAccessTrustProviderOutput - if *v == nil { - sv = &DeleteVerifiedAccessTrustProviderOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessTrustProvider", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&sv.VerifiedAccessTrustProvider, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVpcEndpointConnectionNotificationsOutput(v **DeleteVpcEndpointConnectionNotificationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVpcEndpointConnectionNotificationsOutput - if *v == nil { - sv = &DeleteVpcEndpointConnectionNotificationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVpcEndpointServiceConfigurationsOutput(v **DeleteVpcEndpointServiceConfigurationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVpcEndpointServiceConfigurationsOutput - if *v == nil { - sv = &DeleteVpcEndpointServiceConfigurationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVpcEndpointsOutput(v **DeleteVpcEndpointsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVpcEndpointsOutput - if *v == nil { - sv = &DeleteVpcEndpointsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeleteVpcPeeringConnectionOutput(v **DeleteVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteVpcPeeringConnectionOutput - if *v == nil { - sv = &DeleteVpcPeeringConnectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeprovisionByoipCidrOutput(v **DeprovisionByoipCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeprovisionByoipCidrOutput - if *v == nil { - sv = &DeprovisionByoipCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeprovisionIpamByoasnOutput(v **DeprovisionIpamByoasnOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeprovisionIpamByoasnOutput - if *v == nil { - sv = &DeprovisionIpamByoasnOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoasn", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoasn(&sv.Byoasn, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeprovisionIpamPoolCidrOutput(v **DeprovisionIpamPoolCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeprovisionIpamPoolCidrOutput - if *v == nil { - sv = &DeprovisionIpamPoolCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPoolCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolCidr(&sv.IpamPoolCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeprovisionPublicIpv4PoolCidrOutput(v **DeprovisionPublicIpv4PoolCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeprovisionPublicIpv4PoolCidrOutput - if *v == nil { - sv = &DeprovisionPublicIpv4PoolCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deprovisionedAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDeprovisionedAddressSet(&sv.DeprovisionedAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("poolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeregisterInstanceEventNotificationAttributesOutput(v **DeregisterInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeregisterInstanceEventNotificationAttributesOutput - if *v == nil { - sv = &DeregisterInstanceEventNotificationAttributesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceTagAttribute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(&sv.InstanceTagAttribute, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersOutput(v **DeregisterTransitGatewayMulticastGroupMembersOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeregisterTransitGatewayMulticastGroupMembersOutput - if *v == nil { - sv = &DeregisterTransitGatewayMulticastGroupMembersOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deregisteredMulticastGroupMembers", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupMembers(&sv.DeregisteredMulticastGroupMembers, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesOutput(v **DeregisterTransitGatewayMulticastGroupSourcesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeregisterTransitGatewayMulticastGroupSourcesOutput - if *v == nil { - sv = &DeregisterTransitGatewayMulticastGroupSourcesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("deregisteredMulticastGroupSources", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDeregisteredGroupSources(&sv.DeregisteredMulticastGroupSources, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAccountAttributesOutput(v **DescribeAccountAttributesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAccountAttributesOutput - if *v == nil { - sv = &DescribeAccountAttributesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accountAttributeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAccountAttributeList(&sv.AccountAttributes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAddressesAttributeOutput(v **DescribeAddressesAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAddressesAttributeOutput - if *v == nil { - sv = &DescribeAddressesAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressSet(&sv.Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAddressesOutput(v **DescribeAddressesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAddressesOutput - if *v == nil { - sv = &DescribeAddressesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressList(&sv.Addresses, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAddressTransfersOutput(v **DescribeAddressTransfersOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAddressTransfersOutput - if *v == nil { - sv = &DescribeAddressTransfersOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressTransferSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressTransferList(&sv.AddressTransfers, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAggregateIdFormatOutput(v **DescribeAggregateIdFormatOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAggregateIdFormatOutput - if *v == nil { - sv = &DescribeAggregateIdFormatOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("statusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("useLongIdsAggregated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.UseLongIdsAggregated = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAvailabilityZonesOutput(v **DescribeAvailabilityZonesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAvailabilityZonesOutput - if *v == nil { - sv = &DescribeAvailabilityZonesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availabilityZoneInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAvailabilityZoneList(&sv.AvailabilityZones, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeAwsNetworkPerformanceMetricSubscriptionsOutput(v **DescribeAwsNetworkPerformanceMetricSubscriptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeAwsNetworkPerformanceMetricSubscriptionsOutput - if *v == nil { - sv = &DescribeAwsNetworkPerformanceMetricSubscriptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("subscriptionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubscriptionList(&sv.Subscriptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeBundleTasksOutput(v **DescribeBundleTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeBundleTasksOutput - if *v == nil { - sv = &DescribeBundleTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("bundleInstanceTasksSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBundleTaskList(&sv.BundleTasks, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeByoipCidrsOutput(v **DescribeByoipCidrsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeByoipCidrsOutput - if *v == nil { - sv = &DescribeByoipCidrsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoipCidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoipCidrSet(&sv.ByoipCidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeCapacityBlockOfferingsOutput(v **DescribeCapacityBlockOfferingsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeCapacityBlockOfferingsOutput - if *v == nil { - sv = &DescribeCapacityBlockOfferingsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityBlockOfferingSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityBlockOfferingSet(&sv.CapacityBlockOfferings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeCapacityReservationFleetsOutput(v **DescribeCapacityReservationFleetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeCapacityReservationFleetsOutput - if *v == nil { - sv = &DescribeCapacityReservationFleetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationFleetSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationFleetSet(&sv.CapacityReservationFleets, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeCapacityReservationsOutput(v **DescribeCapacityReservationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeCapacityReservationsOutput - if *v == nil { - sv = &DescribeCapacityReservationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationSet(&sv.CapacityReservations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeCarrierGatewaysOutput(v **DescribeCarrierGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeCarrierGatewaysOutput - if *v == nil { - sv = &DescribeCarrierGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("carrierGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCarrierGatewaySet(&sv.CarrierGateways, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeClassicLinkInstancesOutput(v **DescribeClassicLinkInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeClassicLinkInstancesOutput - if *v == nil { - sv = &DescribeClassicLinkInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClassicLinkInstanceList(&sv.Instances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeClientVpnAuthorizationRulesOutput(v **DescribeClientVpnAuthorizationRulesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeClientVpnAuthorizationRulesOutput - if *v == nil { - sv = &DescribeClientVpnAuthorizationRulesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("authorizationRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAuthorizationRuleSet(&sv.AuthorizationRules, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeClientVpnConnectionsOutput(v **DescribeClientVpnConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeClientVpnConnectionsOutput - if *v == nil { - sv = &DescribeClientVpnConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("connections", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnConnectionSet(&sv.Connections, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeClientVpnEndpointsOutput(v **DescribeClientVpnEndpointsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeClientVpnEndpointsOutput - if *v == nil { - sv = &DescribeClientVpnEndpointsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientVpnEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEndpointSet(&sv.ClientVpnEndpoints, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeClientVpnRoutesOutput(v **DescribeClientVpnRoutesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeClientVpnRoutesOutput - if *v == nil { - sv = &DescribeClientVpnRoutesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("routes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnRouteSet(&sv.Routes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeClientVpnTargetNetworksOutput(v **DescribeClientVpnTargetNetworksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeClientVpnTargetNetworksOutput - if *v == nil { - sv = &DescribeClientVpnTargetNetworksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientVpnTargetNetworks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTargetNetworkSet(&sv.ClientVpnTargetNetworks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeCoipPoolsOutput(v **DescribeCoipPoolsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeCoipPoolsOutput - if *v == nil { - sv = &DescribeCoipPoolsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipPoolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoipPoolSet(&sv.CoipPools, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeConversionTasksOutput(v **DescribeConversionTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeConversionTasksOutput - if *v == nil { - sv = &DescribeConversionTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("conversionTasks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDescribeConversionTaskList(&sv.ConversionTasks, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeCustomerGatewaysOutput(v **DescribeCustomerGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeCustomerGatewaysOutput - if *v == nil { - sv = &DescribeCustomerGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("customerGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCustomerGatewayList(&sv.CustomerGateways, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeDhcpOptionsOutput(v **DescribeDhcpOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeDhcpOptionsOutput - if *v == nil { - sv = &DescribeDhcpOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dhcpOptionsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDhcpOptionsList(&sv.DhcpOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeEgressOnlyInternetGatewaysOutput(v **DescribeEgressOnlyInternetGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeEgressOnlyInternetGatewaysOutput - if *v == nil { - sv = &DescribeEgressOnlyInternetGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("egressOnlyInternetGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEgressOnlyInternetGatewayList(&sv.EgressOnlyInternetGateways, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeElasticGpusOutput(v **DescribeElasticGpusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeElasticGpusOutput - if *v == nil { - sv = &DescribeElasticGpusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("elasticGpuSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentElasticGpuSet(&sv.ElasticGpuSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxResults", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxResults = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeExportImageTasksOutput(v **DescribeExportImageTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeExportImageTasksOutput - if *v == nil { - sv = &DescribeExportImageTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("exportImageTaskSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExportImageTaskList(&sv.ExportImageTasks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeExportTasksOutput(v **DescribeExportTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeExportTasksOutput - if *v == nil { - sv = &DescribeExportTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("exportTaskSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExportTaskList(&sv.ExportTasks, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFastLaunchImagesOutput(v **DescribeFastLaunchImagesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFastLaunchImagesOutput - if *v == nil { - sv = &DescribeFastLaunchImagesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fastLaunchImageSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDescribeFastLaunchImagesSuccessSet(&sv.FastLaunchImages, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFastSnapshotRestoresOutput(v **DescribeFastSnapshotRestoresOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFastSnapshotRestoresOutput - if *v == nil { - sv = &DescribeFastSnapshotRestoresOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fastSnapshotRestoreSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDescribeFastSnapshotRestoreSuccessSet(&sv.FastSnapshotRestores, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFleetHistoryOutput(v **DescribeFleetHistoryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFleetHistoryOutput - if *v == nil { - sv = &DescribeFleetHistoryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetId = ptr.String(xtv) - } - - case strings.EqualFold("historyRecordSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHistoryRecordSet(&sv.HistoryRecords, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lastEvaluatedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastEvaluatedTime = ptr.Time(t) - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFleetInstancesOutput(v **DescribeFleetInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFleetInstancesOutput - if *v == nil { - sv = &DescribeFleetInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("activeInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentActiveInstanceSet(&sv.ActiveInstances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("fleetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FleetId = ptr.String(xtv) - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFleetsOutput(v **DescribeFleetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFleetsOutput - if *v == nil { - sv = &DescribeFleetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fleetSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFleetSet(&sv.Fleets, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFlowLogsOutput(v **DescribeFlowLogsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFlowLogsOutput - if *v == nil { - sv = &DescribeFlowLogsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("flowLogSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFlowLogSet(&sv.FlowLogs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFpgaImageAttributeOutput(v **DescribeFpgaImageAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFpgaImageAttributeOutput - if *v == nil { - sv = &DescribeFpgaImageAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fpgaImageAttribute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaImageAttribute(&sv.FpgaImageAttribute, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeFpgaImagesOutput(v **DescribeFpgaImagesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeFpgaImagesOutput - if *v == nil { - sv = &DescribeFpgaImagesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fpgaImageSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaImageList(&sv.FpgaImages, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeHostReservationOfferingsOutput(v **DescribeHostReservationOfferingsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeHostReservationOfferingsOutput - if *v == nil { - sv = &DescribeHostReservationOfferingsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("offeringSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHostOfferingSet(&sv.OfferingSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeHostReservationsOutput(v **DescribeHostReservationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeHostReservationsOutput - if *v == nil { - sv = &DescribeHostReservationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("hostReservationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHostReservationSet(&sv.HostReservationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeHostsOutput(v **DescribeHostsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeHostsOutput - if *v == nil { - sv = &DescribeHostsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("hostSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHostList(&sv.Hosts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIamInstanceProfileAssociationsOutput(v **DescribeIamInstanceProfileAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIamInstanceProfileAssociationsOutput - if *v == nil { - sv = &DescribeIamInstanceProfileAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("iamInstanceProfileAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociationSet(&sv.IamInstanceProfileAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIdentityIdFormatOutput(v **DescribeIdentityIdFormatOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIdentityIdFormatOutput - if *v == nil { - sv = &DescribeIdentityIdFormatOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("statusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIdFormatOutput(v **DescribeIdFormatOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIdFormatOutput - if *v == nil { - sv = &DescribeIdFormatOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("statusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIdFormatList(&sv.Statuses, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeImageAttributeOutput(v **DescribeImageAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeImageAttributeOutput - if *v == nil { - sv = &DescribeImageAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("blockDeviceMapping", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("bootMode", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.BootMode, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("description", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.Description, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("imdsSupport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.ImdsSupport, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("kernel", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.KernelId, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lastLaunchedTime", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.LastLaunchedTime, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("launchPermission", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchPermissionList(&sv.LaunchPermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ramdisk", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.RamdiskId, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sriovNetSupport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.SriovNetSupport, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tpmSupport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.TpmSupport, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("uefiData", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.UefiData, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeImagesOutput(v **DescribeImagesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeImagesOutput - if *v == nil { - sv = &DescribeImagesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imagesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImageList(&sv.Images, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeImportImageTasksOutput(v **DescribeImportImageTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeImportImageTasksOutput - if *v == nil { - sv = &DescribeImportImageTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("importImageTaskSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportImageTaskList(&sv.ImportImageTasks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeImportSnapshotTasksOutput(v **DescribeImportSnapshotTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeImportSnapshotTasksOutput - if *v == nil { - sv = &DescribeImportSnapshotTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("importSnapshotTaskSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportSnapshotTaskList(&sv.ImportSnapshotTasks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceAttributeOutput(v **DescribeInstanceAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceAttributeOutput - if *v == nil { - sv = &DescribeInstanceAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("blockDeviceMapping", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceBlockDeviceMappingList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("disableApiStop", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.DisableApiStop, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("disableApiTermination", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.DisableApiTermination, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ebsOptimized", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EbsOptimized, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enaSupport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnaSupport, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enclaveOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnclaveOptions(&sv.EnclaveOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceInitiatedShutdownBehavior", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.InstanceInitiatedShutdownBehavior, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instanceType", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.InstanceType, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("kernel", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.KernelId, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ramdisk", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.RamdiskId, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("rootDeviceName", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.RootDeviceName, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sourceDestCheck", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.SourceDestCheck, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("sriovNetSupport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.SriovNetSupport, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("userData", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.UserData, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceConnectEndpointsOutput(v **DescribeInstanceConnectEndpointsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceConnectEndpointsOutput - if *v == nil { - sv = &DescribeInstanceConnectEndpointsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceConnectEndpointSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceConnectEndpointSet(&sv.InstanceConnectEndpoints, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceCreditSpecificationsOutput(v **DescribeInstanceCreditSpecificationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceCreditSpecificationsOutput - if *v == nil { - sv = &DescribeInstanceCreditSpecificationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceCreditSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceCreditSpecificationList(&sv.InstanceCreditSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceEventNotificationAttributesOutput(v **DescribeInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceEventNotificationAttributesOutput - if *v == nil { - sv = &DescribeInstanceEventNotificationAttributesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceTagAttribute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(&sv.InstanceTagAttribute, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceEventWindowsOutput(v **DescribeInstanceEventWindowsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceEventWindowsOutput - if *v == nil { - sv = &DescribeInstanceEventWindowsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindowSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindowSet(&sv.InstanceEventWindows, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstancesOutput(v **DescribeInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstancesOutput - if *v == nil { - sv = &DescribeInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("reservationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservationList(&sv.Reservations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceStatusOutput(v **DescribeInstanceStatusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceStatusOutput - if *v == nil { - sv = &DescribeInstanceStatusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceStatusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStatusList(&sv.InstanceStatuses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceTopologyOutput(v **DescribeInstanceTopologyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceTopologyOutput - if *v == nil { - sv = &DescribeInstanceTopologyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceSet(&sv.Instances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceTypeOfferingsOutput(v **DescribeInstanceTypeOfferingsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceTypeOfferingsOutput - if *v == nil { - sv = &DescribeInstanceTypeOfferingsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceTypeOfferingSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTypeOfferingsList(&sv.InstanceTypeOfferings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInstanceTypesOutput(v **DescribeInstanceTypesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInstanceTypesOutput - if *v == nil { - sv = &DescribeInstanceTypesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTypeInfoList(&sv.InstanceTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeInternetGatewaysOutput(v **DescribeInternetGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeInternetGatewaysOutput - if *v == nil { - sv = &DescribeInternetGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("internetGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInternetGatewayList(&sv.InternetGateways, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpamByoasnOutput(v **DescribeIpamByoasnOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpamByoasnOutput - if *v == nil { - sv = &DescribeIpamByoasnOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoasnSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoasnSet(&sv.Byoasns, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpamPoolsOutput(v **DescribeIpamPoolsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpamPoolsOutput - if *v == nil { - sv = &DescribeIpamPoolsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPoolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolSet(&sv.IpamPools, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveriesOutput(v **DescribeIpamResourceDiscoveriesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpamResourceDiscoveriesOutput - if *v == nil { - sv = &DescribeIpamResourceDiscoveriesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscoverySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscoverySet(&sv.IpamResourceDiscoveries, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpamResourceDiscoveryAssociationsOutput(v **DescribeIpamResourceDiscoveryAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpamResourceDiscoveryAssociationsOutput - if *v == nil { - sv = &DescribeIpamResourceDiscoveryAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscoveryAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociationSet(&sv.IpamResourceDiscoveryAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpamScopesOutput(v **DescribeIpamScopesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpamScopesOutput - if *v == nil { - sv = &DescribeIpamScopesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamScopeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamScopeSet(&sv.IpamScopes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpamsOutput(v **DescribeIpamsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpamsOutput - if *v == nil { - sv = &DescribeIpamsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamSet(&sv.Ipams, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeIpv6PoolsOutput(v **DescribeIpv6PoolsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeIpv6PoolsOutput - if *v == nil { - sv = &DescribeIpv6PoolsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6PoolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6PoolSet(&sv.Ipv6Pools, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeKeyPairsOutput(v **DescribeKeyPairsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeKeyPairsOutput - if *v == nil { - sv = &DescribeKeyPairsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("keySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentKeyPairList(&sv.KeyPairs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLaunchTemplatesOutput(v **DescribeLaunchTemplatesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLaunchTemplatesOutput - if *v == nil { - sv = &DescribeLaunchTemplatesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplates", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateSet(&sv.LaunchTemplates, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLaunchTemplateVersionsOutput(v **DescribeLaunchTemplateVersionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLaunchTemplateVersionsOutput - if *v == nil { - sv = &DescribeLaunchTemplateVersionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateVersionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplateVersionSet(&sv.LaunchTemplateVersions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTablesOutput(v **DescribeLocalGatewayRouteTablesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLocalGatewayRouteTablesOutput - if *v == nil { - sv = &DescribeLocalGatewayRouteTablesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableSet(&sv.LocalGatewayRouteTables, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput(v **DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput - if *v == nil { - sv = &DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableVirtualInterfaceGroupAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationSet(&sv.LocalGatewayRouteTableVirtualInterfaceGroupAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsOutput(v **DescribeLocalGatewayRouteTableVpcAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLocalGatewayRouteTableVpcAssociationsOutput - if *v == nil { - sv = &DescribeLocalGatewayRouteTableVpcAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayRouteTableVpcAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteTableVpcAssociationSet(&sv.LocalGatewayRouteTableVpcAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLocalGatewaysOutput(v **DescribeLocalGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLocalGatewaysOutput - if *v == nil { - sv = &DescribeLocalGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewaySet(&sv.LocalGateways, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsOutput(v **DescribeLocalGatewayVirtualInterfaceGroupsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLocalGatewayVirtualInterfaceGroupsOutput - if *v == nil { - sv = &DescribeLocalGatewayVirtualInterfaceGroupsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayVirtualInterfaceGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceGroupSet(&sv.LocalGatewayVirtualInterfaceGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLocalGatewayVirtualInterfacesOutput(v **DescribeLocalGatewayVirtualInterfacesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLocalGatewayVirtualInterfacesOutput - if *v == nil { - sv = &DescribeLocalGatewayVirtualInterfacesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("localGatewayVirtualInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayVirtualInterfaceSet(&sv.LocalGatewayVirtualInterfaces, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeLockedSnapshotsOutput(v **DescribeLockedSnapshotsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeLockedSnapshotsOutput - if *v == nil { - sv = &DescribeLockedSnapshotsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("snapshotSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLockedSnapshotsInfoList(&sv.Snapshots, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeManagedPrefixListsOutput(v **DescribeManagedPrefixListsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeManagedPrefixListsOutput - if *v == nil { - sv = &DescribeManagedPrefixListsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("prefixListSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentManagedPrefixListSet(&sv.PrefixLists, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeMovingAddressesOutput(v **DescribeMovingAddressesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeMovingAddressesOutput - if *v == nil { - sv = &DescribeMovingAddressesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("movingAddressStatusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMovingAddressStatusSet(&sv.MovingAddressStatuses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNatGatewaysOutput(v **DescribeNatGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNatGatewaysOutput - if *v == nil { - sv = &DescribeNatGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("natGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayList(&sv.NatGateways, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkAclsOutput(v **DescribeNetworkAclsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkAclsOutput - if *v == nil { - sv = &DescribeNetworkAclsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkAclSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkAclList(&sv.NetworkAcls, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesOutput(v **DescribeNetworkInsightsAccessScopeAnalysesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInsightsAccessScopeAnalysesOutput - if *v == nil { - sv = &DescribeNetworkInsightsAccessScopeAnalysesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScopeAnalysisSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysisList(&sv.NetworkInsightsAccessScopeAnalyses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAccessScopesOutput(v **DescribeNetworkInsightsAccessScopesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInsightsAccessScopesOutput - if *v == nil { - sv = &DescribeNetworkInsightsAccessScopesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScopeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeList(&sv.NetworkInsightsAccessScopes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsAnalysesOutput(v **DescribeNetworkInsightsAnalysesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInsightsAnalysesOutput - if *v == nil { - sv = &DescribeNetworkInsightsAnalysesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAnalysisSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysisList(&sv.NetworkInsightsAnalyses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInsightsPathsOutput(v **DescribeNetworkInsightsPathsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInsightsPathsOutput - if *v == nil { - sv = &DescribeNetworkInsightsPathsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsPathSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsPathList(&sv.NetworkInsightsPaths, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInterfaceAttributeOutput(v **DescribeNetworkInterfaceAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInterfaceAttributeOutput - if *v == nil { - sv = &DescribeNetworkInterfaceAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("attachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceAttachment(&sv.Attachment, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("description", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeValue(&sv.Description, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("sourceDestCheck", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.SourceDestCheck, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacePermissionsOutput(v **DescribeNetworkInterfacePermissionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInterfacePermissionsOutput - if *v == nil { - sv = &DescribeNetworkInterfacePermissionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInterfacePermissions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfacePermissionList(&sv.NetworkInterfacePermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeNetworkInterfacesOutput(v **DescribeNetworkInterfacesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeNetworkInterfacesOutput - if *v == nil { - sv = &DescribeNetworkInterfacesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInterfaceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInterfaceList(&sv.NetworkInterfaces, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribePlacementGroupsOutput(v **DescribePlacementGroupsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribePlacementGroupsOutput - if *v == nil { - sv = &DescribePlacementGroupsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("placementGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPlacementGroupList(&sv.PlacementGroups, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribePrefixListsOutput(v **DescribePrefixListsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribePrefixListsOutput - if *v == nil { - sv = &DescribePrefixListsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("prefixListSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrefixListSet(&sv.PrefixLists, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribePrincipalIdFormatOutput(v **DescribePrincipalIdFormatOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribePrincipalIdFormatOutput - if *v == nil { - sv = &DescribePrincipalIdFormatOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("principalSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrincipalIdFormatList(&sv.Principals, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribePublicIpv4PoolsOutput(v **DescribePublicIpv4PoolsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribePublicIpv4PoolsOutput - if *v == nil { - sv = &DescribePublicIpv4PoolsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("publicIpv4PoolSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPublicIpv4PoolSet(&sv.PublicIpv4Pools, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeRegionsOutput(v **DescribeRegionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeRegionsOutput - if *v == nil { - sv = &DescribeRegionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("regionInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRegionList(&sv.Regions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeReplaceRootVolumeTasksOutput(v **DescribeReplaceRootVolumeTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeReplaceRootVolumeTasksOutput - if *v == nil { - sv = &DescribeReplaceRootVolumeTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("replaceRootVolumeTaskSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReplaceRootVolumeTasks(&sv.ReplaceRootVolumeTasks, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesListingsOutput(v **DescribeReservedInstancesListingsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeReservedInstancesListingsOutput - if *v == nil { - sv = &DescribeReservedInstancesListingsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesListingsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesListingList(&sv.ReservedInstancesListings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesModificationsOutput(v **DescribeReservedInstancesModificationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeReservedInstancesModificationsOutput - if *v == nil { - sv = &DescribeReservedInstancesModificationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("reservedInstancesModificationsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesModificationList(&sv.ReservedInstancesModifications, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOfferingsOutput(v **DescribeReservedInstancesOfferingsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeReservedInstancesOfferingsOutput - if *v == nil { - sv = &DescribeReservedInstancesOfferingsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("reservedInstancesOfferingsSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesOfferingList(&sv.ReservedInstancesOfferings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeReservedInstancesOutput(v **DescribeReservedInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeReservedInstancesOutput - if *v == nil { - sv = &DescribeReservedInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstancesList(&sv.ReservedInstances, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeRouteTablesOutput(v **DescribeRouteTablesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeRouteTablesOutput - if *v == nil { - sv = &DescribeRouteTablesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("routeTableSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTableList(&sv.RouteTables, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeScheduledInstanceAvailabilityOutput(v **DescribeScheduledInstanceAvailabilityOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeScheduledInstanceAvailabilityOutput - if *v == nil { - sv = &DescribeScheduledInstanceAvailabilityOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("scheduledInstanceAvailabilitySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceAvailabilitySet(&sv.ScheduledInstanceAvailabilitySet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeScheduledInstancesOutput(v **DescribeScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeScheduledInstancesOutput - if *v == nil { - sv = &DescribeScheduledInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("scheduledInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentScheduledInstanceSet(&sv.ScheduledInstanceSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupReferencesOutput(v **DescribeSecurityGroupReferencesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSecurityGroupReferencesOutput - if *v == nil { - sv = &DescribeSecurityGroupReferencesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("securityGroupReferenceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupReferences(&sv.SecurityGroupReferenceSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupRulesOutput(v **DescribeSecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSecurityGroupRulesOutput - if *v == nil { - sv = &DescribeSecurityGroupRulesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupRuleSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupRuleList(&sv.SecurityGroupRules, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSecurityGroupsOutput(v **DescribeSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSecurityGroupsOutput - if *v == nil { - sv = &DescribeSecurityGroupsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupList(&sv.SecurityGroups, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSnapshotAttributeOutput(v **DescribeSnapshotAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSnapshotAttributeOutput - if *v == nil { - sv = &DescribeSnapshotAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("createVolumePermission", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCreateVolumePermissionList(&sv.CreateVolumePermissions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSnapshotsOutput(v **DescribeSnapshotsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSnapshotsOutput - if *v == nil { - sv = &DescribeSnapshotsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("snapshotSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotList(&sv.Snapshots, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSnapshotTierStatusOutput(v **DescribeSnapshotTierStatusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSnapshotTierStatusOutput - if *v == nil { - sv = &DescribeSnapshotTierStatusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("snapshotTierStatusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotTierStatusSet(&sv.SnapshotTierStatuses, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSpotDatafeedSubscriptionOutput(v **DescribeSpotDatafeedSubscriptionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSpotDatafeedSubscriptionOutput - if *v == nil { - sv = &DescribeSpotDatafeedSubscriptionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("spotDatafeedSubscription", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotDatafeedSubscription(&sv.SpotDatafeedSubscription, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSpotFleetInstancesOutput(v **DescribeSpotFleetInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSpotFleetInstancesOutput - if *v == nil { - sv = &DescribeSpotFleetInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("activeInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentActiveInstanceSet(&sv.ActiveInstances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("spotFleetRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestHistoryOutput(v **DescribeSpotFleetRequestHistoryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSpotFleetRequestHistoryOutput - if *v == nil { - sv = &DescribeSpotFleetRequestHistoryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("historyRecordSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentHistoryRecords(&sv.HistoryRecords, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("lastEvaluatedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastEvaluatedTime = ptr.Time(t) - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("spotFleetRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestId = ptr.String(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSpotFleetRequestsOutput(v **DescribeSpotFleetRequestsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSpotFleetRequestsOutput - if *v == nil { - sv = &DescribeSpotFleetRequestsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("spotFleetRequestConfigSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotFleetRequestConfigSet(&sv.SpotFleetRequestConfigs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSpotInstanceRequestsOutput(v **DescribeSpotInstanceRequestsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSpotInstanceRequestsOutput - if *v == nil { - sv = &DescribeSpotInstanceRequestsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("spotInstanceRequestSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotInstanceRequestList(&sv.SpotInstanceRequests, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSpotPriceHistoryOutput(v **DescribeSpotPriceHistoryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSpotPriceHistoryOutput - if *v == nil { - sv = &DescribeSpotPriceHistoryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("spotPriceHistorySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotPriceHistoryList(&sv.SpotPriceHistory, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeStaleSecurityGroupsOutput(v **DescribeStaleSecurityGroupsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeStaleSecurityGroupsOutput - if *v == nil { - sv = &DescribeStaleSecurityGroupsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("staleSecurityGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStaleSecurityGroupSet(&sv.StaleSecurityGroupSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeStoreImageTasksOutput(v **DescribeStoreImageTasksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeStoreImageTasksOutput - if *v == nil { - sv = &DescribeStoreImageTasksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("storeImageTaskResultSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentStoreImageTaskResultSet(&sv.StoreImageTaskResults, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeSubnetsOutput(v **DescribeSubnetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeSubnetsOutput - if *v == nil { - sv = &DescribeSubnetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("subnetSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetList(&sv.Subnets, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTagsOutput(v **DescribeTagsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTagsOutput - if *v == nil { - sv = &DescribeTagsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagDescriptionList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTrafficMirrorFiltersOutput(v **DescribeTrafficMirrorFiltersOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTrafficMirrorFiltersOutput - if *v == nil { - sv = &DescribeTrafficMirrorFiltersOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorFilterSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterSet(&sv.TrafficMirrorFilters, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTrafficMirrorSessionsOutput(v **DescribeTrafficMirrorSessionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTrafficMirrorSessionsOutput - if *v == nil { - sv = &DescribeTrafficMirrorSessionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorSessionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorSessionSet(&sv.TrafficMirrorSessions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTrafficMirrorTargetsOutput(v **DescribeTrafficMirrorTargetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTrafficMirrorTargetsOutput - if *v == nil { - sv = &DescribeTrafficMirrorTargetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("trafficMirrorTargetSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorTargetSet(&sv.TrafficMirrorTargets, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayAttachmentsOutput(v **DescribeTransitGatewayAttachmentsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayAttachmentsOutput - if *v == nil { - sv = &DescribeTransitGatewayAttachmentsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayAttachments", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentList(&sv.TransitGatewayAttachments, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectPeersOutput(v **DescribeTransitGatewayConnectPeersOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayConnectPeersOutput - if *v == nil { - sv = &DescribeTransitGatewayConnectPeersOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayConnectPeerSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnectPeerList(&sv.TransitGatewayConnectPeers, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayConnectsOutput(v **DescribeTransitGatewayConnectsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayConnectsOutput - if *v == nil { - sv = &DescribeTransitGatewayConnectsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayConnectSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayConnectList(&sv.TransitGatewayConnects, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayMulticastDomainsOutput(v **DescribeTransitGatewayMulticastDomainsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayMulticastDomainsOutput - if *v == nil { - sv = &DescribeTransitGatewayMulticastDomainsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayMulticastDomains", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainList(&sv.TransitGatewayMulticastDomains, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayPeeringAttachmentsOutput(v **DescribeTransitGatewayPeeringAttachmentsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayPeeringAttachmentsOutput - if *v == nil { - sv = &DescribeTransitGatewayPeeringAttachmentsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayPeeringAttachments", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachmentList(&sv.TransitGatewayPeeringAttachments, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayPolicyTablesOutput(v **DescribeTransitGatewayPolicyTablesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayPolicyTablesOutput - if *v == nil { - sv = &DescribeTransitGatewayPolicyTablesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayPolicyTables", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableList(&sv.TransitGatewayPolicyTables, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayRouteTableAnnouncementsOutput(v **DescribeTransitGatewayRouteTableAnnouncementsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayRouteTableAnnouncementsOutput - if *v == nil { - sv = &DescribeTransitGatewayRouteTableAnnouncementsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTableAnnouncements", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAnnouncementList(&sv.TransitGatewayRouteTableAnnouncements, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayRouteTablesOutput(v **DescribeTransitGatewayRouteTablesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayRouteTablesOutput - if *v == nil { - sv = &DescribeTransitGatewayRouteTablesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTables", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableList(&sv.TransitGatewayRouteTables, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewaysOutput(v **DescribeTransitGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewaysOutput - if *v == nil { - sv = &DescribeTransitGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayList(&sv.TransitGateways, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTransitGatewayVpcAttachmentsOutput(v **DescribeTransitGatewayVpcAttachmentsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTransitGatewayVpcAttachmentsOutput - if *v == nil { - sv = &DescribeTransitGatewayVpcAttachmentsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayVpcAttachments", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachmentList(&sv.TransitGatewayVpcAttachments, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeTrunkInterfaceAssociationsOutput(v **DescribeTrunkInterfaceAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeTrunkInterfaceAssociationsOutput - if *v == nil { - sv = &DescribeTrunkInterfaceAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("interfaceAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrunkInterfaceAssociationList(&sv.InterfaceAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVerifiedAccessEndpointsOutput(v **DescribeVerifiedAccessEndpointsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVerifiedAccessEndpointsOutput - if *v == nil { - sv = &DescribeVerifiedAccessEndpointsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessEndpointSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpointList(&sv.VerifiedAccessEndpoints, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVerifiedAccessGroupsOutput(v **DescribeVerifiedAccessGroupsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVerifiedAccessGroupsOutput - if *v == nil { - sv = &DescribeVerifiedAccessGroupsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessGroupList(&sv.VerifiedAccessGroups, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVerifiedAccessInstanceLoggingConfigurationsOutput(v **DescribeVerifiedAccessInstanceLoggingConfigurationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVerifiedAccessInstanceLoggingConfigurationsOutput - if *v == nil { - sv = &DescribeVerifiedAccessInstanceLoggingConfigurationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("loggingConfigurationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfigurationList(&sv.LoggingConfigurations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVerifiedAccessInstancesOutput(v **DescribeVerifiedAccessInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVerifiedAccessInstancesOutput - if *v == nil { - sv = &DescribeVerifiedAccessInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstanceList(&sv.VerifiedAccessInstances, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVerifiedAccessTrustProvidersOutput(v **DescribeVerifiedAccessTrustProvidersOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVerifiedAccessTrustProvidersOutput - if *v == nil { - sv = &DescribeVerifiedAccessTrustProvidersOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("verifiedAccessTrustProviderSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProviderList(&sv.VerifiedAccessTrustProviders, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVolumeAttributeOutput(v **DescribeVolumeAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVolumeAttributeOutput - if *v == nil { - sv = &DescribeVolumeAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("autoEnableIO", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.AutoEnableIO, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("productCodes", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentProductCodeList(&sv.ProductCodes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVolumesModificationsOutput(v **DescribeVolumesModificationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVolumesModificationsOutput - if *v == nil { - sv = &DescribeVolumesModificationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("volumeModificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeModificationList(&sv.VolumesModifications, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVolumesOutput(v **DescribeVolumesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVolumesOutput - if *v == nil { - sv = &DescribeVolumesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("volumeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeList(&sv.Volumes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVolumeStatusOutput(v **DescribeVolumeStatusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVolumeStatusOutput - if *v == nil { - sv = &DescribeVolumeStatusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("volumeStatusSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeStatusList(&sv.VolumeStatuses, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcAttributeOutput(v **DescribeVpcAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcAttributeOutput - if *v == nil { - sv = &DescribeVpcAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("enableDnsHostnames", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnableDnsHostnames, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enableDnsSupport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnableDnsSupport, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("enableNetworkAddressUsageMetrics", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAttributeBooleanValue(&sv.EnableNetworkAddressUsageMetrics, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkDnsSupportOutput(v **DescribeVpcClassicLinkDnsSupportOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcClassicLinkDnsSupportOutput - if *v == nil { - sv = &DescribeVpcClassicLinkDnsSupportOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("vpcs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClassicLinkDnsSupportList(&sv.Vpcs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcClassicLinkOutput(v **DescribeVpcClassicLinkOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcClassicLinkOutput - if *v == nil { - sv = &DescribeVpcClassicLinkOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpcSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcClassicLinkList(&sv.Vpcs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionNotificationsOutput(v **DescribeVpcEndpointConnectionNotificationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcEndpointConnectionNotificationsOutput - if *v == nil { - sv = &DescribeVpcEndpointConnectionNotificationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("connectionNotificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConnectionNotificationSet(&sv.ConnectionNotificationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcEndpointConnectionsOutput(v **DescribeVpcEndpointConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcEndpointConnectionsOutput - if *v == nil { - sv = &DescribeVpcEndpointConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointConnectionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcEndpointConnectionSet(&sv.VpcEndpointConnections, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcEndpointServiceConfigurationsOutput(v **DescribeVpcEndpointServiceConfigurationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcEndpointServiceConfigurationsOutput - if *v == nil { - sv = &DescribeVpcEndpointServiceConfigurationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("serviceConfigurationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentServiceConfigurationSet(&sv.ServiceConfigurations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicePermissionsOutput(v **DescribeVpcEndpointServicePermissionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcEndpointServicePermissionsOutput - if *v == nil { - sv = &DescribeVpcEndpointServicePermissionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allowedPrincipals", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAllowedPrincipalSet(&sv.AllowedPrincipals, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcEndpointServicesOutput(v **DescribeVpcEndpointServicesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcEndpointServicesOutput - if *v == nil { - sv = &DescribeVpcEndpointServicesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("serviceDetailSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentServiceDetailSet(&sv.ServiceDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("serviceNameSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentValueStringList(&sv.ServiceNames, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcEndpointsOutput(v **DescribeVpcEndpointsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcEndpointsOutput - if *v == nil { - sv = &DescribeVpcEndpointsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("vpcEndpointSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcEndpointSet(&sv.VpcEndpoints, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcPeeringConnectionsOutput(v **DescribeVpcPeeringConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcPeeringConnectionsOutput - if *v == nil { - sv = &DescribeVpcPeeringConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("vpcPeeringConnectionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcPeeringConnectionList(&sv.VpcPeeringConnections, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpcsOutput(v **DescribeVpcsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpcsOutput - if *v == nil { - sv = &DescribeVpcsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("vpcSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcList(&sv.Vpcs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpnConnectionsOutput(v **DescribeVpnConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpnConnectionsOutput - if *v == nil { - sv = &DescribeVpnConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnectionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnectionList(&sv.VpnConnections, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDescribeVpnGatewaysOutput(v **DescribeVpnGatewaysOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DescribeVpnGatewaysOutput - if *v == nil { - sv = &DescribeVpnGatewaysOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnGatewaySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnGatewayList(&sv.VpnGateways, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDetachClassicLinkVpcOutput(v **DetachClassicLinkVpcOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DetachClassicLinkVpcOutput - if *v == nil { - sv = &DetachClassicLinkVpcOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDetachVerifiedAccessTrustProviderOutput(v **DetachVerifiedAccessTrustProviderOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DetachVerifiedAccessTrustProviderOutput - if *v == nil { - sv = &DetachVerifiedAccessTrustProviderOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&sv.VerifiedAccessInstance, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("verifiedAccessTrustProvider", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&sv.VerifiedAccessTrustProvider, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDetachVolumeOutput(v **DetachVolumeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DetachVolumeOutput - if *v == nil { - sv = &DetachVolumeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedResource", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociatedResource = ptr.String(xtv) - } - - case strings.EqualFold("attachTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.AttachTime = ptr.Time(t) - } - - case strings.EqualFold("deleteOnTermination", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.DeleteOnTermination = ptr.Bool(xtv) - } - - case strings.EqualFold("device", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Device = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceOwningService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceOwningService = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.VolumeAttachmentState(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableAddressTransferOutput(v **DisableAddressTransferOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableAddressTransferOutput - if *v == nil { - sv = &DisableAddressTransferOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressTransfer", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressTransfer(&sv.AddressTransfer, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableAwsNetworkPerformanceMetricSubscriptionOutput(v **DisableAwsNetworkPerformanceMetricSubscriptionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableAwsNetworkPerformanceMetricSubscriptionOutput - if *v == nil { - sv = &DisableAwsNetworkPerformanceMetricSubscriptionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("output", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Output = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableEbsEncryptionByDefaultOutput(v **DisableEbsEncryptionByDefaultOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableEbsEncryptionByDefaultOutput - if *v == nil { - sv = &DisableEbsEncryptionByDefaultOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ebsEncryptionByDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsEncryptionByDefault = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableFastLaunchOutput(v **DisableFastLaunchOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableFastLaunchOutput - if *v == nil { - sv = &DisableFastLaunchOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFastLaunchLaunchTemplateSpecificationResponse(&sv.LaunchTemplate, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxParallelLaunches", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxParallelLaunches = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.FastLaunchResourceType(xtv) - } - - case strings.EqualFold("snapshotConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFastLaunchSnapshotConfigurationResponse(&sv.SnapshotConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.FastLaunchStateCode(xtv) - } - - case strings.EqualFold("stateTransitionReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - case strings.EqualFold("stateTransitionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StateTransitionTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableFastSnapshotRestoresOutput(v **DisableFastSnapshotRestoresOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableFastSnapshotRestoresOutput - if *v == nil { - sv = &DisableFastSnapshotRestoresOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreSuccessSet(&sv.Successful, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDisableFastSnapshotRestoreErrorSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableImageBlockPublicAccessOutput(v **DisableImageBlockPublicAccessOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableImageBlockPublicAccessOutput - if *v == nil { - sv = &DisableImageBlockPublicAccessOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageBlockPublicAccessState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageBlockPublicAccessState = types.ImageBlockPublicAccessDisabledState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableImageDeprecationOutput(v **DisableImageDeprecationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableImageDeprecationOutput - if *v == nil { - sv = &DisableImageDeprecationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableImageOutput(v **DisableImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableImageOutput - if *v == nil { - sv = &DisableImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableIpamOrganizationAdminAccountOutput(v **DisableIpamOrganizationAdminAccountOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableIpamOrganizationAdminAccountOutput - if *v == nil { - sv = &DisableIpamOrganizationAdminAccountOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("success", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Success = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableSerialConsoleAccessOutput(v **DisableSerialConsoleAccessOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableSerialConsoleAccessOutput - if *v == nil { - sv = &DisableSerialConsoleAccessOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("serialConsoleAccessEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SerialConsoleAccessEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableSnapshotBlockPublicAccessOutput(v **DisableSnapshotBlockPublicAccessOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableSnapshotBlockPublicAccessOutput - if *v == nil { - sv = &DisableSnapshotBlockPublicAccessOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotBlockPublicAccessState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableTransitGatewayRouteTablePropagationOutput(v **DisableTransitGatewayRouteTablePropagationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableTransitGatewayRouteTablePropagationOutput - if *v == nil { - sv = &DisableTransitGatewayRouteTablePropagationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("propagation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPropagation(&sv.Propagation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableVpcClassicLinkDnsSupportOutput(v **DisableVpcClassicLinkDnsSupportOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableVpcClassicLinkDnsSupportOutput - if *v == nil { - sv = &DisableVpcClassicLinkDnsSupportOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisableVpcClassicLinkOutput(v **DisableVpcClassicLinkOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableVpcClassicLinkOutput - if *v == nil { - sv = &DisableVpcClassicLinkOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateClientVpnTargetNetworkOutput(v **DisassociateClientVpnTargetNetworkOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateClientVpnTargetNetworkOutput - if *v == nil { - sv = &DisassociateClientVpnTargetNetworkOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssociationId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAssociationStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateEnclaveCertificateIamRoleOutput(v **DisassociateEnclaveCertificateIamRoleOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateEnclaveCertificateIamRoleOutput - if *v == nil { - sv = &DisassociateEnclaveCertificateIamRoleOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateIamInstanceProfileOutput(v **DisassociateIamInstanceProfileOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateIamInstanceProfileOutput - if *v == nil { - sv = &DisassociateIamInstanceProfileOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("iamInstanceProfileAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&sv.IamInstanceProfileAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateInstanceEventWindowOutput(v **DisassociateInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateInstanceEventWindowOutput - if *v == nil { - sv = &DisassociateInstanceEventWindowOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindow", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateIpamByoasnOutput(v **DisassociateIpamByoasnOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateIpamByoasnOutput - if *v == nil { - sv = &DisassociateIpamByoasnOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("asnAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAsnAssociation(&sv.AsnAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateIpamResourceDiscoveryOutput(v **DisassociateIpamResourceDiscoveryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateIpamResourceDiscoveryOutput - if *v == nil { - sv = &DisassociateIpamResourceDiscoveryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscoveryAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscoveryAssociation(&sv.IpamResourceDiscoveryAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateNatGatewayAddressOutput(v **DisassociateNatGatewayAddressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateNatGatewayAddressOutput - if *v == nil { - sv = &DisassociateNatGatewayAddressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("natGatewayAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayAddressList(&sv.NatGatewayAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateSubnetCidrBlockOutput(v **DisassociateSubnetCidrBlockOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateSubnetCidrBlockOutput - if *v == nil { - sv = &DisassociateSubnetCidrBlockOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6CidrBlockAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("subnetId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubnetId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateTransitGatewayMulticastDomainOutput(v **DisassociateTransitGatewayMulticastDomainOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateTransitGatewayMulticastDomainOutput - if *v == nil { - sv = &DisassociateTransitGatewayMulticastDomainOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateTransitGatewayPolicyTableOutput(v **DisassociateTransitGatewayPolicyTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateTransitGatewayPolicyTableOutput - if *v == nil { - sv = &DisassociateTransitGatewayPolicyTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateTransitGatewayRouteTableOutput(v **DisassociateTransitGatewayRouteTableOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateTransitGatewayRouteTableOutput - if *v == nil { - sv = &DisassociateTransitGatewayRouteTableOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("association", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayAssociation(&sv.Association, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateTrunkInterfaceOutput(v **DisassociateTrunkInterfaceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateTrunkInterfaceOutput - if *v == nil { - sv = &DisassociateTrunkInterfaceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentDisassociateVpcCidrBlockOutput(v **DisassociateVpcCidrBlockOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateVpcCidrBlockOutput - if *v == nil { - sv = &DisassociateVpcCidrBlockOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("cidrBlockAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcCidrBlockAssociation(&sv.CidrBlockAssociation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ipv6CidrBlockAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpcIpv6CidrBlockAssociation(&sv.Ipv6CidrBlockAssociation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("vpcId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpcId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableAddressTransferOutput(v **EnableAddressTransferOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableAddressTransferOutput - if *v == nil { - sv = &EnableAddressTransferOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addressTransfer", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressTransfer(&sv.AddressTransfer, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionOutput(v **EnableAwsNetworkPerformanceMetricSubscriptionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableAwsNetworkPerformanceMetricSubscriptionOutput - if *v == nil { - sv = &EnableAwsNetworkPerformanceMetricSubscriptionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("output", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Output = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableEbsEncryptionByDefaultOutput(v **EnableEbsEncryptionByDefaultOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableEbsEncryptionByDefaultOutput - if *v == nil { - sv = &EnableEbsEncryptionByDefaultOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ebsEncryptionByDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsEncryptionByDefault = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableFastLaunchOutput(v **EnableFastLaunchOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableFastLaunchOutput - if *v == nil { - sv = &EnableFastLaunchOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("launchTemplate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFastLaunchLaunchTemplateSpecificationResponse(&sv.LaunchTemplate, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("maxParallelLaunches", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxParallelLaunches = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("resourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.FastLaunchResourceType(xtv) - } - - case strings.EqualFold("snapshotConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFastLaunchSnapshotConfigurationResponse(&sv.SnapshotConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.FastLaunchStateCode(xtv) - } - - case strings.EqualFold("stateTransitionReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StateTransitionReason = ptr.String(xtv) - } - - case strings.EqualFold("stateTransitionTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StateTransitionTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableFastSnapshotRestoresOutput(v **EnableFastSnapshotRestoresOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableFastSnapshotRestoresOutput - if *v == nil { - sv = &EnableFastSnapshotRestoresOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreSuccessSet(&sv.Successful, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentEnableFastSnapshotRestoreErrorSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableImageBlockPublicAccessOutput(v **EnableImageBlockPublicAccessOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableImageBlockPublicAccessOutput - if *v == nil { - sv = &EnableImageBlockPublicAccessOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageBlockPublicAccessState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageBlockPublicAccessState = types.ImageBlockPublicAccessEnabledState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableImageDeprecationOutput(v **EnableImageDeprecationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableImageDeprecationOutput - if *v == nil { - sv = &EnableImageDeprecationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableImageOutput(v **EnableImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableImageOutput - if *v == nil { - sv = &EnableImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableIpamOrganizationAdminAccountOutput(v **EnableIpamOrganizationAdminAccountOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableIpamOrganizationAdminAccountOutput - if *v == nil { - sv = &EnableIpamOrganizationAdminAccountOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("success", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Success = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingOutput(v **EnableReachabilityAnalyzerOrganizationSharingOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableReachabilityAnalyzerOrganizationSharingOutput - if *v == nil { - sv = &EnableReachabilityAnalyzerOrganizationSharingOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("returnValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableSerialConsoleAccessOutput(v **EnableSerialConsoleAccessOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableSerialConsoleAccessOutput - if *v == nil { - sv = &EnableSerialConsoleAccessOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("serialConsoleAccessEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SerialConsoleAccessEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableSnapshotBlockPublicAccessOutput(v **EnableSnapshotBlockPublicAccessOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableSnapshotBlockPublicAccessOutput - if *v == nil { - sv = &EnableSnapshotBlockPublicAccessOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotBlockPublicAccessState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableTransitGatewayRouteTablePropagationOutput(v **EnableTransitGatewayRouteTablePropagationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableTransitGatewayRouteTablePropagationOutput - if *v == nil { - sv = &EnableTransitGatewayRouteTablePropagationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("propagation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPropagation(&sv.Propagation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableVpcClassicLinkDnsSupportOutput(v **EnableVpcClassicLinkDnsSupportOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableVpcClassicLinkDnsSupportOutput - if *v == nil { - sv = &EnableVpcClassicLinkDnsSupportOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentEnableVpcClassicLinkOutput(v **EnableVpcClassicLinkOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableVpcClassicLinkOutput - if *v == nil { - sv = &EnableVpcClassicLinkOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentExportClientVpnClientCertificateRevocationListOutput(v **ExportClientVpnClientCertificateRevocationListOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ExportClientVpnClientCertificateRevocationListOutput - if *v == nil { - sv = &ExportClientVpnClientCertificateRevocationListOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("certificateRevocationList", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CertificateRevocationList = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientCertificateRevocationListStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentExportClientVpnClientConfigurationOutput(v **ExportClientVpnClientConfigurationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ExportClientVpnClientConfigurationOutput - if *v == nil { - sv = &ExportClientVpnClientConfigurationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientConfiguration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientConfiguration = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentExportImageOutput(v **ExportImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ExportImageOutput - if *v == nil { - sv = &ExportImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("diskImageFormat", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DiskImageFormat = types.DiskImageFormat(xtv) - } - - case strings.EqualFold("exportImageTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ExportImageTaskId = ptr.String(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("roleName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RoleName = ptr.String(xtv) - } - - case strings.EqualFold("s3ExportLocation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentExportTaskS3Location(&sv.S3ExportLocation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentExportTransitGatewayRoutesOutput(v **ExportTransitGatewayRoutesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ExportTransitGatewayRoutesOutput - if *v == nil { - sv = &ExportTransitGatewayRoutesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("s3Location", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.S3Location = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetAssociatedEnclaveCertificateIamRolesOutput(v **GetAssociatedEnclaveCertificateIamRolesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetAssociatedEnclaveCertificateIamRolesOutput - if *v == nil { - sv = &GetAssociatedEnclaveCertificateIamRolesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associatedRoleSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAssociatedRolesList(&sv.AssociatedRoles, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetAssociatedIpv6PoolCidrsOutput(v **GetAssociatedIpv6PoolCidrsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetAssociatedIpv6PoolCidrsOutput - if *v == nil { - sv = &GetAssociatedIpv6PoolCidrsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipv6CidrAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6CidrAssociationSet(&sv.Ipv6CidrAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetAwsNetworkPerformanceDataOutput(v **GetAwsNetworkPerformanceDataOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetAwsNetworkPerformanceDataOutput - if *v == nil { - sv = &GetAwsNetworkPerformanceDataOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("dataResponseSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentDataResponses(&sv.DataResponses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetCapacityReservationUsageOutput(v **GetCapacityReservationUsageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetCapacityReservationUsageOutput - if *v == nil { - sv = &GetCapacityReservationUsageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("availableInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.AvailableInstanceCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("capacityReservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CapacityReservationId = ptr.String(xtv) - } - - case strings.EqualFold("instanceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceType = ptr.String(xtv) - } - - case strings.EqualFold("instanceUsageSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceUsageSet(&sv.InstanceUsages, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.CapacityReservationState(xtv) - } - - case strings.EqualFold("totalInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TotalInstanceCount = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetCoipPoolUsageOutput(v **GetCoipPoolUsageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetCoipPoolUsageOutput - if *v == nil { - sv = &GetCoipPoolUsageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coipAddressUsageSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCoipAddressUsageSet(&sv.CoipAddressUsages, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("coipPoolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CoipPoolId = ptr.String(xtv) - } - - case strings.EqualFold("localGatewayRouteTableId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalGatewayRouteTableId = ptr.String(xtv) - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetConsoleOutputOutput(v **GetConsoleOutputOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetConsoleOutputOutput - if *v == nil { - sv = &GetConsoleOutputOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("output", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Output = ptr.String(xtv) - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Timestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetConsoleScreenshotOutput(v **GetConsoleScreenshotOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetConsoleScreenshotOutput - if *v == nil { - sv = &GetConsoleScreenshotOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageData", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageData = ptr.String(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetDefaultCreditSpecificationOutput(v **GetDefaultCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetDefaultCreditSpecificationOutput - if *v == nil { - sv = &GetDefaultCreditSpecificationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceFamilyCreditSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceFamilyCreditSpecification(&sv.InstanceFamilyCreditSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetEbsDefaultKmsKeyIdOutput(v **GetEbsDefaultKmsKeyIdOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetEbsDefaultKmsKeyIdOutput - if *v == nil { - sv = &GetEbsDefaultKmsKeyIdOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetEbsEncryptionByDefaultOutput(v **GetEbsEncryptionByDefaultOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetEbsEncryptionByDefaultOutput - if *v == nil { - sv = &GetEbsEncryptionByDefaultOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ebsEncryptionByDefault", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.EbsEncryptionByDefault = ptr.Bool(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetFlowLogsIntegrationTemplateOutput(v **GetFlowLogsIntegrationTemplateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetFlowLogsIntegrationTemplateOutput - if *v == nil { - sv = &GetFlowLogsIntegrationTemplateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("result", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Result = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetGroupsForCapacityReservationOutput(v **GetGroupsForCapacityReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetGroupsForCapacityReservationOutput - if *v == nil { - sv = &GetGroupsForCapacityReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservationGroupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservationGroupSet(&sv.CapacityReservationGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetHostReservationPurchasePreviewOutput(v **GetHostReservationPurchasePreviewOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHostReservationPurchasePreviewOutput - if *v == nil { - sv = &GetHostReservationPurchasePreviewOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("purchase", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPurchaseSet(&sv.Purchase, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("totalHourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TotalHourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("totalUpfrontPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TotalUpfrontPrice = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetImageBlockPublicAccessStateOutput(v **GetImageBlockPublicAccessStateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetImageBlockPublicAccessStateOutput - if *v == nil { - sv = &GetImageBlockPublicAccessStateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageBlockPublicAccessState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageBlockPublicAccessState = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetInstanceTypesFromInstanceRequirementsOutput(v **GetInstanceTypesFromInstanceRequirementsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetInstanceTypesFromInstanceRequirementsOutput - if *v == nil { - sv = &GetInstanceTypesFromInstanceRequirementsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTypeInfoFromInstanceRequirementsSet(&sv.InstanceTypes, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetInstanceUefiDataOutput(v **GetInstanceUefiDataOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetInstanceUefiDataOutput - if *v == nil { - sv = &GetInstanceUefiDataOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("uefiData", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UefiData = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamAddressHistoryOutput(v **GetIpamAddressHistoryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamAddressHistoryOutput - if *v == nil { - sv = &GetIpamAddressHistoryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("historyRecordSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamAddressHistoryRecordSet(&sv.HistoryRecords, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamDiscoveredAccountsOutput(v **GetIpamDiscoveredAccountsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamDiscoveredAccountsOutput - if *v == nil { - sv = &GetIpamDiscoveredAccountsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamDiscoveredAccountSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamDiscoveredAccountSet(&sv.IpamDiscoveredAccounts, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamDiscoveredPublicAddressesOutput(v **GetIpamDiscoveredPublicAddressesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamDiscoveredPublicAddressesOutput - if *v == nil { - sv = &GetIpamDiscoveredPublicAddressesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamDiscoveredPublicAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamDiscoveredPublicAddressSet(&sv.IpamDiscoveredPublicAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("oldestSampleTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.OldestSampleTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamDiscoveredResourceCidrsOutput(v **GetIpamDiscoveredResourceCidrsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamDiscoveredResourceCidrsOutput - if *v == nil { - sv = &GetIpamDiscoveredResourceCidrsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamDiscoveredResourceCidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamDiscoveredResourceCidrSet(&sv.IpamDiscoveredResourceCidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamPoolAllocationsOutput(v **GetIpamPoolAllocationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamPoolAllocationsOutput - if *v == nil { - sv = &GetIpamPoolAllocationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPoolAllocationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolAllocationSet(&sv.IpamPoolAllocations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamPoolCidrsOutput(v **GetIpamPoolCidrsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamPoolCidrsOutput - if *v == nil { - sv = &GetIpamPoolCidrsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPoolCidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolCidrSet(&sv.IpamPoolCidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetIpamResourceCidrsOutput(v **GetIpamResourceCidrsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetIpamResourceCidrsOutput - if *v == nil { - sv = &GetIpamResourceCidrsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceCidrSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceCidrSet(&sv.IpamResourceCidrs, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetLaunchTemplateDataOutput(v **GetLaunchTemplateDataOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetLaunchTemplateDataOutput - if *v == nil { - sv = &GetLaunchTemplateDataOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplateData", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseLaunchTemplateData(&sv.LaunchTemplateData, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetManagedPrefixListAssociationsOutput(v **GetManagedPrefixListAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetManagedPrefixListAssociationsOutput - if *v == nil { - sv = &GetManagedPrefixListAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("prefixListAssociationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrefixListAssociationSet(&sv.PrefixListAssociations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetManagedPrefixListEntriesOutput(v **GetManagedPrefixListEntriesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetManagedPrefixListEntriesOutput - if *v == nil { - sv = &GetManagedPrefixListEntriesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("entrySet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPrefixListEntrySet(&sv.Entries, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsOutput(v **GetNetworkInsightsAccessScopeAnalysisFindingsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetNetworkInsightsAccessScopeAnalysisFindingsOutput - if *v == nil { - sv = &GetNetworkInsightsAccessScopeAnalysisFindingsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("analysisFindingSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAccessScopeAnalysisFindingList(&sv.AnalysisFindings, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("analysisStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AnalysisStatus = types.AnalysisStatus(xtv) - } - - case strings.EqualFold("networkInsightsAccessScopeAnalysisId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInsightsAccessScopeAnalysisId = ptr.String(xtv) - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetNetworkInsightsAccessScopeContentOutput(v **GetNetworkInsightsAccessScopeContentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetNetworkInsightsAccessScopeContentOutput - if *v == nil { - sv = &GetNetworkInsightsAccessScopeContentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScopeContent", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeContent(&sv.NetworkInsightsAccessScopeContent, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetPasswordDataOutput(v **GetPasswordDataOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetPasswordDataOutput - if *v == nil { - sv = &GetPasswordDataOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("passwordData", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PasswordData = ptr.String(xtv) - } - - case strings.EqualFold("timestamp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Timestamp = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetReservedInstancesExchangeQuoteOutput(v **GetReservedInstancesExchangeQuoteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetReservedInstancesExchangeQuoteOutput - if *v == nil { - sv = &GetReservedInstancesExchangeQuoteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = ptr.String(xtv) - } - - case strings.EqualFold("isValidExchange", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsValidExchange = ptr.Bool(xtv) - } - - case strings.EqualFold("outputReservedInstancesWillExpireAt", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.OutputReservedInstancesWillExpireAt = ptr.Time(t) - } - - case strings.EqualFold("paymentDue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PaymentDue = ptr.String(xtv) - } - - case strings.EqualFold("reservedInstanceValueRollup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservationValue(&sv.ReservedInstanceValueRollup, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("reservedInstanceValueSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservedInstanceReservationValueSet(&sv.ReservedInstanceValueSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetConfigurationValueRollup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentReservationValue(&sv.TargetConfigurationValueRollup, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("targetConfigurationValueSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTargetReservationValueSet(&sv.TargetConfigurationValueSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("validationFailureReason", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ValidationFailureReason = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetSecurityGroupsForVpcOutput(v **GetSecurityGroupsForVpcOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetSecurityGroupsForVpcOutput - if *v == nil { - sv = &GetSecurityGroupsForVpcOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("securityGroupForVpcSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSecurityGroupForVpcList(&sv.SecurityGroupForVpcs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetSerialConsoleAccessStatusOutput(v **GetSerialConsoleAccessStatusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetSerialConsoleAccessStatusOutput - if *v == nil { - sv = &GetSerialConsoleAccessStatusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("serialConsoleAccessEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.SerialConsoleAccessEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetSnapshotBlockPublicAccessStateOutput(v **GetSnapshotBlockPublicAccessStateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetSnapshotBlockPublicAccessStateOutput - if *v == nil { - sv = &GetSnapshotBlockPublicAccessStateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("state", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotBlockPublicAccessState(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetSpotPlacementScoresOutput(v **GetSpotPlacementScoresOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetSpotPlacementScoresOutput - if *v == nil { - sv = &GetSpotPlacementScoresOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("spotPlacementScoreSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotPlacementScores(&sv.SpotPlacementScores, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetSubnetCidrReservationsOutput(v **GetSubnetCidrReservationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetSubnetCidrReservationsOutput - if *v == nil { - sv = &GetSubnetCidrReservationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("subnetIpv4CidrReservationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetCidrReservationList(&sv.SubnetIpv4CidrReservations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("subnetIpv6CidrReservationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSubnetCidrReservationList(&sv.SubnetIpv6CidrReservations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayAttachmentPropagationsOutput(v **GetTransitGatewayAttachmentPropagationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayAttachmentPropagationsOutput - if *v == nil { - sv = &GetTransitGatewayAttachmentPropagationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayAttachmentPropagations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayAttachmentPropagationList(&sv.TransitGatewayAttachmentPropagations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayMulticastDomainAssociationsOutput(v **GetTransitGatewayMulticastDomainAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayMulticastDomainAssociationsOutput - if *v == nil { - sv = &GetTransitGatewayMulticastDomainAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("multicastDomainAssociations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociationList(&sv.MulticastDomainAssociations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableAssociationsOutput(v **GetTransitGatewayPolicyTableAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayPolicyTableAssociationsOutput - if *v == nil { - sv = &GetTransitGatewayPolicyTableAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableAssociationList(&sv.Associations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayPolicyTableEntriesOutput(v **GetTransitGatewayPolicyTableEntriesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayPolicyTableEntriesOutput - if *v == nil { - sv = &GetTransitGatewayPolicyTableEntriesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPolicyTableEntries", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPolicyTableEntryList(&sv.TransitGatewayPolicyTableEntries, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayPrefixListReferencesOutput(v **GetTransitGatewayPrefixListReferencesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayPrefixListReferencesOutput - if *v == nil { - sv = &GetTransitGatewayPrefixListReferencesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayPrefixListReferenceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReferenceSet(&sv.TransitGatewayPrefixListReferences, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTableAssociationsOutput(v **GetTransitGatewayRouteTableAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayRouteTableAssociationsOutput - if *v == nil { - sv = &GetTransitGatewayRouteTableAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTableAssociationList(&sv.Associations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetTransitGatewayRouteTablePropagationsOutput(v **GetTransitGatewayRouteTablePropagationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTransitGatewayRouteTablePropagationsOutput - if *v == nil { - sv = &GetTransitGatewayRouteTablePropagationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("transitGatewayRouteTablePropagations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteTablePropagationList(&sv.TransitGatewayRouteTablePropagations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetVerifiedAccessEndpointPolicyOutput(v **GetVerifiedAccessEndpointPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetVerifiedAccessEndpointPolicyOutput - if *v == nil { - sv = &GetVerifiedAccessEndpointPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("policyDocument", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyDocument = ptr.String(xtv) - } - - case strings.EqualFold("policyEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PolicyEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetVerifiedAccessGroupPolicyOutput(v **GetVerifiedAccessGroupPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetVerifiedAccessGroupPolicyOutput - if *v == nil { - sv = &GetVerifiedAccessGroupPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("policyDocument", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyDocument = ptr.String(xtv) - } - - case strings.EqualFold("policyEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PolicyEnabled = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceSampleConfigurationOutput(v **GetVpnConnectionDeviceSampleConfigurationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetVpnConnectionDeviceSampleConfigurationOutput - if *v == nil { - sv = &GetVpnConnectionDeviceSampleConfigurationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnectionDeviceSampleConfiguration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnConnectionDeviceSampleConfiguration = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetVpnConnectionDeviceTypesOutput(v **GetVpnConnectionDeviceTypesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetVpnConnectionDeviceTypesOutput - if *v == nil { - sv = &GetVpnConnectionDeviceTypesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("vpnConnectionDeviceTypeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnectionDeviceTypeList(&sv.VpnConnectionDeviceTypes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentGetVpnTunnelReplacementStatusOutput(v **GetVpnTunnelReplacementStatusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetVpnTunnelReplacementStatusOutput - if *v == nil { - sv = &GetVpnTunnelReplacementStatusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("customerGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CustomerGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("maintenanceDetails", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentMaintenanceDetails(&sv.MaintenanceDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("transitGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TransitGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("vpnConnectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnConnectionId = ptr.String(xtv) - } - - case strings.EqualFold("vpnGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnGatewayId = ptr.String(xtv) - } - - case strings.EqualFold("vpnTunnelOutsideIpAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VpnTunnelOutsideIpAddress = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentImportClientVpnClientCertificateRevocationListOutput(v **ImportClientVpnClientCertificateRevocationListOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ImportClientVpnClientCertificateRevocationListOutput - if *v == nil { - sv = &ImportClientVpnClientCertificateRevocationListOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentImportImageOutput(v **ImportImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ImportImageOutput - if *v == nil { - sv = &ImportImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("architecture", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Architecture = ptr.String(xtv) - } - - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("hypervisor", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Hypervisor = ptr.String(xtv) - } - - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - case strings.EqualFold("importTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImportTaskId = ptr.String(xtv) - } - - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - case strings.EqualFold("licenseSpecifications", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImportImageLicenseSpecificationListResponse(&sv.LicenseSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("licenseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LicenseType = ptr.String(xtv) - } - - case strings.EqualFold("platform", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Platform = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("snapshotDetailSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotDetailList(&sv.SnapshotDetails, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("statusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("usageOperation", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UsageOperation = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentImportInstanceOutput(v **ImportInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ImportInstanceOutput - if *v == nil { - sv = &ImportInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("conversionTask", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConversionTask(&sv.ConversionTask, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentImportKeyPairOutput(v **ImportKeyPairOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ImportKeyPairOutput - if *v == nil { - sv = &ImportKeyPairOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("keyFingerprint", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyFingerprint = ptr.String(xtv) - } - - case strings.EqualFold("keyName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyName = ptr.String(xtv) - } - - case strings.EqualFold("keyPairId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KeyPairId = ptr.String(xtv) - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentImportSnapshotOutput(v **ImportSnapshotOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ImportSnapshotOutput - if *v == nil { - sv = &ImportSnapshotOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("importTaskId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImportTaskId = ptr.String(xtv) - } - - case strings.EqualFold("snapshotTaskDetail", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotTaskDetail(&sv.SnapshotTaskDetail, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("tagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentImportVolumeOutput(v **ImportVolumeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ImportVolumeOutput - if *v == nil { - sv = &ImportVolumeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("conversionTask", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentConversionTask(&sv.ConversionTask, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentListImagesInRecycleBinOutput(v **ListImagesInRecycleBinOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListImagesInRecycleBinOutput - if *v == nil { - sv = &ListImagesInRecycleBinOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentImageRecycleBinInfoList(&sv.Images, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentListSnapshotsInRecycleBinOutput(v **ListSnapshotsInRecycleBinOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListSnapshotsInRecycleBinOutput - if *v == nil { - sv = &ListSnapshotsInRecycleBinOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("snapshotSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSnapshotRecycleBinInfoList(&sv.Snapshots, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentLockSnapshotOutput(v **LockSnapshotOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *LockSnapshotOutput - if *v == nil { - sv = &LockSnapshotOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("coolOffPeriod", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.CoolOffPeriod = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("coolOffPeriodExpiresOn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CoolOffPeriodExpiresOn = ptr.Time(t) - } - - case strings.EqualFold("lockCreatedOn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LockCreatedOn = ptr.Time(t) - } - - case strings.EqualFold("lockDuration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LockDuration = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("lockDurationStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LockDurationStartTime = ptr.Time(t) - } - - case strings.EqualFold("lockExpiresOn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LockExpiresOn = ptr.Time(t) - } - - case strings.EqualFold("lockState", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LockState = types.LockState(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyAddressAttributeOutput(v **ModifyAddressAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyAddressAttributeOutput - if *v == nil { - sv = &ModifyAddressAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("address", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressAttribute(&sv.Address, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyAvailabilityZoneGroupOutput(v **ModifyAvailabilityZoneGroupOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyAvailabilityZoneGroupOutput - if *v == nil { - sv = &ModifyAvailabilityZoneGroupOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyCapacityReservationFleetOutput(v **ModifyCapacityReservationFleetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyCapacityReservationFleetOutput - if *v == nil { - sv = &ModifyCapacityReservationFleetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyCapacityReservationOutput(v **ModifyCapacityReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyCapacityReservationOutput - if *v == nil { - sv = &ModifyCapacityReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyClientVpnEndpointOutput(v **ModifyClientVpnEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyClientVpnEndpointOutput - if *v == nil { - sv = &ModifyClientVpnEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyDefaultCreditSpecificationOutput(v **ModifyDefaultCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyDefaultCreditSpecificationOutput - if *v == nil { - sv = &ModifyDefaultCreditSpecificationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceFamilyCreditSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceFamilyCreditSpecification(&sv.InstanceFamilyCreditSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyEbsDefaultKmsKeyIdOutput(v **ModifyEbsDefaultKmsKeyIdOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyEbsDefaultKmsKeyIdOutput - if *v == nil { - sv = &ModifyEbsDefaultKmsKeyIdOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyFleetOutput(v **ModifyFleetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyFleetOutput - if *v == nil { - sv = &ModifyFleetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyFpgaImageAttributeOutput(v **ModifyFpgaImageAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyFpgaImageAttributeOutput - if *v == nil { - sv = &ModifyFpgaImageAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("fpgaImageAttribute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentFpgaImageAttribute(&sv.FpgaImageAttribute, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyHostsOutput(v **ModifyHostsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyHostsOutput - if *v == nil { - sv = &ModifyHostsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseHostIdList(&sv.Successful, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemList(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstanceCapacityReservationAttributesOutput(v **ModifyInstanceCapacityReservationAttributesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstanceCapacityReservationAttributesOutput - if *v == nil { - sv = &ModifyInstanceCapacityReservationAttributesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstanceCreditSpecificationOutput(v **ModifyInstanceCreditSpecificationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstanceCreditSpecificationOutput - if *v == nil { - sv = &ModifyInstanceCreditSpecificationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successfulInstanceCreditSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSuccessfulInstanceCreditSpecificationSet(&sv.SuccessfulInstanceCreditSpecifications, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessfulInstanceCreditSpecificationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulInstanceCreditSpecificationSet(&sv.UnsuccessfulInstanceCreditSpecifications, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstanceEventStartTimeOutput(v **ModifyInstanceEventStartTimeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstanceEventStartTimeOutput - if *v == nil { - sv = &ModifyInstanceEventStartTimeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("event", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStatusEvent(&sv.Event, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstanceEventWindowOutput(v **ModifyInstanceEventWindowOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstanceEventWindowOutput - if *v == nil { - sv = &ModifyInstanceEventWindowOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceEventWindow", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceEventWindow(&sv.InstanceEventWindow, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstanceMaintenanceOptionsOutput(v **ModifyInstanceMaintenanceOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstanceMaintenanceOptionsOutput - if *v == nil { - sv = &ModifyInstanceMaintenanceOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("autoRecovery", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AutoRecovery = types.InstanceAutoRecoveryState(xtv) - } - - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstanceMetadataOptionsOutput(v **ModifyInstanceMetadataOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstanceMetadataOptionsOutput - if *v == nil { - sv = &ModifyInstanceMetadataOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InstanceId = ptr.String(xtv) - } - - case strings.EqualFold("instanceMetadataOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceMetadataOptionsResponse(&sv.InstanceMetadataOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyInstancePlacementOutput(v **ModifyInstancePlacementOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyInstancePlacementOutput - if *v == nil { - sv = &ModifyInstancePlacementOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyIpamOutput(v **ModifyIpamOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyIpamOutput - if *v == nil { - sv = &ModifyIpamOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipam", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpam(&sv.Ipam, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyIpamPoolOutput(v **ModifyIpamPoolOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyIpamPoolOutput - if *v == nil { - sv = &ModifyIpamPoolOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPool", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPool(&sv.IpamPool, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyIpamResourceCidrOutput(v **ModifyIpamResourceCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyIpamResourceCidrOutput - if *v == nil { - sv = &ModifyIpamResourceCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceCidr(&sv.IpamResourceCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyIpamResourceDiscoveryOutput(v **ModifyIpamResourceDiscoveryOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyIpamResourceDiscoveryOutput - if *v == nil { - sv = &ModifyIpamResourceDiscoveryOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamResourceDiscovery", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamResourceDiscovery(&sv.IpamResourceDiscovery, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyIpamScopeOutput(v **ModifyIpamScopeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyIpamScopeOutput - if *v == nil { - sv = &ModifyIpamScopeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamScope", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamScope(&sv.IpamScope, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyLaunchTemplateOutput(v **ModifyLaunchTemplateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyLaunchTemplateOutput - if *v == nil { - sv = &ModifyLaunchTemplateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("launchTemplate", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLaunchTemplate(&sv.LaunchTemplate, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyLocalGatewayRouteOutput(v **ModifyLocalGatewayRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyLocalGatewayRouteOutput - if *v == nil { - sv = &ModifyLocalGatewayRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("route", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRoute(&sv.Route, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyManagedPrefixListOutput(v **ModifyManagedPrefixListOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyManagedPrefixListOutput - if *v == nil { - sv = &ModifyManagedPrefixListOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("prefixList", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyPrivateDnsNameOptionsOutput(v **ModifyPrivateDnsNameOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyPrivateDnsNameOptionsOutput - if *v == nil { - sv = &ModifyPrivateDnsNameOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyReservedInstancesOutput(v **ModifyReservedInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyReservedInstancesOutput - if *v == nil { - sv = &ModifyReservedInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesModificationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesModificationId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifySecurityGroupRulesOutput(v **ModifySecurityGroupRulesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifySecurityGroupRulesOutput - if *v == nil { - sv = &ModifySecurityGroupRulesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifySnapshotTierOutput(v **ModifySnapshotTierOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifySnapshotTierOutput - if *v == nil { - sv = &ModifySnapshotTierOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("tieringStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.TieringStartTime = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifySpotFleetRequestOutput(v **ModifySpotFleetRequestOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifySpotFleetRequestOutput - if *v == nil { - sv = &ModifySpotFleetRequestOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterNetworkServicesOutput(v **ModifyTrafficMirrorFilterNetworkServicesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyTrafficMirrorFilterNetworkServicesOutput - if *v == nil { - sv = &ModifyTrafficMirrorFilterNetworkServicesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorFilter", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilter(&sv.TrafficMirrorFilter, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyTrafficMirrorFilterRuleOutput(v **ModifyTrafficMirrorFilterRuleOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyTrafficMirrorFilterRuleOutput - if *v == nil { - sv = &ModifyTrafficMirrorFilterRuleOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorFilterRule", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorFilterRule(&sv.TrafficMirrorFilterRule, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyTrafficMirrorSessionOutput(v **ModifyTrafficMirrorSessionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyTrafficMirrorSessionOutput - if *v == nil { - sv = &ModifyTrafficMirrorSessionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("trafficMirrorSession", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTrafficMirrorSession(&sv.TrafficMirrorSession, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyTransitGatewayOutput(v **ModifyTransitGatewayOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyTransitGatewayOutput - if *v == nil { - sv = &ModifyTransitGatewayOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGateway", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGateway(&sv.TransitGateway, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyTransitGatewayPrefixListReferenceOutput(v **ModifyTransitGatewayPrefixListReferenceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyTransitGatewayPrefixListReferenceOutput - if *v == nil { - sv = &ModifyTransitGatewayPrefixListReferenceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPrefixListReference", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPrefixListReference(&sv.TransitGatewayPrefixListReference, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyTransitGatewayVpcAttachmentOutput(v **ModifyTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyTransitGatewayVpcAttachmentOutput - if *v == nil { - sv = &ModifyTransitGatewayVpcAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayVpcAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointOutput(v **ModifyVerifiedAccessEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessEndpointOutput - if *v == nil { - sv = &ModifyVerifiedAccessEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessEndpoint", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessEndpoint(&sv.VerifiedAccessEndpoint, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessEndpointPolicyOutput(v **ModifyVerifiedAccessEndpointPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessEndpointPolicyOutput - if *v == nil { - sv = &ModifyVerifiedAccessEndpointPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("policyDocument", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyDocument = ptr.String(xtv) - } - - case strings.EqualFold("policyEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PolicyEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("sseSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessSseSpecificationResponse(&sv.SseSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupOutput(v **ModifyVerifiedAccessGroupOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessGroupOutput - if *v == nil { - sv = &ModifyVerifiedAccessGroupOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessGroup", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessGroup(&sv.VerifiedAccessGroup, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessGroupPolicyOutput(v **ModifyVerifiedAccessGroupPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessGroupPolicyOutput - if *v == nil { - sv = &ModifyVerifiedAccessGroupPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("policyDocument", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PolicyDocument = ptr.String(xtv) - } - - case strings.EqualFold("policyEnabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.PolicyEnabled = ptr.Bool(xtv) - } - - case strings.EqualFold("sseSpecification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessSseSpecificationResponse(&sv.SseSpecification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationOutput(v **ModifyVerifiedAccessInstanceLoggingConfigurationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessInstanceLoggingConfigurationOutput - if *v == nil { - sv = &ModifyVerifiedAccessInstanceLoggingConfigurationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("loggingConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstanceLoggingConfiguration(&sv.LoggingConfiguration, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessInstanceOutput(v **ModifyVerifiedAccessInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessInstanceOutput - if *v == nil { - sv = &ModifyVerifiedAccessInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessInstance(&sv.VerifiedAccessInstance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVerifiedAccessTrustProviderOutput(v **ModifyVerifiedAccessTrustProviderOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVerifiedAccessTrustProviderOutput - if *v == nil { - sv = &ModifyVerifiedAccessTrustProviderOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("verifiedAccessTrustProvider", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVerifiedAccessTrustProvider(&sv.VerifiedAccessTrustProvider, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVolumeOutput(v **ModifyVolumeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVolumeOutput - if *v == nil { - sv = &ModifyVolumeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("volumeModification", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVolumeModification(&sv.VolumeModification, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcEndpointConnectionNotificationOutput(v **ModifyVpcEndpointConnectionNotificationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcEndpointConnectionNotificationOutput - if *v == nil { - sv = &ModifyVpcEndpointConnectionNotificationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcEndpointOutput(v **ModifyVpcEndpointOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcEndpointOutput - if *v == nil { - sv = &ModifyVpcEndpointOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcEndpointServiceConfigurationOutput(v **ModifyVpcEndpointServiceConfigurationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcEndpointServiceConfigurationOutput - if *v == nil { - sv = &ModifyVpcEndpointServiceConfigurationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePayerResponsibilityOutput(v **ModifyVpcEndpointServicePayerResponsibilityOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcEndpointServicePayerResponsibilityOutput - if *v == nil { - sv = &ModifyVpcEndpointServicePayerResponsibilityOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcEndpointServicePermissionsOutput(v **ModifyVpcEndpointServicePermissionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcEndpointServicePermissionsOutput - if *v == nil { - sv = &ModifyVpcEndpointServicePermissionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("addedPrincipalSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddedPrincipalSet(&sv.AddedPrincipals, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcPeeringConnectionOptionsOutput(v **ModifyVpcPeeringConnectionOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcPeeringConnectionOptionsOutput - if *v == nil { - sv = &ModifyVpcPeeringConnectionOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("accepterPeeringConnectionOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPeeringConnectionOptions(&sv.AccepterPeeringConnectionOptions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("requesterPeeringConnectionOptions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPeeringConnectionOptions(&sv.RequesterPeeringConnectionOptions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpcTenancyOutput(v **ModifyVpcTenancyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpcTenancyOutput - if *v == nil { - sv = &ModifyVpcTenancyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpnConnectionOptionsOutput(v **ModifyVpnConnectionOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpnConnectionOptionsOutput - if *v == nil { - sv = &ModifyVpnConnectionOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpnConnectionOutput(v **ModifyVpnConnectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpnConnectionOutput - if *v == nil { - sv = &ModifyVpnConnectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpnTunnelCertificateOutput(v **ModifyVpnTunnelCertificateOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpnTunnelCertificateOutput - if *v == nil { - sv = &ModifyVpnTunnelCertificateOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentModifyVpnTunnelOptionsOutput(v **ModifyVpnTunnelOptionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ModifyVpnTunnelOptionsOutput - if *v == nil { - sv = &ModifyVpnTunnelOptionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("vpnConnection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentVpnConnection(&sv.VpnConnection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentMonitorInstancesOutput(v **MonitorInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *MonitorInstancesOutput - if *v == nil { - sv = &MonitorInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceMonitoringList(&sv.InstanceMonitorings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentMoveAddressToVpcOutput(v **MoveAddressToVpcOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *MoveAddressToVpcOutput - if *v == nil { - sv = &MoveAddressToVpcOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("allocationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AllocationId = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.Status(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentMoveByoipCidrToIpamOutput(v **MoveByoipCidrToIpamOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *MoveByoipCidrToIpamOutput - if *v == nil { - sv = &MoveByoipCidrToIpamOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentProvisionByoipCidrOutput(v **ProvisionByoipCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ProvisionByoipCidrOutput - if *v == nil { - sv = &ProvisionByoipCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentProvisionIpamByoasnOutput(v **ProvisionIpamByoasnOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ProvisionIpamByoasnOutput - if *v == nil { - sv = &ProvisionIpamByoasnOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoasn", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoasn(&sv.Byoasn, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentProvisionIpamPoolCidrOutput(v **ProvisionIpamPoolCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ProvisionIpamPoolCidrOutput - if *v == nil { - sv = &ProvisionIpamPoolCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ipamPoolCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpamPoolCidr(&sv.IpamPoolCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentProvisionPublicIpv4PoolCidrOutput(v **ProvisionPublicIpv4PoolCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ProvisionPublicIpv4PoolCidrOutput - if *v == nil { - sv = &ProvisionPublicIpv4PoolCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("poolAddressRange", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPublicIpv4PoolRange(&sv.PoolAddressRange, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("poolId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PoolId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentPurchaseCapacityBlockOutput(v **PurchaseCapacityBlockOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *PurchaseCapacityBlockOutput - if *v == nil { - sv = &PurchaseCapacityBlockOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("capacityReservation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentCapacityReservation(&sv.CapacityReservation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentPurchaseHostReservationOutput(v **PurchaseHostReservationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *PurchaseHostReservationOutput - if *v == nil { - sv = &PurchaseHostReservationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientToken = ptr.String(xtv) - } - - case strings.EqualFold("currencyCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CurrencyCode = types.CurrencyCodeValues(xtv) - } - - case strings.EqualFold("purchase", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPurchaseSet(&sv.Purchase, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("totalHourlyPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TotalHourlyPrice = ptr.String(xtv) - } - - case strings.EqualFold("totalUpfrontPrice", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TotalUpfrontPrice = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentPurchaseReservedInstancesOfferingOutput(v **PurchaseReservedInstancesOfferingOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *PurchaseReservedInstancesOfferingOutput - if *v == nil { - sv = &PurchaseReservedInstancesOfferingOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("reservedInstancesId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservedInstancesId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentPurchaseScheduledInstancesOutput(v **PurchaseScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *PurchaseScheduledInstancesOutput - if *v == nil { - sv = &PurchaseScheduledInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("scheduledInstanceSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentPurchasedScheduledInstanceSet(&sv.ScheduledInstanceSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRegisterImageOutput(v **RegisterImageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RegisterImageOutput - if *v == nil { - sv = &RegisterImageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("imageId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ImageId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRegisterInstanceEventNotificationAttributesOutput(v **RegisterInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RegisterInstanceEventNotificationAttributesOutput - if *v == nil { - sv = &RegisterInstanceEventNotificationAttributesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceTagAttribute", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceTagNotificationAttribute(&sv.InstanceTagAttribute, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupMembersOutput(v **RegisterTransitGatewayMulticastGroupMembersOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RegisterTransitGatewayMulticastGroupMembersOutput - if *v == nil { - sv = &RegisterTransitGatewayMulticastGroupMembersOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("registeredMulticastGroupMembers", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupMembers(&sv.RegisteredMulticastGroupMembers, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesOutput(v **RegisterTransitGatewayMulticastGroupSourcesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RegisterTransitGatewayMulticastGroupSourcesOutput - if *v == nil { - sv = &RegisterTransitGatewayMulticastGroupSourcesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("registeredMulticastGroupSources", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastRegisteredGroupSources(&sv.RegisteredMulticastGroupSources, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsOutput(v **RejectTransitGatewayMulticastDomainAssociationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RejectTransitGatewayMulticastDomainAssociationsOutput - if *v == nil { - sv = &RejectTransitGatewayMulticastDomainAssociationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastDomainAssociations(&sv.Associations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRejectTransitGatewayPeeringAttachmentOutput(v **RejectTransitGatewayPeeringAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RejectTransitGatewayPeeringAttachmentOutput - if *v == nil { - sv = &RejectTransitGatewayPeeringAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayPeeringAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayPeeringAttachment(&sv.TransitGatewayPeeringAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRejectTransitGatewayVpcAttachmentOutput(v **RejectTransitGatewayVpcAttachmentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RejectTransitGatewayVpcAttachmentOutput - if *v == nil { - sv = &RejectTransitGatewayVpcAttachmentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("transitGatewayVpcAttachment", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayVpcAttachment(&sv.TransitGatewayVpcAttachment, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRejectVpcEndpointConnectionsOutput(v **RejectVpcEndpointConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RejectVpcEndpointConnectionsOutput - if *v == nil { - sv = &RejectVpcEndpointConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemSet(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRejectVpcPeeringConnectionOutput(v **RejectVpcPeeringConnectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RejectVpcPeeringConnectionOutput - if *v == nil { - sv = &RejectVpcPeeringConnectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReleaseHostsOutput(v **ReleaseHostsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReleaseHostsOutput - if *v == nil { - sv = &ReleaseHostsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("successful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentResponseHostIdList(&sv.Successful, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unsuccessful", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentUnsuccessfulItemList(&sv.Unsuccessful, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReleaseIpamPoolAllocationOutput(v **ReleaseIpamPoolAllocationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReleaseIpamPoolAllocationOutput - if *v == nil { - sv = &ReleaseIpamPoolAllocationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("success", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Success = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReplaceIamInstanceProfileAssociationOutput(v **ReplaceIamInstanceProfileAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReplaceIamInstanceProfileAssociationOutput - if *v == nil { - sv = &ReplaceIamInstanceProfileAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("iamInstanceProfileAssociation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIamInstanceProfileAssociation(&sv.IamInstanceProfileAssociation, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReplaceNetworkAclAssociationOutput(v **ReplaceNetworkAclAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReplaceNetworkAclAssociationOutput - if *v == nil { - sv = &ReplaceNetworkAclAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("newAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NewAssociationId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReplaceRouteTableAssociationOutput(v **ReplaceRouteTableAssociationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReplaceRouteTableAssociationOutput - if *v == nil { - sv = &ReplaceRouteTableAssociationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("associationState", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentRouteTableAssociationState(&sv.AssociationState, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("newAssociationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NewAssociationId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReplaceTransitGatewayRouteOutput(v **ReplaceTransitGatewayRouteOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReplaceTransitGatewayRouteOutput - if *v == nil { - sv = &ReplaceTransitGatewayRouteOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("route", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRoute(&sv.Route, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentReplaceVpnTunnelOutput(v **ReplaceVpnTunnelOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ReplaceVpnTunnelOutput - if *v == nil { - sv = &ReplaceVpnTunnelOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRequestSpotFleetOutput(v **RequestSpotFleetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RequestSpotFleetOutput - if *v == nil { - sv = &RequestSpotFleetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("spotFleetRequestId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SpotFleetRequestId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRequestSpotInstancesOutput(v **RequestSpotInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RequestSpotInstancesOutput - if *v == nil { - sv = &RequestSpotInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("spotInstanceRequestSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentSpotInstanceRequestList(&sv.SpotInstanceRequests, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentResetAddressAttributeOutput(v **ResetAddressAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ResetAddressAttributeOutput - if *v == nil { - sv = &ResetAddressAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("address", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentAddressAttribute(&sv.Address, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentResetEbsDefaultKmsKeyIdOutput(v **ResetEbsDefaultKmsKeyIdOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ResetEbsDefaultKmsKeyIdOutput - if *v == nil { - sv = &ResetEbsDefaultKmsKeyIdOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("kmsKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsKeyId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentResetFpgaImageAttributeOutput(v **ResetFpgaImageAttributeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ResetFpgaImageAttributeOutput - if *v == nil { - sv = &ResetFpgaImageAttributeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRestoreAddressToClassicOutput(v **RestoreAddressToClassicOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RestoreAddressToClassicOutput - if *v == nil { - sv = &RestoreAddressToClassicOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("publicIp", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicIp = ptr.String(xtv) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.Status(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRestoreImageFromRecycleBinOutput(v **RestoreImageFromRecycleBinOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RestoreImageFromRecycleBinOutput - if *v == nil { - sv = &RestoreImageFromRecycleBinOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRestoreManagedPrefixListVersionOutput(v **RestoreManagedPrefixListVersionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RestoreManagedPrefixListVersionOutput - if *v == nil { - sv = &RestoreManagedPrefixListVersionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("prefixList", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentManagedPrefixList(&sv.PrefixList, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRestoreSnapshotFromRecycleBinOutput(v **RestoreSnapshotFromRecycleBinOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RestoreSnapshotFromRecycleBinOutput - if *v == nil { - sv = &RestoreSnapshotFromRecycleBinOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("encrypted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Encrypted = ptr.Bool(xtv) - } - - case strings.EqualFold("outpostArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OutpostArn = ptr.String(xtv) - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("progress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Progress = ptr.String(xtv) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - case strings.EqualFold("sseType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SseType = types.SSEType(xtv) - } - - case strings.EqualFold("startTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.StartTime = ptr.Time(t) - } - - case strings.EqualFold("status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = types.SnapshotState(xtv) - } - - case strings.EqualFold("volumeId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VolumeId = ptr.String(xtv) - } - - case strings.EqualFold("volumeSize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.VolumeSize = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRestoreSnapshotTierOutput(v **RestoreSnapshotTierOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RestoreSnapshotTierOutput - if *v == nil { - sv = &RestoreSnapshotTierOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("isPermanentRestore", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.IsPermanentRestore = ptr.Bool(xtv) - } - - case strings.EqualFold("restoreDuration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RestoreDuration = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("restoreStartTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.RestoreStartTime = ptr.Time(t) - } - - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRevokeClientVpnIngressOutput(v **RevokeClientVpnIngressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RevokeClientVpnIngressOutput - if *v == nil { - sv = &RevokeClientVpnIngressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentClientVpnAuthorizationRuleStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRevokeSecurityGroupEgressOutput(v **RevokeSecurityGroupEgressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RevokeSecurityGroupEgressOutput - if *v == nil { - sv = &RevokeSecurityGroupEgressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - case strings.EqualFold("unknownIpPermissionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.UnknownIpPermissions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRevokeSecurityGroupIngressOutput(v **RevokeSecurityGroupIngressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RevokeSecurityGroupIngressOutput - if *v == nil { - sv = &RevokeSecurityGroupIngressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - case strings.EqualFold("unknownIpPermissionSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpPermissionList(&sv.UnknownIpPermissions, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRunInstancesOutput(v **RunInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RunInstancesOutput - if *v == nil { - sv = &RunInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("groupSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentGroupIdentifierList(&sv.Groups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceList(&sv.Instances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ownerId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwnerId = ptr.String(xtv) - } - - case strings.EqualFold("requesterId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RequesterId = ptr.String(xtv) - } - - case strings.EqualFold("reservationId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ReservationId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentRunScheduledInstancesOutput(v **RunScheduledInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *RunScheduledInstancesOutput - if *v == nil { - sv = &RunScheduledInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instanceIdSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceIdSet(&sv.InstanceIdSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentSearchLocalGatewayRoutesOutput(v **SearchLocalGatewayRoutesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *SearchLocalGatewayRoutesOutput - if *v == nil { - sv = &SearchLocalGatewayRoutesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("routeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentLocalGatewayRouteList(&sv.Routes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentSearchTransitGatewayMulticastGroupsOutput(v **SearchTransitGatewayMulticastGroupsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *SearchTransitGatewayMulticastGroupsOutput - if *v == nil { - sv = &SearchTransitGatewayMulticastGroupsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("multicastGroups", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayMulticastGroupList(&sv.MulticastGroups, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("nextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentSearchTransitGatewayRoutesOutput(v **SearchTransitGatewayRoutesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *SearchTransitGatewayRoutesOutput - if *v == nil { - sv = &SearchTransitGatewayRoutesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("additionalRoutesAvailable", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.AdditionalRoutesAvailable = ptr.Bool(xtv) - } - - case strings.EqualFold("routeSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTransitGatewayRouteList(&sv.Routes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentStartInstancesOutput(v **StartInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *StartInstancesOutput - if *v == nil { - sv = &StartInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStateChangeList(&sv.StartingInstances, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentStartNetworkInsightsAccessScopeAnalysisOutput(v **StartNetworkInsightsAccessScopeAnalysisOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *StartNetworkInsightsAccessScopeAnalysisOutput - if *v == nil { - sv = &StartNetworkInsightsAccessScopeAnalysisOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAccessScopeAnalysis", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAccessScopeAnalysis(&sv.NetworkInsightsAccessScopeAnalysis, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentStartNetworkInsightsAnalysisOutput(v **StartNetworkInsightsAnalysisOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *StartNetworkInsightsAnalysisOutput - if *v == nil { - sv = &StartNetworkInsightsAnalysisOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInsightsAnalysis", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNetworkInsightsAnalysis(&sv.NetworkInsightsAnalysis, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationOutput(v **StartVpcEndpointServicePrivateDnsVerificationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *StartVpcEndpointServicePrivateDnsVerificationOutput - if *v == nil { - sv = &StartVpcEndpointServicePrivateDnsVerificationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.ReturnValue = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentStopInstancesOutput(v **StopInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *StopInstancesOutput - if *v == nil { - sv = &StopInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStateChangeList(&sv.StoppingInstances, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentTerminateClientVpnConnectionsOutput(v **TerminateClientVpnConnectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *TerminateClientVpnConnectionsOutput - if *v == nil { - sv = &TerminateClientVpnConnectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("clientVpnEndpointId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ClientVpnEndpointId = ptr.String(xtv) - } - - case strings.EqualFold("connectionStatuses", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentTerminateConnectionStatusSet(&sv.ConnectionStatuses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("username", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Username = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentTerminateInstancesOutput(v **TerminateInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *TerminateInstancesOutput - if *v == nil { - sv = &TerminateInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceStateChangeList(&sv.TerminatingInstances, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentUnassignIpv6AddressesOutput(v **UnassignIpv6AddressesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UnassignIpv6AddressesOutput - if *v == nil { - sv = &UnassignIpv6AddressesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("networkInterfaceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NetworkInterfaceId = ptr.String(xtv) - } - - case strings.EqualFold("unassignedIpv6Addresses", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpv6AddressList(&sv.UnassignedIpv6Addresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("unassignedIpv6PrefixSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentIpPrefixList(&sv.UnassignedIpv6Prefixes, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentUnassignPrivateNatGatewayAddressOutput(v **UnassignPrivateNatGatewayAddressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UnassignPrivateNatGatewayAddressOutput - if *v == nil { - sv = &UnassignPrivateNatGatewayAddressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("natGatewayAddressSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentNatGatewayAddressList(&sv.NatGatewayAddresses, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("natGatewayId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NatGatewayId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentUnlockSnapshotOutput(v **UnlockSnapshotOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UnlockSnapshotOutput - if *v == nil { - sv = &UnlockSnapshotOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("snapshotId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SnapshotId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentUnmonitorInstancesOutput(v **UnmonitorInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UnmonitorInstancesOutput - if *v == nil { - sv = &UnmonitorInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("instancesSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentInstanceMonitoringList(&sv.InstanceMonitorings, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressOutput(v **UpdateSecurityGroupRuleDescriptionsEgressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UpdateSecurityGroupRuleDescriptionsEgressOutput - if *v == nil { - sv = &UpdateSecurityGroupRuleDescriptionsEgressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressOutput(v **UpdateSecurityGroupRuleDescriptionsIngressOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UpdateSecurityGroupRuleDescriptionsIngressOutput - if *v == nil { - sv = &UpdateSecurityGroupRuleDescriptionsIngressOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("return", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) - } - sv.Return = ptr.Bool(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsEc2query_deserializeOpDocumentWithdrawByoipCidrOutput(v **WithdrawByoipCidrOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *WithdrawByoipCidrOutput - if *v == nil { - sv = &WithdrawByoipCidrOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("byoipCidr", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsEc2query_deserializeDocumentByoipCidr(&sv.ByoipCidr, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/doc.go deleted file mode 100644 index 5f0bc65ae..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package ec2 provides the API client, operations, and parameter types for Amazon -// Elastic Compute Cloud. -// -// Amazon Elastic Compute Cloud Amazon Elastic Compute Cloud (Amazon EC2) provides -// secure and resizable computing capacity in the Amazon Web Services Cloud. Using -// Amazon EC2 eliminates the need to invest in hardware up front, so you can -// develop and deploy applications faster. Amazon Virtual Private Cloud (Amazon -// VPC) enables you to provision a logically isolated section of the Amazon Web -// Services Cloud where you can launch Amazon Web Services resources in a virtual -// network that you've defined. Amazon Elastic Block Store (Amazon EBS) provides -// block level storage volumes for use with EC2 instances. EBS volumes are highly -// available -// -// and reliable storage volumes that can be attached to any running instance and -// used like a hard drive. To learn more, see the following resources: -// - Amazon EC2: Amazon EC2 product page (http://aws.amazon.com/ec2) , Amazon -// EC2 documentation (https://docs.aws.amazon.com/ec2/index.html) -// - Amazon EBS: Amazon EBS product page (http://aws.amazon.com/ebs) , Amazon -// EBS documentation (https://docs.aws.amazon.com/ebs/index.html) -// - Amazon VPC: Amazon VPC product page (http://aws.amazon.com/vpc) , Amazon -// VPC documentation (https://docs.aws.amazon.com/vpc/index.html) -// - VPN: VPN product page (http://aws.amazon.com/vpn) , VPN documentation (https://docs.aws.amazon.com/vpn/index.html) -package ec2 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go deleted file mode 100644 index 7dc3bad26..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/endpoints.go +++ /dev/null @@ -1,535 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "ec2" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_EC2") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "EC2", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _UseFIPS := *params.UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://ec2-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - if _PartitionResult.Name == "aws-us-gov" { - uriString := func() string { - var out strings.Builder - out.WriteString("https://ec2.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://ec2-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://ec2.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://ec2.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json deleted file mode 100644 index b64baa914..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/generated.json +++ /dev/null @@ -1,651 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding": "v1.0.5", - "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7", - "github.com/aws/smithy-go": "v1.4.0", - "github.com/google/go-cmp": "v0.5.4", - "github.com/jmespath/go-jmespath": "v0.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_AcceptAddressTransfer.go", - "api_op_AcceptReservedInstancesExchangeQuote.go", - "api_op_AcceptTransitGatewayMulticastDomainAssociations.go", - "api_op_AcceptTransitGatewayPeeringAttachment.go", - "api_op_AcceptTransitGatewayVpcAttachment.go", - "api_op_AcceptVpcEndpointConnections.go", - "api_op_AcceptVpcPeeringConnection.go", - "api_op_AdvertiseByoipCidr.go", - "api_op_AllocateAddress.go", - "api_op_AllocateHosts.go", - "api_op_AllocateIpamPoolCidr.go", - "api_op_ApplySecurityGroupsToClientVpnTargetNetwork.go", - "api_op_AssignIpv6Addresses.go", - "api_op_AssignPrivateIpAddresses.go", - "api_op_AssignPrivateNatGatewayAddress.go", - "api_op_AssociateAddress.go", - "api_op_AssociateClientVpnTargetNetwork.go", - "api_op_AssociateDhcpOptions.go", - "api_op_AssociateEnclaveCertificateIamRole.go", - "api_op_AssociateIamInstanceProfile.go", - "api_op_AssociateInstanceEventWindow.go", - "api_op_AssociateIpamByoasn.go", - "api_op_AssociateIpamResourceDiscovery.go", - "api_op_AssociateNatGatewayAddress.go", - "api_op_AssociateRouteTable.go", - "api_op_AssociateSubnetCidrBlock.go", - "api_op_AssociateTransitGatewayMulticastDomain.go", - "api_op_AssociateTransitGatewayPolicyTable.go", - "api_op_AssociateTransitGatewayRouteTable.go", - "api_op_AssociateTrunkInterface.go", - "api_op_AssociateVpcCidrBlock.go", - "api_op_AttachClassicLinkVpc.go", - "api_op_AttachInternetGateway.go", - "api_op_AttachNetworkInterface.go", - "api_op_AttachVerifiedAccessTrustProvider.go", - "api_op_AttachVolume.go", - "api_op_AttachVpnGateway.go", - "api_op_AuthorizeClientVpnIngress.go", - "api_op_AuthorizeSecurityGroupEgress.go", - "api_op_AuthorizeSecurityGroupIngress.go", - "api_op_BundleInstance.go", - "api_op_CancelBundleTask.go", - "api_op_CancelCapacityReservation.go", - "api_op_CancelCapacityReservationFleets.go", - "api_op_CancelConversionTask.go", - "api_op_CancelExportTask.go", - "api_op_CancelImageLaunchPermission.go", - "api_op_CancelImportTask.go", - "api_op_CancelReservedInstancesListing.go", - "api_op_CancelSpotFleetRequests.go", - "api_op_CancelSpotInstanceRequests.go", - "api_op_ConfirmProductInstance.go", - "api_op_CopyFpgaImage.go", - "api_op_CopyImage.go", - "api_op_CopySnapshot.go", - "api_op_CopySnapshot_test.go", - "api_op_CreateCapacityReservation.go", - "api_op_CreateCapacityReservationFleet.go", - "api_op_CreateCarrierGateway.go", - "api_op_CreateClientVpnEndpoint.go", - "api_op_CreateClientVpnRoute.go", - "api_op_CreateCoipCidr.go", - "api_op_CreateCoipPool.go", - "api_op_CreateCustomerGateway.go", - "api_op_CreateDefaultSubnet.go", - "api_op_CreateDefaultVpc.go", - "api_op_CreateDhcpOptions.go", - "api_op_CreateEgressOnlyInternetGateway.go", - "api_op_CreateFleet.go", - "api_op_CreateFlowLogs.go", - "api_op_CreateFpgaImage.go", - "api_op_CreateImage.go", - "api_op_CreateInstanceConnectEndpoint.go", - "api_op_CreateInstanceEventWindow.go", - "api_op_CreateInstanceExportTask.go", - "api_op_CreateInternetGateway.go", - "api_op_CreateIpam.go", - "api_op_CreateIpamPool.go", - "api_op_CreateIpamResourceDiscovery.go", - "api_op_CreateIpamScope.go", - "api_op_CreateKeyPair.go", - "api_op_CreateLaunchTemplate.go", - "api_op_CreateLaunchTemplateVersion.go", - "api_op_CreateLocalGatewayRoute.go", - "api_op_CreateLocalGatewayRouteTable.go", - "api_op_CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go", - "api_op_CreateLocalGatewayRouteTableVpcAssociation.go", - "api_op_CreateManagedPrefixList.go", - "api_op_CreateNatGateway.go", - "api_op_CreateNetworkAcl.go", - "api_op_CreateNetworkAclEntry.go", - "api_op_CreateNetworkInsightsAccessScope.go", - "api_op_CreateNetworkInsightsPath.go", - "api_op_CreateNetworkInterface.go", - "api_op_CreateNetworkInterfacePermission.go", - "api_op_CreatePlacementGroup.go", - "api_op_CreatePublicIpv4Pool.go", - "api_op_CreateReplaceRootVolumeTask.go", - "api_op_CreateReservedInstancesListing.go", - "api_op_CreateRestoreImageTask.go", - "api_op_CreateRoute.go", - "api_op_CreateRouteTable.go", - "api_op_CreateSecurityGroup.go", - "api_op_CreateSnapshot.go", - "api_op_CreateSnapshots.go", - "api_op_CreateSpotDatafeedSubscription.go", - "api_op_CreateStoreImageTask.go", - "api_op_CreateSubnet.go", - "api_op_CreateSubnetCidrReservation.go", - "api_op_CreateTags.go", - "api_op_CreateTrafficMirrorFilter.go", - "api_op_CreateTrafficMirrorFilterRule.go", - "api_op_CreateTrafficMirrorSession.go", - "api_op_CreateTrafficMirrorTarget.go", - "api_op_CreateTransitGateway.go", - "api_op_CreateTransitGatewayConnect.go", - "api_op_CreateTransitGatewayConnectPeer.go", - "api_op_CreateTransitGatewayMulticastDomain.go", - "api_op_CreateTransitGatewayPeeringAttachment.go", - "api_op_CreateTransitGatewayPolicyTable.go", - "api_op_CreateTransitGatewayPrefixListReference.go", - "api_op_CreateTransitGatewayRoute.go", - "api_op_CreateTransitGatewayRouteTable.go", - "api_op_CreateTransitGatewayRouteTableAnnouncement.go", - "api_op_CreateTransitGatewayVpcAttachment.go", - "api_op_CreateVerifiedAccessEndpoint.go", - "api_op_CreateVerifiedAccessGroup.go", - "api_op_CreateVerifiedAccessInstance.go", - "api_op_CreateVerifiedAccessTrustProvider.go", - "api_op_CreateVolume.go", - "api_op_CreateVpc.go", - "api_op_CreateVpcEndpoint.go", - "api_op_CreateVpcEndpointConnectionNotification.go", - "api_op_CreateVpcEndpointServiceConfiguration.go", - "api_op_CreateVpcPeeringConnection.go", - "api_op_CreateVpnConnection.go", - "api_op_CreateVpnConnectionRoute.go", - "api_op_CreateVpnGateway.go", - "api_op_DeleteCarrierGateway.go", - "api_op_DeleteClientVpnEndpoint.go", - "api_op_DeleteClientVpnRoute.go", - "api_op_DeleteCoipCidr.go", - "api_op_DeleteCoipPool.go", - "api_op_DeleteCustomerGateway.go", - "api_op_DeleteDhcpOptions.go", - "api_op_DeleteEgressOnlyInternetGateway.go", - "api_op_DeleteFleets.go", - "api_op_DeleteFlowLogs.go", - "api_op_DeleteFpgaImage.go", - "api_op_DeleteInstanceConnectEndpoint.go", - "api_op_DeleteInstanceEventWindow.go", - "api_op_DeleteInternetGateway.go", - "api_op_DeleteIpam.go", - "api_op_DeleteIpamPool.go", - "api_op_DeleteIpamResourceDiscovery.go", - "api_op_DeleteIpamScope.go", - "api_op_DeleteKeyPair.go", - "api_op_DeleteLaunchTemplate.go", - "api_op_DeleteLaunchTemplateVersions.go", - "api_op_DeleteLocalGatewayRoute.go", - "api_op_DeleteLocalGatewayRouteTable.go", - "api_op_DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation.go", - "api_op_DeleteLocalGatewayRouteTableVpcAssociation.go", - "api_op_DeleteManagedPrefixList.go", - "api_op_DeleteNatGateway.go", - "api_op_DeleteNetworkAcl.go", - "api_op_DeleteNetworkAclEntry.go", - "api_op_DeleteNetworkInsightsAccessScope.go", - "api_op_DeleteNetworkInsightsAccessScopeAnalysis.go", - "api_op_DeleteNetworkInsightsAnalysis.go", - "api_op_DeleteNetworkInsightsPath.go", - "api_op_DeleteNetworkInterface.go", - "api_op_DeleteNetworkInterfacePermission.go", - "api_op_DeletePlacementGroup.go", - "api_op_DeletePublicIpv4Pool.go", - "api_op_DeleteQueuedReservedInstances.go", - "api_op_DeleteRoute.go", - "api_op_DeleteRouteTable.go", - "api_op_DeleteSecurityGroup.go", - "api_op_DeleteSnapshot.go", - "api_op_DeleteSpotDatafeedSubscription.go", - "api_op_DeleteSubnet.go", - "api_op_DeleteSubnetCidrReservation.go", - "api_op_DeleteTags.go", - "api_op_DeleteTrafficMirrorFilter.go", - "api_op_DeleteTrafficMirrorFilterRule.go", - "api_op_DeleteTrafficMirrorSession.go", - "api_op_DeleteTrafficMirrorTarget.go", - "api_op_DeleteTransitGateway.go", - "api_op_DeleteTransitGatewayConnect.go", - "api_op_DeleteTransitGatewayConnectPeer.go", - "api_op_DeleteTransitGatewayMulticastDomain.go", - "api_op_DeleteTransitGatewayPeeringAttachment.go", - "api_op_DeleteTransitGatewayPolicyTable.go", - "api_op_DeleteTransitGatewayPrefixListReference.go", - "api_op_DeleteTransitGatewayRoute.go", - "api_op_DeleteTransitGatewayRouteTable.go", - "api_op_DeleteTransitGatewayRouteTableAnnouncement.go", - "api_op_DeleteTransitGatewayVpcAttachment.go", - "api_op_DeleteVerifiedAccessEndpoint.go", - "api_op_DeleteVerifiedAccessGroup.go", - "api_op_DeleteVerifiedAccessInstance.go", - "api_op_DeleteVerifiedAccessTrustProvider.go", - "api_op_DeleteVolume.go", - "api_op_DeleteVpc.go", - "api_op_DeleteVpcEndpointConnectionNotifications.go", - "api_op_DeleteVpcEndpointServiceConfigurations.go", - "api_op_DeleteVpcEndpoints.go", - "api_op_DeleteVpcPeeringConnection.go", - "api_op_DeleteVpnConnection.go", - "api_op_DeleteVpnConnectionRoute.go", - "api_op_DeleteVpnGateway.go", - "api_op_DeprovisionByoipCidr.go", - "api_op_DeprovisionIpamByoasn.go", - "api_op_DeprovisionIpamPoolCidr.go", - "api_op_DeprovisionPublicIpv4PoolCidr.go", - "api_op_DeregisterImage.go", - "api_op_DeregisterInstanceEventNotificationAttributes.go", - "api_op_DeregisterTransitGatewayMulticastGroupMembers.go", - "api_op_DeregisterTransitGatewayMulticastGroupSources.go", - "api_op_DescribeAccountAttributes.go", - "api_op_DescribeAddressTransfers.go", - "api_op_DescribeAddresses.go", - "api_op_DescribeAddressesAttribute.go", - "api_op_DescribeAggregateIdFormat.go", - "api_op_DescribeAvailabilityZones.go", - "api_op_DescribeAwsNetworkPerformanceMetricSubscriptions.go", - "api_op_DescribeBundleTasks.go", - "api_op_DescribeByoipCidrs.go", - "api_op_DescribeCapacityBlockOfferings.go", - "api_op_DescribeCapacityReservationFleets.go", - "api_op_DescribeCapacityReservations.go", - "api_op_DescribeCarrierGateways.go", - "api_op_DescribeClassicLinkInstances.go", - "api_op_DescribeClientVpnAuthorizationRules.go", - "api_op_DescribeClientVpnConnections.go", - "api_op_DescribeClientVpnEndpoints.go", - "api_op_DescribeClientVpnRoutes.go", - "api_op_DescribeClientVpnTargetNetworks.go", - "api_op_DescribeCoipPools.go", - "api_op_DescribeConversionTasks.go", - "api_op_DescribeCustomerGateways.go", - "api_op_DescribeDhcpOptions.go", - "api_op_DescribeEgressOnlyInternetGateways.go", - "api_op_DescribeElasticGpus.go", - "api_op_DescribeExportImageTasks.go", - "api_op_DescribeExportTasks.go", - "api_op_DescribeFastLaunchImages.go", - "api_op_DescribeFastSnapshotRestores.go", - "api_op_DescribeFleetHistory.go", - "api_op_DescribeFleetInstances.go", - "api_op_DescribeFleets.go", - "api_op_DescribeFlowLogs.go", - "api_op_DescribeFpgaImageAttribute.go", - "api_op_DescribeFpgaImages.go", - "api_op_DescribeHostReservationOfferings.go", - "api_op_DescribeHostReservations.go", - "api_op_DescribeHosts.go", - "api_op_DescribeIamInstanceProfileAssociations.go", - "api_op_DescribeIdFormat.go", - "api_op_DescribeIdentityIdFormat.go", - "api_op_DescribeImageAttribute.go", - "api_op_DescribeImages.go", - "api_op_DescribeImportImageTasks.go", - "api_op_DescribeImportSnapshotTasks.go", - "api_op_DescribeInstanceAttribute.go", - "api_op_DescribeInstanceConnectEndpoints.go", - "api_op_DescribeInstanceCreditSpecifications.go", - "api_op_DescribeInstanceEventNotificationAttributes.go", - "api_op_DescribeInstanceEventWindows.go", - "api_op_DescribeInstanceStatus.go", - "api_op_DescribeInstanceTopology.go", - "api_op_DescribeInstanceTypeOfferings.go", - "api_op_DescribeInstanceTypes.go", - "api_op_DescribeInstances.go", - "api_op_DescribeInternetGateways.go", - "api_op_DescribeIpamByoasn.go", - "api_op_DescribeIpamPools.go", - "api_op_DescribeIpamResourceDiscoveries.go", - "api_op_DescribeIpamResourceDiscoveryAssociations.go", - "api_op_DescribeIpamScopes.go", - "api_op_DescribeIpams.go", - "api_op_DescribeIpv6Pools.go", - "api_op_DescribeKeyPairs.go", - "api_op_DescribeLaunchTemplateVersions.go", - "api_op_DescribeLaunchTemplates.go", - "api_op_DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations.go", - "api_op_DescribeLocalGatewayRouteTableVpcAssociations.go", - "api_op_DescribeLocalGatewayRouteTables.go", - "api_op_DescribeLocalGatewayVirtualInterfaceGroups.go", - "api_op_DescribeLocalGatewayVirtualInterfaces.go", - "api_op_DescribeLocalGateways.go", - "api_op_DescribeLockedSnapshots.go", - "api_op_DescribeManagedPrefixLists.go", - "api_op_DescribeMovingAddresses.go", - "api_op_DescribeNatGateways.go", - "api_op_DescribeNetworkAcls.go", - "api_op_DescribeNetworkInsightsAccessScopeAnalyses.go", - "api_op_DescribeNetworkInsightsAccessScopes.go", - "api_op_DescribeNetworkInsightsAnalyses.go", - "api_op_DescribeNetworkInsightsPaths.go", - "api_op_DescribeNetworkInterfaceAttribute.go", - "api_op_DescribeNetworkInterfacePermissions.go", - "api_op_DescribeNetworkInterfaces.go", - "api_op_DescribePlacementGroups.go", - "api_op_DescribePrefixLists.go", - "api_op_DescribePrincipalIdFormat.go", - "api_op_DescribePublicIpv4Pools.go", - "api_op_DescribeRegions.go", - "api_op_DescribeReplaceRootVolumeTasks.go", - "api_op_DescribeReservedInstances.go", - "api_op_DescribeReservedInstancesListings.go", - "api_op_DescribeReservedInstancesModifications.go", - "api_op_DescribeReservedInstancesOfferings.go", - "api_op_DescribeRouteTables.go", - "api_op_DescribeScheduledInstanceAvailability.go", - "api_op_DescribeScheduledInstances.go", - "api_op_DescribeSecurityGroupReferences.go", - "api_op_DescribeSecurityGroupRules.go", - "api_op_DescribeSecurityGroups.go", - "api_op_DescribeSnapshotAttribute.go", - "api_op_DescribeSnapshotTierStatus.go", - "api_op_DescribeSnapshots.go", - "api_op_DescribeSpotDatafeedSubscription.go", - "api_op_DescribeSpotFleetInstances.go", - "api_op_DescribeSpotFleetRequestHistory.go", - "api_op_DescribeSpotFleetRequests.go", - "api_op_DescribeSpotInstanceRequests.go", - "api_op_DescribeSpotPriceHistory.go", - "api_op_DescribeStaleSecurityGroups.go", - "api_op_DescribeStoreImageTasks.go", - "api_op_DescribeSubnets.go", - "api_op_DescribeTags.go", - "api_op_DescribeTrafficMirrorFilters.go", - "api_op_DescribeTrafficMirrorSessions.go", - "api_op_DescribeTrafficMirrorTargets.go", - "api_op_DescribeTransitGatewayAttachments.go", - "api_op_DescribeTransitGatewayConnectPeers.go", - "api_op_DescribeTransitGatewayConnects.go", - "api_op_DescribeTransitGatewayMulticastDomains.go", - "api_op_DescribeTransitGatewayPeeringAttachments.go", - "api_op_DescribeTransitGatewayPolicyTables.go", - "api_op_DescribeTransitGatewayRouteTableAnnouncements.go", - "api_op_DescribeTransitGatewayRouteTables.go", - "api_op_DescribeTransitGatewayVpcAttachments.go", - "api_op_DescribeTransitGateways.go", - "api_op_DescribeTrunkInterfaceAssociations.go", - "api_op_DescribeVerifiedAccessEndpoints.go", - "api_op_DescribeVerifiedAccessGroups.go", - "api_op_DescribeVerifiedAccessInstanceLoggingConfigurations.go", - "api_op_DescribeVerifiedAccessInstances.go", - "api_op_DescribeVerifiedAccessTrustProviders.go", - "api_op_DescribeVolumeAttribute.go", - "api_op_DescribeVolumeStatus.go", - "api_op_DescribeVolumes.go", - "api_op_DescribeVolumesModifications.go", - "api_op_DescribeVpcAttribute.go", - "api_op_DescribeVpcClassicLink.go", - "api_op_DescribeVpcClassicLinkDnsSupport.go", - "api_op_DescribeVpcEndpointConnectionNotifications.go", - "api_op_DescribeVpcEndpointConnections.go", - "api_op_DescribeVpcEndpointServiceConfigurations.go", - "api_op_DescribeVpcEndpointServicePermissions.go", - "api_op_DescribeVpcEndpointServices.go", - "api_op_DescribeVpcEndpoints.go", - "api_op_DescribeVpcPeeringConnections.go", - "api_op_DescribeVpcs.go", - "api_op_DescribeVpnConnections.go", - "api_op_DescribeVpnGateways.go", - "api_op_DetachClassicLinkVpc.go", - "api_op_DetachInternetGateway.go", - "api_op_DetachNetworkInterface.go", - "api_op_DetachVerifiedAccessTrustProvider.go", - "api_op_DetachVolume.go", - "api_op_DetachVpnGateway.go", - "api_op_DisableAddressTransfer.go", - "api_op_DisableAwsNetworkPerformanceMetricSubscription.go", - "api_op_DisableEbsEncryptionByDefault.go", - "api_op_DisableFastLaunch.go", - "api_op_DisableFastSnapshotRestores.go", - "api_op_DisableImage.go", - "api_op_DisableImageBlockPublicAccess.go", - "api_op_DisableImageDeprecation.go", - "api_op_DisableIpamOrganizationAdminAccount.go", - "api_op_DisableSerialConsoleAccess.go", - "api_op_DisableSnapshotBlockPublicAccess.go", - "api_op_DisableTransitGatewayRouteTablePropagation.go", - "api_op_DisableVgwRoutePropagation.go", - "api_op_DisableVpcClassicLink.go", - "api_op_DisableVpcClassicLinkDnsSupport.go", - "api_op_DisassociateAddress.go", - "api_op_DisassociateClientVpnTargetNetwork.go", - "api_op_DisassociateEnclaveCertificateIamRole.go", - "api_op_DisassociateIamInstanceProfile.go", - "api_op_DisassociateInstanceEventWindow.go", - "api_op_DisassociateIpamByoasn.go", - "api_op_DisassociateIpamResourceDiscovery.go", - "api_op_DisassociateNatGatewayAddress.go", - "api_op_DisassociateRouteTable.go", - "api_op_DisassociateSubnetCidrBlock.go", - "api_op_DisassociateTransitGatewayMulticastDomain.go", - "api_op_DisassociateTransitGatewayPolicyTable.go", - "api_op_DisassociateTransitGatewayRouteTable.go", - "api_op_DisassociateTrunkInterface.go", - "api_op_DisassociateVpcCidrBlock.go", - "api_op_EnableAddressTransfer.go", - "api_op_EnableAwsNetworkPerformanceMetricSubscription.go", - "api_op_EnableEbsEncryptionByDefault.go", - "api_op_EnableFastLaunch.go", - "api_op_EnableFastSnapshotRestores.go", - "api_op_EnableImage.go", - "api_op_EnableImageBlockPublicAccess.go", - "api_op_EnableImageDeprecation.go", - "api_op_EnableIpamOrganizationAdminAccount.go", - "api_op_EnableReachabilityAnalyzerOrganizationSharing.go", - "api_op_EnableSerialConsoleAccess.go", - "api_op_EnableSnapshotBlockPublicAccess.go", - "api_op_EnableTransitGatewayRouteTablePropagation.go", - "api_op_EnableVgwRoutePropagation.go", - "api_op_EnableVolumeIO.go", - "api_op_EnableVpcClassicLink.go", - "api_op_EnableVpcClassicLinkDnsSupport.go", - "api_op_ExportClientVpnClientCertificateRevocationList.go", - "api_op_ExportClientVpnClientConfiguration.go", - "api_op_ExportImage.go", - "api_op_ExportTransitGatewayRoutes.go", - "api_op_GetAssociatedEnclaveCertificateIamRoles.go", - "api_op_GetAssociatedIpv6PoolCidrs.go", - "api_op_GetAwsNetworkPerformanceData.go", - "api_op_GetCapacityReservationUsage.go", - "api_op_GetCoipPoolUsage.go", - "api_op_GetConsoleOutput.go", - "api_op_GetConsoleScreenshot.go", - "api_op_GetDefaultCreditSpecification.go", - "api_op_GetEbsDefaultKmsKeyId.go", - "api_op_GetEbsEncryptionByDefault.go", - "api_op_GetFlowLogsIntegrationTemplate.go", - "api_op_GetGroupsForCapacityReservation.go", - "api_op_GetHostReservationPurchasePreview.go", - "api_op_GetImageBlockPublicAccessState.go", - "api_op_GetInstanceTypesFromInstanceRequirements.go", - "api_op_GetInstanceUefiData.go", - "api_op_GetIpamAddressHistory.go", - "api_op_GetIpamDiscoveredAccounts.go", - "api_op_GetIpamDiscoveredPublicAddresses.go", - "api_op_GetIpamDiscoveredResourceCidrs.go", - "api_op_GetIpamPoolAllocations.go", - "api_op_GetIpamPoolCidrs.go", - "api_op_GetIpamResourceCidrs.go", - "api_op_GetLaunchTemplateData.go", - "api_op_GetManagedPrefixListAssociations.go", - "api_op_GetManagedPrefixListEntries.go", - "api_op_GetNetworkInsightsAccessScopeAnalysisFindings.go", - "api_op_GetNetworkInsightsAccessScopeContent.go", - "api_op_GetPasswordData.go", - "api_op_GetReservedInstancesExchangeQuote.go", - "api_op_GetSecurityGroupsForVpc.go", - "api_op_GetSerialConsoleAccessStatus.go", - "api_op_GetSnapshotBlockPublicAccessState.go", - "api_op_GetSpotPlacementScores.go", - "api_op_GetSubnetCidrReservations.go", - "api_op_GetTransitGatewayAttachmentPropagations.go", - "api_op_GetTransitGatewayMulticastDomainAssociations.go", - "api_op_GetTransitGatewayPolicyTableAssociations.go", - "api_op_GetTransitGatewayPolicyTableEntries.go", - "api_op_GetTransitGatewayPrefixListReferences.go", - "api_op_GetTransitGatewayRouteTableAssociations.go", - "api_op_GetTransitGatewayRouteTablePropagations.go", - "api_op_GetVerifiedAccessEndpointPolicy.go", - "api_op_GetVerifiedAccessGroupPolicy.go", - "api_op_GetVpnConnectionDeviceSampleConfiguration.go", - "api_op_GetVpnConnectionDeviceTypes.go", - "api_op_GetVpnTunnelReplacementStatus.go", - "api_op_ImportClientVpnClientCertificateRevocationList.go", - "api_op_ImportImage.go", - "api_op_ImportInstance.go", - "api_op_ImportKeyPair.go", - "api_op_ImportSnapshot.go", - "api_op_ImportVolume.go", - "api_op_ListImagesInRecycleBin.go", - "api_op_ListSnapshotsInRecycleBin.go", - "api_op_LockSnapshot.go", - "api_op_ModifyAddressAttribute.go", - "api_op_ModifyAvailabilityZoneGroup.go", - "api_op_ModifyCapacityReservation.go", - "api_op_ModifyCapacityReservationFleet.go", - "api_op_ModifyClientVpnEndpoint.go", - "api_op_ModifyDefaultCreditSpecification.go", - "api_op_ModifyEbsDefaultKmsKeyId.go", - "api_op_ModifyFleet.go", - "api_op_ModifyFpgaImageAttribute.go", - "api_op_ModifyHosts.go", - "api_op_ModifyIdFormat.go", - "api_op_ModifyIdentityIdFormat.go", - "api_op_ModifyImageAttribute.go", - "api_op_ModifyInstanceAttribute.go", - "api_op_ModifyInstanceCapacityReservationAttributes.go", - "api_op_ModifyInstanceCreditSpecification.go", - "api_op_ModifyInstanceEventStartTime.go", - "api_op_ModifyInstanceEventWindow.go", - "api_op_ModifyInstanceMaintenanceOptions.go", - "api_op_ModifyInstanceMetadataOptions.go", - "api_op_ModifyInstancePlacement.go", - "api_op_ModifyIpam.go", - "api_op_ModifyIpamPool.go", - "api_op_ModifyIpamResourceCidr.go", - "api_op_ModifyIpamResourceDiscovery.go", - "api_op_ModifyIpamScope.go", - "api_op_ModifyLaunchTemplate.go", - "api_op_ModifyLocalGatewayRoute.go", - "api_op_ModifyManagedPrefixList.go", - "api_op_ModifyNetworkInterfaceAttribute.go", - "api_op_ModifyPrivateDnsNameOptions.go", - "api_op_ModifyReservedInstances.go", - "api_op_ModifySecurityGroupRules.go", - "api_op_ModifySnapshotAttribute.go", - "api_op_ModifySnapshotTier.go", - "api_op_ModifySpotFleetRequest.go", - "api_op_ModifySubnetAttribute.go", - "api_op_ModifyTrafficMirrorFilterNetworkServices.go", - "api_op_ModifyTrafficMirrorFilterRule.go", - "api_op_ModifyTrafficMirrorSession.go", - "api_op_ModifyTransitGateway.go", - "api_op_ModifyTransitGatewayPrefixListReference.go", - "api_op_ModifyTransitGatewayVpcAttachment.go", - "api_op_ModifyVerifiedAccessEndpoint.go", - "api_op_ModifyVerifiedAccessEndpointPolicy.go", - "api_op_ModifyVerifiedAccessGroup.go", - "api_op_ModifyVerifiedAccessGroupPolicy.go", - "api_op_ModifyVerifiedAccessInstance.go", - "api_op_ModifyVerifiedAccessInstanceLoggingConfiguration.go", - "api_op_ModifyVerifiedAccessTrustProvider.go", - "api_op_ModifyVolume.go", - "api_op_ModifyVolumeAttribute.go", - "api_op_ModifyVpcAttribute.go", - "api_op_ModifyVpcEndpoint.go", - "api_op_ModifyVpcEndpointConnectionNotification.go", - "api_op_ModifyVpcEndpointServiceConfiguration.go", - "api_op_ModifyVpcEndpointServicePayerResponsibility.go", - "api_op_ModifyVpcEndpointServicePermissions.go", - "api_op_ModifyVpcPeeringConnectionOptions.go", - "api_op_ModifyVpcTenancy.go", - "api_op_ModifyVpnConnection.go", - "api_op_ModifyVpnConnectionOptions.go", - "api_op_ModifyVpnTunnelCertificate.go", - "api_op_ModifyVpnTunnelOptions.go", - "api_op_MonitorInstances.go", - "api_op_MoveAddressToVpc.go", - "api_op_MoveByoipCidrToIpam.go", - "api_op_ProvisionByoipCidr.go", - "api_op_ProvisionIpamByoasn.go", - "api_op_ProvisionIpamPoolCidr.go", - "api_op_ProvisionPublicIpv4PoolCidr.go", - "api_op_PurchaseCapacityBlock.go", - "api_op_PurchaseHostReservation.go", - "api_op_PurchaseReservedInstancesOffering.go", - "api_op_PurchaseScheduledInstances.go", - "api_op_RebootInstances.go", - "api_op_RegisterImage.go", - "api_op_RegisterInstanceEventNotificationAttributes.go", - "api_op_RegisterTransitGatewayMulticastGroupMembers.go", - "api_op_RegisterTransitGatewayMulticastGroupSources.go", - "api_op_RejectTransitGatewayMulticastDomainAssociations.go", - "api_op_RejectTransitGatewayPeeringAttachment.go", - "api_op_RejectTransitGatewayVpcAttachment.go", - "api_op_RejectVpcEndpointConnections.go", - "api_op_RejectVpcPeeringConnection.go", - "api_op_ReleaseAddress.go", - "api_op_ReleaseHosts.go", - "api_op_ReleaseIpamPoolAllocation.go", - "api_op_ReplaceIamInstanceProfileAssociation.go", - "api_op_ReplaceNetworkAclAssociation.go", - "api_op_ReplaceNetworkAclEntry.go", - "api_op_ReplaceRoute.go", - "api_op_ReplaceRouteTableAssociation.go", - "api_op_ReplaceTransitGatewayRoute.go", - "api_op_ReplaceVpnTunnel.go", - "api_op_ReportInstanceStatus.go", - "api_op_RequestSpotFleet.go", - "api_op_RequestSpotInstances.go", - "api_op_ResetAddressAttribute.go", - "api_op_ResetEbsDefaultKmsKeyId.go", - "api_op_ResetFpgaImageAttribute.go", - "api_op_ResetImageAttribute.go", - "api_op_ResetInstanceAttribute.go", - "api_op_ResetNetworkInterfaceAttribute.go", - "api_op_ResetSnapshotAttribute.go", - "api_op_RestoreAddressToClassic.go", - "api_op_RestoreImageFromRecycleBin.go", - "api_op_RestoreManagedPrefixListVersion.go", - "api_op_RestoreSnapshotFromRecycleBin.go", - "api_op_RestoreSnapshotTier.go", - "api_op_RevokeClientVpnIngress.go", - "api_op_RevokeSecurityGroupEgress.go", - "api_op_RevokeSecurityGroupIngress.go", - "api_op_RunInstances.go", - "api_op_RunScheduledInstances.go", - "api_op_SearchLocalGatewayRoutes.go", - "api_op_SearchTransitGatewayMulticastGroups.go", - "api_op_SearchTransitGatewayRoutes.go", - "api_op_SendDiagnosticInterrupt.go", - "api_op_StartInstances.go", - "api_op_StartNetworkInsightsAccessScopeAnalysis.go", - "api_op_StartNetworkInsightsAnalysis.go", - "api_op_StartVpcEndpointServicePrivateDnsVerification.go", - "api_op_StopInstances.go", - "api_op_TerminateClientVpnConnections.go", - "api_op_TerminateInstances.go", - "api_op_UnassignIpv6Addresses.go", - "api_op_UnassignPrivateIpAddresses.go", - "api_op_UnassignPrivateNatGatewayAddress.go", - "api_op_UnlockSnapshot.go", - "api_op_UnmonitorInstances.go", - "api_op_UpdateSecurityGroupRuleDescriptionsEgress.go", - "api_op_UpdateSecurityGroupRuleDescriptionsIngress.go", - "api_op_WithdrawByoipCidr.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "types/enums.go", - "types/types.go", - "validators.go" - ], - "go": "1.15", - "module": "github.com/aws/aws-sdk-go-v2/service/ec2", - "unstable": false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go deleted file mode 100644 index a0b23401d..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package ec2 - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.149.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints/endpoints.go deleted file mode 100644 index b2d7c51bd..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints/endpoints.go +++ /dev/null @@ -1,568 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver EC2 endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.{region}.api.aws", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.{region}.amazonaws.com", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "ec2-fips.{region}.api.aws", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.amazonaws.com", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "af-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-1", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.ap-south-1.api.aws", - }, - endpoints.EndpointKey{ - Region: "ap-south-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-4", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.ca-central-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "ca-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.ca-west-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "eu-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-central-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-1", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.eu-west-1.api.aws", - }, - endpoints.EndpointKey{ - Region: "eu-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "fips-ca-central-1", - }: endpoints.Endpoint{ - Hostname: "ec2-fips.ca-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-ca-west-1", - }: endpoints.Endpoint{ - Hostname: "ec2-fips.ca-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-west-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-east-1", - }: endpoints.Endpoint{ - Hostname: "ec2-fips.us-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-east-2", - }: endpoints.Endpoint{ - Hostname: "ec2-fips.us-east-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-2", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-west-1", - }: endpoints.Endpoint{ - Hostname: "ec2-fips.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "fips-us-west-2", - }: endpoints.Endpoint{ - Hostname: "ec2-fips.us-west-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-2", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "il-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "me-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.sa-east-1.api.aws", - }, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.us-east-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.us-east-1.api.aws", - }, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.us-east-2.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.us-east-2.api.aws", - }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.us-west-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-2", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.us-west-2.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-west-2", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.us-west-2.api.aws", - }, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.{region}.amazonaws.com.cn", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "ec2-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.amazonaws.com.cn", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "cn-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-iso-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.sc2s.sgov.gov", - Protocols: []string{"http", "https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-isob-east-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "ec2.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "ec2-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "ec2.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-gov-east-1", - }: endpoints.Endpoint{ - Hostname: "ec2.us-gov-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.us-gov-east-1.api.aws", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - }: endpoints.Endpoint{ - Hostname: "ec2.us-gov-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - Variant: endpoints.DualStackVariant, - }: { - Hostname: "ec2.us-gov-west-1.api.aws", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/options.go deleted file mode 100644 index 37cb69d20..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/options.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. To migrate an EndpointResolver implementation that uses a custom - // endpoint, set the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // Provides idempotency tokens values that will be automatically populated into - // idempotent API operations. - IdempotencyTokenProvider IdempotencyTokenProvider - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. If specified in an operation call's - // functional options with a value that is different than the constructed client's - // Options, the Client's Retryer will be wrapped to use the operation's specific - // RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. When creating a new API Clients this - // member will only be used if the Retryer Options member is nil. This value will - // be ignored if Retryer is not nil. Currently does not support per operation call - // overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. Currently does not support per operation call - // overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go deleted file mode 100644 index 928f28421..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/serializers.go +++ /dev/null @@ -1,68286 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/query" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - "math" - "path" -) - -type awsEc2query_serializeOpAcceptAddressTransfer struct { -} - -func (*awsEc2query_serializeOpAcceptAddressTransfer) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptAddressTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptAddressTransferInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptAddressTransfer") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptAddressTransferInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote struct { -} - -func (*awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptReservedInstancesExchangeQuoteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptReservedInstancesExchangeQuote") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptReservedInstancesExchangeQuoteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations struct { -} - -func (*awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptTransitGatewayMulticastDomainAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptTransitGatewayMulticastDomainAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptTransitGatewayPeeringAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptTransitGatewayPeeringAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptTransitGatewayVpcAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptTransitGatewayVpcAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAcceptVpcEndpointConnections struct { -} - -func (*awsEc2query_serializeOpAcceptVpcEndpointConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptVpcEndpointConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptVpcEndpointConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptVpcEndpointConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptVpcEndpointConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAcceptVpcPeeringConnection struct { -} - -func (*awsEc2query_serializeOpAcceptVpcPeeringConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAcceptVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AcceptVpcPeeringConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AcceptVpcPeeringConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAcceptVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAdvertiseByoipCidr struct { -} - -func (*awsEc2query_serializeOpAdvertiseByoipCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAdvertiseByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AdvertiseByoipCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AdvertiseByoipCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAdvertiseByoipCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAllocateAddress struct { -} - -func (*awsEc2query_serializeOpAllocateAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAllocateAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AllocateAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AllocateAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAllocateAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAllocateHosts struct { -} - -func (*awsEc2query_serializeOpAllocateHosts) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAllocateHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AllocateHostsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AllocateHosts") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAllocateHostsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAllocateIpamPoolCidr struct { -} - -func (*awsEc2query_serializeOpAllocateIpamPoolCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAllocateIpamPoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AllocateIpamPoolCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AllocateIpamPoolCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAllocateIpamPoolCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork struct { -} - -func (*awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ApplySecurityGroupsToClientVpnTargetNetworkInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ApplySecurityGroupsToClientVpnTargetNetwork") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssignIpv6Addresses struct { -} - -func (*awsEc2query_serializeOpAssignIpv6Addresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssignIpv6Addresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssignIpv6AddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssignIpv6Addresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssignIpv6AddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssignPrivateIpAddresses struct { -} - -func (*awsEc2query_serializeOpAssignPrivateIpAddresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssignPrivateIpAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssignPrivateIpAddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssignPrivateIpAddresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssignPrivateIpAddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssignPrivateNatGatewayAddress struct { -} - -func (*awsEc2query_serializeOpAssignPrivateNatGatewayAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssignPrivateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssignPrivateNatGatewayAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssignPrivateNatGatewayAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssignPrivateNatGatewayAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateAddress struct { -} - -func (*awsEc2query_serializeOpAssociateAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateClientVpnTargetNetwork struct { -} - -func (*awsEc2query_serializeOpAssociateClientVpnTargetNetwork) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateClientVpnTargetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateClientVpnTargetNetworkInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateClientVpnTargetNetwork") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateClientVpnTargetNetworkInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateDhcpOptions struct { -} - -func (*awsEc2query_serializeOpAssociateDhcpOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateDhcpOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateDhcpOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateDhcpOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateEnclaveCertificateIamRole struct { -} - -func (*awsEc2query_serializeOpAssociateEnclaveCertificateIamRole) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateEnclaveCertificateIamRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateEnclaveCertificateIamRoleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateEnclaveCertificateIamRole") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateEnclaveCertificateIamRoleInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateIamInstanceProfile struct { -} - -func (*awsEc2query_serializeOpAssociateIamInstanceProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateIamInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateIamInstanceProfileInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateIamInstanceProfile") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateIamInstanceProfileInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateInstanceEventWindow struct { -} - -func (*awsEc2query_serializeOpAssociateInstanceEventWindow) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateInstanceEventWindowInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateInstanceEventWindow") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateInstanceEventWindowInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateIpamByoasn struct { -} - -func (*awsEc2query_serializeOpAssociateIpamByoasn) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateIpamByoasnInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateIpamByoasn") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateIpamByoasnInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateIpamResourceDiscovery struct { -} - -func (*awsEc2query_serializeOpAssociateIpamResourceDiscovery) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateIpamResourceDiscoveryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateIpamResourceDiscovery") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateIpamResourceDiscoveryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateNatGatewayAddress struct { -} - -func (*awsEc2query_serializeOpAssociateNatGatewayAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateNatGatewayAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateNatGatewayAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateNatGatewayAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateRouteTable struct { -} - -func (*awsEc2query_serializeOpAssociateRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateSubnetCidrBlock struct { -} - -func (*awsEc2query_serializeOpAssociateSubnetCidrBlock) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateSubnetCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateSubnetCidrBlockInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateSubnetCidrBlock") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateTransitGatewayMulticastDomainInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateTransitGatewayMulticastDomain") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_serializeOpAssociateTransitGatewayPolicyTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateTransitGatewayPolicyTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateTransitGatewayPolicyTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayPolicyTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateTransitGatewayRouteTable struct { -} - -func (*awsEc2query_serializeOpAssociateTransitGatewayRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateTransitGatewayRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateTransitGatewayRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateTrunkInterface struct { -} - -func (*awsEc2query_serializeOpAssociateTrunkInterface) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateTrunkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateTrunkInterfaceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateTrunkInterface") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateTrunkInterfaceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAssociateVpcCidrBlock struct { -} - -func (*awsEc2query_serializeOpAssociateVpcCidrBlock) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAssociateVpcCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateVpcCidrBlockInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssociateVpcCidrBlock") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAssociateVpcCidrBlockInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAttachClassicLinkVpc struct { -} - -func (*awsEc2query_serializeOpAttachClassicLinkVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAttachClassicLinkVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AttachClassicLinkVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AttachClassicLinkVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAttachClassicLinkVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAttachInternetGateway struct { -} - -func (*awsEc2query_serializeOpAttachInternetGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAttachInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AttachInternetGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AttachInternetGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAttachInternetGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAttachNetworkInterface struct { -} - -func (*awsEc2query_serializeOpAttachNetworkInterface) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAttachNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AttachNetworkInterfaceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AttachNetworkInterface") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAttachNetworkInterfaceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAttachVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_serializeOpAttachVerifiedAccessTrustProvider) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAttachVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AttachVerifiedAccessTrustProviderInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AttachVerifiedAccessTrustProvider") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAttachVerifiedAccessTrustProviderInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAttachVolume struct { -} - -func (*awsEc2query_serializeOpAttachVolume) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAttachVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AttachVolumeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AttachVolume") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAttachVolumeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAttachVpnGateway struct { -} - -func (*awsEc2query_serializeOpAttachVpnGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAttachVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AttachVpnGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AttachVpnGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAttachVpnGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAuthorizeClientVpnIngress struct { -} - -func (*awsEc2query_serializeOpAuthorizeClientVpnIngress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAuthorizeClientVpnIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AuthorizeClientVpnIngressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AuthorizeClientVpnIngress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAuthorizeClientVpnIngressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAuthorizeSecurityGroupEgress struct { -} - -func (*awsEc2query_serializeOpAuthorizeSecurityGroupEgress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAuthorizeSecurityGroupEgress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AuthorizeSecurityGroupEgressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AuthorizeSecurityGroupEgress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAuthorizeSecurityGroupEgressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpAuthorizeSecurityGroupIngress struct { -} - -func (*awsEc2query_serializeOpAuthorizeSecurityGroupIngress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpAuthorizeSecurityGroupIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AuthorizeSecurityGroupIngressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AuthorizeSecurityGroupIngress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentAuthorizeSecurityGroupIngressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpBundleInstance struct { -} - -func (*awsEc2query_serializeOpBundleInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpBundleInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*BundleInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("BundleInstance") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentBundleInstanceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelBundleTask struct { -} - -func (*awsEc2query_serializeOpCancelBundleTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelBundleTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelBundleTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelBundleTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelBundleTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelCapacityReservation struct { -} - -func (*awsEc2query_serializeOpCancelCapacityReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelCapacityReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelCapacityReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelCapacityReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelCapacityReservationFleets struct { -} - -func (*awsEc2query_serializeOpCancelCapacityReservationFleets) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelCapacityReservationFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelCapacityReservationFleetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelCapacityReservationFleets") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelCapacityReservationFleetsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelConversionTask struct { -} - -func (*awsEc2query_serializeOpCancelConversionTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelConversionTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelConversionTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelConversionTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelConversionTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelExportTask struct { -} - -func (*awsEc2query_serializeOpCancelExportTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelExportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelExportTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelExportTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelExportTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelImageLaunchPermission struct { -} - -func (*awsEc2query_serializeOpCancelImageLaunchPermission) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelImageLaunchPermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelImageLaunchPermissionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelImageLaunchPermission") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelImageLaunchPermissionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelImportTask struct { -} - -func (*awsEc2query_serializeOpCancelImportTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelImportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelImportTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelImportTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelImportTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelReservedInstancesListing struct { -} - -func (*awsEc2query_serializeOpCancelReservedInstancesListing) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelReservedInstancesListing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelReservedInstancesListingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelReservedInstancesListing") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelReservedInstancesListingInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelSpotFleetRequests struct { -} - -func (*awsEc2query_serializeOpCancelSpotFleetRequests) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelSpotFleetRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelSpotFleetRequestsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelSpotFleetRequests") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelSpotFleetRequestsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCancelSpotInstanceRequests struct { -} - -func (*awsEc2query_serializeOpCancelSpotInstanceRequests) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCancelSpotInstanceRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelSpotInstanceRequestsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CancelSpotInstanceRequests") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCancelSpotInstanceRequestsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpConfirmProductInstance struct { -} - -func (*awsEc2query_serializeOpConfirmProductInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpConfirmProductInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ConfirmProductInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ConfirmProductInstance") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentConfirmProductInstanceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCopyFpgaImage struct { -} - -func (*awsEc2query_serializeOpCopyFpgaImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCopyFpgaImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CopyFpgaImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CopyFpgaImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCopyFpgaImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCopyImage struct { -} - -func (*awsEc2query_serializeOpCopyImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCopyImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CopyImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CopyImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCopyImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCopySnapshot struct { -} - -func (*awsEc2query_serializeOpCopySnapshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCopySnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CopySnapshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CopySnapshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCopySnapshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateCapacityReservation struct { -} - -func (*awsEc2query_serializeOpCreateCapacityReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCapacityReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateCapacityReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateCapacityReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateCapacityReservationFleet struct { -} - -func (*awsEc2query_serializeOpCreateCapacityReservationFleet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateCapacityReservationFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCapacityReservationFleetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateCapacityReservationFleet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateCapacityReservationFleetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateCarrierGateway struct { -} - -func (*awsEc2query_serializeOpCreateCarrierGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateCarrierGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCarrierGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateCarrierGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateCarrierGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateClientVpnEndpoint struct { -} - -func (*awsEc2query_serializeOpCreateClientVpnEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateClientVpnEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateClientVpnEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateClientVpnEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateClientVpnEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateClientVpnRoute struct { -} - -func (*awsEc2query_serializeOpCreateClientVpnRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateClientVpnRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateClientVpnRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateClientVpnRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateClientVpnRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateCoipCidr struct { -} - -func (*awsEc2query_serializeOpCreateCoipCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateCoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCoipCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateCoipCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateCoipCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateCoipPool struct { -} - -func (*awsEc2query_serializeOpCreateCoipPool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateCoipPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCoipPoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateCoipPool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateCoipPoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateCustomerGateway struct { -} - -func (*awsEc2query_serializeOpCreateCustomerGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCustomerGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateCustomerGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateCustomerGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateDefaultSubnet struct { -} - -func (*awsEc2query_serializeOpCreateDefaultSubnet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateDefaultSubnet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateDefaultSubnetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateDefaultSubnet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateDefaultVpc struct { -} - -func (*awsEc2query_serializeOpCreateDefaultVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateDefaultVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateDefaultVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateDefaultVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateDefaultVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateDhcpOptions struct { -} - -func (*awsEc2query_serializeOpCreateDhcpOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateDhcpOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateDhcpOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateDhcpOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateEgressOnlyInternetGateway struct { -} - -func (*awsEc2query_serializeOpCreateEgressOnlyInternetGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateEgressOnlyInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateEgressOnlyInternetGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateEgressOnlyInternetGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateEgressOnlyInternetGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateFleet struct { -} - -func (*awsEc2query_serializeOpCreateFleet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateFleetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateFleet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateFleetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateFlowLogs struct { -} - -func (*awsEc2query_serializeOpCreateFlowLogs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateFlowLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateFlowLogsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateFlowLogs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateFlowLogsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateFpgaImage struct { -} - -func (*awsEc2query_serializeOpCreateFpgaImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateFpgaImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateFpgaImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateFpgaImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateFpgaImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateImage struct { -} - -func (*awsEc2query_serializeOpCreateImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateInstanceConnectEndpoint struct { -} - -func (*awsEc2query_serializeOpCreateInstanceConnectEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateInstanceConnectEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateInstanceConnectEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateInstanceConnectEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateInstanceConnectEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateInstanceEventWindow struct { -} - -func (*awsEc2query_serializeOpCreateInstanceEventWindow) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateInstanceEventWindowInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateInstanceEventWindow") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateInstanceEventWindowInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateInstanceExportTask struct { -} - -func (*awsEc2query_serializeOpCreateInstanceExportTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateInstanceExportTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateInstanceExportTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateInstanceExportTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateInstanceExportTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateInternetGateway struct { -} - -func (*awsEc2query_serializeOpCreateInternetGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateInternetGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateInternetGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateInternetGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateIpam struct { -} - -func (*awsEc2query_serializeOpCreateIpam) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateIpamInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateIpam") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateIpamInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateIpamPool struct { -} - -func (*awsEc2query_serializeOpCreateIpamPool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateIpamPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateIpamPoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateIpamPool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateIpamPoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateIpamResourceDiscovery struct { -} - -func (*awsEc2query_serializeOpCreateIpamResourceDiscovery) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateIpamResourceDiscoveryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateIpamResourceDiscovery") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateIpamResourceDiscoveryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateIpamScope struct { -} - -func (*awsEc2query_serializeOpCreateIpamScope) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateIpamScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateIpamScopeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateIpamScope") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateIpamScopeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateKeyPair struct { -} - -func (*awsEc2query_serializeOpCreateKeyPair) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateKeyPairInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateKeyPair") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateKeyPairInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateLaunchTemplate struct { -} - -func (*awsEc2query_serializeOpCreateLaunchTemplate) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateLaunchTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateLaunchTemplateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateLaunchTemplate") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateLaunchTemplateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateLaunchTemplateVersion struct { -} - -func (*awsEc2query_serializeOpCreateLaunchTemplateVersion) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateLaunchTemplateVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateLaunchTemplateVersionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateLaunchTemplateVersion") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateLaunchTemplateVersionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateLocalGatewayRoute struct { -} - -func (*awsEc2query_serializeOpCreateLocalGatewayRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateLocalGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateLocalGatewayRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateLocalGatewayRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateLocalGatewayRouteTable struct { -} - -func (*awsEc2query_serializeOpCreateLocalGatewayRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateLocalGatewayRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateLocalGatewayRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { -} - -func (*awsEc2query_serializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation struct { -} - -func (*awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateLocalGatewayRouteTableVpcAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateLocalGatewayRouteTableVpcAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateManagedPrefixList struct { -} - -func (*awsEc2query_serializeOpCreateManagedPrefixList) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateManagedPrefixList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateManagedPrefixListInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateManagedPrefixList") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateManagedPrefixListInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNatGateway struct { -} - -func (*awsEc2query_serializeOpCreateNatGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNatGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNatGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNatGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNatGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNetworkAcl struct { -} - -func (*awsEc2query_serializeOpCreateNetworkAcl) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNetworkAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNetworkAclInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNetworkAcl") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNetworkAclInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNetworkAclEntry struct { -} - -func (*awsEc2query_serializeOpCreateNetworkAclEntry) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNetworkAclEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNetworkAclEntryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNetworkAclEntry") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNetworkAclEntryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNetworkInsightsAccessScope struct { -} - -func (*awsEc2query_serializeOpCreateNetworkInsightsAccessScope) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNetworkInsightsAccessScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNetworkInsightsAccessScopeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNetworkInsightsAccessScope") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNetworkInsightsAccessScopeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNetworkInsightsPath struct { -} - -func (*awsEc2query_serializeOpCreateNetworkInsightsPath) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNetworkInsightsPath) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNetworkInsightsPathInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNetworkInsightsPath") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNetworkInterface struct { -} - -func (*awsEc2query_serializeOpCreateNetworkInterface) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNetworkInterfaceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNetworkInterface") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNetworkInterfaceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateNetworkInterfacePermission struct { -} - -func (*awsEc2query_serializeOpCreateNetworkInterfacePermission) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateNetworkInterfacePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateNetworkInterfacePermissionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateNetworkInterfacePermission") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateNetworkInterfacePermissionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreatePlacementGroup struct { -} - -func (*awsEc2query_serializeOpCreatePlacementGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreatePlacementGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreatePlacementGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreatePlacementGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreatePlacementGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreatePublicIpv4Pool struct { -} - -func (*awsEc2query_serializeOpCreatePublicIpv4Pool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreatePublicIpv4Pool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreatePublicIpv4PoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreatePublicIpv4Pool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreatePublicIpv4PoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateReplaceRootVolumeTask struct { -} - -func (*awsEc2query_serializeOpCreateReplaceRootVolumeTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateReplaceRootVolumeTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateReplaceRootVolumeTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateReplaceRootVolumeTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateReplaceRootVolumeTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateReservedInstancesListing struct { -} - -func (*awsEc2query_serializeOpCreateReservedInstancesListing) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateReservedInstancesListing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateReservedInstancesListingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateReservedInstancesListing") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateReservedInstancesListingInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateRestoreImageTask struct { -} - -func (*awsEc2query_serializeOpCreateRestoreImageTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateRestoreImageTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateRestoreImageTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateRestoreImageTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateRestoreImageTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateRoute struct { -} - -func (*awsEc2query_serializeOpCreateRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateRouteTable struct { -} - -func (*awsEc2query_serializeOpCreateRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateSecurityGroup struct { -} - -func (*awsEc2query_serializeOpCreateSecurityGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSecurityGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateSecurityGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateSecurityGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateSnapshot struct { -} - -func (*awsEc2query_serializeOpCreateSnapshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSnapshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateSnapshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateSnapshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateSnapshots struct { -} - -func (*awsEc2query_serializeOpCreateSnapshots) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSnapshotsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateSnapshots") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateSnapshotsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateSpotDatafeedSubscription struct { -} - -func (*awsEc2query_serializeOpCreateSpotDatafeedSubscription) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateSpotDatafeedSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSpotDatafeedSubscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateSpotDatafeedSubscription") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateSpotDatafeedSubscriptionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateStoreImageTask struct { -} - -func (*awsEc2query_serializeOpCreateStoreImageTask) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateStoreImageTask) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateStoreImageTaskInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateStoreImageTask") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateStoreImageTaskInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateSubnet struct { -} - -func (*awsEc2query_serializeOpCreateSubnet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateSubnet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSubnetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateSubnet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateSubnetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateSubnetCidrReservation struct { -} - -func (*awsEc2query_serializeOpCreateSubnetCidrReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateSubnetCidrReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSubnetCidrReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateSubnetCidrReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateSubnetCidrReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTags struct { -} - -func (*awsEc2query_serializeOpCreateTags) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTagsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTags") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTagsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTrafficMirrorFilter struct { -} - -func (*awsEc2query_serializeOpCreateTrafficMirrorFilter) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTrafficMirrorFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficMirrorFilterInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTrafficMirrorFilter") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTrafficMirrorFilterRule struct { -} - -func (*awsEc2query_serializeOpCreateTrafficMirrorFilterRule) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficMirrorFilterRuleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTrafficMirrorFilterRule") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTrafficMirrorSession struct { -} - -func (*awsEc2query_serializeOpCreateTrafficMirrorSession) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficMirrorSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTrafficMirrorSession") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTrafficMirrorTarget struct { -} - -func (*awsEc2query_serializeOpCreateTrafficMirrorTarget) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTrafficMirrorTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficMirrorTargetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTrafficMirrorTarget") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTrafficMirrorTargetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGateway struct { -} - -func (*awsEc2query_serializeOpCreateTransitGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayConnect struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayConnect) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayConnect) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayConnectInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayConnect") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayConnectInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayConnectPeer struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayConnectPeer) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayConnectPeerInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayConnectPeer") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayConnectPeerInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayMulticastDomain) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayMulticastDomainInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayMulticastDomain") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayPeeringAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayPeeringAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayPolicyTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayPolicyTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayPolicyTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPolicyTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayPrefixListReference struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayPrefixListReference) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayPrefixListReferenceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayPrefixListReference") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayRoute struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayRouteTable struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayRouteTableAnnouncement struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayRouteTableAnnouncement) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayRouteTableAnnouncement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayRouteTableAnnouncementInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayRouteTableAnnouncement") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableAnnouncementInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_serializeOpCreateTransitGatewayVpcAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTransitGatewayVpcAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateTransitGatewayVpcAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVerifiedAccessEndpoint struct { -} - -func (*awsEc2query_serializeOpCreateVerifiedAccessEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVerifiedAccessEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVerifiedAccessEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVerifiedAccessEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVerifiedAccessGroup struct { -} - -func (*awsEc2query_serializeOpCreateVerifiedAccessGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVerifiedAccessGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVerifiedAccessGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVerifiedAccessGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVerifiedAccessInstance struct { -} - -func (*awsEc2query_serializeOpCreateVerifiedAccessInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVerifiedAccessInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVerifiedAccessInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVerifiedAccessInstance") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessInstanceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_serializeOpCreateVerifiedAccessTrustProvider) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVerifiedAccessTrustProviderInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVerifiedAccessTrustProvider") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVerifiedAccessTrustProviderInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVolume struct { -} - -func (*awsEc2query_serializeOpCreateVolume) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVolumeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVolume") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVolumeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpc struct { -} - -func (*awsEc2query_serializeOpCreateVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpcEndpoint struct { -} - -func (*awsEc2query_serializeOpCreateVpcEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpcEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpcEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpcEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpcEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpcEndpointConnectionNotification struct { -} - -func (*awsEc2query_serializeOpCreateVpcEndpointConnectionNotification) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpcEndpointConnectionNotification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpcEndpointConnectionNotificationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpcEndpointConnectionNotification") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpcEndpointConnectionNotificationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration struct { -} - -func (*awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpcEndpointServiceConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpcEndpointServiceConfiguration") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpcEndpointServiceConfigurationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpcPeeringConnection struct { -} - -func (*awsEc2query_serializeOpCreateVpcPeeringConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpcPeeringConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpcPeeringConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpnConnection struct { -} - -func (*awsEc2query_serializeOpCreateVpnConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpnConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpnConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpnConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpnConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpnConnectionRoute struct { -} - -func (*awsEc2query_serializeOpCreateVpnConnectionRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpnConnectionRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpnConnectionRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpnConnectionRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpnConnectionRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpCreateVpnGateway struct { -} - -func (*awsEc2query_serializeOpCreateVpnGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpCreateVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVpnGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("CreateVpnGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentCreateVpnGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteCarrierGateway struct { -} - -func (*awsEc2query_serializeOpDeleteCarrierGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteCarrierGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteCarrierGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteCarrierGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteCarrierGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteClientVpnEndpoint struct { -} - -func (*awsEc2query_serializeOpDeleteClientVpnEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteClientVpnEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteClientVpnEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteClientVpnEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteClientVpnEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteClientVpnRoute struct { -} - -func (*awsEc2query_serializeOpDeleteClientVpnRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteClientVpnRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteClientVpnRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteClientVpnRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteClientVpnRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteCoipCidr struct { -} - -func (*awsEc2query_serializeOpDeleteCoipCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteCoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteCoipCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteCoipCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteCoipCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteCoipPool struct { -} - -func (*awsEc2query_serializeOpDeleteCoipPool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteCoipPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteCoipPoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteCoipPool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteCoipPoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteCustomerGateway struct { -} - -func (*awsEc2query_serializeOpDeleteCustomerGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteCustomerGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteCustomerGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteCustomerGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteCustomerGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteDhcpOptions struct { -} - -func (*awsEc2query_serializeOpDeleteDhcpOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteDhcpOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteDhcpOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteDhcpOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteEgressOnlyInternetGateway struct { -} - -func (*awsEc2query_serializeOpDeleteEgressOnlyInternetGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteEgressOnlyInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteEgressOnlyInternetGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteEgressOnlyInternetGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteEgressOnlyInternetGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteFleets struct { -} - -func (*awsEc2query_serializeOpDeleteFleets) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteFleetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteFleets") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteFleetsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteFlowLogs struct { -} - -func (*awsEc2query_serializeOpDeleteFlowLogs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteFlowLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteFlowLogsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteFlowLogs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteFlowLogsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteFpgaImage struct { -} - -func (*awsEc2query_serializeOpDeleteFpgaImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteFpgaImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteFpgaImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteFpgaImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteFpgaImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteInstanceConnectEndpoint struct { -} - -func (*awsEc2query_serializeOpDeleteInstanceConnectEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteInstanceConnectEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteInstanceConnectEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteInstanceConnectEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteInstanceConnectEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteInstanceEventWindow struct { -} - -func (*awsEc2query_serializeOpDeleteInstanceEventWindow) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteInstanceEventWindowInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteInstanceEventWindow") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteInstanceEventWindowInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteInternetGateway struct { -} - -func (*awsEc2query_serializeOpDeleteInternetGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteInternetGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteInternetGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteIpam struct { -} - -func (*awsEc2query_serializeOpDeleteIpam) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteIpamInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteIpam") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteIpamInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteIpamPool struct { -} - -func (*awsEc2query_serializeOpDeleteIpamPool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteIpamPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteIpamPoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteIpamPool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteIpamPoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteIpamResourceDiscovery struct { -} - -func (*awsEc2query_serializeOpDeleteIpamResourceDiscovery) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteIpamResourceDiscoveryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteIpamResourceDiscovery") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteIpamResourceDiscoveryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteIpamScope struct { -} - -func (*awsEc2query_serializeOpDeleteIpamScope) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteIpamScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteIpamScopeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteIpamScope") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteIpamScopeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteKeyPair struct { -} - -func (*awsEc2query_serializeOpDeleteKeyPair) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteKeyPairInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteKeyPair") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteKeyPairInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteLaunchTemplate struct { -} - -func (*awsEc2query_serializeOpDeleteLaunchTemplate) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteLaunchTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteLaunchTemplateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteLaunchTemplate") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteLaunchTemplateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteLaunchTemplateVersions struct { -} - -func (*awsEc2query_serializeOpDeleteLaunchTemplateVersions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteLaunchTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteLaunchTemplateVersionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteLaunchTemplateVersions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteLaunchTemplateVersionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteLocalGatewayRoute struct { -} - -func (*awsEc2query_serializeOpDeleteLocalGatewayRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteLocalGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteLocalGatewayRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteLocalGatewayRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteLocalGatewayRouteTable struct { -} - -func (*awsEc2query_serializeOpDeleteLocalGatewayRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteLocalGatewayRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { -} - -func (*awsEc2query_serializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation struct { -} - -func (*awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableVpcAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteLocalGatewayRouteTableVpcAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteManagedPrefixList struct { -} - -func (*awsEc2query_serializeOpDeleteManagedPrefixList) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteManagedPrefixList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteManagedPrefixListInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteManagedPrefixList") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteManagedPrefixListInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNatGateway struct { -} - -func (*awsEc2query_serializeOpDeleteNatGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNatGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNatGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNatGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNatGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkAcl struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkAcl) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkAcl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkAclInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkAcl") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkAclInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkAclEntry struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkAclEntry) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkAclEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkAclEntryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkAclEntry") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkAclEntryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkInsightsAccessScope struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkInsightsAccessScope) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkInsightsAccessScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkInsightsAccessScopeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkInsightsAccessScope") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkInsightsAccessScopeAnalysis struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkInsightsAccessScopeAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkInsightsAccessScopeAnalysisInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkInsightsAccessScopeAnalysis") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeAnalysisInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkInsightsAnalysis struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkInsightsAnalysis) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkInsightsAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkInsightsAnalysisInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkInsightsAnalysis") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsAnalysisInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkInsightsPath struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkInsightsPath) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkInsightsPath) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkInsightsPathInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkInsightsPath") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkInsightsPathInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkInterface struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkInterface) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkInterfaceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkInterface") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkInterfaceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteNetworkInterfacePermission struct { -} - -func (*awsEc2query_serializeOpDeleteNetworkInterfacePermission) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteNetworkInterfacePermission) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteNetworkInterfacePermissionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteNetworkInterfacePermission") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteNetworkInterfacePermissionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeletePlacementGroup struct { -} - -func (*awsEc2query_serializeOpDeletePlacementGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeletePlacementGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeletePlacementGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeletePlacementGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeletePlacementGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeletePublicIpv4Pool struct { -} - -func (*awsEc2query_serializeOpDeletePublicIpv4Pool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeletePublicIpv4Pool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeletePublicIpv4PoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeletePublicIpv4Pool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeletePublicIpv4PoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteQueuedReservedInstances struct { -} - -func (*awsEc2query_serializeOpDeleteQueuedReservedInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteQueuedReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteQueuedReservedInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteQueuedReservedInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteQueuedReservedInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteRoute struct { -} - -func (*awsEc2query_serializeOpDeleteRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteRouteTable struct { -} - -func (*awsEc2query_serializeOpDeleteRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteSecurityGroup struct { -} - -func (*awsEc2query_serializeOpDeleteSecurityGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteSecurityGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteSecurityGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteSecurityGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteSnapshot struct { -} - -func (*awsEc2query_serializeOpDeleteSnapshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteSnapshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteSnapshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteSnapshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteSpotDatafeedSubscription struct { -} - -func (*awsEc2query_serializeOpDeleteSpotDatafeedSubscription) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteSpotDatafeedSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteSpotDatafeedSubscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteSpotDatafeedSubscription") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteSpotDatafeedSubscriptionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteSubnet struct { -} - -func (*awsEc2query_serializeOpDeleteSubnet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteSubnet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteSubnetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteSubnet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteSubnetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteSubnetCidrReservation struct { -} - -func (*awsEc2query_serializeOpDeleteSubnetCidrReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteSubnetCidrReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteSubnetCidrReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteSubnetCidrReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteSubnetCidrReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTags struct { -} - -func (*awsEc2query_serializeOpDeleteTags) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTagsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTags") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTagsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTrafficMirrorFilter struct { -} - -func (*awsEc2query_serializeOpDeleteTrafficMirrorFilter) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilter) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTrafficMirrorFilterInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTrafficMirrorFilter") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTrafficMirrorFilterRule struct { -} - -func (*awsEc2query_serializeOpDeleteTrafficMirrorFilterRule) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTrafficMirrorFilterRuleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTrafficMirrorFilterRule") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTrafficMirrorSession struct { -} - -func (*awsEc2query_serializeOpDeleteTrafficMirrorSession) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTrafficMirrorSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTrafficMirrorSession") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTrafficMirrorTarget struct { -} - -func (*awsEc2query_serializeOpDeleteTrafficMirrorTarget) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTrafficMirrorTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTrafficMirrorTargetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTrafficMirrorTarget") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTrafficMirrorTargetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGateway struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayConnect struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayConnect) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayConnect) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayConnectInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayConnect") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayConnectPeer struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayConnectPeer) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayConnectPeer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayConnectPeerInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayConnectPeer") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectPeerInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayMulticastDomainInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayMulticastDomain") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayPeeringAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayPeeringAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayPolicyTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayPolicyTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayPolicyTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPolicyTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayPrefixListReferenceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayPrefixListReference") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayRoute struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayRouteTable struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayRouteTableAnnouncement struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayRouteTableAnnouncement) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayRouteTableAnnouncement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayRouteTableAnnouncementInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayRouteTableAnnouncement") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableAnnouncementInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTransitGatewayVpcAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteTransitGatewayVpcAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVerifiedAccessEndpoint struct { -} - -func (*awsEc2query_serializeOpDeleteVerifiedAccessEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVerifiedAccessEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVerifiedAccessEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVerifiedAccessGroup struct { -} - -func (*awsEc2query_serializeOpDeleteVerifiedAccessGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVerifiedAccessGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVerifiedAccessGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVerifiedAccessInstance struct { -} - -func (*awsEc2query_serializeOpDeleteVerifiedAccessInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVerifiedAccessInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVerifiedAccessInstance") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessInstanceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_serializeOpDeleteVerifiedAccessTrustProvider) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVerifiedAccessTrustProviderInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVerifiedAccessTrustProvider") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVerifiedAccessTrustProviderInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVolume struct { -} - -func (*awsEc2query_serializeOpDeleteVolume) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVolumeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVolume") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVolumeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpc struct { -} - -func (*awsEc2query_serializeOpDeleteVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications struct { -} - -func (*awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpcEndpointConnectionNotificationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpcEndpointConnectionNotifications") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointConnectionNotificationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpcEndpoints struct { -} - -func (*awsEc2query_serializeOpDeleteVpcEndpoints) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpcEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpcEndpointsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpcEndpoints") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations struct { -} - -func (*awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpcEndpointServiceConfigurationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpcEndpointServiceConfigurations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpcEndpointServiceConfigurationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpcPeeringConnection struct { -} - -func (*awsEc2query_serializeOpDeleteVpcPeeringConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpcPeeringConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpcPeeringConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpnConnection struct { -} - -func (*awsEc2query_serializeOpDeleteVpnConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpnConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpnConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpnConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpnConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpnConnectionRoute struct { -} - -func (*awsEc2query_serializeOpDeleteVpnConnectionRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpnConnectionRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpnConnectionRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpnConnectionRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpnConnectionRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeleteVpnGateway struct { -} - -func (*awsEc2query_serializeOpDeleteVpnGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeleteVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVpnGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeleteVpnGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeleteVpnGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeprovisionByoipCidr struct { -} - -func (*awsEc2query_serializeOpDeprovisionByoipCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeprovisionByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeprovisionByoipCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeprovisionByoipCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeprovisionByoipCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeprovisionIpamByoasn struct { -} - -func (*awsEc2query_serializeOpDeprovisionIpamByoasn) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeprovisionIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeprovisionIpamByoasnInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeprovisionIpamByoasn") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeprovisionIpamByoasnInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeprovisionIpamPoolCidr struct { -} - -func (*awsEc2query_serializeOpDeprovisionIpamPoolCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeprovisionIpamPoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeprovisionIpamPoolCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeprovisionIpamPoolCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeprovisionIpamPoolCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeprovisionPublicIpv4PoolCidr struct { -} - -func (*awsEc2query_serializeOpDeprovisionPublicIpv4PoolCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeprovisionPublicIpv4PoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeprovisionPublicIpv4PoolCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeprovisionPublicIpv4PoolCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeprovisionPublicIpv4PoolCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeregisterImage struct { -} - -func (*awsEc2query_serializeOpDeregisterImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeregisterImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeregisterImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeregisterImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeregisterImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes struct { -} - -func (*awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeregisterInstanceEventNotificationAttributesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeregisterInstanceEventNotificationAttributes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeregisterInstanceEventNotificationAttributesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers struct { -} - -func (*awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeregisterTransitGatewayMulticastGroupMembersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeregisterTransitGatewayMulticastGroupMembers") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources struct { -} - -func (*awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeregisterTransitGatewayMulticastGroupSourcesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DeregisterTransitGatewayMulticastGroupSources") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAccountAttributes struct { -} - -func (*awsEc2query_serializeOpDescribeAccountAttributes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAccountAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAccountAttributesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAccountAttributes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAccountAttributesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAddresses struct { -} - -func (*awsEc2query_serializeOpDescribeAddresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAddresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAddressesAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeAddressesAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAddressesAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAddressesAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAddressesAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAddressesAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAddressTransfers struct { -} - -func (*awsEc2query_serializeOpDescribeAddressTransfers) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAddressTransfers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAddressTransfersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAddressTransfers") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAddressTransfersInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAggregateIdFormat struct { -} - -func (*awsEc2query_serializeOpDescribeAggregateIdFormat) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAggregateIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAggregateIdFormatInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAggregateIdFormat") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAggregateIdFormatInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAvailabilityZones struct { -} - -func (*awsEc2query_serializeOpDescribeAvailabilityZones) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAvailabilityZones) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAvailabilityZonesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAvailabilityZones") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAvailabilityZonesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeAwsNetworkPerformanceMetricSubscriptions struct { -} - -func (*awsEc2query_serializeOpDescribeAwsNetworkPerformanceMetricSubscriptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeAwsNetworkPerformanceMetricSubscriptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAwsNetworkPerformanceMetricSubscriptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeAwsNetworkPerformanceMetricSubscriptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeAwsNetworkPerformanceMetricSubscriptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeBundleTasks struct { -} - -func (*awsEc2query_serializeOpDescribeBundleTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeBundleTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeBundleTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeBundleTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeBundleTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeByoipCidrs struct { -} - -func (*awsEc2query_serializeOpDescribeByoipCidrs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeByoipCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeByoipCidrsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeByoipCidrs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeByoipCidrsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeCapacityBlockOfferings struct { -} - -func (*awsEc2query_serializeOpDescribeCapacityBlockOfferings) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeCapacityBlockOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeCapacityBlockOfferingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeCapacityBlockOfferings") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeCapacityBlockOfferingsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeCapacityReservationFleets struct { -} - -func (*awsEc2query_serializeOpDescribeCapacityReservationFleets) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeCapacityReservationFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeCapacityReservationFleetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeCapacityReservationFleets") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeCapacityReservationFleetsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeCapacityReservations struct { -} - -func (*awsEc2query_serializeOpDescribeCapacityReservations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeCapacityReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeCapacityReservationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeCapacityReservations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeCapacityReservationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeCarrierGateways struct { -} - -func (*awsEc2query_serializeOpDescribeCarrierGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeCarrierGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeCarrierGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeCarrierGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeCarrierGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeClassicLinkInstances struct { -} - -func (*awsEc2query_serializeOpDescribeClassicLinkInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeClassicLinkInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeClassicLinkInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeClassicLinkInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeClassicLinkInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeClientVpnAuthorizationRules struct { -} - -func (*awsEc2query_serializeOpDescribeClientVpnAuthorizationRules) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeClientVpnAuthorizationRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeClientVpnAuthorizationRulesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeClientVpnAuthorizationRules") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeClientVpnAuthorizationRulesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeClientVpnConnections struct { -} - -func (*awsEc2query_serializeOpDescribeClientVpnConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeClientVpnConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeClientVpnConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeClientVpnConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeClientVpnConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeClientVpnEndpoints struct { -} - -func (*awsEc2query_serializeOpDescribeClientVpnEndpoints) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeClientVpnEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeClientVpnEndpointsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeClientVpnEndpoints") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeClientVpnEndpointsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeClientVpnRoutes struct { -} - -func (*awsEc2query_serializeOpDescribeClientVpnRoutes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeClientVpnRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeClientVpnRoutesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeClientVpnRoutes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeClientVpnRoutesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeClientVpnTargetNetworks struct { -} - -func (*awsEc2query_serializeOpDescribeClientVpnTargetNetworks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeClientVpnTargetNetworks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeClientVpnTargetNetworksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeClientVpnTargetNetworks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeClientVpnTargetNetworksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeCoipPools struct { -} - -func (*awsEc2query_serializeOpDescribeCoipPools) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeCoipPools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeCoipPoolsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeCoipPools") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeCoipPoolsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeConversionTasks struct { -} - -func (*awsEc2query_serializeOpDescribeConversionTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeConversionTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeConversionTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeConversionTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeConversionTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeCustomerGateways struct { -} - -func (*awsEc2query_serializeOpDescribeCustomerGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeCustomerGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeCustomerGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeCustomerGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeCustomerGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeDhcpOptions struct { -} - -func (*awsEc2query_serializeOpDescribeDhcpOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeDhcpOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeDhcpOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeDhcpOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeDhcpOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeEgressOnlyInternetGateways struct { -} - -func (*awsEc2query_serializeOpDescribeEgressOnlyInternetGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeEgressOnlyInternetGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeEgressOnlyInternetGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeEgressOnlyInternetGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeEgressOnlyInternetGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeElasticGpus struct { -} - -func (*awsEc2query_serializeOpDescribeElasticGpus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeElasticGpus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeElasticGpusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeElasticGpus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeElasticGpusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeExportImageTasks struct { -} - -func (*awsEc2query_serializeOpDescribeExportImageTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeExportImageTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeExportImageTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeExportImageTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeExportImageTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeExportTasks struct { -} - -func (*awsEc2query_serializeOpDescribeExportTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeExportTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeExportTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeExportTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeExportTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFastLaunchImages struct { -} - -func (*awsEc2query_serializeOpDescribeFastLaunchImages) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFastLaunchImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFastLaunchImagesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFastLaunchImages") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFastLaunchImagesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFastSnapshotRestores struct { -} - -func (*awsEc2query_serializeOpDescribeFastSnapshotRestores) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFastSnapshotRestores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFastSnapshotRestoresInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFastSnapshotRestores") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFastSnapshotRestoresInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFleetHistory struct { -} - -func (*awsEc2query_serializeOpDescribeFleetHistory) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFleetHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFleetHistoryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFleetHistory") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFleetHistoryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFleetInstances struct { -} - -func (*awsEc2query_serializeOpDescribeFleetInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFleetInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFleetInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFleetInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFleetInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFleets struct { -} - -func (*awsEc2query_serializeOpDescribeFleets) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFleets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFleetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFleets") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFleetsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFlowLogs struct { -} - -func (*awsEc2query_serializeOpDescribeFlowLogs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFlowLogs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFlowLogsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFlowLogs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFlowLogsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFpgaImageAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeFpgaImageAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFpgaImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFpgaImageAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFpgaImageAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFpgaImageAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeFpgaImages struct { -} - -func (*awsEc2query_serializeOpDescribeFpgaImages) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeFpgaImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeFpgaImagesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeFpgaImages") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeFpgaImagesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeHostReservationOfferings struct { -} - -func (*awsEc2query_serializeOpDescribeHostReservationOfferings) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeHostReservationOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeHostReservationOfferingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeHostReservationOfferings") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeHostReservationOfferingsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeHostReservations struct { -} - -func (*awsEc2query_serializeOpDescribeHostReservations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeHostReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeHostReservationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeHostReservations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeHostReservationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeHosts struct { -} - -func (*awsEc2query_serializeOpDescribeHosts) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeHostsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeHosts") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeHostsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIamInstanceProfileAssociations struct { -} - -func (*awsEc2query_serializeOpDescribeIamInstanceProfileAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIamInstanceProfileAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIamInstanceProfileAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIamInstanceProfileAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIamInstanceProfileAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIdentityIdFormat struct { -} - -func (*awsEc2query_serializeOpDescribeIdentityIdFormat) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIdentityIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIdentityIdFormatInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIdentityIdFormat") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIdentityIdFormatInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIdFormat struct { -} - -func (*awsEc2query_serializeOpDescribeIdFormat) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIdFormatInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIdFormat") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIdFormatInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeImageAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeImageAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeImageAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeImageAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeImageAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeImages struct { -} - -func (*awsEc2query_serializeOpDescribeImages) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeImages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeImagesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeImages") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeImagesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeImportImageTasks struct { -} - -func (*awsEc2query_serializeOpDescribeImportImageTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeImportImageTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeImportImageTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeImportImageTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeImportImageTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeImportSnapshotTasks struct { -} - -func (*awsEc2query_serializeOpDescribeImportSnapshotTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeImportSnapshotTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeImportSnapshotTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeImportSnapshotTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeImportSnapshotTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceConnectEndpoints struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceConnectEndpoints) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceConnectEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceConnectEndpointsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceConnectEndpoints") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceConnectEndpointsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceCreditSpecifications struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceCreditSpecifications) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceCreditSpecifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceCreditSpecificationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceCreditSpecifications") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceCreditSpecificationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceEventNotificationAttributesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceEventNotificationAttributes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceEventNotificationAttributesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceEventWindows struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceEventWindows) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceEventWindows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceEventWindowsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceEventWindows") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceEventWindowsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstances struct { -} - -func (*awsEc2query_serializeOpDescribeInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceStatus struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceStatus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceTopology struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceTopology) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceTopology) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceTopologyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceTopology") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceTopologyInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceTypeOfferings struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceTypeOfferings) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceTypeOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceTypeOfferingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceTypeOfferings") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInstanceTypes struct { -} - -func (*awsEc2query_serializeOpDescribeInstanceTypes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInstanceTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInstanceTypesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInstanceTypes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInstanceTypesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeInternetGateways struct { -} - -func (*awsEc2query_serializeOpDescribeInternetGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeInternetGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeInternetGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeInternetGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeInternetGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpamByoasn struct { -} - -func (*awsEc2query_serializeOpDescribeIpamByoasn) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpamByoasnInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpamByoasn") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpamByoasnInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpamPools struct { -} - -func (*awsEc2query_serializeOpDescribeIpamPools) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpamPools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpamPoolsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpamPools") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpamPoolsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpamResourceDiscoveries struct { -} - -func (*awsEc2query_serializeOpDescribeIpamResourceDiscoveries) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpamResourceDiscoveries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpamResourceDiscoveriesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpamResourceDiscoveries") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveriesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpamResourceDiscoveryAssociations struct { -} - -func (*awsEc2query_serializeOpDescribeIpamResourceDiscoveryAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpamResourceDiscoveryAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpamResourceDiscoveryAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpamResourceDiscoveryAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveryAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpams struct { -} - -func (*awsEc2query_serializeOpDescribeIpams) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpams) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpamsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpams") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpamsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpamScopes struct { -} - -func (*awsEc2query_serializeOpDescribeIpamScopes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpamScopes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpamScopesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpamScopes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpamScopesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeIpv6Pools struct { -} - -func (*awsEc2query_serializeOpDescribeIpv6Pools) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeIpv6Pools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeIpv6PoolsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeIpv6Pools") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeIpv6PoolsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeKeyPairs struct { -} - -func (*awsEc2query_serializeOpDescribeKeyPairs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeKeyPairs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeKeyPairsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeKeyPairs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeKeyPairsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLaunchTemplates struct { -} - -func (*awsEc2query_serializeOpDescribeLaunchTemplates) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLaunchTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLaunchTemplatesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLaunchTemplates") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLaunchTemplatesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLaunchTemplateVersions struct { -} - -func (*awsEc2query_serializeOpDescribeLaunchTemplateVersions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLaunchTemplateVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLaunchTemplateVersionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLaunchTemplateVersions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLaunchTemplateVersionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLocalGatewayRouteTables struct { -} - -func (*awsEc2query_serializeOpDescribeLocalGatewayRouteTables) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLocalGatewayRouteTablesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLocalGatewayRouteTables") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTablesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations struct { -} - -func (*awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations struct { -} - -func (*awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLocalGatewayRouteTableVpcAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLocalGatewayRouteTableVpcAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLocalGateways struct { -} - -func (*awsEc2query_serializeOpDescribeLocalGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLocalGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLocalGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLocalGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLocalGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups struct { -} - -func (*awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLocalGatewayVirtualInterfaceGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLocalGatewayVirtualInterfaceGroups") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces struct { -} - -func (*awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLocalGatewayVirtualInterfacesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLocalGatewayVirtualInterfaces") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfacesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeLockedSnapshots struct { -} - -func (*awsEc2query_serializeOpDescribeLockedSnapshots) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeLockedSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeLockedSnapshotsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeLockedSnapshots") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeLockedSnapshotsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeManagedPrefixLists struct { -} - -func (*awsEc2query_serializeOpDescribeManagedPrefixLists) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeManagedPrefixLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeManagedPrefixListsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeManagedPrefixLists") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeManagedPrefixListsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeMovingAddresses struct { -} - -func (*awsEc2query_serializeOpDescribeMovingAddresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeMovingAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeMovingAddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeMovingAddresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeMovingAddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNatGateways struct { -} - -func (*awsEc2query_serializeOpDescribeNatGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNatGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNatGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNatGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNatGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkAcls struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkAcls) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkAcls) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkAclsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkAcls") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkAclsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInsightsAccessScopeAnalyses struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInsightsAccessScopeAnalyses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInsightsAccessScopeAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInsightsAccessScopeAnalysesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInsightsAccessScopeAnalyses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInsightsAccessScopes struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInsightsAccessScopes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInsightsAccessScopes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInsightsAccessScopesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInsightsAccessScopes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInsightsAnalyses struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInsightsAnalyses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInsightsAnalyses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInsightsAnalysesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInsightsAnalyses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsAnalysesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInsightsPaths struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInsightsPaths) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInsightsPaths) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInsightsPathsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInsightsPaths") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInsightsPathsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInterfaceAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInterfaceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInterfaceAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInterfaceAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfaceAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInterfacePermissions struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInterfacePermissions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInterfacePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInterfacePermissionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInterfacePermissions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfacePermissionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeNetworkInterfaces struct { -} - -func (*awsEc2query_serializeOpDescribeNetworkInterfaces) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeNetworkInterfaces) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeNetworkInterfacesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeNetworkInterfaces") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeNetworkInterfacesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribePlacementGroups struct { -} - -func (*awsEc2query_serializeOpDescribePlacementGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribePlacementGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribePlacementGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribePlacementGroups") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribePlacementGroupsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribePrefixLists struct { -} - -func (*awsEc2query_serializeOpDescribePrefixLists) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribePrefixLists) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribePrefixListsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribePrefixLists") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribePrefixListsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribePrincipalIdFormat struct { -} - -func (*awsEc2query_serializeOpDescribePrincipalIdFormat) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribePrincipalIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribePrincipalIdFormatInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribePrincipalIdFormat") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribePrincipalIdFormatInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribePublicIpv4Pools struct { -} - -func (*awsEc2query_serializeOpDescribePublicIpv4Pools) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribePublicIpv4Pools) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribePublicIpv4PoolsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribePublicIpv4Pools") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribePublicIpv4PoolsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeRegions struct { -} - -func (*awsEc2query_serializeOpDescribeRegions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeRegions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeRegionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeRegions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeRegionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeReplaceRootVolumeTasks struct { -} - -func (*awsEc2query_serializeOpDescribeReplaceRootVolumeTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeReplaceRootVolumeTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeReplaceRootVolumeTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeReplaceRootVolumeTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeReplaceRootVolumeTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeReservedInstances struct { -} - -func (*awsEc2query_serializeOpDescribeReservedInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeReservedInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeReservedInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeReservedInstancesListings struct { -} - -func (*awsEc2query_serializeOpDescribeReservedInstancesListings) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeReservedInstancesListings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeReservedInstancesListingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeReservedInstancesListings") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesListingsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeReservedInstancesModifications struct { -} - -func (*awsEc2query_serializeOpDescribeReservedInstancesModifications) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeReservedInstancesModifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeReservedInstancesModificationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeReservedInstancesModifications") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesModificationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeReservedInstancesOfferings struct { -} - -func (*awsEc2query_serializeOpDescribeReservedInstancesOfferings) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeReservedInstancesOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeReservedInstancesOfferingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeReservedInstancesOfferings") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeReservedInstancesOfferingsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeRouteTables struct { -} - -func (*awsEc2query_serializeOpDescribeRouteTables) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeRouteTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeRouteTablesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeRouteTables") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeRouteTablesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeScheduledInstanceAvailability struct { -} - -func (*awsEc2query_serializeOpDescribeScheduledInstanceAvailability) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeScheduledInstanceAvailability) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeScheduledInstanceAvailabilityInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeScheduledInstanceAvailability") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeScheduledInstanceAvailabilityInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeScheduledInstances struct { -} - -func (*awsEc2query_serializeOpDescribeScheduledInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeScheduledInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeScheduledInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeScheduledInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeScheduledInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSecurityGroupReferences struct { -} - -func (*awsEc2query_serializeOpDescribeSecurityGroupReferences) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSecurityGroupReferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSecurityGroupReferencesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSecurityGroupReferences") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupReferencesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSecurityGroupRules struct { -} - -func (*awsEc2query_serializeOpDescribeSecurityGroupRules) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSecurityGroupRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSecurityGroupRulesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSecurityGroupRules") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupRulesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSecurityGroups struct { -} - -func (*awsEc2query_serializeOpDescribeSecurityGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSecurityGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSecurityGroups") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSnapshotAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeSnapshotAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSnapshotAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSnapshotAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSnapshots struct { -} - -func (*awsEc2query_serializeOpDescribeSnapshots) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSnapshots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSnapshotsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSnapshots") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSnapshotsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSnapshotTierStatus struct { -} - -func (*awsEc2query_serializeOpDescribeSnapshotTierStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSnapshotTierStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSnapshotTierStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSnapshotTierStatus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSnapshotTierStatusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSpotDatafeedSubscription struct { -} - -func (*awsEc2query_serializeOpDescribeSpotDatafeedSubscription) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSpotDatafeedSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSpotDatafeedSubscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSpotDatafeedSubscription") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSpotFleetInstances struct { -} - -func (*awsEc2query_serializeOpDescribeSpotFleetInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSpotFleetInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSpotFleetInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSpotFleetInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSpotFleetInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSpotFleetRequestHistory struct { -} - -func (*awsEc2query_serializeOpDescribeSpotFleetRequestHistory) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSpotFleetRequestHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSpotFleetRequestHistoryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSpotFleetRequestHistory") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSpotFleetRequestHistoryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSpotFleetRequests struct { -} - -func (*awsEc2query_serializeOpDescribeSpotFleetRequests) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSpotFleetRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSpotFleetRequestsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSpotFleetRequests") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSpotFleetRequestsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSpotInstanceRequests struct { -} - -func (*awsEc2query_serializeOpDescribeSpotInstanceRequests) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSpotInstanceRequests) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSpotInstanceRequestsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSpotInstanceRequests") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSpotInstanceRequestsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSpotPriceHistory struct { -} - -func (*awsEc2query_serializeOpDescribeSpotPriceHistory) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSpotPriceHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSpotPriceHistoryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSpotPriceHistory") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSpotPriceHistoryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeStaleSecurityGroups struct { -} - -func (*awsEc2query_serializeOpDescribeStaleSecurityGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeStaleSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeStaleSecurityGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeStaleSecurityGroups") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeStaleSecurityGroupsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeStoreImageTasks struct { -} - -func (*awsEc2query_serializeOpDescribeStoreImageTasks) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeStoreImageTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeStoreImageTasksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeStoreImageTasks") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeStoreImageTasksInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeSubnets struct { -} - -func (*awsEc2query_serializeOpDescribeSubnets) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeSubnets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSubnetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeSubnets") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeSubnetsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTags struct { -} - -func (*awsEc2query_serializeOpDescribeTags) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTagsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTags") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTagsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTrafficMirrorFilters struct { -} - -func (*awsEc2query_serializeOpDescribeTrafficMirrorFilters) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTrafficMirrorFilters) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTrafficMirrorFiltersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTrafficMirrorFilters") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorFiltersInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTrafficMirrorSessions struct { -} - -func (*awsEc2query_serializeOpDescribeTrafficMirrorSessions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTrafficMirrorSessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTrafficMirrorSessionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTrafficMirrorSessions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorSessionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTrafficMirrorTargets struct { -} - -func (*awsEc2query_serializeOpDescribeTrafficMirrorTargets) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTrafficMirrorTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTrafficMirrorTargetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTrafficMirrorTargets") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTrafficMirrorTargetsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayAttachments struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayAttachments) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayAttachmentsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayAttachments") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayAttachmentsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayConnectPeers struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayConnectPeers) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayConnectPeers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayConnectPeersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayConnectPeers") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectPeersInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayConnects struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayConnects) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayConnects) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayConnectsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayConnects") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayMulticastDomainsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayMulticastDomains") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayMulticastDomainsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayPeeringAttachmentsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayPeeringAttachments") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayPeeringAttachmentsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayPolicyTables struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayPolicyTables) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayPolicyTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayPolicyTablesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayPolicyTables") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayPolicyTablesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayRouteTableAnnouncements struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayRouteTableAnnouncements) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayRouteTableAnnouncements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayRouteTableAnnouncementsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayRouteTableAnnouncements") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTableAnnouncementsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayRouteTables struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayRouteTables) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayRouteTables) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayRouteTablesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayRouteTables") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTablesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGateways struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments struct { -} - -func (*awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTransitGatewayVpcAttachmentsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTransitGatewayVpcAttachments") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTransitGatewayVpcAttachmentsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeTrunkInterfaceAssociations struct { -} - -func (*awsEc2query_serializeOpDescribeTrunkInterfaceAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeTrunkInterfaceAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeTrunkInterfaceAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeTrunkInterfaceAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeTrunkInterfaceAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVerifiedAccessEndpoints struct { -} - -func (*awsEc2query_serializeOpDescribeVerifiedAccessEndpoints) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVerifiedAccessEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVerifiedAccessEndpointsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVerifiedAccessEndpoints") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessEndpointsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVerifiedAccessGroups struct { -} - -func (*awsEc2query_serializeOpDescribeVerifiedAccessGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVerifiedAccessGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVerifiedAccessGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVerifiedAccessGroups") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessGroupsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVerifiedAccessInstanceLoggingConfigurations struct { -} - -func (*awsEc2query_serializeOpDescribeVerifiedAccessInstanceLoggingConfigurations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVerifiedAccessInstanceLoggingConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVerifiedAccessInstanceLoggingConfigurationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVerifiedAccessInstanceLoggingConfigurations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstanceLoggingConfigurationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVerifiedAccessInstances struct { -} - -func (*awsEc2query_serializeOpDescribeVerifiedAccessInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVerifiedAccessInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVerifiedAccessInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVerifiedAccessInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVerifiedAccessTrustProviders struct { -} - -func (*awsEc2query_serializeOpDescribeVerifiedAccessTrustProviders) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVerifiedAccessTrustProviders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVerifiedAccessTrustProvidersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVerifiedAccessTrustProviders") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVerifiedAccessTrustProvidersInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVolumeAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeVolumeAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVolumeAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVolumeAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVolumeAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVolumeAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVolumes struct { -} - -func (*awsEc2query_serializeOpDescribeVolumes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVolumes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVolumesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVolumes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVolumesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVolumesModifications struct { -} - -func (*awsEc2query_serializeOpDescribeVolumesModifications) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVolumesModifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVolumesModificationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVolumesModifications") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVolumesModificationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVolumeStatus struct { -} - -func (*awsEc2query_serializeOpDescribeVolumeStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVolumeStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVolumeStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVolumeStatus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVolumeStatusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcAttribute struct { -} - -func (*awsEc2query_serializeOpDescribeVpcAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcClassicLink struct { -} - -func (*awsEc2query_serializeOpDescribeVpcClassicLink) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcClassicLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcClassicLinkInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcClassicLink") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcClassicLinkInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport struct { -} - -func (*awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcClassicLinkDnsSupportInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcClassicLinkDnsSupport") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcClassicLinkDnsSupportInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications struct { -} - -func (*awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcEndpointConnectionNotificationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcEndpointConnectionNotifications") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionNotificationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcEndpointConnections struct { -} - -func (*awsEc2query_serializeOpDescribeVpcEndpointConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcEndpointConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcEndpointConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcEndpointConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcEndpoints struct { -} - -func (*awsEc2query_serializeOpDescribeVpcEndpoints) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcEndpoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcEndpointsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcEndpoints") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations struct { -} - -func (*awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcEndpointServiceConfigurationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcEndpointServiceConfigurations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServiceConfigurationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcEndpointServicePermissions struct { -} - -func (*awsEc2query_serializeOpDescribeVpcEndpointServicePermissions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcEndpointServicePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcEndpointServicePermissionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcEndpointServicePermissions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServicePermissionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcEndpointServices struct { -} - -func (*awsEc2query_serializeOpDescribeVpcEndpointServices) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcEndpointServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcEndpointServicesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcEndpointServices") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcEndpointServicesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcPeeringConnections struct { -} - -func (*awsEc2query_serializeOpDescribeVpcPeeringConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcPeeringConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcPeeringConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcPeeringConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcPeeringConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpcs struct { -} - -func (*awsEc2query_serializeOpDescribeVpcs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpcs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpcsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpcs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpcsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpnConnections struct { -} - -func (*awsEc2query_serializeOpDescribeVpnConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpnConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpnConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpnConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpnConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDescribeVpnGateways struct { -} - -func (*awsEc2query_serializeOpDescribeVpnGateways) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDescribeVpnGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeVpnGatewaysInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DescribeVpnGateways") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDescribeVpnGatewaysInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDetachClassicLinkVpc struct { -} - -func (*awsEc2query_serializeOpDetachClassicLinkVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDetachClassicLinkVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DetachClassicLinkVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DetachClassicLinkVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDetachClassicLinkVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDetachInternetGateway struct { -} - -func (*awsEc2query_serializeOpDetachInternetGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDetachInternetGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DetachInternetGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DetachInternetGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDetachInternetGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDetachNetworkInterface struct { -} - -func (*awsEc2query_serializeOpDetachNetworkInterface) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDetachNetworkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DetachNetworkInterfaceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DetachNetworkInterface") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDetachNetworkInterfaceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDetachVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_serializeOpDetachVerifiedAccessTrustProvider) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDetachVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DetachVerifiedAccessTrustProviderInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DetachVerifiedAccessTrustProvider") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDetachVerifiedAccessTrustProviderInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDetachVolume struct { -} - -func (*awsEc2query_serializeOpDetachVolume) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDetachVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DetachVolumeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DetachVolume") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDetachVolumeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDetachVpnGateway struct { -} - -func (*awsEc2query_serializeOpDetachVpnGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDetachVpnGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DetachVpnGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DetachVpnGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDetachVpnGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableAddressTransfer struct { -} - -func (*awsEc2query_serializeOpDisableAddressTransfer) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableAddressTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableAddressTransferInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableAddressTransfer") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableAddressTransferInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableAwsNetworkPerformanceMetricSubscription struct { -} - -func (*awsEc2query_serializeOpDisableAwsNetworkPerformanceMetricSubscription) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableAwsNetworkPerformanceMetricSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableAwsNetworkPerformanceMetricSubscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableAwsNetworkPerformanceMetricSubscription") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableAwsNetworkPerformanceMetricSubscriptionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableEbsEncryptionByDefault struct { -} - -func (*awsEc2query_serializeOpDisableEbsEncryptionByDefault) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableEbsEncryptionByDefault) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableEbsEncryptionByDefaultInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableEbsEncryptionByDefault") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableEbsEncryptionByDefaultInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableFastLaunch struct { -} - -func (*awsEc2query_serializeOpDisableFastLaunch) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableFastLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableFastLaunchInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableFastLaunch") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableFastLaunchInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableFastSnapshotRestores struct { -} - -func (*awsEc2query_serializeOpDisableFastSnapshotRestores) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableFastSnapshotRestores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableFastSnapshotRestoresInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableFastSnapshotRestores") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableImage struct { -} - -func (*awsEc2query_serializeOpDisableImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableImageBlockPublicAccess struct { -} - -func (*awsEc2query_serializeOpDisableImageBlockPublicAccess) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableImageBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableImageBlockPublicAccessInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableImageBlockPublicAccess") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableImageBlockPublicAccessInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableImageDeprecation struct { -} - -func (*awsEc2query_serializeOpDisableImageDeprecation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableImageDeprecation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableImageDeprecationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableImageDeprecation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableImageDeprecationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableIpamOrganizationAdminAccount struct { -} - -func (*awsEc2query_serializeOpDisableIpamOrganizationAdminAccount) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableIpamOrganizationAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableIpamOrganizationAdminAccountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableIpamOrganizationAdminAccount") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableIpamOrganizationAdminAccountInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableSerialConsoleAccess struct { -} - -func (*awsEc2query_serializeOpDisableSerialConsoleAccess) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableSerialConsoleAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableSerialConsoleAccessInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableSerialConsoleAccess") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableSerialConsoleAccessInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableSnapshotBlockPublicAccess struct { -} - -func (*awsEc2query_serializeOpDisableSnapshotBlockPublicAccess) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableSnapshotBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableSnapshotBlockPublicAccessInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableSnapshotBlockPublicAccess") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableSnapshotBlockPublicAccessInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation struct { -} - -func (*awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableTransitGatewayRouteTablePropagationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableTransitGatewayRouteTablePropagation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableTransitGatewayRouteTablePropagationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableVgwRoutePropagation struct { -} - -func (*awsEc2query_serializeOpDisableVgwRoutePropagation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableVgwRoutePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableVgwRoutePropagationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableVgwRoutePropagation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableVgwRoutePropagationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableVpcClassicLink struct { -} - -func (*awsEc2query_serializeOpDisableVpcClassicLink) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableVpcClassicLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableVpcClassicLinkInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableVpcClassicLink") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableVpcClassicLinkInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport struct { -} - -func (*awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableVpcClassicLinkDnsSupportInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisableVpcClassicLinkDnsSupport") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisableVpcClassicLinkDnsSupportInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateAddress struct { -} - -func (*awsEc2query_serializeOpDisassociateAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateClientVpnTargetNetwork struct { -} - -func (*awsEc2query_serializeOpDisassociateClientVpnTargetNetwork) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateClientVpnTargetNetwork) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateClientVpnTargetNetworkInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateClientVpnTargetNetwork") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateClientVpnTargetNetworkInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole struct { -} - -func (*awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateEnclaveCertificateIamRoleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateEnclaveCertificateIamRole") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateEnclaveCertificateIamRoleInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateIamInstanceProfile struct { -} - -func (*awsEc2query_serializeOpDisassociateIamInstanceProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateIamInstanceProfile) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateIamInstanceProfileInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateIamInstanceProfile") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateIamInstanceProfileInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateInstanceEventWindow struct { -} - -func (*awsEc2query_serializeOpDisassociateInstanceEventWindow) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateInstanceEventWindowInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateInstanceEventWindow") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateInstanceEventWindowInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateIpamByoasn struct { -} - -func (*awsEc2query_serializeOpDisassociateIpamByoasn) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateIpamByoasnInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateIpamByoasn") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateIpamByoasnInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateIpamResourceDiscovery struct { -} - -func (*awsEc2query_serializeOpDisassociateIpamResourceDiscovery) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateIpamResourceDiscoveryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateIpamResourceDiscovery") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateIpamResourceDiscoveryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateNatGatewayAddress struct { -} - -func (*awsEc2query_serializeOpDisassociateNatGatewayAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateNatGatewayAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateNatGatewayAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateNatGatewayAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateRouteTable struct { -} - -func (*awsEc2query_serializeOpDisassociateRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateSubnetCidrBlock struct { -} - -func (*awsEc2query_serializeOpDisassociateSubnetCidrBlock) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateSubnetCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateSubnetCidrBlockInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateSubnetCidrBlock") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain struct { -} - -func (*awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateTransitGatewayMulticastDomainInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateTransitGatewayMulticastDomain") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayMulticastDomainInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateTransitGatewayPolicyTable struct { -} - -func (*awsEc2query_serializeOpDisassociateTransitGatewayPolicyTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateTransitGatewayPolicyTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateTransitGatewayPolicyTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateTransitGatewayPolicyTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayPolicyTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateTransitGatewayRouteTable struct { -} - -func (*awsEc2query_serializeOpDisassociateTransitGatewayRouteTable) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateTransitGatewayRouteTable) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateTransitGatewayRouteTableInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateTransitGatewayRouteTable") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateTransitGatewayRouteTableInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateTrunkInterface struct { -} - -func (*awsEc2query_serializeOpDisassociateTrunkInterface) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateTrunkInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateTrunkInterfaceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateTrunkInterface") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateTrunkInterfaceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpDisassociateVpcCidrBlock struct { -} - -func (*awsEc2query_serializeOpDisassociateVpcCidrBlock) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpDisassociateVpcCidrBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateVpcCidrBlockInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DisassociateVpcCidrBlock") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentDisassociateVpcCidrBlockInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableAddressTransfer struct { -} - -func (*awsEc2query_serializeOpEnableAddressTransfer) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableAddressTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableAddressTransferInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableAddressTransfer") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableAddressTransferInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableAwsNetworkPerformanceMetricSubscription struct { -} - -func (*awsEc2query_serializeOpEnableAwsNetworkPerformanceMetricSubscription) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableAwsNetworkPerformanceMetricSubscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableAwsNetworkPerformanceMetricSubscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableAwsNetworkPerformanceMetricSubscription") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableEbsEncryptionByDefault struct { -} - -func (*awsEc2query_serializeOpEnableEbsEncryptionByDefault) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableEbsEncryptionByDefault) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableEbsEncryptionByDefaultInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableEbsEncryptionByDefault") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableEbsEncryptionByDefaultInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableFastLaunch struct { -} - -func (*awsEc2query_serializeOpEnableFastLaunch) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableFastLaunch) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableFastLaunchInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableFastLaunch") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableFastLaunchInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableFastSnapshotRestores struct { -} - -func (*awsEc2query_serializeOpEnableFastSnapshotRestores) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableFastSnapshotRestores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableFastSnapshotRestoresInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableFastSnapshotRestores") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableImage struct { -} - -func (*awsEc2query_serializeOpEnableImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableImageBlockPublicAccess struct { -} - -func (*awsEc2query_serializeOpEnableImageBlockPublicAccess) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableImageBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableImageBlockPublicAccessInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableImageBlockPublicAccess") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableImageBlockPublicAccessInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableImageDeprecation struct { -} - -func (*awsEc2query_serializeOpEnableImageDeprecation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableImageDeprecation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableImageDeprecationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableImageDeprecation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableImageDeprecationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableIpamOrganizationAdminAccount struct { -} - -func (*awsEc2query_serializeOpEnableIpamOrganizationAdminAccount) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableIpamOrganizationAdminAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableIpamOrganizationAdminAccountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableIpamOrganizationAdminAccount") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableIpamOrganizationAdminAccountInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableReachabilityAnalyzerOrganizationSharing struct { -} - -func (*awsEc2query_serializeOpEnableReachabilityAnalyzerOrganizationSharing) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableReachabilityAnalyzerOrganizationSharing) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableReachabilityAnalyzerOrganizationSharingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableReachabilityAnalyzerOrganizationSharing") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableSerialConsoleAccess struct { -} - -func (*awsEc2query_serializeOpEnableSerialConsoleAccess) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableSerialConsoleAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableSerialConsoleAccessInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableSerialConsoleAccess") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableSerialConsoleAccessInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableSnapshotBlockPublicAccess struct { -} - -func (*awsEc2query_serializeOpEnableSnapshotBlockPublicAccess) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableSnapshotBlockPublicAccess) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableSnapshotBlockPublicAccessInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableSnapshotBlockPublicAccess") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableSnapshotBlockPublicAccessInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation struct { -} - -func (*awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableTransitGatewayRouteTablePropagationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableTransitGatewayRouteTablePropagation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableTransitGatewayRouteTablePropagationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableVgwRoutePropagation struct { -} - -func (*awsEc2query_serializeOpEnableVgwRoutePropagation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableVgwRoutePropagation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableVgwRoutePropagationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableVgwRoutePropagation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableVgwRoutePropagationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableVolumeIO struct { -} - -func (*awsEc2query_serializeOpEnableVolumeIO) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableVolumeIO) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableVolumeIOInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableVolumeIO") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableVolumeIOInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableVpcClassicLink struct { -} - -func (*awsEc2query_serializeOpEnableVpcClassicLink) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableVpcClassicLink) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableVpcClassicLinkInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableVpcClassicLink") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableVpcClassicLinkInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport struct { -} - -func (*awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableVpcClassicLinkDnsSupportInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("EnableVpcClassicLinkDnsSupport") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentEnableVpcClassicLinkDnsSupportInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList struct { -} - -func (*awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ExportClientVpnClientCertificateRevocationListInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ExportClientVpnClientCertificateRevocationList") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentExportClientVpnClientCertificateRevocationListInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpExportClientVpnClientConfiguration struct { -} - -func (*awsEc2query_serializeOpExportClientVpnClientConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpExportClientVpnClientConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ExportClientVpnClientConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ExportClientVpnClientConfiguration") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentExportClientVpnClientConfigurationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpExportImage struct { -} - -func (*awsEc2query_serializeOpExportImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpExportImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ExportImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ExportImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentExportImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpExportTransitGatewayRoutes struct { -} - -func (*awsEc2query_serializeOpExportTransitGatewayRoutes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpExportTransitGatewayRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ExportTransitGatewayRoutesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ExportTransitGatewayRoutes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentExportTransitGatewayRoutesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles struct { -} - -func (*awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAssociatedEnclaveCertificateIamRolesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetAssociatedEnclaveCertificateIamRoles") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetAssociatedEnclaveCertificateIamRolesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs struct { -} - -func (*awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAssociatedIpv6PoolCidrsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetAssociatedIpv6PoolCidrs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetAssociatedIpv6PoolCidrsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetAwsNetworkPerformanceData struct { -} - -func (*awsEc2query_serializeOpGetAwsNetworkPerformanceData) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetAwsNetworkPerformanceData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAwsNetworkPerformanceDataInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetAwsNetworkPerformanceData") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetAwsNetworkPerformanceDataInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetCapacityReservationUsage struct { -} - -func (*awsEc2query_serializeOpGetCapacityReservationUsage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetCapacityReservationUsage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetCapacityReservationUsageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetCapacityReservationUsage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetCapacityReservationUsageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetCoipPoolUsage struct { -} - -func (*awsEc2query_serializeOpGetCoipPoolUsage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetCoipPoolUsage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetCoipPoolUsageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetCoipPoolUsage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetCoipPoolUsageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetConsoleOutput struct { -} - -func (*awsEc2query_serializeOpGetConsoleOutput) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetConsoleOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetConsoleOutputInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetConsoleOutput") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetConsoleOutputInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetConsoleScreenshot struct { -} - -func (*awsEc2query_serializeOpGetConsoleScreenshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetConsoleScreenshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetConsoleScreenshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetConsoleScreenshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetConsoleScreenshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetDefaultCreditSpecification struct { -} - -func (*awsEc2query_serializeOpGetDefaultCreditSpecification) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetDefaultCreditSpecification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetDefaultCreditSpecificationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetDefaultCreditSpecification") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetDefaultCreditSpecificationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetEbsDefaultKmsKeyId struct { -} - -func (*awsEc2query_serializeOpGetEbsDefaultKmsKeyId) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetEbsDefaultKmsKeyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetEbsDefaultKmsKeyIdInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetEbsDefaultKmsKeyId") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetEbsDefaultKmsKeyIdInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetEbsEncryptionByDefault struct { -} - -func (*awsEc2query_serializeOpGetEbsEncryptionByDefault) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetEbsEncryptionByDefault) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetEbsEncryptionByDefaultInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetEbsEncryptionByDefault") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetEbsEncryptionByDefaultInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetFlowLogsIntegrationTemplate struct { -} - -func (*awsEc2query_serializeOpGetFlowLogsIntegrationTemplate) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetFlowLogsIntegrationTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetFlowLogsIntegrationTemplateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetFlowLogsIntegrationTemplate") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetFlowLogsIntegrationTemplateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetGroupsForCapacityReservation struct { -} - -func (*awsEc2query_serializeOpGetGroupsForCapacityReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetGroupsForCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetGroupsForCapacityReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetGroupsForCapacityReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetGroupsForCapacityReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetHostReservationPurchasePreview struct { -} - -func (*awsEc2query_serializeOpGetHostReservationPurchasePreview) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetHostReservationPurchasePreview) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHostReservationPurchasePreviewInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetHostReservationPurchasePreview") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetImageBlockPublicAccessState struct { -} - -func (*awsEc2query_serializeOpGetImageBlockPublicAccessState) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetImageBlockPublicAccessState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetImageBlockPublicAccessStateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetImageBlockPublicAccessState") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetImageBlockPublicAccessStateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements struct { -} - -func (*awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetInstanceTypesFromInstanceRequirementsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetInstanceTypesFromInstanceRequirements") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetInstanceTypesFromInstanceRequirementsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetInstanceUefiData struct { -} - -func (*awsEc2query_serializeOpGetInstanceUefiData) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetInstanceUefiData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetInstanceUefiDataInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetInstanceUefiData") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetInstanceUefiDataInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamAddressHistory struct { -} - -func (*awsEc2query_serializeOpGetIpamAddressHistory) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamAddressHistory) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamAddressHistoryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamAddressHistory") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamAddressHistoryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamDiscoveredAccounts struct { -} - -func (*awsEc2query_serializeOpGetIpamDiscoveredAccounts) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamDiscoveredAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamDiscoveredAccountsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamDiscoveredAccounts") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamDiscoveredAccountsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamDiscoveredPublicAddresses struct { -} - -func (*awsEc2query_serializeOpGetIpamDiscoveredPublicAddresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamDiscoveredPublicAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamDiscoveredPublicAddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamDiscoveredPublicAddresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamDiscoveredPublicAddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamDiscoveredResourceCidrs struct { -} - -func (*awsEc2query_serializeOpGetIpamDiscoveredResourceCidrs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamDiscoveredResourceCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamDiscoveredResourceCidrsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamDiscoveredResourceCidrs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamDiscoveredResourceCidrsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamPoolAllocations struct { -} - -func (*awsEc2query_serializeOpGetIpamPoolAllocations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamPoolAllocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamPoolAllocationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamPoolAllocations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamPoolAllocationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamPoolCidrs struct { -} - -func (*awsEc2query_serializeOpGetIpamPoolCidrs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamPoolCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamPoolCidrsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamPoolCidrs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamPoolCidrsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetIpamResourceCidrs struct { -} - -func (*awsEc2query_serializeOpGetIpamResourceCidrs) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetIpamResourceCidrs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetIpamResourceCidrsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetIpamResourceCidrs") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetIpamResourceCidrsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetLaunchTemplateData struct { -} - -func (*awsEc2query_serializeOpGetLaunchTemplateData) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetLaunchTemplateData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetLaunchTemplateDataInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetLaunchTemplateData") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetLaunchTemplateDataInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetManagedPrefixListAssociations struct { -} - -func (*awsEc2query_serializeOpGetManagedPrefixListAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetManagedPrefixListAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetManagedPrefixListAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetManagedPrefixListAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetManagedPrefixListAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetManagedPrefixListEntries struct { -} - -func (*awsEc2query_serializeOpGetManagedPrefixListEntries) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetManagedPrefixListEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetManagedPrefixListEntriesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetManagedPrefixListEntries") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetManagedPrefixListEntriesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetNetworkInsightsAccessScopeAnalysisFindings struct { -} - -func (*awsEc2query_serializeOpGetNetworkInsightsAccessScopeAnalysisFindings) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetNetworkInsightsAccessScopeAnalysisFindings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetNetworkInsightsAccessScopeAnalysisFindingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetNetworkInsightsAccessScopeAnalysisFindings") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetNetworkInsightsAccessScopeContent struct { -} - -func (*awsEc2query_serializeOpGetNetworkInsightsAccessScopeContent) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetNetworkInsightsAccessScopeContent) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetNetworkInsightsAccessScopeContentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetNetworkInsightsAccessScopeContent") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeContentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetPasswordData struct { -} - -func (*awsEc2query_serializeOpGetPasswordData) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetPasswordData) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetPasswordDataInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetPasswordData") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetPasswordDataInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetReservedInstancesExchangeQuote struct { -} - -func (*awsEc2query_serializeOpGetReservedInstancesExchangeQuote) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetReservedInstancesExchangeQuote) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetReservedInstancesExchangeQuoteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetReservedInstancesExchangeQuote") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetSecurityGroupsForVpc struct { -} - -func (*awsEc2query_serializeOpGetSecurityGroupsForVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetSecurityGroupsForVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSecurityGroupsForVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetSecurityGroupsForVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetSecurityGroupsForVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetSerialConsoleAccessStatus struct { -} - -func (*awsEc2query_serializeOpGetSerialConsoleAccessStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetSerialConsoleAccessStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSerialConsoleAccessStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetSerialConsoleAccessStatus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetSnapshotBlockPublicAccessState struct { -} - -func (*awsEc2query_serializeOpGetSnapshotBlockPublicAccessState) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetSnapshotBlockPublicAccessState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSnapshotBlockPublicAccessStateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetSnapshotBlockPublicAccessState") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetSnapshotBlockPublicAccessStateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetSpotPlacementScores struct { -} - -func (*awsEc2query_serializeOpGetSpotPlacementScores) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetSpotPlacementScores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSpotPlacementScoresInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetSpotPlacementScores") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetSpotPlacementScoresInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetSubnetCidrReservations struct { -} - -func (*awsEc2query_serializeOpGetSubnetCidrReservations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetSubnetCidrReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSubnetCidrReservationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetSubnetCidrReservations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetSubnetCidrReservationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayAttachmentPropagationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayAttachmentPropagations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayAttachmentPropagationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayMulticastDomainAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayMulticastDomainAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayMulticastDomainAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayPolicyTableAssociations struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayPolicyTableAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayPolicyTableAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayPolicyTableAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayPolicyTableAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayPolicyTableEntries struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayPolicyTableEntries) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayPolicyTableEntries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayPolicyTableEntriesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayPolicyTableEntries") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableEntriesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayPrefixListReferences struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayPrefixListReferences) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayPrefixListReferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayPrefixListReferencesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayPrefixListReferences") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayPrefixListReferencesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayRouteTableAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayRouteTableAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayRouteTableAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations struct { -} - -func (*awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTransitGatewayRouteTablePropagationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetTransitGatewayRouteTablePropagations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetTransitGatewayRouteTablePropagationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetVerifiedAccessEndpointPolicy struct { -} - -func (*awsEc2query_serializeOpGetVerifiedAccessEndpointPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetVerifiedAccessEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVerifiedAccessEndpointPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetVerifiedAccessEndpointPolicy") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetVerifiedAccessEndpointPolicyInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetVerifiedAccessGroupPolicy struct { -} - -func (*awsEc2query_serializeOpGetVerifiedAccessGroupPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetVerifiedAccessGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVerifiedAccessGroupPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetVerifiedAccessGroupPolicy") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetVerifiedAccessGroupPolicyInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration struct { -} - -func (*awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVpnConnectionDeviceSampleConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetVpnConnectionDeviceSampleConfiguration") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetVpnConnectionDeviceTypes struct { -} - -func (*awsEc2query_serializeOpGetVpnConnectionDeviceTypes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetVpnConnectionDeviceTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVpnConnectionDeviceTypesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetVpnConnectionDeviceTypes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetVpnConnectionDeviceTypesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpGetVpnTunnelReplacementStatus struct { -} - -func (*awsEc2query_serializeOpGetVpnTunnelReplacementStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpGetVpnTunnelReplacementStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVpnTunnelReplacementStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetVpnTunnelReplacementStatus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentGetVpnTunnelReplacementStatusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList struct { -} - -func (*awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ImportClientVpnClientCertificateRevocationListInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ImportClientVpnClientCertificateRevocationList") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentImportClientVpnClientCertificateRevocationListInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpImportImage struct { -} - -func (*awsEc2query_serializeOpImportImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpImportImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ImportImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ImportImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentImportImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpImportInstance struct { -} - -func (*awsEc2query_serializeOpImportInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpImportInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ImportInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ImportInstance") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentImportInstanceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpImportKeyPair struct { -} - -func (*awsEc2query_serializeOpImportKeyPair) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpImportKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ImportKeyPairInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ImportKeyPair") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentImportKeyPairInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpImportSnapshot struct { -} - -func (*awsEc2query_serializeOpImportSnapshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpImportSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ImportSnapshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ImportSnapshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentImportSnapshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpImportVolume struct { -} - -func (*awsEc2query_serializeOpImportVolume) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpImportVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ImportVolumeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ImportVolume") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentImportVolumeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpListImagesInRecycleBin struct { -} - -func (*awsEc2query_serializeOpListImagesInRecycleBin) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpListImagesInRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListImagesInRecycleBinInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ListImagesInRecycleBin") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentListImagesInRecycleBinInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpListSnapshotsInRecycleBin struct { -} - -func (*awsEc2query_serializeOpListSnapshotsInRecycleBin) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpListSnapshotsInRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListSnapshotsInRecycleBinInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ListSnapshotsInRecycleBin") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentListSnapshotsInRecycleBinInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpLockSnapshot struct { -} - -func (*awsEc2query_serializeOpLockSnapshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpLockSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*LockSnapshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("LockSnapshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentLockSnapshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyAddressAttribute struct { -} - -func (*awsEc2query_serializeOpModifyAddressAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyAddressAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyAddressAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyAddressAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyAddressAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyAvailabilityZoneGroup struct { -} - -func (*awsEc2query_serializeOpModifyAvailabilityZoneGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyAvailabilityZoneGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyAvailabilityZoneGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyAvailabilityZoneGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyAvailabilityZoneGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyCapacityReservation struct { -} - -func (*awsEc2query_serializeOpModifyCapacityReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyCapacityReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyCapacityReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyCapacityReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyCapacityReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyCapacityReservationFleet struct { -} - -func (*awsEc2query_serializeOpModifyCapacityReservationFleet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyCapacityReservationFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyCapacityReservationFleetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyCapacityReservationFleet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyCapacityReservationFleetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyClientVpnEndpoint struct { -} - -func (*awsEc2query_serializeOpModifyClientVpnEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyClientVpnEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyClientVpnEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyClientVpnEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyClientVpnEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyDefaultCreditSpecification struct { -} - -func (*awsEc2query_serializeOpModifyDefaultCreditSpecification) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyDefaultCreditSpecification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyDefaultCreditSpecificationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyDefaultCreditSpecification") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyDefaultCreditSpecificationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyEbsDefaultKmsKeyId struct { -} - -func (*awsEc2query_serializeOpModifyEbsDefaultKmsKeyId) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyEbsDefaultKmsKeyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyEbsDefaultKmsKeyIdInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyEbsDefaultKmsKeyId") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyEbsDefaultKmsKeyIdInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyFleet struct { -} - -func (*awsEc2query_serializeOpModifyFleet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyFleetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyFleet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyFleetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyFpgaImageAttribute struct { -} - -func (*awsEc2query_serializeOpModifyFpgaImageAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyFpgaImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyFpgaImageAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyFpgaImageAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyFpgaImageAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyHosts struct { -} - -func (*awsEc2query_serializeOpModifyHosts) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyHostsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyHosts") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyHostsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIdentityIdFormat struct { -} - -func (*awsEc2query_serializeOpModifyIdentityIdFormat) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIdentityIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIdentityIdFormatInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIdentityIdFormat") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIdentityIdFormatInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIdFormat struct { -} - -func (*awsEc2query_serializeOpModifyIdFormat) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIdFormat) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIdFormatInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIdFormat") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIdFormatInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyImageAttribute struct { -} - -func (*awsEc2query_serializeOpModifyImageAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyImageAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyImageAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyImageAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceAttribute struct { -} - -func (*awsEc2query_serializeOpModifyInstanceAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes struct { -} - -func (*awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceCapacityReservationAttributesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceCapacityReservationAttributes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceCreditSpecification struct { -} - -func (*awsEc2query_serializeOpModifyInstanceCreditSpecification) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceCreditSpecification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceCreditSpecificationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceCreditSpecification") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceEventStartTime struct { -} - -func (*awsEc2query_serializeOpModifyInstanceEventStartTime) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceEventStartTime) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceEventStartTimeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceEventStartTime") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceEventStartTimeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceEventWindow struct { -} - -func (*awsEc2query_serializeOpModifyInstanceEventWindow) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceEventWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceEventWindowInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceEventWindow") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceEventWindowInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceMaintenanceOptions struct { -} - -func (*awsEc2query_serializeOpModifyInstanceMaintenanceOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceMaintenanceOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceMaintenanceOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceMaintenanceOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceMaintenanceOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstanceMetadataOptions struct { -} - -func (*awsEc2query_serializeOpModifyInstanceMetadataOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstanceMetadataOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstanceMetadataOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstanceMetadataOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstanceMetadataOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyInstancePlacement struct { -} - -func (*awsEc2query_serializeOpModifyInstancePlacement) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyInstancePlacement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyInstancePlacementInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyInstancePlacement") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyInstancePlacementInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIpam struct { -} - -func (*awsEc2query_serializeOpModifyIpam) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIpamInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIpam") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIpamInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIpamPool struct { -} - -func (*awsEc2query_serializeOpModifyIpamPool) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIpamPool) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIpamPoolInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIpamPool") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIpamPoolInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIpamResourceCidr struct { -} - -func (*awsEc2query_serializeOpModifyIpamResourceCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIpamResourceCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIpamResourceCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIpamResourceCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIpamResourceCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIpamResourceDiscovery struct { -} - -func (*awsEc2query_serializeOpModifyIpamResourceDiscovery) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIpamResourceDiscovery) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIpamResourceDiscoveryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIpamResourceDiscovery") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIpamResourceDiscoveryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyIpamScope struct { -} - -func (*awsEc2query_serializeOpModifyIpamScope) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyIpamScope) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyIpamScopeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyIpamScope") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyIpamScopeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyLaunchTemplate struct { -} - -func (*awsEc2query_serializeOpModifyLaunchTemplate) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyLaunchTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyLaunchTemplateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyLaunchTemplate") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyLaunchTemplateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyLocalGatewayRoute struct { -} - -func (*awsEc2query_serializeOpModifyLocalGatewayRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyLocalGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyLocalGatewayRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyLocalGatewayRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyLocalGatewayRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyManagedPrefixList struct { -} - -func (*awsEc2query_serializeOpModifyManagedPrefixList) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyManagedPrefixList) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyManagedPrefixListInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyManagedPrefixList") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyManagedPrefixListInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_serializeOpModifyNetworkInterfaceAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyNetworkInterfaceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyNetworkInterfaceAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyNetworkInterfaceAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyPrivateDnsNameOptions struct { -} - -func (*awsEc2query_serializeOpModifyPrivateDnsNameOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyPrivateDnsNameOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyPrivateDnsNameOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyPrivateDnsNameOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyPrivateDnsNameOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyReservedInstances struct { -} - -func (*awsEc2query_serializeOpModifyReservedInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyReservedInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyReservedInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyReservedInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifySecurityGroupRules struct { -} - -func (*awsEc2query_serializeOpModifySecurityGroupRules) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifySecurityGroupRulesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifySecurityGroupRules") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifySnapshotAttribute struct { -} - -func (*awsEc2query_serializeOpModifySnapshotAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifySnapshotAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifySnapshotAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifySnapshotTier struct { -} - -func (*awsEc2query_serializeOpModifySnapshotTier) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifySnapshotTier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifySnapshotTierInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifySnapshotTier") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifySnapshotTierInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifySpotFleetRequest struct { -} - -func (*awsEc2query_serializeOpModifySpotFleetRequest) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifySpotFleetRequestInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifySpotFleetRequest") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifySubnetAttribute struct { -} - -func (*awsEc2query_serializeOpModifySubnetAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifySubnetAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifySubnetAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifySubnetAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices struct { -} - -func (*awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyTrafficMirrorFilterNetworkServicesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyTrafficMirrorFilterNetworkServices") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyTrafficMirrorFilterRule struct { -} - -func (*awsEc2query_serializeOpModifyTrafficMirrorFilterRule) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyTrafficMirrorFilterRuleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyTrafficMirrorFilterRule") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyTrafficMirrorSession struct { -} - -func (*awsEc2query_serializeOpModifyTrafficMirrorSession) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyTrafficMirrorSessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyTrafficMirrorSession") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyTransitGateway struct { -} - -func (*awsEc2query_serializeOpModifyTransitGateway) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyTransitGatewayInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyTransitGateway") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyTransitGatewayInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyTransitGatewayPrefixListReference struct { -} - -func (*awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyTransitGatewayPrefixListReferenceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyTransitGatewayPrefixListReference") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyTransitGatewayVpcAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyTransitGatewayVpcAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessEndpoint struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessEndpointPolicy struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessEndpointPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessEndpointPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessEndpointPolicy") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointPolicyInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessGroup struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessGroup") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessGroupPolicy struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessGroupPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessGroupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessGroupPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessGroupPolicy") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupPolicyInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessInstance struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessInstance") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessInstanceLoggingConfiguration struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessInstanceLoggingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessInstanceLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceLoggingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessInstanceLoggingConfiguration") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVerifiedAccessTrustProvider struct { -} - -func (*awsEc2query_serializeOpModifyVerifiedAccessTrustProvider) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVerifiedAccessTrustProvider) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVerifiedAccessTrustProviderInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVerifiedAccessTrustProvider") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVerifiedAccessTrustProviderInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVolume struct { -} - -func (*awsEc2query_serializeOpModifyVolume) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVolumeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVolume") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVolumeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVolumeAttribute struct { -} - -func (*awsEc2query_serializeOpModifyVolumeAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVolumeAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVolumeAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcAttribute struct { -} - -func (*awsEc2query_serializeOpModifyVpcAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcEndpoint struct { -} - -func (*awsEc2query_serializeOpModifyVpcEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcEndpoint") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcEndpointInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcEndpointConnectionNotification struct { -} - -func (*awsEc2query_serializeOpModifyVpcEndpointConnectionNotification) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcEndpointConnectionNotification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcEndpointConnectionNotificationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcEndpointConnectionNotification") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcEndpointConnectionNotificationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration struct { -} - -func (*awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcEndpointServiceConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcEndpointServiceConfiguration") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServiceConfigurationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcEndpointServicePayerResponsibility struct { -} - -func (*awsEc2query_serializeOpModifyVpcEndpointServicePayerResponsibility) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcEndpointServicePayerResponsibility) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcEndpointServicePayerResponsibilityInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcEndpointServicePayerResponsibility") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServicePayerResponsibilityInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcEndpointServicePermissions struct { -} - -func (*awsEc2query_serializeOpModifyVpcEndpointServicePermissions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcEndpointServicePermissions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcEndpointServicePermissionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcEndpointServicePermissions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcEndpointServicePermissionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcPeeringConnectionOptions struct { -} - -func (*awsEc2query_serializeOpModifyVpcPeeringConnectionOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcPeeringConnectionOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcPeeringConnectionOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcPeeringConnectionOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcPeeringConnectionOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpcTenancy struct { -} - -func (*awsEc2query_serializeOpModifyVpcTenancy) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpcTenancy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpcTenancyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpcTenancy") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpcTenancyInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpnConnection struct { -} - -func (*awsEc2query_serializeOpModifyVpnConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpnConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpnConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpnConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpnConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpnConnectionOptions struct { -} - -func (*awsEc2query_serializeOpModifyVpnConnectionOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpnConnectionOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpnConnectionOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpnConnectionOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpnConnectionOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpnTunnelCertificate struct { -} - -func (*awsEc2query_serializeOpModifyVpnTunnelCertificate) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpnTunnelCertificate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpnTunnelCertificateInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpnTunnelCertificate") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpnTunnelCertificateInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpModifyVpnTunnelOptions struct { -} - -func (*awsEc2query_serializeOpModifyVpnTunnelOptions) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpModifyVpnTunnelOptions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ModifyVpnTunnelOptionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ModifyVpnTunnelOptions") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpMonitorInstances struct { -} - -func (*awsEc2query_serializeOpMonitorInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpMonitorInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*MonitorInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("MonitorInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentMonitorInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpMoveAddressToVpc struct { -} - -func (*awsEc2query_serializeOpMoveAddressToVpc) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpMoveAddressToVpc) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*MoveAddressToVpcInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("MoveAddressToVpc") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentMoveAddressToVpcInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpMoveByoipCidrToIpam struct { -} - -func (*awsEc2query_serializeOpMoveByoipCidrToIpam) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpMoveByoipCidrToIpam) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*MoveByoipCidrToIpamInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("MoveByoipCidrToIpam") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentMoveByoipCidrToIpamInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpProvisionByoipCidr struct { -} - -func (*awsEc2query_serializeOpProvisionByoipCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpProvisionByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ProvisionByoipCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ProvisionByoipCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentProvisionByoipCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpProvisionIpamByoasn struct { -} - -func (*awsEc2query_serializeOpProvisionIpamByoasn) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpProvisionIpamByoasn) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ProvisionIpamByoasnInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ProvisionIpamByoasn") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentProvisionIpamByoasnInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpProvisionIpamPoolCidr struct { -} - -func (*awsEc2query_serializeOpProvisionIpamPoolCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpProvisionIpamPoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ProvisionIpamPoolCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ProvisionIpamPoolCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentProvisionIpamPoolCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpProvisionPublicIpv4PoolCidr struct { -} - -func (*awsEc2query_serializeOpProvisionPublicIpv4PoolCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpProvisionPublicIpv4PoolCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ProvisionPublicIpv4PoolCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ProvisionPublicIpv4PoolCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentProvisionPublicIpv4PoolCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpPurchaseCapacityBlock struct { -} - -func (*awsEc2query_serializeOpPurchaseCapacityBlock) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpPurchaseCapacityBlock) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PurchaseCapacityBlockInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("PurchaseCapacityBlock") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentPurchaseCapacityBlockInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpPurchaseHostReservation struct { -} - -func (*awsEc2query_serializeOpPurchaseHostReservation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpPurchaseHostReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PurchaseHostReservationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("PurchaseHostReservation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentPurchaseHostReservationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpPurchaseReservedInstancesOffering struct { -} - -func (*awsEc2query_serializeOpPurchaseReservedInstancesOffering) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpPurchaseReservedInstancesOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PurchaseReservedInstancesOfferingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("PurchaseReservedInstancesOffering") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentPurchaseReservedInstancesOfferingInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpPurchaseScheduledInstances struct { -} - -func (*awsEc2query_serializeOpPurchaseScheduledInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpPurchaseScheduledInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PurchaseScheduledInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("PurchaseScheduledInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentPurchaseScheduledInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRebootInstances struct { -} - -func (*awsEc2query_serializeOpRebootInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRebootInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RebootInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RebootInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRebootInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRegisterImage struct { -} - -func (*awsEc2query_serializeOpRegisterImage) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRegisterImage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RegisterImageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RegisterImage") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRegisterImageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes struct { -} - -func (*awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RegisterInstanceEventNotificationAttributesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RegisterInstanceEventNotificationAttributes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRegisterInstanceEventNotificationAttributesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers struct { -} - -func (*awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RegisterTransitGatewayMulticastGroupMembersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RegisterTransitGatewayMulticastGroupMembers") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupMembersInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources struct { -} - -func (*awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RegisterTransitGatewayMulticastGroupSourcesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RegisterTransitGatewayMulticastGroupSources") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations struct { -} - -func (*awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RejectTransitGatewayMulticastDomainAssociationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RejectTransitGatewayMulticastDomainAssociations") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment struct { -} - -func (*awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RejectTransitGatewayPeeringAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RejectTransitGatewayPeeringAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRejectTransitGatewayPeeringAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRejectTransitGatewayVpcAttachment struct { -} - -func (*awsEc2query_serializeOpRejectTransitGatewayVpcAttachment) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRejectTransitGatewayVpcAttachment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RejectTransitGatewayVpcAttachmentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RejectTransitGatewayVpcAttachment") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRejectTransitGatewayVpcAttachmentInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRejectVpcEndpointConnections struct { -} - -func (*awsEc2query_serializeOpRejectVpcEndpointConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRejectVpcEndpointConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RejectVpcEndpointConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RejectVpcEndpointConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRejectVpcEndpointConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRejectVpcPeeringConnection struct { -} - -func (*awsEc2query_serializeOpRejectVpcPeeringConnection) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRejectVpcPeeringConnection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RejectVpcPeeringConnectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RejectVpcPeeringConnection") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRejectVpcPeeringConnectionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReleaseAddress struct { -} - -func (*awsEc2query_serializeOpReleaseAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReleaseAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReleaseAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReleaseAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReleaseAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReleaseHosts struct { -} - -func (*awsEc2query_serializeOpReleaseHosts) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReleaseHosts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReleaseHostsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReleaseHosts") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReleaseHostsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReleaseIpamPoolAllocation struct { -} - -func (*awsEc2query_serializeOpReleaseIpamPoolAllocation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReleaseIpamPoolAllocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReleaseIpamPoolAllocationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReleaseIpamPoolAllocation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReleaseIpamPoolAllocationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceIamInstanceProfileAssociation struct { -} - -func (*awsEc2query_serializeOpReplaceIamInstanceProfileAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceIamInstanceProfileAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceIamInstanceProfileAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceIamInstanceProfileAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceIamInstanceProfileAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceNetworkAclAssociation struct { -} - -func (*awsEc2query_serializeOpReplaceNetworkAclAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceNetworkAclAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceNetworkAclAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceNetworkAclAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceNetworkAclAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceNetworkAclEntry struct { -} - -func (*awsEc2query_serializeOpReplaceNetworkAclEntry) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceNetworkAclEntry) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceNetworkAclEntryInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceNetworkAclEntry") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceNetworkAclEntryInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceRoute struct { -} - -func (*awsEc2query_serializeOpReplaceRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceRouteTableAssociation struct { -} - -func (*awsEc2query_serializeOpReplaceRouteTableAssociation) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceRouteTableAssociation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceRouteTableAssociationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceRouteTableAssociation") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceRouteTableAssociationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceTransitGatewayRoute struct { -} - -func (*awsEc2query_serializeOpReplaceTransitGatewayRoute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceTransitGatewayRoute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceTransitGatewayRouteInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceTransitGatewayRoute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceTransitGatewayRouteInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReplaceVpnTunnel struct { -} - -func (*awsEc2query_serializeOpReplaceVpnTunnel) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReplaceVpnTunnel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplaceVpnTunnelInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReplaceVpnTunnel") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReplaceVpnTunnelInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpReportInstanceStatus struct { -} - -func (*awsEc2query_serializeOpReportInstanceStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpReportInstanceStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReportInstanceStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ReportInstanceStatus") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentReportInstanceStatusInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRequestSpotFleet struct { -} - -func (*awsEc2query_serializeOpRequestSpotFleet) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRequestSpotFleet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RequestSpotFleetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RequestSpotFleet") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRequestSpotFleetInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRequestSpotInstances struct { -} - -func (*awsEc2query_serializeOpRequestSpotInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRequestSpotInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RequestSpotInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RequestSpotInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRequestSpotInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetAddressAttribute struct { -} - -func (*awsEc2query_serializeOpResetAddressAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetAddressAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetAddressAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetAddressAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetAddressAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetEbsDefaultKmsKeyId struct { -} - -func (*awsEc2query_serializeOpResetEbsDefaultKmsKeyId) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetEbsDefaultKmsKeyId) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetEbsDefaultKmsKeyIdInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetEbsDefaultKmsKeyId") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetEbsDefaultKmsKeyIdInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetFpgaImageAttribute struct { -} - -func (*awsEc2query_serializeOpResetFpgaImageAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetFpgaImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetFpgaImageAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetFpgaImageAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetFpgaImageAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetImageAttribute struct { -} - -func (*awsEc2query_serializeOpResetImageAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetImageAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetImageAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetImageAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetImageAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetInstanceAttribute struct { -} - -func (*awsEc2query_serializeOpResetInstanceAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetInstanceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetInstanceAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetInstanceAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetInstanceAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetNetworkInterfaceAttribute struct { -} - -func (*awsEc2query_serializeOpResetNetworkInterfaceAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetNetworkInterfaceAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetNetworkInterfaceAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetNetworkInterfaceAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetNetworkInterfaceAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpResetSnapshotAttribute struct { -} - -func (*awsEc2query_serializeOpResetSnapshotAttribute) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpResetSnapshotAttribute) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetSnapshotAttributeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("ResetSnapshotAttribute") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentResetSnapshotAttributeInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRestoreAddressToClassic struct { -} - -func (*awsEc2query_serializeOpRestoreAddressToClassic) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRestoreAddressToClassic) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestoreAddressToClassicInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RestoreAddressToClassic") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRestoreAddressToClassicInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRestoreImageFromRecycleBin struct { -} - -func (*awsEc2query_serializeOpRestoreImageFromRecycleBin) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRestoreImageFromRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestoreImageFromRecycleBinInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RestoreImageFromRecycleBin") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRestoreImageFromRecycleBinInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRestoreManagedPrefixListVersion struct { -} - -func (*awsEc2query_serializeOpRestoreManagedPrefixListVersion) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRestoreManagedPrefixListVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestoreManagedPrefixListVersionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RestoreManagedPrefixListVersion") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRestoreSnapshotFromRecycleBin struct { -} - -func (*awsEc2query_serializeOpRestoreSnapshotFromRecycleBin) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRestoreSnapshotFromRecycleBin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestoreSnapshotFromRecycleBinInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RestoreSnapshotFromRecycleBin") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRestoreSnapshotFromRecycleBinInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRestoreSnapshotTier struct { -} - -func (*awsEc2query_serializeOpRestoreSnapshotTier) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRestoreSnapshotTier) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestoreSnapshotTierInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RestoreSnapshotTier") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRestoreSnapshotTierInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRevokeClientVpnIngress struct { -} - -func (*awsEc2query_serializeOpRevokeClientVpnIngress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRevokeClientVpnIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RevokeClientVpnIngressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RevokeClientVpnIngress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRevokeSecurityGroupEgress struct { -} - -func (*awsEc2query_serializeOpRevokeSecurityGroupEgress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRevokeSecurityGroupEgress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RevokeSecurityGroupEgressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RevokeSecurityGroupEgress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRevokeSecurityGroupEgressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRevokeSecurityGroupIngress struct { -} - -func (*awsEc2query_serializeOpRevokeSecurityGroupIngress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRevokeSecurityGroupIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RevokeSecurityGroupIngressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RevokeSecurityGroupIngress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRevokeSecurityGroupIngressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRunInstances struct { -} - -func (*awsEc2query_serializeOpRunInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRunInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RunInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RunInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRunInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpRunScheduledInstances struct { -} - -func (*awsEc2query_serializeOpRunScheduledInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpRunScheduledInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RunScheduledInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("RunScheduledInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentRunScheduledInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpSearchLocalGatewayRoutes struct { -} - -func (*awsEc2query_serializeOpSearchLocalGatewayRoutes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpSearchLocalGatewayRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*SearchLocalGatewayRoutesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("SearchLocalGatewayRoutes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentSearchLocalGatewayRoutesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpSearchTransitGatewayMulticastGroups struct { -} - -func (*awsEc2query_serializeOpSearchTransitGatewayMulticastGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpSearchTransitGatewayMulticastGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*SearchTransitGatewayMulticastGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("SearchTransitGatewayMulticastGroups") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentSearchTransitGatewayMulticastGroupsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpSearchTransitGatewayRoutes struct { -} - -func (*awsEc2query_serializeOpSearchTransitGatewayRoutes) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpSearchTransitGatewayRoutes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*SearchTransitGatewayRoutesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("SearchTransitGatewayRoutes") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentSearchTransitGatewayRoutesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpSendDiagnosticInterrupt struct { -} - -func (*awsEc2query_serializeOpSendDiagnosticInterrupt) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpSendDiagnosticInterrupt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*SendDiagnosticInterruptInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("SendDiagnosticInterrupt") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentSendDiagnosticInterruptInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpStartInstances struct { -} - -func (*awsEc2query_serializeOpStartInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpStartInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StartInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("StartInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentStartInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpStartNetworkInsightsAccessScopeAnalysis struct { -} - -func (*awsEc2query_serializeOpStartNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpStartNetworkInsightsAccessScopeAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StartNetworkInsightsAccessScopeAnalysisInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("StartNetworkInsightsAccessScopeAnalysis") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentStartNetworkInsightsAccessScopeAnalysisInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpStartNetworkInsightsAnalysis struct { -} - -func (*awsEc2query_serializeOpStartNetworkInsightsAnalysis) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpStartNetworkInsightsAnalysis) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StartNetworkInsightsAnalysisInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("StartNetworkInsightsAnalysis") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentStartNetworkInsightsAnalysisInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification struct { -} - -func (*awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StartVpcEndpointServicePrivateDnsVerificationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("StartVpcEndpointServicePrivateDnsVerification") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpStopInstances struct { -} - -func (*awsEc2query_serializeOpStopInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpStopInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StopInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("StopInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentStopInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpTerminateClientVpnConnections struct { -} - -func (*awsEc2query_serializeOpTerminateClientVpnConnections) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpTerminateClientVpnConnections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TerminateClientVpnConnectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("TerminateClientVpnConnections") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentTerminateClientVpnConnectionsInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpTerminateInstances struct { -} - -func (*awsEc2query_serializeOpTerminateInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpTerminateInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TerminateInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("TerminateInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentTerminateInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUnassignIpv6Addresses struct { -} - -func (*awsEc2query_serializeOpUnassignIpv6Addresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUnassignIpv6Addresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UnassignIpv6AddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UnassignIpv6Addresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUnassignIpv6AddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUnassignPrivateIpAddresses struct { -} - -func (*awsEc2query_serializeOpUnassignPrivateIpAddresses) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUnassignPrivateIpAddresses) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UnassignPrivateIpAddressesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UnassignPrivateIpAddresses") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUnassignPrivateIpAddressesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUnassignPrivateNatGatewayAddress struct { -} - -func (*awsEc2query_serializeOpUnassignPrivateNatGatewayAddress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUnassignPrivateNatGatewayAddress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UnassignPrivateNatGatewayAddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UnassignPrivateNatGatewayAddress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUnassignPrivateNatGatewayAddressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUnlockSnapshot struct { -} - -func (*awsEc2query_serializeOpUnlockSnapshot) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUnlockSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UnlockSnapshotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UnlockSnapshot") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUnlockSnapshotInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUnmonitorInstances struct { -} - -func (*awsEc2query_serializeOpUnmonitorInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUnmonitorInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UnmonitorInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UnmonitorInstances") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUnmonitorInstancesInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress struct { -} - -func (*awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSecurityGroupRuleDescriptionsEgressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UpdateSecurityGroupRuleDescriptionsEgress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress struct { -} - -func (*awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSecurityGroupRuleDescriptionsIngressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("UpdateSecurityGroupRuleDescriptionsIngress") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsEc2query_serializeOpWithdrawByoipCidr struct { -} - -func (*awsEc2query_serializeOpWithdrawByoipCidr) ID() string { - return "OperationSerializer" -} - -func (m *awsEc2query_serializeOpWithdrawByoipCidr) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*WithdrawByoipCidrInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("WithdrawByoipCidr") - body.Key("Version").String("2016-11-15") - - if err := awsEc2query_serializeOpDocumentWithdrawByoipCidrInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} -func awsEc2query_serializeDocumentAcceleratorCount(v *types.AcceleratorCount, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentAcceleratorCountRequest(v *types.AcceleratorCountRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentAcceleratorManufacturerSet(v []types.AcceleratorManufacturer, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentAcceleratorNameSet(v []types.AcceleratorName, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentAcceleratorTotalMemoryMiB(v *types.AcceleratorTotalMemoryMiB, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentAcceleratorTotalMemoryMiBRequest(v *types.AcceleratorTotalMemoryMiBRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentAcceleratorTypeSet(v []types.AcceleratorType, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentAccessScopePathListRequest(v []types.AccessScopePathRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentAccessScopePathRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentAccessScopePathRequest(v *types.AccessScopePathRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Destination != nil { - objectKey := object.Key("Destination") - if err := awsEc2query_serializeDocumentPathStatementRequest(v.Destination, objectKey); err != nil { - return err - } - } - - if v.Source != nil { - objectKey := object.Key("Source") - if err := awsEc2query_serializeDocumentPathStatementRequest(v.Source, objectKey); err != nil { - return err - } - } - - if v.ThroughResources != nil { - objectKey := object.FlatKey("ThroughResource") - if err := awsEc2query_serializeDocumentThroughResourcesStatementRequestList(v.ThroughResources, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentAccountAttributeNameStringList(v []types.AccountAttributeName, value query.Value) error { - array := value.Array("AttributeName") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentAddIpamOperatingRegion(v *types.AddIpamOperatingRegion, value query.Value) error { - object := value.Object() - _ = object - - if v.RegionName != nil { - objectKey := object.Key("RegionName") - objectKey.String(*v.RegionName) - } - - return nil -} - -func awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v []types.AddIpamOperatingRegion, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentAddIpamOperatingRegion(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentAddPrefixListEntries(v []types.AddPrefixListEntry, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentAddPrefixListEntry(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentAddPrefixListEntry(v *types.AddPrefixListEntry, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - return nil -} - -func awsEc2query_serializeDocumentAllocationIdList(v []string, value query.Value) error { - array := value.Array("AllocationId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentAllocationIds(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentAllowedInstanceTypeSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentArchitectureTypeSet(v []types.ArchitectureType, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentArnList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentAsnAuthorizationContext(v *types.AsnAuthorizationContext, value query.Value) error { - object := value.Object() - _ = object - - if v.Message != nil { - objectKey := object.Key("Message") - objectKey.String(*v.Message) - } - - if v.Signature != nil { - objectKey := object.Key("Signature") - objectKey.String(*v.Signature) - } - - return nil -} - -func awsEc2query_serializeDocumentAssetIdList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentAssociationIdList(v []string, value query.Value) error { - array := value.Array("AssociationId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentAthenaIntegration(v *types.AthenaIntegration, value query.Value) error { - object := value.Object() - _ = object - - if v.IntegrationResultS3DestinationArn != nil { - objectKey := object.Key("IntegrationResultS3DestinationArn") - objectKey.String(*v.IntegrationResultS3DestinationArn) - } - - if v.PartitionEndDate != nil { - objectKey := object.Key("PartitionEndDate") - objectKey.String(smithytime.FormatDateTime(*v.PartitionEndDate)) - } - - if len(v.PartitionLoadFrequency) > 0 { - objectKey := object.Key("PartitionLoadFrequency") - objectKey.String(string(v.PartitionLoadFrequency)) - } - - if v.PartitionStartDate != nil { - objectKey := object.Key("PartitionStartDate") - objectKey.String(smithytime.FormatDateTime(*v.PartitionStartDate)) - } - - return nil -} - -func awsEc2query_serializeDocumentAthenaIntegrationsSet(v []types.AthenaIntegration, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentAthenaIntegration(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentAttributeBooleanValue(v *types.AttributeBooleanValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.Boolean(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentAttributeValue(v *types.AttributeValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentAvailabilityZoneStringList(v []string, value query.Value) error { - array := value.Array("AvailabilityZone") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentBaselineEbsBandwidthMbps(v *types.BaselineEbsBandwidthMbps, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentBaselineEbsBandwidthMbpsRequest(v *types.BaselineEbsBandwidthMbpsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentBillingProductList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentBlobAttributeValue(v *types.BlobAttributeValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.Base64EncodeBytes(v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentBlockDeviceMapping(v *types.BlockDeviceMapping, value query.Value) error { - object := value.Object() - _ = object - - if v.DeviceName != nil { - objectKey := object.Key("DeviceName") - objectKey.String(*v.DeviceName) - } - - if v.Ebs != nil { - objectKey := object.Key("Ebs") - if err := awsEc2query_serializeDocumentEbsBlockDevice(v.Ebs, objectKey); err != nil { - return err - } - } - - if v.NoDevice != nil { - objectKey := object.Key("NoDevice") - objectKey.String(*v.NoDevice) - } - - if v.VirtualName != nil { - objectKey := object.Key("VirtualName") - objectKey.String(*v.VirtualName) - } - - return nil -} - -func awsEc2query_serializeDocumentBlockDeviceMappingList(v []types.BlockDeviceMapping, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentBlockDeviceMapping(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v []types.BlockDeviceMapping, value query.Value) error { - array := value.Array("BlockDeviceMapping") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentBlockDeviceMapping(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentBundleIdStringList(v []string, value query.Value) error { - array := value.Array("BundleId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCapacityReservationFleetIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCapacityReservationIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCapacityReservationOptionsRequest(v *types.CapacityReservationOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.UsageStrategy) > 0 { - objectKey := object.Key("UsageStrategy") - objectKey.String(string(v.UsageStrategy)) - } - - return nil -} - -func awsEc2query_serializeDocumentCapacityReservationSpecification(v *types.CapacityReservationSpecification, value query.Value) error { - object := value.Object() - _ = object - - if len(v.CapacityReservationPreference) > 0 { - objectKey := object.Key("CapacityReservationPreference") - objectKey.String(string(v.CapacityReservationPreference)) - } - - if v.CapacityReservationTarget != nil { - objectKey := object.Key("CapacityReservationTarget") - if err := awsEc2query_serializeDocumentCapacityReservationTarget(v.CapacityReservationTarget, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentCapacityReservationTarget(v *types.CapacityReservationTarget, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationId != nil { - objectKey := object.Key("CapacityReservationId") - objectKey.String(*v.CapacityReservationId) - } - - if v.CapacityReservationResourceGroupArn != nil { - objectKey := object.Key("CapacityReservationResourceGroupArn") - objectKey.String(*v.CapacityReservationResourceGroupArn) - } - - return nil -} - -func awsEc2query_serializeDocumentCarrierGatewayIdSet(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCertificateAuthenticationRequest(v *types.CertificateAuthenticationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientRootCertificateChainArn != nil { - objectKey := object.Key("ClientRootCertificateChainArn") - objectKey.String(*v.ClientRootCertificateChainArn) - } - - return nil -} - -func awsEc2query_serializeDocumentCidrAuthorizationContext(v *types.CidrAuthorizationContext, value query.Value) error { - object := value.Object() - _ = object - - if v.Message != nil { - objectKey := object.Key("Message") - objectKey.String(*v.Message) - } - - if v.Signature != nil { - objectKey := object.Key("Signature") - objectKey.String(*v.Signature) - } - - return nil -} - -func awsEc2query_serializeDocumentClassicLoadBalancer(v *types.ClassicLoadBalancer, value query.Value) error { - object := value.Object() - _ = object - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - return nil -} - -func awsEc2query_serializeDocumentClassicLoadBalancers(v []types.ClassicLoadBalancer, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentClassicLoadBalancer(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentClassicLoadBalancersConfig(v *types.ClassicLoadBalancersConfig, value query.Value) error { - object := value.Object() - _ = object - - if v.ClassicLoadBalancers != nil { - objectKey := object.FlatKey("ClassicLoadBalancers") - if err := awsEc2query_serializeDocumentClassicLoadBalancers(v.ClassicLoadBalancers, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentClientConnectOptions(v *types.ClientConnectOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - if v.LambdaFunctionArn != nil { - objectKey := object.Key("LambdaFunctionArn") - objectKey.String(*v.LambdaFunctionArn) - } - - return nil -} - -func awsEc2query_serializeDocumentClientData(v *types.ClientData, value query.Value) error { - object := value.Object() - _ = object - - if v.Comment != nil { - objectKey := object.Key("Comment") - objectKey.String(*v.Comment) - } - - if v.UploadEnd != nil { - objectKey := object.Key("UploadEnd") - objectKey.String(smithytime.FormatDateTime(*v.UploadEnd)) - } - - if v.UploadSize != nil { - objectKey := object.Key("UploadSize") - switch { - case math.IsNaN(*v.UploadSize): - objectKey.String("NaN") - - case math.IsInf(*v.UploadSize, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.UploadSize, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.UploadSize) - - } - } - - if v.UploadStart != nil { - objectKey := object.Key("UploadStart") - objectKey.String(smithytime.FormatDateTime(*v.UploadStart)) - } - - return nil -} - -func awsEc2query_serializeDocumentClientLoginBannerOptions(v *types.ClientLoginBannerOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.BannerText != nil { - objectKey := object.Key("BannerText") - objectKey.String(*v.BannerText) - } - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentClientVpnAuthenticationRequest(v *types.ClientVpnAuthenticationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.ActiveDirectory != nil { - objectKey := object.Key("ActiveDirectory") - if err := awsEc2query_serializeDocumentDirectoryServiceAuthenticationRequest(v.ActiveDirectory, objectKey); err != nil { - return err - } - } - - if v.FederatedAuthentication != nil { - objectKey := object.Key("FederatedAuthentication") - if err := awsEc2query_serializeDocumentFederatedAuthenticationRequest(v.FederatedAuthentication, objectKey); err != nil { - return err - } - } - - if v.MutualAuthentication != nil { - objectKey := object.Key("MutualAuthentication") - if err := awsEc2query_serializeDocumentCertificateAuthenticationRequest(v.MutualAuthentication, objectKey); err != nil { - return err - } - } - - if len(v.Type) > 0 { - objectKey := object.Key("Type") - objectKey.String(string(v.Type)) - } - - return nil -} - -func awsEc2query_serializeDocumentClientVpnAuthenticationRequestList(v []types.ClientVpnAuthenticationRequest, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentClientVpnAuthenticationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentClientVpnEndpointIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCloudWatchLogOptionsSpecification(v *types.CloudWatchLogOptionsSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.LogEnabled != nil { - objectKey := object.Key("LogEnabled") - objectKey.Boolean(*v.LogEnabled) - } - - if v.LogGroupArn != nil { - objectKey := object.Key("LogGroupArn") - objectKey.String(*v.LogGroupArn) - } - - if v.LogOutputFormat != nil { - objectKey := object.Key("LogOutputFormat") - objectKey.String(*v.LogOutputFormat) - } - - return nil -} - -func awsEc2query_serializeDocumentCoipPoolIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentConnectionLogOptions(v *types.ConnectionLogOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.CloudwatchLogGroup != nil { - objectKey := object.Key("CloudwatchLogGroup") - objectKey.String(*v.CloudwatchLogGroup) - } - - if v.CloudwatchLogStream != nil { - objectKey := object.Key("CloudwatchLogStream") - objectKey.String(*v.CloudwatchLogStream) - } - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentConnectionNotificationIdsList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v *types.ConnectionTrackingSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.TcpEstablishedTimeout != nil { - objectKey := object.Key("TcpEstablishedTimeout") - objectKey.Integer(*v.TcpEstablishedTimeout) - } - - if v.UdpStreamTimeout != nil { - objectKey := object.Key("UdpStreamTimeout") - objectKey.Integer(*v.UdpStreamTimeout) - } - - if v.UdpTimeout != nil { - objectKey := object.Key("UdpTimeout") - objectKey.Integer(*v.UdpTimeout) - } - - return nil -} - -func awsEc2query_serializeDocumentConversionIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCpuManufacturerSet(v []types.CpuManufacturer, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentCpuOptionsRequest(v *types.CpuOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AmdSevSnp) > 0 { - objectKey := object.Key("AmdSevSnp") - objectKey.String(string(v.AmdSevSnp)) - } - - if v.CoreCount != nil { - objectKey := object.Key("CoreCount") - objectKey.Integer(*v.CoreCount) - } - - if v.ThreadsPerCore != nil { - objectKey := object.Key("ThreadsPerCore") - objectKey.Integer(*v.ThreadsPerCore) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateTransitGatewayConnectRequestOptions(v *types.CreateTransitGatewayConnectRequestOptions, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Protocol) > 0 { - objectKey := object.Key("Protocol") - objectKey.String(string(v.Protocol)) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateTransitGatewayMulticastDomainRequestOptions(v *types.CreateTransitGatewayMulticastDomainRequestOptions, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AutoAcceptSharedAssociations) > 0 { - objectKey := object.Key("AutoAcceptSharedAssociations") - objectKey.String(string(v.AutoAcceptSharedAssociations)) - } - - if len(v.Igmpv2Support) > 0 { - objectKey := object.Key("Igmpv2Support") - objectKey.String(string(v.Igmpv2Support)) - } - - if len(v.StaticSourcesSupport) > 0 { - objectKey := object.Key("StaticSourcesSupport") - objectKey.String(string(v.StaticSourcesSupport)) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateTransitGatewayPeeringAttachmentRequestOptions(v *types.CreateTransitGatewayPeeringAttachmentRequestOptions, value query.Value) error { - object := value.Object() - _ = object - - if len(v.DynamicRouting) > 0 { - objectKey := object.Key("DynamicRouting") - objectKey.String(string(v.DynamicRouting)) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateTransitGatewayVpcAttachmentRequestOptions(v *types.CreateTransitGatewayVpcAttachmentRequestOptions, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ApplianceModeSupport) > 0 { - objectKey := object.Key("ApplianceModeSupport") - objectKey.String(string(v.ApplianceModeSupport)) - } - - if len(v.DnsSupport) > 0 { - objectKey := object.Key("DnsSupport") - objectKey.String(string(v.DnsSupport)) - } - - if len(v.Ipv6Support) > 0 { - objectKey := object.Key("Ipv6Support") - objectKey.String(string(v.Ipv6Support)) - } - - if len(v.SecurityGroupReferencingSupport) > 0 { - objectKey := object.Key("SecurityGroupReferencingSupport") - objectKey.String(string(v.SecurityGroupReferencingSupport)) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateVerifiedAccessEndpointEniOptions(v *types.CreateVerifiedAccessEndpointEniOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.Port != nil { - objectKey := object.Key("Port") - objectKey.Integer(*v.Port) - } - - if len(v.Protocol) > 0 { - objectKey := object.Key("Protocol") - objectKey.String(string(v.Protocol)) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateVerifiedAccessEndpointLoadBalancerOptions(v *types.CreateVerifiedAccessEndpointLoadBalancerOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.LoadBalancerArn != nil { - objectKey := object.Key("LoadBalancerArn") - objectKey.String(*v.LoadBalancerArn) - } - - if v.Port != nil { - objectKey := object.Key("Port") - objectKey.Integer(*v.Port) - } - - if len(v.Protocol) > 0 { - objectKey := object.Key("Protocol") - objectKey.String(string(v.Protocol)) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetId") - if err := awsEc2query_serializeDocumentCreateVerifiedAccessEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentCreateVerifiedAccessEndpointSubnetIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentCreateVerifiedAccessTrustProviderDeviceOptions(v *types.CreateVerifiedAccessTrustProviderDeviceOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.PublicSigningKeyUrl != nil { - objectKey := object.Key("PublicSigningKeyUrl") - objectKey.String(*v.PublicSigningKeyUrl) - } - - if v.TenantId != nil { - objectKey := object.Key("TenantId") - objectKey.String(*v.TenantId) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateVerifiedAccessTrustProviderOidcOptions(v *types.CreateVerifiedAccessTrustProviderOidcOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.AuthorizationEndpoint != nil { - objectKey := object.Key("AuthorizationEndpoint") - objectKey.String(*v.AuthorizationEndpoint) - } - - if v.ClientId != nil { - objectKey := object.Key("ClientId") - objectKey.String(*v.ClientId) - } - - if v.ClientSecret != nil { - objectKey := object.Key("ClientSecret") - objectKey.String(*v.ClientSecret) - } - - if v.Issuer != nil { - objectKey := object.Key("Issuer") - objectKey.String(*v.Issuer) - } - - if v.Scope != nil { - objectKey := object.Key("Scope") - objectKey.String(*v.Scope) - } - - if v.TokenEndpoint != nil { - objectKey := object.Key("TokenEndpoint") - objectKey.String(*v.TokenEndpoint) - } - - if v.UserInfoEndpoint != nil { - objectKey := object.Key("UserInfoEndpoint") - objectKey.String(*v.UserInfoEndpoint) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateVolumePermission(v *types.CreateVolumePermission, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Group) > 0 { - objectKey := object.Key("Group") - objectKey.String(string(v.Group)) - } - - if v.UserId != nil { - objectKey := object.Key("UserId") - objectKey.String(*v.UserId) - } - - return nil -} - -func awsEc2query_serializeDocumentCreateVolumePermissionList(v []types.CreateVolumePermission, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentCreateVolumePermission(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentCreateVolumePermissionModifications(v *types.CreateVolumePermissionModifications, value query.Value) error { - object := value.Object() - _ = object - - if v.Add != nil { - objectKey := object.FlatKey("Add") - if err := awsEc2query_serializeDocumentCreateVolumePermissionList(v.Add, objectKey); err != nil { - return err - } - } - - if v.Remove != nil { - objectKey := object.FlatKey("Remove") - if err := awsEc2query_serializeDocumentCreateVolumePermissionList(v.Remove, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentCreditSpecificationRequest(v *types.CreditSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.CpuCredits != nil { - objectKey := object.Key("CpuCredits") - objectKey.String(*v.CpuCredits) - } - - return nil -} - -func awsEc2query_serializeDocumentCustomerGatewayIdStringList(v []string, value query.Value) error { - array := value.Array("CustomerGatewayId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentDataQueries(v []types.DataQuery, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentDataQuery(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentDataQuery(v *types.DataQuery, value query.Value) error { - object := value.Object() - _ = object - - if v.Destination != nil { - objectKey := object.Key("Destination") - objectKey.String(*v.Destination) - } - - if v.Id != nil { - objectKey := object.Key("Id") - objectKey.String(*v.Id) - } - - if len(v.Metric) > 0 { - objectKey := object.Key("Metric") - objectKey.String(string(v.Metric)) - } - - if len(v.Period) > 0 { - objectKey := object.Key("Period") - objectKey.String(string(v.Period)) - } - - if v.Source != nil { - objectKey := object.Key("Source") - objectKey.String(*v.Source) - } - - if len(v.Statistic) > 0 { - objectKey := object.Key("Statistic") - objectKey.String(string(v.Statistic)) - } - - return nil -} - -func awsEc2query_serializeDocumentDedicatedHostIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentDeleteQueuedReservedInstancesIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v *types.DeregisterInstanceTagAttributeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.IncludeAllTagsOfInstance != nil { - objectKey := object.Key("IncludeAllTagsOfInstance") - objectKey.Boolean(*v.IncludeAllTagsOfInstance) - } - - if v.InstanceTagKeys != nil { - objectKey := object.FlatKey("InstanceTagKey") - if err := awsEc2query_serializeDocumentInstanceTagKeySet(v.InstanceTagKeys, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentDescribeInstanceTopologyGroupNameSet(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentDescribeInstanceTopologyInstanceIdSet(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentDestinationOptionsRequest(v *types.DestinationOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.FileFormat) > 0 { - objectKey := object.Key("FileFormat") - objectKey.String(string(v.FileFormat)) - } - - if v.HiveCompatiblePartitions != nil { - objectKey := object.Key("HiveCompatiblePartitions") - objectKey.Boolean(*v.HiveCompatiblePartitions) - } - - if v.PerHourPartition != nil { - objectKey := object.Key("PerHourPartition") - objectKey.Boolean(*v.PerHourPartition) - } - - return nil -} - -func awsEc2query_serializeDocumentDhcpOptionsIdStringList(v []string, value query.Value) error { - array := value.Array("DhcpOptionsId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentDirectoryServiceAuthenticationRequest(v *types.DirectoryServiceAuthenticationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.DirectoryId != nil { - objectKey := object.Key("DirectoryId") - objectKey.String(*v.DirectoryId) - } - - return nil -} - -func awsEc2query_serializeDocumentDiskImage(v *types.DiskImage, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.Image != nil { - objectKey := object.Key("Image") - if err := awsEc2query_serializeDocumentDiskImageDetail(v.Image, objectKey); err != nil { - return err - } - } - - if v.Volume != nil { - objectKey := object.Key("Volume") - if err := awsEc2query_serializeDocumentVolumeDetail(v.Volume, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentDiskImageDetail(v *types.DiskImageDetail, value query.Value) error { - object := value.Object() - _ = object - - if v.Bytes != nil { - objectKey := object.Key("Bytes") - objectKey.Long(*v.Bytes) - } - - if len(v.Format) > 0 { - objectKey := object.Key("Format") - objectKey.String(string(v.Format)) - } - - if v.ImportManifestUrl != nil { - objectKey := object.Key("ImportManifestUrl") - objectKey.String(*v.ImportManifestUrl) - } - - return nil -} - -func awsEc2query_serializeDocumentDiskImageList(v []types.DiskImage, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentDiskImage(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentDnsOptionsSpecification(v *types.DnsOptionsSpecification, value query.Value) error { - object := value.Object() - _ = object - - if len(v.DnsRecordIpType) > 0 { - objectKey := object.Key("DnsRecordIpType") - objectKey.String(string(v.DnsRecordIpType)) - } - - if v.PrivateDnsOnlyForInboundResolverEndpoint != nil { - objectKey := object.Key("PrivateDnsOnlyForInboundResolverEndpoint") - objectKey.Boolean(*v.PrivateDnsOnlyForInboundResolverEndpoint) - } - - return nil -} - -func awsEc2query_serializeDocumentDnsServersOptionsModifyStructure(v *types.DnsServersOptionsModifyStructure, value query.Value) error { - object := value.Object() - _ = object - - if v.CustomDnsServers != nil { - objectKey := object.FlatKey("CustomDnsServers") - if err := awsEc2query_serializeDocumentValueStringList(v.CustomDnsServers, objectKey); err != nil { - return err - } - } - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentEbsBlockDevice(v *types.EbsBlockDevice, value query.Value) error { - object := value.Object() - _ = object - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.Iops != nil { - objectKey := object.Key("Iops") - objectKey.Integer(*v.Iops) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.Throughput != nil { - objectKey := object.Key("Throughput") - objectKey.Integer(*v.Throughput) - } - - if v.VolumeSize != nil { - objectKey := object.Key("VolumeSize") - objectKey.Integer(*v.VolumeSize) - } - - if len(v.VolumeType) > 0 { - objectKey := object.Key("VolumeType") - objectKey.String(string(v.VolumeType)) - } - - return nil -} - -func awsEc2query_serializeDocumentEbsInstanceBlockDeviceSpecification(v *types.EbsInstanceBlockDeviceSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeDocumentEgressOnlyInternetGatewayIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentEipAssociationIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentElasticGpuIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentElasticGpuSpecification(v *types.ElasticGpuSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.Type != nil { - objectKey := object.Key("Type") - objectKey.String(*v.Type) - } - - return nil -} - -func awsEc2query_serializeDocumentElasticGpuSpecificationList(v []types.ElasticGpuSpecification, value query.Value) error { - array := value.Array("ElasticGpuSpecification") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentElasticGpuSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentElasticGpuSpecifications(v []types.ElasticGpuSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentElasticGpuSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentElasticInferenceAccelerator(v *types.ElasticInferenceAccelerator, value query.Value) error { - object := value.Object() - _ = object - - if v.Count != nil { - objectKey := object.Key("Count") - objectKey.Integer(*v.Count) - } - - if v.Type != nil { - objectKey := object.Key("Type") - objectKey.String(*v.Type) - } - - return nil -} - -func awsEc2query_serializeDocumentElasticInferenceAccelerators(v []types.ElasticInferenceAccelerator, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentElasticInferenceAccelerator(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentEnaSrdSpecification(v *types.EnaSrdSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.EnaSrdEnabled != nil { - objectKey := object.Key("EnaSrdEnabled") - objectKey.Boolean(*v.EnaSrdEnabled) - } - - if v.EnaSrdUdpSpecification != nil { - objectKey := object.Key("EnaSrdUdpSpecification") - if err := awsEc2query_serializeDocumentEnaSrdUdpSpecification(v.EnaSrdUdpSpecification, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentEnaSrdSpecificationRequest(v *types.EnaSrdSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EnaSrdEnabled != nil { - objectKey := object.Key("EnaSrdEnabled") - objectKey.Boolean(*v.EnaSrdEnabled) - } - - if v.EnaSrdUdpSpecification != nil { - objectKey := object.Key("EnaSrdUdpSpecification") - if err := awsEc2query_serializeDocumentEnaSrdUdpSpecificationRequest(v.EnaSrdUdpSpecification, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentEnaSrdUdpSpecification(v *types.EnaSrdUdpSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.EnaSrdUdpEnabled != nil { - objectKey := object.Key("EnaSrdUdpEnabled") - objectKey.Boolean(*v.EnaSrdUdpEnabled) - } - - return nil -} - -func awsEc2query_serializeDocumentEnaSrdUdpSpecificationRequest(v *types.EnaSrdUdpSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EnaSrdUdpEnabled != nil { - objectKey := object.Key("EnaSrdUdpEnabled") - objectKey.Boolean(*v.EnaSrdUdpEnabled) - } - - return nil -} - -func awsEc2query_serializeDocumentEnclaveOptionsRequest(v *types.EnclaveOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentExcludedInstanceTypeSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentExecutableByStringList(v []string, value query.Value) error { - array := value.Array("ExecutableBy") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentExportImageTaskIdList(v []string, value query.Value) error { - array := value.Array("ExportImageTaskId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentExportTaskIdStringList(v []string, value query.Value) error { - array := value.Array("ExportTaskId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentExportTaskS3LocationRequest(v *types.ExportTaskS3LocationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.S3Bucket != nil { - objectKey := object.Key("S3Bucket") - objectKey.String(*v.S3Bucket) - } - - if v.S3Prefix != nil { - objectKey := object.Key("S3Prefix") - objectKey.String(*v.S3Prefix) - } - - return nil -} - -func awsEc2query_serializeDocumentExportToS3TaskSpecification(v *types.ExportToS3TaskSpecification, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ContainerFormat) > 0 { - objectKey := object.Key("ContainerFormat") - objectKey.String(string(v.ContainerFormat)) - } - - if len(v.DiskImageFormat) > 0 { - objectKey := object.Key("DiskImageFormat") - objectKey.String(string(v.DiskImageFormat)) - } - - if v.S3Bucket != nil { - objectKey := object.Key("S3Bucket") - objectKey.String(*v.S3Bucket) - } - - if v.S3Prefix != nil { - objectKey := object.Key("S3Prefix") - objectKey.String(*v.S3Prefix) - } - - return nil -} - -func awsEc2query_serializeDocumentFastLaunchImageIdList(v []string, value query.Value) error { - array := value.Array("ImageId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentFastLaunchLaunchTemplateSpecificationRequest(v *types.FastLaunchLaunchTemplateSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.Version != nil { - objectKey := object.Key("Version") - objectKey.String(*v.Version) - } - - return nil -} - -func awsEc2query_serializeDocumentFastLaunchSnapshotConfigurationRequest(v *types.FastLaunchSnapshotConfigurationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.TargetResourceCount != nil { - objectKey := object.Key("TargetResourceCount") - objectKey.Integer(*v.TargetResourceCount) - } - - return nil -} - -func awsEc2query_serializeDocumentFederatedAuthenticationRequest(v *types.FederatedAuthenticationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.SAMLProviderArn != nil { - objectKey := object.Key("SAMLProviderArn") - objectKey.String(*v.SAMLProviderArn) - } - - if v.SelfServiceSAMLProviderArn != nil { - objectKey := object.Key("SelfServiceSAMLProviderArn") - objectKey.String(*v.SelfServiceSAMLProviderArn) - } - - return nil -} - -func awsEc2query_serializeDocumentFilter(v *types.Filter, value query.Value) error { - object := value.Object() - _ = object - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.Values != nil { - objectKey := object.FlatKey("Value") - if err := awsEc2query_serializeDocumentValueStringList(v.Values, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentFilterList(v []types.Filter, value query.Value) error { - array := value.Array("Filter") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentFilter(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentFleetIdSet(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v []types.FleetLaunchTemplateConfigRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentFleetLaunchTemplateConfigRequest(v *types.FleetLaunchTemplateConfigRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.LaunchTemplateSpecification != nil { - objectKey := object.Key("LaunchTemplateSpecification") - if err := awsEc2query_serializeDocumentFleetLaunchTemplateSpecificationRequest(v.LaunchTemplateSpecification, objectKey); err != nil { - return err - } - } - - if v.Overrides != nil { - objectKey := object.FlatKey("Overrides") - if err := awsEc2query_serializeDocumentFleetLaunchTemplateOverridesListRequest(v.Overrides, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesListRequest(v []types.FleetLaunchTemplateOverridesRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(v *types.FleetLaunchTemplateOverridesRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.InstanceRequirements != nil { - objectKey := object.Key("InstanceRequirements") - if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil { - return err - } - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.MaxPrice != nil { - objectKey := object.Key("MaxPrice") - objectKey.String(*v.MaxPrice) - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil { - return err - } - } - - if v.Priority != nil { - objectKey := object.Key("Priority") - switch { - case math.IsNaN(*v.Priority): - objectKey.String("NaN") - - case math.IsInf(*v.Priority, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Priority, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Priority) - - } - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.WeightedCapacity != nil { - objectKey := object.Key("WeightedCapacity") - switch { - case math.IsNaN(*v.WeightedCapacity): - objectKey.String("NaN") - - case math.IsInf(*v.WeightedCapacity, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.WeightedCapacity, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.WeightedCapacity) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentFleetLaunchTemplateSpecification(v *types.FleetLaunchTemplateSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.Version != nil { - objectKey := object.Key("Version") - objectKey.String(*v.Version) - } - - return nil -} - -func awsEc2query_serializeDocumentFleetLaunchTemplateSpecificationRequest(v *types.FleetLaunchTemplateSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.Version != nil { - objectKey := object.Key("Version") - objectKey.String(*v.Version) - } - - return nil -} - -func awsEc2query_serializeDocumentFleetSpotCapacityRebalanceRequest(v *types.FleetSpotCapacityRebalanceRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ReplacementStrategy) > 0 { - objectKey := object.Key("ReplacementStrategy") - objectKey.String(string(v.ReplacementStrategy)) - } - - if v.TerminationDelay != nil { - objectKey := object.Key("TerminationDelay") - objectKey.Integer(*v.TerminationDelay) - } - - return nil -} - -func awsEc2query_serializeDocumentFleetSpotMaintenanceStrategiesRequest(v *types.FleetSpotMaintenanceStrategiesRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityRebalance != nil { - objectKey := object.Key("CapacityRebalance") - if err := awsEc2query_serializeDocumentFleetSpotCapacityRebalanceRequest(v.CapacityRebalance, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentFlowLogIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentFlowLogResourceIds(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentFpgaImageIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentGroupIdentifier(v *types.GroupIdentifier, value query.Value) error { - object := value.Object() - _ = object - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - return nil -} - -func awsEc2query_serializeDocumentGroupIdentifierList(v []types.GroupIdentifier, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentGroupIdentifier(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentGroupIds(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentGroupIdStringList(v []string, value query.Value) error { - array := value.Array("GroupId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentGroupNameStringList(v []string, value query.Value) error { - array := value.Array("GroupName") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentHibernationOptionsRequest(v *types.HibernationOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Configured != nil { - objectKey := object.Key("Configured") - objectKey.Boolean(*v.Configured) - } - - return nil -} - -func awsEc2query_serializeDocumentHostReservationIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIamInstanceProfileSpecification(v *types.IamInstanceProfileSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.Arn != nil { - objectKey := object.Key("Arn") - objectKey.String(*v.Arn) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - return nil -} - -func awsEc2query_serializeDocumentIcmpTypeCode(v *types.IcmpTypeCode, value query.Value) error { - object := value.Object() - _ = object - - if v.Code != nil { - objectKey := object.Key("Code") - objectKey.Integer(*v.Code) - } - - if v.Type != nil { - objectKey := object.Key("Type") - objectKey.Integer(*v.Type) - } - - return nil -} - -func awsEc2query_serializeDocumentIKEVersionsRequestList(v []types.IKEVersionsRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentIKEVersionsRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentIKEVersionsRequestListValue(v *types.IKEVersionsRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentImageDiskContainer(v *types.ImageDiskContainer, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DeviceName != nil { - objectKey := object.Key("DeviceName") - objectKey.String(*v.DeviceName) - } - - if v.Format != nil { - objectKey := object.Key("Format") - objectKey.String(*v.Format) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.Url != nil { - objectKey := object.Key("Url") - objectKey.String(*v.Url) - } - - if v.UserBucket != nil { - objectKey := object.Key("UserBucket") - if err := awsEc2query_serializeDocumentUserBucket(v.UserBucket, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentImageDiskContainerList(v []types.ImageDiskContainer, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentImageDiskContainer(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentImageIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentImageIdStringList(v []string, value query.Value) error { - array := value.Array("ImageId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentImportImageLicenseConfigurationRequest(v *types.ImportImageLicenseConfigurationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.LicenseConfigurationArn != nil { - objectKey := object.Key("LicenseConfigurationArn") - objectKey.String(*v.LicenseConfigurationArn) - } - - return nil -} - -func awsEc2query_serializeDocumentImportImageLicenseSpecificationListRequest(v []types.ImportImageLicenseConfigurationRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentImportImageLicenseConfigurationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentImportInstanceLaunchSpecification(v *types.ImportInstanceLaunchSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.AdditionalInfo != nil { - objectKey := object.Key("AdditionalInfo") - objectKey.String(*v.AdditionalInfo) - } - - if len(v.Architecture) > 0 { - objectKey := object.Key("Architecture") - objectKey.String(string(v.Architecture)) - } - - if v.GroupIds != nil { - objectKey := object.FlatKey("GroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.GroupIds, objectKey); err != nil { - return err - } - } - - if v.GroupNames != nil { - objectKey := object.FlatKey("GroupName") - if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.GroupNames, objectKey); err != nil { - return err - } - } - - if len(v.InstanceInitiatedShutdownBehavior) > 0 { - objectKey := object.Key("InstanceInitiatedShutdownBehavior") - objectKey.String(string(v.InstanceInitiatedShutdownBehavior)) - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.Monitoring != nil { - objectKey := object.Key("Monitoring") - objectKey.Boolean(*v.Monitoring) - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil { - return err - } - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - if err := awsEc2query_serializeDocumentUserData(v.UserData, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentImportSnapshotTaskIdList(v []string, value query.Value) error { - array := value.Array("ImportTaskId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentImportTaskIdList(v []string, value query.Value) error { - array := value.Array("ImportTaskId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentInsideCidrBlocksStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecification(v *types.InstanceBlockDeviceMappingSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.DeviceName != nil { - objectKey := object.Key("DeviceName") - objectKey.String(*v.DeviceName) - } - - if v.Ebs != nil { - objectKey := object.Key("Ebs") - if err := awsEc2query_serializeDocumentEbsInstanceBlockDeviceSpecification(v.Ebs, objectKey); err != nil { - return err - } - } - - if v.NoDevice != nil { - objectKey := object.Key("NoDevice") - objectKey.String(*v.NoDevice) - } - - if v.VirtualName != nil { - objectKey := object.Key("VirtualName") - objectKey.String(*v.VirtualName) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecificationList(v []types.InstanceBlockDeviceMappingSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentInstanceCreditSpecificationListRequest(v []types.InstanceCreditSpecificationRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentInstanceCreditSpecificationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentInstanceCreditSpecificationRequest(v *types.InstanceCreditSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.CpuCredits != nil { - objectKey := object.Key("CpuCredits") - objectKey.String(*v.CpuCredits) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceEventWindowAssociationRequest(v *types.InstanceEventWindowAssociationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.DedicatedHostIds != nil { - objectKey := object.FlatKey("DedicatedHostId") - if err := awsEc2query_serializeDocumentDedicatedHostIdList(v.DedicatedHostIds, objectKey); err != nil { - return err - } - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.InstanceTags != nil { - objectKey := object.FlatKey("InstanceTag") - if err := awsEc2query_serializeDocumentTagList(v.InstanceTags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceEventWindowDisassociationRequest(v *types.InstanceEventWindowDisassociationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.DedicatedHostIds != nil { - objectKey := object.FlatKey("DedicatedHostId") - if err := awsEc2query_serializeDocumentDedicatedHostIdList(v.DedicatedHostIds, objectKey); err != nil { - return err - } - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.InstanceTags != nil { - objectKey := object.FlatKey("InstanceTag") - if err := awsEc2query_serializeDocumentTagList(v.InstanceTags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceEventWindowIdSet(v []string, value query.Value) error { - array := value.Array("InstanceEventWindowId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequest(v *types.InstanceEventWindowTimeRangeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EndHour != nil { - objectKey := object.Key("EndHour") - objectKey.Integer(*v.EndHour) - } - - if len(v.EndWeekDay) > 0 { - objectKey := object.Key("EndWeekDay") - objectKey.String(string(v.EndWeekDay)) - } - - if v.StartHour != nil { - objectKey := object.Key("StartHour") - objectKey.Integer(*v.StartHour) - } - - if len(v.StartWeekDay) > 0 { - objectKey := object.Key("StartWeekDay") - objectKey.String(string(v.StartWeekDay)) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v []types.InstanceEventWindowTimeRangeRequest, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentInstanceGenerationSet(v []types.InstanceGeneration, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceIdStringList(v []string, value query.Value) error { - array := value.Array("InstanceId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceIpv6Address(v *types.InstanceIpv6Address, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6Address != nil { - objectKey := object.Key("Ipv6Address") - objectKey.String(*v.Ipv6Address) - } - - if v.IsPrimaryIpv6 != nil { - objectKey := object.Key("IsPrimaryIpv6") - objectKey.Boolean(*v.IsPrimaryIpv6) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceIpv6AddressList(v []types.InstanceIpv6Address, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentInstanceIpv6Address(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentInstanceIpv6AddressListRequest(v []types.InstanceIpv6AddressRequest, value query.Value) error { - array := value.Array("InstanceIpv6Address") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentInstanceIpv6AddressRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentInstanceIpv6AddressRequest(v *types.InstanceIpv6AddressRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6Address != nil { - objectKey := object.Key("Ipv6Address") - objectKey.String(*v.Ipv6Address) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceMaintenanceOptionsRequest(v *types.InstanceMaintenanceOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AutoRecovery) > 0 { - objectKey := object.Key("AutoRecovery") - objectKey.String(string(v.AutoRecovery)) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceMarketOptionsRequest(v *types.InstanceMarketOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.MarketType) > 0 { - objectKey := object.Key("MarketType") - objectKey.String(string(v.MarketType)) - } - - if v.SpotOptions != nil { - objectKey := object.Key("SpotOptions") - if err := awsEc2query_serializeDocumentSpotMarketOptions(v.SpotOptions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceMetadataOptionsRequest(v *types.InstanceMetadataOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.HttpEndpoint) > 0 { - objectKey := object.Key("HttpEndpoint") - objectKey.String(string(v.HttpEndpoint)) - } - - if len(v.HttpProtocolIpv6) > 0 { - objectKey := object.Key("HttpProtocolIpv6") - objectKey.String(string(v.HttpProtocolIpv6)) - } - - if v.HttpPutResponseHopLimit != nil { - objectKey := object.Key("HttpPutResponseHopLimit") - objectKey.Integer(*v.HttpPutResponseHopLimit) - } - - if len(v.HttpTokens) > 0 { - objectKey := object.Key("HttpTokens") - objectKey.String(string(v.HttpTokens)) - } - - if len(v.InstanceMetadataTags) > 0 { - objectKey := object.Key("InstanceMetadataTags") - objectKey.String(string(v.InstanceMetadataTags)) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecification(v *types.InstanceNetworkInterfaceSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociateCarrierIpAddress != nil { - objectKey := object.Key("AssociateCarrierIpAddress") - objectKey.Boolean(*v.AssociateCarrierIpAddress) - } - - if v.AssociatePublicIpAddress != nil { - objectKey := object.Key("AssociatePublicIpAddress") - objectKey.Boolean(*v.AssociatePublicIpAddress) - } - - if v.ConnectionTrackingSpecification != nil { - objectKey := object.Key("ConnectionTrackingSpecification") - if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil { - return err - } - } - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DeviceIndex != nil { - objectKey := object.Key("DeviceIndex") - objectKey.Integer(*v.DeviceIndex) - } - - if v.EnaSrdSpecification != nil { - objectKey := object.Key("EnaSrdSpecification") - if err := awsEc2query_serializeDocumentEnaSrdSpecificationRequest(v.EnaSrdSpecification, objectKey); err != nil { - return err - } - } - - if v.Groups != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil { - return err - } - } - - if v.InterfaceType != nil { - objectKey := object.Key("InterfaceType") - objectKey.String(*v.InterfaceType) - } - - if v.Ipv4PrefixCount != nil { - objectKey := object.Key("Ipv4PrefixCount") - objectKey.Integer(*v.Ipv4PrefixCount) - } - - if v.Ipv4Prefixes != nil { - objectKey := object.FlatKey("Ipv4Prefix") - if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil { - return err - } - } - - if v.Ipv6AddressCount != nil { - objectKey := object.Key("Ipv6AddressCount") - objectKey.Integer(*v.Ipv6AddressCount) - } - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Addresses") - if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.Ipv6PrefixCount != nil { - objectKey := object.Key("Ipv6PrefixCount") - objectKey.Integer(*v.Ipv6PrefixCount) - } - - if v.Ipv6Prefixes != nil { - objectKey := object.FlatKey("Ipv6Prefix") - if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil { - return err - } - } - - if v.NetworkCardIndex != nil { - objectKey := object.Key("NetworkCardIndex") - objectKey.Integer(*v.NetworkCardIndex) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PrimaryIpv6 != nil { - objectKey := object.Key("PrimaryIpv6") - objectKey.Boolean(*v.PrimaryIpv6) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddresses") - if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - if v.SecondaryPrivateIpAddressCount != nil { - objectKey := object.Key("SecondaryPrivateIpAddressCount") - objectKey.Integer(*v.SecondaryPrivateIpAddressCount) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v []types.InstanceNetworkInterfaceSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentInstanceRequirements(v *types.InstanceRequirements, value query.Value) error { - object := value.Object() - _ = object - - if v.AcceleratorCount != nil { - objectKey := object.Key("AcceleratorCount") - if err := awsEc2query_serializeDocumentAcceleratorCount(v.AcceleratorCount, objectKey); err != nil { - return err - } - } - - if v.AcceleratorManufacturers != nil { - objectKey := object.FlatKey("AcceleratorManufacturerSet") - if err := awsEc2query_serializeDocumentAcceleratorManufacturerSet(v.AcceleratorManufacturers, objectKey); err != nil { - return err - } - } - - if v.AcceleratorNames != nil { - objectKey := object.FlatKey("AcceleratorNameSet") - if err := awsEc2query_serializeDocumentAcceleratorNameSet(v.AcceleratorNames, objectKey); err != nil { - return err - } - } - - if v.AcceleratorTotalMemoryMiB != nil { - objectKey := object.Key("AcceleratorTotalMemoryMiB") - if err := awsEc2query_serializeDocumentAcceleratorTotalMemoryMiB(v.AcceleratorTotalMemoryMiB, objectKey); err != nil { - return err - } - } - - if v.AcceleratorTypes != nil { - objectKey := object.FlatKey("AcceleratorTypeSet") - if err := awsEc2query_serializeDocumentAcceleratorTypeSet(v.AcceleratorTypes, objectKey); err != nil { - return err - } - } - - if v.AllowedInstanceTypes != nil { - objectKey := object.FlatKey("AllowedInstanceTypeSet") - if err := awsEc2query_serializeDocumentAllowedInstanceTypeSet(v.AllowedInstanceTypes, objectKey); err != nil { - return err - } - } - - if len(v.BareMetal) > 0 { - objectKey := object.Key("BareMetal") - objectKey.String(string(v.BareMetal)) - } - - if v.BaselineEbsBandwidthMbps != nil { - objectKey := object.Key("BaselineEbsBandwidthMbps") - if err := awsEc2query_serializeDocumentBaselineEbsBandwidthMbps(v.BaselineEbsBandwidthMbps, objectKey); err != nil { - return err - } - } - - if len(v.BurstablePerformance) > 0 { - objectKey := object.Key("BurstablePerformance") - objectKey.String(string(v.BurstablePerformance)) - } - - if v.CpuManufacturers != nil { - objectKey := object.FlatKey("CpuManufacturerSet") - if err := awsEc2query_serializeDocumentCpuManufacturerSet(v.CpuManufacturers, objectKey); err != nil { - return err - } - } - - if v.ExcludedInstanceTypes != nil { - objectKey := object.FlatKey("ExcludedInstanceTypeSet") - if err := awsEc2query_serializeDocumentExcludedInstanceTypeSet(v.ExcludedInstanceTypes, objectKey); err != nil { - return err - } - } - - if v.InstanceGenerations != nil { - objectKey := object.FlatKey("InstanceGenerationSet") - if err := awsEc2query_serializeDocumentInstanceGenerationSet(v.InstanceGenerations, objectKey); err != nil { - return err - } - } - - if len(v.LocalStorage) > 0 { - objectKey := object.Key("LocalStorage") - objectKey.String(string(v.LocalStorage)) - } - - if v.LocalStorageTypes != nil { - objectKey := object.FlatKey("LocalStorageTypeSet") - if err := awsEc2query_serializeDocumentLocalStorageTypeSet(v.LocalStorageTypes, objectKey); err != nil { - return err - } - } - - if v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice != nil { - objectKey := object.Key("MaxSpotPriceAsPercentageOfOptimalOnDemandPrice") - objectKey.Integer(*v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice) - } - - if v.MemoryGiBPerVCpu != nil { - objectKey := object.Key("MemoryGiBPerVCpu") - if err := awsEc2query_serializeDocumentMemoryGiBPerVCpu(v.MemoryGiBPerVCpu, objectKey); err != nil { - return err - } - } - - if v.MemoryMiB != nil { - objectKey := object.Key("MemoryMiB") - if err := awsEc2query_serializeDocumentMemoryMiB(v.MemoryMiB, objectKey); err != nil { - return err - } - } - - if v.NetworkBandwidthGbps != nil { - objectKey := object.Key("NetworkBandwidthGbps") - if err := awsEc2query_serializeDocumentNetworkBandwidthGbps(v.NetworkBandwidthGbps, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceCount != nil { - objectKey := object.Key("NetworkInterfaceCount") - if err := awsEc2query_serializeDocumentNetworkInterfaceCount(v.NetworkInterfaceCount, objectKey); err != nil { - return err - } - } - - if v.OnDemandMaxPricePercentageOverLowestPrice != nil { - objectKey := object.Key("OnDemandMaxPricePercentageOverLowestPrice") - objectKey.Integer(*v.OnDemandMaxPricePercentageOverLowestPrice) - } - - if v.RequireHibernateSupport != nil { - objectKey := object.Key("RequireHibernateSupport") - objectKey.Boolean(*v.RequireHibernateSupport) - } - - if v.SpotMaxPricePercentageOverLowestPrice != nil { - objectKey := object.Key("SpotMaxPricePercentageOverLowestPrice") - objectKey.Integer(*v.SpotMaxPricePercentageOverLowestPrice) - } - - if v.TotalLocalStorageGB != nil { - objectKey := object.Key("TotalLocalStorageGB") - if err := awsEc2query_serializeDocumentTotalLocalStorageGB(v.TotalLocalStorageGB, objectKey); err != nil { - return err - } - } - - if v.VCpuCount != nil { - objectKey := object.Key("VCpuCount") - if err := awsEc2query_serializeDocumentVCpuCountRange(v.VCpuCount, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceRequirementsRequest(v *types.InstanceRequirementsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.AcceleratorCount != nil { - objectKey := object.Key("AcceleratorCount") - if err := awsEc2query_serializeDocumentAcceleratorCountRequest(v.AcceleratorCount, objectKey); err != nil { - return err - } - } - - if v.AcceleratorManufacturers != nil { - objectKey := object.FlatKey("AcceleratorManufacturer") - if err := awsEc2query_serializeDocumentAcceleratorManufacturerSet(v.AcceleratorManufacturers, objectKey); err != nil { - return err - } - } - - if v.AcceleratorNames != nil { - objectKey := object.FlatKey("AcceleratorName") - if err := awsEc2query_serializeDocumentAcceleratorNameSet(v.AcceleratorNames, objectKey); err != nil { - return err - } - } - - if v.AcceleratorTotalMemoryMiB != nil { - objectKey := object.Key("AcceleratorTotalMemoryMiB") - if err := awsEc2query_serializeDocumentAcceleratorTotalMemoryMiBRequest(v.AcceleratorTotalMemoryMiB, objectKey); err != nil { - return err - } - } - - if v.AcceleratorTypes != nil { - objectKey := object.FlatKey("AcceleratorType") - if err := awsEc2query_serializeDocumentAcceleratorTypeSet(v.AcceleratorTypes, objectKey); err != nil { - return err - } - } - - if v.AllowedInstanceTypes != nil { - objectKey := object.FlatKey("AllowedInstanceType") - if err := awsEc2query_serializeDocumentAllowedInstanceTypeSet(v.AllowedInstanceTypes, objectKey); err != nil { - return err - } - } - - if len(v.BareMetal) > 0 { - objectKey := object.Key("BareMetal") - objectKey.String(string(v.BareMetal)) - } - - if v.BaselineEbsBandwidthMbps != nil { - objectKey := object.Key("BaselineEbsBandwidthMbps") - if err := awsEc2query_serializeDocumentBaselineEbsBandwidthMbpsRequest(v.BaselineEbsBandwidthMbps, objectKey); err != nil { - return err - } - } - - if len(v.BurstablePerformance) > 0 { - objectKey := object.Key("BurstablePerformance") - objectKey.String(string(v.BurstablePerformance)) - } - - if v.CpuManufacturers != nil { - objectKey := object.FlatKey("CpuManufacturer") - if err := awsEc2query_serializeDocumentCpuManufacturerSet(v.CpuManufacturers, objectKey); err != nil { - return err - } - } - - if v.ExcludedInstanceTypes != nil { - objectKey := object.FlatKey("ExcludedInstanceType") - if err := awsEc2query_serializeDocumentExcludedInstanceTypeSet(v.ExcludedInstanceTypes, objectKey); err != nil { - return err - } - } - - if v.InstanceGenerations != nil { - objectKey := object.FlatKey("InstanceGeneration") - if err := awsEc2query_serializeDocumentInstanceGenerationSet(v.InstanceGenerations, objectKey); err != nil { - return err - } - } - - if len(v.LocalStorage) > 0 { - objectKey := object.Key("LocalStorage") - objectKey.String(string(v.LocalStorage)) - } - - if v.LocalStorageTypes != nil { - objectKey := object.FlatKey("LocalStorageType") - if err := awsEc2query_serializeDocumentLocalStorageTypeSet(v.LocalStorageTypes, objectKey); err != nil { - return err - } - } - - if v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice != nil { - objectKey := object.Key("MaxSpotPriceAsPercentageOfOptimalOnDemandPrice") - objectKey.Integer(*v.MaxSpotPriceAsPercentageOfOptimalOnDemandPrice) - } - - if v.MemoryGiBPerVCpu != nil { - objectKey := object.Key("MemoryGiBPerVCpu") - if err := awsEc2query_serializeDocumentMemoryGiBPerVCpuRequest(v.MemoryGiBPerVCpu, objectKey); err != nil { - return err - } - } - - if v.MemoryMiB != nil { - objectKey := object.Key("MemoryMiB") - if err := awsEc2query_serializeDocumentMemoryMiBRequest(v.MemoryMiB, objectKey); err != nil { - return err - } - } - - if v.NetworkBandwidthGbps != nil { - objectKey := object.Key("NetworkBandwidthGbps") - if err := awsEc2query_serializeDocumentNetworkBandwidthGbpsRequest(v.NetworkBandwidthGbps, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceCount != nil { - objectKey := object.Key("NetworkInterfaceCount") - if err := awsEc2query_serializeDocumentNetworkInterfaceCountRequest(v.NetworkInterfaceCount, objectKey); err != nil { - return err - } - } - - if v.OnDemandMaxPricePercentageOverLowestPrice != nil { - objectKey := object.Key("OnDemandMaxPricePercentageOverLowestPrice") - objectKey.Integer(*v.OnDemandMaxPricePercentageOverLowestPrice) - } - - if v.RequireHibernateSupport != nil { - objectKey := object.Key("RequireHibernateSupport") - objectKey.Boolean(*v.RequireHibernateSupport) - } - - if v.SpotMaxPricePercentageOverLowestPrice != nil { - objectKey := object.Key("SpotMaxPricePercentageOverLowestPrice") - objectKey.Integer(*v.SpotMaxPricePercentageOverLowestPrice) - } - - if v.TotalLocalStorageGB != nil { - objectKey := object.Key("TotalLocalStorageGB") - if err := awsEc2query_serializeDocumentTotalLocalStorageGBRequest(v.TotalLocalStorageGB, objectKey); err != nil { - return err - } - } - - if v.VCpuCount != nil { - objectKey := object.Key("VCpuCount") - if err := awsEc2query_serializeDocumentVCpuCountRangeRequest(v.VCpuCount, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceRequirementsWithMetadataRequest(v *types.InstanceRequirementsWithMetadataRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.ArchitectureTypes != nil { - objectKey := object.FlatKey("ArchitectureType") - if err := awsEc2query_serializeDocumentArchitectureTypeSet(v.ArchitectureTypes, objectKey); err != nil { - return err - } - } - - if v.InstanceRequirements != nil { - objectKey := object.Key("InstanceRequirements") - if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil { - return err - } - } - - if v.VirtualizationTypes != nil { - objectKey := object.FlatKey("VirtualizationType") - if err := awsEc2query_serializeDocumentVirtualizationTypeSet(v.VirtualizationTypes, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceSpecification(v *types.InstanceSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.ExcludeBootVolume != nil { - objectKey := object.Key("ExcludeBootVolume") - objectKey.Boolean(*v.ExcludeBootVolume) - } - - if v.ExcludeDataVolumeIds != nil { - objectKey := object.FlatKey("ExcludeDataVolumeId") - if err := awsEc2query_serializeDocumentVolumeIdStringList(v.ExcludeDataVolumeIds, objectKey); err != nil { - return err - } - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeDocumentInstanceTagKeySet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceTypeList(v []types.InstanceType, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentInstanceTypes(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIntegrateServices(v *types.IntegrateServices, value query.Value) error { - object := value.Object() - _ = object - - if v.AthenaIntegrations != nil { - objectKey := object.FlatKey("AthenaIntegration") - if err := awsEc2query_serializeDocumentAthenaIntegrationsSet(v.AthenaIntegrations, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentInternetGatewayIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpamCidrAuthorizationContext(v *types.IpamCidrAuthorizationContext, value query.Value) error { - object := value.Object() - _ = object - - if v.Message != nil { - objectKey := object.Key("Message") - objectKey.String(*v.Message) - } - - if v.Signature != nil { - objectKey := object.Key("Signature") - objectKey.String(*v.Signature) - } - - return nil -} - -func awsEc2query_serializeDocumentIpamPoolAllocationAllowedCidrs(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpamPoolAllocationDisallowedCidrs(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpamPoolSourceResourceRequest(v *types.IpamPoolSourceResourceRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.ResourceId != nil { - objectKey := object.Key("ResourceId") - objectKey.String(*v.ResourceId) - } - - if v.ResourceOwner != nil { - objectKey := object.Key("ResourceOwner") - objectKey.String(*v.ResourceOwner) - } - - if v.ResourceRegion != nil { - objectKey := object.Key("ResourceRegion") - objectKey.String(*v.ResourceRegion) - } - - if len(v.ResourceType) > 0 { - objectKey := object.Key("ResourceType") - objectKey.String(string(v.ResourceType)) - } - - return nil -} - -func awsEc2query_serializeDocumentIpList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpPermission(v *types.IpPermission, value query.Value) error { - object := value.Object() - _ = object - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.IpProtocol != nil { - objectKey := object.Key("IpProtocol") - objectKey.String(*v.IpProtocol) - } - - if v.IpRanges != nil { - objectKey := object.FlatKey("IpRanges") - if err := awsEc2query_serializeDocumentIpRangeList(v.IpRanges, objectKey); err != nil { - return err - } - } - - if v.Ipv6Ranges != nil { - objectKey := object.FlatKey("Ipv6Ranges") - if err := awsEc2query_serializeDocumentIpv6RangeList(v.Ipv6Ranges, objectKey); err != nil { - return err - } - } - - if v.PrefixListIds != nil { - objectKey := object.FlatKey("PrefixListIds") - if err := awsEc2query_serializeDocumentPrefixListIdList(v.PrefixListIds, objectKey); err != nil { - return err - } - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - if v.UserIdGroupPairs != nil { - objectKey := object.FlatKey("Groups") - if err := awsEc2query_serializeDocumentUserIdGroupPairList(v.UserIdGroupPairs, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentIpPermissionList(v []types.IpPermission, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentIpPermission(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentIpPrefixList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpRange(v *types.IpRange, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIp != nil { - objectKey := object.Key("CidrIp") - objectKey.String(*v.CidrIp) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - return nil -} - -func awsEc2query_serializeDocumentIpRangeList(v []types.IpRange, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentIpRange(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentIpv4PrefixList(v []types.Ipv4PrefixSpecificationRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentIpv4PrefixSpecificationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentIpv4PrefixSpecificationRequest(v *types.Ipv4PrefixSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv4Prefix != nil { - objectKey := object.Key("Ipv4Prefix") - objectKey.String(*v.Ipv4Prefix) - } - - return nil -} - -func awsEc2query_serializeDocumentIpv6AddressList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpv6PoolIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentIpv6PrefixList(v []types.Ipv6PrefixSpecificationRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentIpv6PrefixSpecificationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentIpv6PrefixSpecificationRequest(v *types.Ipv6PrefixSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6Prefix != nil { - objectKey := object.Key("Ipv6Prefix") - objectKey.String(*v.Ipv6Prefix) - } - - return nil -} - -func awsEc2query_serializeDocumentIpv6Range(v *types.Ipv6Range, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIpv6 != nil { - objectKey := object.Key("CidrIpv6") - objectKey.String(*v.CidrIpv6) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - return nil -} - -func awsEc2query_serializeDocumentIpv6RangeList(v []types.Ipv6Range, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentIpv6Range(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentKeyNameStringList(v []string, value query.Value) error { - array := value.Array("KeyName") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentKeyPairIdStringList(v []string, value query.Value) error { - array := value.Array("KeyPairId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLaunchPermission(v *types.LaunchPermission, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Group) > 0 { - objectKey := object.Key("Group") - objectKey.String(string(v.Group)) - } - - if v.OrganizationalUnitArn != nil { - objectKey := object.Key("OrganizationalUnitArn") - objectKey.String(*v.OrganizationalUnitArn) - } - - if v.OrganizationArn != nil { - objectKey := object.Key("OrganizationArn") - objectKey.String(*v.OrganizationArn) - } - - if v.UserId != nil { - objectKey := object.Key("UserId") - objectKey.String(*v.UserId) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchPermissionList(v []types.LaunchPermission, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchPermission(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchPermissionModifications(v *types.LaunchPermissionModifications, value query.Value) error { - object := value.Object() - _ = object - - if v.Add != nil { - objectKey := object.FlatKey("Add") - if err := awsEc2query_serializeDocumentLaunchPermissionList(v.Add, objectKey); err != nil { - return err - } - } - - if v.Remove != nil { - objectKey := object.FlatKey("Remove") - if err := awsEc2query_serializeDocumentLaunchPermissionList(v.Remove, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchSpecsList(v []types.SpotFleetLaunchSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentSpotFleetLaunchSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequest(v *types.LaunchTemplateBlockDeviceMappingRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.DeviceName != nil { - objectKey := object.Key("DeviceName") - objectKey.String(*v.DeviceName) - } - - if v.Ebs != nil { - objectKey := object.Key("Ebs") - if err := awsEc2query_serializeDocumentLaunchTemplateEbsBlockDeviceRequest(v.Ebs, objectKey); err != nil { - return err - } - } - - if v.NoDevice != nil { - objectKey := object.Key("NoDevice") - objectKey.String(*v.NoDevice) - } - - if v.VirtualName != nil { - objectKey := object.Key("VirtualName") - objectKey.String(*v.VirtualName) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequestList(v []types.LaunchTemplateBlockDeviceMappingRequest, value query.Value) error { - array := value.Array("BlockDeviceMapping") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateCapacityReservationSpecificationRequest(v *types.LaunchTemplateCapacityReservationSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.CapacityReservationPreference) > 0 { - objectKey := object.Key("CapacityReservationPreference") - objectKey.String(string(v.CapacityReservationPreference)) - } - - if v.CapacityReservationTarget != nil { - objectKey := object.Key("CapacityReservationTarget") - if err := awsEc2query_serializeDocumentCapacityReservationTarget(v.CapacityReservationTarget, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateConfig(v *types.LaunchTemplateConfig, value query.Value) error { - object := value.Object() - _ = object - - if v.LaunchTemplateSpecification != nil { - objectKey := object.Key("LaunchTemplateSpecification") - if err := awsEc2query_serializeDocumentFleetLaunchTemplateSpecification(v.LaunchTemplateSpecification, objectKey); err != nil { - return err - } - } - - if v.Overrides != nil { - objectKey := object.FlatKey("Overrides") - if err := awsEc2query_serializeDocumentLaunchTemplateOverridesList(v.Overrides, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateConfigList(v []types.LaunchTemplateConfig, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateConfig(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateCpuOptionsRequest(v *types.LaunchTemplateCpuOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AmdSevSnp) > 0 { - objectKey := object.Key("AmdSevSnp") - objectKey.String(string(v.AmdSevSnp)) - } - - if v.CoreCount != nil { - objectKey := object.Key("CoreCount") - objectKey.Integer(*v.CoreCount) - } - - if v.ThreadsPerCore != nil { - objectKey := object.Key("ThreadsPerCore") - objectKey.Integer(*v.ThreadsPerCore) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateEbsBlockDeviceRequest(v *types.LaunchTemplateEbsBlockDeviceRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.Iops != nil { - objectKey := object.Key("Iops") - objectKey.Integer(*v.Iops) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.Throughput != nil { - objectKey := object.Key("Throughput") - objectKey.Integer(*v.Throughput) - } - - if v.VolumeSize != nil { - objectKey := object.Key("VolumeSize") - objectKey.Integer(*v.VolumeSize) - } - - if len(v.VolumeType) > 0 { - objectKey := object.Key("VolumeType") - objectKey.String(string(v.VolumeType)) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAccelerator(v *types.LaunchTemplateElasticInferenceAccelerator, value query.Value) error { - object := value.Object() - _ = object - - if v.Count != nil { - objectKey := object.Key("Count") - objectKey.Integer(*v.Count) - } - - if v.Type != nil { - objectKey := object.Key("Type") - objectKey.String(*v.Type) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAcceleratorList(v []types.LaunchTemplateElasticInferenceAccelerator, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAccelerator(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateEnclaveOptionsRequest(v *types.LaunchTemplateEnclaveOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateHibernationOptionsRequest(v *types.LaunchTemplateHibernationOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Configured != nil { - objectKey := object.Key("Configured") - objectKey.Boolean(*v.Configured) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateIamInstanceProfileSpecificationRequest(v *types.LaunchTemplateIamInstanceProfileSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Arn != nil { - objectKey := object.Key("Arn") - objectKey.String(*v.Arn) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateInstanceMaintenanceOptionsRequest(v *types.LaunchTemplateInstanceMaintenanceOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AutoRecovery) > 0 { - objectKey := object.Key("AutoRecovery") - objectKey.String(string(v.AutoRecovery)) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateInstanceMarketOptionsRequest(v *types.LaunchTemplateInstanceMarketOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.MarketType) > 0 { - objectKey := object.Key("MarketType") - objectKey.String(string(v.MarketType)) - } - - if v.SpotOptions != nil { - objectKey := object.Key("SpotOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateSpotMarketOptionsRequest(v.SpotOptions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateInstanceMetadataOptionsRequest(v *types.LaunchTemplateInstanceMetadataOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.HttpEndpoint) > 0 { - objectKey := object.Key("HttpEndpoint") - objectKey.String(string(v.HttpEndpoint)) - } - - if len(v.HttpProtocolIpv6) > 0 { - objectKey := object.Key("HttpProtocolIpv6") - objectKey.String(string(v.HttpProtocolIpv6)) - } - - if v.HttpPutResponseHopLimit != nil { - objectKey := object.Key("HttpPutResponseHopLimit") - objectKey.Integer(*v.HttpPutResponseHopLimit) - } - - if len(v.HttpTokens) > 0 { - objectKey := object.Key("HttpTokens") - objectKey.String(string(v.HttpTokens)) - } - - if len(v.InstanceMetadataTags) > 0 { - objectKey := object.Key("InstanceMetadataTags") - objectKey.String(string(v.InstanceMetadataTags)) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequest(v *types.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociateCarrierIpAddress != nil { - objectKey := object.Key("AssociateCarrierIpAddress") - objectKey.Boolean(*v.AssociateCarrierIpAddress) - } - - if v.AssociatePublicIpAddress != nil { - objectKey := object.Key("AssociatePublicIpAddress") - objectKey.Boolean(*v.AssociatePublicIpAddress) - } - - if v.ConnectionTrackingSpecification != nil { - objectKey := object.Key("ConnectionTrackingSpecification") - if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil { - return err - } - } - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DeviceIndex != nil { - objectKey := object.Key("DeviceIndex") - objectKey.Integer(*v.DeviceIndex) - } - - if v.EnaSrdSpecification != nil { - objectKey := object.Key("EnaSrdSpecification") - if err := awsEc2query_serializeDocumentEnaSrdSpecificationRequest(v.EnaSrdSpecification, objectKey); err != nil { - return err - } - } - - if v.Groups != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil { - return err - } - } - - if v.InterfaceType != nil { - objectKey := object.Key("InterfaceType") - objectKey.String(*v.InterfaceType) - } - - if v.Ipv4PrefixCount != nil { - objectKey := object.Key("Ipv4PrefixCount") - objectKey.Integer(*v.Ipv4PrefixCount) - } - - if v.Ipv4Prefixes != nil { - objectKey := object.FlatKey("Ipv4Prefix") - if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil { - return err - } - } - - if v.Ipv6AddressCount != nil { - objectKey := object.Key("Ipv6AddressCount") - objectKey.Integer(*v.Ipv6AddressCount) - } - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Addresses") - if err := awsEc2query_serializeDocumentInstanceIpv6AddressListRequest(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.Ipv6PrefixCount != nil { - objectKey := object.Key("Ipv6PrefixCount") - objectKey.Integer(*v.Ipv6PrefixCount) - } - - if v.Ipv6Prefixes != nil { - objectKey := object.FlatKey("Ipv6Prefix") - if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil { - return err - } - } - - if v.NetworkCardIndex != nil { - objectKey := object.Key("NetworkCardIndex") - objectKey.Integer(*v.NetworkCardIndex) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PrimaryIpv6 != nil { - objectKey := object.Key("PrimaryIpv6") - objectKey.Boolean(*v.PrimaryIpv6) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddresses") - if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - if v.SecondaryPrivateIpAddressCount != nil { - objectKey := object.Key("SecondaryPrivateIpAddressCount") - objectKey.Integer(*v.SecondaryPrivateIpAddressCount) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequestList(v []types.LaunchTemplateInstanceNetworkInterfaceSpecificationRequest, value query.Value) error { - array := value.Array("InstanceNetworkInterfaceSpecification") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateLicenseConfigurationRequest(v *types.LaunchTemplateLicenseConfigurationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.LicenseConfigurationArn != nil { - objectKey := object.Key("LicenseConfigurationArn") - objectKey.String(*v.LicenseConfigurationArn) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateLicenseSpecificationListRequest(v []types.LaunchTemplateLicenseConfigurationRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateLicenseConfigurationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateNameStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateOverrides(v *types.LaunchTemplateOverrides, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.InstanceRequirements != nil { - objectKey := object.Key("InstanceRequirements") - if err := awsEc2query_serializeDocumentInstanceRequirements(v.InstanceRequirements, objectKey); err != nil { - return err - } - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.Priority != nil { - objectKey := object.Key("Priority") - switch { - case math.IsNaN(*v.Priority): - objectKey.String("NaN") - - case math.IsInf(*v.Priority, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Priority, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Priority) - - } - } - - if v.SpotPrice != nil { - objectKey := object.Key("SpotPrice") - objectKey.String(*v.SpotPrice) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.WeightedCapacity != nil { - objectKey := object.Key("WeightedCapacity") - switch { - case math.IsNaN(*v.WeightedCapacity): - objectKey.String("NaN") - - case math.IsInf(*v.WeightedCapacity, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.WeightedCapacity, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.WeightedCapacity) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateOverridesList(v []types.LaunchTemplateOverrides, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateOverrides(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v *types.LaunchTemplatePlacementRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Affinity != nil { - objectKey := object.Key("Affinity") - objectKey.String(*v.Affinity) - } - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.HostId != nil { - objectKey := object.Key("HostId") - objectKey.String(*v.HostId) - } - - if v.HostResourceGroupArn != nil { - objectKey := object.Key("HostResourceGroupArn") - objectKey.String(*v.HostResourceGroupArn) - } - - if v.PartitionNumber != nil { - objectKey := object.Key("PartitionNumber") - objectKey.Integer(*v.PartitionNumber) - } - - if v.SpreadDomain != nil { - objectKey := object.Key("SpreadDomain") - objectKey.String(*v.SpreadDomain) - } - - if len(v.Tenancy) > 0 { - objectKey := object.Key("Tenancy") - objectKey.String(string(v.Tenancy)) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplatePrivateDnsNameOptionsRequest(v *types.LaunchTemplatePrivateDnsNameOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EnableResourceNameDnsAAAARecord != nil { - objectKey := object.Key("EnableResourceNameDnsAAAARecord") - objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord) - } - - if v.EnableResourceNameDnsARecord != nil { - objectKey := object.Key("EnableResourceNameDnsARecord") - objectKey.Boolean(*v.EnableResourceNameDnsARecord) - } - - if len(v.HostnameType) > 0 { - objectKey := object.Key("HostnameType") - objectKey.String(string(v.HostnameType)) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v *types.LaunchTemplatesMonitoringRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateSpecification(v *types.LaunchTemplateSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.Version != nil { - objectKey := object.Key("Version") - objectKey.String(*v.Version) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateSpotMarketOptionsRequest(v *types.LaunchTemplateSpotMarketOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.BlockDurationMinutes != nil { - objectKey := object.Key("BlockDurationMinutes") - objectKey.Integer(*v.BlockDurationMinutes) - } - - if len(v.InstanceInterruptionBehavior) > 0 { - objectKey := object.Key("InstanceInterruptionBehavior") - objectKey.String(string(v.InstanceInterruptionBehavior)) - } - - if v.MaxPrice != nil { - objectKey := object.Key("MaxPrice") - objectKey.String(*v.MaxPrice) - } - - if len(v.SpotInstanceType) > 0 { - objectKey := object.Key("SpotInstanceType") - objectKey.String(string(v.SpotInstanceType)) - } - - if v.ValidUntil != nil { - objectKey := object.Key("ValidUntil") - objectKey.String(smithytime.FormatDateTime(*v.ValidUntil)) - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequest(v *types.LaunchTemplateTagSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ResourceType) > 0 { - objectKey := object.Key("ResourceType") - objectKey.String(string(v.ResourceType)) - } - - if v.Tags != nil { - objectKey := object.FlatKey("Tag") - if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequestList(v []types.LaunchTemplateTagSpecificationRequest, value query.Value) error { - array := value.Array("LaunchTemplateTagSpecificationRequest") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLicenseConfigurationRequest(v *types.LicenseConfigurationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.LicenseConfigurationArn != nil { - objectKey := object.Key("LicenseConfigurationArn") - objectKey.String(*v.LicenseConfigurationArn) - } - - return nil -} - -func awsEc2query_serializeDocumentLicenseSpecificationListRequest(v []types.LicenseConfigurationRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLicenseConfigurationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLoadBalancersConfig(v *types.LoadBalancersConfig, value query.Value) error { - object := value.Object() - _ = object - - if v.ClassicLoadBalancersConfig != nil { - objectKey := object.Key("ClassicLoadBalancersConfig") - if err := awsEc2query_serializeDocumentClassicLoadBalancersConfig(v.ClassicLoadBalancersConfig, objectKey); err != nil { - return err - } - } - - if v.TargetGroupsConfig != nil { - objectKey := object.Key("TargetGroupsConfig") - if err := awsEc2query_serializeDocumentTargetGroupsConfig(v.TargetGroupsConfig, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLoadPermissionListRequest(v []types.LoadPermissionRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentLoadPermissionRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentLoadPermissionModifications(v *types.LoadPermissionModifications, value query.Value) error { - object := value.Object() - _ = object - - if v.Add != nil { - objectKey := object.FlatKey("Add") - if err := awsEc2query_serializeDocumentLoadPermissionListRequest(v.Add, objectKey); err != nil { - return err - } - } - - if v.Remove != nil { - objectKey := object.FlatKey("Remove") - if err := awsEc2query_serializeDocumentLoadPermissionListRequest(v.Remove, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentLoadPermissionRequest(v *types.LoadPermissionRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Group) > 0 { - objectKey := object.Key("Group") - objectKey.String(string(v.Group)) - } - - if v.UserId != nil { - objectKey := object.Key("UserId") - objectKey.String(*v.UserId) - } - - return nil -} - -func awsEc2query_serializeDocumentLocalGatewayIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLocalGatewayRouteTableIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLocalGatewayRouteTableVpcAssociationIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceGroupIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentLocalStorageTypeSet(v []types.LocalStorageType, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentMemoryGiBPerVCpu(v *types.MemoryGiBPerVCpu, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - switch { - case math.IsNaN(*v.Max): - objectKey.String("NaN") - - case math.IsInf(*v.Max, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Max, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Max) - - } - } - - if v.Min != nil { - objectKey := object.Key("Min") - switch { - case math.IsNaN(*v.Min): - objectKey.String("NaN") - - case math.IsInf(*v.Min, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Min, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Min) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentMemoryGiBPerVCpuRequest(v *types.MemoryGiBPerVCpuRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - switch { - case math.IsNaN(*v.Max): - objectKey.String("NaN") - - case math.IsInf(*v.Max, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Max, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Max) - - } - } - - if v.Min != nil { - objectKey := object.Key("Min") - switch { - case math.IsNaN(*v.Min): - objectKey.String("NaN") - - case math.IsInf(*v.Min, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Min, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Min) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentMemoryMiB(v *types.MemoryMiB, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentMemoryMiBRequest(v *types.MemoryMiBRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentModifyTransitGatewayOptions(v *types.ModifyTransitGatewayOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.AddTransitGatewayCidrBlocks != nil { - objectKey := object.FlatKey("AddTransitGatewayCidrBlocks") - if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.AddTransitGatewayCidrBlocks, objectKey); err != nil { - return err - } - } - - if v.AmazonSideAsn != nil { - objectKey := object.Key("AmazonSideAsn") - objectKey.Long(*v.AmazonSideAsn) - } - - if v.AssociationDefaultRouteTableId != nil { - objectKey := object.Key("AssociationDefaultRouteTableId") - objectKey.String(*v.AssociationDefaultRouteTableId) - } - - if len(v.AutoAcceptSharedAttachments) > 0 { - objectKey := object.Key("AutoAcceptSharedAttachments") - objectKey.String(string(v.AutoAcceptSharedAttachments)) - } - - if len(v.DefaultRouteTableAssociation) > 0 { - objectKey := object.Key("DefaultRouteTableAssociation") - objectKey.String(string(v.DefaultRouteTableAssociation)) - } - - if len(v.DefaultRouteTablePropagation) > 0 { - objectKey := object.Key("DefaultRouteTablePropagation") - objectKey.String(string(v.DefaultRouteTablePropagation)) - } - - if len(v.DnsSupport) > 0 { - objectKey := object.Key("DnsSupport") - objectKey.String(string(v.DnsSupport)) - } - - if v.PropagationDefaultRouteTableId != nil { - objectKey := object.Key("PropagationDefaultRouteTableId") - objectKey.String(*v.PropagationDefaultRouteTableId) - } - - if v.RemoveTransitGatewayCidrBlocks != nil { - objectKey := object.FlatKey("RemoveTransitGatewayCidrBlocks") - if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.RemoveTransitGatewayCidrBlocks, objectKey); err != nil { - return err - } - } - - if len(v.SecurityGroupReferencingSupport) > 0 { - objectKey := object.Key("SecurityGroupReferencingSupport") - objectKey.String(string(v.SecurityGroupReferencingSupport)) - } - - if len(v.VpnEcmpSupport) > 0 { - objectKey := object.Key("VpnEcmpSupport") - objectKey.String(string(v.VpnEcmpSupport)) - } - - return nil -} - -func awsEc2query_serializeDocumentModifyTransitGatewayVpcAttachmentRequestOptions(v *types.ModifyTransitGatewayVpcAttachmentRequestOptions, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ApplianceModeSupport) > 0 { - objectKey := object.Key("ApplianceModeSupport") - objectKey.String(string(v.ApplianceModeSupport)) - } - - if len(v.DnsSupport) > 0 { - objectKey := object.Key("DnsSupport") - objectKey.String(string(v.DnsSupport)) - } - - if len(v.Ipv6Support) > 0 { - objectKey := object.Key("Ipv6Support") - objectKey.String(string(v.Ipv6Support)) - } - - if len(v.SecurityGroupReferencingSupport) > 0 { - objectKey := object.Key("SecurityGroupReferencingSupport") - objectKey.String(string(v.SecurityGroupReferencingSupport)) - } - - return nil -} - -func awsEc2query_serializeDocumentModifyVerifiedAccessEndpointEniOptions(v *types.ModifyVerifiedAccessEndpointEniOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.Port != nil { - objectKey := object.Key("Port") - objectKey.Integer(*v.Port) - } - - if len(v.Protocol) > 0 { - objectKey := object.Key("Protocol") - objectKey.String(string(v.Protocol)) - } - - return nil -} - -func awsEc2query_serializeDocumentModifyVerifiedAccessEndpointLoadBalancerOptions(v *types.ModifyVerifiedAccessEndpointLoadBalancerOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.Port != nil { - objectKey := object.Key("Port") - objectKey.Integer(*v.Port) - } - - if len(v.Protocol) > 0 { - objectKey := object.Key("Protocol") - objectKey.String(string(v.Protocol)) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetId") - if err := awsEc2query_serializeDocumentModifyVerifiedAccessEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentModifyVerifiedAccessEndpointSubnetIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderDeviceOptions(v *types.ModifyVerifiedAccessTrustProviderDeviceOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.PublicSigningKeyUrl != nil { - objectKey := object.Key("PublicSigningKeyUrl") - objectKey.String(*v.PublicSigningKeyUrl) - } - - return nil -} - -func awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderOidcOptions(v *types.ModifyVerifiedAccessTrustProviderOidcOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.AuthorizationEndpoint != nil { - objectKey := object.Key("AuthorizationEndpoint") - objectKey.String(*v.AuthorizationEndpoint) - } - - if v.ClientId != nil { - objectKey := object.Key("ClientId") - objectKey.String(*v.ClientId) - } - - if v.ClientSecret != nil { - objectKey := object.Key("ClientSecret") - objectKey.String(*v.ClientSecret) - } - - if v.Issuer != nil { - objectKey := object.Key("Issuer") - objectKey.String(*v.Issuer) - } - - if v.Scope != nil { - objectKey := object.Key("Scope") - objectKey.String(*v.Scope) - } - - if v.TokenEndpoint != nil { - objectKey := object.Key("TokenEndpoint") - objectKey.String(*v.TokenEndpoint) - } - - if v.UserInfoEndpoint != nil { - objectKey := object.Key("UserInfoEndpoint") - objectKey.String(*v.UserInfoEndpoint) - } - - return nil -} - -func awsEc2query_serializeDocumentModifyVpnTunnelOptionsSpecification(v *types.ModifyVpnTunnelOptionsSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.DPDTimeoutAction != nil { - objectKey := object.Key("DPDTimeoutAction") - objectKey.String(*v.DPDTimeoutAction) - } - - if v.DPDTimeoutSeconds != nil { - objectKey := object.Key("DPDTimeoutSeconds") - objectKey.Integer(*v.DPDTimeoutSeconds) - } - - if v.EnableTunnelLifecycleControl != nil { - objectKey := object.Key("EnableTunnelLifecycleControl") - objectKey.Boolean(*v.EnableTunnelLifecycleControl) - } - - if v.IKEVersions != nil { - objectKey := object.FlatKey("IKEVersion") - if err := awsEc2query_serializeDocumentIKEVersionsRequestList(v.IKEVersions, objectKey); err != nil { - return err - } - } - - if v.LogOptions != nil { - objectKey := object.Key("LogOptions") - if err := awsEc2query_serializeDocumentVpnTunnelLogOptionsSpecification(v.LogOptions, objectKey); err != nil { - return err - } - } - - if v.Phase1DHGroupNumbers != nil { - objectKey := object.FlatKey("Phase1DHGroupNumber") - if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v.Phase1DHGroupNumbers, objectKey); err != nil { - return err - } - } - - if v.Phase1EncryptionAlgorithms != nil { - objectKey := object.FlatKey("Phase1EncryptionAlgorithm") - if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v.Phase1EncryptionAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase1IntegrityAlgorithms != nil { - objectKey := object.FlatKey("Phase1IntegrityAlgorithm") - if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v.Phase1IntegrityAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase1LifetimeSeconds != nil { - objectKey := object.Key("Phase1LifetimeSeconds") - objectKey.Integer(*v.Phase1LifetimeSeconds) - } - - if v.Phase2DHGroupNumbers != nil { - objectKey := object.FlatKey("Phase2DHGroupNumber") - if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v.Phase2DHGroupNumbers, objectKey); err != nil { - return err - } - } - - if v.Phase2EncryptionAlgorithms != nil { - objectKey := object.FlatKey("Phase2EncryptionAlgorithm") - if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v.Phase2EncryptionAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase2IntegrityAlgorithms != nil { - objectKey := object.FlatKey("Phase2IntegrityAlgorithm") - if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v.Phase2IntegrityAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase2LifetimeSeconds != nil { - objectKey := object.Key("Phase2LifetimeSeconds") - objectKey.Integer(*v.Phase2LifetimeSeconds) - } - - if v.PreSharedKey != nil { - objectKey := object.Key("PreSharedKey") - objectKey.String(*v.PreSharedKey) - } - - if v.RekeyFuzzPercentage != nil { - objectKey := object.Key("RekeyFuzzPercentage") - objectKey.Integer(*v.RekeyFuzzPercentage) - } - - if v.RekeyMarginTimeSeconds != nil { - objectKey := object.Key("RekeyMarginTimeSeconds") - objectKey.Integer(*v.RekeyMarginTimeSeconds) - } - - if v.ReplayWindowSize != nil { - objectKey := object.Key("ReplayWindowSize") - objectKey.Integer(*v.ReplayWindowSize) - } - - if v.StartupAction != nil { - objectKey := object.Key("StartupAction") - objectKey.String(*v.StartupAction) - } - - if v.TunnelInsideCidr != nil { - objectKey := object.Key("TunnelInsideCidr") - objectKey.String(*v.TunnelInsideCidr) - } - - if v.TunnelInsideIpv6Cidr != nil { - objectKey := object.Key("TunnelInsideIpv6Cidr") - objectKey.String(*v.TunnelInsideIpv6Cidr) - } - - return nil -} - -func awsEc2query_serializeDocumentNatGatewayIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkAclIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkBandwidthGbps(v *types.NetworkBandwidthGbps, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - switch { - case math.IsNaN(*v.Max): - objectKey.String("NaN") - - case math.IsInf(*v.Max, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Max, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Max) - - } - } - - if v.Min != nil { - objectKey := object.Key("Min") - switch { - case math.IsNaN(*v.Min): - objectKey.String("NaN") - - case math.IsInf(*v.Min, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Min, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Min) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentNetworkBandwidthGbpsRequest(v *types.NetworkBandwidthGbpsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - switch { - case math.IsNaN(*v.Max): - objectKey.String("NaN") - - case math.IsInf(*v.Max, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Max, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Max) - - } - } - - if v.Min != nil { - objectKey := object.Key("Min") - switch { - case math.IsNaN(*v.Min): - objectKey.String("NaN") - - case math.IsInf(*v.Min, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Min, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Min) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentNetworkInsightsAccessScopeAnalysisIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkInsightsAccessScopeIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkInsightsAnalysisIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkInsightsPathIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v *types.NetworkInterfaceAttachmentChanges, value query.Value) error { - object := value.Object() - _ = object - - if v.AttachmentId != nil { - objectKey := object.Key("AttachmentId") - objectKey.String(*v.AttachmentId) - } - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - return nil -} - -func awsEc2query_serializeDocumentNetworkInterfaceCount(v *types.NetworkInterfaceCount, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentNetworkInterfaceCountRequest(v *types.NetworkInterfaceCountRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentNetworkInterfaceIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNetworkInterfacePermissionIdList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentNewDhcpConfiguration(v *types.NewDhcpConfiguration, value query.Value) error { - object := value.Object() - _ = object - - if v.Key != nil { - objectKey := object.Key("Key") - objectKey.String(*v.Key) - } - - if v.Values != nil { - objectKey := object.FlatKey("Value") - if err := awsEc2query_serializeDocumentValueStringList(v.Values, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentNewDhcpConfigurationList(v []types.NewDhcpConfiguration, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentNewDhcpConfiguration(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentOccurrenceDayRequestSet(v []int32, value query.Value) error { - array := value.Array("OccurenceDay") - - for i := range v { - av := array.Value() - av.Integer(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentOnDemandOptionsRequest(v *types.OnDemandOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AllocationStrategy) > 0 { - objectKey := object.Key("AllocationStrategy") - objectKey.String(string(v.AllocationStrategy)) - } - - if v.CapacityReservationOptions != nil { - objectKey := object.Key("CapacityReservationOptions") - if err := awsEc2query_serializeDocumentCapacityReservationOptionsRequest(v.CapacityReservationOptions, objectKey); err != nil { - return err - } - } - - if v.MaxTotalPrice != nil { - objectKey := object.Key("MaxTotalPrice") - objectKey.String(*v.MaxTotalPrice) - } - - if v.MinTargetCapacity != nil { - objectKey := object.Key("MinTargetCapacity") - objectKey.Integer(*v.MinTargetCapacity) - } - - if v.SingleAvailabilityZone != nil { - objectKey := object.Key("SingleAvailabilityZone") - objectKey.Boolean(*v.SingleAvailabilityZone) - } - - if v.SingleInstanceType != nil { - objectKey := object.Key("SingleInstanceType") - objectKey.Boolean(*v.SingleInstanceType) - } - - return nil -} - -func awsEc2query_serializeDocumentOrganizationalUnitArnStringList(v []string, value query.Value) error { - array := value.Array("OrganizationalUnitArn") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentOrganizationArnStringList(v []string, value query.Value) error { - array := value.Array("OrganizationArn") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentOwnerStringList(v []string, value query.Value) error { - array := value.Array("Owner") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentPacketHeaderStatementRequest(v *types.PacketHeaderStatementRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationAddresses != nil { - objectKey := object.FlatKey("DestinationAddress") - if err := awsEc2query_serializeDocumentValueStringList(v.DestinationAddresses, objectKey); err != nil { - return err - } - } - - if v.DestinationPorts != nil { - objectKey := object.FlatKey("DestinationPort") - if err := awsEc2query_serializeDocumentValueStringList(v.DestinationPorts, objectKey); err != nil { - return err - } - } - - if v.DestinationPrefixLists != nil { - objectKey := object.FlatKey("DestinationPrefixList") - if err := awsEc2query_serializeDocumentValueStringList(v.DestinationPrefixLists, objectKey); err != nil { - return err - } - } - - if v.Protocols != nil { - objectKey := object.FlatKey("Protocol") - if err := awsEc2query_serializeDocumentProtocolList(v.Protocols, objectKey); err != nil { - return err - } - } - - if v.SourceAddresses != nil { - objectKey := object.FlatKey("SourceAddress") - if err := awsEc2query_serializeDocumentValueStringList(v.SourceAddresses, objectKey); err != nil { - return err - } - } - - if v.SourcePorts != nil { - objectKey := object.FlatKey("SourcePort") - if err := awsEc2query_serializeDocumentValueStringList(v.SourcePorts, objectKey); err != nil { - return err - } - } - - if v.SourcePrefixLists != nil { - objectKey := object.FlatKey("SourcePrefixList") - if err := awsEc2query_serializeDocumentValueStringList(v.SourcePrefixLists, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentPathRequestFilter(v *types.PathRequestFilter, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationAddress != nil { - objectKey := object.Key("DestinationAddress") - objectKey.String(*v.DestinationAddress) - } - - if v.DestinationPortRange != nil { - objectKey := object.Key("DestinationPortRange") - if err := awsEc2query_serializeDocumentRequestFilterPortRange(v.DestinationPortRange, objectKey); err != nil { - return err - } - } - - if v.SourceAddress != nil { - objectKey := object.Key("SourceAddress") - objectKey.String(*v.SourceAddress) - } - - if v.SourcePortRange != nil { - objectKey := object.Key("SourcePortRange") - if err := awsEc2query_serializeDocumentRequestFilterPortRange(v.SourcePortRange, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentPathStatementRequest(v *types.PathStatementRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.PacketHeaderStatement != nil { - objectKey := object.Key("PacketHeaderStatement") - if err := awsEc2query_serializeDocumentPacketHeaderStatementRequest(v.PacketHeaderStatement, objectKey); err != nil { - return err - } - } - - if v.ResourceStatement != nil { - objectKey := object.Key("ResourceStatement") - if err := awsEc2query_serializeDocumentResourceStatementRequest(v.ResourceStatement, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v *types.PeeringConnectionOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.AllowDnsResolutionFromRemoteVpc != nil { - objectKey := object.Key("AllowDnsResolutionFromRemoteVpc") - objectKey.Boolean(*v.AllowDnsResolutionFromRemoteVpc) - } - - if v.AllowEgressFromLocalClassicLinkToRemoteVpc != nil { - objectKey := object.Key("AllowEgressFromLocalClassicLinkToRemoteVpc") - objectKey.Boolean(*v.AllowEgressFromLocalClassicLinkToRemoteVpc) - } - - if v.AllowEgressFromLocalVpcToRemoteClassicLink != nil { - objectKey := object.Key("AllowEgressFromLocalVpcToRemoteClassicLink") - objectKey.Boolean(*v.AllowEgressFromLocalVpcToRemoteClassicLink) - } - - return nil -} - -func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v []types.Phase1DHGroupNumbersRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestListValue(v *types.Phase1DHGroupNumbersRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.Integer(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v []types.Phase1EncryptionAlgorithmsRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestListValue(v *types.Phase1EncryptionAlgorithmsRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v []types.Phase1IntegrityAlgorithmsRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestListValue(v *types.Phase1IntegrityAlgorithmsRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v []types.Phase2DHGroupNumbersRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestListValue(v *types.Phase2DHGroupNumbersRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.Integer(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v []types.Phase2EncryptionAlgorithmsRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestListValue(v *types.Phase2EncryptionAlgorithmsRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v []types.Phase2IntegrityAlgorithmsRequestListValue, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestListValue(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestListValue(v *types.Phase2IntegrityAlgorithmsRequestListValue, value query.Value) error { - object := value.Object() - _ = object - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentPlacement(v *types.Placement, value query.Value) error { - object := value.Object() - _ = object - - if v.Affinity != nil { - objectKey := object.Key("Affinity") - objectKey.String(*v.Affinity) - } - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.HostId != nil { - objectKey := object.Key("HostId") - objectKey.String(*v.HostId) - } - - if v.HostResourceGroupArn != nil { - objectKey := object.Key("HostResourceGroupArn") - objectKey.String(*v.HostResourceGroupArn) - } - - if v.PartitionNumber != nil { - objectKey := object.Key("PartitionNumber") - objectKey.Integer(*v.PartitionNumber) - } - - if v.SpreadDomain != nil { - objectKey := object.Key("SpreadDomain") - objectKey.String(*v.SpreadDomain) - } - - if len(v.Tenancy) > 0 { - objectKey := object.Key("Tenancy") - objectKey.String(string(v.Tenancy)) - } - - return nil -} - -func awsEc2query_serializeDocumentPlacementGroupIdStringList(v []string, value query.Value) error { - array := value.Array("GroupId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentPlacementGroupStringList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentPortRange(v *types.PortRange, value query.Value) error { - object := value.Object() - _ = object - - if v.From != nil { - objectKey := object.Key("From") - objectKey.Integer(*v.From) - } - - if v.To != nil { - objectKey := object.Key("To") - objectKey.Integer(*v.To) - } - - return nil -} - -func awsEc2query_serializeDocumentPrefixListId(v *types.PrefixListId, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - return nil -} - -func awsEc2query_serializeDocumentPrefixListIdList(v []types.PrefixListId, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPrefixListId(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPrefixListResourceIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentPriceScheduleSpecification(v *types.PriceScheduleSpecification, value query.Value) error { - object := value.Object() - _ = object - - if len(v.CurrencyCode) > 0 { - objectKey := object.Key("CurrencyCode") - objectKey.String(string(v.CurrencyCode)) - } - - if v.Price != nil { - objectKey := object.Key("Price") - switch { - case math.IsNaN(*v.Price): - objectKey.String("NaN") - - case math.IsInf(*v.Price, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Price, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Price) - - } - } - - if v.Term != nil { - objectKey := object.Key("Term") - objectKey.Long(*v.Term) - } - - return nil -} - -func awsEc2query_serializeDocumentPriceScheduleSpecificationList(v []types.PriceScheduleSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPriceScheduleSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPrivateDnsNameOptionsRequest(v *types.PrivateDnsNameOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EnableResourceNameDnsAAAARecord != nil { - objectKey := object.Key("EnableResourceNameDnsAAAARecord") - objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord) - } - - if v.EnableResourceNameDnsARecord != nil { - objectKey := object.Key("EnableResourceNameDnsARecord") - objectKey.Boolean(*v.EnableResourceNameDnsARecord) - } - - if len(v.HostnameType) > 0 { - objectKey := object.Key("HostnameType") - objectKey.String(string(v.HostnameType)) - } - - return nil -} - -func awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v []types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error { - array := value.Array("PrivateIpAddressConfigSet") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentScheduledInstancesPrivateIpAddressConfig(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPrivateIpAddressSpecification(v *types.PrivateIpAddressSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.Primary != nil { - objectKey := object.Key("Primary") - objectKey.Boolean(*v.Primary) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - return nil -} - -func awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v []types.PrivateIpAddressSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPrivateIpAddressSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentPrivateIpAddressStringList(v []string, value query.Value) error { - array := value.Array("PrivateIpAddress") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentProductCodeStringList(v []string, value query.Value) error { - array := value.Array("ProductCode") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentProductDescriptionList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentProtocolList(v []types.Protocol, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentPublicIpStringList(v []string, value query.Value) error { - array := value.Array("PublicIp") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentPublicIpv4PoolIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentPurchaseRequest(v *types.PurchaseRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if v.PurchaseToken != nil { - objectKey := object.Key("PurchaseToken") - objectKey.String(*v.PurchaseToken) - } - - return nil -} - -func awsEc2query_serializeDocumentPurchaseRequestSet(v []types.PurchaseRequest, value query.Value) error { - array := value.Array("PurchaseRequest") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentPurchaseRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentReasonCodesList(v []types.ReportInstanceReasonCodes, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentRegionNames(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRegionNameStringList(v []string, value query.Value) error { - array := value.Array("RegionName") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRegisterInstanceTagAttributeRequest(v *types.RegisterInstanceTagAttributeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.IncludeAllTagsOfInstance != nil { - objectKey := object.Key("IncludeAllTagsOfInstance") - objectKey.Boolean(*v.IncludeAllTagsOfInstance) - } - - if v.InstanceTagKeys != nil { - objectKey := object.FlatKey("InstanceTagKey") - if err := awsEc2query_serializeDocumentInstanceTagKeySet(v.InstanceTagKeys, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentRemoveIpamOperatingRegion(v *types.RemoveIpamOperatingRegion, value query.Value) error { - object := value.Object() - _ = object - - if v.RegionName != nil { - objectKey := object.Key("RegionName") - objectKey.String(*v.RegionName) - } - - return nil -} - -func awsEc2query_serializeDocumentRemoveIpamOperatingRegionSet(v []types.RemoveIpamOperatingRegion, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentRemoveIpamOperatingRegion(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentRemovePrefixListEntries(v []types.RemovePrefixListEntry, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentRemovePrefixListEntry(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentRemovePrefixListEntry(v *types.RemovePrefixListEntry, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - return nil -} - -func awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v []string, value query.Value) error { - array := value.Array("ReplaceRootVolumeTaskId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRequestFilterPortRange(v *types.RequestFilterPortRange, value query.Value) error { - object := value.Object() - _ = object - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeDocumentRequestHostIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRequestHostIdSet(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRequestInstanceTypeList(v []types.InstanceType, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentRequestIpamResourceTag(v *types.RequestIpamResourceTag, value query.Value) error { - object := value.Object() - _ = object - - if v.Key != nil { - objectKey := object.Key("Key") - objectKey.String(*v.Key) - } - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentRequestIpamResourceTagList(v []types.RequestIpamResourceTag, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentRequestIpamResourceTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentRequestLaunchTemplateData(v *types.RequestLaunchTemplateData, value query.Value) error { - object := value.Object() - _ = object - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentLaunchTemplateBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.CapacityReservationSpecification != nil { - objectKey := object.Key("CapacityReservationSpecification") - if err := awsEc2query_serializeDocumentLaunchTemplateCapacityReservationSpecificationRequest(v.CapacityReservationSpecification, objectKey); err != nil { - return err - } - } - - if v.CpuOptions != nil { - objectKey := object.Key("CpuOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateCpuOptionsRequest(v.CpuOptions, objectKey); err != nil { - return err - } - } - - if v.CreditSpecification != nil { - objectKey := object.Key("CreditSpecification") - if err := awsEc2query_serializeDocumentCreditSpecificationRequest(v.CreditSpecification, objectKey); err != nil { - return err - } - } - - if v.DisableApiStop != nil { - objectKey := object.Key("DisableApiStop") - objectKey.Boolean(*v.DisableApiStop) - } - - if v.DisableApiTermination != nil { - objectKey := object.Key("DisableApiTermination") - objectKey.Boolean(*v.DisableApiTermination) - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if v.ElasticGpuSpecifications != nil { - objectKey := object.FlatKey("ElasticGpuSpecification") - if err := awsEc2query_serializeDocumentElasticGpuSpecificationList(v.ElasticGpuSpecifications, objectKey); err != nil { - return err - } - } - - if v.ElasticInferenceAccelerators != nil { - objectKey := object.FlatKey("ElasticInferenceAccelerator") - if err := awsEc2query_serializeDocumentLaunchTemplateElasticInferenceAcceleratorList(v.ElasticInferenceAccelerators, objectKey); err != nil { - return err - } - } - - if v.EnclaveOptions != nil { - objectKey := object.Key("EnclaveOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateEnclaveOptionsRequest(v.EnclaveOptions, objectKey); err != nil { - return err - } - } - - if v.HibernationOptions != nil { - objectKey := object.Key("HibernationOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateHibernationOptionsRequest(v.HibernationOptions, objectKey); err != nil { - return err - } - } - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentLaunchTemplateIamInstanceProfileSpecificationRequest(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if len(v.InstanceInitiatedShutdownBehavior) > 0 { - objectKey := object.Key("InstanceInitiatedShutdownBehavior") - objectKey.String(string(v.InstanceInitiatedShutdownBehavior)) - } - - if v.InstanceMarketOptions != nil { - objectKey := object.Key("InstanceMarketOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMarketOptionsRequest(v.InstanceMarketOptions, objectKey); err != nil { - return err - } - } - - if v.InstanceRequirements != nil { - objectKey := object.Key("InstanceRequirements") - if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil { - return err - } - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.KernelId != nil { - objectKey := object.Key("KernelId") - objectKey.String(*v.KernelId) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.LicenseSpecifications != nil { - objectKey := object.FlatKey("LicenseSpecification") - if err := awsEc2query_serializeDocumentLaunchTemplateLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil { - return err - } - } - - if v.MaintenanceOptions != nil { - objectKey := object.Key("MaintenanceOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMaintenanceOptionsRequest(v.MaintenanceOptions, objectKey); err != nil { - return err - } - } - - if v.MetadataOptions != nil { - objectKey := object.Key("MetadataOptions") - if err := awsEc2query_serializeDocumentLaunchTemplateInstanceMetadataOptionsRequest(v.MetadataOptions, objectKey); err != nil { - return err - } - } - - if v.Monitoring != nil { - objectKey := object.Key("Monitoring") - if err := awsEc2query_serializeDocumentLaunchTemplatesMonitoringRequest(v.Monitoring, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaces != nil { - objectKey := object.FlatKey("NetworkInterface") - if err := awsEc2query_serializeDocumentLaunchTemplateInstanceNetworkInterfaceSpecificationRequestList(v.NetworkInterfaces, objectKey); err != nil { - return err - } - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentLaunchTemplatePlacementRequest(v.Placement, objectKey); err != nil { - return err - } - } - - if v.PrivateDnsNameOptions != nil { - objectKey := object.Key("PrivateDnsNameOptions") - if err := awsEc2query_serializeDocumentLaunchTemplatePrivateDnsNameOptionsRequest(v.PrivateDnsNameOptions, objectKey); err != nil { - return err - } - } - - if v.RamDiskId != nil { - objectKey := object.Key("RamDiskId") - objectKey.String(*v.RamDiskId) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.SecurityGroups != nil { - objectKey := object.FlatKey("SecurityGroup") - if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.SecurityGroups, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentLaunchTemplateTagSpecificationRequestList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - objectKey.String(*v.UserData) - } - - return nil -} - -func awsEc2query_serializeDocumentRequestSpotLaunchSpecification(v *types.RequestSpotLaunchSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.AddressingType != nil { - objectKey := object.Key("AddressingType") - objectKey.String(*v.AddressingType) - } - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentBlockDeviceMappingList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.KernelId != nil { - objectKey := object.Key("KernelId") - objectKey.String(*v.KernelId) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.Monitoring != nil { - objectKey := object.Key("Monitoring") - if err := awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v.Monitoring, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaces != nil { - objectKey := object.FlatKey("NetworkInterface") - if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil { - return err - } - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentSpotPlacement(v.Placement, objectKey); err != nil { - return err - } - } - - if v.RamdiskId != nil { - objectKey := object.Key("RamdiskId") - objectKey.String(*v.RamdiskId) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.SecurityGroups != nil { - objectKey := object.FlatKey("SecurityGroup") - if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupList(v.SecurityGroups, objectKey); err != nil { - return err - } - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - objectKey.String(*v.UserData) - } - - return nil -} - -func awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRequestSpotLaunchSpecificationSecurityGroupList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentReservationFleetInstanceSpecification(v *types.ReservationFleetInstanceSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.AvailabilityZoneId != nil { - objectKey := object.Key("AvailabilityZoneId") - objectKey.String(*v.AvailabilityZoneId) - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if len(v.InstancePlatform) > 0 { - objectKey := object.Key("InstancePlatform") - objectKey.String(string(v.InstancePlatform)) - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.Priority != nil { - objectKey := object.Key("Priority") - objectKey.Integer(*v.Priority) - } - - if v.Weight != nil { - objectKey := object.Key("Weight") - switch { - case math.IsNaN(*v.Weight): - objectKey.String("NaN") - - case math.IsInf(*v.Weight, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Weight, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Weight) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentReservationFleetInstanceSpecificationList(v []types.ReservationFleetInstanceSpecification, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentReservationFleetInstanceSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentReservedInstanceIdSet(v []string, value query.Value) error { - array := value.Array("ReservedInstanceId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentReservedInstanceLimitPrice(v *types.ReservedInstanceLimitPrice, value query.Value) error { - object := value.Object() - _ = object - - if v.Amount != nil { - objectKey := object.Key("Amount") - switch { - case math.IsNaN(*v.Amount): - objectKey.String("NaN") - - case math.IsInf(*v.Amount, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Amount, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Amount) - - } - } - - if len(v.CurrencyCode) > 0 { - objectKey := object.Key("CurrencyCode") - objectKey.String(string(v.CurrencyCode)) - } - - return nil -} - -func awsEc2query_serializeDocumentReservedInstancesConfiguration(v *types.ReservedInstancesConfiguration, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.Platform != nil { - objectKey := object.Key("Platform") - objectKey.String(*v.Platform) - } - - if len(v.Scope) > 0 { - objectKey := object.Key("Scope") - objectKey.String(string(v.Scope)) - } - - return nil -} - -func awsEc2query_serializeDocumentReservedInstancesConfigurationList(v []types.ReservedInstancesConfiguration, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentReservedInstancesConfiguration(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentReservedInstancesIdStringList(v []string, value query.Value) error { - array := value.Array("ReservedInstancesId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentReservedInstancesModificationIdStringList(v []string, value query.Value) error { - array := value.Array("ReservedInstancesModificationId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentReservedInstancesOfferingIdStringList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentResourceIdList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentResourceList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentResourceStatementRequest(v *types.ResourceStatementRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Resources != nil { - objectKey := object.FlatKey("Resource") - if err := awsEc2query_serializeDocumentValueStringList(v.Resources, objectKey); err != nil { - return err - } - } - - if v.ResourceTypes != nil { - objectKey := object.FlatKey("ResourceType") - if err := awsEc2query_serializeDocumentValueStringList(v.ResourceTypes, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentRestorableByStringList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRouteTableIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v *types.RunInstancesMonitoringEnabled, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentS3ObjectTag(v *types.S3ObjectTag, value query.Value) error { - object := value.Object() - _ = object - - if v.Key != nil { - objectKey := object.Key("Key") - objectKey.String(*v.Key) - } - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentS3ObjectTagList(v []types.S3ObjectTag, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentS3ObjectTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentS3Storage(v *types.S3Storage, value query.Value) error { - object := value.Object() - _ = object - - if v.AWSAccessKeyId != nil { - objectKey := object.Key("AWSAccessKeyId") - objectKey.String(*v.AWSAccessKeyId) - } - - if v.Bucket != nil { - objectKey := object.Key("Bucket") - objectKey.String(*v.Bucket) - } - - if v.Prefix != nil { - objectKey := object.Key("Prefix") - objectKey.String(*v.Prefix) - } - - if v.UploadPolicy != nil { - objectKey := object.Key("UploadPolicy") - objectKey.Base64EncodeBytes(v.UploadPolicy) - } - - if v.UploadPolicySignature != nil { - objectKey := object.Key("UploadPolicySignature") - objectKey.String(*v.UploadPolicySignature) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstanceIdRequestSet(v []string, value query.Value) error { - array := value.Array("ScheduledInstanceId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentScheduledInstanceRecurrenceRequest(v *types.ScheduledInstanceRecurrenceRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Frequency != nil { - objectKey := object.Key("Frequency") - objectKey.String(*v.Frequency) - } - - if v.Interval != nil { - objectKey := object.Key("Interval") - objectKey.Integer(*v.Interval) - } - - if v.OccurrenceDays != nil { - objectKey := object.FlatKey("OccurrenceDay") - if err := awsEc2query_serializeDocumentOccurrenceDayRequestSet(v.OccurrenceDays, objectKey); err != nil { - return err - } - } - - if v.OccurrenceRelativeToEnd != nil { - objectKey := object.Key("OccurrenceRelativeToEnd") - objectKey.Boolean(*v.OccurrenceRelativeToEnd) - } - - if v.OccurrenceUnit != nil { - objectKey := object.Key("OccurrenceUnit") - objectKey.String(*v.OccurrenceUnit) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMapping(v *types.ScheduledInstancesBlockDeviceMapping, value query.Value) error { - object := value.Object() - _ = object - - if v.DeviceName != nil { - objectKey := object.Key("DeviceName") - objectKey.String(*v.DeviceName) - } - - if v.Ebs != nil { - objectKey := object.Key("Ebs") - if err := awsEc2query_serializeDocumentScheduledInstancesEbs(v.Ebs, objectKey); err != nil { - return err - } - } - - if v.NoDevice != nil { - objectKey := object.Key("NoDevice") - objectKey.String(*v.NoDevice) - } - - if v.VirtualName != nil { - objectKey := object.Key("VirtualName") - objectKey.String(*v.VirtualName) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMappingSet(v []types.ScheduledInstancesBlockDeviceMapping, value query.Value) error { - array := value.Array("BlockDeviceMapping") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMapping(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesEbs(v *types.ScheduledInstancesEbs, value query.Value) error { - object := value.Object() - _ = object - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.Iops != nil { - objectKey := object.Key("Iops") - objectKey.Integer(*v.Iops) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.VolumeSize != nil { - objectKey := object.Key("VolumeSize") - objectKey.Integer(*v.VolumeSize) - } - - if v.VolumeType != nil { - objectKey := object.Key("VolumeType") - objectKey.String(*v.VolumeType) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesIamInstanceProfile(v *types.ScheduledInstancesIamInstanceProfile, value query.Value) error { - object := value.Object() - _ = object - - if v.Arn != nil { - objectKey := object.Key("Arn") - objectKey.String(*v.Arn) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesIpv6Address(v *types.ScheduledInstancesIpv6Address, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6Address != nil { - objectKey := object.Key("Ipv6Address") - objectKey.String(*v.Ipv6Address) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesIpv6AddressList(v []types.ScheduledInstancesIpv6Address, value query.Value) error { - array := value.Array("Ipv6Address") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentScheduledInstancesIpv6Address(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesLaunchSpecification(v *types.ScheduledInstancesLaunchSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentScheduledInstancesBlockDeviceMappingSet(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentScheduledInstancesIamInstanceProfile(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.InstanceType != nil { - objectKey := object.Key("InstanceType") - objectKey.String(*v.InstanceType) - } - - if v.KernelId != nil { - objectKey := object.Key("KernelId") - objectKey.String(*v.KernelId) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.Monitoring != nil { - objectKey := object.Key("Monitoring") - if err := awsEc2query_serializeDocumentScheduledInstancesMonitoring(v.Monitoring, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaces != nil { - objectKey := object.FlatKey("NetworkInterface") - if err := awsEc2query_serializeDocumentScheduledInstancesNetworkInterfaceSet(v.NetworkInterfaces, objectKey); err != nil { - return err - } - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentScheduledInstancesPlacement(v.Placement, objectKey); err != nil { - return err - } - } - - if v.RamdiskId != nil { - objectKey := object.Key("RamdiskId") - objectKey.String(*v.RamdiskId) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - objectKey.String(*v.UserData) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesMonitoring(v *types.ScheduledInstancesMonitoring, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesNetworkInterface(v *types.ScheduledInstancesNetworkInterface, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociatePublicIpAddress != nil { - objectKey := object.Key("AssociatePublicIpAddress") - objectKey.Boolean(*v.AssociatePublicIpAddress) - } - - if v.DeleteOnTermination != nil { - objectKey := object.Key("DeleteOnTermination") - objectKey.Boolean(*v.DeleteOnTermination) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DeviceIndex != nil { - objectKey := object.Key("DeviceIndex") - objectKey.Integer(*v.DeviceIndex) - } - - if v.Groups != nil { - objectKey := object.FlatKey("Group") - if err := awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v.Groups, objectKey); err != nil { - return err - } - } - - if v.Ipv6AddressCount != nil { - objectKey := object.Key("Ipv6AddressCount") - objectKey.Integer(*v.Ipv6AddressCount) - } - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Address") - if err := awsEc2query_serializeDocumentScheduledInstancesIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.PrivateIpAddressConfigs != nil { - objectKey := object.FlatKey("PrivateIpAddressConfig") - if err := awsEc2query_serializeDocumentPrivateIpAddressConfigSet(v.PrivateIpAddressConfigs, objectKey); err != nil { - return err - } - } - - if v.SecondaryPrivateIpAddressCount != nil { - objectKey := object.Key("SecondaryPrivateIpAddressCount") - objectKey.Integer(*v.SecondaryPrivateIpAddressCount) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesNetworkInterfaceSet(v []types.ScheduledInstancesNetworkInterface, value query.Value) error { - array := value.Array("NetworkInterface") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentScheduledInstancesNetworkInterface(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesPlacement(v *types.ScheduledInstancesPlacement, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesPrivateIpAddressConfig(v *types.ScheduledInstancesPrivateIpAddressConfig, value query.Value) error { - object := value.Object() - _ = object - - if v.Primary != nil { - objectKey := object.Key("Primary") - objectKey.Boolean(*v.Primary) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - return nil -} - -func awsEc2query_serializeDocumentScheduledInstancesSecurityGroupIdSet(v []string, value query.Value) error { - array := value.Array("SecurityGroupId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupIdStringList(v []string, value query.Value) error { - array := value.Array("SecurityGroupId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupIdStringListRequest(v []string, value query.Value) error { - array := value.Array("SecurityGroupId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupRuleDescription(v *types.SecurityGroupRuleDescription, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.SecurityGroupRuleId != nil { - objectKey := object.Key("SecurityGroupRuleId") - objectKey.String(*v.SecurityGroupRuleId) - } - - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v []types.SecurityGroupRuleDescription, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentSecurityGroupRuleDescription(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupRuleIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupRuleRequest(v *types.SecurityGroupRuleRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIpv4 != nil { - objectKey := object.Key("CidrIpv4") - objectKey.String(*v.CidrIpv4) - } - - if v.CidrIpv6 != nil { - objectKey := object.Key("CidrIpv6") - objectKey.String(*v.CidrIpv6) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.IpProtocol != nil { - objectKey := object.Key("IpProtocol") - objectKey.String(*v.IpProtocol) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.ReferencedGroupId != nil { - objectKey := object.Key("ReferencedGroupId") - objectKey.String(*v.ReferencedGroupId) - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupRuleUpdate(v *types.SecurityGroupRuleUpdate, value query.Value) error { - object := value.Object() - _ = object - - if v.SecurityGroupRule != nil { - objectKey := object.Key("SecurityGroupRule") - if err := awsEc2query_serializeDocumentSecurityGroupRuleRequest(v.SecurityGroupRule, objectKey); err != nil { - return err - } - } - - if v.SecurityGroupRuleId != nil { - objectKey := object.Key("SecurityGroupRuleId") - objectKey.String(*v.SecurityGroupRuleId) - } - - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupRuleUpdateList(v []types.SecurityGroupRuleUpdate, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentSecurityGroupRuleUpdate(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentSecurityGroupStringList(v []string, value query.Value) error { - array := value.Array("SecurityGroup") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSlotDateTimeRangeRequest(v *types.SlotDateTimeRangeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EarliestTime != nil { - objectKey := object.Key("EarliestTime") - objectKey.String(smithytime.FormatDateTime(*v.EarliestTime)) - } - - if v.LatestTime != nil { - objectKey := object.Key("LatestTime") - objectKey.String(smithytime.FormatDateTime(*v.LatestTime)) - } - - return nil -} - -func awsEc2query_serializeDocumentSlotStartTimeRangeRequest(v *types.SlotStartTimeRangeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.EarliestTime != nil { - objectKey := object.Key("EarliestTime") - objectKey.String(smithytime.FormatDateTime(*v.EarliestTime)) - } - - if v.LatestTime != nil { - objectKey := object.Key("LatestTime") - objectKey.String(smithytime.FormatDateTime(*v.LatestTime)) - } - - return nil -} - -func awsEc2query_serializeDocumentSnapshotDiskContainer(v *types.SnapshotDiskContainer, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.Format != nil { - objectKey := object.Key("Format") - objectKey.String(*v.Format) - } - - if v.Url != nil { - objectKey := object.Key("Url") - objectKey.String(*v.Url) - } - - if v.UserBucket != nil { - objectKey := object.Key("UserBucket") - if err := awsEc2query_serializeDocumentUserBucket(v.UserBucket, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentSnapshotIdStringList(v []string, value query.Value) error { - array := value.Array("SnapshotId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSpotCapacityRebalance(v *types.SpotCapacityRebalance, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ReplacementStrategy) > 0 { - objectKey := object.Key("ReplacementStrategy") - objectKey.String(string(v.ReplacementStrategy)) - } - - if v.TerminationDelay != nil { - objectKey := object.Key("TerminationDelay") - objectKey.Integer(*v.TerminationDelay) - } - - return nil -} - -func awsEc2query_serializeDocumentSpotFleetLaunchSpecification(v *types.SpotFleetLaunchSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.AddressingType != nil { - objectKey := object.Key("AddressingType") - objectKey.String(*v.AddressingType) - } - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentBlockDeviceMappingList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.InstanceRequirements != nil { - objectKey := object.Key("InstanceRequirements") - if err := awsEc2query_serializeDocumentInstanceRequirements(v.InstanceRequirements, objectKey); err != nil { - return err - } - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.KernelId != nil { - objectKey := object.Key("KernelId") - objectKey.String(*v.KernelId) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.Monitoring != nil { - objectKey := object.Key("Monitoring") - if err := awsEc2query_serializeDocumentSpotFleetMonitoring(v.Monitoring, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaces != nil { - objectKey := object.FlatKey("NetworkInterfaceSet") - if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil { - return err - } - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentSpotPlacement(v.Placement, objectKey); err != nil { - return err - } - } - - if v.RamdiskId != nil { - objectKey := object.Key("RamdiskId") - objectKey.String(*v.RamdiskId) - } - - if v.SecurityGroups != nil { - objectKey := object.FlatKey("GroupSet") - if err := awsEc2query_serializeDocumentGroupIdentifierList(v.SecurityGroups, objectKey); err != nil { - return err - } - } - - if v.SpotPrice != nil { - objectKey := object.Key("SpotPrice") - objectKey.String(*v.SpotPrice) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecificationSet") - if err := awsEc2query_serializeDocumentSpotFleetTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - objectKey.String(*v.UserData) - } - - if v.WeightedCapacity != nil { - objectKey := object.Key("WeightedCapacity") - switch { - case math.IsNaN(*v.WeightedCapacity): - objectKey.String("NaN") - - case math.IsInf(*v.WeightedCapacity, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.WeightedCapacity, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.WeightedCapacity) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentSpotFleetMonitoring(v *types.SpotFleetMonitoring, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentSpotFleetRequestConfigData(v *types.SpotFleetRequestConfigData, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AllocationStrategy) > 0 { - objectKey := object.Key("AllocationStrategy") - objectKey.String(string(v.AllocationStrategy)) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Context != nil { - objectKey := object.Key("Context") - objectKey.String(*v.Context) - } - - if len(v.ExcessCapacityTerminationPolicy) > 0 { - objectKey := object.Key("ExcessCapacityTerminationPolicy") - objectKey.String(string(v.ExcessCapacityTerminationPolicy)) - } - - if v.FulfilledCapacity != nil { - objectKey := object.Key("FulfilledCapacity") - switch { - case math.IsNaN(*v.FulfilledCapacity): - objectKey.String("NaN") - - case math.IsInf(*v.FulfilledCapacity, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.FulfilledCapacity, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.FulfilledCapacity) - - } - } - - if v.IamFleetRole != nil { - objectKey := object.Key("IamFleetRole") - objectKey.String(*v.IamFleetRole) - } - - if len(v.InstanceInterruptionBehavior) > 0 { - objectKey := object.Key("InstanceInterruptionBehavior") - objectKey.String(string(v.InstanceInterruptionBehavior)) - } - - if v.InstancePoolsToUseCount != nil { - objectKey := object.Key("InstancePoolsToUseCount") - objectKey.Integer(*v.InstancePoolsToUseCount) - } - - if v.LaunchSpecifications != nil { - objectKey := object.FlatKey("LaunchSpecifications") - if err := awsEc2query_serializeDocumentLaunchSpecsList(v.LaunchSpecifications, objectKey); err != nil { - return err - } - } - - if v.LaunchTemplateConfigs != nil { - objectKey := object.FlatKey("LaunchTemplateConfigs") - if err := awsEc2query_serializeDocumentLaunchTemplateConfigList(v.LaunchTemplateConfigs, objectKey); err != nil { - return err - } - } - - if v.LoadBalancersConfig != nil { - objectKey := object.Key("LoadBalancersConfig") - if err := awsEc2query_serializeDocumentLoadBalancersConfig(v.LoadBalancersConfig, objectKey); err != nil { - return err - } - } - - if len(v.OnDemandAllocationStrategy) > 0 { - objectKey := object.Key("OnDemandAllocationStrategy") - objectKey.String(string(v.OnDemandAllocationStrategy)) - } - - if v.OnDemandFulfilledCapacity != nil { - objectKey := object.Key("OnDemandFulfilledCapacity") - switch { - case math.IsNaN(*v.OnDemandFulfilledCapacity): - objectKey.String("NaN") - - case math.IsInf(*v.OnDemandFulfilledCapacity, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.OnDemandFulfilledCapacity, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.OnDemandFulfilledCapacity) - - } - } - - if v.OnDemandMaxTotalPrice != nil { - objectKey := object.Key("OnDemandMaxTotalPrice") - objectKey.String(*v.OnDemandMaxTotalPrice) - } - - if v.OnDemandTargetCapacity != nil { - objectKey := object.Key("OnDemandTargetCapacity") - objectKey.Integer(*v.OnDemandTargetCapacity) - } - - if v.ReplaceUnhealthyInstances != nil { - objectKey := object.Key("ReplaceUnhealthyInstances") - objectKey.Boolean(*v.ReplaceUnhealthyInstances) - } - - if v.SpotMaintenanceStrategies != nil { - objectKey := object.Key("SpotMaintenanceStrategies") - if err := awsEc2query_serializeDocumentSpotMaintenanceStrategies(v.SpotMaintenanceStrategies, objectKey); err != nil { - return err - } - } - - if v.SpotMaxTotalPrice != nil { - objectKey := object.Key("SpotMaxTotalPrice") - objectKey.String(*v.SpotMaxTotalPrice) - } - - if v.SpotPrice != nil { - objectKey := object.Key("SpotPrice") - objectKey.String(*v.SpotPrice) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TargetCapacity != nil { - objectKey := object.Key("TargetCapacity") - objectKey.Integer(*v.TargetCapacity) - } - - if len(v.TargetCapacityUnitType) > 0 { - objectKey := object.Key("TargetCapacityUnitType") - objectKey.String(string(v.TargetCapacityUnitType)) - } - - if v.TerminateInstancesWithExpiration != nil { - objectKey := object.Key("TerminateInstancesWithExpiration") - objectKey.Boolean(*v.TerminateInstancesWithExpiration) - } - - if len(v.Type) > 0 { - objectKey := object.Key("Type") - objectKey.String(string(v.Type)) - } - - if v.ValidFrom != nil { - objectKey := object.Key("ValidFrom") - objectKey.String(smithytime.FormatDateTime(*v.ValidFrom)) - } - - if v.ValidUntil != nil { - objectKey := object.Key("ValidUntil") - objectKey.String(smithytime.FormatDateTime(*v.ValidUntil)) - } - - return nil -} - -func awsEc2query_serializeDocumentSpotFleetRequestIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSpotFleetTagSpecification(v *types.SpotFleetTagSpecification, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ResourceType) > 0 { - objectKey := object.Key("ResourceType") - objectKey.String(string(v.ResourceType)) - } - - if v.Tags != nil { - objectKey := object.FlatKey("Tag") - if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentSpotFleetTagSpecificationList(v []types.SpotFleetTagSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentSpotFleetTagSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentSpotInstanceRequestIdList(v []string, value query.Value) error { - array := value.Array("SpotInstanceRequestId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentSpotMaintenanceStrategies(v *types.SpotMaintenanceStrategies, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityRebalance != nil { - objectKey := object.Key("CapacityRebalance") - if err := awsEc2query_serializeDocumentSpotCapacityRebalance(v.CapacityRebalance, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentSpotMarketOptions(v *types.SpotMarketOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.BlockDurationMinutes != nil { - objectKey := object.Key("BlockDurationMinutes") - objectKey.Integer(*v.BlockDurationMinutes) - } - - if len(v.InstanceInterruptionBehavior) > 0 { - objectKey := object.Key("InstanceInterruptionBehavior") - objectKey.String(string(v.InstanceInterruptionBehavior)) - } - - if v.MaxPrice != nil { - objectKey := object.Key("MaxPrice") - objectKey.String(*v.MaxPrice) - } - - if len(v.SpotInstanceType) > 0 { - objectKey := object.Key("SpotInstanceType") - objectKey.String(string(v.SpotInstanceType)) - } - - if v.ValidUntil != nil { - objectKey := object.Key("ValidUntil") - objectKey.String(smithytime.FormatDateTime(*v.ValidUntil)) - } - - return nil -} - -func awsEc2query_serializeDocumentSpotOptionsRequest(v *types.SpotOptionsRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AllocationStrategy) > 0 { - objectKey := object.Key("AllocationStrategy") - objectKey.String(string(v.AllocationStrategy)) - } - - if len(v.InstanceInterruptionBehavior) > 0 { - objectKey := object.Key("InstanceInterruptionBehavior") - objectKey.String(string(v.InstanceInterruptionBehavior)) - } - - if v.InstancePoolsToUseCount != nil { - objectKey := object.Key("InstancePoolsToUseCount") - objectKey.Integer(*v.InstancePoolsToUseCount) - } - - if v.MaintenanceStrategies != nil { - objectKey := object.Key("MaintenanceStrategies") - if err := awsEc2query_serializeDocumentFleetSpotMaintenanceStrategiesRequest(v.MaintenanceStrategies, objectKey); err != nil { - return err - } - } - - if v.MaxTotalPrice != nil { - objectKey := object.Key("MaxTotalPrice") - objectKey.String(*v.MaxTotalPrice) - } - - if v.MinTargetCapacity != nil { - objectKey := object.Key("MinTargetCapacity") - objectKey.Integer(*v.MinTargetCapacity) - } - - if v.SingleAvailabilityZone != nil { - objectKey := object.Key("SingleAvailabilityZone") - objectKey.Boolean(*v.SingleAvailabilityZone) - } - - if v.SingleInstanceType != nil { - objectKey := object.Key("SingleInstanceType") - objectKey.Boolean(*v.SingleInstanceType) - } - - return nil -} - -func awsEc2query_serializeDocumentSpotPlacement(v *types.SpotPlacement, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if len(v.Tenancy) > 0 { - objectKey := object.Key("Tenancy") - objectKey.String(string(v.Tenancy)) - } - - return nil -} - -func awsEc2query_serializeDocumentStorage(v *types.Storage, value query.Value) error { - object := value.Object() - _ = object - - if v.S3 != nil { - objectKey := object.Key("S3") - if err := awsEc2query_serializeDocumentS3Storage(v.S3, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentStorageLocation(v *types.StorageLocation, value query.Value) error { - object := value.Object() - _ = object - - if v.Bucket != nil { - objectKey := object.Key("Bucket") - objectKey.String(*v.Bucket) - } - - if v.Key != nil { - objectKey := object.Key("Key") - objectKey.String(*v.Key) - } - - return nil -} - -func awsEc2query_serializeDocumentSubnetConfiguration(v *types.SubnetConfiguration, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv4 != nil { - objectKey := object.Key("Ipv4") - objectKey.String(*v.Ipv4) - } - - if v.Ipv6 != nil { - objectKey := object.Key("Ipv6") - objectKey.String(*v.Ipv6) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeDocumentSubnetConfigurationsList(v []types.SubnetConfiguration, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentSubnetConfiguration(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentSubnetIdStringList(v []string, value query.Value) error { - array := value.Array("SubnetId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTag(v *types.Tag, value query.Value) error { - object := value.Object() - _ = object - - if v.Key != nil { - objectKey := object.Key("Key") - objectKey.String(*v.Key) - } - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeDocumentTagList(v []types.Tag, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentTagSpecification(v *types.TagSpecification, value query.Value) error { - object := value.Object() - _ = object - - if len(v.ResourceType) > 0 { - objectKey := object.Key("ResourceType") - objectKey.String(string(v.ResourceType)) - } - - if v.Tags != nil { - objectKey := object.FlatKey("Tag") - if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentTagSpecificationList(v []types.TagSpecification, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentTagSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v *types.TargetCapacitySpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if len(v.DefaultTargetCapacityType) > 0 { - objectKey := object.Key("DefaultTargetCapacityType") - objectKey.String(string(v.DefaultTargetCapacityType)) - } - - if v.OnDemandTargetCapacity != nil { - objectKey := object.Key("OnDemandTargetCapacity") - objectKey.Integer(*v.OnDemandTargetCapacity) - } - - if v.SpotTargetCapacity != nil { - objectKey := object.Key("SpotTargetCapacity") - objectKey.Integer(*v.SpotTargetCapacity) - } - - if len(v.TargetCapacityUnitType) > 0 { - objectKey := object.Key("TargetCapacityUnitType") - objectKey.String(string(v.TargetCapacityUnitType)) - } - - if v.TotalTargetCapacity != nil { - objectKey := object.Key("TotalTargetCapacity") - objectKey.Integer(*v.TotalTargetCapacity) - } - - return nil -} - -func awsEc2query_serializeDocumentTargetConfigurationRequest(v *types.TargetConfigurationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if v.OfferingId != nil { - objectKey := object.Key("OfferingId") - objectKey.String(*v.OfferingId) - } - - return nil -} - -func awsEc2query_serializeDocumentTargetConfigurationRequestSet(v []types.TargetConfigurationRequest, value query.Value) error { - array := value.Array("TargetConfigurationRequest") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentTargetConfigurationRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentTargetGroup(v *types.TargetGroup, value query.Value) error { - object := value.Object() - _ = object - - if v.Arn != nil { - objectKey := object.Key("Arn") - objectKey.String(*v.Arn) - } - - return nil -} - -func awsEc2query_serializeDocumentTargetGroups(v []types.TargetGroup, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentTargetGroup(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentTargetGroupsConfig(v *types.TargetGroupsConfig, value query.Value) error { - object := value.Object() - _ = object - - if v.TargetGroups != nil { - objectKey := object.FlatKey("TargetGroups") - if err := awsEc2query_serializeDocumentTargetGroups(v.TargetGroups, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentThroughResourcesStatementRequest(v *types.ThroughResourcesStatementRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.ResourceStatement != nil { - objectKey := object.Key("ResourceStatement") - if err := awsEc2query_serializeDocumentResourceStatementRequest(v.ResourceStatement, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentThroughResourcesStatementRequestList(v []types.ThroughResourcesStatementRequest, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentThroughResourcesStatementRequest(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentTotalLocalStorageGB(v *types.TotalLocalStorageGB, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - switch { - case math.IsNaN(*v.Max): - objectKey.String("NaN") - - case math.IsInf(*v.Max, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Max, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Max) - - } - } - - if v.Min != nil { - objectKey := object.Key("Min") - switch { - case math.IsNaN(*v.Min): - objectKey.String("NaN") - - case math.IsInf(*v.Min, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Min, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Min) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentTotalLocalStorageGBRequest(v *types.TotalLocalStorageGBRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - switch { - case math.IsNaN(*v.Max): - objectKey.String("NaN") - - case math.IsInf(*v.Max, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Max, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Max) - - } - } - - if v.Min != nil { - objectKey := object.Key("Min") - switch { - case math.IsNaN(*v.Min): - objectKey.String("NaN") - - case math.IsInf(*v.Min, 1): - objectKey.String("Infinity") - - case math.IsInf(*v.Min, -1): - objectKey.String("-Infinity") - - default: - objectKey.Double(*v.Min) - - } - } - - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorFilterIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorFilterRuleFieldList(v []types.TrafficMirrorFilterRuleField, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v []types.TrafficMirrorNetworkService, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v *types.TrafficMirrorPortRangeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorSessionFieldList(v []types.TrafficMirrorSessionField, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorSessionIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTrafficMirrorTargetIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v []string, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayConnectPeerIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayConnectRequestBgpOptions(v *types.TransitGatewayConnectRequestBgpOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.PeerAsn != nil { - objectKey := object.Key("PeerAsn") - objectKey.Long(*v.PeerAsn) - } - - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayMulticastDomainIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayPolicyTableIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayRequestOptions(v *types.TransitGatewayRequestOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.AmazonSideAsn != nil { - objectKey := object.Key("AmazonSideAsn") - objectKey.Long(*v.AmazonSideAsn) - } - - if len(v.AutoAcceptSharedAttachments) > 0 { - objectKey := object.Key("AutoAcceptSharedAttachments") - objectKey.String(string(v.AutoAcceptSharedAttachments)) - } - - if len(v.DefaultRouteTableAssociation) > 0 { - objectKey := object.Key("DefaultRouteTableAssociation") - objectKey.String(string(v.DefaultRouteTableAssociation)) - } - - if len(v.DefaultRouteTablePropagation) > 0 { - objectKey := object.Key("DefaultRouteTablePropagation") - objectKey.String(string(v.DefaultRouteTablePropagation)) - } - - if len(v.DnsSupport) > 0 { - objectKey := object.Key("DnsSupport") - objectKey.String(string(v.DnsSupport)) - } - - if len(v.MulticastSupport) > 0 { - objectKey := object.Key("MulticastSupport") - objectKey.String(string(v.MulticastSupport)) - } - - if len(v.SecurityGroupReferencingSupport) > 0 { - objectKey := object.Key("SecurityGroupReferencingSupport") - objectKey.String(string(v.SecurityGroupReferencingSupport)) - } - - if v.TransitGatewayCidrBlocks != nil { - objectKey := object.FlatKey("TransitGatewayCidrBlocks") - if err := awsEc2query_serializeDocumentTransitGatewayCidrBlockStringList(v.TransitGatewayCidrBlocks, objectKey); err != nil { - return err - } - } - - if len(v.VpnEcmpSupport) > 0 { - objectKey := object.Key("VpnEcmpSupport") - objectKey.String(string(v.VpnEcmpSupport)) - } - - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayRouteTableAnnouncementIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewayRouteTableIdStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentTrunkInterfaceAssociationIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentUserBucket(v *types.UserBucket, value query.Value) error { - object := value.Object() - _ = object - - if v.S3Bucket != nil { - objectKey := object.Key("S3Bucket") - objectKey.String(*v.S3Bucket) - } - - if v.S3Key != nil { - objectKey := object.Key("S3Key") - objectKey.String(*v.S3Key) - } - - return nil -} - -func awsEc2query_serializeDocumentUserData(v *types.UserData, value query.Value) error { - object := value.Object() - _ = object - - if v.Data != nil { - objectKey := object.Key("Data") - objectKey.String(*v.Data) - } - - return nil -} - -func awsEc2query_serializeDocumentUserGroupStringList(v []string, value query.Value) error { - array := value.Array("UserGroup") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentUserIdGroupPair(v *types.UserIdGroupPair, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.PeeringStatus != nil { - objectKey := object.Key("PeeringStatus") - objectKey.String(*v.PeeringStatus) - } - - if v.UserId != nil { - objectKey := object.Key("UserId") - objectKey.String(*v.UserId) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeDocumentUserIdGroupPairList(v []types.UserIdGroupPair, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentUserIdGroupPair(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentUserIdStringList(v []string, value query.Value) error { - array := value.Array("UserId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentValueStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVCpuCountRange(v *types.VCpuCountRange, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentVCpuCountRangeRequest(v *types.VCpuCountRangeRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.Max != nil { - objectKey := object.Key("Max") - objectKey.Integer(*v.Max) - } - - if v.Min != nil { - objectKey := object.Key("Min") - objectKey.Integer(*v.Min) - } - - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessEndpointIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessGroupIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessInstanceIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessLogCloudWatchLogsDestinationOptions(v *types.VerifiedAccessLogCloudWatchLogsDestinationOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - if v.LogGroup != nil { - objectKey := object.Key("LogGroup") - objectKey.String(*v.LogGroup) - } - - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessLogKinesisDataFirehoseDestinationOptions(v *types.VerifiedAccessLogKinesisDataFirehoseDestinationOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.DeliveryStream != nil { - objectKey := object.Key("DeliveryStream") - objectKey.String(*v.DeliveryStream) - } - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessLogOptions(v *types.VerifiedAccessLogOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.CloudWatchLogs != nil { - objectKey := object.Key("CloudWatchLogs") - if err := awsEc2query_serializeDocumentVerifiedAccessLogCloudWatchLogsDestinationOptions(v.CloudWatchLogs, objectKey); err != nil { - return err - } - } - - if v.IncludeTrustContext != nil { - objectKey := object.Key("IncludeTrustContext") - objectKey.Boolean(*v.IncludeTrustContext) - } - - if v.KinesisDataFirehose != nil { - objectKey := object.Key("KinesisDataFirehose") - if err := awsEc2query_serializeDocumentVerifiedAccessLogKinesisDataFirehoseDestinationOptions(v.KinesisDataFirehose, objectKey); err != nil { - return err - } - } - - if v.LogVersion != nil { - objectKey := object.Key("LogVersion") - objectKey.String(*v.LogVersion) - } - - if v.S3 != nil { - objectKey := object.Key("S3") - if err := awsEc2query_serializeDocumentVerifiedAccessLogS3DestinationOptions(v.S3, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessLogS3DestinationOptions(v *types.VerifiedAccessLogS3DestinationOptions, value query.Value) error { - object := value.Object() - _ = object - - if v.BucketName != nil { - objectKey := object.Key("BucketName") - objectKey.String(*v.BucketName) - } - - if v.BucketOwner != nil { - objectKey := object.Key("BucketOwner") - objectKey.String(*v.BucketOwner) - } - - if v.Enabled != nil { - objectKey := object.Key("Enabled") - objectKey.Boolean(*v.Enabled) - } - - if v.Prefix != nil { - objectKey := object.Key("Prefix") - objectKey.String(*v.Prefix) - } - - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v *types.VerifiedAccessSseSpecificationRequest, value query.Value) error { - object := value.Object() - _ = object - - if v.CustomerManagedKeyEnabled != nil { - objectKey := object.Key("CustomerManagedKeyEnabled") - objectKey.Boolean(*v.CustomerManagedKeyEnabled) - } - - if v.KmsKeyArn != nil { - objectKey := object.Key("KmsKeyArn") - objectKey.String(*v.KmsKeyArn) - } - - return nil -} - -func awsEc2query_serializeDocumentVerifiedAccessTrustProviderIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVersionStringList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVirtualizationTypeSet(v []types.VirtualizationType, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsEc2query_serializeDocumentVolumeDetail(v *types.VolumeDetail, value query.Value) error { - object := value.Object() - _ = object - - if v.Size != nil { - objectKey := object.Key("Size") - objectKey.Long(*v.Size) - } - - return nil -} - -func awsEc2query_serializeDocumentVolumeIdStringList(v []string, value query.Value) error { - array := value.Array("VolumeId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcClassicLinkIdList(v []string, value query.Value) error { - array := value.Array("VpcId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcEndpointIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcEndpointServiceIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcIdStringList(v []string, value query.Value) error { - array := value.Array("VpcId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpcPeeringConnectionIdList(v []string, value query.Value) error { - array := value.Array("Item") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpnConnectionIdStringList(v []string, value query.Value) error { - array := value.Array("VpnConnectionId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpnConnectionOptionsSpecification(v *types.VpnConnectionOptionsSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.EnableAcceleration != nil { - objectKey := object.Key("EnableAcceleration") - objectKey.Boolean(*v.EnableAcceleration) - } - - if v.LocalIpv4NetworkCidr != nil { - objectKey := object.Key("LocalIpv4NetworkCidr") - objectKey.String(*v.LocalIpv4NetworkCidr) - } - - if v.LocalIpv6NetworkCidr != nil { - objectKey := object.Key("LocalIpv6NetworkCidr") - objectKey.String(*v.LocalIpv6NetworkCidr) - } - - if v.OutsideIpAddressType != nil { - objectKey := object.Key("OutsideIpAddressType") - objectKey.String(*v.OutsideIpAddressType) - } - - if v.RemoteIpv4NetworkCidr != nil { - objectKey := object.Key("RemoteIpv4NetworkCidr") - objectKey.String(*v.RemoteIpv4NetworkCidr) - } - - if v.RemoteIpv6NetworkCidr != nil { - objectKey := object.Key("RemoteIpv6NetworkCidr") - objectKey.String(*v.RemoteIpv6NetworkCidr) - } - - if v.StaticRoutesOnly != nil { - objectKey := object.Key("StaticRoutesOnly") - objectKey.Boolean(*v.StaticRoutesOnly) - } - - if v.TransportTransitGatewayAttachmentId != nil { - objectKey := object.Key("TransportTransitGatewayAttachmentId") - objectKey.String(*v.TransportTransitGatewayAttachmentId) - } - - if len(v.TunnelInsideIpVersion) > 0 { - objectKey := object.Key("TunnelInsideIpVersion") - objectKey.String(string(v.TunnelInsideIpVersion)) - } - - if v.TunnelOptions != nil { - objectKey := object.FlatKey("TunnelOptions") - if err := awsEc2query_serializeDocumentVpnTunnelOptionsSpecificationsList(v.TunnelOptions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentVpnGatewayIdStringList(v []string, value query.Value) error { - array := value.Array("VpnGatewayId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentVpnTunnelLogOptionsSpecification(v *types.VpnTunnelLogOptionsSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.CloudWatchLogOptions != nil { - objectKey := object.Key("CloudWatchLogOptions") - if err := awsEc2query_serializeDocumentCloudWatchLogOptionsSpecification(v.CloudWatchLogOptions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeDocumentVpnTunnelOptionsSpecification(v *types.VpnTunnelOptionsSpecification, value query.Value) error { - object := value.Object() - _ = object - - if v.DPDTimeoutAction != nil { - objectKey := object.Key("DPDTimeoutAction") - objectKey.String(*v.DPDTimeoutAction) - } - - if v.DPDTimeoutSeconds != nil { - objectKey := object.Key("DPDTimeoutSeconds") - objectKey.Integer(*v.DPDTimeoutSeconds) - } - - if v.EnableTunnelLifecycleControl != nil { - objectKey := object.Key("EnableTunnelLifecycleControl") - objectKey.Boolean(*v.EnableTunnelLifecycleControl) - } - - if v.IKEVersions != nil { - objectKey := object.FlatKey("IKEVersion") - if err := awsEc2query_serializeDocumentIKEVersionsRequestList(v.IKEVersions, objectKey); err != nil { - return err - } - } - - if v.LogOptions != nil { - objectKey := object.Key("LogOptions") - if err := awsEc2query_serializeDocumentVpnTunnelLogOptionsSpecification(v.LogOptions, objectKey); err != nil { - return err - } - } - - if v.Phase1DHGroupNumbers != nil { - objectKey := object.FlatKey("Phase1DHGroupNumber") - if err := awsEc2query_serializeDocumentPhase1DHGroupNumbersRequestList(v.Phase1DHGroupNumbers, objectKey); err != nil { - return err - } - } - - if v.Phase1EncryptionAlgorithms != nil { - objectKey := object.FlatKey("Phase1EncryptionAlgorithm") - if err := awsEc2query_serializeDocumentPhase1EncryptionAlgorithmsRequestList(v.Phase1EncryptionAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase1IntegrityAlgorithms != nil { - objectKey := object.FlatKey("Phase1IntegrityAlgorithm") - if err := awsEc2query_serializeDocumentPhase1IntegrityAlgorithmsRequestList(v.Phase1IntegrityAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase1LifetimeSeconds != nil { - objectKey := object.Key("Phase1LifetimeSeconds") - objectKey.Integer(*v.Phase1LifetimeSeconds) - } - - if v.Phase2DHGroupNumbers != nil { - objectKey := object.FlatKey("Phase2DHGroupNumber") - if err := awsEc2query_serializeDocumentPhase2DHGroupNumbersRequestList(v.Phase2DHGroupNumbers, objectKey); err != nil { - return err - } - } - - if v.Phase2EncryptionAlgorithms != nil { - objectKey := object.FlatKey("Phase2EncryptionAlgorithm") - if err := awsEc2query_serializeDocumentPhase2EncryptionAlgorithmsRequestList(v.Phase2EncryptionAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase2IntegrityAlgorithms != nil { - objectKey := object.FlatKey("Phase2IntegrityAlgorithm") - if err := awsEc2query_serializeDocumentPhase2IntegrityAlgorithmsRequestList(v.Phase2IntegrityAlgorithms, objectKey); err != nil { - return err - } - } - - if v.Phase2LifetimeSeconds != nil { - objectKey := object.Key("Phase2LifetimeSeconds") - objectKey.Integer(*v.Phase2LifetimeSeconds) - } - - if v.PreSharedKey != nil { - objectKey := object.Key("PreSharedKey") - objectKey.String(*v.PreSharedKey) - } - - if v.RekeyFuzzPercentage != nil { - objectKey := object.Key("RekeyFuzzPercentage") - objectKey.Integer(*v.RekeyFuzzPercentage) - } - - if v.RekeyMarginTimeSeconds != nil { - objectKey := object.Key("RekeyMarginTimeSeconds") - objectKey.Integer(*v.RekeyMarginTimeSeconds) - } - - if v.ReplayWindowSize != nil { - objectKey := object.Key("ReplayWindowSize") - objectKey.Integer(*v.ReplayWindowSize) - } - - if v.StartupAction != nil { - objectKey := object.Key("StartupAction") - objectKey.String(*v.StartupAction) - } - - if v.TunnelInsideCidr != nil { - objectKey := object.Key("TunnelInsideCidr") - objectKey.String(*v.TunnelInsideCidr) - } - - if v.TunnelInsideIpv6Cidr != nil { - objectKey := object.Key("TunnelInsideIpv6Cidr") - objectKey.String(*v.TunnelInsideIpv6Cidr) - } - - return nil -} - -func awsEc2query_serializeDocumentVpnTunnelOptionsSpecificationsList(v []types.VpnTunnelOptionsSpecification, value query.Value) error { - array := value.Array("Member") - - for i := range v { - av := array.Value() - if err := awsEc2query_serializeDocumentVpnTunnelOptionsSpecification(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsEc2query_serializeDocumentZoneIdStringList(v []string, value query.Value) error { - array := value.Array("ZoneId") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeDocumentZoneNameStringList(v []string, value query.Value) error { - array := value.Array("ZoneName") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsEc2query_serializeOpDocumentAcceptAddressTransferInput(v *AcceptAddressTransferInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Address != nil { - objectKey := object.Key("Address") - objectKey.String(*v.Address) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAcceptReservedInstancesExchangeQuoteInput(v *AcceptReservedInstancesExchangeQuoteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ReservedInstanceIds != nil { - objectKey := object.FlatKey("ReservedInstanceId") - if err := awsEc2query_serializeDocumentReservedInstanceIdSet(v.ReservedInstanceIds, objectKey); err != nil { - return err - } - } - - if v.TargetConfigurations != nil { - objectKey := object.FlatKey("TargetConfiguration") - if err := awsEc2query_serializeDocumentTargetConfigurationRequestSet(v.TargetConfigurations, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAcceptTransitGatewayMulticastDomainAssociationsInput(v *AcceptTransitGatewayMulticastDomainAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetIds") - if err := awsEc2query_serializeDocumentValueStringList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAcceptTransitGatewayPeeringAttachmentInput(v *AcceptTransitGatewayPeeringAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAcceptTransitGatewayVpcAttachmentInput(v *AcceptTransitGatewayVpcAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAcceptVpcEndpointConnectionsInput(v *AcceptVpcEndpointConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - if v.VpcEndpointIds != nil { - objectKey := object.FlatKey("VpcEndpointId") - if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAcceptVpcPeeringConnectionInput(v *AcceptVpcPeeringConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAdvertiseByoipCidrInput(v *AdvertiseByoipCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Asn != nil { - objectKey := object.Key("Asn") - objectKey.String(*v.Asn) - } - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkBorderGroup != nil { - objectKey := object.Key("NetworkBorderGroup") - objectKey.String(*v.NetworkBorderGroup) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAllocateAddressInput(v *AllocateAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Address != nil { - objectKey := object.Key("Address") - objectKey.String(*v.Address) - } - - if v.CustomerOwnedIpv4Pool != nil { - objectKey := object.Key("CustomerOwnedIpv4Pool") - objectKey.String(*v.CustomerOwnedIpv4Pool) - } - - if len(v.Domain) > 0 { - objectKey := object.Key("Domain") - objectKey.String(string(v.Domain)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkBorderGroup != nil { - objectKey := object.Key("NetworkBorderGroup") - objectKey.String(*v.NetworkBorderGroup) - } - - if v.PublicIpv4Pool != nil { - objectKey := object.Key("PublicIpv4Pool") - objectKey.String(*v.PublicIpv4Pool) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAllocateHostsInput(v *AllocateHostsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssetIds != nil { - objectKey := object.FlatKey("AssetId") - if err := awsEc2query_serializeDocumentAssetIdList(v.AssetIds, objectKey); err != nil { - return err - } - } - - if len(v.AutoPlacement) > 0 { - objectKey := object.Key("AutoPlacement") - objectKey.String(string(v.AutoPlacement)) - } - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if len(v.HostMaintenance) > 0 { - objectKey := object.Key("HostMaintenance") - objectKey.String(string(v.HostMaintenance)) - } - - if len(v.HostRecovery) > 0 { - objectKey := object.Key("HostRecovery") - objectKey.String(string(v.HostRecovery)) - } - - if v.InstanceFamily != nil { - objectKey := object.Key("InstanceFamily") - objectKey.String(*v.InstanceFamily) - } - - if v.InstanceType != nil { - objectKey := object.Key("InstanceType") - objectKey.String(*v.InstanceType) - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.Quantity != nil { - objectKey := object.Key("Quantity") - objectKey.Integer(*v.Quantity) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAllocateIpamPoolCidrInput(v *AllocateIpamPoolCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllowedCidrs != nil { - objectKey := object.FlatKey("AllowedCidr") - if err := awsEc2query_serializeDocumentIpamPoolAllocationAllowedCidrs(v.AllowedCidrs, objectKey); err != nil { - return err - } - } - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DisallowedCidrs != nil { - objectKey := object.FlatKey("DisallowedCidr") - if err := awsEc2query_serializeDocumentIpamPoolAllocationDisallowedCidrs(v.DisallowedCidrs, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.NetmaskLength != nil { - objectKey := object.Key("NetmaskLength") - objectKey.Integer(*v.NetmaskLength) - } - - if v.PreviewNextCidr != nil { - objectKey := object.Key("PreviewNextCidr") - objectKey.Boolean(*v.PreviewNextCidr) - } - - return nil -} - -func awsEc2query_serializeOpDocumentApplySecurityGroupsToClientVpnTargetNetworkInput(v *ApplySecurityGroupsToClientVpnTargetNetworkInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssignIpv6AddressesInput(v *AssignIpv6AddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6AddressCount != nil { - objectKey := object.Key("Ipv6AddressCount") - objectKey.Integer(*v.Ipv6AddressCount) - } - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Addresses") - if err := awsEc2query_serializeDocumentIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.Ipv6PrefixCount != nil { - objectKey := object.Key("Ipv6PrefixCount") - objectKey.Integer(*v.Ipv6PrefixCount) - } - - if v.Ipv6Prefixes != nil { - objectKey := object.FlatKey("Ipv6Prefix") - if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv6Prefixes, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssignPrivateIpAddressesInput(v *AssignPrivateIpAddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllowReassignment != nil { - objectKey := object.Key("AllowReassignment") - objectKey.Boolean(*v.AllowReassignment) - } - - if v.Ipv4PrefixCount != nil { - objectKey := object.Key("Ipv4PrefixCount") - objectKey.Integer(*v.Ipv4PrefixCount) - } - - if v.Ipv4Prefixes != nil { - objectKey := object.FlatKey("Ipv4Prefix") - if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv4Prefixes, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddress") - if err := awsEc2query_serializeDocumentPrivateIpAddressStringList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - if v.SecondaryPrivateIpAddressCount != nil { - objectKey := object.Key("SecondaryPrivateIpAddressCount") - objectKey.Integer(*v.SecondaryPrivateIpAddressCount) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssignPrivateNatGatewayAddressInput(v *AssignPrivateNatGatewayAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - if v.PrivateIpAddressCount != nil { - objectKey := object.Key("PrivateIpAddressCount") - objectKey.Integer(*v.PrivateIpAddressCount) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddress") - if err := awsEc2query_serializeDocumentIpList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateAddressInput(v *AssociateAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if v.AllowReassociation != nil { - objectKey := object.Key("AllowReassociation") - objectKey.Boolean(*v.AllowReassociation) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.PublicIp != nil { - objectKey := object.Key("PublicIp") - objectKey.String(*v.PublicIp) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateClientVpnTargetNetworkInput(v *AssociateClientVpnTargetNetworkInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateDhcpOptionsInput(v *AssociateDhcpOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DhcpOptionsId != nil { - objectKey := object.Key("DhcpOptionsId") - objectKey.String(*v.DhcpOptionsId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateEnclaveCertificateIamRoleInput(v *AssociateEnclaveCertificateIamRoleInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CertificateArn != nil { - objectKey := object.Key("CertificateArn") - objectKey.String(*v.CertificateArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RoleArn != nil { - objectKey := object.Key("RoleArn") - objectKey.String(*v.RoleArn) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateIamInstanceProfileInput(v *AssociateIamInstanceProfileInput, value query.Value) error { - object := value.Object() - _ = object - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateInstanceEventWindowInput(v *AssociateInstanceEventWindowInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationTarget != nil { - objectKey := object.Key("AssociationTarget") - if err := awsEc2query_serializeDocumentInstanceEventWindowAssociationRequest(v.AssociationTarget, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceEventWindowId != nil { - objectKey := object.Key("InstanceEventWindowId") - objectKey.String(*v.InstanceEventWindowId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateIpamByoasnInput(v *AssociateIpamByoasnInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Asn != nil { - objectKey := object.Key("Asn") - objectKey.String(*v.Asn) - } - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateIpamResourceDiscoveryInput(v *AssociateIpamResourceDiscoveryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamId != nil { - objectKey := object.Key("IpamId") - objectKey.String(*v.IpamId) - } - - if v.IpamResourceDiscoveryId != nil { - objectKey := object.Key("IpamResourceDiscoveryId") - objectKey.String(*v.IpamResourceDiscoveryId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateNatGatewayAddressInput(v *AssociateNatGatewayAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationIds != nil { - objectKey := object.FlatKey("AllocationId") - if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddress") - if err := awsEc2query_serializeDocumentIpList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateRouteTableInput(v *AssociateRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GatewayId != nil { - objectKey := object.Key("GatewayId") - objectKey.String(*v.GatewayId) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateSubnetCidrBlockInput(v *AssociateSubnetCidrBlockInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6CidrBlock != nil { - objectKey := object.Key("Ipv6CidrBlock") - objectKey.String(*v.Ipv6CidrBlock) - } - - if v.Ipv6IpamPoolId != nil { - objectKey := object.Key("Ipv6IpamPoolId") - objectKey.String(*v.Ipv6IpamPoolId) - } - - if v.Ipv6NetmaskLength != nil { - objectKey := object.Key("Ipv6NetmaskLength") - objectKey.Integer(*v.Ipv6NetmaskLength) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateTransitGatewayMulticastDomainInput(v *AssociateTransitGatewayMulticastDomainInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetIds") - if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateTransitGatewayPolicyTableInput(v *AssociateTransitGatewayPolicyTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayPolicyTableId != nil { - objectKey := object.Key("TransitGatewayPolicyTableId") - objectKey.String(*v.TransitGatewayPolicyTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateTransitGatewayRouteTableInput(v *AssociateTransitGatewayRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateTrunkInterfaceInput(v *AssociateTrunkInterfaceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.BranchInterfaceId != nil { - objectKey := object.Key("BranchInterfaceId") - objectKey.String(*v.BranchInterfaceId) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GreKey != nil { - objectKey := object.Key("GreKey") - objectKey.Integer(*v.GreKey) - } - - if v.TrunkInterfaceId != nil { - objectKey := object.Key("TrunkInterfaceId") - objectKey.String(*v.TrunkInterfaceId) - } - - if v.VlanId != nil { - objectKey := object.Key("VlanId") - objectKey.Integer(*v.VlanId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAssociateVpcCidrBlockInput(v *AssociateVpcCidrBlockInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AmazonProvidedIpv6CidrBlock != nil { - objectKey := object.Key("AmazonProvidedIpv6CidrBlock") - objectKey.Boolean(*v.AmazonProvidedIpv6CidrBlock) - } - - if v.CidrBlock != nil { - objectKey := object.Key("CidrBlock") - objectKey.String(*v.CidrBlock) - } - - if v.Ipv4IpamPoolId != nil { - objectKey := object.Key("Ipv4IpamPoolId") - objectKey.String(*v.Ipv4IpamPoolId) - } - - if v.Ipv4NetmaskLength != nil { - objectKey := object.Key("Ipv4NetmaskLength") - objectKey.Integer(*v.Ipv4NetmaskLength) - } - - if v.Ipv6CidrBlock != nil { - objectKey := object.Key("Ipv6CidrBlock") - objectKey.String(*v.Ipv6CidrBlock) - } - - if v.Ipv6CidrBlockNetworkBorderGroup != nil { - objectKey := object.Key("Ipv6CidrBlockNetworkBorderGroup") - objectKey.String(*v.Ipv6CidrBlockNetworkBorderGroup) - } - - if v.Ipv6IpamPoolId != nil { - objectKey := object.Key("Ipv6IpamPoolId") - objectKey.String(*v.Ipv6IpamPoolId) - } - - if v.Ipv6NetmaskLength != nil { - objectKey := object.Key("Ipv6NetmaskLength") - objectKey.Integer(*v.Ipv6NetmaskLength) - } - - if v.Ipv6Pool != nil { - objectKey := object.Key("Ipv6Pool") - objectKey.String(*v.Ipv6Pool) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAttachClassicLinkVpcInput(v *AttachClassicLinkVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Groups != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentGroupIdStringList(v.Groups, objectKey); err != nil { - return err - } - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAttachInternetGatewayInput(v *AttachInternetGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InternetGatewayId != nil { - objectKey := object.Key("InternetGatewayId") - objectKey.String(*v.InternetGatewayId) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAttachNetworkInterfaceInput(v *AttachNetworkInterfaceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DeviceIndex != nil { - objectKey := object.Key("DeviceIndex") - objectKey.Integer(*v.DeviceIndex) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EnaSrdSpecification != nil { - objectKey := object.Key("EnaSrdSpecification") - if err := awsEc2query_serializeDocumentEnaSrdSpecification(v.EnaSrdSpecification, objectKey); err != nil { - return err - } - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.NetworkCardIndex != nil { - objectKey := object.Key("NetworkCardIndex") - objectKey.Integer(*v.NetworkCardIndex) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAttachVerifiedAccessTrustProviderInput(v *AttachVerifiedAccessTrustProviderInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - if v.VerifiedAccessTrustProviderId != nil { - objectKey := object.Key("VerifiedAccessTrustProviderId") - objectKey.String(*v.VerifiedAccessTrustProviderId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAttachVolumeInput(v *AttachVolumeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Device != nil { - objectKey := object.Key("Device") - objectKey.String(*v.Device) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAttachVpnGatewayInput(v *AttachVpnGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - if v.VpnGatewayId != nil { - objectKey := object.Key("VpnGatewayId") - objectKey.String(*v.VpnGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAuthorizeClientVpnIngressInput(v *AuthorizeClientVpnIngressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AccessGroupId != nil { - objectKey := object.Key("AccessGroupId") - objectKey.String(*v.AccessGroupId) - } - - if v.AuthorizeAllGroups != nil { - objectKey := object.Key("AuthorizeAllGroups") - objectKey.Boolean(*v.AuthorizeAllGroups) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TargetNetworkCidr != nil { - objectKey := object.Key("TargetNetworkCidr") - objectKey.String(*v.TargetNetworkCidr) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAuthorizeSecurityGroupEgressInput(v *AuthorizeSecurityGroupEgressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIp != nil { - objectKey := object.Key("CidrIp") - objectKey.String(*v.CidrIp) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.IpPermissions != nil { - objectKey := object.FlatKey("IpPermissions") - if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil { - return err - } - } - - if v.IpProtocol != nil { - objectKey := object.Key("IpProtocol") - objectKey.String(*v.IpProtocol) - } - - if v.SourceSecurityGroupName != nil { - objectKey := object.Key("SourceSecurityGroupName") - objectKey.String(*v.SourceSecurityGroupName) - } - - if v.SourceSecurityGroupOwnerId != nil { - objectKey := object.Key("SourceSecurityGroupOwnerId") - objectKey.String(*v.SourceSecurityGroupOwnerId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeOpDocumentAuthorizeSecurityGroupIngressInput(v *AuthorizeSecurityGroupIngressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIp != nil { - objectKey := object.Key("CidrIp") - objectKey.String(*v.CidrIp) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.IpPermissions != nil { - objectKey := object.FlatKey("IpPermissions") - if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil { - return err - } - } - - if v.IpProtocol != nil { - objectKey := object.Key("IpProtocol") - objectKey.String(*v.IpProtocol) - } - - if v.SourceSecurityGroupName != nil { - objectKey := object.Key("SourceSecurityGroupName") - objectKey.String(*v.SourceSecurityGroupName) - } - - if v.SourceSecurityGroupOwnerId != nil { - objectKey := object.Key("SourceSecurityGroupOwnerId") - objectKey.String(*v.SourceSecurityGroupOwnerId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeOpDocumentBundleInstanceInput(v *BundleInstanceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.Storage != nil { - objectKey := object.Key("Storage") - if err := awsEc2query_serializeDocumentStorage(v.Storage, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelBundleTaskInput(v *CancelBundleTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.BundleId != nil { - objectKey := object.Key("BundleId") - objectKey.String(*v.BundleId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelCapacityReservationFleetsInput(v *CancelCapacityReservationFleetsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationFleetIds != nil { - objectKey := object.FlatKey("CapacityReservationFleetId") - if err := awsEc2query_serializeDocumentCapacityReservationFleetIdSet(v.CapacityReservationFleetIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelCapacityReservationInput(v *CancelCapacityReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationId != nil { - objectKey := object.Key("CapacityReservationId") - objectKey.String(*v.CapacityReservationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelConversionTaskInput(v *CancelConversionTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ConversionTaskId != nil { - objectKey := object.Key("ConversionTaskId") - objectKey.String(*v.ConversionTaskId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ReasonMessage != nil { - objectKey := object.Key("ReasonMessage") - objectKey.String(*v.ReasonMessage) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelExportTaskInput(v *CancelExportTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ExportTaskId != nil { - objectKey := object.Key("ExportTaskId") - objectKey.String(*v.ExportTaskId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelImageLaunchPermissionInput(v *CancelImageLaunchPermissionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelImportTaskInput(v *CancelImportTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CancelReason != nil { - objectKey := object.Key("CancelReason") - objectKey.String(*v.CancelReason) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImportTaskId != nil { - objectKey := object.Key("ImportTaskId") - objectKey.String(*v.ImportTaskId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelReservedInstancesListingInput(v *CancelReservedInstancesListingInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ReservedInstancesListingId != nil { - objectKey := object.Key("ReservedInstancesListingId") - objectKey.String(*v.ReservedInstancesListingId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelSpotFleetRequestsInput(v *CancelSpotFleetRequestsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SpotFleetRequestIds != nil { - objectKey := object.FlatKey("SpotFleetRequestId") - if err := awsEc2query_serializeDocumentSpotFleetRequestIdList(v.SpotFleetRequestIds, objectKey); err != nil { - return err - } - } - - if v.TerminateInstances != nil { - objectKey := object.Key("TerminateInstances") - objectKey.Boolean(*v.TerminateInstances) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCancelSpotInstanceRequestsInput(v *CancelSpotInstanceRequestsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SpotInstanceRequestIds != nil { - objectKey := object.FlatKey("SpotInstanceRequestId") - if err := awsEc2query_serializeDocumentSpotInstanceRequestIdList(v.SpotInstanceRequestIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentConfirmProductInstanceInput(v *ConfirmProductInstanceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.ProductCode != nil { - objectKey := object.Key("ProductCode") - objectKey.String(*v.ProductCode) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCopyFpgaImageInput(v *CopyFpgaImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.SourceFpgaImageId != nil { - objectKey := object.Key("SourceFpgaImageId") - objectKey.String(*v.SourceFpgaImageId) - } - - if v.SourceRegion != nil { - objectKey := object.Key("SourceRegion") - objectKey.String(*v.SourceRegion) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCopyImageInput(v *CopyImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.CopyImageTags != nil { - objectKey := object.Key("CopyImageTags") - objectKey.Boolean(*v.CopyImageTags) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DestinationOutpostArn != nil { - objectKey := object.Key("DestinationOutpostArn") - objectKey.String(*v.DestinationOutpostArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.SourceImageId != nil { - objectKey := object.Key("SourceImageId") - objectKey.String(*v.SourceImageId) - } - - if v.SourceRegion != nil { - objectKey := object.Key("SourceRegion") - objectKey.String(*v.SourceRegion) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCopySnapshotInput(v *CopySnapshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DestinationOutpostArn != nil { - objectKey := object.Key("DestinationOutpostArn") - objectKey.String(*v.DestinationOutpostArn) - } - - if v.destinationRegion != nil { - objectKey := object.Key("DestinationRegion") - objectKey.String(*v.destinationRegion) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.PresignedUrl != nil { - objectKey := object.Key("PresignedUrl") - objectKey.String(*v.PresignedUrl) - } - - if v.SourceRegion != nil { - objectKey := object.Key("SourceRegion") - objectKey.String(*v.SourceRegion) - } - - if v.SourceSnapshotId != nil { - objectKey := object.Key("SourceSnapshotId") - objectKey.String(*v.SourceSnapshotId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateCapacityReservationFleetInput(v *CreateCapacityReservationFleetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationStrategy != nil { - objectKey := object.Key("AllocationStrategy") - objectKey.String(*v.AllocationStrategy) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndDate != nil { - objectKey := object.Key("EndDate") - objectKey.String(smithytime.FormatDateTime(*v.EndDate)) - } - - if len(v.InstanceMatchCriteria) > 0 { - objectKey := object.Key("InstanceMatchCriteria") - objectKey.String(string(v.InstanceMatchCriteria)) - } - - if v.InstanceTypeSpecifications != nil { - objectKey := object.FlatKey("InstanceTypeSpecification") - if err := awsEc2query_serializeDocumentReservationFleetInstanceSpecificationList(v.InstanceTypeSpecifications, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.Tenancy) > 0 { - objectKey := object.Key("Tenancy") - objectKey.String(string(v.Tenancy)) - } - - if v.TotalTargetCapacity != nil { - objectKey := object.Key("TotalTargetCapacity") - objectKey.Integer(*v.TotalTargetCapacity) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateCapacityReservationInput(v *CreateCapacityReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.AvailabilityZoneId != nil { - objectKey := object.Key("AvailabilityZoneId") - objectKey.String(*v.AvailabilityZoneId) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if v.EndDate != nil { - objectKey := object.Key("EndDate") - objectKey.String(smithytime.FormatDateTime(*v.EndDate)) - } - - if len(v.EndDateType) > 0 { - objectKey := object.Key("EndDateType") - objectKey.String(string(v.EndDateType)) - } - - if v.EphemeralStorage != nil { - objectKey := object.Key("EphemeralStorage") - objectKey.Boolean(*v.EphemeralStorage) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if len(v.InstanceMatchCriteria) > 0 { - objectKey := object.Key("InstanceMatchCriteria") - objectKey.String(string(v.InstanceMatchCriteria)) - } - - if len(v.InstancePlatform) > 0 { - objectKey := object.Key("InstancePlatform") - objectKey.String(string(v.InstancePlatform)) - } - - if v.InstanceType != nil { - objectKey := object.Key("InstanceType") - objectKey.String(*v.InstanceType) - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.PlacementGroupArn != nil { - objectKey := object.Key("PlacementGroupArn") - objectKey.String(*v.PlacementGroupArn) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecifications") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.Tenancy) > 0 { - objectKey := object.Key("Tenancy") - objectKey.String(string(v.Tenancy)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateCarrierGatewayInput(v *CreateCarrierGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateClientVpnEndpointInput(v *CreateClientVpnEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AuthenticationOptions != nil { - objectKey := object.FlatKey("Authentication") - if err := awsEc2query_serializeDocumentClientVpnAuthenticationRequestList(v.AuthenticationOptions, objectKey); err != nil { - return err - } - } - - if v.ClientCidrBlock != nil { - objectKey := object.Key("ClientCidrBlock") - objectKey.String(*v.ClientCidrBlock) - } - - if v.ClientConnectOptions != nil { - objectKey := object.Key("ClientConnectOptions") - if err := awsEc2query_serializeDocumentClientConnectOptions(v.ClientConnectOptions, objectKey); err != nil { - return err - } - } - - if v.ClientLoginBannerOptions != nil { - objectKey := object.Key("ClientLoginBannerOptions") - if err := awsEc2query_serializeDocumentClientLoginBannerOptions(v.ClientLoginBannerOptions, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ConnectionLogOptions != nil { - objectKey := object.Key("ConnectionLogOptions") - if err := awsEc2query_serializeDocumentConnectionLogOptions(v.ConnectionLogOptions, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DnsServers != nil { - objectKey := object.FlatKey("DnsServers") - if err := awsEc2query_serializeDocumentValueStringList(v.DnsServers, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if len(v.SelfServicePortal) > 0 { - objectKey := object.Key("SelfServicePortal") - objectKey.String(string(v.SelfServicePortal)) - } - - if v.ServerCertificateArn != nil { - objectKey := object.Key("ServerCertificateArn") - objectKey.String(*v.ServerCertificateArn) - } - - if v.SessionTimeoutHours != nil { - objectKey := object.Key("SessionTimeoutHours") - objectKey.Integer(*v.SessionTimeoutHours) - } - - if v.SplitTunnel != nil { - objectKey := object.Key("SplitTunnel") - objectKey.Boolean(*v.SplitTunnel) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.TransportProtocol) > 0 { - objectKey := object.Key("TransportProtocol") - objectKey.String(string(v.TransportProtocol)) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - if v.VpnPort != nil { - objectKey := object.Key("VpnPort") - objectKey.Integer(*v.VpnPort) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateClientVpnRouteInput(v *CreateClientVpnRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TargetVpcSubnetId != nil { - objectKey := object.Key("TargetVpcSubnetId") - objectKey.String(*v.TargetVpcSubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateCoipCidrInput(v *CreateCoipCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.CoipPoolId != nil { - objectKey := object.Key("CoipPoolId") - objectKey.String(*v.CoipPoolId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateCoipPoolInput(v *CreateCoipPoolInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateCustomerGatewayInput(v *CreateCustomerGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.BgpAsn != nil { - objectKey := object.Key("BgpAsn") - objectKey.Integer(*v.BgpAsn) - } - - if v.CertificateArn != nil { - objectKey := object.Key("CertificateArn") - objectKey.String(*v.CertificateArn) - } - - if v.DeviceName != nil { - objectKey := object.Key("DeviceName") - objectKey.String(*v.DeviceName) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpAddress != nil { - objectKey := object.Key("IpAddress") - objectKey.String(*v.IpAddress) - } - - if v.PublicIp != nil { - objectKey := object.Key("PublicIp") - objectKey.String(*v.PublicIp) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.Type) > 0 { - objectKey := object.Key("Type") - objectKey.String(string(v.Type)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateDefaultSubnetInput(v *CreateDefaultSubnetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Ipv6Native != nil { - objectKey := object.Key("Ipv6Native") - objectKey.Boolean(*v.Ipv6Native) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateDefaultVpcInput(v *CreateDefaultVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateDhcpOptionsInput(v *CreateDhcpOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DhcpConfigurations != nil { - objectKey := object.FlatKey("DhcpConfiguration") - if err := awsEc2query_serializeDocumentNewDhcpConfigurationList(v.DhcpConfigurations, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateEgressOnlyInternetGatewayInput(v *CreateEgressOnlyInternetGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateFleetInput(v *CreateFleetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Context != nil { - objectKey := object.Key("Context") - objectKey.String(*v.Context) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.ExcessCapacityTerminationPolicy) > 0 { - objectKey := object.Key("ExcessCapacityTerminationPolicy") - objectKey.String(string(v.ExcessCapacityTerminationPolicy)) - } - - if v.LaunchTemplateConfigs != nil { - objectKey := object.FlatKey("LaunchTemplateConfigs") - if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs, objectKey); err != nil { - return err - } - } - - if v.OnDemandOptions != nil { - objectKey := object.Key("OnDemandOptions") - if err := awsEc2query_serializeDocumentOnDemandOptionsRequest(v.OnDemandOptions, objectKey); err != nil { - return err - } - } - - if v.ReplaceUnhealthyInstances != nil { - objectKey := object.Key("ReplaceUnhealthyInstances") - objectKey.Boolean(*v.ReplaceUnhealthyInstances) - } - - if v.SpotOptions != nil { - objectKey := object.Key("SpotOptions") - if err := awsEc2query_serializeDocumentSpotOptionsRequest(v.SpotOptions, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TargetCapacitySpecification != nil { - objectKey := object.Key("TargetCapacitySpecification") - if err := awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v.TargetCapacitySpecification, objectKey); err != nil { - return err - } - } - - if v.TerminateInstancesWithExpiration != nil { - objectKey := object.Key("TerminateInstancesWithExpiration") - objectKey.Boolean(*v.TerminateInstancesWithExpiration) - } - - if len(v.Type) > 0 { - objectKey := object.Key("Type") - objectKey.String(string(v.Type)) - } - - if v.ValidFrom != nil { - objectKey := object.Key("ValidFrom") - objectKey.String(smithytime.FormatDateTime(*v.ValidFrom)) - } - - if v.ValidUntil != nil { - objectKey := object.Key("ValidUntil") - objectKey.String(smithytime.FormatDateTime(*v.ValidUntil)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateFlowLogsInput(v *CreateFlowLogsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DeliverCrossAccountRole != nil { - objectKey := object.Key("DeliverCrossAccountRole") - objectKey.String(*v.DeliverCrossAccountRole) - } - - if v.DeliverLogsPermissionArn != nil { - objectKey := object.Key("DeliverLogsPermissionArn") - objectKey.String(*v.DeliverLogsPermissionArn) - } - - if v.DestinationOptions != nil { - objectKey := object.Key("DestinationOptions") - if err := awsEc2query_serializeDocumentDestinationOptionsRequest(v.DestinationOptions, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LogDestination != nil { - objectKey := object.Key("LogDestination") - objectKey.String(*v.LogDestination) - } - - if len(v.LogDestinationType) > 0 { - objectKey := object.Key("LogDestinationType") - objectKey.String(string(v.LogDestinationType)) - } - - if v.LogFormat != nil { - objectKey := object.Key("LogFormat") - objectKey.String(*v.LogFormat) - } - - if v.LogGroupName != nil { - objectKey := object.Key("LogGroupName") - objectKey.String(*v.LogGroupName) - } - - if v.MaxAggregationInterval != nil { - objectKey := object.Key("MaxAggregationInterval") - objectKey.Integer(*v.MaxAggregationInterval) - } - - if v.ResourceIds != nil { - objectKey := object.FlatKey("ResourceId") - if err := awsEc2query_serializeDocumentFlowLogResourceIds(v.ResourceIds, objectKey); err != nil { - return err - } - } - - if len(v.ResourceType) > 0 { - objectKey := object.Key("ResourceType") - objectKey.String(string(v.ResourceType)) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.TrafficType) > 0 { - objectKey := object.Key("TrafficType") - objectKey.String(string(v.TrafficType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateFpgaImageInput(v *CreateFpgaImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InputStorageLocation != nil { - objectKey := object.Key("InputStorageLocation") - if err := awsEc2query_serializeDocumentStorageLocation(v.InputStorageLocation, objectKey); err != nil { - return err - } - } - - if v.LogsStorageLocation != nil { - objectKey := object.Key("LogsStorageLocation") - if err := awsEc2query_serializeDocumentStorageLocation(v.LogsStorageLocation, objectKey); err != nil { - return err - } - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateImageInput(v *CreateImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.NoReboot != nil { - objectKey := object.Key("NoReboot") - objectKey.Boolean(*v.NoReboot) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateInstanceConnectEndpointInput(v *CreateInstanceConnectEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PreserveClientIp != nil { - objectKey := object.Key("PreserveClientIp") - objectKey.Boolean(*v.PreserveClientIp) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringListRequest(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateInstanceEventWindowInput(v *CreateInstanceEventWindowInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CronExpression != nil { - objectKey := object.Key("CronExpression") - objectKey.String(*v.CronExpression) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TimeRanges != nil { - objectKey := object.FlatKey("TimeRange") - if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v.TimeRanges, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateInstanceExportTaskInput(v *CreateInstanceExportTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.ExportToS3Task != nil { - objectKey := object.Key("ExportToS3") - if err := awsEc2query_serializeDocumentExportToS3TaskSpecification(v.ExportToS3Task, objectKey); err != nil { - return err - } - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.TargetEnvironment) > 0 { - objectKey := object.Key("TargetEnvironment") - objectKey.String(string(v.TargetEnvironment)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateInternetGatewayInput(v *CreateInternetGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateIpamInput(v *CreateIpamInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.OperatingRegions != nil { - objectKey := object.FlatKey("OperatingRegion") - if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.OperatingRegions, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.Tier) > 0 { - objectKey := object.Key("Tier") - objectKey.String(string(v.Tier)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateIpamPoolInput(v *CreateIpamPoolInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AddressFamily) > 0 { - objectKey := object.Key("AddressFamily") - objectKey.String(string(v.AddressFamily)) - } - - if v.AllocationDefaultNetmaskLength != nil { - objectKey := object.Key("AllocationDefaultNetmaskLength") - objectKey.Integer(*v.AllocationDefaultNetmaskLength) - } - - if v.AllocationMaxNetmaskLength != nil { - objectKey := object.Key("AllocationMaxNetmaskLength") - objectKey.Integer(*v.AllocationMaxNetmaskLength) - } - - if v.AllocationMinNetmaskLength != nil { - objectKey := object.Key("AllocationMinNetmaskLength") - objectKey.Integer(*v.AllocationMinNetmaskLength) - } - - if v.AllocationResourceTags != nil { - objectKey := object.FlatKey("AllocationResourceTag") - if err := awsEc2query_serializeDocumentRequestIpamResourceTagList(v.AllocationResourceTags, objectKey); err != nil { - return err - } - } - - if v.AutoImport != nil { - objectKey := object.Key("AutoImport") - objectKey.Boolean(*v.AutoImport) - } - - if len(v.AwsService) > 0 { - objectKey := object.Key("AwsService") - objectKey.String(string(v.AwsService)) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamScopeId != nil { - objectKey := object.Key("IpamScopeId") - objectKey.String(*v.IpamScopeId) - } - - if v.Locale != nil { - objectKey := object.Key("Locale") - objectKey.String(*v.Locale) - } - - if len(v.PublicIpSource) > 0 { - objectKey := object.Key("PublicIpSource") - objectKey.String(string(v.PublicIpSource)) - } - - if v.PubliclyAdvertisable != nil { - objectKey := object.Key("PubliclyAdvertisable") - objectKey.Boolean(*v.PubliclyAdvertisable) - } - - if v.SourceIpamPoolId != nil { - objectKey := object.Key("SourceIpamPoolId") - objectKey.String(*v.SourceIpamPoolId) - } - - if v.SourceResource != nil { - objectKey := object.Key("SourceResource") - if err := awsEc2query_serializeDocumentIpamPoolSourceResourceRequest(v.SourceResource, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateIpamResourceDiscoveryInput(v *CreateIpamResourceDiscoveryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.OperatingRegions != nil { - objectKey := object.FlatKey("OperatingRegion") - if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.OperatingRegions, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateIpamScopeInput(v *CreateIpamScopeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamId != nil { - objectKey := object.Key("IpamId") - objectKey.String(*v.IpamId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateKeyPairInput(v *CreateKeyPairInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.KeyFormat) > 0 { - objectKey := object.Key("KeyFormat") - objectKey.String(string(v.KeyFormat)) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if len(v.KeyType) > 0 { - objectKey := object.Key("KeyType") - objectKey.String(string(v.KeyType)) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateLaunchTemplateInput(v *CreateLaunchTemplateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LaunchTemplateData != nil { - objectKey := object.Key("LaunchTemplateData") - if err := awsEc2query_serializeDocumentRequestLaunchTemplateData(v.LaunchTemplateData, objectKey); err != nil { - return err - } - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VersionDescription != nil { - objectKey := object.Key("VersionDescription") - objectKey.String(*v.VersionDescription) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateLaunchTemplateVersionInput(v *CreateLaunchTemplateVersionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LaunchTemplateData != nil { - objectKey := object.Key("LaunchTemplateData") - if err := awsEc2query_serializeDocumentRequestLaunchTemplateData(v.LaunchTemplateData, objectKey); err != nil { - return err - } - } - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.ResolveAlias != nil { - objectKey := object.Key("ResolveAlias") - objectKey.Boolean(*v.ResolveAlias) - } - - if v.SourceVersion != nil { - objectKey := object.Key("SourceVersion") - objectKey.String(*v.SourceVersion) - } - - if v.VersionDescription != nil { - objectKey := object.Key("VersionDescription") - objectKey.String(*v.VersionDescription) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteInput(v *CreateLocalGatewayRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationPrefixListId != nil { - objectKey := object.Key("DestinationPrefixListId") - objectKey.String(*v.DestinationPrefixListId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - if v.LocalGatewayVirtualInterfaceGroupId != nil { - objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId") - objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableInput(v *CreateLocalGatewayRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayId != nil { - objectKey := object.Key("LocalGatewayId") - objectKey.String(*v.LocalGatewayId) - } - - if len(v.Mode) > 0 { - objectKey := object.Key("Mode") - objectKey.String(string(v.Mode)) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(v *CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - if v.LocalGatewayVirtualInterfaceGroupId != nil { - objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId") - objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateLocalGatewayRouteTableVpcAssociationInput(v *CreateLocalGatewayRouteTableVpcAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateManagedPrefixListInput(v *CreateManagedPrefixListInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddressFamily != nil { - objectKey := object.Key("AddressFamily") - objectKey.String(*v.AddressFamily) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Entries != nil { - objectKey := object.FlatKey("Entry") - if err := awsEc2query_serializeDocumentAddPrefixListEntries(v.Entries, objectKey); err != nil { - return err - } - } - - if v.MaxEntries != nil { - objectKey := object.Key("MaxEntries") - objectKey.Integer(*v.MaxEntries) - } - - if v.PrefixListName != nil { - objectKey := object.Key("PrefixListName") - objectKey.String(*v.PrefixListName) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNatGatewayInput(v *CreateNatGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if len(v.ConnectivityType) > 0 { - objectKey := object.Key("ConnectivityType") - objectKey.String(string(v.ConnectivityType)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.SecondaryAllocationIds != nil { - objectKey := object.FlatKey("SecondaryAllocationId") - if err := awsEc2query_serializeDocumentAllocationIdList(v.SecondaryAllocationIds, objectKey); err != nil { - return err - } - } - - if v.SecondaryPrivateIpAddressCount != nil { - objectKey := object.Key("SecondaryPrivateIpAddressCount") - objectKey.Integer(*v.SecondaryPrivateIpAddressCount) - } - - if v.SecondaryPrivateIpAddresses != nil { - objectKey := object.FlatKey("SecondaryPrivateIpAddress") - if err := awsEc2query_serializeDocumentIpList(v.SecondaryPrivateIpAddresses, objectKey); err != nil { - return err - } - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNetworkAclEntryInput(v *CreateNetworkAclEntryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrBlock != nil { - objectKey := object.Key("CidrBlock") - objectKey.String(*v.CidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Egress != nil { - objectKey := object.Key("Egress") - objectKey.Boolean(*v.Egress) - } - - if v.IcmpTypeCode != nil { - objectKey := object.Key("Icmp") - if err := awsEc2query_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, objectKey); err != nil { - return err - } - } - - if v.Ipv6CidrBlock != nil { - objectKey := object.Key("Ipv6CidrBlock") - objectKey.String(*v.Ipv6CidrBlock) - } - - if v.NetworkAclId != nil { - objectKey := object.Key("NetworkAclId") - objectKey.String(*v.NetworkAclId) - } - - if v.PortRange != nil { - objectKey := object.Key("PortRange") - if err := awsEc2query_serializeDocumentPortRange(v.PortRange, objectKey); err != nil { - return err - } - } - - if v.Protocol != nil { - objectKey := object.Key("Protocol") - objectKey.String(*v.Protocol) - } - - if len(v.RuleAction) > 0 { - objectKey := object.Key("RuleAction") - objectKey.String(string(v.RuleAction)) - } - - if v.RuleNumber != nil { - objectKey := object.Key("RuleNumber") - objectKey.Integer(*v.RuleNumber) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNetworkAclInput(v *CreateNetworkAclInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNetworkInsightsAccessScopeInput(v *CreateNetworkInsightsAccessScopeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ExcludePaths != nil { - objectKey := object.FlatKey("ExcludePath") - if err := awsEc2query_serializeDocumentAccessScopePathListRequest(v.ExcludePaths, objectKey); err != nil { - return err - } - } - - if v.MatchPaths != nil { - objectKey := object.FlatKey("MatchPath") - if err := awsEc2query_serializeDocumentAccessScopePathListRequest(v.MatchPaths, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(v *CreateNetworkInsightsPathInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Destination != nil { - objectKey := object.Key("Destination") - objectKey.String(*v.Destination) - } - - if v.DestinationIp != nil { - objectKey := object.Key("DestinationIp") - objectKey.String(*v.DestinationIp) - } - - if v.DestinationPort != nil { - objectKey := object.Key("DestinationPort") - objectKey.Integer(*v.DestinationPort) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FilterAtDestination != nil { - objectKey := object.Key("FilterAtDestination") - if err := awsEc2query_serializeDocumentPathRequestFilter(v.FilterAtDestination, objectKey); err != nil { - return err - } - } - - if v.FilterAtSource != nil { - objectKey := object.Key("FilterAtSource") - if err := awsEc2query_serializeDocumentPathRequestFilter(v.FilterAtSource, objectKey); err != nil { - return err - } - } - - if len(v.Protocol) > 0 { - objectKey := object.Key("Protocol") - objectKey.String(string(v.Protocol)) - } - - if v.Source != nil { - objectKey := object.Key("Source") - objectKey.String(*v.Source) - } - - if v.SourceIp != nil { - objectKey := object.Key("SourceIp") - objectKey.String(*v.SourceIp) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNetworkInterfaceInput(v *CreateNetworkInterfaceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ConnectionTrackingSpecification != nil { - objectKey := object.Key("ConnectionTrackingSpecification") - if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EnablePrimaryIpv6 != nil { - objectKey := object.Key("EnablePrimaryIpv6") - objectKey.Boolean(*v.EnablePrimaryIpv6) - } - - if v.Groups != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil { - return err - } - } - - if len(v.InterfaceType) > 0 { - objectKey := object.Key("InterfaceType") - objectKey.String(string(v.InterfaceType)) - } - - if v.Ipv4PrefixCount != nil { - objectKey := object.Key("Ipv4PrefixCount") - objectKey.Integer(*v.Ipv4PrefixCount) - } - - if v.Ipv4Prefixes != nil { - objectKey := object.FlatKey("Ipv4Prefix") - if err := awsEc2query_serializeDocumentIpv4PrefixList(v.Ipv4Prefixes, objectKey); err != nil { - return err - } - } - - if v.Ipv6AddressCount != nil { - objectKey := object.Key("Ipv6AddressCount") - objectKey.Integer(*v.Ipv6AddressCount) - } - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Addresses") - if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.Ipv6PrefixCount != nil { - objectKey := object.Key("Ipv6PrefixCount") - objectKey.Integer(*v.Ipv6PrefixCount) - } - - if v.Ipv6Prefixes != nil { - objectKey := object.FlatKey("Ipv6Prefix") - if err := awsEc2query_serializeDocumentIpv6PrefixList(v.Ipv6Prefixes, objectKey); err != nil { - return err - } - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddresses") - if err := awsEc2query_serializeDocumentPrivateIpAddressSpecificationList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - if v.SecondaryPrivateIpAddressCount != nil { - objectKey := object.Key("SecondaryPrivateIpAddressCount") - objectKey.Integer(*v.SecondaryPrivateIpAddressCount) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateNetworkInterfacePermissionInput(v *CreateNetworkInterfacePermissionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AwsAccountId != nil { - objectKey := object.Key("AwsAccountId") - objectKey.String(*v.AwsAccountId) - } - - if v.AwsService != nil { - objectKey := object.Key("AwsService") - objectKey.String(*v.AwsService) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if len(v.Permission) > 0 { - objectKey := object.Key("Permission") - objectKey.String(string(v.Permission)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreatePlacementGroupInput(v *CreatePlacementGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.PartitionCount != nil { - objectKey := object.Key("PartitionCount") - objectKey.Integer(*v.PartitionCount) - } - - if len(v.SpreadLevel) > 0 { - objectKey := object.Key("SpreadLevel") - objectKey.String(string(v.SpreadLevel)) - } - - if len(v.Strategy) > 0 { - objectKey := object.Key("Strategy") - objectKey.String(string(v.Strategy)) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreatePublicIpv4PoolInput(v *CreatePublicIpv4PoolInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateReplaceRootVolumeTaskInput(v *CreateReplaceRootVolumeTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DeleteReplacedRootVolume != nil { - objectKey := object.Key("DeleteReplacedRootVolume") - objectKey.Boolean(*v.DeleteReplacedRootVolume) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateReservedInstancesListingInput(v *CreateReservedInstancesListingInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if v.PriceSchedules != nil { - objectKey := object.FlatKey("PriceSchedules") - if err := awsEc2query_serializeDocumentPriceScheduleSpecificationList(v.PriceSchedules, objectKey); err != nil { - return err - } - } - - if v.ReservedInstancesId != nil { - objectKey := object.Key("ReservedInstancesId") - objectKey.String(*v.ReservedInstancesId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateRestoreImageTaskInput(v *CreateRestoreImageTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Bucket != nil { - objectKey := object.Key("Bucket") - objectKey.String(*v.Bucket) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.ObjectKey != nil { - objectKey := object.Key("ObjectKey") - objectKey.String(*v.ObjectKey) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateRouteInput(v *CreateRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CarrierGatewayId != nil { - objectKey := object.Key("CarrierGatewayId") - objectKey.String(*v.CarrierGatewayId) - } - - if v.CoreNetworkArn != nil { - objectKey := object.Key("CoreNetworkArn") - objectKey.String(*v.CoreNetworkArn) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationIpv6CidrBlock != nil { - objectKey := object.Key("DestinationIpv6CidrBlock") - objectKey.String(*v.DestinationIpv6CidrBlock) - } - - if v.DestinationPrefixListId != nil { - objectKey := object.Key("DestinationPrefixListId") - objectKey.String(*v.DestinationPrefixListId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EgressOnlyInternetGatewayId != nil { - objectKey := object.Key("EgressOnlyInternetGatewayId") - objectKey.String(*v.EgressOnlyInternetGatewayId) - } - - if v.GatewayId != nil { - objectKey := object.Key("GatewayId") - objectKey.String(*v.GatewayId) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.LocalGatewayId != nil { - objectKey := object.Key("LocalGatewayId") - objectKey.String(*v.LocalGatewayId) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - if v.VpcEndpointId != nil { - objectKey := object.Key("VpcEndpointId") - objectKey.String(*v.VpcEndpointId) - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateRouteTableInput(v *CreateRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateSecurityGroupInput(v *CreateSecurityGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("GroupDescription") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateSnapshotInput(v *CreateSnapshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateSnapshotsInput(v *CreateSnapshotsInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.CopyTagsFromSource) > 0 { - objectKey := object.Key("CopyTagsFromSource") - objectKey.String(string(v.CopyTagsFromSource)) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceSpecification != nil { - objectKey := object.Key("InstanceSpecification") - if err := awsEc2query_serializeDocumentInstanceSpecification(v.InstanceSpecification, objectKey); err != nil { - return err - } - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateSpotDatafeedSubscriptionInput(v *CreateSpotDatafeedSubscriptionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Bucket != nil { - objectKey := object.Key("Bucket") - objectKey.String(*v.Bucket) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Prefix != nil { - objectKey := object.Key("Prefix") - objectKey.String(*v.Prefix) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateStoreImageTaskInput(v *CreateStoreImageTaskInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Bucket != nil { - objectKey := object.Key("Bucket") - objectKey.String(*v.Bucket) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.S3ObjectTags != nil { - objectKey := object.FlatKey("S3ObjectTag") - if err := awsEc2query_serializeDocumentS3ObjectTagList(v.S3ObjectTags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateSubnetCidrReservationInput(v *CreateSubnetCidrReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.ReservationType) > 0 { - objectKey := object.Key("ReservationType") - objectKey.String(string(v.ReservationType)) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateSubnetInput(v *CreateSubnetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.AvailabilityZoneId != nil { - objectKey := object.Key("AvailabilityZoneId") - objectKey.String(*v.AvailabilityZoneId) - } - - if v.CidrBlock != nil { - objectKey := object.Key("CidrBlock") - objectKey.String(*v.CidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Ipv4IpamPoolId != nil { - objectKey := object.Key("Ipv4IpamPoolId") - objectKey.String(*v.Ipv4IpamPoolId) - } - - if v.Ipv4NetmaskLength != nil { - objectKey := object.Key("Ipv4NetmaskLength") - objectKey.Integer(*v.Ipv4NetmaskLength) - } - - if v.Ipv6CidrBlock != nil { - objectKey := object.Key("Ipv6CidrBlock") - objectKey.String(*v.Ipv6CidrBlock) - } - - if v.Ipv6IpamPoolId != nil { - objectKey := object.Key("Ipv6IpamPoolId") - objectKey.String(*v.Ipv6IpamPoolId) - } - - if v.Ipv6Native != nil { - objectKey := object.Key("Ipv6Native") - objectKey.Boolean(*v.Ipv6Native) - } - - if v.Ipv6NetmaskLength != nil { - objectKey := object.Key("Ipv6NetmaskLength") - objectKey.Integer(*v.Ipv6NetmaskLength) - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Resources != nil { - objectKey := object.FlatKey("ResourceId") - if err := awsEc2query_serializeDocumentResourceIdList(v.Resources, objectKey); err != nil { - return err - } - } - - if v.Tags != nil { - objectKey := object.FlatKey("Tag") - if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterInput(v *CreateTrafficMirrorFilterInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTrafficMirrorFilterRuleInput(v *CreateTrafficMirrorFilterRuleInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationPortRange != nil { - objectKey := object.Key("DestinationPortRange") - if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.DestinationPortRange, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Protocol != nil { - objectKey := object.Key("Protocol") - objectKey.Integer(*v.Protocol) - } - - if len(v.RuleAction) > 0 { - objectKey := object.Key("RuleAction") - objectKey.String(string(v.RuleAction)) - } - - if v.RuleNumber != nil { - objectKey := object.Key("RuleNumber") - objectKey.Integer(*v.RuleNumber) - } - - if v.SourceCidrBlock != nil { - objectKey := object.Key("SourceCidrBlock") - objectKey.String(*v.SourceCidrBlock) - } - - if v.SourcePortRange != nil { - objectKey := object.Key("SourcePortRange") - if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.SourcePortRange, objectKey); err != nil { - return err - } - } - - if len(v.TrafficDirection) > 0 { - objectKey := object.Key("TrafficDirection") - objectKey.String(string(v.TrafficDirection)) - } - - if v.TrafficMirrorFilterId != nil { - objectKey := object.Key("TrafficMirrorFilterId") - objectKey.String(*v.TrafficMirrorFilterId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTrafficMirrorSessionInput(v *CreateTrafficMirrorSessionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PacketLength != nil { - objectKey := object.Key("PacketLength") - objectKey.Integer(*v.PacketLength) - } - - if v.SessionNumber != nil { - objectKey := object.Key("SessionNumber") - objectKey.Integer(*v.SessionNumber) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TrafficMirrorFilterId != nil { - objectKey := object.Key("TrafficMirrorFilterId") - objectKey.String(*v.TrafficMirrorFilterId) - } - - if v.TrafficMirrorTargetId != nil { - objectKey := object.Key("TrafficMirrorTargetId") - objectKey.String(*v.TrafficMirrorTargetId) - } - - if v.VirtualNetworkId != nil { - objectKey := object.Key("VirtualNetworkId") - objectKey.Integer(*v.VirtualNetworkId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTrafficMirrorTargetInput(v *CreateTrafficMirrorTargetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GatewayLoadBalancerEndpointId != nil { - objectKey := object.Key("GatewayLoadBalancerEndpointId") - objectKey.String(*v.GatewayLoadBalancerEndpointId) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.NetworkLoadBalancerArn != nil { - objectKey := object.Key("NetworkLoadBalancerArn") - objectKey.String(*v.NetworkLoadBalancerArn) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayConnectInput(v *CreateTransitGatewayConnectInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentCreateTransitGatewayConnectRequestOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransportTransitGatewayAttachmentId != nil { - objectKey := object.Key("TransportTransitGatewayAttachmentId") - objectKey.String(*v.TransportTransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayConnectPeerInput(v *CreateTransitGatewayConnectPeerInput, value query.Value) error { - object := value.Object() - _ = object - - if v.BgpOptions != nil { - objectKey := object.Key("BgpOptions") - if err := awsEc2query_serializeDocumentTransitGatewayConnectRequestBgpOptions(v.BgpOptions, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InsideCidrBlocks != nil { - objectKey := object.FlatKey("InsideCidrBlocks") - if err := awsEc2query_serializeDocumentInsideCidrBlocksStringList(v.InsideCidrBlocks, objectKey); err != nil { - return err - } - } - - if v.PeerAddress != nil { - objectKey := object.Key("PeerAddress") - objectKey.String(*v.PeerAddress) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayAddress != nil { - objectKey := object.Key("TransitGatewayAddress") - objectKey.String(*v.TransitGatewayAddress) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayInput(v *CreateTransitGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentTransitGatewayRequestOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayMulticastDomainInput(v *CreateTransitGatewayMulticastDomainInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentCreateTransitGatewayMulticastDomainRequestOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayPeeringAttachmentInput(v *CreateTransitGatewayPeeringAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentCreateTransitGatewayPeeringAttachmentRequestOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.PeerAccountId != nil { - objectKey := object.Key("PeerAccountId") - objectKey.String(*v.PeerAccountId) - } - - if v.PeerRegion != nil { - objectKey := object.Key("PeerRegion") - objectKey.String(*v.PeerRegion) - } - - if v.PeerTransitGatewayId != nil { - objectKey := object.Key("PeerTransitGatewayId") - objectKey.String(*v.PeerTransitGatewayId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayPolicyTableInput(v *CreateTransitGatewayPolicyTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecifications") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayPrefixListReferenceInput(v *CreateTransitGatewayPrefixListReferenceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Blackhole != nil { - objectKey := object.Key("Blackhole") - objectKey.Boolean(*v.Blackhole) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteInput(v *CreateTransitGatewayRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Blackhole != nil { - objectKey := object.Key("Blackhole") - objectKey.Boolean(*v.Blackhole) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableAnnouncementInput(v *CreateTransitGatewayRouteTableAnnouncementInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PeeringAttachmentId != nil { - objectKey := object.Key("PeeringAttachmentId") - objectKey.String(*v.PeeringAttachmentId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayRouteTableInput(v *CreateTransitGatewayRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecifications") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateTransitGatewayVpcAttachmentInput(v *CreateTransitGatewayVpcAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentCreateTransitGatewayVpcAttachmentRequestOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetIds") - if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecifications") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVerifiedAccessEndpointInput(v *CreateVerifiedAccessEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ApplicationDomain != nil { - objectKey := object.Key("ApplicationDomain") - objectKey.String(*v.ApplicationDomain) - } - - if len(v.AttachmentType) > 0 { - objectKey := object.Key("AttachmentType") - objectKey.String(string(v.AttachmentType)) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DomainCertificateArn != nil { - objectKey := object.Key("DomainCertificateArn") - objectKey.String(*v.DomainCertificateArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndpointDomainPrefix != nil { - objectKey := object.Key("EndpointDomainPrefix") - objectKey.String(*v.EndpointDomainPrefix) - } - - if len(v.EndpointType) > 0 { - objectKey := object.Key("EndpointType") - objectKey.String(string(v.EndpointType)) - } - - if v.LoadBalancerOptions != nil { - objectKey := object.Key("LoadBalancerOptions") - if err := awsEc2query_serializeDocumentCreateVerifiedAccessEndpointLoadBalancerOptions(v.LoadBalancerOptions, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceOptions != nil { - objectKey := object.Key("NetworkInterfaceOptions") - if err := awsEc2query_serializeDocumentCreateVerifiedAccessEndpointEniOptions(v.NetworkInterfaceOptions, objectKey); err != nil { - return err - } - } - - if v.PolicyDocument != nil { - objectKey := object.Key("PolicyDocument") - objectKey.String(*v.PolicyDocument) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.SseSpecification != nil { - objectKey := object.Key("SseSpecification") - if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVerifiedAccessGroupInput(v *CreateVerifiedAccessGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PolicyDocument != nil { - objectKey := object.Key("PolicyDocument") - objectKey.String(*v.PolicyDocument) - } - - if v.SseSpecification != nil { - objectKey := object.Key("SseSpecification") - if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVerifiedAccessInstanceInput(v *CreateVerifiedAccessInstanceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FIPSEnabled != nil { - objectKey := object.Key("FIPSEnabled") - objectKey.Boolean(*v.FIPSEnabled) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVerifiedAccessTrustProviderInput(v *CreateVerifiedAccessTrustProviderInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DeviceOptions != nil { - objectKey := object.Key("DeviceOptions") - if err := awsEc2query_serializeDocumentCreateVerifiedAccessTrustProviderDeviceOptions(v.DeviceOptions, objectKey); err != nil { - return err - } - } - - if len(v.DeviceTrustProviderType) > 0 { - objectKey := object.Key("DeviceTrustProviderType") - objectKey.String(string(v.DeviceTrustProviderType)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.OidcOptions != nil { - objectKey := object.Key("OidcOptions") - if err := awsEc2query_serializeDocumentCreateVerifiedAccessTrustProviderOidcOptions(v.OidcOptions, objectKey); err != nil { - return err - } - } - - if v.PolicyReferenceName != nil { - objectKey := object.Key("PolicyReferenceName") - objectKey.String(*v.PolicyReferenceName) - } - - if v.SseSpecification != nil { - objectKey := object.Key("SseSpecification") - if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.TrustProviderType) > 0 { - objectKey := object.Key("TrustProviderType") - objectKey.String(string(v.TrustProviderType)) - } - - if len(v.UserTrustProviderType) > 0 { - objectKey := object.Key("UserTrustProviderType") - objectKey.String(string(v.UserTrustProviderType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVolumeInput(v *CreateVolumeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.Iops != nil { - objectKey := object.Key("Iops") - objectKey.Integer(*v.Iops) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.MultiAttachEnabled != nil { - objectKey := object.Key("MultiAttachEnabled") - objectKey.Boolean(*v.MultiAttachEnabled) - } - - if v.OutpostArn != nil { - objectKey := object.Key("OutpostArn") - objectKey.String(*v.OutpostArn) - } - - if v.Size != nil { - objectKey := object.Key("Size") - objectKey.Integer(*v.Size) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.Throughput != nil { - objectKey := object.Key("Throughput") - objectKey.Integer(*v.Throughput) - } - - if len(v.VolumeType) > 0 { - objectKey := object.Key("VolumeType") - objectKey.String(string(v.VolumeType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpcEndpointConnectionNotificationInput(v *CreateVpcEndpointConnectionNotificationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ConnectionEvents != nil { - objectKey := object.FlatKey("ConnectionEvents") - if err := awsEc2query_serializeDocumentValueStringList(v.ConnectionEvents, objectKey); err != nil { - return err - } - } - - if v.ConnectionNotificationArn != nil { - objectKey := object.Key("ConnectionNotificationArn") - objectKey.String(*v.ConnectionNotificationArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - if v.VpcEndpointId != nil { - objectKey := object.Key("VpcEndpointId") - objectKey.String(*v.VpcEndpointId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpcEndpointInput(v *CreateVpcEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DnsOptions != nil { - objectKey := object.Key("DnsOptions") - if err := awsEc2query_serializeDocumentDnsOptionsSpecification(v.DnsOptions, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.IpAddressType) > 0 { - objectKey := object.Key("IpAddressType") - objectKey.String(string(v.IpAddressType)) - } - - if v.PolicyDocument != nil { - objectKey := object.Key("PolicyDocument") - objectKey.String(*v.PolicyDocument) - } - - if v.PrivateDnsEnabled != nil { - objectKey := object.Key("PrivateDnsEnabled") - objectKey.Boolean(*v.PrivateDnsEnabled) - } - - if v.RouteTableIds != nil { - objectKey := object.FlatKey("RouteTableId") - if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.RouteTableIds, objectKey); err != nil { - return err - } - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.ServiceName != nil { - objectKey := object.Key("ServiceName") - objectKey.String(*v.ServiceName) - } - - if v.SubnetConfigurations != nil { - objectKey := object.FlatKey("SubnetConfiguration") - if err := awsEc2query_serializeDocumentSubnetConfigurationsList(v.SubnetConfigurations, objectKey); err != nil { - return err - } - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetId") - if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.VpcEndpointType) > 0 { - objectKey := object.Key("VpcEndpointType") - objectKey.String(string(v.VpcEndpointType)) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpcEndpointServiceConfigurationInput(v *CreateVpcEndpointServiceConfigurationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AcceptanceRequired != nil { - objectKey := object.Key("AcceptanceRequired") - objectKey.Boolean(*v.AcceptanceRequired) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GatewayLoadBalancerArns != nil { - objectKey := object.FlatKey("GatewayLoadBalancerArn") - if err := awsEc2query_serializeDocumentValueStringList(v.GatewayLoadBalancerArns, objectKey); err != nil { - return err - } - } - - if v.NetworkLoadBalancerArns != nil { - objectKey := object.FlatKey("NetworkLoadBalancerArn") - if err := awsEc2query_serializeDocumentValueStringList(v.NetworkLoadBalancerArns, objectKey); err != nil { - return err - } - } - - if v.PrivateDnsName != nil { - objectKey := object.Key("PrivateDnsName") - objectKey.String(*v.PrivateDnsName) - } - - if v.SupportedIpAddressTypes != nil { - objectKey := object.FlatKey("SupportedIpAddressType") - if err := awsEc2query_serializeDocumentValueStringList(v.SupportedIpAddressTypes, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpcInput(v *CreateVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AmazonProvidedIpv6CidrBlock != nil { - objectKey := object.Key("AmazonProvidedIpv6CidrBlock") - objectKey.Boolean(*v.AmazonProvidedIpv6CidrBlock) - } - - if v.CidrBlock != nil { - objectKey := object.Key("CidrBlock") - objectKey.String(*v.CidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.InstanceTenancy) > 0 { - objectKey := object.Key("InstanceTenancy") - objectKey.String(string(v.InstanceTenancy)) - } - - if v.Ipv4IpamPoolId != nil { - objectKey := object.Key("Ipv4IpamPoolId") - objectKey.String(*v.Ipv4IpamPoolId) - } - - if v.Ipv4NetmaskLength != nil { - objectKey := object.Key("Ipv4NetmaskLength") - objectKey.Integer(*v.Ipv4NetmaskLength) - } - - if v.Ipv6CidrBlock != nil { - objectKey := object.Key("Ipv6CidrBlock") - objectKey.String(*v.Ipv6CidrBlock) - } - - if v.Ipv6CidrBlockNetworkBorderGroup != nil { - objectKey := object.Key("Ipv6CidrBlockNetworkBorderGroup") - objectKey.String(*v.Ipv6CidrBlockNetworkBorderGroup) - } - - if v.Ipv6IpamPoolId != nil { - objectKey := object.Key("Ipv6IpamPoolId") - objectKey.String(*v.Ipv6IpamPoolId) - } - - if v.Ipv6NetmaskLength != nil { - objectKey := object.Key("Ipv6NetmaskLength") - objectKey.Integer(*v.Ipv6NetmaskLength) - } - - if v.Ipv6Pool != nil { - objectKey := object.Key("Ipv6Pool") - objectKey.String(*v.Ipv6Pool) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpcPeeringConnectionInput(v *CreateVpcPeeringConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PeerOwnerId != nil { - objectKey := object.Key("PeerOwnerId") - objectKey.String(*v.PeerOwnerId) - } - - if v.PeerRegion != nil { - objectKey := object.Key("PeerRegion") - objectKey.String(*v.PeerRegion) - } - - if v.PeerVpcId != nil { - objectKey := object.Key("PeerVpcId") - objectKey.String(*v.PeerVpcId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpnConnectionInput(v *CreateVpnConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CustomerGatewayId != nil { - objectKey := object.Key("CustomerGatewayId") - objectKey.String(*v.CustomerGatewayId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentVpnConnectionOptionsSpecification(v.Options, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - if v.Type != nil { - objectKey := object.Key("Type") - objectKey.String(*v.Type) - } - - if v.VpnGatewayId != nil { - objectKey := object.Key("VpnGatewayId") - objectKey.String(*v.VpnGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpnConnectionRouteInput(v *CreateVpnConnectionRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentCreateVpnGatewayInput(v *CreateVpnGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AmazonSideAsn != nil { - objectKey := object.Key("AmazonSideAsn") - objectKey.Long(*v.AmazonSideAsn) - } - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.Type) > 0 { - objectKey := object.Key("Type") - objectKey.String(string(v.Type)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteCarrierGatewayInput(v *DeleteCarrierGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CarrierGatewayId != nil { - objectKey := object.Key("CarrierGatewayId") - objectKey.String(*v.CarrierGatewayId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteClientVpnEndpointInput(v *DeleteClientVpnEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteClientVpnRouteInput(v *DeleteClientVpnRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TargetVpcSubnetId != nil { - objectKey := object.Key("TargetVpcSubnetId") - objectKey.String(*v.TargetVpcSubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteCoipCidrInput(v *DeleteCoipCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.CoipPoolId != nil { - objectKey := object.Key("CoipPoolId") - objectKey.String(*v.CoipPoolId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteCoipPoolInput(v *DeleteCoipPoolInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CoipPoolId != nil { - objectKey := object.Key("CoipPoolId") - objectKey.String(*v.CoipPoolId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteCustomerGatewayInput(v *DeleteCustomerGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CustomerGatewayId != nil { - objectKey := object.Key("CustomerGatewayId") - objectKey.String(*v.CustomerGatewayId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteDhcpOptionsInput(v *DeleteDhcpOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DhcpOptionsId != nil { - objectKey := object.Key("DhcpOptionsId") - objectKey.String(*v.DhcpOptionsId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteEgressOnlyInternetGatewayInput(v *DeleteEgressOnlyInternetGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EgressOnlyInternetGatewayId != nil { - objectKey := object.Key("EgressOnlyInternetGatewayId") - objectKey.String(*v.EgressOnlyInternetGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteFleetsInput(v *DeleteFleetsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FleetIds != nil { - objectKey := object.FlatKey("FleetId") - if err := awsEc2query_serializeDocumentFleetIdSet(v.FleetIds, objectKey); err != nil { - return err - } - } - - if v.TerminateInstances != nil { - objectKey := object.Key("TerminateInstances") - objectKey.Boolean(*v.TerminateInstances) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteFlowLogsInput(v *DeleteFlowLogsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FlowLogIds != nil { - objectKey := object.FlatKey("FlowLogId") - if err := awsEc2query_serializeDocumentFlowLogIdList(v.FlowLogIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteFpgaImageInput(v *DeleteFpgaImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FpgaImageId != nil { - objectKey := object.Key("FpgaImageId") - objectKey.String(*v.FpgaImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteInstanceConnectEndpointInput(v *DeleteInstanceConnectEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceConnectEndpointId != nil { - objectKey := object.Key("InstanceConnectEndpointId") - objectKey.String(*v.InstanceConnectEndpointId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteInstanceEventWindowInput(v *DeleteInstanceEventWindowInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ForceDelete != nil { - objectKey := object.Key("ForceDelete") - objectKey.Boolean(*v.ForceDelete) - } - - if v.InstanceEventWindowId != nil { - objectKey := object.Key("InstanceEventWindowId") - objectKey.String(*v.InstanceEventWindowId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteInternetGatewayInput(v *DeleteInternetGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InternetGatewayId != nil { - objectKey := object.Key("InternetGatewayId") - objectKey.String(*v.InternetGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteIpamInput(v *DeleteIpamInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cascade != nil { - objectKey := object.Key("Cascade") - objectKey.Boolean(*v.Cascade) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamId != nil { - objectKey := object.Key("IpamId") - objectKey.String(*v.IpamId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteIpamPoolInput(v *DeleteIpamPoolInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cascade != nil { - objectKey := object.Key("Cascade") - objectKey.Boolean(*v.Cascade) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteIpamResourceDiscoveryInput(v *DeleteIpamResourceDiscoveryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamResourceDiscoveryId != nil { - objectKey := object.Key("IpamResourceDiscoveryId") - objectKey.String(*v.IpamResourceDiscoveryId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteIpamScopeInput(v *DeleteIpamScopeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamScopeId != nil { - objectKey := object.Key("IpamScopeId") - objectKey.String(*v.IpamScopeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteKeyPairInput(v *DeleteKeyPairInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.KeyPairId != nil { - objectKey := object.Key("KeyPairId") - objectKey.String(*v.KeyPairId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteLaunchTemplateInput(v *DeleteLaunchTemplateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteLaunchTemplateVersionsInput(v *DeleteLaunchTemplateVersionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.Versions != nil { - objectKey := object.FlatKey("LaunchTemplateVersion") - if err := awsEc2query_serializeDocumentVersionStringList(v.Versions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteInput(v *DeleteLocalGatewayRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationPrefixListId != nil { - objectKey := object.Key("DestinationPrefixListId") - objectKey.String(*v.DestinationPrefixListId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableInput(v *DeleteLocalGatewayRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(v *DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId != nil { - objectKey := object.Key("LocalGatewayRouteTableVirtualInterfaceGroupAssociationId") - objectKey.String(*v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteLocalGatewayRouteTableVpcAssociationInput(v *DeleteLocalGatewayRouteTableVpcAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableVpcAssociationId != nil { - objectKey := object.Key("LocalGatewayRouteTableVpcAssociationId") - objectKey.String(*v.LocalGatewayRouteTableVpcAssociationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteManagedPrefixListInput(v *DeleteManagedPrefixListInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNatGatewayInput(v *DeleteNatGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkAclEntryInput(v *DeleteNetworkAclEntryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Egress != nil { - objectKey := object.Key("Egress") - objectKey.Boolean(*v.Egress) - } - - if v.NetworkAclId != nil { - objectKey := object.Key("NetworkAclId") - objectKey.String(*v.NetworkAclId) - } - - if v.RuleNumber != nil { - objectKey := object.Key("RuleNumber") - objectKey.Integer(*v.RuleNumber) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkAclInput(v *DeleteNetworkAclInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkAclId != nil { - objectKey := object.Key("NetworkAclId") - objectKey.String(*v.NetworkAclId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeAnalysisInput(v *DeleteNetworkInsightsAccessScopeAnalysisInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInsightsAccessScopeAnalysisId != nil { - objectKey := object.Key("NetworkInsightsAccessScopeAnalysisId") - objectKey.String(*v.NetworkInsightsAccessScopeAnalysisId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAccessScopeInput(v *DeleteNetworkInsightsAccessScopeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInsightsAccessScopeId != nil { - objectKey := object.Key("NetworkInsightsAccessScopeId") - objectKey.String(*v.NetworkInsightsAccessScopeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkInsightsAnalysisInput(v *DeleteNetworkInsightsAnalysisInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInsightsAnalysisId != nil { - objectKey := object.Key("NetworkInsightsAnalysisId") - objectKey.String(*v.NetworkInsightsAnalysisId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkInsightsPathInput(v *DeleteNetworkInsightsPathInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInsightsPathId != nil { - objectKey := object.Key("NetworkInsightsPathId") - objectKey.String(*v.NetworkInsightsPathId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkInterfaceInput(v *DeleteNetworkInterfaceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteNetworkInterfacePermissionInput(v *DeleteNetworkInterfacePermissionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Force != nil { - objectKey := object.Key("Force") - objectKey.Boolean(*v.Force) - } - - if v.NetworkInterfacePermissionId != nil { - objectKey := object.Key("NetworkInterfacePermissionId") - objectKey.String(*v.NetworkInterfacePermissionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeletePlacementGroupInput(v *DeletePlacementGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeletePublicIpv4PoolInput(v *DeletePublicIpv4PoolInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PoolId != nil { - objectKey := object.Key("PoolId") - objectKey.String(*v.PoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteQueuedReservedInstancesInput(v *DeleteQueuedReservedInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ReservedInstancesIds != nil { - objectKey := object.FlatKey("ReservedInstancesId") - if err := awsEc2query_serializeDocumentDeleteQueuedReservedInstancesIdList(v.ReservedInstancesIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteRouteInput(v *DeleteRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationIpv6CidrBlock != nil { - objectKey := object.Key("DestinationIpv6CidrBlock") - objectKey.String(*v.DestinationIpv6CidrBlock) - } - - if v.DestinationPrefixListId != nil { - objectKey := object.Key("DestinationPrefixListId") - objectKey.String(*v.DestinationPrefixListId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteRouteTableInput(v *DeleteRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteSecurityGroupInput(v *DeleteSecurityGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteSnapshotInput(v *DeleteSnapshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteSpotDatafeedSubscriptionInput(v *DeleteSpotDatafeedSubscriptionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteSubnetCidrReservationInput(v *DeleteSubnetCidrReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetCidrReservationId != nil { - objectKey := object.Key("SubnetCidrReservationId") - objectKey.String(*v.SubnetCidrReservationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteSubnetInput(v *DeleteSubnetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Resources != nil { - objectKey := object.FlatKey("ResourceId") - if err := awsEc2query_serializeDocumentResourceIdList(v.Resources, objectKey); err != nil { - return err - } - } - - if v.Tags != nil { - objectKey := object.FlatKey("Tag") - if err := awsEc2query_serializeDocumentTagList(v.Tags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterInput(v *DeleteTrafficMirrorFilterInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TrafficMirrorFilterId != nil { - objectKey := object.Key("TrafficMirrorFilterId") - objectKey.String(*v.TrafficMirrorFilterId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTrafficMirrorFilterRuleInput(v *DeleteTrafficMirrorFilterRuleInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TrafficMirrorFilterRuleId != nil { - objectKey := object.Key("TrafficMirrorFilterRuleId") - objectKey.String(*v.TrafficMirrorFilterRuleId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTrafficMirrorSessionInput(v *DeleteTrafficMirrorSessionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TrafficMirrorSessionId != nil { - objectKey := object.Key("TrafficMirrorSessionId") - objectKey.String(*v.TrafficMirrorSessionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTrafficMirrorTargetInput(v *DeleteTrafficMirrorTargetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TrafficMirrorTargetId != nil { - objectKey := object.Key("TrafficMirrorTargetId") - objectKey.String(*v.TrafficMirrorTargetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectInput(v *DeleteTransitGatewayConnectInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayConnectPeerInput(v *DeleteTransitGatewayConnectPeerInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayConnectPeerId != nil { - objectKey := object.Key("TransitGatewayConnectPeerId") - objectKey.String(*v.TransitGatewayConnectPeerId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayInput(v *DeleteTransitGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayMulticastDomainInput(v *DeleteTransitGatewayMulticastDomainInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayPeeringAttachmentInput(v *DeleteTransitGatewayPeeringAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayPolicyTableInput(v *DeleteTransitGatewayPolicyTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayPolicyTableId != nil { - objectKey := object.Key("TransitGatewayPolicyTableId") - objectKey.String(*v.TransitGatewayPolicyTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayPrefixListReferenceInput(v *DeleteTransitGatewayPrefixListReferenceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteInput(v *DeleteTransitGatewayRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableAnnouncementInput(v *DeleteTransitGatewayRouteTableAnnouncementInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayRouteTableAnnouncementId != nil { - objectKey := object.Key("TransitGatewayRouteTableAnnouncementId") - objectKey.String(*v.TransitGatewayRouteTableAnnouncementId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayRouteTableInput(v *DeleteTransitGatewayRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteTransitGatewayVpcAttachmentInput(v *DeleteTransitGatewayVpcAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVerifiedAccessEndpointInput(v *DeleteVerifiedAccessEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessEndpointId != nil { - objectKey := object.Key("VerifiedAccessEndpointId") - objectKey.String(*v.VerifiedAccessEndpointId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVerifiedAccessGroupInput(v *DeleteVerifiedAccessGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVerifiedAccessInstanceInput(v *DeleteVerifiedAccessInstanceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVerifiedAccessTrustProviderInput(v *DeleteVerifiedAccessTrustProviderInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessTrustProviderId != nil { - objectKey := object.Key("VerifiedAccessTrustProviderId") - objectKey.String(*v.VerifiedAccessTrustProviderId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVolumeInput(v *DeleteVolumeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpcEndpointConnectionNotificationsInput(v *DeleteVpcEndpointConnectionNotificationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ConnectionNotificationIds != nil { - objectKey := object.FlatKey("ConnectionNotificationId") - if err := awsEc2query_serializeDocumentConnectionNotificationIdsList(v.ConnectionNotificationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpcEndpointServiceConfigurationsInput(v *DeleteVpcEndpointServiceConfigurationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ServiceIds != nil { - objectKey := object.FlatKey("ServiceId") - if err := awsEc2query_serializeDocumentVpcEndpointServiceIdList(v.ServiceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpcEndpointsInput(v *DeleteVpcEndpointsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcEndpointIds != nil { - objectKey := object.FlatKey("VpcEndpointId") - if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpcInput(v *DeleteVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpcPeeringConnectionInput(v *DeleteVpcPeeringConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpnConnectionInput(v *DeleteVpnConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpnConnectionRouteInput(v *DeleteVpnConnectionRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeleteVpnGatewayInput(v *DeleteVpnGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpnGatewayId != nil { - objectKey := object.Key("VpnGatewayId") - objectKey.String(*v.VpnGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeprovisionByoipCidrInput(v *DeprovisionByoipCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeprovisionIpamByoasnInput(v *DeprovisionIpamByoasnInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Asn != nil { - objectKey := object.Key("Asn") - objectKey.String(*v.Asn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamId != nil { - objectKey := object.Key("IpamId") - objectKey.String(*v.IpamId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeprovisionIpamPoolCidrInput(v *DeprovisionIpamPoolCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeprovisionPublicIpv4PoolCidrInput(v *DeprovisionPublicIpv4PoolCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PoolId != nil { - objectKey := object.Key("PoolId") - objectKey.String(*v.PoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeregisterImageInput(v *DeregisterImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeregisterInstanceEventNotificationAttributesInput(v *DeregisterInstanceEventNotificationAttributesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceTagAttribute != nil { - objectKey := object.Key("InstanceTagAttribute") - if err := awsEc2query_serializeDocumentDeregisterInstanceTagAttributeRequest(v.InstanceTagAttribute, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupMembersInput(v *DeregisterTransitGatewayMulticastGroupMembersInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupIpAddress != nil { - objectKey := object.Key("GroupIpAddress") - objectKey.String(*v.GroupIpAddress) - } - - if v.NetworkInterfaceIds != nil { - objectKey := object.FlatKey("NetworkInterfaceIds") - if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDeregisterTransitGatewayMulticastGroupSourcesInput(v *DeregisterTransitGatewayMulticastGroupSourcesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupIpAddress != nil { - objectKey := object.Key("GroupIpAddress") - objectKey.String(*v.GroupIpAddress) - } - - if v.NetworkInterfaceIds != nil { - objectKey := object.FlatKey("NetworkInterfaceIds") - if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAccountAttributesInput(v *DescribeAccountAttributesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AttributeNames != nil { - objectKey := object.FlatKey("AttributeName") - if err := awsEc2query_serializeDocumentAccountAttributeNameStringList(v.AttributeNames, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAddressesAttributeInput(v *DescribeAddressesAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationIds != nil { - objectKey := object.FlatKey("AllocationId") - if err := awsEc2query_serializeDocumentAllocationIds(v.AllocationIds, objectKey); err != nil { - return err - } - } - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAddressesInput(v *DescribeAddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationIds != nil { - objectKey := object.FlatKey("AllocationId") - if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.PublicIps != nil { - objectKey := object.FlatKey("PublicIp") - if err := awsEc2query_serializeDocumentPublicIpStringList(v.PublicIps, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAddressTransfersInput(v *DescribeAddressTransfersInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationIds != nil { - objectKey := object.FlatKey("AllocationId") - if err := awsEc2query_serializeDocumentAllocationIdList(v.AllocationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAggregateIdFormatInput(v *DescribeAggregateIdFormatInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAvailabilityZonesInput(v *DescribeAvailabilityZonesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllAvailabilityZones != nil { - objectKey := object.Key("AllAvailabilityZones") - objectKey.Boolean(*v.AllAvailabilityZones) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ZoneIds != nil { - objectKey := object.FlatKey("ZoneId") - if err := awsEc2query_serializeDocumentZoneIdStringList(v.ZoneIds, objectKey); err != nil { - return err - } - } - - if v.ZoneNames != nil { - objectKey := object.FlatKey("ZoneName") - if err := awsEc2query_serializeDocumentZoneNameStringList(v.ZoneNames, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeAwsNetworkPerformanceMetricSubscriptionsInput(v *DescribeAwsNetworkPerformanceMetricSubscriptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeBundleTasksInput(v *DescribeBundleTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.BundleIds != nil { - objectKey := object.FlatKey("BundleId") - if err := awsEc2query_serializeDocumentBundleIdStringList(v.BundleIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeByoipCidrsInput(v *DescribeByoipCidrsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeCapacityBlockOfferingsInput(v *DescribeCapacityBlockOfferingsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityDurationHours != nil { - objectKey := object.Key("CapacityDurationHours") - objectKey.Integer(*v.CapacityDurationHours) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndDateRange != nil { - objectKey := object.Key("EndDateRange") - objectKey.String(smithytime.FormatDateTime(*v.EndDateRange)) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if v.InstanceType != nil { - objectKey := object.Key("InstanceType") - objectKey.String(*v.InstanceType) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.StartDateRange != nil { - objectKey := object.Key("StartDateRange") - objectKey.String(smithytime.FormatDateTime(*v.StartDateRange)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeCapacityReservationFleetsInput(v *DescribeCapacityReservationFleetsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationFleetIds != nil { - objectKey := object.FlatKey("CapacityReservationFleetId") - if err := awsEc2query_serializeDocumentCapacityReservationFleetIdSet(v.CapacityReservationFleetIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeCapacityReservationsInput(v *DescribeCapacityReservationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationIds != nil { - objectKey := object.FlatKey("CapacityReservationId") - if err := awsEc2query_serializeDocumentCapacityReservationIdSet(v.CapacityReservationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeCarrierGatewaysInput(v *DescribeCarrierGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CarrierGatewayIds != nil { - objectKey := object.FlatKey("CarrierGatewayId") - if err := awsEc2query_serializeDocumentCarrierGatewayIdSet(v.CarrierGatewayIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeClassicLinkInstancesInput(v *DescribeClassicLinkInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeClientVpnAuthorizationRulesInput(v *DescribeClientVpnAuthorizationRulesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeClientVpnConnectionsInput(v *DescribeClientVpnConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeClientVpnEndpointsInput(v *DescribeClientVpnEndpointsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointIds != nil { - objectKey := object.FlatKey("ClientVpnEndpointId") - if err := awsEc2query_serializeDocumentClientVpnEndpointIdList(v.ClientVpnEndpointIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeClientVpnRoutesInput(v *DescribeClientVpnRoutesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeClientVpnTargetNetworksInput(v *DescribeClientVpnTargetNetworksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationIds != nil { - objectKey := object.FlatKey("AssociationIds") - if err := awsEc2query_serializeDocumentValueStringList(v.AssociationIds, objectKey); err != nil { - return err - } - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeCoipPoolsInput(v *DescribeCoipPoolsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PoolIds != nil { - objectKey := object.FlatKey("PoolId") - if err := awsEc2query_serializeDocumentCoipPoolIdSet(v.PoolIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeConversionTasksInput(v *DescribeConversionTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ConversionTaskIds != nil { - objectKey := object.FlatKey("ConversionTaskId") - if err := awsEc2query_serializeDocumentConversionIdStringList(v.ConversionTaskIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeCustomerGatewaysInput(v *DescribeCustomerGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CustomerGatewayIds != nil { - objectKey := object.FlatKey("CustomerGatewayId") - if err := awsEc2query_serializeDocumentCustomerGatewayIdStringList(v.CustomerGatewayIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeDhcpOptionsInput(v *DescribeDhcpOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DhcpOptionsIds != nil { - objectKey := object.FlatKey("DhcpOptionsId") - if err := awsEc2query_serializeDocumentDhcpOptionsIdStringList(v.DhcpOptionsIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeEgressOnlyInternetGatewaysInput(v *DescribeEgressOnlyInternetGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EgressOnlyInternetGatewayIds != nil { - objectKey := object.FlatKey("EgressOnlyInternetGatewayId") - if err := awsEc2query_serializeDocumentEgressOnlyInternetGatewayIdList(v.EgressOnlyInternetGatewayIds, objectKey); err != nil { - return err - } - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeElasticGpusInput(v *DescribeElasticGpusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ElasticGpuIds != nil { - objectKey := object.FlatKey("ElasticGpuId") - if err := awsEc2query_serializeDocumentElasticGpuIdSet(v.ElasticGpuIds, objectKey); err != nil { - return err - } - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeExportImageTasksInput(v *DescribeExportImageTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ExportImageTaskIds != nil { - objectKey := object.FlatKey("ExportImageTaskId") - if err := awsEc2query_serializeDocumentExportImageTaskIdList(v.ExportImageTaskIds, objectKey); err != nil { - return err - } - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeExportTasksInput(v *DescribeExportTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ExportTaskIds != nil { - objectKey := object.FlatKey("ExportTaskId") - if err := awsEc2query_serializeDocumentExportTaskIdStringList(v.ExportTaskIds, objectKey); err != nil { - return err - } - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFastLaunchImagesInput(v *DescribeFastLaunchImagesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ImageIds != nil { - objectKey := object.FlatKey("ImageId") - if err := awsEc2query_serializeDocumentFastLaunchImageIdList(v.ImageIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFastSnapshotRestoresInput(v *DescribeFastSnapshotRestoresInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFleetHistoryInput(v *DescribeFleetHistoryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.EventType) > 0 { - objectKey := object.Key("EventType") - objectKey.String(string(v.EventType)) - } - - if v.FleetId != nil { - objectKey := object.Key("FleetId") - objectKey.String(*v.FleetId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.StartTime != nil { - objectKey := object.Key("StartTime") - objectKey.String(smithytime.FormatDateTime(*v.StartTime)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFleetInstancesInput(v *DescribeFleetInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.FleetId != nil { - objectKey := object.Key("FleetId") - objectKey.String(*v.FleetId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFleetsInput(v *DescribeFleetsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.FleetIds != nil { - objectKey := object.FlatKey("FleetId") - if err := awsEc2query_serializeDocumentFleetIdSet(v.FleetIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFlowLogsInput(v *DescribeFlowLogsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filter != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil { - return err - } - } - - if v.FlowLogIds != nil { - objectKey := object.FlatKey("FlowLogId") - if err := awsEc2query_serializeDocumentFlowLogIdList(v.FlowLogIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFpgaImageAttributeInput(v *DescribeFpgaImageAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FpgaImageId != nil { - objectKey := object.Key("FpgaImageId") - objectKey.String(*v.FpgaImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeFpgaImagesInput(v *DescribeFpgaImagesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.FpgaImageIds != nil { - objectKey := object.FlatKey("FpgaImageId") - if err := awsEc2query_serializeDocumentFpgaImageIdList(v.FpgaImageIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.Owners != nil { - objectKey := object.FlatKey("Owner") - if err := awsEc2query_serializeDocumentOwnerStringList(v.Owners, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeHostReservationOfferingsInput(v *DescribeHostReservationOfferingsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filter != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil { - return err - } - } - - if v.MaxDuration != nil { - objectKey := object.Key("MaxDuration") - objectKey.Integer(*v.MaxDuration) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.MinDuration != nil { - objectKey := object.Key("MinDuration") - objectKey.Integer(*v.MinDuration) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.OfferingId != nil { - objectKey := object.Key("OfferingId") - objectKey.String(*v.OfferingId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeHostReservationsInput(v *DescribeHostReservationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filter != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil { - return err - } - } - - if v.HostReservationIdSet != nil { - objectKey := object.FlatKey("HostReservationIdSet") - if err := awsEc2query_serializeDocumentHostReservationIdSet(v.HostReservationIdSet, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeHostsInput(v *DescribeHostsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filter != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil { - return err - } - } - - if v.HostIds != nil { - objectKey := object.FlatKey("HostId") - if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIamInstanceProfileAssociationsInput(v *DescribeIamInstanceProfileAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationIds != nil { - objectKey := object.FlatKey("AssociationId") - if err := awsEc2query_serializeDocumentAssociationIdList(v.AssociationIds, objectKey); err != nil { - return err - } - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIdentityIdFormatInput(v *DescribeIdentityIdFormatInput, value query.Value) error { - object := value.Object() - _ = object - - if v.PrincipalArn != nil { - objectKey := object.Key("PrincipalArn") - objectKey.String(*v.PrincipalArn) - } - - if v.Resource != nil { - objectKey := object.Key("Resource") - objectKey.String(*v.Resource) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIdFormatInput(v *DescribeIdFormatInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Resource != nil { - objectKey := object.Key("Resource") - objectKey.String(*v.Resource) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeImageAttributeInput(v *DescribeImageAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeImagesInput(v *DescribeImagesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ExecutableUsers != nil { - objectKey := object.FlatKey("ExecutableBy") - if err := awsEc2query_serializeDocumentExecutableByStringList(v.ExecutableUsers, objectKey); err != nil { - return err - } - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ImageIds != nil { - objectKey := object.FlatKey("ImageId") - if err := awsEc2query_serializeDocumentImageIdStringList(v.ImageIds, objectKey); err != nil { - return err - } - } - - if v.IncludeDeprecated != nil { - objectKey := object.Key("IncludeDeprecated") - objectKey.Boolean(*v.IncludeDeprecated) - } - - if v.IncludeDisabled != nil { - objectKey := object.Key("IncludeDisabled") - objectKey.Boolean(*v.IncludeDisabled) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.Owners != nil { - objectKey := object.FlatKey("Owner") - if err := awsEc2query_serializeDocumentOwnerStringList(v.Owners, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeImportImageTasksInput(v *DescribeImportImageTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filters") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ImportTaskIds != nil { - objectKey := object.FlatKey("ImportTaskId") - if err := awsEc2query_serializeDocumentImportTaskIdList(v.ImportTaskIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeImportSnapshotTasksInput(v *DescribeImportSnapshotTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filters") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ImportTaskIds != nil { - objectKey := object.FlatKey("ImportTaskId") - if err := awsEc2query_serializeDocumentImportSnapshotTaskIdList(v.ImportTaskIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceAttributeInput(v *DescribeInstanceAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceConnectEndpointsInput(v *DescribeInstanceConnectEndpointsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceConnectEndpointIds != nil { - objectKey := object.FlatKey("InstanceConnectEndpointId") - if err := awsEc2query_serializeDocumentValueStringList(v.InstanceConnectEndpointIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceCreditSpecificationsInput(v *DescribeInstanceCreditSpecificationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceEventNotificationAttributesInput(v *DescribeInstanceEventNotificationAttributesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceEventWindowsInput(v *DescribeInstanceEventWindowsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceEventWindowIds != nil { - objectKey := object.FlatKey("InstanceEventWindowId") - if err := awsEc2query_serializeDocumentInstanceEventWindowIdSet(v.InstanceEventWindowIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstancesInput(v *DescribeInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceStatusInput(v *DescribeInstanceStatusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IncludeAllInstances != nil { - objectKey := object.Key("IncludeAllInstances") - objectKey.Boolean(*v.IncludeAllInstances) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceTopologyInput(v *DescribeInstanceTopologyInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.GroupNames != nil { - objectKey := object.FlatKey("GroupName") - if err := awsEc2query_serializeDocumentDescribeInstanceTopologyGroupNameSet(v.GroupNames, objectKey); err != nil { - return err - } - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentDescribeInstanceTopologyInstanceIdSet(v.InstanceIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceTypeOfferingsInput(v *DescribeInstanceTypeOfferingsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if len(v.LocationType) > 0 { - objectKey := object.Key("LocationType") - objectKey.String(string(v.LocationType)) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInstanceTypesInput(v *DescribeInstanceTypesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceTypes != nil { - objectKey := object.FlatKey("InstanceType") - if err := awsEc2query_serializeDocumentRequestInstanceTypeList(v.InstanceTypes, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeInternetGatewaysInput(v *DescribeInternetGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InternetGatewayIds != nil { - objectKey := object.FlatKey("InternetGatewayId") - if err := awsEc2query_serializeDocumentInternetGatewayIdList(v.InternetGatewayIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpamByoasnInput(v *DescribeIpamByoasnInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpamPoolsInput(v *DescribeIpamPoolsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamPoolIds != nil { - objectKey := object.FlatKey("IpamPoolId") - if err := awsEc2query_serializeDocumentValueStringList(v.IpamPoolIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveriesInput(v *DescribeIpamResourceDiscoveriesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamResourceDiscoveryIds != nil { - objectKey := object.FlatKey("IpamResourceDiscoveryId") - if err := awsEc2query_serializeDocumentValueStringList(v.IpamResourceDiscoveryIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpamResourceDiscoveryAssociationsInput(v *DescribeIpamResourceDiscoveryAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamResourceDiscoveryAssociationIds != nil { - objectKey := object.FlatKey("IpamResourceDiscoveryAssociationId") - if err := awsEc2query_serializeDocumentValueStringList(v.IpamResourceDiscoveryAssociationIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpamScopesInput(v *DescribeIpamScopesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamScopeIds != nil { - objectKey := object.FlatKey("IpamScopeId") - if err := awsEc2query_serializeDocumentValueStringList(v.IpamScopeIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpamsInput(v *DescribeIpamsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamIds != nil { - objectKey := object.FlatKey("IpamId") - if err := awsEc2query_serializeDocumentValueStringList(v.IpamIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeIpv6PoolsInput(v *DescribeIpv6PoolsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PoolIds != nil { - objectKey := object.FlatKey("PoolId") - if err := awsEc2query_serializeDocumentIpv6PoolIdList(v.PoolIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeKeyPairsInput(v *DescribeKeyPairsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IncludePublicKey != nil { - objectKey := object.Key("IncludePublicKey") - objectKey.Boolean(*v.IncludePublicKey) - } - - if v.KeyNames != nil { - objectKey := object.FlatKey("KeyName") - if err := awsEc2query_serializeDocumentKeyNameStringList(v.KeyNames, objectKey); err != nil { - return err - } - } - - if v.KeyPairIds != nil { - objectKey := object.FlatKey("KeyPairId") - if err := awsEc2query_serializeDocumentKeyPairIdStringList(v.KeyPairIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLaunchTemplatesInput(v *DescribeLaunchTemplatesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LaunchTemplateIds != nil { - objectKey := object.FlatKey("LaunchTemplateId") - if err := awsEc2query_serializeDocumentLaunchTemplateIdStringList(v.LaunchTemplateIds, objectKey); err != nil { - return err - } - } - - if v.LaunchTemplateNames != nil { - objectKey := object.FlatKey("LaunchTemplateName") - if err := awsEc2query_serializeDocumentLaunchTemplateNameStringList(v.LaunchTemplateNames, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLaunchTemplateVersionsInput(v *DescribeLaunchTemplateVersionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.MaxVersion != nil { - objectKey := object.Key("MaxVersion") - objectKey.String(*v.MaxVersion) - } - - if v.MinVersion != nil { - objectKey := object.Key("MinVersion") - objectKey.String(*v.MinVersion) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ResolveAlias != nil { - objectKey := object.Key("ResolveAlias") - objectKey.Boolean(*v.ResolveAlias) - } - - if v.Versions != nil { - objectKey := object.FlatKey("LaunchTemplateVersion") - if err := awsEc2query_serializeDocumentVersionStringList(v.Versions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTablesInput(v *DescribeLocalGatewayRouteTablesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayRouteTableIds != nil { - objectKey := object.FlatKey("LocalGatewayRouteTableId") - if err := awsEc2query_serializeDocumentLocalGatewayRouteTableIdSet(v.LocalGatewayRouteTableIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput(v *DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds != nil { - objectKey := object.FlatKey("LocalGatewayRouteTableVirtualInterfaceGroupAssociationId") - if err := awsEc2query_serializeDocumentLocalGatewayRouteTableVirtualInterfaceGroupAssociationIdSet(v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLocalGatewayRouteTableVpcAssociationsInput(v *DescribeLocalGatewayRouteTableVpcAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayRouteTableVpcAssociationIds != nil { - objectKey := object.FlatKey("LocalGatewayRouteTableVpcAssociationId") - if err := awsEc2query_serializeDocumentLocalGatewayRouteTableVpcAssociationIdSet(v.LocalGatewayRouteTableVpcAssociationIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLocalGatewaysInput(v *DescribeLocalGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayIds != nil { - objectKey := object.FlatKey("LocalGatewayId") - if err := awsEc2query_serializeDocumentLocalGatewayIdSet(v.LocalGatewayIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfaceGroupsInput(v *DescribeLocalGatewayVirtualInterfaceGroupsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayVirtualInterfaceGroupIds != nil { - objectKey := object.FlatKey("LocalGatewayVirtualInterfaceGroupId") - if err := awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceGroupIdSet(v.LocalGatewayVirtualInterfaceGroupIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLocalGatewayVirtualInterfacesInput(v *DescribeLocalGatewayVirtualInterfacesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayVirtualInterfaceIds != nil { - objectKey := object.FlatKey("LocalGatewayVirtualInterfaceId") - if err := awsEc2query_serializeDocumentLocalGatewayVirtualInterfaceIdSet(v.LocalGatewayVirtualInterfaceIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeLockedSnapshotsInput(v *DescribeLockedSnapshotsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SnapshotIds != nil { - objectKey := object.FlatKey("SnapshotId") - if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeManagedPrefixListsInput(v *DescribeManagedPrefixListsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PrefixListIds != nil { - objectKey := object.FlatKey("PrefixListId") - if err := awsEc2query_serializeDocumentValueStringList(v.PrefixListIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeMovingAddressesInput(v *DescribeMovingAddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PublicIps != nil { - objectKey := object.FlatKey("PublicIp") - if err := awsEc2query_serializeDocumentValueStringList(v.PublicIps, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNatGatewaysInput(v *DescribeNatGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filter != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filter, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NatGatewayIds != nil { - objectKey := object.FlatKey("NatGatewayId") - if err := awsEc2query_serializeDocumentNatGatewayIdStringList(v.NatGatewayIds, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkAclsInput(v *DescribeNetworkAclsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkAclIds != nil { - objectKey := object.FlatKey("NetworkAclId") - if err := awsEc2query_serializeDocumentNetworkAclIdStringList(v.NetworkAclIds, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopeAnalysesInput(v *DescribeNetworkInsightsAccessScopeAnalysesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AnalysisStartTimeBegin != nil { - objectKey := object.Key("AnalysisStartTimeBegin") - objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTimeBegin)) - } - - if v.AnalysisStartTimeEnd != nil { - objectKey := object.Key("AnalysisStartTimeEnd") - objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTimeEnd)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInsightsAccessScopeAnalysisIds != nil { - objectKey := object.FlatKey("NetworkInsightsAccessScopeAnalysisId") - if err := awsEc2query_serializeDocumentNetworkInsightsAccessScopeAnalysisIdList(v.NetworkInsightsAccessScopeAnalysisIds, objectKey); err != nil { - return err - } - } - - if v.NetworkInsightsAccessScopeId != nil { - objectKey := object.Key("NetworkInsightsAccessScopeId") - objectKey.String(*v.NetworkInsightsAccessScopeId) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAccessScopesInput(v *DescribeNetworkInsightsAccessScopesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInsightsAccessScopeIds != nil { - objectKey := object.FlatKey("NetworkInsightsAccessScopeId") - if err := awsEc2query_serializeDocumentNetworkInsightsAccessScopeIdList(v.NetworkInsightsAccessScopeIds, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInsightsAnalysesInput(v *DescribeNetworkInsightsAnalysesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AnalysisEndTime != nil { - objectKey := object.Key("AnalysisEndTime") - objectKey.String(smithytime.FormatDateTime(*v.AnalysisEndTime)) - } - - if v.AnalysisStartTime != nil { - objectKey := object.Key("AnalysisStartTime") - objectKey.String(smithytime.FormatDateTime(*v.AnalysisStartTime)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInsightsAnalysisIds != nil { - objectKey := object.FlatKey("NetworkInsightsAnalysisId") - if err := awsEc2query_serializeDocumentNetworkInsightsAnalysisIdList(v.NetworkInsightsAnalysisIds, objectKey); err != nil { - return err - } - } - - if v.NetworkInsightsPathId != nil { - objectKey := object.Key("NetworkInsightsPathId") - objectKey.String(*v.NetworkInsightsPathId) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInsightsPathsInput(v *DescribeNetworkInsightsPathsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInsightsPathIds != nil { - objectKey := object.FlatKey("NetworkInsightsPathId") - if err := awsEc2query_serializeDocumentNetworkInsightsPathIdList(v.NetworkInsightsPathIds, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInterfaceAttributeInput(v *DescribeNetworkInterfaceAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInterfacePermissionsInput(v *DescribeNetworkInterfacePermissionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInterfacePermissionIds != nil { - objectKey := object.FlatKey("NetworkInterfacePermissionId") - if err := awsEc2query_serializeDocumentNetworkInterfacePermissionIdList(v.NetworkInterfacePermissionIds, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeNetworkInterfacesInput(v *DescribeNetworkInterfacesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInterfaceIds != nil { - objectKey := object.FlatKey("NetworkInterfaceId") - if err := awsEc2query_serializeDocumentNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribePlacementGroupsInput(v *DescribePlacementGroupsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.GroupIds != nil { - objectKey := object.FlatKey("GroupId") - if err := awsEc2query_serializeDocumentPlacementGroupIdStringList(v.GroupIds, objectKey); err != nil { - return err - } - } - - if v.GroupNames != nil { - objectKey := object.FlatKey("GroupName") - if err := awsEc2query_serializeDocumentPlacementGroupStringList(v.GroupNames, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribePrefixListsInput(v *DescribePrefixListsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PrefixListIds != nil { - objectKey := object.FlatKey("PrefixListId") - if err := awsEc2query_serializeDocumentPrefixListResourceIdStringList(v.PrefixListIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribePrincipalIdFormatInput(v *DescribePrincipalIdFormatInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.Resources != nil { - objectKey := object.FlatKey("Resource") - if err := awsEc2query_serializeDocumentResourceList(v.Resources, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribePublicIpv4PoolsInput(v *DescribePublicIpv4PoolsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PoolIds != nil { - objectKey := object.FlatKey("PoolId") - if err := awsEc2query_serializeDocumentPublicIpv4PoolIdStringList(v.PoolIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeRegionsInput(v *DescribeRegionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllRegions != nil { - objectKey := object.Key("AllRegions") - objectKey.Boolean(*v.AllRegions) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.RegionNames != nil { - objectKey := object.FlatKey("RegionName") - if err := awsEc2query_serializeDocumentRegionNameStringList(v.RegionNames, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeReplaceRootVolumeTasksInput(v *DescribeReplaceRootVolumeTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ReplaceRootVolumeTaskIds != nil { - objectKey := object.FlatKey("ReplaceRootVolumeTaskId") - if err := awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v.ReplaceRootVolumeTaskIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeReservedInstancesInput(v *DescribeReservedInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if len(v.OfferingClass) > 0 { - objectKey := object.Key("OfferingClass") - objectKey.String(string(v.OfferingClass)) - } - - if len(v.OfferingType) > 0 { - objectKey := object.Key("OfferingType") - objectKey.String(string(v.OfferingType)) - } - - if v.ReservedInstancesIds != nil { - objectKey := object.FlatKey("ReservedInstancesId") - if err := awsEc2query_serializeDocumentReservedInstancesIdStringList(v.ReservedInstancesIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeReservedInstancesListingsInput(v *DescribeReservedInstancesListingsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ReservedInstancesId != nil { - objectKey := object.Key("ReservedInstancesId") - objectKey.String(*v.ReservedInstancesId) - } - - if v.ReservedInstancesListingId != nil { - objectKey := object.Key("ReservedInstancesListingId") - objectKey.String(*v.ReservedInstancesListingId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeReservedInstancesModificationsInput(v *DescribeReservedInstancesModificationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ReservedInstancesModificationIds != nil { - objectKey := object.FlatKey("ReservedInstancesModificationId") - if err := awsEc2query_serializeDocumentReservedInstancesModificationIdStringList(v.ReservedInstancesModificationIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeReservedInstancesOfferingsInput(v *DescribeReservedInstancesOfferingsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IncludeMarketplace != nil { - objectKey := object.Key("IncludeMarketplace") - objectKey.Boolean(*v.IncludeMarketplace) - } - - if len(v.InstanceTenancy) > 0 { - objectKey := object.Key("InstanceTenancy") - objectKey.String(string(v.InstanceTenancy)) - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.MaxDuration != nil { - objectKey := object.Key("MaxDuration") - objectKey.Long(*v.MaxDuration) - } - - if v.MaxInstanceCount != nil { - objectKey := object.Key("MaxInstanceCount") - objectKey.Integer(*v.MaxInstanceCount) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.MinDuration != nil { - objectKey := object.Key("MinDuration") - objectKey.Long(*v.MinDuration) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if len(v.OfferingClass) > 0 { - objectKey := object.Key("OfferingClass") - objectKey.String(string(v.OfferingClass)) - } - - if len(v.OfferingType) > 0 { - objectKey := object.Key("OfferingType") - objectKey.String(string(v.OfferingType)) - } - - if len(v.ProductDescription) > 0 { - objectKey := object.Key("ProductDescription") - objectKey.String(string(v.ProductDescription)) - } - - if v.ReservedInstancesOfferingIds != nil { - objectKey := object.FlatKey("ReservedInstancesOfferingId") - if err := awsEc2query_serializeDocumentReservedInstancesOfferingIdStringList(v.ReservedInstancesOfferingIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeRouteTablesInput(v *DescribeRouteTablesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.RouteTableIds != nil { - objectKey := object.FlatKey("RouteTableId") - if err := awsEc2query_serializeDocumentRouteTableIdStringList(v.RouteTableIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeScheduledInstanceAvailabilityInput(v *DescribeScheduledInstanceAvailabilityInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.FirstSlotStartTimeRange != nil { - objectKey := object.Key("FirstSlotStartTimeRange") - if err := awsEc2query_serializeDocumentSlotDateTimeRangeRequest(v.FirstSlotStartTimeRange, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.MaxSlotDurationInHours != nil { - objectKey := object.Key("MaxSlotDurationInHours") - objectKey.Integer(*v.MaxSlotDurationInHours) - } - - if v.MinSlotDurationInHours != nil { - objectKey := object.Key("MinSlotDurationInHours") - objectKey.Integer(*v.MinSlotDurationInHours) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.Recurrence != nil { - objectKey := object.Key("Recurrence") - if err := awsEc2query_serializeDocumentScheduledInstanceRecurrenceRequest(v.Recurrence, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeScheduledInstancesInput(v *DescribeScheduledInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ScheduledInstanceIds != nil { - objectKey := object.FlatKey("ScheduledInstanceId") - if err := awsEc2query_serializeDocumentScheduledInstanceIdRequestSet(v.ScheduledInstanceIds, objectKey); err != nil { - return err - } - } - - if v.SlotStartTimeRange != nil { - objectKey := object.Key("SlotStartTimeRange") - if err := awsEc2query_serializeDocumentSlotStartTimeRangeRequest(v.SlotStartTimeRange, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSecurityGroupReferencesInput(v *DescribeSecurityGroupReferencesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupId != nil { - objectKey := object.FlatKey("GroupId") - if err := awsEc2query_serializeDocumentGroupIds(v.GroupId, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSecurityGroupRulesInput(v *DescribeSecurityGroupRulesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SecurityGroupRuleIds != nil { - objectKey := object.FlatKey("SecurityGroupRuleId") - if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSecurityGroupsInput(v *DescribeSecurityGroupsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.GroupIds != nil { - objectKey := object.FlatKey("GroupId") - if err := awsEc2query_serializeDocumentGroupIdStringList(v.GroupIds, objectKey); err != nil { - return err - } - } - - if v.GroupNames != nil { - objectKey := object.FlatKey("GroupName") - if err := awsEc2query_serializeDocumentGroupNameStringList(v.GroupNames, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSnapshotAttributeInput(v *DescribeSnapshotAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSnapshotsInput(v *DescribeSnapshotsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.OwnerIds != nil { - objectKey := object.FlatKey("Owner") - if err := awsEc2query_serializeDocumentOwnerStringList(v.OwnerIds, objectKey); err != nil { - return err - } - } - - if v.RestorableByUserIds != nil { - objectKey := object.FlatKey("RestorableBy") - if err := awsEc2query_serializeDocumentRestorableByStringList(v.RestorableByUserIds, objectKey); err != nil { - return err - } - } - - if v.SnapshotIds != nil { - objectKey := object.FlatKey("SnapshotId") - if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSnapshotTierStatusInput(v *DescribeSnapshotTierStatusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSpotDatafeedSubscriptionInput(v *DescribeSpotDatafeedSubscriptionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSpotFleetInstancesInput(v *DescribeSpotFleetInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SpotFleetRequestId != nil { - objectKey := object.Key("SpotFleetRequestId") - objectKey.String(*v.SpotFleetRequestId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSpotFleetRequestHistoryInput(v *DescribeSpotFleetRequestHistoryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.EventType) > 0 { - objectKey := object.Key("EventType") - objectKey.String(string(v.EventType)) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SpotFleetRequestId != nil { - objectKey := object.Key("SpotFleetRequestId") - objectKey.String(*v.SpotFleetRequestId) - } - - if v.StartTime != nil { - objectKey := object.Key("StartTime") - objectKey.String(smithytime.FormatDateTime(*v.StartTime)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSpotFleetRequestsInput(v *DescribeSpotFleetRequestsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SpotFleetRequestIds != nil { - objectKey := object.FlatKey("SpotFleetRequestId") - if err := awsEc2query_serializeDocumentSpotFleetRequestIdList(v.SpotFleetRequestIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSpotInstanceRequestsInput(v *DescribeSpotInstanceRequestsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SpotInstanceRequestIds != nil { - objectKey := object.FlatKey("SpotInstanceRequestId") - if err := awsEc2query_serializeDocumentSpotInstanceRequestIdList(v.SpotInstanceRequestIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSpotPriceHistoryInput(v *DescribeSpotPriceHistoryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndTime != nil { - objectKey := object.Key("EndTime") - objectKey.String(smithytime.FormatDateTime(*v.EndTime)) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.InstanceTypes != nil { - objectKey := object.FlatKey("InstanceType") - if err := awsEc2query_serializeDocumentInstanceTypeList(v.InstanceTypes, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ProductDescriptions != nil { - objectKey := object.FlatKey("ProductDescription") - if err := awsEc2query_serializeDocumentProductDescriptionList(v.ProductDescriptions, objectKey); err != nil { - return err - } - } - - if v.StartTime != nil { - objectKey := object.Key("StartTime") - objectKey.String(smithytime.FormatDateTime(*v.StartTime)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeStaleSecurityGroupsInput(v *DescribeStaleSecurityGroupsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeStoreImageTasksInput(v *DescribeStoreImageTasksInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.ImageIds != nil { - objectKey := object.FlatKey("ImageId") - if err := awsEc2query_serializeDocumentImageIdList(v.ImageIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeSubnetsInput(v *DescribeSubnetsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetId") - if err := awsEc2query_serializeDocumentSubnetIdStringList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTagsInput(v *DescribeTagsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTrafficMirrorFiltersInput(v *DescribeTrafficMirrorFiltersInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TrafficMirrorFilterIds != nil { - objectKey := object.FlatKey("TrafficMirrorFilterId") - if err := awsEc2query_serializeDocumentTrafficMirrorFilterIdList(v.TrafficMirrorFilterIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTrafficMirrorSessionsInput(v *DescribeTrafficMirrorSessionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TrafficMirrorSessionIds != nil { - objectKey := object.FlatKey("TrafficMirrorSessionId") - if err := awsEc2query_serializeDocumentTrafficMirrorSessionIdList(v.TrafficMirrorSessionIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTrafficMirrorTargetsInput(v *DescribeTrafficMirrorTargetsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TrafficMirrorTargetIds != nil { - objectKey := object.FlatKey("TrafficMirrorTargetId") - if err := awsEc2query_serializeDocumentTrafficMirrorTargetIdList(v.TrafficMirrorTargetIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayAttachmentsInput(v *DescribeTransitGatewayAttachmentsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayAttachmentIds != nil { - objectKey := object.FlatKey("TransitGatewayAttachmentIds") - if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectPeersInput(v *DescribeTransitGatewayConnectPeersInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayConnectPeerIds != nil { - objectKey := object.FlatKey("TransitGatewayConnectPeerIds") - if err := awsEc2query_serializeDocumentTransitGatewayConnectPeerIdStringList(v.TransitGatewayConnectPeerIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayConnectsInput(v *DescribeTransitGatewayConnectsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayAttachmentIds != nil { - objectKey := object.FlatKey("TransitGatewayAttachmentIds") - if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayMulticastDomainsInput(v *DescribeTransitGatewayMulticastDomainsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayMulticastDomainIds != nil { - objectKey := object.FlatKey("TransitGatewayMulticastDomainIds") - if err := awsEc2query_serializeDocumentTransitGatewayMulticastDomainIdStringList(v.TransitGatewayMulticastDomainIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayPeeringAttachmentsInput(v *DescribeTransitGatewayPeeringAttachmentsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayAttachmentIds != nil { - objectKey := object.FlatKey("TransitGatewayAttachmentIds") - if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayPolicyTablesInput(v *DescribeTransitGatewayPolicyTablesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayPolicyTableIds != nil { - objectKey := object.FlatKey("TransitGatewayPolicyTableIds") - if err := awsEc2query_serializeDocumentTransitGatewayPolicyTableIdStringList(v.TransitGatewayPolicyTableIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTableAnnouncementsInput(v *DescribeTransitGatewayRouteTableAnnouncementsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayRouteTableAnnouncementIds != nil { - objectKey := object.FlatKey("TransitGatewayRouteTableAnnouncementIds") - if err := awsEc2query_serializeDocumentTransitGatewayRouteTableAnnouncementIdStringList(v.TransitGatewayRouteTableAnnouncementIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayRouteTablesInput(v *DescribeTransitGatewayRouteTablesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayRouteTableIds != nil { - objectKey := object.FlatKey("TransitGatewayRouteTableIds") - if err := awsEc2query_serializeDocumentTransitGatewayRouteTableIdStringList(v.TransitGatewayRouteTableIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewaysInput(v *DescribeTransitGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayIds != nil { - objectKey := object.FlatKey("TransitGatewayIds") - if err := awsEc2query_serializeDocumentTransitGatewayIdStringList(v.TransitGatewayIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTransitGatewayVpcAttachmentsInput(v *DescribeTransitGatewayVpcAttachmentsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayAttachmentIds != nil { - objectKey := object.FlatKey("TransitGatewayAttachmentIds") - if err := awsEc2query_serializeDocumentTransitGatewayAttachmentIdStringList(v.TransitGatewayAttachmentIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeTrunkInterfaceAssociationsInput(v *DescribeTrunkInterfaceAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationIds != nil { - objectKey := object.FlatKey("AssociationId") - if err := awsEc2query_serializeDocumentTrunkInterfaceAssociationIdList(v.AssociationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVerifiedAccessEndpointsInput(v *DescribeVerifiedAccessEndpointsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VerifiedAccessEndpointIds != nil { - objectKey := object.FlatKey("VerifiedAccessEndpointId") - if err := awsEc2query_serializeDocumentVerifiedAccessEndpointIdList(v.VerifiedAccessEndpointIds, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVerifiedAccessGroupsInput(v *DescribeVerifiedAccessGroupsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VerifiedAccessGroupIds != nil { - objectKey := object.FlatKey("VerifiedAccessGroupId") - if err := awsEc2query_serializeDocumentVerifiedAccessGroupIdList(v.VerifiedAccessGroupIds, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstanceLoggingConfigurationsInput(v *DescribeVerifiedAccessInstanceLoggingConfigurationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VerifiedAccessInstanceIds != nil { - objectKey := object.FlatKey("VerifiedAccessInstanceId") - if err := awsEc2query_serializeDocumentVerifiedAccessInstanceIdList(v.VerifiedAccessInstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVerifiedAccessInstancesInput(v *DescribeVerifiedAccessInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VerifiedAccessInstanceIds != nil { - objectKey := object.FlatKey("VerifiedAccessInstanceId") - if err := awsEc2query_serializeDocumentVerifiedAccessInstanceIdList(v.VerifiedAccessInstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVerifiedAccessTrustProvidersInput(v *DescribeVerifiedAccessTrustProvidersInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VerifiedAccessTrustProviderIds != nil { - objectKey := object.FlatKey("VerifiedAccessTrustProviderId") - if err := awsEc2query_serializeDocumentVerifiedAccessTrustProviderIdList(v.VerifiedAccessTrustProviderIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVolumeAttributeInput(v *DescribeVolumeAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVolumesInput(v *DescribeVolumesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VolumeIds != nil { - objectKey := object.FlatKey("VolumeId") - if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVolumesModificationsInput(v *DescribeVolumesModificationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VolumeIds != nil { - objectKey := object.FlatKey("VolumeId") - if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVolumeStatusInput(v *DescribeVolumeStatusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VolumeIds != nil { - objectKey := object.FlatKey("VolumeId") - if err := awsEc2query_serializeDocumentVolumeIdStringList(v.VolumeIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcAttributeInput(v *DescribeVpcAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcClassicLinkDnsSupportInput(v *DescribeVpcClassicLinkDnsSupportInput, value query.Value) error { - object := value.Object() - _ = object - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VpcIds != nil { - objectKey := object.FlatKey("VpcIds") - if err := awsEc2query_serializeDocumentVpcClassicLinkIdList(v.VpcIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcClassicLinkInput(v *DescribeVpcClassicLinkInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.VpcIds != nil { - objectKey := object.FlatKey("VpcId") - if err := awsEc2query_serializeDocumentVpcClassicLinkIdList(v.VpcIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionNotificationsInput(v *DescribeVpcEndpointConnectionNotificationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ConnectionNotificationId != nil { - objectKey := object.Key("ConnectionNotificationId") - objectKey.String(*v.ConnectionNotificationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcEndpointConnectionsInput(v *DescribeVpcEndpointConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcEndpointServiceConfigurationsInput(v *DescribeVpcEndpointServiceConfigurationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ServiceIds != nil { - objectKey := object.FlatKey("ServiceId") - if err := awsEc2query_serializeDocumentVpcEndpointServiceIdList(v.ServiceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcEndpointServicePermissionsInput(v *DescribeVpcEndpointServicePermissionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcEndpointServicesInput(v *DescribeVpcEndpointServicesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ServiceNames != nil { - objectKey := object.FlatKey("ServiceName") - if err := awsEc2query_serializeDocumentValueStringList(v.ServiceNames, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcEndpointsInput(v *DescribeVpcEndpointsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VpcEndpointIds != nil { - objectKey := object.FlatKey("VpcEndpointId") - if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcPeeringConnectionsInput(v *DescribeVpcPeeringConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VpcPeeringConnectionIds != nil { - objectKey := object.FlatKey("VpcPeeringConnectionId") - if err := awsEc2query_serializeDocumentVpcPeeringConnectionIdList(v.VpcPeeringConnectionIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpcsInput(v *DescribeVpcsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VpcIds != nil { - objectKey := object.FlatKey("VpcId") - if err := awsEc2query_serializeDocumentVpcIdStringList(v.VpcIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpnConnectionsInput(v *DescribeVpnConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.VpnConnectionIds != nil { - objectKey := object.FlatKey("VpnConnectionId") - if err := awsEc2query_serializeDocumentVpnConnectionIdStringList(v.VpnConnectionIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDescribeVpnGatewaysInput(v *DescribeVpnGatewaysInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.VpnGatewayIds != nil { - objectKey := object.FlatKey("VpnGatewayId") - if err := awsEc2query_serializeDocumentVpnGatewayIdStringList(v.VpnGatewayIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDetachClassicLinkVpcInput(v *DetachClassicLinkVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDetachInternetGatewayInput(v *DetachInternetGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InternetGatewayId != nil { - objectKey := object.Key("InternetGatewayId") - objectKey.String(*v.InternetGatewayId) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDetachNetworkInterfaceInput(v *DetachNetworkInterfaceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AttachmentId != nil { - objectKey := object.Key("AttachmentId") - objectKey.String(*v.AttachmentId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Force != nil { - objectKey := object.Key("Force") - objectKey.Boolean(*v.Force) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDetachVerifiedAccessTrustProviderInput(v *DetachVerifiedAccessTrustProviderInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - if v.VerifiedAccessTrustProviderId != nil { - objectKey := object.Key("VerifiedAccessTrustProviderId") - objectKey.String(*v.VerifiedAccessTrustProviderId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDetachVolumeInput(v *DetachVolumeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Device != nil { - objectKey := object.Key("Device") - objectKey.String(*v.Device) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Force != nil { - objectKey := object.Key("Force") - objectKey.Boolean(*v.Force) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDetachVpnGatewayInput(v *DetachVpnGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - if v.VpnGatewayId != nil { - objectKey := object.Key("VpnGatewayId") - objectKey.String(*v.VpnGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableAddressTransferInput(v *DisableAddressTransferInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableAwsNetworkPerformanceMetricSubscriptionInput(v *DisableAwsNetworkPerformanceMetricSubscriptionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Destination != nil { - objectKey := object.Key("Destination") - objectKey.String(*v.Destination) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.Metric) > 0 { - objectKey := object.Key("Metric") - objectKey.String(string(v.Metric)) - } - - if v.Source != nil { - objectKey := object.Key("Source") - objectKey.String(*v.Source) - } - - if len(v.Statistic) > 0 { - objectKey := object.Key("Statistic") - objectKey.String(string(v.Statistic)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableEbsEncryptionByDefaultInput(v *DisableEbsEncryptionByDefaultInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableFastLaunchInput(v *DisableFastLaunchInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Force != nil { - objectKey := object.Key("Force") - objectKey.Boolean(*v.Force) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableFastSnapshotRestoresInput(v *DisableFastSnapshotRestoresInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZones != nil { - objectKey := object.FlatKey("AvailabilityZone") - if err := awsEc2query_serializeDocumentAvailabilityZoneStringList(v.AvailabilityZones, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SourceSnapshotIds != nil { - objectKey := object.FlatKey("SourceSnapshotId") - if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SourceSnapshotIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableImageBlockPublicAccessInput(v *DisableImageBlockPublicAccessInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableImageDeprecationInput(v *DisableImageDeprecationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableImageInput(v *DisableImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableIpamOrganizationAdminAccountInput(v *DisableIpamOrganizationAdminAccountInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DelegatedAdminAccountId != nil { - objectKey := object.Key("DelegatedAdminAccountId") - objectKey.String(*v.DelegatedAdminAccountId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableSerialConsoleAccessInput(v *DisableSerialConsoleAccessInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableSnapshotBlockPublicAccessInput(v *DisableSnapshotBlockPublicAccessInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableTransitGatewayRouteTablePropagationInput(v *DisableTransitGatewayRouteTablePropagationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableAnnouncementId != nil { - objectKey := object.Key("TransitGatewayRouteTableAnnouncementId") - objectKey.String(*v.TransitGatewayRouteTableAnnouncementId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableVgwRoutePropagationInput(v *DisableVgwRoutePropagationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GatewayId != nil { - objectKey := object.Key("GatewayId") - objectKey.String(*v.GatewayId) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableVpcClassicLinkDnsSupportInput(v *DisableVpcClassicLinkDnsSupportInput, value query.Value) error { - object := value.Object() - _ = object - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisableVpcClassicLinkInput(v *DisableVpcClassicLinkInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateAddressInput(v *DisassociateAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PublicIp != nil { - objectKey := object.Key("PublicIp") - objectKey.String(*v.PublicIp) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateClientVpnTargetNetworkInput(v *DisassociateClientVpnTargetNetworkInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateEnclaveCertificateIamRoleInput(v *DisassociateEnclaveCertificateIamRoleInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CertificateArn != nil { - objectKey := object.Key("CertificateArn") - objectKey.String(*v.CertificateArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RoleArn != nil { - objectKey := object.Key("RoleArn") - objectKey.String(*v.RoleArn) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateIamInstanceProfileInput(v *DisassociateIamInstanceProfileInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateInstanceEventWindowInput(v *DisassociateInstanceEventWindowInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationTarget != nil { - objectKey := object.Key("AssociationTarget") - if err := awsEc2query_serializeDocumentInstanceEventWindowDisassociationRequest(v.AssociationTarget, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceEventWindowId != nil { - objectKey := object.Key("InstanceEventWindowId") - objectKey.String(*v.InstanceEventWindowId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateIpamByoasnInput(v *DisassociateIpamByoasnInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Asn != nil { - objectKey := object.Key("Asn") - objectKey.String(*v.Asn) - } - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateIpamResourceDiscoveryInput(v *DisassociateIpamResourceDiscoveryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamResourceDiscoveryAssociationId != nil { - objectKey := object.Key("IpamResourceDiscoveryAssociationId") - objectKey.String(*v.IpamResourceDiscoveryAssociationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateNatGatewayAddressInput(v *DisassociateNatGatewayAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationIds != nil { - objectKey := object.FlatKey("AssociationId") - if err := awsEc2query_serializeDocumentEipAssociationIdList(v.AssociationIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxDrainDurationSeconds != nil { - objectKey := object.Key("MaxDrainDurationSeconds") - objectKey.Integer(*v.MaxDrainDurationSeconds) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateRouteTableInput(v *DisassociateRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateSubnetCidrBlockInput(v *DisassociateSubnetCidrBlockInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateTransitGatewayMulticastDomainInput(v *DisassociateTransitGatewayMulticastDomainInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetIds") - if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateTransitGatewayPolicyTableInput(v *DisassociateTransitGatewayPolicyTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayPolicyTableId != nil { - objectKey := object.Key("TransitGatewayPolicyTableId") - objectKey.String(*v.TransitGatewayPolicyTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateTransitGatewayRouteTableInput(v *DisassociateTransitGatewayRouteTableInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateTrunkInterfaceInput(v *DisassociateTrunkInterfaceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentDisassociateVpcCidrBlockInput(v *DisassociateVpcCidrBlockInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableAddressTransferInput(v *EnableAddressTransferInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransferAccountId != nil { - objectKey := object.Key("TransferAccountId") - objectKey.String(*v.TransferAccountId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableAwsNetworkPerformanceMetricSubscriptionInput(v *EnableAwsNetworkPerformanceMetricSubscriptionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Destination != nil { - objectKey := object.Key("Destination") - objectKey.String(*v.Destination) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.Metric) > 0 { - objectKey := object.Key("Metric") - objectKey.String(string(v.Metric)) - } - - if v.Source != nil { - objectKey := object.Key("Source") - objectKey.String(*v.Source) - } - - if len(v.Statistic) > 0 { - objectKey := object.Key("Statistic") - objectKey.String(string(v.Statistic)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableEbsEncryptionByDefaultInput(v *EnableEbsEncryptionByDefaultInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableFastLaunchInput(v *EnableFastLaunchInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.LaunchTemplate != nil { - objectKey := object.Key("LaunchTemplate") - if err := awsEc2query_serializeDocumentFastLaunchLaunchTemplateSpecificationRequest(v.LaunchTemplate, objectKey); err != nil { - return err - } - } - - if v.MaxParallelLaunches != nil { - objectKey := object.Key("MaxParallelLaunches") - objectKey.Integer(*v.MaxParallelLaunches) - } - - if v.ResourceType != nil { - objectKey := object.Key("ResourceType") - objectKey.String(*v.ResourceType) - } - - if v.SnapshotConfiguration != nil { - objectKey := object.Key("SnapshotConfiguration") - if err := awsEc2query_serializeDocumentFastLaunchSnapshotConfigurationRequest(v.SnapshotConfiguration, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableFastSnapshotRestoresInput(v *EnableFastSnapshotRestoresInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZones != nil { - objectKey := object.FlatKey("AvailabilityZone") - if err := awsEc2query_serializeDocumentAvailabilityZoneStringList(v.AvailabilityZones, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SourceSnapshotIds != nil { - objectKey := object.FlatKey("SourceSnapshotId") - if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SourceSnapshotIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableImageBlockPublicAccessInput(v *EnableImageBlockPublicAccessInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.ImageBlockPublicAccessState) > 0 { - objectKey := object.Key("ImageBlockPublicAccessState") - objectKey.String(string(v.ImageBlockPublicAccessState)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableImageDeprecationInput(v *EnableImageDeprecationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DeprecateAt != nil { - objectKey := object.Key("DeprecateAt") - objectKey.String(smithytime.FormatDateTime(*v.DeprecateAt)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableImageInput(v *EnableImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableIpamOrganizationAdminAccountInput(v *EnableIpamOrganizationAdminAccountInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DelegatedAdminAccountId != nil { - objectKey := object.Key("DelegatedAdminAccountId") - objectKey.String(*v.DelegatedAdminAccountId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableReachabilityAnalyzerOrganizationSharingInput(v *EnableReachabilityAnalyzerOrganizationSharingInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableSerialConsoleAccessInput(v *EnableSerialConsoleAccessInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableSnapshotBlockPublicAccessInput(v *EnableSnapshotBlockPublicAccessInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.State) > 0 { - objectKey := object.Key("State") - objectKey.String(string(v.State)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableTransitGatewayRouteTablePropagationInput(v *EnableTransitGatewayRouteTablePropagationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableAnnouncementId != nil { - objectKey := object.Key("TransitGatewayRouteTableAnnouncementId") - objectKey.String(*v.TransitGatewayRouteTableAnnouncementId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableVgwRoutePropagationInput(v *EnableVgwRoutePropagationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GatewayId != nil { - objectKey := object.Key("GatewayId") - objectKey.String(*v.GatewayId) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableVolumeIOInput(v *EnableVolumeIOInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableVpcClassicLinkDnsSupportInput(v *EnableVpcClassicLinkDnsSupportInput, value query.Value) error { - object := value.Object() - _ = object - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentEnableVpcClassicLinkInput(v *EnableVpcClassicLinkInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentExportClientVpnClientCertificateRevocationListInput(v *ExportClientVpnClientCertificateRevocationListInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentExportClientVpnClientConfigurationInput(v *ExportClientVpnClientConfigurationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentExportImageInput(v *ExportImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if len(v.DiskImageFormat) > 0 { - objectKey := object.Key("DiskImageFormat") - objectKey.String(string(v.DiskImageFormat)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.RoleName != nil { - objectKey := object.Key("RoleName") - objectKey.String(*v.RoleName) - } - - if v.S3ExportLocation != nil { - objectKey := object.Key("S3ExportLocation") - if err := awsEc2query_serializeDocumentExportTaskS3LocationRequest(v.S3ExportLocation, objectKey); err != nil { - return err - } - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentExportTransitGatewayRoutesInput(v *ExportTransitGatewayRoutesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.S3Bucket != nil { - objectKey := object.Key("S3Bucket") - objectKey.String(*v.S3Bucket) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetAssociatedEnclaveCertificateIamRolesInput(v *GetAssociatedEnclaveCertificateIamRolesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CertificateArn != nil { - objectKey := object.Key("CertificateArn") - objectKey.String(*v.CertificateArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetAssociatedIpv6PoolCidrsInput(v *GetAssociatedIpv6PoolCidrsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PoolId != nil { - objectKey := object.Key("PoolId") - objectKey.String(*v.PoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetAwsNetworkPerformanceDataInput(v *GetAwsNetworkPerformanceDataInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DataQueries != nil { - objectKey := object.FlatKey("DataQuery") - if err := awsEc2query_serializeDocumentDataQueries(v.DataQueries, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndTime != nil { - objectKey := object.Key("EndTime") - objectKey.String(smithytime.FormatDateTime(*v.EndTime)) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.StartTime != nil { - objectKey := object.Key("StartTime") - objectKey.String(smithytime.FormatDateTime(*v.StartTime)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetCapacityReservationUsageInput(v *GetCapacityReservationUsageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationId != nil { - objectKey := object.Key("CapacityReservationId") - objectKey.String(*v.CapacityReservationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetCoipPoolUsageInput(v *GetCoipPoolUsageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PoolId != nil { - objectKey := object.Key("PoolId") - objectKey.String(*v.PoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetConsoleOutputInput(v *GetConsoleOutputInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.Latest != nil { - objectKey := object.Key("Latest") - objectKey.Boolean(*v.Latest) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetConsoleScreenshotInput(v *GetConsoleScreenshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.WakeUp != nil { - objectKey := object.Key("WakeUp") - objectKey.Boolean(*v.WakeUp) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetDefaultCreditSpecificationInput(v *GetDefaultCreditSpecificationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.InstanceFamily) > 0 { - objectKey := object.Key("InstanceFamily") - objectKey.String(string(v.InstanceFamily)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetEbsDefaultKmsKeyIdInput(v *GetEbsDefaultKmsKeyIdInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetEbsEncryptionByDefaultInput(v *GetEbsEncryptionByDefaultInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetFlowLogsIntegrationTemplateInput(v *GetFlowLogsIntegrationTemplateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ConfigDeliveryS3DestinationArn != nil { - objectKey := object.Key("ConfigDeliveryS3DestinationArn") - objectKey.String(*v.ConfigDeliveryS3DestinationArn) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FlowLogId != nil { - objectKey := object.Key("FlowLogId") - objectKey.String(*v.FlowLogId) - } - - if v.IntegrateServices != nil { - objectKey := object.Key("IntegrateService") - if err := awsEc2query_serializeDocumentIntegrateServices(v.IntegrateServices, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetGroupsForCapacityReservationInput(v *GetGroupsForCapacityReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationId != nil { - objectKey := object.Key("CapacityReservationId") - objectKey.String(*v.CapacityReservationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetHostReservationPurchasePreviewInput(v *GetHostReservationPurchasePreviewInput, value query.Value) error { - object := value.Object() - _ = object - - if v.HostIdSet != nil { - objectKey := object.FlatKey("HostIdSet") - if err := awsEc2query_serializeDocumentRequestHostIdSet(v.HostIdSet, objectKey); err != nil { - return err - } - } - - if v.OfferingId != nil { - objectKey := object.Key("OfferingId") - objectKey.String(*v.OfferingId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetImageBlockPublicAccessStateInput(v *GetImageBlockPublicAccessStateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetInstanceTypesFromInstanceRequirementsInput(v *GetInstanceTypesFromInstanceRequirementsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ArchitectureTypes != nil { - objectKey := object.FlatKey("ArchitectureType") - if err := awsEc2query_serializeDocumentArchitectureTypeSet(v.ArchitectureTypes, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceRequirements != nil { - objectKey := object.Key("InstanceRequirements") - if err := awsEc2query_serializeDocumentInstanceRequirementsRequest(v.InstanceRequirements, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VirtualizationTypes != nil { - objectKey := object.FlatKey("VirtualizationType") - if err := awsEc2query_serializeDocumentVirtualizationTypeSet(v.VirtualizationTypes, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetInstanceUefiDataInput(v *GetInstanceUefiDataInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamAddressHistoryInput(v *GetIpamAddressHistoryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndTime != nil { - objectKey := object.Key("EndTime") - objectKey.String(smithytime.FormatDateTime(*v.EndTime)) - } - - if v.IpamScopeId != nil { - objectKey := object.Key("IpamScopeId") - objectKey.String(*v.IpamScopeId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.StartTime != nil { - objectKey := object.Key("StartTime") - objectKey.String(smithytime.FormatDateTime(*v.StartTime)) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamDiscoveredAccountsInput(v *GetIpamDiscoveredAccountsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DiscoveryRegion != nil { - objectKey := object.Key("DiscoveryRegion") - objectKey.String(*v.DiscoveryRegion) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamResourceDiscoveryId != nil { - objectKey := object.Key("IpamResourceDiscoveryId") - objectKey.String(*v.IpamResourceDiscoveryId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamDiscoveredPublicAddressesInput(v *GetIpamDiscoveredPublicAddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddressRegion != nil { - objectKey := object.Key("AddressRegion") - objectKey.String(*v.AddressRegion) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamResourceDiscoveryId != nil { - objectKey := object.Key("IpamResourceDiscoveryId") - objectKey.String(*v.IpamResourceDiscoveryId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamDiscoveredResourceCidrsInput(v *GetIpamDiscoveredResourceCidrsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamResourceDiscoveryId != nil { - objectKey := object.Key("IpamResourceDiscoveryId") - objectKey.String(*v.IpamResourceDiscoveryId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ResourceRegion != nil { - objectKey := object.Key("ResourceRegion") - objectKey.String(*v.ResourceRegion) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamPoolAllocationsInput(v *GetIpamPoolAllocationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamPoolAllocationId != nil { - objectKey := object.Key("IpamPoolAllocationId") - objectKey.String(*v.IpamPoolAllocationId) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamPoolCidrsInput(v *GetIpamPoolCidrsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetIpamResourceCidrsInput(v *GetIpamResourceCidrsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.IpamScopeId != nil { - objectKey := object.Key("IpamScopeId") - objectKey.String(*v.IpamScopeId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.ResourceId != nil { - objectKey := object.Key("ResourceId") - objectKey.String(*v.ResourceId) - } - - if v.ResourceOwner != nil { - objectKey := object.Key("ResourceOwner") - objectKey.String(*v.ResourceOwner) - } - - if v.ResourceTag != nil { - objectKey := object.Key("ResourceTag") - if err := awsEc2query_serializeDocumentRequestIpamResourceTag(v.ResourceTag, objectKey); err != nil { - return err - } - } - - if len(v.ResourceType) > 0 { - objectKey := object.Key("ResourceType") - objectKey.String(string(v.ResourceType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetLaunchTemplateDataInput(v *GetLaunchTemplateDataInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetManagedPrefixListAssociationsInput(v *GetManagedPrefixListAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetManagedPrefixListEntriesInput(v *GetManagedPrefixListEntriesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.TargetVersion != nil { - objectKey := object.Key("TargetVersion") - objectKey.Long(*v.TargetVersion) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeAnalysisFindingsInput(v *GetNetworkInsightsAccessScopeAnalysisFindingsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NetworkInsightsAccessScopeAnalysisId != nil { - objectKey := object.Key("NetworkInsightsAccessScopeAnalysisId") - objectKey.String(*v.NetworkInsightsAccessScopeAnalysisId) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetNetworkInsightsAccessScopeContentInput(v *GetNetworkInsightsAccessScopeContentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInsightsAccessScopeId != nil { - objectKey := object.Key("NetworkInsightsAccessScopeId") - objectKey.String(*v.NetworkInsightsAccessScopeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetPasswordDataInput(v *GetPasswordDataInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetReservedInstancesExchangeQuoteInput(v *GetReservedInstancesExchangeQuoteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ReservedInstanceIds != nil { - objectKey := object.FlatKey("ReservedInstanceId") - if err := awsEc2query_serializeDocumentReservedInstanceIdSet(v.ReservedInstanceIds, objectKey); err != nil { - return err - } - } - - if v.TargetConfigurations != nil { - objectKey := object.FlatKey("TargetConfiguration") - if err := awsEc2query_serializeDocumentTargetConfigurationRequestSet(v.TargetConfigurations, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetSecurityGroupsForVpcInput(v *GetSecurityGroupsForVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetSerialConsoleAccessStatusInput(v *GetSerialConsoleAccessStatusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetSnapshotBlockPublicAccessStateInput(v *GetSnapshotBlockPublicAccessStateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetSpotPlacementScoresInput(v *GetSpotPlacementScoresInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceRequirementsWithMetadata != nil { - objectKey := object.Key("InstanceRequirementsWithMetadata") - if err := awsEc2query_serializeDocumentInstanceRequirementsWithMetadataRequest(v.InstanceRequirementsWithMetadata, objectKey); err != nil { - return err - } - } - - if v.InstanceTypes != nil { - objectKey := object.FlatKey("InstanceType") - if err := awsEc2query_serializeDocumentInstanceTypes(v.InstanceTypes, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.RegionNames != nil { - objectKey := object.FlatKey("RegionName") - if err := awsEc2query_serializeDocumentRegionNames(v.RegionNames, objectKey); err != nil { - return err - } - } - - if v.SingleAvailabilityZone != nil { - objectKey := object.Key("SingleAvailabilityZone") - objectKey.Boolean(*v.SingleAvailabilityZone) - } - - if v.TargetCapacity != nil { - objectKey := object.Key("TargetCapacity") - objectKey.Integer(*v.TargetCapacity) - } - - if len(v.TargetCapacityUnitType) > 0 { - objectKey := object.Key("TargetCapacityUnitType") - objectKey.String(string(v.TargetCapacityUnitType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetSubnetCidrReservationsInput(v *GetSubnetCidrReservationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayAttachmentPropagationsInput(v *GetTransitGatewayAttachmentPropagationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayMulticastDomainAssociationsInput(v *GetTransitGatewayMulticastDomainAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableAssociationsInput(v *GetTransitGatewayPolicyTableAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayPolicyTableId != nil { - objectKey := object.Key("TransitGatewayPolicyTableId") - objectKey.String(*v.TransitGatewayPolicyTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayPolicyTableEntriesInput(v *GetTransitGatewayPolicyTableEntriesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayPolicyTableId != nil { - objectKey := object.Key("TransitGatewayPolicyTableId") - objectKey.String(*v.TransitGatewayPolicyTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayPrefixListReferencesInput(v *GetTransitGatewayPrefixListReferencesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayRouteTableAssociationsInput(v *GetTransitGatewayRouteTableAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetTransitGatewayRouteTablePropagationsInput(v *GetTransitGatewayRouteTablePropagationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetVerifiedAccessEndpointPolicyInput(v *GetVerifiedAccessEndpointPolicyInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessEndpointId != nil { - objectKey := object.Key("VerifiedAccessEndpointId") - objectKey.String(*v.VerifiedAccessEndpointId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetVerifiedAccessGroupPolicyInput(v *GetVerifiedAccessGroupPolicyInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceSampleConfigurationInput(v *GetVpnConnectionDeviceSampleConfigurationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InternetKeyExchangeVersion != nil { - objectKey := object.Key("InternetKeyExchangeVersion") - objectKey.String(*v.InternetKeyExchangeVersion) - } - - if v.VpnConnectionDeviceTypeId != nil { - objectKey := object.Key("VpnConnectionDeviceTypeId") - objectKey.String(*v.VpnConnectionDeviceTypeId) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetVpnConnectionDeviceTypesInput(v *GetVpnConnectionDeviceTypesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentGetVpnTunnelReplacementStatusInput(v *GetVpnTunnelReplacementStatusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - if v.VpnTunnelOutsideIpAddress != nil { - objectKey := object.Key("VpnTunnelOutsideIpAddress") - objectKey.String(*v.VpnTunnelOutsideIpAddress) - } - - return nil -} - -func awsEc2query_serializeOpDocumentImportClientVpnClientCertificateRevocationListInput(v *ImportClientVpnClientCertificateRevocationListInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CertificateRevocationList != nil { - objectKey := object.Key("CertificateRevocationList") - objectKey.String(*v.CertificateRevocationList) - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentImportImageInput(v *ImportImageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Architecture != nil { - objectKey := object.Key("Architecture") - objectKey.String(*v.Architecture) - } - - if len(v.BootMode) > 0 { - objectKey := object.Key("BootMode") - objectKey.String(string(v.BootMode)) - } - - if v.ClientData != nil { - objectKey := object.Key("ClientData") - if err := awsEc2query_serializeDocumentClientData(v.ClientData, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DiskContainers != nil { - objectKey := object.FlatKey("DiskContainer") - if err := awsEc2query_serializeDocumentImageDiskContainerList(v.DiskContainers, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.Hypervisor != nil { - objectKey := object.Key("Hypervisor") - objectKey.String(*v.Hypervisor) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.LicenseSpecifications != nil { - objectKey := object.FlatKey("LicenseSpecifications") - if err := awsEc2query_serializeDocumentImportImageLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil { - return err - } - } - - if v.LicenseType != nil { - objectKey := object.Key("LicenseType") - objectKey.String(*v.LicenseType) - } - - if v.Platform != nil { - objectKey := object.Key("Platform") - objectKey.String(*v.Platform) - } - - if v.RoleName != nil { - objectKey := object.Key("RoleName") - objectKey.String(*v.RoleName) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.UsageOperation != nil { - objectKey := object.Key("UsageOperation") - objectKey.String(*v.UsageOperation) - } - - return nil -} - -func awsEc2query_serializeOpDocumentImportInstanceInput(v *ImportInstanceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DiskImages != nil { - objectKey := object.FlatKey("DiskImage") - if err := awsEc2query_serializeDocumentDiskImageList(v.DiskImages, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LaunchSpecification != nil { - objectKey := object.Key("LaunchSpecification") - if err := awsEc2query_serializeDocumentImportInstanceLaunchSpecification(v.LaunchSpecification, objectKey); err != nil { - return err - } - } - - if len(v.Platform) > 0 { - objectKey := object.Key("Platform") - objectKey.String(string(v.Platform)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentImportKeyPairInput(v *ImportKeyPairInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.PublicKeyMaterial != nil { - objectKey := object.Key("PublicKeyMaterial") - objectKey.Base64EncodeBytes(v.PublicKeyMaterial) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentImportSnapshotInput(v *ImportSnapshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientData != nil { - objectKey := object.Key("ClientData") - if err := awsEc2query_serializeDocumentClientData(v.ClientData, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DiskContainer != nil { - objectKey := object.Key("DiskContainer") - if err := awsEc2query_serializeDocumentSnapshotDiskContainer(v.DiskContainer, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Encrypted != nil { - objectKey := object.Key("Encrypted") - objectKey.Boolean(*v.Encrypted) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - if v.RoleName != nil { - objectKey := object.Key("RoleName") - objectKey.String(*v.RoleName) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentImportVolumeInput(v *ImportVolumeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZone != nil { - objectKey := object.Key("AvailabilityZone") - objectKey.String(*v.AvailabilityZone) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Image != nil { - objectKey := object.Key("Image") - if err := awsEc2query_serializeDocumentDiskImageDetail(v.Image, objectKey); err != nil { - return err - } - } - - if v.Volume != nil { - objectKey := object.Key("Volume") - if err := awsEc2query_serializeDocumentVolumeDetail(v.Volume, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentListImagesInRecycleBinInput(v *ListImagesInRecycleBinInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageIds != nil { - objectKey := object.FlatKey("ImageId") - if err := awsEc2query_serializeDocumentImageIdStringList(v.ImageIds, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentListSnapshotsInRecycleBinInput(v *ListSnapshotsInRecycleBinInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.SnapshotIds != nil { - objectKey := object.FlatKey("SnapshotId") - if err := awsEc2query_serializeDocumentSnapshotIdStringList(v.SnapshotIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentLockSnapshotInput(v *LockSnapshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CoolOffPeriod != nil { - objectKey := object.Key("CoolOffPeriod") - objectKey.Integer(*v.CoolOffPeriod) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ExpirationDate != nil { - objectKey := object.Key("ExpirationDate") - objectKey.String(smithytime.FormatDateTime(*v.ExpirationDate)) - } - - if v.LockDuration != nil { - objectKey := object.Key("LockDuration") - objectKey.Integer(*v.LockDuration) - } - - if len(v.LockMode) > 0 { - objectKey := object.Key("LockMode") - objectKey.String(string(v.LockMode)) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyAddressAttributeInput(v *ModifyAddressAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if v.DomainName != nil { - objectKey := object.Key("DomainName") - objectKey.String(*v.DomainName) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyAvailabilityZoneGroupInput(v *ModifyAvailabilityZoneGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if len(v.OptInStatus) > 0 { - objectKey := object.Key("OptInStatus") - objectKey.String(string(v.OptInStatus)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyCapacityReservationFleetInput(v *ModifyCapacityReservationFleetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationFleetId != nil { - objectKey := object.Key("CapacityReservationFleetId") - objectKey.String(*v.CapacityReservationFleetId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndDate != nil { - objectKey := object.Key("EndDate") - objectKey.String(smithytime.FormatDateTime(*v.EndDate)) - } - - if v.RemoveEndDate != nil { - objectKey := object.Key("RemoveEndDate") - objectKey.Boolean(*v.RemoveEndDate) - } - - if v.TotalTargetCapacity != nil { - objectKey := object.Key("TotalTargetCapacity") - objectKey.Integer(*v.TotalTargetCapacity) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyCapacityReservationInput(v *ModifyCapacityReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Accept != nil { - objectKey := object.Key("Accept") - objectKey.Boolean(*v.Accept) - } - - if v.AdditionalInfo != nil { - objectKey := object.Key("AdditionalInfo") - objectKey.String(*v.AdditionalInfo) - } - - if v.CapacityReservationId != nil { - objectKey := object.Key("CapacityReservationId") - objectKey.String(*v.CapacityReservationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndDate != nil { - objectKey := object.Key("EndDate") - objectKey.String(smithytime.FormatDateTime(*v.EndDate)) - } - - if len(v.EndDateType) > 0 { - objectKey := object.Key("EndDateType") - objectKey.String(string(v.EndDateType)) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyClientVpnEndpointInput(v *ModifyClientVpnEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientConnectOptions != nil { - objectKey := object.Key("ClientConnectOptions") - if err := awsEc2query_serializeDocumentClientConnectOptions(v.ClientConnectOptions, objectKey); err != nil { - return err - } - } - - if v.ClientLoginBannerOptions != nil { - objectKey := object.Key("ClientLoginBannerOptions") - if err := awsEc2query_serializeDocumentClientLoginBannerOptions(v.ClientLoginBannerOptions, objectKey); err != nil { - return err - } - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.ConnectionLogOptions != nil { - objectKey := object.Key("ConnectionLogOptions") - if err := awsEc2query_serializeDocumentConnectionLogOptions(v.ConnectionLogOptions, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DnsServers != nil { - objectKey := object.Key("DnsServers") - if err := awsEc2query_serializeDocumentDnsServersOptionsModifyStructure(v.DnsServers, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentClientVpnSecurityGroupIdSet(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if len(v.SelfServicePortal) > 0 { - objectKey := object.Key("SelfServicePortal") - objectKey.String(string(v.SelfServicePortal)) - } - - if v.ServerCertificateArn != nil { - objectKey := object.Key("ServerCertificateArn") - objectKey.String(*v.ServerCertificateArn) - } - - if v.SessionTimeoutHours != nil { - objectKey := object.Key("SessionTimeoutHours") - objectKey.Integer(*v.SessionTimeoutHours) - } - - if v.SplitTunnel != nil { - objectKey := object.Key("SplitTunnel") - objectKey.Boolean(*v.SplitTunnel) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - if v.VpnPort != nil { - objectKey := object.Key("VpnPort") - objectKey.Integer(*v.VpnPort) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyDefaultCreditSpecificationInput(v *ModifyDefaultCreditSpecificationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CpuCredits != nil { - objectKey := object.Key("CpuCredits") - objectKey.String(*v.CpuCredits) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.InstanceFamily) > 0 { - objectKey := object.Key("InstanceFamily") - objectKey.String(string(v.InstanceFamily)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyEbsDefaultKmsKeyIdInput(v *ModifyEbsDefaultKmsKeyIdInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.KmsKeyId != nil { - objectKey := object.Key("KmsKeyId") - objectKey.String(*v.KmsKeyId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyFleetInput(v *ModifyFleetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Context != nil { - objectKey := object.Key("Context") - objectKey.String(*v.Context) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.ExcessCapacityTerminationPolicy) > 0 { - objectKey := object.Key("ExcessCapacityTerminationPolicy") - objectKey.String(string(v.ExcessCapacityTerminationPolicy)) - } - - if v.FleetId != nil { - objectKey := object.Key("FleetId") - objectKey.String(*v.FleetId) - } - - if v.LaunchTemplateConfigs != nil { - objectKey := object.FlatKey("LaunchTemplateConfig") - if err := awsEc2query_serializeDocumentFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs, objectKey); err != nil { - return err - } - } - - if v.TargetCapacitySpecification != nil { - objectKey := object.Key("TargetCapacitySpecification") - if err := awsEc2query_serializeDocumentTargetCapacitySpecificationRequest(v.TargetCapacitySpecification, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyFpgaImageAttributeInput(v *ModifyFpgaImageAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FpgaImageId != nil { - objectKey := object.Key("FpgaImageId") - objectKey.String(*v.FpgaImageId) - } - - if v.LoadPermission != nil { - objectKey := object.Key("LoadPermission") - if err := awsEc2query_serializeDocumentLoadPermissionModifications(v.LoadPermission, objectKey); err != nil { - return err - } - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if len(v.OperationType) > 0 { - objectKey := object.Key("OperationType") - objectKey.String(string(v.OperationType)) - } - - if v.ProductCodes != nil { - objectKey := object.FlatKey("ProductCode") - if err := awsEc2query_serializeDocumentProductCodeStringList(v.ProductCodes, objectKey); err != nil { - return err - } - } - - if v.UserGroups != nil { - objectKey := object.FlatKey("UserGroup") - if err := awsEc2query_serializeDocumentUserGroupStringList(v.UserGroups, objectKey); err != nil { - return err - } - } - - if v.UserIds != nil { - objectKey := object.FlatKey("UserId") - if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyHostsInput(v *ModifyHostsInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AutoPlacement) > 0 { - objectKey := object.Key("AutoPlacement") - objectKey.String(string(v.AutoPlacement)) - } - - if v.HostIds != nil { - objectKey := object.FlatKey("HostId") - if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil { - return err - } - } - - if len(v.HostMaintenance) > 0 { - objectKey := object.Key("HostMaintenance") - objectKey.String(string(v.HostMaintenance)) - } - - if len(v.HostRecovery) > 0 { - objectKey := object.Key("HostRecovery") - objectKey.String(string(v.HostRecovery)) - } - - if v.InstanceFamily != nil { - objectKey := object.Key("InstanceFamily") - objectKey.String(*v.InstanceFamily) - } - - if v.InstanceType != nil { - objectKey := object.Key("InstanceType") - objectKey.String(*v.InstanceType) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIdentityIdFormatInput(v *ModifyIdentityIdFormatInput, value query.Value) error { - object := value.Object() - _ = object - - if v.PrincipalArn != nil { - objectKey := object.Key("PrincipalArn") - objectKey.String(*v.PrincipalArn) - } - - if v.Resource != nil { - objectKey := object.Key("Resource") - objectKey.String(*v.Resource) - } - - if v.UseLongIds != nil { - objectKey := object.Key("UseLongIds") - objectKey.Boolean(*v.UseLongIds) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIdFormatInput(v *ModifyIdFormatInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Resource != nil { - objectKey := object.Key("Resource") - objectKey.String(*v.Resource) - } - - if v.UseLongIds != nil { - objectKey := object.Key("UseLongIds") - objectKey.Boolean(*v.UseLongIds) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyImageAttributeInput(v *ModifyImageAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Attribute != nil { - objectKey := object.Key("Attribute") - objectKey.String(*v.Attribute) - } - - if v.Description != nil { - objectKey := object.Key("Description") - if err := awsEc2query_serializeDocumentAttributeValue(v.Description, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if v.ImdsSupport != nil { - objectKey := object.Key("ImdsSupport") - if err := awsEc2query_serializeDocumentAttributeValue(v.ImdsSupport, objectKey); err != nil { - return err - } - } - - if v.LaunchPermission != nil { - objectKey := object.Key("LaunchPermission") - if err := awsEc2query_serializeDocumentLaunchPermissionModifications(v.LaunchPermission, objectKey); err != nil { - return err - } - } - - if len(v.OperationType) > 0 { - objectKey := object.Key("OperationType") - objectKey.String(string(v.OperationType)) - } - - if v.OrganizationalUnitArns != nil { - objectKey := object.FlatKey("OrganizationalUnitArn") - if err := awsEc2query_serializeDocumentOrganizationalUnitArnStringList(v.OrganizationalUnitArns, objectKey); err != nil { - return err - } - } - - if v.OrganizationArns != nil { - objectKey := object.FlatKey("OrganizationArn") - if err := awsEc2query_serializeDocumentOrganizationArnStringList(v.OrganizationArns, objectKey); err != nil { - return err - } - } - - if v.ProductCodes != nil { - objectKey := object.FlatKey("ProductCode") - if err := awsEc2query_serializeDocumentProductCodeStringList(v.ProductCodes, objectKey); err != nil { - return err - } - } - - if v.UserGroups != nil { - objectKey := object.FlatKey("UserGroup") - if err := awsEc2query_serializeDocumentUserGroupStringList(v.UserGroups, objectKey); err != nil { - return err - } - } - - if v.UserIds != nil { - objectKey := object.FlatKey("UserId") - if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil { - return err - } - } - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceAttributeInput(v *ModifyInstanceAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentInstanceBlockDeviceMappingSpecificationList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.DisableApiStop != nil { - objectKey := object.Key("DisableApiStop") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableApiStop, objectKey); err != nil { - return err - } - } - - if v.DisableApiTermination != nil { - objectKey := object.Key("DisableApiTermination") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableApiTermination, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EbsOptimized, objectKey); err != nil { - return err - } - } - - if v.EnaSupport != nil { - objectKey := object.Key("EnaSupport") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnaSupport, objectKey); err != nil { - return err - } - } - - if v.Groups != nil { - objectKey := object.FlatKey("GroupId") - if err := awsEc2query_serializeDocumentGroupIdStringList(v.Groups, objectKey); err != nil { - return err - } - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.InstanceInitiatedShutdownBehavior != nil { - objectKey := object.Key("InstanceInitiatedShutdownBehavior") - if err := awsEc2query_serializeDocumentAttributeValue(v.InstanceInitiatedShutdownBehavior, objectKey); err != nil { - return err - } - } - - if v.InstanceType != nil { - objectKey := object.Key("InstanceType") - if err := awsEc2query_serializeDocumentAttributeValue(v.InstanceType, objectKey); err != nil { - return err - } - } - - if v.Kernel != nil { - objectKey := object.Key("Kernel") - if err := awsEc2query_serializeDocumentAttributeValue(v.Kernel, objectKey); err != nil { - return err - } - } - - if v.Ramdisk != nil { - objectKey := object.Key("Ramdisk") - if err := awsEc2query_serializeDocumentAttributeValue(v.Ramdisk, objectKey); err != nil { - return err - } - } - - if v.SourceDestCheck != nil { - objectKey := object.Key("SourceDestCheck") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.SourceDestCheck, objectKey); err != nil { - return err - } - } - - if v.SriovNetSupport != nil { - objectKey := object.Key("SriovNetSupport") - if err := awsEc2query_serializeDocumentAttributeValue(v.SriovNetSupport, objectKey); err != nil { - return err - } - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - if err := awsEc2query_serializeDocumentBlobAttributeValue(v.UserData, objectKey); err != nil { - return err - } - } - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceCapacityReservationAttributesInput(v *ModifyInstanceCapacityReservationAttributesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityReservationSpecification != nil { - objectKey := object.Key("CapacityReservationSpecification") - if err := awsEc2query_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceCreditSpecificationInput(v *ModifyInstanceCreditSpecificationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceCreditSpecifications != nil { - objectKey := object.FlatKey("InstanceCreditSpecification") - if err := awsEc2query_serializeDocumentInstanceCreditSpecificationListRequest(v.InstanceCreditSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceEventStartTimeInput(v *ModifyInstanceEventStartTimeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceEventId != nil { - objectKey := object.Key("InstanceEventId") - objectKey.String(*v.InstanceEventId) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.NotBefore != nil { - objectKey := object.Key("NotBefore") - objectKey.String(smithytime.FormatDateTime(*v.NotBefore)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceEventWindowInput(v *ModifyInstanceEventWindowInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CronExpression != nil { - objectKey := object.Key("CronExpression") - objectKey.String(*v.CronExpression) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceEventWindowId != nil { - objectKey := object.Key("InstanceEventWindowId") - objectKey.String(*v.InstanceEventWindowId) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.TimeRanges != nil { - objectKey := object.FlatKey("TimeRange") - if err := awsEc2query_serializeDocumentInstanceEventWindowTimeRangeRequestSet(v.TimeRanges, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceMaintenanceOptionsInput(v *ModifyInstanceMaintenanceOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.AutoRecovery) > 0 { - objectKey := object.Key("AutoRecovery") - objectKey.String(string(v.AutoRecovery)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstanceMetadataOptionsInput(v *ModifyInstanceMetadataOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.HttpEndpoint) > 0 { - objectKey := object.Key("HttpEndpoint") - objectKey.String(string(v.HttpEndpoint)) - } - - if len(v.HttpProtocolIpv6) > 0 { - objectKey := object.Key("HttpProtocolIpv6") - objectKey.String(string(v.HttpProtocolIpv6)) - } - - if v.HttpPutResponseHopLimit != nil { - objectKey := object.Key("HttpPutResponseHopLimit") - objectKey.Integer(*v.HttpPutResponseHopLimit) - } - - if len(v.HttpTokens) > 0 { - objectKey := object.Key("HttpTokens") - objectKey.String(string(v.HttpTokens)) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if len(v.InstanceMetadataTags) > 0 { - objectKey := object.Key("InstanceMetadataTags") - objectKey.String(string(v.InstanceMetadataTags)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyInstancePlacementInput(v *ModifyInstancePlacementInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Affinity) > 0 { - objectKey := object.Key("Affinity") - objectKey.String(string(v.Affinity)) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.HostId != nil { - objectKey := object.Key("HostId") - objectKey.String(*v.HostId) - } - - if v.HostResourceGroupArn != nil { - objectKey := object.Key("HostResourceGroupArn") - objectKey.String(*v.HostResourceGroupArn) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.PartitionNumber != nil { - objectKey := object.Key("PartitionNumber") - objectKey.Integer(*v.PartitionNumber) - } - - if len(v.Tenancy) > 0 { - objectKey := object.Key("Tenancy") - objectKey.String(string(v.Tenancy)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIpamInput(v *ModifyIpamInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddOperatingRegions != nil { - objectKey := object.FlatKey("AddOperatingRegion") - if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.AddOperatingRegions, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamId != nil { - objectKey := object.Key("IpamId") - objectKey.String(*v.IpamId) - } - - if v.RemoveOperatingRegions != nil { - objectKey := object.FlatKey("RemoveOperatingRegion") - if err := awsEc2query_serializeDocumentRemoveIpamOperatingRegionSet(v.RemoveOperatingRegions, objectKey); err != nil { - return err - } - } - - if len(v.Tier) > 0 { - objectKey := object.Key("Tier") - objectKey.String(string(v.Tier)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIpamPoolInput(v *ModifyIpamPoolInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddAllocationResourceTags != nil { - objectKey := object.FlatKey("AddAllocationResourceTag") - if err := awsEc2query_serializeDocumentRequestIpamResourceTagList(v.AddAllocationResourceTags, objectKey); err != nil { - return err - } - } - - if v.AllocationDefaultNetmaskLength != nil { - objectKey := object.Key("AllocationDefaultNetmaskLength") - objectKey.Integer(*v.AllocationDefaultNetmaskLength) - } - - if v.AllocationMaxNetmaskLength != nil { - objectKey := object.Key("AllocationMaxNetmaskLength") - objectKey.Integer(*v.AllocationMaxNetmaskLength) - } - - if v.AllocationMinNetmaskLength != nil { - objectKey := object.Key("AllocationMinNetmaskLength") - objectKey.Integer(*v.AllocationMinNetmaskLength) - } - - if v.AutoImport != nil { - objectKey := object.Key("AutoImport") - objectKey.Boolean(*v.AutoImport) - } - - if v.ClearAllocationDefaultNetmaskLength != nil { - objectKey := object.Key("ClearAllocationDefaultNetmaskLength") - objectKey.Boolean(*v.ClearAllocationDefaultNetmaskLength) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.RemoveAllocationResourceTags != nil { - objectKey := object.FlatKey("RemoveAllocationResourceTag") - if err := awsEc2query_serializeDocumentRequestIpamResourceTagList(v.RemoveAllocationResourceTags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIpamResourceCidrInput(v *ModifyIpamResourceCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CurrentIpamScopeId != nil { - objectKey := object.Key("CurrentIpamScopeId") - objectKey.String(*v.CurrentIpamScopeId) - } - - if v.DestinationIpamScopeId != nil { - objectKey := object.Key("DestinationIpamScopeId") - objectKey.String(*v.DestinationIpamScopeId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Monitored != nil { - objectKey := object.Key("Monitored") - objectKey.Boolean(*v.Monitored) - } - - if v.ResourceCidr != nil { - objectKey := object.Key("ResourceCidr") - objectKey.String(*v.ResourceCidr) - } - - if v.ResourceId != nil { - objectKey := object.Key("ResourceId") - objectKey.String(*v.ResourceId) - } - - if v.ResourceRegion != nil { - objectKey := object.Key("ResourceRegion") - objectKey.String(*v.ResourceRegion) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIpamResourceDiscoveryInput(v *ModifyIpamResourceDiscoveryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddOperatingRegions != nil { - objectKey := object.FlatKey("AddOperatingRegion") - if err := awsEc2query_serializeDocumentAddIpamOperatingRegionSet(v.AddOperatingRegions, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamResourceDiscoveryId != nil { - objectKey := object.Key("IpamResourceDiscoveryId") - objectKey.String(*v.IpamResourceDiscoveryId) - } - - if v.RemoveOperatingRegions != nil { - objectKey := object.FlatKey("RemoveOperatingRegion") - if err := awsEc2query_serializeDocumentRemoveIpamOperatingRegionSet(v.RemoveOperatingRegions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyIpamScopeInput(v *ModifyIpamScopeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamScopeId != nil { - objectKey := object.Key("IpamScopeId") - objectKey.String(*v.IpamScopeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyLaunchTemplateInput(v *ModifyLaunchTemplateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DefaultVersion != nil { - objectKey := object.Key("SetDefaultVersion") - objectKey.String(*v.DefaultVersion) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LaunchTemplateId != nil { - objectKey := object.Key("LaunchTemplateId") - objectKey.String(*v.LaunchTemplateId) - } - - if v.LaunchTemplateName != nil { - objectKey := object.Key("LaunchTemplateName") - objectKey.String(*v.LaunchTemplateName) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyLocalGatewayRouteInput(v *ModifyLocalGatewayRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationPrefixListId != nil { - objectKey := object.Key("DestinationPrefixListId") - objectKey.String(*v.DestinationPrefixListId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - if v.LocalGatewayVirtualInterfaceGroupId != nil { - objectKey := object.Key("LocalGatewayVirtualInterfaceGroupId") - objectKey.String(*v.LocalGatewayVirtualInterfaceGroupId) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyManagedPrefixListInput(v *ModifyManagedPrefixListInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddEntries != nil { - objectKey := object.FlatKey("AddEntry") - if err := awsEc2query_serializeDocumentAddPrefixListEntries(v.AddEntries, objectKey); err != nil { - return err - } - } - - if v.CurrentVersion != nil { - objectKey := object.Key("CurrentVersion") - objectKey.Long(*v.CurrentVersion) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxEntries != nil { - objectKey := object.Key("MaxEntries") - objectKey.Integer(*v.MaxEntries) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.PrefixListName != nil { - objectKey := object.Key("PrefixListName") - objectKey.String(*v.PrefixListName) - } - - if v.RemoveEntries != nil { - objectKey := object.FlatKey("RemoveEntry") - if err := awsEc2query_serializeDocumentRemovePrefixListEntries(v.RemoveEntries, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyNetworkInterfaceAttributeInput(v *ModifyNetworkInterfaceAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Attachment != nil { - objectKey := object.Key("Attachment") - if err := awsEc2query_serializeDocumentNetworkInterfaceAttachmentChanges(v.Attachment, objectKey); err != nil { - return err - } - } - - if v.ConnectionTrackingSpecification != nil { - objectKey := object.Key("ConnectionTrackingSpecification") - if err := awsEc2query_serializeDocumentConnectionTrackingSpecificationRequest(v.ConnectionTrackingSpecification, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - if err := awsEc2query_serializeDocumentAttributeValue(v.Description, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EnablePrimaryIpv6 != nil { - objectKey := object.Key("EnablePrimaryIpv6") - objectKey.Boolean(*v.EnablePrimaryIpv6) - } - - if v.EnaSrdSpecification != nil { - objectKey := object.Key("EnaSrdSpecification") - if err := awsEc2query_serializeDocumentEnaSrdSpecification(v.EnaSrdSpecification, objectKey); err != nil { - return err - } - } - - if v.Groups != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.Groups, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.SourceDestCheck != nil { - objectKey := object.Key("SourceDestCheck") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.SourceDestCheck, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyPrivateDnsNameOptionsInput(v *ModifyPrivateDnsNameOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EnableResourceNameDnsAAAARecord != nil { - objectKey := object.Key("EnableResourceNameDnsAAAARecord") - objectKey.Boolean(*v.EnableResourceNameDnsAAAARecord) - } - - if v.EnableResourceNameDnsARecord != nil { - objectKey := object.Key("EnableResourceNameDnsARecord") - objectKey.Boolean(*v.EnableResourceNameDnsARecord) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if len(v.PrivateDnsHostnameType) > 0 { - objectKey := object.Key("PrivateDnsHostnameType") - objectKey.String(string(v.PrivateDnsHostnameType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyReservedInstancesInput(v *ModifyReservedInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.ReservedInstancesIds != nil { - objectKey := object.FlatKey("ReservedInstancesId") - if err := awsEc2query_serializeDocumentReservedInstancesIdStringList(v.ReservedInstancesIds, objectKey); err != nil { - return err - } - } - - if v.TargetConfigurations != nil { - objectKey := object.FlatKey("ReservedInstancesConfigurationSetItemType") - if err := awsEc2query_serializeDocumentReservedInstancesConfigurationList(v.TargetConfigurations, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifySecurityGroupRulesInput(v *ModifySecurityGroupRulesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.SecurityGroupRules != nil { - objectKey := object.FlatKey("SecurityGroupRule") - if err := awsEc2query_serializeDocumentSecurityGroupRuleUpdateList(v.SecurityGroupRules, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifySnapshotAttributeInput(v *ModifySnapshotAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.CreateVolumePermission != nil { - objectKey := object.Key("CreateVolumePermission") - if err := awsEc2query_serializeDocumentCreateVolumePermissionModifications(v.CreateVolumePermission, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupNames != nil { - objectKey := object.FlatKey("UserGroup") - if err := awsEc2query_serializeDocumentGroupNameStringList(v.GroupNames, objectKey); err != nil { - return err - } - } - - if len(v.OperationType) > 0 { - objectKey := object.Key("OperationType") - objectKey.String(string(v.OperationType)) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.UserIds != nil { - objectKey := object.FlatKey("UserId") - if err := awsEc2query_serializeDocumentUserIdStringList(v.UserIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifySnapshotTierInput(v *ModifySnapshotTierInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if len(v.StorageTier) > 0 { - objectKey := object.Key("StorageTier") - objectKey.String(string(v.StorageTier)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifySpotFleetRequestInput(v *ModifySpotFleetRequestInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Context != nil { - objectKey := object.Key("Context") - objectKey.String(*v.Context) - } - - if len(v.ExcessCapacityTerminationPolicy) > 0 { - objectKey := object.Key("ExcessCapacityTerminationPolicy") - objectKey.String(string(v.ExcessCapacityTerminationPolicy)) - } - - if v.LaunchTemplateConfigs != nil { - objectKey := object.FlatKey("LaunchTemplateConfig") - if err := awsEc2query_serializeDocumentLaunchTemplateConfigList(v.LaunchTemplateConfigs, objectKey); err != nil { - return err - } - } - - if v.OnDemandTargetCapacity != nil { - objectKey := object.Key("OnDemandTargetCapacity") - objectKey.Integer(*v.OnDemandTargetCapacity) - } - - if v.SpotFleetRequestId != nil { - objectKey := object.Key("SpotFleetRequestId") - objectKey.String(*v.SpotFleetRequestId) - } - - if v.TargetCapacity != nil { - objectKey := object.Key("TargetCapacity") - objectKey.Integer(*v.TargetCapacity) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifySubnetAttributeInput(v *ModifySubnetAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssignIpv6AddressOnCreation != nil { - objectKey := object.Key("AssignIpv6AddressOnCreation") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.AssignIpv6AddressOnCreation, objectKey); err != nil { - return err - } - } - - if v.CustomerOwnedIpv4Pool != nil { - objectKey := object.Key("CustomerOwnedIpv4Pool") - objectKey.String(*v.CustomerOwnedIpv4Pool) - } - - if v.DisableLniAtDeviceIndex != nil { - objectKey := object.Key("DisableLniAtDeviceIndex") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.DisableLniAtDeviceIndex, objectKey); err != nil { - return err - } - } - - if v.EnableDns64 != nil { - objectKey := object.Key("EnableDns64") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDns64, objectKey); err != nil { - return err - } - } - - if v.EnableLniAtDeviceIndex != nil { - objectKey := object.Key("EnableLniAtDeviceIndex") - objectKey.Integer(*v.EnableLniAtDeviceIndex) - } - - if v.EnableResourceNameDnsAAAARecordOnLaunch != nil { - objectKey := object.Key("EnableResourceNameDnsAAAARecordOnLaunch") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableResourceNameDnsAAAARecordOnLaunch, objectKey); err != nil { - return err - } - } - - if v.EnableResourceNameDnsARecordOnLaunch != nil { - objectKey := object.Key("EnableResourceNameDnsARecordOnLaunch") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableResourceNameDnsARecordOnLaunch, objectKey); err != nil { - return err - } - } - - if v.MapCustomerOwnedIpOnLaunch != nil { - objectKey := object.Key("MapCustomerOwnedIpOnLaunch") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapCustomerOwnedIpOnLaunch, objectKey); err != nil { - return err - } - } - - if v.MapPublicIpOnLaunch != nil { - objectKey := object.Key("MapPublicIpOnLaunch") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.MapPublicIpOnLaunch, objectKey); err != nil { - return err - } - } - - if len(v.PrivateDnsHostnameTypeOnLaunch) > 0 { - objectKey := object.Key("PrivateDnsHostnameTypeOnLaunch") - objectKey.String(string(v.PrivateDnsHostnameTypeOnLaunch)) - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterNetworkServicesInput(v *ModifyTrafficMirrorFilterNetworkServicesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddNetworkServices != nil { - objectKey := object.FlatKey("AddNetworkService") - if err := awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v.AddNetworkServices, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RemoveNetworkServices != nil { - objectKey := object.FlatKey("RemoveNetworkService") - if err := awsEc2query_serializeDocumentTrafficMirrorNetworkServiceList(v.RemoveNetworkServices, objectKey); err != nil { - return err - } - } - - if v.TrafficMirrorFilterId != nil { - objectKey := object.Key("TrafficMirrorFilterId") - objectKey.String(*v.TrafficMirrorFilterId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyTrafficMirrorFilterRuleInput(v *ModifyTrafficMirrorFilterRuleInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationPortRange != nil { - objectKey := object.Key("DestinationPortRange") - if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.DestinationPortRange, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Protocol != nil { - objectKey := object.Key("Protocol") - objectKey.Integer(*v.Protocol) - } - - if v.RemoveFields != nil { - objectKey := object.FlatKey("RemoveField") - if err := awsEc2query_serializeDocumentTrafficMirrorFilterRuleFieldList(v.RemoveFields, objectKey); err != nil { - return err - } - } - - if len(v.RuleAction) > 0 { - objectKey := object.Key("RuleAction") - objectKey.String(string(v.RuleAction)) - } - - if v.RuleNumber != nil { - objectKey := object.Key("RuleNumber") - objectKey.Integer(*v.RuleNumber) - } - - if v.SourceCidrBlock != nil { - objectKey := object.Key("SourceCidrBlock") - objectKey.String(*v.SourceCidrBlock) - } - - if v.SourcePortRange != nil { - objectKey := object.Key("SourcePortRange") - if err := awsEc2query_serializeDocumentTrafficMirrorPortRangeRequest(v.SourcePortRange, objectKey); err != nil { - return err - } - } - - if len(v.TrafficDirection) > 0 { - objectKey := object.Key("TrafficDirection") - objectKey.String(string(v.TrafficDirection)) - } - - if v.TrafficMirrorFilterRuleId != nil { - objectKey := object.Key("TrafficMirrorFilterRuleId") - objectKey.String(*v.TrafficMirrorFilterRuleId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyTrafficMirrorSessionInput(v *ModifyTrafficMirrorSessionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PacketLength != nil { - objectKey := object.Key("PacketLength") - objectKey.Integer(*v.PacketLength) - } - - if v.RemoveFields != nil { - objectKey := object.FlatKey("RemoveField") - if err := awsEc2query_serializeDocumentTrafficMirrorSessionFieldList(v.RemoveFields, objectKey); err != nil { - return err - } - } - - if v.SessionNumber != nil { - objectKey := object.Key("SessionNumber") - objectKey.Integer(*v.SessionNumber) - } - - if v.TrafficMirrorFilterId != nil { - objectKey := object.Key("TrafficMirrorFilterId") - objectKey.String(*v.TrafficMirrorFilterId) - } - - if v.TrafficMirrorSessionId != nil { - objectKey := object.Key("TrafficMirrorSessionId") - objectKey.String(*v.TrafficMirrorSessionId) - } - - if v.TrafficMirrorTargetId != nil { - objectKey := object.Key("TrafficMirrorTargetId") - objectKey.String(*v.TrafficMirrorTargetId) - } - - if v.VirtualNetworkId != nil { - objectKey := object.Key("VirtualNetworkId") - objectKey.Integer(*v.VirtualNetworkId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyTransitGatewayInput(v *ModifyTransitGatewayInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentModifyTransitGatewayOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyTransitGatewayPrefixListReferenceInput(v *ModifyTransitGatewayPrefixListReferenceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Blackhole != nil { - objectKey := object.Key("Blackhole") - objectKey.Boolean(*v.Blackhole) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyTransitGatewayVpcAttachmentInput(v *ModifyTransitGatewayVpcAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddSubnetIds != nil { - objectKey := object.FlatKey("AddSubnetIds") - if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.AddSubnetIds, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Options != nil { - objectKey := object.Key("Options") - if err := awsEc2query_serializeDocumentModifyTransitGatewayVpcAttachmentRequestOptions(v.Options, objectKey); err != nil { - return err - } - } - - if v.RemoveSubnetIds != nil { - objectKey := object.FlatKey("RemoveSubnetIds") - if err := awsEc2query_serializeDocumentTransitGatewaySubnetIdList(v.RemoveSubnetIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointInput(v *ModifyVerifiedAccessEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LoadBalancerOptions != nil { - objectKey := object.Key("LoadBalancerOptions") - if err := awsEc2query_serializeDocumentModifyVerifiedAccessEndpointLoadBalancerOptions(v.LoadBalancerOptions, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceOptions != nil { - objectKey := object.Key("NetworkInterfaceOptions") - if err := awsEc2query_serializeDocumentModifyVerifiedAccessEndpointEniOptions(v.NetworkInterfaceOptions, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessEndpointId != nil { - objectKey := object.Key("VerifiedAccessEndpointId") - objectKey.String(*v.VerifiedAccessEndpointId) - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessEndpointPolicyInput(v *ModifyVerifiedAccessEndpointPolicyInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PolicyDocument != nil { - objectKey := object.Key("PolicyDocument") - objectKey.String(*v.PolicyDocument) - } - - if v.PolicyEnabled != nil { - objectKey := object.Key("PolicyEnabled") - objectKey.Boolean(*v.PolicyEnabled) - } - - if v.SseSpecification != nil { - objectKey := object.Key("SseSpecification") - if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessEndpointId != nil { - objectKey := object.Key("VerifiedAccessEndpointId") - objectKey.String(*v.VerifiedAccessEndpointId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupInput(v *ModifyVerifiedAccessGroupInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessGroupPolicyInput(v *ModifyVerifiedAccessGroupPolicyInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PolicyDocument != nil { - objectKey := object.Key("PolicyDocument") - objectKey.String(*v.PolicyDocument) - } - - if v.PolicyEnabled != nil { - objectKey := object.Key("PolicyEnabled") - objectKey.Boolean(*v.PolicyEnabled) - } - - if v.SseSpecification != nil { - objectKey := object.Key("SseSpecification") - if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessGroupId != nil { - objectKey := object.Key("VerifiedAccessGroupId") - objectKey.String(*v.VerifiedAccessGroupId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceInput(v *ModifyVerifiedAccessInstanceInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessInstanceLoggingConfigurationInput(v *ModifyVerifiedAccessInstanceLoggingConfigurationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AccessLogs != nil { - objectKey := object.Key("AccessLogs") - if err := awsEc2query_serializeDocumentVerifiedAccessLogOptions(v.AccessLogs, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VerifiedAccessInstanceId != nil { - objectKey := object.Key("VerifiedAccessInstanceId") - objectKey.String(*v.VerifiedAccessInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVerifiedAccessTrustProviderInput(v *ModifyVerifiedAccessTrustProviderInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DeviceOptions != nil { - objectKey := object.Key("DeviceOptions") - if err := awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderDeviceOptions(v.DeviceOptions, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.OidcOptions != nil { - objectKey := object.Key("OidcOptions") - if err := awsEc2query_serializeDocumentModifyVerifiedAccessTrustProviderOidcOptions(v.OidcOptions, objectKey); err != nil { - return err - } - } - - if v.SseSpecification != nil { - objectKey := object.Key("SseSpecification") - if err := awsEc2query_serializeDocumentVerifiedAccessSseSpecificationRequest(v.SseSpecification, objectKey); err != nil { - return err - } - } - - if v.VerifiedAccessTrustProviderId != nil { - objectKey := object.Key("VerifiedAccessTrustProviderId") - objectKey.String(*v.VerifiedAccessTrustProviderId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVolumeAttributeInput(v *ModifyVolumeAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AutoEnableIO != nil { - objectKey := object.Key("AutoEnableIO") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.AutoEnableIO, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVolumeInput(v *ModifyVolumeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Iops != nil { - objectKey := object.Key("Iops") - objectKey.Integer(*v.Iops) - } - - if v.MultiAttachEnabled != nil { - objectKey := object.Key("MultiAttachEnabled") - objectKey.Boolean(*v.MultiAttachEnabled) - } - - if v.Size != nil { - objectKey := object.Key("Size") - objectKey.Integer(*v.Size) - } - - if v.Throughput != nil { - objectKey := object.Key("Throughput") - objectKey.Integer(*v.Throughput) - } - - if v.VolumeId != nil { - objectKey := object.Key("VolumeId") - objectKey.String(*v.VolumeId) - } - - if len(v.VolumeType) > 0 { - objectKey := object.Key("VolumeType") - objectKey.String(string(v.VolumeType)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcAttributeInput(v *ModifyVpcAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.EnableDnsHostnames != nil { - objectKey := object.Key("EnableDnsHostnames") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDnsHostnames, objectKey); err != nil { - return err - } - } - - if v.EnableDnsSupport != nil { - objectKey := object.Key("EnableDnsSupport") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableDnsSupport, objectKey); err != nil { - return err - } - } - - if v.EnableNetworkAddressUsageMetrics != nil { - objectKey := object.Key("EnableNetworkAddressUsageMetrics") - if err := awsEc2query_serializeDocumentAttributeBooleanValue(v.EnableNetworkAddressUsageMetrics, objectKey); err != nil { - return err - } - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcEndpointConnectionNotificationInput(v *ModifyVpcEndpointConnectionNotificationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ConnectionEvents != nil { - objectKey := object.FlatKey("ConnectionEvents") - if err := awsEc2query_serializeDocumentValueStringList(v.ConnectionEvents, objectKey); err != nil { - return err - } - } - - if v.ConnectionNotificationArn != nil { - objectKey := object.Key("ConnectionNotificationArn") - objectKey.String(*v.ConnectionNotificationArn) - } - - if v.ConnectionNotificationId != nil { - objectKey := object.Key("ConnectionNotificationId") - objectKey.String(*v.ConnectionNotificationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcEndpointInput(v *ModifyVpcEndpointInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddRouteTableIds != nil { - objectKey := object.FlatKey("AddRouteTableId") - if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.AddRouteTableIds, objectKey); err != nil { - return err - } - } - - if v.AddSecurityGroupIds != nil { - objectKey := object.FlatKey("AddSecurityGroupId") - if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.AddSecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.AddSubnetIds != nil { - objectKey := object.FlatKey("AddSubnetId") - if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.AddSubnetIds, objectKey); err != nil { - return err - } - } - - if v.DnsOptions != nil { - objectKey := object.Key("DnsOptions") - if err := awsEc2query_serializeDocumentDnsOptionsSpecification(v.DnsOptions, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.IpAddressType) > 0 { - objectKey := object.Key("IpAddressType") - objectKey.String(string(v.IpAddressType)) - } - - if v.PolicyDocument != nil { - objectKey := object.Key("PolicyDocument") - objectKey.String(*v.PolicyDocument) - } - - if v.PrivateDnsEnabled != nil { - objectKey := object.Key("PrivateDnsEnabled") - objectKey.Boolean(*v.PrivateDnsEnabled) - } - - if v.RemoveRouteTableIds != nil { - objectKey := object.FlatKey("RemoveRouteTableId") - if err := awsEc2query_serializeDocumentVpcEndpointRouteTableIdList(v.RemoveRouteTableIds, objectKey); err != nil { - return err - } - } - - if v.RemoveSecurityGroupIds != nil { - objectKey := object.FlatKey("RemoveSecurityGroupId") - if err := awsEc2query_serializeDocumentVpcEndpointSecurityGroupIdList(v.RemoveSecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.RemoveSubnetIds != nil { - objectKey := object.FlatKey("RemoveSubnetId") - if err := awsEc2query_serializeDocumentVpcEndpointSubnetIdList(v.RemoveSubnetIds, objectKey); err != nil { - return err - } - } - - if v.ResetPolicy != nil { - objectKey := object.Key("ResetPolicy") - objectKey.Boolean(*v.ResetPolicy) - } - - if v.SubnetConfigurations != nil { - objectKey := object.FlatKey("SubnetConfiguration") - if err := awsEc2query_serializeDocumentSubnetConfigurationsList(v.SubnetConfigurations, objectKey); err != nil { - return err - } - } - - if v.VpcEndpointId != nil { - objectKey := object.Key("VpcEndpointId") - objectKey.String(*v.VpcEndpointId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcEndpointServiceConfigurationInput(v *ModifyVpcEndpointServiceConfigurationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AcceptanceRequired != nil { - objectKey := object.Key("AcceptanceRequired") - objectKey.Boolean(*v.AcceptanceRequired) - } - - if v.AddGatewayLoadBalancerArns != nil { - objectKey := object.FlatKey("AddGatewayLoadBalancerArn") - if err := awsEc2query_serializeDocumentValueStringList(v.AddGatewayLoadBalancerArns, objectKey); err != nil { - return err - } - } - - if v.AddNetworkLoadBalancerArns != nil { - objectKey := object.FlatKey("AddNetworkLoadBalancerArn") - if err := awsEc2query_serializeDocumentValueStringList(v.AddNetworkLoadBalancerArns, objectKey); err != nil { - return err - } - } - - if v.AddSupportedIpAddressTypes != nil { - objectKey := object.FlatKey("AddSupportedIpAddressType") - if err := awsEc2query_serializeDocumentValueStringList(v.AddSupportedIpAddressTypes, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrivateDnsName != nil { - objectKey := object.Key("PrivateDnsName") - objectKey.String(*v.PrivateDnsName) - } - - if v.RemoveGatewayLoadBalancerArns != nil { - objectKey := object.FlatKey("RemoveGatewayLoadBalancerArn") - if err := awsEc2query_serializeDocumentValueStringList(v.RemoveGatewayLoadBalancerArns, objectKey); err != nil { - return err - } - } - - if v.RemoveNetworkLoadBalancerArns != nil { - objectKey := object.FlatKey("RemoveNetworkLoadBalancerArn") - if err := awsEc2query_serializeDocumentValueStringList(v.RemoveNetworkLoadBalancerArns, objectKey); err != nil { - return err - } - } - - if v.RemovePrivateDnsName != nil { - objectKey := object.Key("RemovePrivateDnsName") - objectKey.Boolean(*v.RemovePrivateDnsName) - } - - if v.RemoveSupportedIpAddressTypes != nil { - objectKey := object.FlatKey("RemoveSupportedIpAddressType") - if err := awsEc2query_serializeDocumentValueStringList(v.RemoveSupportedIpAddressTypes, objectKey); err != nil { - return err - } - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcEndpointServicePayerResponsibilityInput(v *ModifyVpcEndpointServicePayerResponsibilityInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.PayerResponsibility) > 0 { - objectKey := object.Key("PayerResponsibility") - objectKey.String(string(v.PayerResponsibility)) - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcEndpointServicePermissionsInput(v *ModifyVpcEndpointServicePermissionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AddAllowedPrincipals != nil { - objectKey := object.FlatKey("AddAllowedPrincipals") - if err := awsEc2query_serializeDocumentValueStringList(v.AddAllowedPrincipals, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RemoveAllowedPrincipals != nil { - objectKey := object.FlatKey("RemoveAllowedPrincipals") - if err := awsEc2query_serializeDocumentValueStringList(v.RemoveAllowedPrincipals, objectKey); err != nil { - return err - } - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcPeeringConnectionOptionsInput(v *ModifyVpcPeeringConnectionOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AccepterPeeringConnectionOptions != nil { - objectKey := object.Key("AccepterPeeringConnectionOptions") - if err := awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v.AccepterPeeringConnectionOptions, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RequesterPeeringConnectionOptions != nil { - objectKey := object.Key("RequesterPeeringConnectionOptions") - if err := awsEc2query_serializeDocumentPeeringConnectionOptionsRequest(v.RequesterPeeringConnectionOptions, objectKey); err != nil { - return err - } - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpcTenancyInput(v *ModifyVpcTenancyInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.InstanceTenancy) > 0 { - objectKey := object.Key("InstanceTenancy") - objectKey.String(string(v.InstanceTenancy)) - } - - if v.VpcId != nil { - objectKey := object.Key("VpcId") - objectKey.String(*v.VpcId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpnConnectionInput(v *ModifyVpnConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CustomerGatewayId != nil { - objectKey := object.Key("CustomerGatewayId") - objectKey.String(*v.CustomerGatewayId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - if v.VpnGatewayId != nil { - objectKey := object.Key("VpnGatewayId") - objectKey.String(*v.VpnGatewayId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpnConnectionOptionsInput(v *ModifyVpnConnectionOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.LocalIpv4NetworkCidr != nil { - objectKey := object.Key("LocalIpv4NetworkCidr") - objectKey.String(*v.LocalIpv4NetworkCidr) - } - - if v.LocalIpv6NetworkCidr != nil { - objectKey := object.Key("LocalIpv6NetworkCidr") - objectKey.String(*v.LocalIpv6NetworkCidr) - } - - if v.RemoteIpv4NetworkCidr != nil { - objectKey := object.Key("RemoteIpv4NetworkCidr") - objectKey.String(*v.RemoteIpv4NetworkCidr) - } - - if v.RemoteIpv6NetworkCidr != nil { - objectKey := object.Key("RemoteIpv6NetworkCidr") - objectKey.String(*v.RemoteIpv6NetworkCidr) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpnTunnelCertificateInput(v *ModifyVpnTunnelCertificateInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - if v.VpnTunnelOutsideIpAddress != nil { - objectKey := object.Key("VpnTunnelOutsideIpAddress") - objectKey.String(*v.VpnTunnelOutsideIpAddress) - } - - return nil -} - -func awsEc2query_serializeOpDocumentModifyVpnTunnelOptionsInput(v *ModifyVpnTunnelOptionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SkipTunnelReplacement != nil { - objectKey := object.Key("SkipTunnelReplacement") - objectKey.Boolean(*v.SkipTunnelReplacement) - } - - if v.TunnelOptions != nil { - objectKey := object.Key("TunnelOptions") - if err := awsEc2query_serializeDocumentModifyVpnTunnelOptionsSpecification(v.TunnelOptions, objectKey); err != nil { - return err - } - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - if v.VpnTunnelOutsideIpAddress != nil { - objectKey := object.Key("VpnTunnelOutsideIpAddress") - objectKey.String(*v.VpnTunnelOutsideIpAddress) - } - - return nil -} - -func awsEc2query_serializeOpDocumentMonitorInstancesInput(v *MonitorInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentMoveAddressToVpcInput(v *MoveAddressToVpcInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PublicIp != nil { - objectKey := object.Key("PublicIp") - objectKey.String(*v.PublicIp) - } - - return nil -} - -func awsEc2query_serializeOpDocumentMoveByoipCidrToIpamInput(v *MoveByoipCidrToIpamInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.IpamPoolOwner != nil { - objectKey := object.Key("IpamPoolOwner") - objectKey.String(*v.IpamPoolOwner) - } - - return nil -} - -func awsEc2query_serializeOpDocumentProvisionByoipCidrInput(v *ProvisionByoipCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.CidrAuthorizationContext != nil { - objectKey := object.Key("CidrAuthorizationContext") - if err := awsEc2query_serializeDocumentCidrAuthorizationContext(v.CidrAuthorizationContext, objectKey); err != nil { - return err - } - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MultiRegion != nil { - objectKey := object.Key("MultiRegion") - objectKey.Boolean(*v.MultiRegion) - } - - if v.NetworkBorderGroup != nil { - objectKey := object.Key("NetworkBorderGroup") - objectKey.String(*v.NetworkBorderGroup) - } - - if v.PoolTagSpecifications != nil { - objectKey := object.FlatKey("PoolTagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.PoolTagSpecifications, objectKey); err != nil { - return err - } - } - - if v.PubliclyAdvertisable != nil { - objectKey := object.Key("PubliclyAdvertisable") - objectKey.Boolean(*v.PubliclyAdvertisable) - } - - return nil -} - -func awsEc2query_serializeOpDocumentProvisionIpamByoasnInput(v *ProvisionIpamByoasnInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Asn != nil { - objectKey := object.Key("Asn") - objectKey.String(*v.Asn) - } - - if v.AsnAuthorizationContext != nil { - objectKey := object.Key("AsnAuthorizationContext") - if err := awsEc2query_serializeDocumentAsnAuthorizationContext(v.AsnAuthorizationContext, objectKey); err != nil { - return err - } - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamId != nil { - objectKey := object.Key("IpamId") - objectKey.String(*v.IpamId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentProvisionIpamPoolCidrInput(v *ProvisionIpamPoolCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.CidrAuthorizationContext != nil { - objectKey := object.Key("CidrAuthorizationContext") - if err := awsEc2query_serializeDocumentIpamCidrAuthorizationContext(v.CidrAuthorizationContext, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.NetmaskLength != nil { - objectKey := object.Key("NetmaskLength") - objectKey.Integer(*v.NetmaskLength) - } - - return nil -} - -func awsEc2query_serializeOpDocumentProvisionPublicIpv4PoolCidrInput(v *ProvisionPublicIpv4PoolCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - if v.NetmaskLength != nil { - objectKey := object.Key("NetmaskLength") - objectKey.Integer(*v.NetmaskLength) - } - - if v.PoolId != nil { - objectKey := object.Key("PoolId") - objectKey.String(*v.PoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentPurchaseCapacityBlockInput(v *PurchaseCapacityBlockInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CapacityBlockOfferingId != nil { - objectKey := object.Key("CapacityBlockOfferingId") - objectKey.String(*v.CapacityBlockOfferingId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if len(v.InstancePlatform) > 0 { - objectKey := object.Key("InstancePlatform") - objectKey.String(string(v.InstancePlatform)) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentPurchaseHostReservationInput(v *PurchaseHostReservationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if len(v.CurrencyCode) > 0 { - objectKey := object.Key("CurrencyCode") - objectKey.String(string(v.CurrencyCode)) - } - - if v.HostIdSet != nil { - objectKey := object.FlatKey("HostIdSet") - if err := awsEc2query_serializeDocumentRequestHostIdSet(v.HostIdSet, objectKey); err != nil { - return err - } - } - - if v.LimitPrice != nil { - objectKey := object.Key("LimitPrice") - objectKey.String(*v.LimitPrice) - } - - if v.OfferingId != nil { - objectKey := object.Key("OfferingId") - objectKey.String(*v.OfferingId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentPurchaseReservedInstancesOfferingInput(v *PurchaseReservedInstancesOfferingInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if v.LimitPrice != nil { - objectKey := object.Key("LimitPrice") - if err := awsEc2query_serializeDocumentReservedInstanceLimitPrice(v.LimitPrice, objectKey); err != nil { - return err - } - } - - if v.PurchaseTime != nil { - objectKey := object.Key("PurchaseTime") - objectKey.String(smithytime.FormatDateTime(*v.PurchaseTime)) - } - - if v.ReservedInstancesOfferingId != nil { - objectKey := object.Key("ReservedInstancesOfferingId") - objectKey.String(*v.ReservedInstancesOfferingId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentPurchaseScheduledInstancesInput(v *PurchaseScheduledInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PurchaseRequests != nil { - objectKey := object.FlatKey("PurchaseRequest") - if err := awsEc2query_serializeDocumentPurchaseRequestSet(v.PurchaseRequests, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentRebootInstancesInput(v *RebootInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentRegisterImageInput(v *RegisterImageInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Architecture) > 0 { - objectKey := object.Key("Architecture") - objectKey.String(string(v.Architecture)) - } - - if v.BillingProducts != nil { - objectKey := object.FlatKey("BillingProduct") - if err := awsEc2query_serializeDocumentBillingProductList(v.BillingProducts, objectKey); err != nil { - return err - } - } - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if len(v.BootMode) > 0 { - objectKey := object.Key("BootMode") - objectKey.String(string(v.BootMode)) - } - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EnaSupport != nil { - objectKey := object.Key("EnaSupport") - objectKey.Boolean(*v.EnaSupport) - } - - if v.ImageLocation != nil { - objectKey := object.Key("ImageLocation") - objectKey.String(*v.ImageLocation) - } - - if len(v.ImdsSupport) > 0 { - objectKey := object.Key("ImdsSupport") - objectKey.String(string(v.ImdsSupport)) - } - - if v.KernelId != nil { - objectKey := object.Key("KernelId") - objectKey.String(*v.KernelId) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.RamdiskId != nil { - objectKey := object.Key("RamdiskId") - objectKey.String(*v.RamdiskId) - } - - if v.RootDeviceName != nil { - objectKey := object.Key("RootDeviceName") - objectKey.String(*v.RootDeviceName) - } - - if v.SriovNetSupport != nil { - objectKey := object.Key("SriovNetSupport") - objectKey.String(*v.SriovNetSupport) - } - - if len(v.TpmSupport) > 0 { - objectKey := object.Key("TpmSupport") - objectKey.String(string(v.TpmSupport)) - } - - if v.UefiData != nil { - objectKey := object.Key("UefiData") - objectKey.String(*v.UefiData) - } - - if v.VirtualizationType != nil { - objectKey := object.Key("VirtualizationType") - objectKey.String(*v.VirtualizationType) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRegisterInstanceEventNotificationAttributesInput(v *RegisterInstanceEventNotificationAttributesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceTagAttribute != nil { - objectKey := object.Key("InstanceTagAttribute") - if err := awsEc2query_serializeDocumentRegisterInstanceTagAttributeRequest(v.InstanceTagAttribute, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupMembersInput(v *RegisterTransitGatewayMulticastGroupMembersInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupIpAddress != nil { - objectKey := object.Key("GroupIpAddress") - objectKey.String(*v.GroupIpAddress) - } - - if v.NetworkInterfaceIds != nil { - objectKey := object.FlatKey("NetworkInterfaceIds") - if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRegisterTransitGatewayMulticastGroupSourcesInput(v *RegisterTransitGatewayMulticastGroupSourcesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupIpAddress != nil { - objectKey := object.Key("GroupIpAddress") - objectKey.String(*v.GroupIpAddress) - } - - if v.NetworkInterfaceIds != nil { - objectKey := object.FlatKey("NetworkInterfaceIds") - if err := awsEc2query_serializeDocumentTransitGatewayNetworkInterfaceIdList(v.NetworkInterfaceIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRejectTransitGatewayMulticastDomainAssociationsInput(v *RejectTransitGatewayMulticastDomainAssociationsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SubnetIds != nil { - objectKey := object.FlatKey("SubnetIds") - if err := awsEc2query_serializeDocumentValueStringList(v.SubnetIds, objectKey); err != nil { - return err - } - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRejectTransitGatewayPeeringAttachmentInput(v *RejectTransitGatewayPeeringAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRejectTransitGatewayVpcAttachmentInput(v *RejectTransitGatewayVpcAttachmentInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRejectVpcEndpointConnectionsInput(v *RejectVpcEndpointConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - if v.VpcEndpointIds != nil { - objectKey := object.FlatKey("VpcEndpointId") - if err := awsEc2query_serializeDocumentVpcEndpointIdList(v.VpcEndpointIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentRejectVpcPeeringConnectionInput(v *RejectVpcPeeringConnectionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReleaseAddressInput(v *ReleaseAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkBorderGroup != nil { - objectKey := object.Key("NetworkBorderGroup") - objectKey.String(*v.NetworkBorderGroup) - } - - if v.PublicIp != nil { - objectKey := object.Key("PublicIp") - objectKey.String(*v.PublicIp) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReleaseHostsInput(v *ReleaseHostsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.HostIds != nil { - objectKey := object.FlatKey("HostId") - if err := awsEc2query_serializeDocumentRequestHostIdList(v.HostIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentReleaseIpamPoolAllocationInput(v *ReleaseIpamPoolAllocationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.IpamPoolAllocationId != nil { - objectKey := object.Key("IpamPoolAllocationId") - objectKey.String(*v.IpamPoolAllocationId) - } - - if v.IpamPoolId != nil { - objectKey := object.Key("IpamPoolId") - objectKey.String(*v.IpamPoolId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceIamInstanceProfileAssociationInput(v *ReplaceIamInstanceProfileAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceNetworkAclAssociationInput(v *ReplaceNetworkAclAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkAclId != nil { - objectKey := object.Key("NetworkAclId") - objectKey.String(*v.NetworkAclId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceNetworkAclEntryInput(v *ReplaceNetworkAclEntryInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrBlock != nil { - objectKey := object.Key("CidrBlock") - objectKey.String(*v.CidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Egress != nil { - objectKey := object.Key("Egress") - objectKey.Boolean(*v.Egress) - } - - if v.IcmpTypeCode != nil { - objectKey := object.Key("Icmp") - if err := awsEc2query_serializeDocumentIcmpTypeCode(v.IcmpTypeCode, objectKey); err != nil { - return err - } - } - - if v.Ipv6CidrBlock != nil { - objectKey := object.Key("Ipv6CidrBlock") - objectKey.String(*v.Ipv6CidrBlock) - } - - if v.NetworkAclId != nil { - objectKey := object.Key("NetworkAclId") - objectKey.String(*v.NetworkAclId) - } - - if v.PortRange != nil { - objectKey := object.Key("PortRange") - if err := awsEc2query_serializeDocumentPortRange(v.PortRange, objectKey); err != nil { - return err - } - } - - if v.Protocol != nil { - objectKey := object.Key("Protocol") - objectKey.String(*v.Protocol) - } - - if len(v.RuleAction) > 0 { - objectKey := object.Key("RuleAction") - objectKey.String(string(v.RuleAction)) - } - - if v.RuleNumber != nil { - objectKey := object.Key("RuleNumber") - objectKey.Integer(*v.RuleNumber) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceRouteInput(v *ReplaceRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CarrierGatewayId != nil { - objectKey := object.Key("CarrierGatewayId") - objectKey.String(*v.CarrierGatewayId) - } - - if v.CoreNetworkArn != nil { - objectKey := object.Key("CoreNetworkArn") - objectKey.String(*v.CoreNetworkArn) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DestinationIpv6CidrBlock != nil { - objectKey := object.Key("DestinationIpv6CidrBlock") - objectKey.String(*v.DestinationIpv6CidrBlock) - } - - if v.DestinationPrefixListId != nil { - objectKey := object.Key("DestinationPrefixListId") - objectKey.String(*v.DestinationPrefixListId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EgressOnlyInternetGatewayId != nil { - objectKey := object.Key("EgressOnlyInternetGatewayId") - objectKey.String(*v.EgressOnlyInternetGatewayId) - } - - if v.GatewayId != nil { - objectKey := object.Key("GatewayId") - objectKey.String(*v.GatewayId) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - if v.LocalGatewayId != nil { - objectKey := object.Key("LocalGatewayId") - objectKey.String(*v.LocalGatewayId) - } - - if v.LocalTarget != nil { - objectKey := object.Key("LocalTarget") - objectKey.Boolean(*v.LocalTarget) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - if v.TransitGatewayId != nil { - objectKey := object.Key("TransitGatewayId") - objectKey.String(*v.TransitGatewayId) - } - - if v.VpcEndpointId != nil { - objectKey := object.Key("VpcEndpointId") - objectKey.String(*v.VpcEndpointId) - } - - if v.VpcPeeringConnectionId != nil { - objectKey := object.Key("VpcPeeringConnectionId") - objectKey.String(*v.VpcPeeringConnectionId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceRouteTableAssociationInput(v *ReplaceRouteTableAssociationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AssociationId != nil { - objectKey := object.Key("AssociationId") - objectKey.String(*v.AssociationId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RouteTableId != nil { - objectKey := object.Key("RouteTableId") - objectKey.String(*v.RouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceTransitGatewayRouteInput(v *ReplaceTransitGatewayRouteInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Blackhole != nil { - objectKey := object.Key("Blackhole") - objectKey.Boolean(*v.Blackhole) - } - - if v.DestinationCidrBlock != nil { - objectKey := object.Key("DestinationCidrBlock") - objectKey.String(*v.DestinationCidrBlock) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.TransitGatewayAttachmentId != nil { - objectKey := object.Key("TransitGatewayAttachmentId") - objectKey.String(*v.TransitGatewayAttachmentId) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReplaceVpnTunnelInput(v *ReplaceVpnTunnelInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ApplyPendingMaintenance != nil { - objectKey := object.Key("ApplyPendingMaintenance") - objectKey.Boolean(*v.ApplyPendingMaintenance) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.VpnConnectionId != nil { - objectKey := object.Key("VpnConnectionId") - objectKey.String(*v.VpnConnectionId) - } - - if v.VpnTunnelOutsideIpAddress != nil { - objectKey := object.Key("VpnTunnelOutsideIpAddress") - objectKey.String(*v.VpnTunnelOutsideIpAddress) - } - - return nil -} - -func awsEc2query_serializeOpDocumentReportInstanceStatusInput(v *ReportInstanceStatusInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Description != nil { - objectKey := object.Key("Description") - objectKey.String(*v.Description) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EndTime != nil { - objectKey := object.Key("EndTime") - objectKey.String(smithytime.FormatDateTime(*v.EndTime)) - } - - if v.Instances != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.Instances, objectKey); err != nil { - return err - } - } - - if v.ReasonCodes != nil { - objectKey := object.FlatKey("ReasonCode") - if err := awsEc2query_serializeDocumentReasonCodesList(v.ReasonCodes, objectKey); err != nil { - return err - } - } - - if v.StartTime != nil { - objectKey := object.Key("StartTime") - objectKey.String(smithytime.FormatDateTime(*v.StartTime)) - } - - if len(v.Status) > 0 { - objectKey := object.Key("Status") - objectKey.String(string(v.Status)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRequestSpotFleetInput(v *RequestSpotFleetInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SpotFleetRequestConfig != nil { - objectKey := object.Key("SpotFleetRequestConfig") - if err := awsEc2query_serializeDocumentSpotFleetRequestConfigData(v.SpotFleetRequestConfig, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentRequestSpotInstancesInput(v *RequestSpotInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AvailabilityZoneGroup != nil { - objectKey := object.Key("AvailabilityZoneGroup") - objectKey.String(*v.AvailabilityZoneGroup) - } - - if v.BlockDurationMinutes != nil { - objectKey := object.Key("BlockDurationMinutes") - objectKey.Integer(*v.BlockDurationMinutes) - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if len(v.InstanceInterruptionBehavior) > 0 { - objectKey := object.Key("InstanceInterruptionBehavior") - objectKey.String(string(v.InstanceInterruptionBehavior)) - } - - if v.LaunchGroup != nil { - objectKey := object.Key("LaunchGroup") - objectKey.String(*v.LaunchGroup) - } - - if v.LaunchSpecification != nil { - objectKey := object.Key("LaunchSpecification") - if err := awsEc2query_serializeDocumentRequestSpotLaunchSpecification(v.LaunchSpecification, objectKey); err != nil { - return err - } - } - - if v.SpotPrice != nil { - objectKey := object.Key("SpotPrice") - objectKey.String(*v.SpotPrice) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if len(v.Type) > 0 { - objectKey := object.Key("Type") - objectKey.String(string(v.Type)) - } - - if v.ValidFrom != nil { - objectKey := object.Key("ValidFrom") - objectKey.String(smithytime.FormatDateTime(*v.ValidFrom)) - } - - if v.ValidUntil != nil { - objectKey := object.Key("ValidUntil") - objectKey.String(smithytime.FormatDateTime(*v.ValidUntil)) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetAddressAttributeInput(v *ResetAddressAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AllocationId != nil { - objectKey := object.Key("AllocationId") - objectKey.String(*v.AllocationId) - } - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetEbsDefaultKmsKeyIdInput(v *ResetEbsDefaultKmsKeyIdInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetFpgaImageAttributeInput(v *ResetFpgaImageAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FpgaImageId != nil { - objectKey := object.Key("FpgaImageId") - objectKey.String(*v.FpgaImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetImageAttributeInput(v *ResetImageAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetInstanceAttributeInput(v *ResetInstanceAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetNetworkInterfaceAttributeInput(v *ResetNetworkInterfaceAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.SourceDestCheck != nil { - objectKey := object.Key("SourceDestCheck") - objectKey.String(*v.SourceDestCheck) - } - - return nil -} - -func awsEc2query_serializeOpDocumentResetSnapshotAttributeInput(v *ResetSnapshotAttributeInput, value query.Value) error { - object := value.Object() - _ = object - - if len(v.Attribute) > 0 { - objectKey := object.Key("Attribute") - objectKey.String(string(v.Attribute)) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRestoreAddressToClassicInput(v *RestoreAddressToClassicInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PublicIp != nil { - objectKey := object.Key("PublicIp") - objectKey.String(*v.PublicIp) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRestoreImageFromRecycleBinInput(v *RestoreImageFromRecycleBinInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRestoreManagedPrefixListVersionInput(v *RestoreManagedPrefixListVersionInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CurrentVersion != nil { - objectKey := object.Key("CurrentVersion") - objectKey.Long(*v.CurrentVersion) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PrefixListId != nil { - objectKey := object.Key("PrefixListId") - objectKey.String(*v.PrefixListId) - } - - if v.PreviousVersion != nil { - objectKey := object.Key("PreviousVersion") - objectKey.Long(*v.PreviousVersion) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRestoreSnapshotFromRecycleBinInput(v *RestoreSnapshotFromRecycleBinInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRestoreSnapshotTierInput(v *RestoreSnapshotTierInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.PermanentRestore != nil { - objectKey := object.Key("PermanentRestore") - objectKey.Boolean(*v.PermanentRestore) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - if v.TemporaryRestoreDays != nil { - objectKey := object.Key("TemporaryRestoreDays") - objectKey.Integer(*v.TemporaryRestoreDays) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRevokeClientVpnIngressInput(v *RevokeClientVpnIngressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AccessGroupId != nil { - objectKey := object.Key("AccessGroupId") - objectKey.String(*v.AccessGroupId) - } - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.RevokeAllGroups != nil { - objectKey := object.Key("RevokeAllGroups") - objectKey.Boolean(*v.RevokeAllGroups) - } - - if v.TargetNetworkCidr != nil { - objectKey := object.Key("TargetNetworkCidr") - objectKey.String(*v.TargetNetworkCidr) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRevokeSecurityGroupEgressInput(v *RevokeSecurityGroupEgressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIp != nil { - objectKey := object.Key("CidrIp") - objectKey.String(*v.CidrIp) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.IpPermissions != nil { - objectKey := object.FlatKey("IpPermissions") - if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil { - return err - } - } - - if v.IpProtocol != nil { - objectKey := object.Key("IpProtocol") - objectKey.String(*v.IpProtocol) - } - - if v.SecurityGroupRuleIds != nil { - objectKey := object.FlatKey("SecurityGroupRuleId") - if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil { - return err - } - } - - if v.SourceSecurityGroupName != nil { - objectKey := object.Key("SourceSecurityGroupName") - objectKey.String(*v.SourceSecurityGroupName) - } - - if v.SourceSecurityGroupOwnerId != nil { - objectKey := object.Key("SourceSecurityGroupOwnerId") - objectKey.String(*v.SourceSecurityGroupOwnerId) - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRevokeSecurityGroupIngressInput(v *RevokeSecurityGroupIngressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.CidrIp != nil { - objectKey := object.Key("CidrIp") - objectKey.String(*v.CidrIp) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FromPort != nil { - objectKey := object.Key("FromPort") - objectKey.Integer(*v.FromPort) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.IpPermissions != nil { - objectKey := object.FlatKey("IpPermissions") - if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil { - return err - } - } - - if v.IpProtocol != nil { - objectKey := object.Key("IpProtocol") - objectKey.String(*v.IpProtocol) - } - - if v.SecurityGroupRuleIds != nil { - objectKey := object.FlatKey("SecurityGroupRuleId") - if err := awsEc2query_serializeDocumentSecurityGroupRuleIdList(v.SecurityGroupRuleIds, objectKey); err != nil { - return err - } - } - - if v.SourceSecurityGroupName != nil { - objectKey := object.Key("SourceSecurityGroupName") - objectKey.String(*v.SourceSecurityGroupName) - } - - if v.SourceSecurityGroupOwnerId != nil { - objectKey := object.Key("SourceSecurityGroupOwnerId") - objectKey.String(*v.SourceSecurityGroupOwnerId) - } - - if v.ToPort != nil { - objectKey := object.Key("ToPort") - objectKey.Integer(*v.ToPort) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRunInstancesInput(v *RunInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AdditionalInfo != nil { - objectKey := object.Key("AdditionalInfo") - objectKey.String(*v.AdditionalInfo) - } - - if v.BlockDeviceMappings != nil { - objectKey := object.FlatKey("BlockDeviceMapping") - if err := awsEc2query_serializeDocumentBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil { - return err - } - } - - if v.CapacityReservationSpecification != nil { - objectKey := object.Key("CapacityReservationSpecification") - if err := awsEc2query_serializeDocumentCapacityReservationSpecification(v.CapacityReservationSpecification, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.CpuOptions != nil { - objectKey := object.Key("CpuOptions") - if err := awsEc2query_serializeDocumentCpuOptionsRequest(v.CpuOptions, objectKey); err != nil { - return err - } - } - - if v.CreditSpecification != nil { - objectKey := object.Key("CreditSpecification") - if err := awsEc2query_serializeDocumentCreditSpecificationRequest(v.CreditSpecification, objectKey); err != nil { - return err - } - } - - if v.DisableApiStop != nil { - objectKey := object.Key("DisableApiStop") - objectKey.Boolean(*v.DisableApiStop) - } - - if v.DisableApiTermination != nil { - objectKey := object.Key("DisableApiTermination") - objectKey.Boolean(*v.DisableApiTermination) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.EbsOptimized != nil { - objectKey := object.Key("EbsOptimized") - objectKey.Boolean(*v.EbsOptimized) - } - - if v.ElasticGpuSpecification != nil { - objectKey := object.FlatKey("ElasticGpuSpecification") - if err := awsEc2query_serializeDocumentElasticGpuSpecifications(v.ElasticGpuSpecification, objectKey); err != nil { - return err - } - } - - if v.ElasticInferenceAccelerators != nil { - objectKey := object.FlatKey("ElasticInferenceAccelerator") - if err := awsEc2query_serializeDocumentElasticInferenceAccelerators(v.ElasticInferenceAccelerators, objectKey); err != nil { - return err - } - } - - if v.EnablePrimaryIpv6 != nil { - objectKey := object.Key("EnablePrimaryIpv6") - objectKey.Boolean(*v.EnablePrimaryIpv6) - } - - if v.EnclaveOptions != nil { - objectKey := object.Key("EnclaveOptions") - if err := awsEc2query_serializeDocumentEnclaveOptionsRequest(v.EnclaveOptions, objectKey); err != nil { - return err - } - } - - if v.HibernationOptions != nil { - objectKey := object.Key("HibernationOptions") - if err := awsEc2query_serializeDocumentHibernationOptionsRequest(v.HibernationOptions, objectKey); err != nil { - return err - } - } - - if v.IamInstanceProfile != nil { - objectKey := object.Key("IamInstanceProfile") - if err := awsEc2query_serializeDocumentIamInstanceProfileSpecification(v.IamInstanceProfile, objectKey); err != nil { - return err - } - } - - if v.ImageId != nil { - objectKey := object.Key("ImageId") - objectKey.String(*v.ImageId) - } - - if len(v.InstanceInitiatedShutdownBehavior) > 0 { - objectKey := object.Key("InstanceInitiatedShutdownBehavior") - objectKey.String(string(v.InstanceInitiatedShutdownBehavior)) - } - - if v.InstanceMarketOptions != nil { - objectKey := object.Key("InstanceMarketOptions") - if err := awsEc2query_serializeDocumentInstanceMarketOptionsRequest(v.InstanceMarketOptions, objectKey); err != nil { - return err - } - } - - if len(v.InstanceType) > 0 { - objectKey := object.Key("InstanceType") - objectKey.String(string(v.InstanceType)) - } - - if v.Ipv6AddressCount != nil { - objectKey := object.Key("Ipv6AddressCount") - objectKey.Integer(*v.Ipv6AddressCount) - } - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Address") - if err := awsEc2query_serializeDocumentInstanceIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.KernelId != nil { - objectKey := object.Key("KernelId") - objectKey.String(*v.KernelId) - } - - if v.KeyName != nil { - objectKey := object.Key("KeyName") - objectKey.String(*v.KeyName) - } - - if v.LaunchTemplate != nil { - objectKey := object.Key("LaunchTemplate") - if err := awsEc2query_serializeDocumentLaunchTemplateSpecification(v.LaunchTemplate, objectKey); err != nil { - return err - } - } - - if v.LicenseSpecifications != nil { - objectKey := object.FlatKey("LicenseSpecification") - if err := awsEc2query_serializeDocumentLicenseSpecificationListRequest(v.LicenseSpecifications, objectKey); err != nil { - return err - } - } - - if v.MaintenanceOptions != nil { - objectKey := object.Key("MaintenanceOptions") - if err := awsEc2query_serializeDocumentInstanceMaintenanceOptionsRequest(v.MaintenanceOptions, objectKey); err != nil { - return err - } - } - - if v.MaxCount != nil { - objectKey := object.Key("MaxCount") - objectKey.Integer(*v.MaxCount) - } - - if v.MetadataOptions != nil { - objectKey := object.Key("MetadataOptions") - if err := awsEc2query_serializeDocumentInstanceMetadataOptionsRequest(v.MetadataOptions, objectKey); err != nil { - return err - } - } - - if v.MinCount != nil { - objectKey := object.Key("MinCount") - objectKey.Integer(*v.MinCount) - } - - if v.Monitoring != nil { - objectKey := object.Key("Monitoring") - if err := awsEc2query_serializeDocumentRunInstancesMonitoringEnabled(v.Monitoring, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaces != nil { - objectKey := object.FlatKey("NetworkInterface") - if err := awsEc2query_serializeDocumentInstanceNetworkInterfaceSpecificationList(v.NetworkInterfaces, objectKey); err != nil { - return err - } - } - - if v.Placement != nil { - objectKey := object.Key("Placement") - if err := awsEc2query_serializeDocumentPlacement(v.Placement, objectKey); err != nil { - return err - } - } - - if v.PrivateDnsNameOptions != nil { - objectKey := object.Key("PrivateDnsNameOptions") - if err := awsEc2query_serializeDocumentPrivateDnsNameOptionsRequest(v.PrivateDnsNameOptions, objectKey); err != nil { - return err - } - } - - if v.PrivateIpAddress != nil { - objectKey := object.Key("PrivateIpAddress") - objectKey.String(*v.PrivateIpAddress) - } - - if v.RamdiskId != nil { - objectKey := object.Key("RamdiskId") - objectKey.String(*v.RamdiskId) - } - - if v.SecurityGroupIds != nil { - objectKey := object.FlatKey("SecurityGroupId") - if err := awsEc2query_serializeDocumentSecurityGroupIdStringList(v.SecurityGroupIds, objectKey); err != nil { - return err - } - } - - if v.SecurityGroups != nil { - objectKey := object.FlatKey("SecurityGroup") - if err := awsEc2query_serializeDocumentSecurityGroupStringList(v.SecurityGroups, objectKey); err != nil { - return err - } - } - - if v.SubnetId != nil { - objectKey := object.Key("SubnetId") - objectKey.String(*v.SubnetId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - if v.UserData != nil { - objectKey := object.Key("UserData") - objectKey.String(*v.UserData) - } - - return nil -} - -func awsEc2query_serializeOpDocumentRunScheduledInstancesInput(v *RunScheduledInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceCount != nil { - objectKey := object.Key("InstanceCount") - objectKey.Integer(*v.InstanceCount) - } - - if v.LaunchSpecification != nil { - objectKey := object.Key("LaunchSpecification") - if err := awsEc2query_serializeDocumentScheduledInstancesLaunchSpecification(v.LaunchSpecification, objectKey); err != nil { - return err - } - } - - if v.ScheduledInstanceId != nil { - objectKey := object.Key("ScheduledInstanceId") - objectKey.String(*v.ScheduledInstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentSearchLocalGatewayRoutesInput(v *SearchLocalGatewayRoutesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.LocalGatewayRouteTableId != nil { - objectKey := object.Key("LocalGatewayRouteTableId") - objectKey.String(*v.LocalGatewayRouteTableId) - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - return nil -} - -func awsEc2query_serializeOpDocumentSearchTransitGatewayMulticastGroupsInput(v *SearchTransitGatewayMulticastGroupsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - objectKey := object.Key("NextToken") - objectKey.String(*v.NextToken) - } - - if v.TransitGatewayMulticastDomainId != nil { - objectKey := object.Key("TransitGatewayMulticastDomainId") - objectKey.String(*v.TransitGatewayMulticastDomainId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentSearchTransitGatewayRoutesInput(v *SearchTransitGatewayRoutesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Filters != nil { - objectKey := object.FlatKey("Filter") - if err := awsEc2query_serializeDocumentFilterList(v.Filters, objectKey); err != nil { - return err - } - } - - if v.MaxResults != nil { - objectKey := object.Key("MaxResults") - objectKey.Integer(*v.MaxResults) - } - - if v.TransitGatewayRouteTableId != nil { - objectKey := object.Key("TransitGatewayRouteTableId") - objectKey.String(*v.TransitGatewayRouteTableId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentSendDiagnosticInterruptInput(v *SendDiagnosticInterruptInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceId != nil { - objectKey := object.Key("InstanceId") - objectKey.String(*v.InstanceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentStartInstancesInput(v *StartInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AdditionalInfo != nil { - objectKey := object.Key("AdditionalInfo") - objectKey.String(*v.AdditionalInfo) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentStartNetworkInsightsAccessScopeAnalysisInput(v *StartNetworkInsightsAccessScopeAnalysisInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.NetworkInsightsAccessScopeId != nil { - objectKey := object.Key("NetworkInsightsAccessScopeId") - objectKey.String(*v.NetworkInsightsAccessScopeId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentStartNetworkInsightsAnalysisInput(v *StartNetworkInsightsAnalysisInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AdditionalAccounts != nil { - objectKey := object.FlatKey("AdditionalAccount") - if err := awsEc2query_serializeDocumentValueStringList(v.AdditionalAccounts, objectKey); err != nil { - return err - } - } - - if v.ClientToken != nil { - objectKey := object.Key("ClientToken") - objectKey.String(*v.ClientToken) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.FilterInArns != nil { - objectKey := object.FlatKey("FilterInArn") - if err := awsEc2query_serializeDocumentArnList(v.FilterInArns, objectKey); err != nil { - return err - } - } - - if v.NetworkInsightsPathId != nil { - objectKey := object.Key("NetworkInsightsPathId") - objectKey.String(*v.NetworkInsightsPathId) - } - - if v.TagSpecifications != nil { - objectKey := object.FlatKey("TagSpecification") - if err := awsEc2query_serializeDocumentTagSpecificationList(v.TagSpecifications, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentStartVpcEndpointServicePrivateDnsVerificationInput(v *StartVpcEndpointServicePrivateDnsVerificationInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.ServiceId != nil { - objectKey := object.Key("ServiceId") - objectKey.String(*v.ServiceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentStopInstancesInput(v *StopInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Force != nil { - objectKey := object.Key("Force") - objectKey.Boolean(*v.Force) - } - - if v.Hibernate != nil { - objectKey := object.Key("Hibernate") - objectKey.Boolean(*v.Hibernate) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentTerminateClientVpnConnectionsInput(v *TerminateClientVpnConnectionsInput, value query.Value) error { - object := value.Object() - _ = object - - if v.ClientVpnEndpointId != nil { - objectKey := object.Key("ClientVpnEndpointId") - objectKey.String(*v.ClientVpnEndpointId) - } - - if v.ConnectionId != nil { - objectKey := object.Key("ConnectionId") - objectKey.String(*v.ConnectionId) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.Username != nil { - objectKey := object.Key("Username") - objectKey.String(*v.Username) - } - - return nil -} - -func awsEc2query_serializeOpDocumentTerminateInstancesInput(v *TerminateInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentUnassignIpv6AddressesInput(v *UnassignIpv6AddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv6Addresses != nil { - objectKey := object.FlatKey("Ipv6Addresses") - if err := awsEc2query_serializeDocumentIpv6AddressList(v.Ipv6Addresses, objectKey); err != nil { - return err - } - } - - if v.Ipv6Prefixes != nil { - objectKey := object.FlatKey("Ipv6Prefix") - if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv6Prefixes, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentUnassignPrivateIpAddressesInput(v *UnassignPrivateIpAddressesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Ipv4Prefixes != nil { - objectKey := object.FlatKey("Ipv4Prefix") - if err := awsEc2query_serializeDocumentIpPrefixList(v.Ipv4Prefixes, objectKey); err != nil { - return err - } - } - - if v.NetworkInterfaceId != nil { - objectKey := object.Key("NetworkInterfaceId") - objectKey.String(*v.NetworkInterfaceId) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddress") - if err := awsEc2query_serializeDocumentPrivateIpAddressStringList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentUnassignPrivateNatGatewayAddressInput(v *UnassignPrivateNatGatewayAddressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.MaxDrainDurationSeconds != nil { - objectKey := object.Key("MaxDrainDurationSeconds") - objectKey.Integer(*v.MaxDrainDurationSeconds) - } - - if v.NatGatewayId != nil { - objectKey := object.Key("NatGatewayId") - objectKey.String(*v.NatGatewayId) - } - - if v.PrivateIpAddresses != nil { - objectKey := object.FlatKey("PrivateIpAddress") - if err := awsEc2query_serializeDocumentIpList(v.PrivateIpAddresses, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentUnlockSnapshotInput(v *UnlockSnapshotInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.SnapshotId != nil { - objectKey := object.Key("SnapshotId") - objectKey.String(*v.SnapshotId) - } - - return nil -} - -func awsEc2query_serializeOpDocumentUnmonitorInstancesInput(v *UnmonitorInstancesInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.InstanceIds != nil { - objectKey := object.FlatKey("InstanceId") - if err := awsEc2query_serializeDocumentInstanceIdStringList(v.InstanceIds, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsEgressInput(v *UpdateSecurityGroupRuleDescriptionsEgressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.IpPermissions != nil { - objectKey := object.FlatKey("IpPermissions") - if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil { - return err - } - } - - if v.SecurityGroupRuleDescriptions != nil { - objectKey := object.FlatKey("SecurityGroupRuleDescription") - if err := awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v.SecurityGroupRuleDescriptions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentUpdateSecurityGroupRuleDescriptionsIngressInput(v *UpdateSecurityGroupRuleDescriptionsIngressInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - if v.GroupId != nil { - objectKey := object.Key("GroupId") - objectKey.String(*v.GroupId) - } - - if v.GroupName != nil { - objectKey := object.Key("GroupName") - objectKey.String(*v.GroupName) - } - - if v.IpPermissions != nil { - objectKey := object.FlatKey("IpPermissions") - if err := awsEc2query_serializeDocumentIpPermissionList(v.IpPermissions, objectKey); err != nil { - return err - } - } - - if v.SecurityGroupRuleDescriptions != nil { - objectKey := object.FlatKey("SecurityGroupRuleDescription") - if err := awsEc2query_serializeDocumentSecurityGroupRuleDescriptionList(v.SecurityGroupRuleDescriptions, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsEc2query_serializeOpDocumentWithdrawByoipCidrInput(v *WithdrawByoipCidrInput, value query.Value) error { - object := value.Object() - _ = object - - if v.Cidr != nil { - objectKey := object.Key("Cidr") - objectKey.String(*v.Cidr) - } - - if v.DryRun != nil { - objectKey := object.Key("DryRun") - objectKey.Boolean(*v.DryRun) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go deleted file mode 100644 index b9c15667c..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/enums.go +++ /dev/null @@ -1,8622 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -type AcceleratorManufacturer string - -// Enum values for AcceleratorManufacturer -const ( - AcceleratorManufacturerAmazonWebServices AcceleratorManufacturer = "amazon-web-services" - AcceleratorManufacturerAmd AcceleratorManufacturer = "amd" - AcceleratorManufacturerNvidia AcceleratorManufacturer = "nvidia" - AcceleratorManufacturerXilinx AcceleratorManufacturer = "xilinx" - AcceleratorManufacturerHabana AcceleratorManufacturer = "habana" -) - -// Values returns all known values for AcceleratorManufacturer. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AcceleratorManufacturer) Values() []AcceleratorManufacturer { - return []AcceleratorManufacturer{ - "amazon-web-services", - "amd", - "nvidia", - "xilinx", - "habana", - } -} - -type AcceleratorName string - -// Enum values for AcceleratorName -const ( - AcceleratorNameA100 AcceleratorName = "a100" - AcceleratorNameInferentia AcceleratorName = "inferentia" - AcceleratorNameK520 AcceleratorName = "k520" - AcceleratorNameK80 AcceleratorName = "k80" - AcceleratorNameM60 AcceleratorName = "m60" - AcceleratorNameRadeonProV520 AcceleratorName = "radeon-pro-v520" - AcceleratorNameT4 AcceleratorName = "t4" - AcceleratorNameVu9p AcceleratorName = "vu9p" - AcceleratorNameV100 AcceleratorName = "v100" - AcceleratorNameA10g AcceleratorName = "a10g" - AcceleratorNameH100 AcceleratorName = "h100" - AcceleratorNameT4g AcceleratorName = "t4g" -) - -// Values returns all known values for AcceleratorName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AcceleratorName) Values() []AcceleratorName { - return []AcceleratorName{ - "a100", - "inferentia", - "k520", - "k80", - "m60", - "radeon-pro-v520", - "t4", - "vu9p", - "v100", - "a10g", - "h100", - "t4g", - } -} - -type AcceleratorType string - -// Enum values for AcceleratorType -const ( - AcceleratorTypeGpu AcceleratorType = "gpu" - AcceleratorTypeFpga AcceleratorType = "fpga" - AcceleratorTypeInference AcceleratorType = "inference" -) - -// Values returns all known values for AcceleratorType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AcceleratorType) Values() []AcceleratorType { - return []AcceleratorType{ - "gpu", - "fpga", - "inference", - } -} - -type AccountAttributeName string - -// Enum values for AccountAttributeName -const ( - AccountAttributeNameSupportedPlatforms AccountAttributeName = "supported-platforms" - AccountAttributeNameDefaultVpc AccountAttributeName = "default-vpc" -) - -// Values returns all known values for AccountAttributeName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AccountAttributeName) Values() []AccountAttributeName { - return []AccountAttributeName{ - "supported-platforms", - "default-vpc", - } -} - -type ActivityStatus string - -// Enum values for ActivityStatus -const ( - ActivityStatusError ActivityStatus = "error" - ActivityStatusPendingFulfillment ActivityStatus = "pending_fulfillment" - ActivityStatusPendingTermination ActivityStatus = "pending_termination" - ActivityStatusFulfilled ActivityStatus = "fulfilled" -) - -// Values returns all known values for ActivityStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ActivityStatus) Values() []ActivityStatus { - return []ActivityStatus{ - "error", - "pending_fulfillment", - "pending_termination", - "fulfilled", - } -} - -type AddressAttributeName string - -// Enum values for AddressAttributeName -const ( - AddressAttributeNameDomainName AddressAttributeName = "domain-name" -) - -// Values returns all known values for AddressAttributeName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AddressAttributeName) Values() []AddressAttributeName { - return []AddressAttributeName{ - "domain-name", - } -} - -type AddressFamily string - -// Enum values for AddressFamily -const ( - AddressFamilyIpv4 AddressFamily = "ipv4" - AddressFamilyIpv6 AddressFamily = "ipv6" -) - -// Values returns all known values for AddressFamily. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AddressFamily) Values() []AddressFamily { - return []AddressFamily{ - "ipv4", - "ipv6", - } -} - -type AddressTransferStatus string - -// Enum values for AddressTransferStatus -const ( - AddressTransferStatusPending AddressTransferStatus = "pending" - AddressTransferStatusDisabled AddressTransferStatus = "disabled" - AddressTransferStatusAccepted AddressTransferStatus = "accepted" -) - -// Values returns all known values for AddressTransferStatus. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AddressTransferStatus) Values() []AddressTransferStatus { - return []AddressTransferStatus{ - "pending", - "disabled", - "accepted", - } -} - -type Affinity string - -// Enum values for Affinity -const ( - AffinityDefault Affinity = "default" - AffinityHost Affinity = "host" -) - -// Values returns all known values for Affinity. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (Affinity) Values() []Affinity { - return []Affinity{ - "default", - "host", - } -} - -type AllocationState string - -// Enum values for AllocationState -const ( - AllocationStateAvailable AllocationState = "available" - AllocationStateUnderAssessment AllocationState = "under-assessment" - AllocationStatePermanentFailure AllocationState = "permanent-failure" - AllocationStateReleased AllocationState = "released" - AllocationStateReleasedPermanentFailure AllocationState = "released-permanent-failure" - AllocationStatePending AllocationState = "pending" -) - -// Values returns all known values for AllocationState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AllocationState) Values() []AllocationState { - return []AllocationState{ - "available", - "under-assessment", - "permanent-failure", - "released", - "released-permanent-failure", - "pending", - } -} - -type AllocationStrategy string - -// Enum values for AllocationStrategy -const ( - AllocationStrategyLowestPrice AllocationStrategy = "lowestPrice" - AllocationStrategyDiversified AllocationStrategy = "diversified" - AllocationStrategyCapacityOptimized AllocationStrategy = "capacityOptimized" - AllocationStrategyCapacityOptimizedPrioritized AllocationStrategy = "capacityOptimizedPrioritized" - AllocationStrategyPriceCapacityOptimized AllocationStrategy = "priceCapacityOptimized" -) - -// Values returns all known values for AllocationStrategy. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AllocationStrategy) Values() []AllocationStrategy { - return []AllocationStrategy{ - "lowestPrice", - "diversified", - "capacityOptimized", - "capacityOptimizedPrioritized", - "priceCapacityOptimized", - } -} - -type AllocationType string - -// Enum values for AllocationType -const ( - AllocationTypeUsed AllocationType = "used" -) - -// Values returns all known values for AllocationType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AllocationType) Values() []AllocationType { - return []AllocationType{ - "used", - } -} - -type AllowsMultipleInstanceTypes string - -// Enum values for AllowsMultipleInstanceTypes -const ( - AllowsMultipleInstanceTypesOn AllowsMultipleInstanceTypes = "on" - AllowsMultipleInstanceTypesOff AllowsMultipleInstanceTypes = "off" -) - -// Values returns all known values for AllowsMultipleInstanceTypes. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (AllowsMultipleInstanceTypes) Values() []AllowsMultipleInstanceTypes { - return []AllowsMultipleInstanceTypes{ - "on", - "off", - } -} - -type AmdSevSnpSpecification string - -// Enum values for AmdSevSnpSpecification -const ( - AmdSevSnpSpecificationEnabled AmdSevSnpSpecification = "enabled" - AmdSevSnpSpecificationDisabled AmdSevSnpSpecification = "disabled" -) - -// Values returns all known values for AmdSevSnpSpecification. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AmdSevSnpSpecification) Values() []AmdSevSnpSpecification { - return []AmdSevSnpSpecification{ - "enabled", - "disabled", - } -} - -type AnalysisStatus string - -// Enum values for AnalysisStatus -const ( - AnalysisStatusRunning AnalysisStatus = "running" - AnalysisStatusSucceeded AnalysisStatus = "succeeded" - AnalysisStatusFailed AnalysisStatus = "failed" -) - -// Values returns all known values for AnalysisStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AnalysisStatus) Values() []AnalysisStatus { - return []AnalysisStatus{ - "running", - "succeeded", - "failed", - } -} - -type ApplianceModeSupportValue string - -// Enum values for ApplianceModeSupportValue -const ( - ApplianceModeSupportValueEnable ApplianceModeSupportValue = "enable" - ApplianceModeSupportValueDisable ApplianceModeSupportValue = "disable" -) - -// Values returns all known values for ApplianceModeSupportValue. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ApplianceModeSupportValue) Values() []ApplianceModeSupportValue { - return []ApplianceModeSupportValue{ - "enable", - "disable", - } -} - -type ArchitectureType string - -// Enum values for ArchitectureType -const ( - ArchitectureTypeI386 ArchitectureType = "i386" - ArchitectureTypeX8664 ArchitectureType = "x86_64" - ArchitectureTypeArm64 ArchitectureType = "arm64" - ArchitectureTypeX8664Mac ArchitectureType = "x86_64_mac" - ArchitectureTypeArm64Mac ArchitectureType = "arm64_mac" -) - -// Values returns all known values for ArchitectureType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ArchitectureType) Values() []ArchitectureType { - return []ArchitectureType{ - "i386", - "x86_64", - "arm64", - "x86_64_mac", - "arm64_mac", - } -} - -type ArchitectureValues string - -// Enum values for ArchitectureValues -const ( - ArchitectureValuesI386 ArchitectureValues = "i386" - ArchitectureValuesX8664 ArchitectureValues = "x86_64" - ArchitectureValuesArm64 ArchitectureValues = "arm64" - ArchitectureValuesX8664Mac ArchitectureValues = "x86_64_mac" - ArchitectureValuesArm64Mac ArchitectureValues = "arm64_mac" -) - -// Values returns all known values for ArchitectureValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ArchitectureValues) Values() []ArchitectureValues { - return []ArchitectureValues{ - "i386", - "x86_64", - "arm64", - "x86_64_mac", - "arm64_mac", - } -} - -type AsnAssociationState string - -// Enum values for AsnAssociationState -const ( - AsnAssociationStateDisassociated AsnAssociationState = "disassociated" - AsnAssociationStateFailedDisassociation AsnAssociationState = "failed-disassociation" - AsnAssociationStateFailedAssociation AsnAssociationState = "failed-association" - AsnAssociationStatePendingDisassociation AsnAssociationState = "pending-disassociation" - AsnAssociationStatePendingAssociation AsnAssociationState = "pending-association" - AsnAssociationStateAssociated AsnAssociationState = "associated" -) - -// Values returns all known values for AsnAssociationState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AsnAssociationState) Values() []AsnAssociationState { - return []AsnAssociationState{ - "disassociated", - "failed-disassociation", - "failed-association", - "pending-disassociation", - "pending-association", - "associated", - } -} - -type AsnState string - -// Enum values for AsnState -const ( - AsnStateDeprovisioned AsnState = "deprovisioned" - AsnStateFailedDeprovision AsnState = "failed-deprovision" - AsnStateFailedProvision AsnState = "failed-provision" - AsnStatePendingDeprovision AsnState = "pending-deprovision" - AsnStatePendingProvision AsnState = "pending-provision" - AsnStateProvisioned AsnState = "provisioned" -) - -// Values returns all known values for AsnState. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (AsnState) Values() []AsnState { - return []AsnState{ - "deprovisioned", - "failed-deprovision", - "failed-provision", - "pending-deprovision", - "pending-provision", - "provisioned", - } -} - -type AssociatedNetworkType string - -// Enum values for AssociatedNetworkType -const ( - AssociatedNetworkTypeVpc AssociatedNetworkType = "vpc" -) - -// Values returns all known values for AssociatedNetworkType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AssociatedNetworkType) Values() []AssociatedNetworkType { - return []AssociatedNetworkType{ - "vpc", - } -} - -type AssociationStatusCode string - -// Enum values for AssociationStatusCode -const ( - AssociationStatusCodeAssociating AssociationStatusCode = "associating" - AssociationStatusCodeAssociated AssociationStatusCode = "associated" - AssociationStatusCodeAssociationFailed AssociationStatusCode = "association-failed" - AssociationStatusCodeDisassociating AssociationStatusCode = "disassociating" - AssociationStatusCodeDisassociated AssociationStatusCode = "disassociated" -) - -// Values returns all known values for AssociationStatusCode. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AssociationStatusCode) Values() []AssociationStatusCode { - return []AssociationStatusCode{ - "associating", - "associated", - "association-failed", - "disassociating", - "disassociated", - } -} - -type AttachmentStatus string - -// Enum values for AttachmentStatus -const ( - AttachmentStatusAttaching AttachmentStatus = "attaching" - AttachmentStatusAttached AttachmentStatus = "attached" - AttachmentStatusDetaching AttachmentStatus = "detaching" - AttachmentStatusDetached AttachmentStatus = "detached" -) - -// Values returns all known values for AttachmentStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AttachmentStatus) Values() []AttachmentStatus { - return []AttachmentStatus{ - "attaching", - "attached", - "detaching", - "detached", - } -} - -type AutoAcceptSharedAssociationsValue string - -// Enum values for AutoAcceptSharedAssociationsValue -const ( - AutoAcceptSharedAssociationsValueEnable AutoAcceptSharedAssociationsValue = "enable" - AutoAcceptSharedAssociationsValueDisable AutoAcceptSharedAssociationsValue = "disable" -) - -// Values returns all known values for AutoAcceptSharedAssociationsValue. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (AutoAcceptSharedAssociationsValue) Values() []AutoAcceptSharedAssociationsValue { - return []AutoAcceptSharedAssociationsValue{ - "enable", - "disable", - } -} - -type AutoAcceptSharedAttachmentsValue string - -// Enum values for AutoAcceptSharedAttachmentsValue -const ( - AutoAcceptSharedAttachmentsValueEnable AutoAcceptSharedAttachmentsValue = "enable" - AutoAcceptSharedAttachmentsValueDisable AutoAcceptSharedAttachmentsValue = "disable" -) - -// Values returns all known values for AutoAcceptSharedAttachmentsValue. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (AutoAcceptSharedAttachmentsValue) Values() []AutoAcceptSharedAttachmentsValue { - return []AutoAcceptSharedAttachmentsValue{ - "enable", - "disable", - } -} - -type AutoPlacement string - -// Enum values for AutoPlacement -const ( - AutoPlacementOn AutoPlacement = "on" - AutoPlacementOff AutoPlacement = "off" -) - -// Values returns all known values for AutoPlacement. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AutoPlacement) Values() []AutoPlacement { - return []AutoPlacement{ - "on", - "off", - } -} - -type AvailabilityZoneOptInStatus string - -// Enum values for AvailabilityZoneOptInStatus -const ( - AvailabilityZoneOptInStatusOptInNotRequired AvailabilityZoneOptInStatus = "opt-in-not-required" - AvailabilityZoneOptInStatusOptedIn AvailabilityZoneOptInStatus = "opted-in" - AvailabilityZoneOptInStatusNotOptedIn AvailabilityZoneOptInStatus = "not-opted-in" -) - -// Values returns all known values for AvailabilityZoneOptInStatus. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (AvailabilityZoneOptInStatus) Values() []AvailabilityZoneOptInStatus { - return []AvailabilityZoneOptInStatus{ - "opt-in-not-required", - "opted-in", - "not-opted-in", - } -} - -type AvailabilityZoneState string - -// Enum values for AvailabilityZoneState -const ( - AvailabilityZoneStateAvailable AvailabilityZoneState = "available" - AvailabilityZoneStateInformation AvailabilityZoneState = "information" - AvailabilityZoneStateImpaired AvailabilityZoneState = "impaired" - AvailabilityZoneStateUnavailable AvailabilityZoneState = "unavailable" - AvailabilityZoneStateConstrained AvailabilityZoneState = "constrained" -) - -// Values returns all known values for AvailabilityZoneState. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (AvailabilityZoneState) Values() []AvailabilityZoneState { - return []AvailabilityZoneState{ - "available", - "information", - "impaired", - "unavailable", - "constrained", - } -} - -type BareMetal string - -// Enum values for BareMetal -const ( - BareMetalIncluded BareMetal = "included" - BareMetalRequired BareMetal = "required" - BareMetalExcluded BareMetal = "excluded" -) - -// Values returns all known values for BareMetal. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (BareMetal) Values() []BareMetal { - return []BareMetal{ - "included", - "required", - "excluded", - } -} - -type BatchState string - -// Enum values for BatchState -const ( - BatchStateSubmitted BatchState = "submitted" - BatchStateActive BatchState = "active" - BatchStateCancelled BatchState = "cancelled" - BatchStateFailed BatchState = "failed" - BatchStateCancelledRunning BatchState = "cancelled_running" - BatchStateCancelledTerminatingInstances BatchState = "cancelled_terminating" - BatchStateModifying BatchState = "modifying" -) - -// Values returns all known values for BatchState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (BatchState) Values() []BatchState { - return []BatchState{ - "submitted", - "active", - "cancelled", - "failed", - "cancelled_running", - "cancelled_terminating", - "modifying", - } -} - -type BgpStatus string - -// Enum values for BgpStatus -const ( - BgpStatusUp BgpStatus = "up" - BgpStatusDown BgpStatus = "down" -) - -// Values returns all known values for BgpStatus. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (BgpStatus) Values() []BgpStatus { - return []BgpStatus{ - "up", - "down", - } -} - -type BootModeType string - -// Enum values for BootModeType -const ( - BootModeTypeLegacyBios BootModeType = "legacy-bios" - BootModeTypeUefi BootModeType = "uefi" -) - -// Values returns all known values for BootModeType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (BootModeType) Values() []BootModeType { - return []BootModeType{ - "legacy-bios", - "uefi", - } -} - -type BootModeValues string - -// Enum values for BootModeValues -const ( - BootModeValuesLegacyBios BootModeValues = "legacy-bios" - BootModeValuesUefi BootModeValues = "uefi" - BootModeValuesUefiPreferred BootModeValues = "uefi-preferred" -) - -// Values returns all known values for BootModeValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (BootModeValues) Values() []BootModeValues { - return []BootModeValues{ - "legacy-bios", - "uefi", - "uefi-preferred", - } -} - -type BundleTaskState string - -// Enum values for BundleTaskState -const ( - BundleTaskStatePending BundleTaskState = "pending" - BundleTaskStateWaitingForShutdown BundleTaskState = "waiting-for-shutdown" - BundleTaskStateBundling BundleTaskState = "bundling" - BundleTaskStateStoring BundleTaskState = "storing" - BundleTaskStateCancelling BundleTaskState = "cancelling" - BundleTaskStateComplete BundleTaskState = "complete" - BundleTaskStateFailed BundleTaskState = "failed" -) - -// Values returns all known values for BundleTaskState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (BundleTaskState) Values() []BundleTaskState { - return []BundleTaskState{ - "pending", - "waiting-for-shutdown", - "bundling", - "storing", - "cancelling", - "complete", - "failed", - } -} - -type BurstablePerformance string - -// Enum values for BurstablePerformance -const ( - BurstablePerformanceIncluded BurstablePerformance = "included" - BurstablePerformanceRequired BurstablePerformance = "required" - BurstablePerformanceExcluded BurstablePerformance = "excluded" -) - -// Values returns all known values for BurstablePerformance. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (BurstablePerformance) Values() []BurstablePerformance { - return []BurstablePerformance{ - "included", - "required", - "excluded", - } -} - -type ByoipCidrState string - -// Enum values for ByoipCidrState -const ( - ByoipCidrStateAdvertised ByoipCidrState = "advertised" - ByoipCidrStateDeprovisioned ByoipCidrState = "deprovisioned" - ByoipCidrStateFailedDeprovision ByoipCidrState = "failed-deprovision" - ByoipCidrStateFailedProvision ByoipCidrState = "failed-provision" - ByoipCidrStatePendingDeprovision ByoipCidrState = "pending-deprovision" - ByoipCidrStatePendingProvision ByoipCidrState = "pending-provision" - ByoipCidrStateProvisioned ByoipCidrState = "provisioned" - ByoipCidrStateProvisionedNotPubliclyAdvertisable ByoipCidrState = "provisioned-not-publicly-advertisable" -) - -// Values returns all known values for ByoipCidrState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ByoipCidrState) Values() []ByoipCidrState { - return []ByoipCidrState{ - "advertised", - "deprovisioned", - "failed-deprovision", - "failed-provision", - "pending-deprovision", - "pending-provision", - "provisioned", - "provisioned-not-publicly-advertisable", - } -} - -type CancelBatchErrorCode string - -// Enum values for CancelBatchErrorCode -const ( - CancelBatchErrorCodeFleetRequestIdDoesNotExist CancelBatchErrorCode = "fleetRequestIdDoesNotExist" - CancelBatchErrorCodeFleetRequestIdMalformed CancelBatchErrorCode = "fleetRequestIdMalformed" - CancelBatchErrorCodeFleetRequestNotInCancellableState CancelBatchErrorCode = "fleetRequestNotInCancellableState" - CancelBatchErrorCodeUnexpectedError CancelBatchErrorCode = "unexpectedError" -) - -// Values returns all known values for CancelBatchErrorCode. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (CancelBatchErrorCode) Values() []CancelBatchErrorCode { - return []CancelBatchErrorCode{ - "fleetRequestIdDoesNotExist", - "fleetRequestIdMalformed", - "fleetRequestNotInCancellableState", - "unexpectedError", - } -} - -type CancelSpotInstanceRequestState string - -// Enum values for CancelSpotInstanceRequestState -const ( - CancelSpotInstanceRequestStateActive CancelSpotInstanceRequestState = "active" - CancelSpotInstanceRequestStateOpen CancelSpotInstanceRequestState = "open" - CancelSpotInstanceRequestStateClosed CancelSpotInstanceRequestState = "closed" - CancelSpotInstanceRequestStateCancelled CancelSpotInstanceRequestState = "cancelled" - CancelSpotInstanceRequestStateCompleted CancelSpotInstanceRequestState = "completed" -) - -// Values returns all known values for CancelSpotInstanceRequestState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (CancelSpotInstanceRequestState) Values() []CancelSpotInstanceRequestState { - return []CancelSpotInstanceRequestState{ - "active", - "open", - "closed", - "cancelled", - "completed", - } -} - -type CapacityReservationFleetState string - -// Enum values for CapacityReservationFleetState -const ( - CapacityReservationFleetStateSubmitted CapacityReservationFleetState = "submitted" - CapacityReservationFleetStateModifying CapacityReservationFleetState = "modifying" - CapacityReservationFleetStateActive CapacityReservationFleetState = "active" - CapacityReservationFleetStatePartiallyFulfilled CapacityReservationFleetState = "partially_fulfilled" - CapacityReservationFleetStateExpiring CapacityReservationFleetState = "expiring" - CapacityReservationFleetStateExpired CapacityReservationFleetState = "expired" - CapacityReservationFleetStateCancelling CapacityReservationFleetState = "cancelling" - CapacityReservationFleetStateCancelled CapacityReservationFleetState = "cancelled" - CapacityReservationFleetStateFailed CapacityReservationFleetState = "failed" -) - -// Values returns all known values for CapacityReservationFleetState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (CapacityReservationFleetState) Values() []CapacityReservationFleetState { - return []CapacityReservationFleetState{ - "submitted", - "modifying", - "active", - "partially_fulfilled", - "expiring", - "expired", - "cancelling", - "cancelled", - "failed", - } -} - -type CapacityReservationInstancePlatform string - -// Enum values for CapacityReservationInstancePlatform -const ( - CapacityReservationInstancePlatformLinuxUnix CapacityReservationInstancePlatform = "Linux/UNIX" - CapacityReservationInstancePlatformRedHatEnterpriseLinux CapacityReservationInstancePlatform = "Red Hat Enterprise Linux" - CapacityReservationInstancePlatformSuseLinux CapacityReservationInstancePlatform = "SUSE Linux" - CapacityReservationInstancePlatformWindows CapacityReservationInstancePlatform = "Windows" - CapacityReservationInstancePlatformWindowsWithSqlServer CapacityReservationInstancePlatform = "Windows with SQL Server" - CapacityReservationInstancePlatformWindowsWithSqlServerEnterprise CapacityReservationInstancePlatform = "Windows with SQL Server Enterprise" - CapacityReservationInstancePlatformWindowsWithSqlServerStandard CapacityReservationInstancePlatform = "Windows with SQL Server Standard" - CapacityReservationInstancePlatformWindowsWithSqlServerWeb CapacityReservationInstancePlatform = "Windows with SQL Server Web" - CapacityReservationInstancePlatformLinuxWithSqlServerStandard CapacityReservationInstancePlatform = "Linux with SQL Server Standard" - CapacityReservationInstancePlatformLinuxWithSqlServerWeb CapacityReservationInstancePlatform = "Linux with SQL Server Web" - CapacityReservationInstancePlatformLinuxWithSqlServerEnterprise CapacityReservationInstancePlatform = "Linux with SQL Server Enterprise" - CapacityReservationInstancePlatformRhelWithSqlServerStandard CapacityReservationInstancePlatform = "RHEL with SQL Server Standard" - CapacityReservationInstancePlatformRhelWithSqlServerEnterprise CapacityReservationInstancePlatform = "RHEL with SQL Server Enterprise" - CapacityReservationInstancePlatformRhelWithSqlServerWeb CapacityReservationInstancePlatform = "RHEL with SQL Server Web" - CapacityReservationInstancePlatformRhelWithHa CapacityReservationInstancePlatform = "RHEL with HA" - CapacityReservationInstancePlatformRhelWithHaAndSqlServerStandard CapacityReservationInstancePlatform = "RHEL with HA and SQL Server Standard" - CapacityReservationInstancePlatformRhelWithHaAndSqlServerEnterprise CapacityReservationInstancePlatform = "RHEL with HA and SQL Server Enterprise" - CapacityReservationInstancePlatformUbuntuProLinux CapacityReservationInstancePlatform = "Ubuntu Pro" -) - -// Values returns all known values for CapacityReservationInstancePlatform. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (CapacityReservationInstancePlatform) Values() []CapacityReservationInstancePlatform { - return []CapacityReservationInstancePlatform{ - "Linux/UNIX", - "Red Hat Enterprise Linux", - "SUSE Linux", - "Windows", - "Windows with SQL Server", - "Windows with SQL Server Enterprise", - "Windows with SQL Server Standard", - "Windows with SQL Server Web", - "Linux with SQL Server Standard", - "Linux with SQL Server Web", - "Linux with SQL Server Enterprise", - "RHEL with SQL Server Standard", - "RHEL with SQL Server Enterprise", - "RHEL with SQL Server Web", - "RHEL with HA", - "RHEL with HA and SQL Server Standard", - "RHEL with HA and SQL Server Enterprise", - "Ubuntu Pro", - } -} - -type CapacityReservationPreference string - -// Enum values for CapacityReservationPreference -const ( - CapacityReservationPreferenceOpen CapacityReservationPreference = "open" - CapacityReservationPreferenceNone CapacityReservationPreference = "none" -) - -// Values returns all known values for CapacityReservationPreference. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (CapacityReservationPreference) Values() []CapacityReservationPreference { - return []CapacityReservationPreference{ - "open", - "none", - } -} - -type CapacityReservationState string - -// Enum values for CapacityReservationState -const ( - CapacityReservationStateActive CapacityReservationState = "active" - CapacityReservationStateExpired CapacityReservationState = "expired" - CapacityReservationStateCancelled CapacityReservationState = "cancelled" - CapacityReservationStatePending CapacityReservationState = "pending" - CapacityReservationStateFailed CapacityReservationState = "failed" - CapacityReservationStateScheduled CapacityReservationState = "scheduled" - CapacityReservationStatePaymentPending CapacityReservationState = "payment-pending" - CapacityReservationStatePaymentFailed CapacityReservationState = "payment-failed" -) - -// Values returns all known values for CapacityReservationState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (CapacityReservationState) Values() []CapacityReservationState { - return []CapacityReservationState{ - "active", - "expired", - "cancelled", - "pending", - "failed", - "scheduled", - "payment-pending", - "payment-failed", - } -} - -type CapacityReservationTenancy string - -// Enum values for CapacityReservationTenancy -const ( - CapacityReservationTenancyDefault CapacityReservationTenancy = "default" - CapacityReservationTenancyDedicated CapacityReservationTenancy = "dedicated" -) - -// Values returns all known values for CapacityReservationTenancy. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (CapacityReservationTenancy) Values() []CapacityReservationTenancy { - return []CapacityReservationTenancy{ - "default", - "dedicated", - } -} - -type CapacityReservationType string - -// Enum values for CapacityReservationType -const ( - CapacityReservationTypeDefault CapacityReservationType = "default" - CapacityReservationTypeCapacityBlock CapacityReservationType = "capacity-block" -) - -// Values returns all known values for CapacityReservationType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (CapacityReservationType) Values() []CapacityReservationType { - return []CapacityReservationType{ - "default", - "capacity-block", - } -} - -type CarrierGatewayState string - -// Enum values for CarrierGatewayState -const ( - CarrierGatewayStatePending CarrierGatewayState = "pending" - CarrierGatewayStateAvailable CarrierGatewayState = "available" - CarrierGatewayStateDeleting CarrierGatewayState = "deleting" - CarrierGatewayStateDeleted CarrierGatewayState = "deleted" -) - -// Values returns all known values for CarrierGatewayState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (CarrierGatewayState) Values() []CarrierGatewayState { - return []CarrierGatewayState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type ClientCertificateRevocationListStatusCode string - -// Enum values for ClientCertificateRevocationListStatusCode -const ( - ClientCertificateRevocationListStatusCodePending ClientCertificateRevocationListStatusCode = "pending" - ClientCertificateRevocationListStatusCodeActive ClientCertificateRevocationListStatusCode = "active" -) - -// Values returns all known values for ClientCertificateRevocationListStatusCode. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ClientCertificateRevocationListStatusCode) Values() []ClientCertificateRevocationListStatusCode { - return []ClientCertificateRevocationListStatusCode{ - "pending", - "active", - } -} - -type ClientVpnAuthenticationType string - -// Enum values for ClientVpnAuthenticationType -const ( - ClientVpnAuthenticationTypeCertificateAuthentication ClientVpnAuthenticationType = "certificate-authentication" - ClientVpnAuthenticationTypeDirectoryServiceAuthentication ClientVpnAuthenticationType = "directory-service-authentication" - ClientVpnAuthenticationTypeFederatedAuthentication ClientVpnAuthenticationType = "federated-authentication" -) - -// Values returns all known values for ClientVpnAuthenticationType. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ClientVpnAuthenticationType) Values() []ClientVpnAuthenticationType { - return []ClientVpnAuthenticationType{ - "certificate-authentication", - "directory-service-authentication", - "federated-authentication", - } -} - -type ClientVpnAuthorizationRuleStatusCode string - -// Enum values for ClientVpnAuthorizationRuleStatusCode -const ( - ClientVpnAuthorizationRuleStatusCodeAuthorizing ClientVpnAuthorizationRuleStatusCode = "authorizing" - ClientVpnAuthorizationRuleStatusCodeActive ClientVpnAuthorizationRuleStatusCode = "active" - ClientVpnAuthorizationRuleStatusCodeFailed ClientVpnAuthorizationRuleStatusCode = "failed" - ClientVpnAuthorizationRuleStatusCodeRevoking ClientVpnAuthorizationRuleStatusCode = "revoking" -) - -// Values returns all known values for ClientVpnAuthorizationRuleStatusCode. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ClientVpnAuthorizationRuleStatusCode) Values() []ClientVpnAuthorizationRuleStatusCode { - return []ClientVpnAuthorizationRuleStatusCode{ - "authorizing", - "active", - "failed", - "revoking", - } -} - -type ClientVpnConnectionStatusCode string - -// Enum values for ClientVpnConnectionStatusCode -const ( - ClientVpnConnectionStatusCodeActive ClientVpnConnectionStatusCode = "active" - ClientVpnConnectionStatusCodeFailedToTerminate ClientVpnConnectionStatusCode = "failed-to-terminate" - ClientVpnConnectionStatusCodeTerminating ClientVpnConnectionStatusCode = "terminating" - ClientVpnConnectionStatusCodeTerminated ClientVpnConnectionStatusCode = "terminated" -) - -// Values returns all known values for ClientVpnConnectionStatusCode. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ClientVpnConnectionStatusCode) Values() []ClientVpnConnectionStatusCode { - return []ClientVpnConnectionStatusCode{ - "active", - "failed-to-terminate", - "terminating", - "terminated", - } -} - -type ClientVpnEndpointAttributeStatusCode string - -// Enum values for ClientVpnEndpointAttributeStatusCode -const ( - ClientVpnEndpointAttributeStatusCodeApplying ClientVpnEndpointAttributeStatusCode = "applying" - ClientVpnEndpointAttributeStatusCodeApplied ClientVpnEndpointAttributeStatusCode = "applied" -) - -// Values returns all known values for ClientVpnEndpointAttributeStatusCode. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ClientVpnEndpointAttributeStatusCode) Values() []ClientVpnEndpointAttributeStatusCode { - return []ClientVpnEndpointAttributeStatusCode{ - "applying", - "applied", - } -} - -type ClientVpnEndpointStatusCode string - -// Enum values for ClientVpnEndpointStatusCode -const ( - ClientVpnEndpointStatusCodePendingAssociate ClientVpnEndpointStatusCode = "pending-associate" - ClientVpnEndpointStatusCodeAvailable ClientVpnEndpointStatusCode = "available" - ClientVpnEndpointStatusCodeDeleting ClientVpnEndpointStatusCode = "deleting" - ClientVpnEndpointStatusCodeDeleted ClientVpnEndpointStatusCode = "deleted" -) - -// Values returns all known values for ClientVpnEndpointStatusCode. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ClientVpnEndpointStatusCode) Values() []ClientVpnEndpointStatusCode { - return []ClientVpnEndpointStatusCode{ - "pending-associate", - "available", - "deleting", - "deleted", - } -} - -type ClientVpnRouteStatusCode string - -// Enum values for ClientVpnRouteStatusCode -const ( - ClientVpnRouteStatusCodeCreating ClientVpnRouteStatusCode = "creating" - ClientVpnRouteStatusCodeActive ClientVpnRouteStatusCode = "active" - ClientVpnRouteStatusCodeFailed ClientVpnRouteStatusCode = "failed" - ClientVpnRouteStatusCodeDeleting ClientVpnRouteStatusCode = "deleting" -) - -// Values returns all known values for ClientVpnRouteStatusCode. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ClientVpnRouteStatusCode) Values() []ClientVpnRouteStatusCode { - return []ClientVpnRouteStatusCode{ - "creating", - "active", - "failed", - "deleting", - } -} - -type ConnectionNotificationState string - -// Enum values for ConnectionNotificationState -const ( - ConnectionNotificationStateEnabled ConnectionNotificationState = "Enabled" - ConnectionNotificationStateDisabled ConnectionNotificationState = "Disabled" -) - -// Values returns all known values for ConnectionNotificationState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ConnectionNotificationState) Values() []ConnectionNotificationState { - return []ConnectionNotificationState{ - "Enabled", - "Disabled", - } -} - -type ConnectionNotificationType string - -// Enum values for ConnectionNotificationType -const ( - ConnectionNotificationTypeTopic ConnectionNotificationType = "Topic" -) - -// Values returns all known values for ConnectionNotificationType. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ConnectionNotificationType) Values() []ConnectionNotificationType { - return []ConnectionNotificationType{ - "Topic", - } -} - -type ConnectivityType string - -// Enum values for ConnectivityType -const ( - ConnectivityTypePrivate ConnectivityType = "private" - ConnectivityTypePublic ConnectivityType = "public" -) - -// Values returns all known values for ConnectivityType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ConnectivityType) Values() []ConnectivityType { - return []ConnectivityType{ - "private", - "public", - } -} - -type ContainerFormat string - -// Enum values for ContainerFormat -const ( - ContainerFormatOva ContainerFormat = "ova" -) - -// Values returns all known values for ContainerFormat. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ContainerFormat) Values() []ContainerFormat { - return []ContainerFormat{ - "ova", - } -} - -type ConversionTaskState string - -// Enum values for ConversionTaskState -const ( - ConversionTaskStateActive ConversionTaskState = "active" - ConversionTaskStateCancelling ConversionTaskState = "cancelling" - ConversionTaskStateCancelled ConversionTaskState = "cancelled" - ConversionTaskStateCompleted ConversionTaskState = "completed" -) - -// Values returns all known values for ConversionTaskState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ConversionTaskState) Values() []ConversionTaskState { - return []ConversionTaskState{ - "active", - "cancelling", - "cancelled", - "completed", - } -} - -type CopyTagsFromSource string - -// Enum values for CopyTagsFromSource -const ( - CopyTagsFromSourceVolume CopyTagsFromSource = "volume" -) - -// Values returns all known values for CopyTagsFromSource. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (CopyTagsFromSource) Values() []CopyTagsFromSource { - return []CopyTagsFromSource{ - "volume", - } -} - -type CpuManufacturer string - -// Enum values for CpuManufacturer -const ( - CpuManufacturerIntel CpuManufacturer = "intel" - CpuManufacturerAmd CpuManufacturer = "amd" - CpuManufacturerAmazonWebServices CpuManufacturer = "amazon-web-services" -) - -// Values returns all known values for CpuManufacturer. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (CpuManufacturer) Values() []CpuManufacturer { - return []CpuManufacturer{ - "intel", - "amd", - "amazon-web-services", - } -} - -type CurrencyCodeValues string - -// Enum values for CurrencyCodeValues -const ( - CurrencyCodeValuesUsd CurrencyCodeValues = "USD" -) - -// Values returns all known values for CurrencyCodeValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (CurrencyCodeValues) Values() []CurrencyCodeValues { - return []CurrencyCodeValues{ - "USD", - } -} - -type DatafeedSubscriptionState string - -// Enum values for DatafeedSubscriptionState -const ( - DatafeedSubscriptionStateActive DatafeedSubscriptionState = "Active" - DatafeedSubscriptionStateInactive DatafeedSubscriptionState = "Inactive" -) - -// Values returns all known values for DatafeedSubscriptionState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (DatafeedSubscriptionState) Values() []DatafeedSubscriptionState { - return []DatafeedSubscriptionState{ - "Active", - "Inactive", - } -} - -type DefaultRouteTableAssociationValue string - -// Enum values for DefaultRouteTableAssociationValue -const ( - DefaultRouteTableAssociationValueEnable DefaultRouteTableAssociationValue = "enable" - DefaultRouteTableAssociationValueDisable DefaultRouteTableAssociationValue = "disable" -) - -// Values returns all known values for DefaultRouteTableAssociationValue. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (DefaultRouteTableAssociationValue) Values() []DefaultRouteTableAssociationValue { - return []DefaultRouteTableAssociationValue{ - "enable", - "disable", - } -} - -type DefaultRouteTablePropagationValue string - -// Enum values for DefaultRouteTablePropagationValue -const ( - DefaultRouteTablePropagationValueEnable DefaultRouteTablePropagationValue = "enable" - DefaultRouteTablePropagationValueDisable DefaultRouteTablePropagationValue = "disable" -) - -// Values returns all known values for DefaultRouteTablePropagationValue. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (DefaultRouteTablePropagationValue) Values() []DefaultRouteTablePropagationValue { - return []DefaultRouteTablePropagationValue{ - "enable", - "disable", - } -} - -type DefaultTargetCapacityType string - -// Enum values for DefaultTargetCapacityType -const ( - DefaultTargetCapacityTypeSpot DefaultTargetCapacityType = "spot" - DefaultTargetCapacityTypeOnDemand DefaultTargetCapacityType = "on-demand" - DefaultTargetCapacityTypeCapacityBlock DefaultTargetCapacityType = "capacity-block" -) - -// Values returns all known values for DefaultTargetCapacityType. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (DefaultTargetCapacityType) Values() []DefaultTargetCapacityType { - return []DefaultTargetCapacityType{ - "spot", - "on-demand", - "capacity-block", - } -} - -type DeleteFleetErrorCode string - -// Enum values for DeleteFleetErrorCode -const ( - DeleteFleetErrorCodeFleetIdDoesNotExist DeleteFleetErrorCode = "fleetIdDoesNotExist" - DeleteFleetErrorCodeFleetIdMalformed DeleteFleetErrorCode = "fleetIdMalformed" - DeleteFleetErrorCodeFleetNotInDeletableState DeleteFleetErrorCode = "fleetNotInDeletableState" - DeleteFleetErrorCodeUnexpectedError DeleteFleetErrorCode = "unexpectedError" -) - -// Values returns all known values for DeleteFleetErrorCode. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DeleteFleetErrorCode) Values() []DeleteFleetErrorCode { - return []DeleteFleetErrorCode{ - "fleetIdDoesNotExist", - "fleetIdMalformed", - "fleetNotInDeletableState", - "unexpectedError", - } -} - -type DeleteQueuedReservedInstancesErrorCode string - -// Enum values for DeleteQueuedReservedInstancesErrorCode -const ( - DeleteQueuedReservedInstancesErrorCodeReservedInstancesIdInvalid DeleteQueuedReservedInstancesErrorCode = "reserved-instances-id-invalid" - DeleteQueuedReservedInstancesErrorCodeReservedInstancesNotInQueuedState DeleteQueuedReservedInstancesErrorCode = "reserved-instances-not-in-queued-state" - DeleteQueuedReservedInstancesErrorCodeUnexpectedError DeleteQueuedReservedInstancesErrorCode = "unexpected-error" -) - -// Values returns all known values for DeleteQueuedReservedInstancesErrorCode. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (DeleteQueuedReservedInstancesErrorCode) Values() []DeleteQueuedReservedInstancesErrorCode { - return []DeleteQueuedReservedInstancesErrorCode{ - "reserved-instances-id-invalid", - "reserved-instances-not-in-queued-state", - "unexpected-error", - } -} - -type DestinationFileFormat string - -// Enum values for DestinationFileFormat -const ( - DestinationFileFormatPlainText DestinationFileFormat = "plain-text" - DestinationFileFormatParquet DestinationFileFormat = "parquet" -) - -// Values returns all known values for DestinationFileFormat. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DestinationFileFormat) Values() []DestinationFileFormat { - return []DestinationFileFormat{ - "plain-text", - "parquet", - } -} - -type DeviceTrustProviderType string - -// Enum values for DeviceTrustProviderType -const ( - DeviceTrustProviderTypeJamf DeviceTrustProviderType = "jamf" - DeviceTrustProviderTypeCrowdstrike DeviceTrustProviderType = "crowdstrike" - DeviceTrustProviderTypeJumpcloud DeviceTrustProviderType = "jumpcloud" -) - -// Values returns all known values for DeviceTrustProviderType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DeviceTrustProviderType) Values() []DeviceTrustProviderType { - return []DeviceTrustProviderType{ - "jamf", - "crowdstrike", - "jumpcloud", - } -} - -type DeviceType string - -// Enum values for DeviceType -const ( - DeviceTypeEbs DeviceType = "ebs" - DeviceTypeInstanceStore DeviceType = "instance-store" -) - -// Values returns all known values for DeviceType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (DeviceType) Values() []DeviceType { - return []DeviceType{ - "ebs", - "instance-store", - } -} - -type DiskImageFormat string - -// Enum values for DiskImageFormat -const ( - DiskImageFormatVmdk DiskImageFormat = "VMDK" - DiskImageFormatRaw DiskImageFormat = "RAW" - DiskImageFormatVhd DiskImageFormat = "VHD" -) - -// Values returns all known values for DiskImageFormat. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DiskImageFormat) Values() []DiskImageFormat { - return []DiskImageFormat{ - "VMDK", - "RAW", - "VHD", - } -} - -type DiskType string - -// Enum values for DiskType -const ( - DiskTypeHdd DiskType = "hdd" - DiskTypeSsd DiskType = "ssd" -) - -// Values returns all known values for DiskType. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (DiskType) Values() []DiskType { - return []DiskType{ - "hdd", - "ssd", - } -} - -type DnsNameState string - -// Enum values for DnsNameState -const ( - DnsNameStatePendingVerification DnsNameState = "pendingVerification" - DnsNameStateVerified DnsNameState = "verified" - DnsNameStateFailed DnsNameState = "failed" -) - -// Values returns all known values for DnsNameState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DnsNameState) Values() []DnsNameState { - return []DnsNameState{ - "pendingVerification", - "verified", - "failed", - } -} - -type DnsRecordIpType string - -// Enum values for DnsRecordIpType -const ( - DnsRecordIpTypeIpv4 DnsRecordIpType = "ipv4" - DnsRecordIpTypeDualstack DnsRecordIpType = "dualstack" - DnsRecordIpTypeIpv6 DnsRecordIpType = "ipv6" - DnsRecordIpTypeServiceDefined DnsRecordIpType = "service-defined" -) - -// Values returns all known values for DnsRecordIpType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DnsRecordIpType) Values() []DnsRecordIpType { - return []DnsRecordIpType{ - "ipv4", - "dualstack", - "ipv6", - "service-defined", - } -} - -type DnsSupportValue string - -// Enum values for DnsSupportValue -const ( - DnsSupportValueEnable DnsSupportValue = "enable" - DnsSupportValueDisable DnsSupportValue = "disable" -) - -// Values returns all known values for DnsSupportValue. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DnsSupportValue) Values() []DnsSupportValue { - return []DnsSupportValue{ - "enable", - "disable", - } -} - -type DomainType string - -// Enum values for DomainType -const ( - DomainTypeVpc DomainType = "vpc" - DomainTypeStandard DomainType = "standard" -) - -// Values returns all known values for DomainType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (DomainType) Values() []DomainType { - return []DomainType{ - "vpc", - "standard", - } -} - -type DynamicRoutingValue string - -// Enum values for DynamicRoutingValue -const ( - DynamicRoutingValueEnable DynamicRoutingValue = "enable" - DynamicRoutingValueDisable DynamicRoutingValue = "disable" -) - -// Values returns all known values for DynamicRoutingValue. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (DynamicRoutingValue) Values() []DynamicRoutingValue { - return []DynamicRoutingValue{ - "enable", - "disable", - } -} - -type EbsEncryptionSupport string - -// Enum values for EbsEncryptionSupport -const ( - EbsEncryptionSupportUnsupported EbsEncryptionSupport = "unsupported" - EbsEncryptionSupportSupported EbsEncryptionSupport = "supported" -) - -// Values returns all known values for EbsEncryptionSupport. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (EbsEncryptionSupport) Values() []EbsEncryptionSupport { - return []EbsEncryptionSupport{ - "unsupported", - "supported", - } -} - -type EbsNvmeSupport string - -// Enum values for EbsNvmeSupport -const ( - EbsNvmeSupportUnsupported EbsNvmeSupport = "unsupported" - EbsNvmeSupportSupported EbsNvmeSupport = "supported" - EbsNvmeSupportRequired EbsNvmeSupport = "required" -) - -// Values returns all known values for EbsNvmeSupport. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (EbsNvmeSupport) Values() []EbsNvmeSupport { - return []EbsNvmeSupport{ - "unsupported", - "supported", - "required", - } -} - -type EbsOptimizedSupport string - -// Enum values for EbsOptimizedSupport -const ( - EbsOptimizedSupportUnsupported EbsOptimizedSupport = "unsupported" - EbsOptimizedSupportSupported EbsOptimizedSupport = "supported" - EbsOptimizedSupportDefault EbsOptimizedSupport = "default" -) - -// Values returns all known values for EbsOptimizedSupport. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (EbsOptimizedSupport) Values() []EbsOptimizedSupport { - return []EbsOptimizedSupport{ - "unsupported", - "supported", - "default", - } -} - -type Ec2InstanceConnectEndpointState string - -// Enum values for Ec2InstanceConnectEndpointState -const ( - Ec2InstanceConnectEndpointStateCreateInProgress Ec2InstanceConnectEndpointState = "create-in-progress" - Ec2InstanceConnectEndpointStateCreateComplete Ec2InstanceConnectEndpointState = "create-complete" - Ec2InstanceConnectEndpointStateCreateFailed Ec2InstanceConnectEndpointState = "create-failed" - Ec2InstanceConnectEndpointStateDeleteInProgress Ec2InstanceConnectEndpointState = "delete-in-progress" - Ec2InstanceConnectEndpointStateDeleteComplete Ec2InstanceConnectEndpointState = "delete-complete" - Ec2InstanceConnectEndpointStateDeleteFailed Ec2InstanceConnectEndpointState = "delete-failed" -) - -// Values returns all known values for Ec2InstanceConnectEndpointState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (Ec2InstanceConnectEndpointState) Values() []Ec2InstanceConnectEndpointState { - return []Ec2InstanceConnectEndpointState{ - "create-in-progress", - "create-complete", - "create-failed", - "delete-in-progress", - "delete-complete", - "delete-failed", - } -} - -type ElasticGpuState string - -// Enum values for ElasticGpuState -const ( - ElasticGpuStateAttached ElasticGpuState = "ATTACHED" -) - -// Values returns all known values for ElasticGpuState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ElasticGpuState) Values() []ElasticGpuState { - return []ElasticGpuState{ - "ATTACHED", - } -} - -type ElasticGpuStatus string - -// Enum values for ElasticGpuStatus -const ( - ElasticGpuStatusOk ElasticGpuStatus = "OK" - ElasticGpuStatusImpaired ElasticGpuStatus = "IMPAIRED" -) - -// Values returns all known values for ElasticGpuStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ElasticGpuStatus) Values() []ElasticGpuStatus { - return []ElasticGpuStatus{ - "OK", - "IMPAIRED", - } -} - -type EnaSupport string - -// Enum values for EnaSupport -const ( - EnaSupportUnsupported EnaSupport = "unsupported" - EnaSupportSupported EnaSupport = "supported" - EnaSupportRequired EnaSupport = "required" -) - -// Values returns all known values for EnaSupport. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (EnaSupport) Values() []EnaSupport { - return []EnaSupport{ - "unsupported", - "supported", - "required", - } -} - -type EndDateType string - -// Enum values for EndDateType -const ( - EndDateTypeUnlimited EndDateType = "unlimited" - EndDateTypeLimited EndDateType = "limited" -) - -// Values returns all known values for EndDateType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (EndDateType) Values() []EndDateType { - return []EndDateType{ - "unlimited", - "limited", - } -} - -type EphemeralNvmeSupport string - -// Enum values for EphemeralNvmeSupport -const ( - EphemeralNvmeSupportUnsupported EphemeralNvmeSupport = "unsupported" - EphemeralNvmeSupportSupported EphemeralNvmeSupport = "supported" - EphemeralNvmeSupportRequired EphemeralNvmeSupport = "required" -) - -// Values returns all known values for EphemeralNvmeSupport. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (EphemeralNvmeSupport) Values() []EphemeralNvmeSupport { - return []EphemeralNvmeSupport{ - "unsupported", - "supported", - "required", - } -} - -type EventCode string - -// Enum values for EventCode -const ( - EventCodeInstanceReboot EventCode = "instance-reboot" - EventCodeSystemReboot EventCode = "system-reboot" - EventCodeSystemMaintenance EventCode = "system-maintenance" - EventCodeInstanceRetirement EventCode = "instance-retirement" - EventCodeInstanceStop EventCode = "instance-stop" -) - -// Values returns all known values for EventCode. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (EventCode) Values() []EventCode { - return []EventCode{ - "instance-reboot", - "system-reboot", - "system-maintenance", - "instance-retirement", - "instance-stop", - } -} - -type EventType string - -// Enum values for EventType -const ( - EventTypeInstanceChange EventType = "instanceChange" - EventTypeBatchChange EventType = "fleetRequestChange" - EventTypeError EventType = "error" - EventTypeInformation EventType = "information" -) - -// Values returns all known values for EventType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (EventType) Values() []EventType { - return []EventType{ - "instanceChange", - "fleetRequestChange", - "error", - "information", - } -} - -type ExcessCapacityTerminationPolicy string - -// Enum values for ExcessCapacityTerminationPolicy -const ( - ExcessCapacityTerminationPolicyNoTermination ExcessCapacityTerminationPolicy = "noTermination" - ExcessCapacityTerminationPolicyDefault ExcessCapacityTerminationPolicy = "default" -) - -// Values returns all known values for ExcessCapacityTerminationPolicy. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ExcessCapacityTerminationPolicy) Values() []ExcessCapacityTerminationPolicy { - return []ExcessCapacityTerminationPolicy{ - "noTermination", - "default", - } -} - -type ExportEnvironment string - -// Enum values for ExportEnvironment -const ( - ExportEnvironmentCitrix ExportEnvironment = "citrix" - ExportEnvironmentVmware ExportEnvironment = "vmware" - ExportEnvironmentMicrosoft ExportEnvironment = "microsoft" -) - -// Values returns all known values for ExportEnvironment. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ExportEnvironment) Values() []ExportEnvironment { - return []ExportEnvironment{ - "citrix", - "vmware", - "microsoft", - } -} - -type ExportTaskState string - -// Enum values for ExportTaskState -const ( - ExportTaskStateActive ExportTaskState = "active" - ExportTaskStateCancelling ExportTaskState = "cancelling" - ExportTaskStateCancelled ExportTaskState = "cancelled" - ExportTaskStateCompleted ExportTaskState = "completed" -) - -// Values returns all known values for ExportTaskState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ExportTaskState) Values() []ExportTaskState { - return []ExportTaskState{ - "active", - "cancelling", - "cancelled", - "completed", - } -} - -type FastLaunchResourceType string - -// Enum values for FastLaunchResourceType -const ( - FastLaunchResourceTypeSnapshot FastLaunchResourceType = "snapshot" -) - -// Values returns all known values for FastLaunchResourceType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FastLaunchResourceType) Values() []FastLaunchResourceType { - return []FastLaunchResourceType{ - "snapshot", - } -} - -type FastLaunchStateCode string - -// Enum values for FastLaunchStateCode -const ( - FastLaunchStateCodeEnabling FastLaunchStateCode = "enabling" - FastLaunchStateCodeEnablingFailed FastLaunchStateCode = "enabling-failed" - FastLaunchStateCodeEnabled FastLaunchStateCode = "enabled" - FastLaunchStateCodeEnabledFailed FastLaunchStateCode = "enabled-failed" - FastLaunchStateCodeDisabling FastLaunchStateCode = "disabling" - FastLaunchStateCodeDisablingFailed FastLaunchStateCode = "disabling-failed" -) - -// Values returns all known values for FastLaunchStateCode. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FastLaunchStateCode) Values() []FastLaunchStateCode { - return []FastLaunchStateCode{ - "enabling", - "enabling-failed", - "enabled", - "enabled-failed", - "disabling", - "disabling-failed", - } -} - -type FastSnapshotRestoreStateCode string - -// Enum values for FastSnapshotRestoreStateCode -const ( - FastSnapshotRestoreStateCodeEnabling FastSnapshotRestoreStateCode = "enabling" - FastSnapshotRestoreStateCodeOptimizing FastSnapshotRestoreStateCode = "optimizing" - FastSnapshotRestoreStateCodeEnabled FastSnapshotRestoreStateCode = "enabled" - FastSnapshotRestoreStateCodeDisabling FastSnapshotRestoreStateCode = "disabling" - FastSnapshotRestoreStateCodeDisabled FastSnapshotRestoreStateCode = "disabled" -) - -// Values returns all known values for FastSnapshotRestoreStateCode. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (FastSnapshotRestoreStateCode) Values() []FastSnapshotRestoreStateCode { - return []FastSnapshotRestoreStateCode{ - "enabling", - "optimizing", - "enabled", - "disabling", - "disabled", - } -} - -type FindingsFound string - -// Enum values for FindingsFound -const ( - FindingsFoundTrue FindingsFound = "true" - FindingsFoundFalse FindingsFound = "false" - FindingsFoundUnknown FindingsFound = "unknown" -) - -// Values returns all known values for FindingsFound. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FindingsFound) Values() []FindingsFound { - return []FindingsFound{ - "true", - "false", - "unknown", - } -} - -type FleetActivityStatus string - -// Enum values for FleetActivityStatus -const ( - FleetActivityStatusError FleetActivityStatus = "error" - FleetActivityStatusPendingFulfillment FleetActivityStatus = "pending_fulfillment" - FleetActivityStatusPendingTermination FleetActivityStatus = "pending_termination" - FleetActivityStatusFulfilled FleetActivityStatus = "fulfilled" -) - -// Values returns all known values for FleetActivityStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FleetActivityStatus) Values() []FleetActivityStatus { - return []FleetActivityStatus{ - "error", - "pending_fulfillment", - "pending_termination", - "fulfilled", - } -} - -type FleetCapacityReservationTenancy string - -// Enum values for FleetCapacityReservationTenancy -const ( - FleetCapacityReservationTenancyDefault FleetCapacityReservationTenancy = "default" -) - -// Values returns all known values for FleetCapacityReservationTenancy. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (FleetCapacityReservationTenancy) Values() []FleetCapacityReservationTenancy { - return []FleetCapacityReservationTenancy{ - "default", - } -} - -type FleetCapacityReservationUsageStrategy string - -// Enum values for FleetCapacityReservationUsageStrategy -const ( - FleetCapacityReservationUsageStrategyUseCapacityReservationsFirst FleetCapacityReservationUsageStrategy = "use-capacity-reservations-first" -) - -// Values returns all known values for FleetCapacityReservationUsageStrategy. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (FleetCapacityReservationUsageStrategy) Values() []FleetCapacityReservationUsageStrategy { - return []FleetCapacityReservationUsageStrategy{ - "use-capacity-reservations-first", - } -} - -type FleetEventType string - -// Enum values for FleetEventType -const ( - FleetEventTypeInstanceChange FleetEventType = "instance-change" - FleetEventTypeFleetChange FleetEventType = "fleet-change" - FleetEventTypeServiceError FleetEventType = "service-error" -) - -// Values returns all known values for FleetEventType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FleetEventType) Values() []FleetEventType { - return []FleetEventType{ - "instance-change", - "fleet-change", - "service-error", - } -} - -type FleetExcessCapacityTerminationPolicy string - -// Enum values for FleetExcessCapacityTerminationPolicy -const ( - FleetExcessCapacityTerminationPolicyNoTermination FleetExcessCapacityTerminationPolicy = "no-termination" - FleetExcessCapacityTerminationPolicyTermination FleetExcessCapacityTerminationPolicy = "termination" -) - -// Values returns all known values for FleetExcessCapacityTerminationPolicy. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (FleetExcessCapacityTerminationPolicy) Values() []FleetExcessCapacityTerminationPolicy { - return []FleetExcessCapacityTerminationPolicy{ - "no-termination", - "termination", - } -} - -type FleetInstanceMatchCriteria string - -// Enum values for FleetInstanceMatchCriteria -const ( - FleetInstanceMatchCriteriaOpen FleetInstanceMatchCriteria = "open" -) - -// Values returns all known values for FleetInstanceMatchCriteria. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (FleetInstanceMatchCriteria) Values() []FleetInstanceMatchCriteria { - return []FleetInstanceMatchCriteria{ - "open", - } -} - -type FleetOnDemandAllocationStrategy string - -// Enum values for FleetOnDemandAllocationStrategy -const ( - FleetOnDemandAllocationStrategyLowestPrice FleetOnDemandAllocationStrategy = "lowest-price" - FleetOnDemandAllocationStrategyPrioritized FleetOnDemandAllocationStrategy = "prioritized" -) - -// Values returns all known values for FleetOnDemandAllocationStrategy. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (FleetOnDemandAllocationStrategy) Values() []FleetOnDemandAllocationStrategy { - return []FleetOnDemandAllocationStrategy{ - "lowest-price", - "prioritized", - } -} - -type FleetReplacementStrategy string - -// Enum values for FleetReplacementStrategy -const ( - FleetReplacementStrategyLaunch FleetReplacementStrategy = "launch" - FleetReplacementStrategyLaunchBeforeTerminate FleetReplacementStrategy = "launch-before-terminate" -) - -// Values returns all known values for FleetReplacementStrategy. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (FleetReplacementStrategy) Values() []FleetReplacementStrategy { - return []FleetReplacementStrategy{ - "launch", - "launch-before-terminate", - } -} - -type FleetStateCode string - -// Enum values for FleetStateCode -const ( - FleetStateCodeSubmitted FleetStateCode = "submitted" - FleetStateCodeActive FleetStateCode = "active" - FleetStateCodeDeleted FleetStateCode = "deleted" - FleetStateCodeFailed FleetStateCode = "failed" - FleetStateCodeDeletedRunning FleetStateCode = "deleted_running" - FleetStateCodeDeletedTerminatingInstances FleetStateCode = "deleted_terminating" - FleetStateCodeModifying FleetStateCode = "modifying" -) - -// Values returns all known values for FleetStateCode. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FleetStateCode) Values() []FleetStateCode { - return []FleetStateCode{ - "submitted", - "active", - "deleted", - "failed", - "deleted_running", - "deleted_terminating", - "modifying", - } -} - -type FleetType string - -// Enum values for FleetType -const ( - FleetTypeRequest FleetType = "request" - FleetTypeMaintain FleetType = "maintain" - FleetTypeInstant FleetType = "instant" -) - -// Values returns all known values for FleetType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (FleetType) Values() []FleetType { - return []FleetType{ - "request", - "maintain", - "instant", - } -} - -type FlowLogsResourceType string - -// Enum values for FlowLogsResourceType -const ( - FlowLogsResourceTypeVpc FlowLogsResourceType = "VPC" - FlowLogsResourceTypeSubnet FlowLogsResourceType = "Subnet" - FlowLogsResourceTypeNetworkInterface FlowLogsResourceType = "NetworkInterface" - FlowLogsResourceTypeTransitGateway FlowLogsResourceType = "TransitGateway" - FlowLogsResourceTypeTransitGatewayAttachment FlowLogsResourceType = "TransitGatewayAttachment" -) - -// Values returns all known values for FlowLogsResourceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FlowLogsResourceType) Values() []FlowLogsResourceType { - return []FlowLogsResourceType{ - "VPC", - "Subnet", - "NetworkInterface", - "TransitGateway", - "TransitGatewayAttachment", - } -} - -type FpgaImageAttributeName string - -// Enum values for FpgaImageAttributeName -const ( - FpgaImageAttributeNameDescription FpgaImageAttributeName = "description" - FpgaImageAttributeNameName FpgaImageAttributeName = "name" - FpgaImageAttributeNameLoadPermission FpgaImageAttributeName = "loadPermission" - FpgaImageAttributeNameProductCodes FpgaImageAttributeName = "productCodes" -) - -// Values returns all known values for FpgaImageAttributeName. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FpgaImageAttributeName) Values() []FpgaImageAttributeName { - return []FpgaImageAttributeName{ - "description", - "name", - "loadPermission", - "productCodes", - } -} - -type FpgaImageStateCode string - -// Enum values for FpgaImageStateCode -const ( - FpgaImageStateCodePending FpgaImageStateCode = "pending" - FpgaImageStateCodeFailed FpgaImageStateCode = "failed" - FpgaImageStateCodeAvailable FpgaImageStateCode = "available" - FpgaImageStateCodeUnavailable FpgaImageStateCode = "unavailable" -) - -// Values returns all known values for FpgaImageStateCode. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (FpgaImageStateCode) Values() []FpgaImageStateCode { - return []FpgaImageStateCode{ - "pending", - "failed", - "available", - "unavailable", - } -} - -type GatewayAssociationState string - -// Enum values for GatewayAssociationState -const ( - GatewayAssociationStateAssociated GatewayAssociationState = "associated" - GatewayAssociationStateNotAssociated GatewayAssociationState = "not-associated" - GatewayAssociationStateAssociating GatewayAssociationState = "associating" - GatewayAssociationStateDisassociating GatewayAssociationState = "disassociating" -) - -// Values returns all known values for GatewayAssociationState. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (GatewayAssociationState) Values() []GatewayAssociationState { - return []GatewayAssociationState{ - "associated", - "not-associated", - "associating", - "disassociating", - } -} - -type GatewayType string - -// Enum values for GatewayType -const ( - GatewayTypeIpsec1 GatewayType = "ipsec.1" -) - -// Values returns all known values for GatewayType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (GatewayType) Values() []GatewayType { - return []GatewayType{ - "ipsec.1", - } -} - -type HostMaintenance string - -// Enum values for HostMaintenance -const ( - HostMaintenanceOn HostMaintenance = "on" - HostMaintenanceOff HostMaintenance = "off" -) - -// Values returns all known values for HostMaintenance. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (HostMaintenance) Values() []HostMaintenance { - return []HostMaintenance{ - "on", - "off", - } -} - -type HostnameType string - -// Enum values for HostnameType -const ( - HostnameTypeIpName HostnameType = "ip-name" - HostnameTypeResourceName HostnameType = "resource-name" -) - -// Values returns all known values for HostnameType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (HostnameType) Values() []HostnameType { - return []HostnameType{ - "ip-name", - "resource-name", - } -} - -type HostRecovery string - -// Enum values for HostRecovery -const ( - HostRecoveryOn HostRecovery = "on" - HostRecoveryOff HostRecovery = "off" -) - -// Values returns all known values for HostRecovery. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (HostRecovery) Values() []HostRecovery { - return []HostRecovery{ - "on", - "off", - } -} - -type HostTenancy string - -// Enum values for HostTenancy -const ( - HostTenancyDedicated HostTenancy = "dedicated" - HostTenancyHost HostTenancy = "host" -) - -// Values returns all known values for HostTenancy. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (HostTenancy) Values() []HostTenancy { - return []HostTenancy{ - "dedicated", - "host", - } -} - -type HttpTokensState string - -// Enum values for HttpTokensState -const ( - HttpTokensStateOptional HttpTokensState = "optional" - HttpTokensStateRequired HttpTokensState = "required" -) - -// Values returns all known values for HttpTokensState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (HttpTokensState) Values() []HttpTokensState { - return []HttpTokensState{ - "optional", - "required", - } -} - -type HypervisorType string - -// Enum values for HypervisorType -const ( - HypervisorTypeOvm HypervisorType = "ovm" - HypervisorTypeXen HypervisorType = "xen" -) - -// Values returns all known values for HypervisorType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (HypervisorType) Values() []HypervisorType { - return []HypervisorType{ - "ovm", - "xen", - } -} - -type IamInstanceProfileAssociationState string - -// Enum values for IamInstanceProfileAssociationState -const ( - IamInstanceProfileAssociationStateAssociating IamInstanceProfileAssociationState = "associating" - IamInstanceProfileAssociationStateAssociated IamInstanceProfileAssociationState = "associated" - IamInstanceProfileAssociationStateDisassociating IamInstanceProfileAssociationState = "disassociating" - IamInstanceProfileAssociationStateDisassociated IamInstanceProfileAssociationState = "disassociated" -) - -// Values returns all known values for IamInstanceProfileAssociationState. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (IamInstanceProfileAssociationState) Values() []IamInstanceProfileAssociationState { - return []IamInstanceProfileAssociationState{ - "associating", - "associated", - "disassociating", - "disassociated", - } -} - -type Igmpv2SupportValue string - -// Enum values for Igmpv2SupportValue -const ( - Igmpv2SupportValueEnable Igmpv2SupportValue = "enable" - Igmpv2SupportValueDisable Igmpv2SupportValue = "disable" -) - -// Values returns all known values for Igmpv2SupportValue. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (Igmpv2SupportValue) Values() []Igmpv2SupportValue { - return []Igmpv2SupportValue{ - "enable", - "disable", - } -} - -type ImageAttributeName string - -// Enum values for ImageAttributeName -const ( - ImageAttributeNameDescription ImageAttributeName = "description" - ImageAttributeNameKernel ImageAttributeName = "kernel" - ImageAttributeNameRamdisk ImageAttributeName = "ramdisk" - ImageAttributeNameLaunchPermission ImageAttributeName = "launchPermission" - ImageAttributeNameProductCodes ImageAttributeName = "productCodes" - ImageAttributeNameBlockDeviceMapping ImageAttributeName = "blockDeviceMapping" - ImageAttributeNameSriovNetSupport ImageAttributeName = "sriovNetSupport" - ImageAttributeNameBootMode ImageAttributeName = "bootMode" - ImageAttributeNameTpmSupport ImageAttributeName = "tpmSupport" - ImageAttributeNameUefiData ImageAttributeName = "uefiData" - ImageAttributeNameLastLaunchedTime ImageAttributeName = "lastLaunchedTime" - ImageAttributeNameImdsSupport ImageAttributeName = "imdsSupport" -) - -// Values returns all known values for ImageAttributeName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ImageAttributeName) Values() []ImageAttributeName { - return []ImageAttributeName{ - "description", - "kernel", - "ramdisk", - "launchPermission", - "productCodes", - "blockDeviceMapping", - "sriovNetSupport", - "bootMode", - "tpmSupport", - "uefiData", - "lastLaunchedTime", - "imdsSupport", - } -} - -type ImageBlockPublicAccessDisabledState string - -// Enum values for ImageBlockPublicAccessDisabledState -const ( - ImageBlockPublicAccessDisabledStateUnblocked ImageBlockPublicAccessDisabledState = "unblocked" -) - -// Values returns all known values for ImageBlockPublicAccessDisabledState. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ImageBlockPublicAccessDisabledState) Values() []ImageBlockPublicAccessDisabledState { - return []ImageBlockPublicAccessDisabledState{ - "unblocked", - } -} - -type ImageBlockPublicAccessEnabledState string - -// Enum values for ImageBlockPublicAccessEnabledState -const ( - ImageBlockPublicAccessEnabledStateBlockNewSharing ImageBlockPublicAccessEnabledState = "block-new-sharing" -) - -// Values returns all known values for ImageBlockPublicAccessEnabledState. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ImageBlockPublicAccessEnabledState) Values() []ImageBlockPublicAccessEnabledState { - return []ImageBlockPublicAccessEnabledState{ - "block-new-sharing", - } -} - -type ImageState string - -// Enum values for ImageState -const ( - ImageStatePending ImageState = "pending" - ImageStateAvailable ImageState = "available" - ImageStateInvalid ImageState = "invalid" - ImageStateDeregistered ImageState = "deregistered" - ImageStateTransient ImageState = "transient" - ImageStateFailed ImageState = "failed" - ImageStateError ImageState = "error" - ImageStateDisabled ImageState = "disabled" -) - -// Values returns all known values for ImageState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (ImageState) Values() []ImageState { - return []ImageState{ - "pending", - "available", - "invalid", - "deregistered", - "transient", - "failed", - "error", - "disabled", - } -} - -type ImageTypeValues string - -// Enum values for ImageTypeValues -const ( - ImageTypeValuesMachine ImageTypeValues = "machine" - ImageTypeValuesKernel ImageTypeValues = "kernel" - ImageTypeValuesRamdisk ImageTypeValues = "ramdisk" -) - -// Values returns all known values for ImageTypeValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ImageTypeValues) Values() []ImageTypeValues { - return []ImageTypeValues{ - "machine", - "kernel", - "ramdisk", - } -} - -type ImdsSupportValues string - -// Enum values for ImdsSupportValues -const ( - ImdsSupportValuesV20 ImdsSupportValues = "v2.0" -) - -// Values returns all known values for ImdsSupportValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ImdsSupportValues) Values() []ImdsSupportValues { - return []ImdsSupportValues{ - "v2.0", - } -} - -type InstanceAttributeName string - -// Enum values for InstanceAttributeName -const ( - InstanceAttributeNameInstanceType InstanceAttributeName = "instanceType" - InstanceAttributeNameKernel InstanceAttributeName = "kernel" - InstanceAttributeNameRamdisk InstanceAttributeName = "ramdisk" - InstanceAttributeNameUserData InstanceAttributeName = "userData" - InstanceAttributeNameDisableApiTermination InstanceAttributeName = "disableApiTermination" - InstanceAttributeNameInstanceInitiatedShutdownBehavior InstanceAttributeName = "instanceInitiatedShutdownBehavior" - InstanceAttributeNameRootDeviceName InstanceAttributeName = "rootDeviceName" - InstanceAttributeNameBlockDeviceMapping InstanceAttributeName = "blockDeviceMapping" - InstanceAttributeNameProductCodes InstanceAttributeName = "productCodes" - InstanceAttributeNameSourceDestCheck InstanceAttributeName = "sourceDestCheck" - InstanceAttributeNameGroupSet InstanceAttributeName = "groupSet" - InstanceAttributeNameEbsOptimized InstanceAttributeName = "ebsOptimized" - InstanceAttributeNameSriovNetSupport InstanceAttributeName = "sriovNetSupport" - InstanceAttributeNameEnaSupport InstanceAttributeName = "enaSupport" - InstanceAttributeNameEnclaveOptions InstanceAttributeName = "enclaveOptions" - InstanceAttributeNameDisableApiStop InstanceAttributeName = "disableApiStop" -) - -// Values returns all known values for InstanceAttributeName. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceAttributeName) Values() []InstanceAttributeName { - return []InstanceAttributeName{ - "instanceType", - "kernel", - "ramdisk", - "userData", - "disableApiTermination", - "instanceInitiatedShutdownBehavior", - "rootDeviceName", - "blockDeviceMapping", - "productCodes", - "sourceDestCheck", - "groupSet", - "ebsOptimized", - "sriovNetSupport", - "enaSupport", - "enclaveOptions", - "disableApiStop", - } -} - -type InstanceAutoRecoveryState string - -// Enum values for InstanceAutoRecoveryState -const ( - InstanceAutoRecoveryStateDisabled InstanceAutoRecoveryState = "disabled" - InstanceAutoRecoveryStateDefault InstanceAutoRecoveryState = "default" -) - -// Values returns all known values for InstanceAutoRecoveryState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (InstanceAutoRecoveryState) Values() []InstanceAutoRecoveryState { - return []InstanceAutoRecoveryState{ - "disabled", - "default", - } -} - -type InstanceBootModeValues string - -// Enum values for InstanceBootModeValues -const ( - InstanceBootModeValuesLegacyBios InstanceBootModeValues = "legacy-bios" - InstanceBootModeValuesUefi InstanceBootModeValues = "uefi" -) - -// Values returns all known values for InstanceBootModeValues. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceBootModeValues) Values() []InstanceBootModeValues { - return []InstanceBootModeValues{ - "legacy-bios", - "uefi", - } -} - -type InstanceEventWindowState string - -// Enum values for InstanceEventWindowState -const ( - InstanceEventWindowStateCreating InstanceEventWindowState = "creating" - InstanceEventWindowStateDeleting InstanceEventWindowState = "deleting" - InstanceEventWindowStateActive InstanceEventWindowState = "active" - InstanceEventWindowStateDeleted InstanceEventWindowState = "deleted" -) - -// Values returns all known values for InstanceEventWindowState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (InstanceEventWindowState) Values() []InstanceEventWindowState { - return []InstanceEventWindowState{ - "creating", - "deleting", - "active", - "deleted", - } -} - -type InstanceGeneration string - -// Enum values for InstanceGeneration -const ( - InstanceGenerationCurrent InstanceGeneration = "current" - InstanceGenerationPrevious InstanceGeneration = "previous" -) - -// Values returns all known values for InstanceGeneration. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceGeneration) Values() []InstanceGeneration { - return []InstanceGeneration{ - "current", - "previous", - } -} - -type InstanceHealthStatus string - -// Enum values for InstanceHealthStatus -const ( - InstanceHealthStatusHealthyStatus InstanceHealthStatus = "healthy" - InstanceHealthStatusUnhealthyStatus InstanceHealthStatus = "unhealthy" -) - -// Values returns all known values for InstanceHealthStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceHealthStatus) Values() []InstanceHealthStatus { - return []InstanceHealthStatus{ - "healthy", - "unhealthy", - } -} - -type InstanceInterruptionBehavior string - -// Enum values for InstanceInterruptionBehavior -const ( - InstanceInterruptionBehaviorHibernate InstanceInterruptionBehavior = "hibernate" - InstanceInterruptionBehaviorStop InstanceInterruptionBehavior = "stop" - InstanceInterruptionBehaviorTerminate InstanceInterruptionBehavior = "terminate" -) - -// Values returns all known values for InstanceInterruptionBehavior. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (InstanceInterruptionBehavior) Values() []InstanceInterruptionBehavior { - return []InstanceInterruptionBehavior{ - "hibernate", - "stop", - "terminate", - } -} - -type InstanceLifecycle string - -// Enum values for InstanceLifecycle -const ( - InstanceLifecycleSpot InstanceLifecycle = "spot" - InstanceLifecycleOnDemand InstanceLifecycle = "on-demand" -) - -// Values returns all known values for InstanceLifecycle. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceLifecycle) Values() []InstanceLifecycle { - return []InstanceLifecycle{ - "spot", - "on-demand", - } -} - -type InstanceLifecycleType string - -// Enum values for InstanceLifecycleType -const ( - InstanceLifecycleTypeSpot InstanceLifecycleType = "spot" - InstanceLifecycleTypeScheduled InstanceLifecycleType = "scheduled" - InstanceLifecycleTypeCapacityBlock InstanceLifecycleType = "capacity-block" -) - -// Values returns all known values for InstanceLifecycleType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceLifecycleType) Values() []InstanceLifecycleType { - return []InstanceLifecycleType{ - "spot", - "scheduled", - "capacity-block", - } -} - -type InstanceMatchCriteria string - -// Enum values for InstanceMatchCriteria -const ( - InstanceMatchCriteriaOpen InstanceMatchCriteria = "open" - InstanceMatchCriteriaTargeted InstanceMatchCriteria = "targeted" -) - -// Values returns all known values for InstanceMatchCriteria. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceMatchCriteria) Values() []InstanceMatchCriteria { - return []InstanceMatchCriteria{ - "open", - "targeted", - } -} - -type InstanceMetadataEndpointState string - -// Enum values for InstanceMetadataEndpointState -const ( - InstanceMetadataEndpointStateDisabled InstanceMetadataEndpointState = "disabled" - InstanceMetadataEndpointStateEnabled InstanceMetadataEndpointState = "enabled" -) - -// Values returns all known values for InstanceMetadataEndpointState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (InstanceMetadataEndpointState) Values() []InstanceMetadataEndpointState { - return []InstanceMetadataEndpointState{ - "disabled", - "enabled", - } -} - -type InstanceMetadataOptionsState string - -// Enum values for InstanceMetadataOptionsState -const ( - InstanceMetadataOptionsStatePending InstanceMetadataOptionsState = "pending" - InstanceMetadataOptionsStateApplied InstanceMetadataOptionsState = "applied" -) - -// Values returns all known values for InstanceMetadataOptionsState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (InstanceMetadataOptionsState) Values() []InstanceMetadataOptionsState { - return []InstanceMetadataOptionsState{ - "pending", - "applied", - } -} - -type InstanceMetadataProtocolState string - -// Enum values for InstanceMetadataProtocolState -const ( - InstanceMetadataProtocolStateDisabled InstanceMetadataProtocolState = "disabled" - InstanceMetadataProtocolStateEnabled InstanceMetadataProtocolState = "enabled" -) - -// Values returns all known values for InstanceMetadataProtocolState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (InstanceMetadataProtocolState) Values() []InstanceMetadataProtocolState { - return []InstanceMetadataProtocolState{ - "disabled", - "enabled", - } -} - -type InstanceMetadataTagsState string - -// Enum values for InstanceMetadataTagsState -const ( - InstanceMetadataTagsStateDisabled InstanceMetadataTagsState = "disabled" - InstanceMetadataTagsStateEnabled InstanceMetadataTagsState = "enabled" -) - -// Values returns all known values for InstanceMetadataTagsState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (InstanceMetadataTagsState) Values() []InstanceMetadataTagsState { - return []InstanceMetadataTagsState{ - "disabled", - "enabled", - } -} - -type InstanceStateName string - -// Enum values for InstanceStateName -const ( - InstanceStateNamePending InstanceStateName = "pending" - InstanceStateNameRunning InstanceStateName = "running" - InstanceStateNameShuttingDown InstanceStateName = "shutting-down" - InstanceStateNameTerminated InstanceStateName = "terminated" - InstanceStateNameStopping InstanceStateName = "stopping" - InstanceStateNameStopped InstanceStateName = "stopped" -) - -// Values returns all known values for InstanceStateName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceStateName) Values() []InstanceStateName { - return []InstanceStateName{ - "pending", - "running", - "shutting-down", - "terminated", - "stopping", - "stopped", - } -} - -type InstanceStorageEncryptionSupport string - -// Enum values for InstanceStorageEncryptionSupport -const ( - InstanceStorageEncryptionSupportUnsupported InstanceStorageEncryptionSupport = "unsupported" - InstanceStorageEncryptionSupportRequired InstanceStorageEncryptionSupport = "required" -) - -// Values returns all known values for InstanceStorageEncryptionSupport. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (InstanceStorageEncryptionSupport) Values() []InstanceStorageEncryptionSupport { - return []InstanceStorageEncryptionSupport{ - "unsupported", - "required", - } -} - -type InstanceType string - -// Enum values for InstanceType -const ( - InstanceTypeA1Medium InstanceType = "a1.medium" - InstanceTypeA1Large InstanceType = "a1.large" - InstanceTypeA1Xlarge InstanceType = "a1.xlarge" - InstanceTypeA12xlarge InstanceType = "a1.2xlarge" - InstanceTypeA14xlarge InstanceType = "a1.4xlarge" - InstanceTypeA1Metal InstanceType = "a1.metal" - InstanceTypeC1Medium InstanceType = "c1.medium" - InstanceTypeC1Xlarge InstanceType = "c1.xlarge" - InstanceTypeC3Large InstanceType = "c3.large" - InstanceTypeC3Xlarge InstanceType = "c3.xlarge" - InstanceTypeC32xlarge InstanceType = "c3.2xlarge" - InstanceTypeC34xlarge InstanceType = "c3.4xlarge" - InstanceTypeC38xlarge InstanceType = "c3.8xlarge" - InstanceTypeC4Large InstanceType = "c4.large" - InstanceTypeC4Xlarge InstanceType = "c4.xlarge" - InstanceTypeC42xlarge InstanceType = "c4.2xlarge" - InstanceTypeC44xlarge InstanceType = "c4.4xlarge" - InstanceTypeC48xlarge InstanceType = "c4.8xlarge" - InstanceTypeC5Large InstanceType = "c5.large" - InstanceTypeC5Xlarge InstanceType = "c5.xlarge" - InstanceTypeC52xlarge InstanceType = "c5.2xlarge" - InstanceTypeC54xlarge InstanceType = "c5.4xlarge" - InstanceTypeC59xlarge InstanceType = "c5.9xlarge" - InstanceTypeC512xlarge InstanceType = "c5.12xlarge" - InstanceTypeC518xlarge InstanceType = "c5.18xlarge" - InstanceTypeC524xlarge InstanceType = "c5.24xlarge" - InstanceTypeC5Metal InstanceType = "c5.metal" - InstanceTypeC5aLarge InstanceType = "c5a.large" - InstanceTypeC5aXlarge InstanceType = "c5a.xlarge" - InstanceTypeC5a2xlarge InstanceType = "c5a.2xlarge" - InstanceTypeC5a4xlarge InstanceType = "c5a.4xlarge" - InstanceTypeC5a8xlarge InstanceType = "c5a.8xlarge" - InstanceTypeC5a12xlarge InstanceType = "c5a.12xlarge" - InstanceTypeC5a16xlarge InstanceType = "c5a.16xlarge" - InstanceTypeC5a24xlarge InstanceType = "c5a.24xlarge" - InstanceTypeC5adLarge InstanceType = "c5ad.large" - InstanceTypeC5adXlarge InstanceType = "c5ad.xlarge" - InstanceTypeC5ad2xlarge InstanceType = "c5ad.2xlarge" - InstanceTypeC5ad4xlarge InstanceType = "c5ad.4xlarge" - InstanceTypeC5ad8xlarge InstanceType = "c5ad.8xlarge" - InstanceTypeC5ad12xlarge InstanceType = "c5ad.12xlarge" - InstanceTypeC5ad16xlarge InstanceType = "c5ad.16xlarge" - InstanceTypeC5ad24xlarge InstanceType = "c5ad.24xlarge" - InstanceTypeC5dLarge InstanceType = "c5d.large" - InstanceTypeC5dXlarge InstanceType = "c5d.xlarge" - InstanceTypeC5d2xlarge InstanceType = "c5d.2xlarge" - InstanceTypeC5d4xlarge InstanceType = "c5d.4xlarge" - InstanceTypeC5d9xlarge InstanceType = "c5d.9xlarge" - InstanceTypeC5d12xlarge InstanceType = "c5d.12xlarge" - InstanceTypeC5d18xlarge InstanceType = "c5d.18xlarge" - InstanceTypeC5d24xlarge InstanceType = "c5d.24xlarge" - InstanceTypeC5dMetal InstanceType = "c5d.metal" - InstanceTypeC5nLarge InstanceType = "c5n.large" - InstanceTypeC5nXlarge InstanceType = "c5n.xlarge" - InstanceTypeC5n2xlarge InstanceType = "c5n.2xlarge" - InstanceTypeC5n4xlarge InstanceType = "c5n.4xlarge" - InstanceTypeC5n9xlarge InstanceType = "c5n.9xlarge" - InstanceTypeC5n18xlarge InstanceType = "c5n.18xlarge" - InstanceTypeC5nMetal InstanceType = "c5n.metal" - InstanceTypeC6gMedium InstanceType = "c6g.medium" - InstanceTypeC6gLarge InstanceType = "c6g.large" - InstanceTypeC6gXlarge InstanceType = "c6g.xlarge" - InstanceTypeC6g2xlarge InstanceType = "c6g.2xlarge" - InstanceTypeC6g4xlarge InstanceType = "c6g.4xlarge" - InstanceTypeC6g8xlarge InstanceType = "c6g.8xlarge" - InstanceTypeC6g12xlarge InstanceType = "c6g.12xlarge" - InstanceTypeC6g16xlarge InstanceType = "c6g.16xlarge" - InstanceTypeC6gMetal InstanceType = "c6g.metal" - InstanceTypeC6gdMedium InstanceType = "c6gd.medium" - InstanceTypeC6gdLarge InstanceType = "c6gd.large" - InstanceTypeC6gdXlarge InstanceType = "c6gd.xlarge" - InstanceTypeC6gd2xlarge InstanceType = "c6gd.2xlarge" - InstanceTypeC6gd4xlarge InstanceType = "c6gd.4xlarge" - InstanceTypeC6gd8xlarge InstanceType = "c6gd.8xlarge" - InstanceTypeC6gd12xlarge InstanceType = "c6gd.12xlarge" - InstanceTypeC6gd16xlarge InstanceType = "c6gd.16xlarge" - InstanceTypeC6gdMetal InstanceType = "c6gd.metal" - InstanceTypeC6gnMedium InstanceType = "c6gn.medium" - InstanceTypeC6gnLarge InstanceType = "c6gn.large" - InstanceTypeC6gnXlarge InstanceType = "c6gn.xlarge" - InstanceTypeC6gn2xlarge InstanceType = "c6gn.2xlarge" - InstanceTypeC6gn4xlarge InstanceType = "c6gn.4xlarge" - InstanceTypeC6gn8xlarge InstanceType = "c6gn.8xlarge" - InstanceTypeC6gn12xlarge InstanceType = "c6gn.12xlarge" - InstanceTypeC6gn16xlarge InstanceType = "c6gn.16xlarge" - InstanceTypeC6iLarge InstanceType = "c6i.large" - InstanceTypeC6iXlarge InstanceType = "c6i.xlarge" - InstanceTypeC6i2xlarge InstanceType = "c6i.2xlarge" - InstanceTypeC6i4xlarge InstanceType = "c6i.4xlarge" - InstanceTypeC6i8xlarge InstanceType = "c6i.8xlarge" - InstanceTypeC6i12xlarge InstanceType = "c6i.12xlarge" - InstanceTypeC6i16xlarge InstanceType = "c6i.16xlarge" - InstanceTypeC6i24xlarge InstanceType = "c6i.24xlarge" - InstanceTypeC6i32xlarge InstanceType = "c6i.32xlarge" - InstanceTypeC6iMetal InstanceType = "c6i.metal" - InstanceTypeCc14xlarge InstanceType = "cc1.4xlarge" - InstanceTypeCc28xlarge InstanceType = "cc2.8xlarge" - InstanceTypeCg14xlarge InstanceType = "cg1.4xlarge" - InstanceTypeCr18xlarge InstanceType = "cr1.8xlarge" - InstanceTypeD2Xlarge InstanceType = "d2.xlarge" - InstanceTypeD22xlarge InstanceType = "d2.2xlarge" - InstanceTypeD24xlarge InstanceType = "d2.4xlarge" - InstanceTypeD28xlarge InstanceType = "d2.8xlarge" - InstanceTypeD3Xlarge InstanceType = "d3.xlarge" - InstanceTypeD32xlarge InstanceType = "d3.2xlarge" - InstanceTypeD34xlarge InstanceType = "d3.4xlarge" - InstanceTypeD38xlarge InstanceType = "d3.8xlarge" - InstanceTypeD3enXlarge InstanceType = "d3en.xlarge" - InstanceTypeD3en2xlarge InstanceType = "d3en.2xlarge" - InstanceTypeD3en4xlarge InstanceType = "d3en.4xlarge" - InstanceTypeD3en6xlarge InstanceType = "d3en.6xlarge" - InstanceTypeD3en8xlarge InstanceType = "d3en.8xlarge" - InstanceTypeD3en12xlarge InstanceType = "d3en.12xlarge" - InstanceTypeDl124xlarge InstanceType = "dl1.24xlarge" - InstanceTypeF12xlarge InstanceType = "f1.2xlarge" - InstanceTypeF14xlarge InstanceType = "f1.4xlarge" - InstanceTypeF116xlarge InstanceType = "f1.16xlarge" - InstanceTypeG22xlarge InstanceType = "g2.2xlarge" - InstanceTypeG28xlarge InstanceType = "g2.8xlarge" - InstanceTypeG34xlarge InstanceType = "g3.4xlarge" - InstanceTypeG38xlarge InstanceType = "g3.8xlarge" - InstanceTypeG316xlarge InstanceType = "g3.16xlarge" - InstanceTypeG3sXlarge InstanceType = "g3s.xlarge" - InstanceTypeG4adXlarge InstanceType = "g4ad.xlarge" - InstanceTypeG4ad2xlarge InstanceType = "g4ad.2xlarge" - InstanceTypeG4ad4xlarge InstanceType = "g4ad.4xlarge" - InstanceTypeG4ad8xlarge InstanceType = "g4ad.8xlarge" - InstanceTypeG4ad16xlarge InstanceType = "g4ad.16xlarge" - InstanceTypeG4dnXlarge InstanceType = "g4dn.xlarge" - InstanceTypeG4dn2xlarge InstanceType = "g4dn.2xlarge" - InstanceTypeG4dn4xlarge InstanceType = "g4dn.4xlarge" - InstanceTypeG4dn8xlarge InstanceType = "g4dn.8xlarge" - InstanceTypeG4dn12xlarge InstanceType = "g4dn.12xlarge" - InstanceTypeG4dn16xlarge InstanceType = "g4dn.16xlarge" - InstanceTypeG4dnMetal InstanceType = "g4dn.metal" - InstanceTypeG5Xlarge InstanceType = "g5.xlarge" - InstanceTypeG52xlarge InstanceType = "g5.2xlarge" - InstanceTypeG54xlarge InstanceType = "g5.4xlarge" - InstanceTypeG58xlarge InstanceType = "g5.8xlarge" - InstanceTypeG512xlarge InstanceType = "g5.12xlarge" - InstanceTypeG516xlarge InstanceType = "g5.16xlarge" - InstanceTypeG524xlarge InstanceType = "g5.24xlarge" - InstanceTypeG548xlarge InstanceType = "g5.48xlarge" - InstanceTypeG5gXlarge InstanceType = "g5g.xlarge" - InstanceTypeG5g2xlarge InstanceType = "g5g.2xlarge" - InstanceTypeG5g4xlarge InstanceType = "g5g.4xlarge" - InstanceTypeG5g8xlarge InstanceType = "g5g.8xlarge" - InstanceTypeG5g16xlarge InstanceType = "g5g.16xlarge" - InstanceTypeG5gMetal InstanceType = "g5g.metal" - InstanceTypeHi14xlarge InstanceType = "hi1.4xlarge" - InstanceTypeHpc6a48xlarge InstanceType = "hpc6a.48xlarge" - InstanceTypeHs18xlarge InstanceType = "hs1.8xlarge" - InstanceTypeH12xlarge InstanceType = "h1.2xlarge" - InstanceTypeH14xlarge InstanceType = "h1.4xlarge" - InstanceTypeH18xlarge InstanceType = "h1.8xlarge" - InstanceTypeH116xlarge InstanceType = "h1.16xlarge" - InstanceTypeI2Xlarge InstanceType = "i2.xlarge" - InstanceTypeI22xlarge InstanceType = "i2.2xlarge" - InstanceTypeI24xlarge InstanceType = "i2.4xlarge" - InstanceTypeI28xlarge InstanceType = "i2.8xlarge" - InstanceTypeI3Large InstanceType = "i3.large" - InstanceTypeI3Xlarge InstanceType = "i3.xlarge" - InstanceTypeI32xlarge InstanceType = "i3.2xlarge" - InstanceTypeI34xlarge InstanceType = "i3.4xlarge" - InstanceTypeI38xlarge InstanceType = "i3.8xlarge" - InstanceTypeI316xlarge InstanceType = "i3.16xlarge" - InstanceTypeI3Metal InstanceType = "i3.metal" - InstanceTypeI3enLarge InstanceType = "i3en.large" - InstanceTypeI3enXlarge InstanceType = "i3en.xlarge" - InstanceTypeI3en2xlarge InstanceType = "i3en.2xlarge" - InstanceTypeI3en3xlarge InstanceType = "i3en.3xlarge" - InstanceTypeI3en6xlarge InstanceType = "i3en.6xlarge" - InstanceTypeI3en12xlarge InstanceType = "i3en.12xlarge" - InstanceTypeI3en24xlarge InstanceType = "i3en.24xlarge" - InstanceTypeI3enMetal InstanceType = "i3en.metal" - InstanceTypeIm4gnLarge InstanceType = "im4gn.large" - InstanceTypeIm4gnXlarge InstanceType = "im4gn.xlarge" - InstanceTypeIm4gn2xlarge InstanceType = "im4gn.2xlarge" - InstanceTypeIm4gn4xlarge InstanceType = "im4gn.4xlarge" - InstanceTypeIm4gn8xlarge InstanceType = "im4gn.8xlarge" - InstanceTypeIm4gn16xlarge InstanceType = "im4gn.16xlarge" - InstanceTypeInf1Xlarge InstanceType = "inf1.xlarge" - InstanceTypeInf12xlarge InstanceType = "inf1.2xlarge" - InstanceTypeInf16xlarge InstanceType = "inf1.6xlarge" - InstanceTypeInf124xlarge InstanceType = "inf1.24xlarge" - InstanceTypeIs4genMedium InstanceType = "is4gen.medium" - InstanceTypeIs4genLarge InstanceType = "is4gen.large" - InstanceTypeIs4genXlarge InstanceType = "is4gen.xlarge" - InstanceTypeIs4gen2xlarge InstanceType = "is4gen.2xlarge" - InstanceTypeIs4gen4xlarge InstanceType = "is4gen.4xlarge" - InstanceTypeIs4gen8xlarge InstanceType = "is4gen.8xlarge" - InstanceTypeM1Small InstanceType = "m1.small" - InstanceTypeM1Medium InstanceType = "m1.medium" - InstanceTypeM1Large InstanceType = "m1.large" - InstanceTypeM1Xlarge InstanceType = "m1.xlarge" - InstanceTypeM2Xlarge InstanceType = "m2.xlarge" - InstanceTypeM22xlarge InstanceType = "m2.2xlarge" - InstanceTypeM24xlarge InstanceType = "m2.4xlarge" - InstanceTypeM3Medium InstanceType = "m3.medium" - InstanceTypeM3Large InstanceType = "m3.large" - InstanceTypeM3Xlarge InstanceType = "m3.xlarge" - InstanceTypeM32xlarge InstanceType = "m3.2xlarge" - InstanceTypeM4Large InstanceType = "m4.large" - InstanceTypeM4Xlarge InstanceType = "m4.xlarge" - InstanceTypeM42xlarge InstanceType = "m4.2xlarge" - InstanceTypeM44xlarge InstanceType = "m4.4xlarge" - InstanceTypeM410xlarge InstanceType = "m4.10xlarge" - InstanceTypeM416xlarge InstanceType = "m4.16xlarge" - InstanceTypeM5Large InstanceType = "m5.large" - InstanceTypeM5Xlarge InstanceType = "m5.xlarge" - InstanceTypeM52xlarge InstanceType = "m5.2xlarge" - InstanceTypeM54xlarge InstanceType = "m5.4xlarge" - InstanceTypeM58xlarge InstanceType = "m5.8xlarge" - InstanceTypeM512xlarge InstanceType = "m5.12xlarge" - InstanceTypeM516xlarge InstanceType = "m5.16xlarge" - InstanceTypeM524xlarge InstanceType = "m5.24xlarge" - InstanceTypeM5Metal InstanceType = "m5.metal" - InstanceTypeM5aLarge InstanceType = "m5a.large" - InstanceTypeM5aXlarge InstanceType = "m5a.xlarge" - InstanceTypeM5a2xlarge InstanceType = "m5a.2xlarge" - InstanceTypeM5a4xlarge InstanceType = "m5a.4xlarge" - InstanceTypeM5a8xlarge InstanceType = "m5a.8xlarge" - InstanceTypeM5a12xlarge InstanceType = "m5a.12xlarge" - InstanceTypeM5a16xlarge InstanceType = "m5a.16xlarge" - InstanceTypeM5a24xlarge InstanceType = "m5a.24xlarge" - InstanceTypeM5adLarge InstanceType = "m5ad.large" - InstanceTypeM5adXlarge InstanceType = "m5ad.xlarge" - InstanceTypeM5ad2xlarge InstanceType = "m5ad.2xlarge" - InstanceTypeM5ad4xlarge InstanceType = "m5ad.4xlarge" - InstanceTypeM5ad8xlarge InstanceType = "m5ad.8xlarge" - InstanceTypeM5ad12xlarge InstanceType = "m5ad.12xlarge" - InstanceTypeM5ad16xlarge InstanceType = "m5ad.16xlarge" - InstanceTypeM5ad24xlarge InstanceType = "m5ad.24xlarge" - InstanceTypeM5dLarge InstanceType = "m5d.large" - InstanceTypeM5dXlarge InstanceType = "m5d.xlarge" - InstanceTypeM5d2xlarge InstanceType = "m5d.2xlarge" - InstanceTypeM5d4xlarge InstanceType = "m5d.4xlarge" - InstanceTypeM5d8xlarge InstanceType = "m5d.8xlarge" - InstanceTypeM5d12xlarge InstanceType = "m5d.12xlarge" - InstanceTypeM5d16xlarge InstanceType = "m5d.16xlarge" - InstanceTypeM5d24xlarge InstanceType = "m5d.24xlarge" - InstanceTypeM5dMetal InstanceType = "m5d.metal" - InstanceTypeM5dnLarge InstanceType = "m5dn.large" - InstanceTypeM5dnXlarge InstanceType = "m5dn.xlarge" - InstanceTypeM5dn2xlarge InstanceType = "m5dn.2xlarge" - InstanceTypeM5dn4xlarge InstanceType = "m5dn.4xlarge" - InstanceTypeM5dn8xlarge InstanceType = "m5dn.8xlarge" - InstanceTypeM5dn12xlarge InstanceType = "m5dn.12xlarge" - InstanceTypeM5dn16xlarge InstanceType = "m5dn.16xlarge" - InstanceTypeM5dn24xlarge InstanceType = "m5dn.24xlarge" - InstanceTypeM5dnMetal InstanceType = "m5dn.metal" - InstanceTypeM5nLarge InstanceType = "m5n.large" - InstanceTypeM5nXlarge InstanceType = "m5n.xlarge" - InstanceTypeM5n2xlarge InstanceType = "m5n.2xlarge" - InstanceTypeM5n4xlarge InstanceType = "m5n.4xlarge" - InstanceTypeM5n8xlarge InstanceType = "m5n.8xlarge" - InstanceTypeM5n12xlarge InstanceType = "m5n.12xlarge" - InstanceTypeM5n16xlarge InstanceType = "m5n.16xlarge" - InstanceTypeM5n24xlarge InstanceType = "m5n.24xlarge" - InstanceTypeM5nMetal InstanceType = "m5n.metal" - InstanceTypeM5znLarge InstanceType = "m5zn.large" - InstanceTypeM5znXlarge InstanceType = "m5zn.xlarge" - InstanceTypeM5zn2xlarge InstanceType = "m5zn.2xlarge" - InstanceTypeM5zn3xlarge InstanceType = "m5zn.3xlarge" - InstanceTypeM5zn6xlarge InstanceType = "m5zn.6xlarge" - InstanceTypeM5zn12xlarge InstanceType = "m5zn.12xlarge" - InstanceTypeM5znMetal InstanceType = "m5zn.metal" - InstanceTypeM6aLarge InstanceType = "m6a.large" - InstanceTypeM6aXlarge InstanceType = "m6a.xlarge" - InstanceTypeM6a2xlarge InstanceType = "m6a.2xlarge" - InstanceTypeM6a4xlarge InstanceType = "m6a.4xlarge" - InstanceTypeM6a8xlarge InstanceType = "m6a.8xlarge" - InstanceTypeM6a12xlarge InstanceType = "m6a.12xlarge" - InstanceTypeM6a16xlarge InstanceType = "m6a.16xlarge" - InstanceTypeM6a24xlarge InstanceType = "m6a.24xlarge" - InstanceTypeM6a32xlarge InstanceType = "m6a.32xlarge" - InstanceTypeM6a48xlarge InstanceType = "m6a.48xlarge" - InstanceTypeM6gMetal InstanceType = "m6g.metal" - InstanceTypeM6gMedium InstanceType = "m6g.medium" - InstanceTypeM6gLarge InstanceType = "m6g.large" - InstanceTypeM6gXlarge InstanceType = "m6g.xlarge" - InstanceTypeM6g2xlarge InstanceType = "m6g.2xlarge" - InstanceTypeM6g4xlarge InstanceType = "m6g.4xlarge" - InstanceTypeM6g8xlarge InstanceType = "m6g.8xlarge" - InstanceTypeM6g12xlarge InstanceType = "m6g.12xlarge" - InstanceTypeM6g16xlarge InstanceType = "m6g.16xlarge" - InstanceTypeM6gdMetal InstanceType = "m6gd.metal" - InstanceTypeM6gdMedium InstanceType = "m6gd.medium" - InstanceTypeM6gdLarge InstanceType = "m6gd.large" - InstanceTypeM6gdXlarge InstanceType = "m6gd.xlarge" - InstanceTypeM6gd2xlarge InstanceType = "m6gd.2xlarge" - InstanceTypeM6gd4xlarge InstanceType = "m6gd.4xlarge" - InstanceTypeM6gd8xlarge InstanceType = "m6gd.8xlarge" - InstanceTypeM6gd12xlarge InstanceType = "m6gd.12xlarge" - InstanceTypeM6gd16xlarge InstanceType = "m6gd.16xlarge" - InstanceTypeM6iLarge InstanceType = "m6i.large" - InstanceTypeM6iXlarge InstanceType = "m6i.xlarge" - InstanceTypeM6i2xlarge InstanceType = "m6i.2xlarge" - InstanceTypeM6i4xlarge InstanceType = "m6i.4xlarge" - InstanceTypeM6i8xlarge InstanceType = "m6i.8xlarge" - InstanceTypeM6i12xlarge InstanceType = "m6i.12xlarge" - InstanceTypeM6i16xlarge InstanceType = "m6i.16xlarge" - InstanceTypeM6i24xlarge InstanceType = "m6i.24xlarge" - InstanceTypeM6i32xlarge InstanceType = "m6i.32xlarge" - InstanceTypeM6iMetal InstanceType = "m6i.metal" - InstanceTypeMac1Metal InstanceType = "mac1.metal" - InstanceTypeP2Xlarge InstanceType = "p2.xlarge" - InstanceTypeP28xlarge InstanceType = "p2.8xlarge" - InstanceTypeP216xlarge InstanceType = "p2.16xlarge" - InstanceTypeP32xlarge InstanceType = "p3.2xlarge" - InstanceTypeP38xlarge InstanceType = "p3.8xlarge" - InstanceTypeP316xlarge InstanceType = "p3.16xlarge" - InstanceTypeP3dn24xlarge InstanceType = "p3dn.24xlarge" - InstanceTypeP4d24xlarge InstanceType = "p4d.24xlarge" - InstanceTypeR3Large InstanceType = "r3.large" - InstanceTypeR3Xlarge InstanceType = "r3.xlarge" - InstanceTypeR32xlarge InstanceType = "r3.2xlarge" - InstanceTypeR34xlarge InstanceType = "r3.4xlarge" - InstanceTypeR38xlarge InstanceType = "r3.8xlarge" - InstanceTypeR4Large InstanceType = "r4.large" - InstanceTypeR4Xlarge InstanceType = "r4.xlarge" - InstanceTypeR42xlarge InstanceType = "r4.2xlarge" - InstanceTypeR44xlarge InstanceType = "r4.4xlarge" - InstanceTypeR48xlarge InstanceType = "r4.8xlarge" - InstanceTypeR416xlarge InstanceType = "r4.16xlarge" - InstanceTypeR5Large InstanceType = "r5.large" - InstanceTypeR5Xlarge InstanceType = "r5.xlarge" - InstanceTypeR52xlarge InstanceType = "r5.2xlarge" - InstanceTypeR54xlarge InstanceType = "r5.4xlarge" - InstanceTypeR58xlarge InstanceType = "r5.8xlarge" - InstanceTypeR512xlarge InstanceType = "r5.12xlarge" - InstanceTypeR516xlarge InstanceType = "r5.16xlarge" - InstanceTypeR524xlarge InstanceType = "r5.24xlarge" - InstanceTypeR5Metal InstanceType = "r5.metal" - InstanceTypeR5aLarge InstanceType = "r5a.large" - InstanceTypeR5aXlarge InstanceType = "r5a.xlarge" - InstanceTypeR5a2xlarge InstanceType = "r5a.2xlarge" - InstanceTypeR5a4xlarge InstanceType = "r5a.4xlarge" - InstanceTypeR5a8xlarge InstanceType = "r5a.8xlarge" - InstanceTypeR5a12xlarge InstanceType = "r5a.12xlarge" - InstanceTypeR5a16xlarge InstanceType = "r5a.16xlarge" - InstanceTypeR5a24xlarge InstanceType = "r5a.24xlarge" - InstanceTypeR5adLarge InstanceType = "r5ad.large" - InstanceTypeR5adXlarge InstanceType = "r5ad.xlarge" - InstanceTypeR5ad2xlarge InstanceType = "r5ad.2xlarge" - InstanceTypeR5ad4xlarge InstanceType = "r5ad.4xlarge" - InstanceTypeR5ad8xlarge InstanceType = "r5ad.8xlarge" - InstanceTypeR5ad12xlarge InstanceType = "r5ad.12xlarge" - InstanceTypeR5ad16xlarge InstanceType = "r5ad.16xlarge" - InstanceTypeR5ad24xlarge InstanceType = "r5ad.24xlarge" - InstanceTypeR5bLarge InstanceType = "r5b.large" - InstanceTypeR5bXlarge InstanceType = "r5b.xlarge" - InstanceTypeR5b2xlarge InstanceType = "r5b.2xlarge" - InstanceTypeR5b4xlarge InstanceType = "r5b.4xlarge" - InstanceTypeR5b8xlarge InstanceType = "r5b.8xlarge" - InstanceTypeR5b12xlarge InstanceType = "r5b.12xlarge" - InstanceTypeR5b16xlarge InstanceType = "r5b.16xlarge" - InstanceTypeR5b24xlarge InstanceType = "r5b.24xlarge" - InstanceTypeR5bMetal InstanceType = "r5b.metal" - InstanceTypeR5dLarge InstanceType = "r5d.large" - InstanceTypeR5dXlarge InstanceType = "r5d.xlarge" - InstanceTypeR5d2xlarge InstanceType = "r5d.2xlarge" - InstanceTypeR5d4xlarge InstanceType = "r5d.4xlarge" - InstanceTypeR5d8xlarge InstanceType = "r5d.8xlarge" - InstanceTypeR5d12xlarge InstanceType = "r5d.12xlarge" - InstanceTypeR5d16xlarge InstanceType = "r5d.16xlarge" - InstanceTypeR5d24xlarge InstanceType = "r5d.24xlarge" - InstanceTypeR5dMetal InstanceType = "r5d.metal" - InstanceTypeR5dnLarge InstanceType = "r5dn.large" - InstanceTypeR5dnXlarge InstanceType = "r5dn.xlarge" - InstanceTypeR5dn2xlarge InstanceType = "r5dn.2xlarge" - InstanceTypeR5dn4xlarge InstanceType = "r5dn.4xlarge" - InstanceTypeR5dn8xlarge InstanceType = "r5dn.8xlarge" - InstanceTypeR5dn12xlarge InstanceType = "r5dn.12xlarge" - InstanceTypeR5dn16xlarge InstanceType = "r5dn.16xlarge" - InstanceTypeR5dn24xlarge InstanceType = "r5dn.24xlarge" - InstanceTypeR5dnMetal InstanceType = "r5dn.metal" - InstanceTypeR5nLarge InstanceType = "r5n.large" - InstanceTypeR5nXlarge InstanceType = "r5n.xlarge" - InstanceTypeR5n2xlarge InstanceType = "r5n.2xlarge" - InstanceTypeR5n4xlarge InstanceType = "r5n.4xlarge" - InstanceTypeR5n8xlarge InstanceType = "r5n.8xlarge" - InstanceTypeR5n12xlarge InstanceType = "r5n.12xlarge" - InstanceTypeR5n16xlarge InstanceType = "r5n.16xlarge" - InstanceTypeR5n24xlarge InstanceType = "r5n.24xlarge" - InstanceTypeR5nMetal InstanceType = "r5n.metal" - InstanceTypeR6gMedium InstanceType = "r6g.medium" - InstanceTypeR6gLarge InstanceType = "r6g.large" - InstanceTypeR6gXlarge InstanceType = "r6g.xlarge" - InstanceTypeR6g2xlarge InstanceType = "r6g.2xlarge" - InstanceTypeR6g4xlarge InstanceType = "r6g.4xlarge" - InstanceTypeR6g8xlarge InstanceType = "r6g.8xlarge" - InstanceTypeR6g12xlarge InstanceType = "r6g.12xlarge" - InstanceTypeR6g16xlarge InstanceType = "r6g.16xlarge" - InstanceTypeR6gMetal InstanceType = "r6g.metal" - InstanceTypeR6gdMedium InstanceType = "r6gd.medium" - InstanceTypeR6gdLarge InstanceType = "r6gd.large" - InstanceTypeR6gdXlarge InstanceType = "r6gd.xlarge" - InstanceTypeR6gd2xlarge InstanceType = "r6gd.2xlarge" - InstanceTypeR6gd4xlarge InstanceType = "r6gd.4xlarge" - InstanceTypeR6gd8xlarge InstanceType = "r6gd.8xlarge" - InstanceTypeR6gd12xlarge InstanceType = "r6gd.12xlarge" - InstanceTypeR6gd16xlarge InstanceType = "r6gd.16xlarge" - InstanceTypeR6gdMetal InstanceType = "r6gd.metal" - InstanceTypeR6iLarge InstanceType = "r6i.large" - InstanceTypeR6iXlarge InstanceType = "r6i.xlarge" - InstanceTypeR6i2xlarge InstanceType = "r6i.2xlarge" - InstanceTypeR6i4xlarge InstanceType = "r6i.4xlarge" - InstanceTypeR6i8xlarge InstanceType = "r6i.8xlarge" - InstanceTypeR6i12xlarge InstanceType = "r6i.12xlarge" - InstanceTypeR6i16xlarge InstanceType = "r6i.16xlarge" - InstanceTypeR6i24xlarge InstanceType = "r6i.24xlarge" - InstanceTypeR6i32xlarge InstanceType = "r6i.32xlarge" - InstanceTypeR6iMetal InstanceType = "r6i.metal" - InstanceTypeT1Micro InstanceType = "t1.micro" - InstanceTypeT2Nano InstanceType = "t2.nano" - InstanceTypeT2Micro InstanceType = "t2.micro" - InstanceTypeT2Small InstanceType = "t2.small" - InstanceTypeT2Medium InstanceType = "t2.medium" - InstanceTypeT2Large InstanceType = "t2.large" - InstanceTypeT2Xlarge InstanceType = "t2.xlarge" - InstanceTypeT22xlarge InstanceType = "t2.2xlarge" - InstanceTypeT3Nano InstanceType = "t3.nano" - InstanceTypeT3Micro InstanceType = "t3.micro" - InstanceTypeT3Small InstanceType = "t3.small" - InstanceTypeT3Medium InstanceType = "t3.medium" - InstanceTypeT3Large InstanceType = "t3.large" - InstanceTypeT3Xlarge InstanceType = "t3.xlarge" - InstanceTypeT32xlarge InstanceType = "t3.2xlarge" - InstanceTypeT3aNano InstanceType = "t3a.nano" - InstanceTypeT3aMicro InstanceType = "t3a.micro" - InstanceTypeT3aSmall InstanceType = "t3a.small" - InstanceTypeT3aMedium InstanceType = "t3a.medium" - InstanceTypeT3aLarge InstanceType = "t3a.large" - InstanceTypeT3aXlarge InstanceType = "t3a.xlarge" - InstanceTypeT3a2xlarge InstanceType = "t3a.2xlarge" - InstanceTypeT4gNano InstanceType = "t4g.nano" - InstanceTypeT4gMicro InstanceType = "t4g.micro" - InstanceTypeT4gSmall InstanceType = "t4g.small" - InstanceTypeT4gMedium InstanceType = "t4g.medium" - InstanceTypeT4gLarge InstanceType = "t4g.large" - InstanceTypeT4gXlarge InstanceType = "t4g.xlarge" - InstanceTypeT4g2xlarge InstanceType = "t4g.2xlarge" - InstanceTypeU6tb156xlarge InstanceType = "u-6tb1.56xlarge" - InstanceTypeU6tb1112xlarge InstanceType = "u-6tb1.112xlarge" - InstanceTypeU9tb1112xlarge InstanceType = "u-9tb1.112xlarge" - InstanceTypeU12tb1112xlarge InstanceType = "u-12tb1.112xlarge" - InstanceTypeU6tb1Metal InstanceType = "u-6tb1.metal" - InstanceTypeU9tb1Metal InstanceType = "u-9tb1.metal" - InstanceTypeU12tb1Metal InstanceType = "u-12tb1.metal" - InstanceTypeU18tb1Metal InstanceType = "u-18tb1.metal" - InstanceTypeU24tb1Metal InstanceType = "u-24tb1.metal" - InstanceTypeVt13xlarge InstanceType = "vt1.3xlarge" - InstanceTypeVt16xlarge InstanceType = "vt1.6xlarge" - InstanceTypeVt124xlarge InstanceType = "vt1.24xlarge" - InstanceTypeX116xlarge InstanceType = "x1.16xlarge" - InstanceTypeX132xlarge InstanceType = "x1.32xlarge" - InstanceTypeX1eXlarge InstanceType = "x1e.xlarge" - InstanceTypeX1e2xlarge InstanceType = "x1e.2xlarge" - InstanceTypeX1e4xlarge InstanceType = "x1e.4xlarge" - InstanceTypeX1e8xlarge InstanceType = "x1e.8xlarge" - InstanceTypeX1e16xlarge InstanceType = "x1e.16xlarge" - InstanceTypeX1e32xlarge InstanceType = "x1e.32xlarge" - InstanceTypeX2iezn2xlarge InstanceType = "x2iezn.2xlarge" - InstanceTypeX2iezn4xlarge InstanceType = "x2iezn.4xlarge" - InstanceTypeX2iezn6xlarge InstanceType = "x2iezn.6xlarge" - InstanceTypeX2iezn8xlarge InstanceType = "x2iezn.8xlarge" - InstanceTypeX2iezn12xlarge InstanceType = "x2iezn.12xlarge" - InstanceTypeX2ieznMetal InstanceType = "x2iezn.metal" - InstanceTypeX2gdMedium InstanceType = "x2gd.medium" - InstanceTypeX2gdLarge InstanceType = "x2gd.large" - InstanceTypeX2gdXlarge InstanceType = "x2gd.xlarge" - InstanceTypeX2gd2xlarge InstanceType = "x2gd.2xlarge" - InstanceTypeX2gd4xlarge InstanceType = "x2gd.4xlarge" - InstanceTypeX2gd8xlarge InstanceType = "x2gd.8xlarge" - InstanceTypeX2gd12xlarge InstanceType = "x2gd.12xlarge" - InstanceTypeX2gd16xlarge InstanceType = "x2gd.16xlarge" - InstanceTypeX2gdMetal InstanceType = "x2gd.metal" - InstanceTypeZ1dLarge InstanceType = "z1d.large" - InstanceTypeZ1dXlarge InstanceType = "z1d.xlarge" - InstanceTypeZ1d2xlarge InstanceType = "z1d.2xlarge" - InstanceTypeZ1d3xlarge InstanceType = "z1d.3xlarge" - InstanceTypeZ1d6xlarge InstanceType = "z1d.6xlarge" - InstanceTypeZ1d12xlarge InstanceType = "z1d.12xlarge" - InstanceTypeZ1dMetal InstanceType = "z1d.metal" - InstanceTypeX2idn16xlarge InstanceType = "x2idn.16xlarge" - InstanceTypeX2idn24xlarge InstanceType = "x2idn.24xlarge" - InstanceTypeX2idn32xlarge InstanceType = "x2idn.32xlarge" - InstanceTypeX2iednXlarge InstanceType = "x2iedn.xlarge" - InstanceTypeX2iedn2xlarge InstanceType = "x2iedn.2xlarge" - InstanceTypeX2iedn4xlarge InstanceType = "x2iedn.4xlarge" - InstanceTypeX2iedn8xlarge InstanceType = "x2iedn.8xlarge" - InstanceTypeX2iedn16xlarge InstanceType = "x2iedn.16xlarge" - InstanceTypeX2iedn24xlarge InstanceType = "x2iedn.24xlarge" - InstanceTypeX2iedn32xlarge InstanceType = "x2iedn.32xlarge" - InstanceTypeC6aLarge InstanceType = "c6a.large" - InstanceTypeC6aXlarge InstanceType = "c6a.xlarge" - InstanceTypeC6a2xlarge InstanceType = "c6a.2xlarge" - InstanceTypeC6a4xlarge InstanceType = "c6a.4xlarge" - InstanceTypeC6a8xlarge InstanceType = "c6a.8xlarge" - InstanceTypeC6a12xlarge InstanceType = "c6a.12xlarge" - InstanceTypeC6a16xlarge InstanceType = "c6a.16xlarge" - InstanceTypeC6a24xlarge InstanceType = "c6a.24xlarge" - InstanceTypeC6a32xlarge InstanceType = "c6a.32xlarge" - InstanceTypeC6a48xlarge InstanceType = "c6a.48xlarge" - InstanceTypeC6aMetal InstanceType = "c6a.metal" - InstanceTypeM6aMetal InstanceType = "m6a.metal" - InstanceTypeI4iLarge InstanceType = "i4i.large" - InstanceTypeI4iXlarge InstanceType = "i4i.xlarge" - InstanceTypeI4i2xlarge InstanceType = "i4i.2xlarge" - InstanceTypeI4i4xlarge InstanceType = "i4i.4xlarge" - InstanceTypeI4i8xlarge InstanceType = "i4i.8xlarge" - InstanceTypeI4i16xlarge InstanceType = "i4i.16xlarge" - InstanceTypeI4i32xlarge InstanceType = "i4i.32xlarge" - InstanceTypeI4iMetal InstanceType = "i4i.metal" - InstanceTypeX2idnMetal InstanceType = "x2idn.metal" - InstanceTypeX2iednMetal InstanceType = "x2iedn.metal" - InstanceTypeC7gMedium InstanceType = "c7g.medium" - InstanceTypeC7gLarge InstanceType = "c7g.large" - InstanceTypeC7gXlarge InstanceType = "c7g.xlarge" - InstanceTypeC7g2xlarge InstanceType = "c7g.2xlarge" - InstanceTypeC7g4xlarge InstanceType = "c7g.4xlarge" - InstanceTypeC7g8xlarge InstanceType = "c7g.8xlarge" - InstanceTypeC7g12xlarge InstanceType = "c7g.12xlarge" - InstanceTypeC7g16xlarge InstanceType = "c7g.16xlarge" - InstanceTypeMac2Metal InstanceType = "mac2.metal" - InstanceTypeC6idLarge InstanceType = "c6id.large" - InstanceTypeC6idXlarge InstanceType = "c6id.xlarge" - InstanceTypeC6id2xlarge InstanceType = "c6id.2xlarge" - InstanceTypeC6id4xlarge InstanceType = "c6id.4xlarge" - InstanceTypeC6id8xlarge InstanceType = "c6id.8xlarge" - InstanceTypeC6id12xlarge InstanceType = "c6id.12xlarge" - InstanceTypeC6id16xlarge InstanceType = "c6id.16xlarge" - InstanceTypeC6id24xlarge InstanceType = "c6id.24xlarge" - InstanceTypeC6id32xlarge InstanceType = "c6id.32xlarge" - InstanceTypeC6idMetal InstanceType = "c6id.metal" - InstanceTypeM6idLarge InstanceType = "m6id.large" - InstanceTypeM6idXlarge InstanceType = "m6id.xlarge" - InstanceTypeM6id2xlarge InstanceType = "m6id.2xlarge" - InstanceTypeM6id4xlarge InstanceType = "m6id.4xlarge" - InstanceTypeM6id8xlarge InstanceType = "m6id.8xlarge" - InstanceTypeM6id12xlarge InstanceType = "m6id.12xlarge" - InstanceTypeM6id16xlarge InstanceType = "m6id.16xlarge" - InstanceTypeM6id24xlarge InstanceType = "m6id.24xlarge" - InstanceTypeM6id32xlarge InstanceType = "m6id.32xlarge" - InstanceTypeM6idMetal InstanceType = "m6id.metal" - InstanceTypeR6idLarge InstanceType = "r6id.large" - InstanceTypeR6idXlarge InstanceType = "r6id.xlarge" - InstanceTypeR6id2xlarge InstanceType = "r6id.2xlarge" - InstanceTypeR6id4xlarge InstanceType = "r6id.4xlarge" - InstanceTypeR6id8xlarge InstanceType = "r6id.8xlarge" - InstanceTypeR6id12xlarge InstanceType = "r6id.12xlarge" - InstanceTypeR6id16xlarge InstanceType = "r6id.16xlarge" - InstanceTypeR6id24xlarge InstanceType = "r6id.24xlarge" - InstanceTypeR6id32xlarge InstanceType = "r6id.32xlarge" - InstanceTypeR6idMetal InstanceType = "r6id.metal" - InstanceTypeR6aLarge InstanceType = "r6a.large" - InstanceTypeR6aXlarge InstanceType = "r6a.xlarge" - InstanceTypeR6a2xlarge InstanceType = "r6a.2xlarge" - InstanceTypeR6a4xlarge InstanceType = "r6a.4xlarge" - InstanceTypeR6a8xlarge InstanceType = "r6a.8xlarge" - InstanceTypeR6a12xlarge InstanceType = "r6a.12xlarge" - InstanceTypeR6a16xlarge InstanceType = "r6a.16xlarge" - InstanceTypeR6a24xlarge InstanceType = "r6a.24xlarge" - InstanceTypeR6a32xlarge InstanceType = "r6a.32xlarge" - InstanceTypeR6a48xlarge InstanceType = "r6a.48xlarge" - InstanceTypeR6aMetal InstanceType = "r6a.metal" - InstanceTypeP4de24xlarge InstanceType = "p4de.24xlarge" - InstanceTypeU3tb156xlarge InstanceType = "u-3tb1.56xlarge" - InstanceTypeU18tb1112xlarge InstanceType = "u-18tb1.112xlarge" - InstanceTypeU24tb1112xlarge InstanceType = "u-24tb1.112xlarge" - InstanceTypeTrn12xlarge InstanceType = "trn1.2xlarge" - InstanceTypeTrn132xlarge InstanceType = "trn1.32xlarge" - InstanceTypeHpc6id32xlarge InstanceType = "hpc6id.32xlarge" - InstanceTypeC6inLarge InstanceType = "c6in.large" - InstanceTypeC6inXlarge InstanceType = "c6in.xlarge" - InstanceTypeC6in2xlarge InstanceType = "c6in.2xlarge" - InstanceTypeC6in4xlarge InstanceType = "c6in.4xlarge" - InstanceTypeC6in8xlarge InstanceType = "c6in.8xlarge" - InstanceTypeC6in12xlarge InstanceType = "c6in.12xlarge" - InstanceTypeC6in16xlarge InstanceType = "c6in.16xlarge" - InstanceTypeC6in24xlarge InstanceType = "c6in.24xlarge" - InstanceTypeC6in32xlarge InstanceType = "c6in.32xlarge" - InstanceTypeM6inLarge InstanceType = "m6in.large" - InstanceTypeM6inXlarge InstanceType = "m6in.xlarge" - InstanceTypeM6in2xlarge InstanceType = "m6in.2xlarge" - InstanceTypeM6in4xlarge InstanceType = "m6in.4xlarge" - InstanceTypeM6in8xlarge InstanceType = "m6in.8xlarge" - InstanceTypeM6in12xlarge InstanceType = "m6in.12xlarge" - InstanceTypeM6in16xlarge InstanceType = "m6in.16xlarge" - InstanceTypeM6in24xlarge InstanceType = "m6in.24xlarge" - InstanceTypeM6in32xlarge InstanceType = "m6in.32xlarge" - InstanceTypeM6idnLarge InstanceType = "m6idn.large" - InstanceTypeM6idnXlarge InstanceType = "m6idn.xlarge" - InstanceTypeM6idn2xlarge InstanceType = "m6idn.2xlarge" - InstanceTypeM6idn4xlarge InstanceType = "m6idn.4xlarge" - InstanceTypeM6idn8xlarge InstanceType = "m6idn.8xlarge" - InstanceTypeM6idn12xlarge InstanceType = "m6idn.12xlarge" - InstanceTypeM6idn16xlarge InstanceType = "m6idn.16xlarge" - InstanceTypeM6idn24xlarge InstanceType = "m6idn.24xlarge" - InstanceTypeM6idn32xlarge InstanceType = "m6idn.32xlarge" - InstanceTypeR6inLarge InstanceType = "r6in.large" - InstanceTypeR6inXlarge InstanceType = "r6in.xlarge" - InstanceTypeR6in2xlarge InstanceType = "r6in.2xlarge" - InstanceTypeR6in4xlarge InstanceType = "r6in.4xlarge" - InstanceTypeR6in8xlarge InstanceType = "r6in.8xlarge" - InstanceTypeR6in12xlarge InstanceType = "r6in.12xlarge" - InstanceTypeR6in16xlarge InstanceType = "r6in.16xlarge" - InstanceTypeR6in24xlarge InstanceType = "r6in.24xlarge" - InstanceTypeR6in32xlarge InstanceType = "r6in.32xlarge" - InstanceTypeR6idnLarge InstanceType = "r6idn.large" - InstanceTypeR6idnXlarge InstanceType = "r6idn.xlarge" - InstanceTypeR6idn2xlarge InstanceType = "r6idn.2xlarge" - InstanceTypeR6idn4xlarge InstanceType = "r6idn.4xlarge" - InstanceTypeR6idn8xlarge InstanceType = "r6idn.8xlarge" - InstanceTypeR6idn12xlarge InstanceType = "r6idn.12xlarge" - InstanceTypeR6idn16xlarge InstanceType = "r6idn.16xlarge" - InstanceTypeR6idn24xlarge InstanceType = "r6idn.24xlarge" - InstanceTypeR6idn32xlarge InstanceType = "r6idn.32xlarge" - InstanceTypeC7gMetal InstanceType = "c7g.metal" - InstanceTypeM7gMedium InstanceType = "m7g.medium" - InstanceTypeM7gLarge InstanceType = "m7g.large" - InstanceTypeM7gXlarge InstanceType = "m7g.xlarge" - InstanceTypeM7g2xlarge InstanceType = "m7g.2xlarge" - InstanceTypeM7g4xlarge InstanceType = "m7g.4xlarge" - InstanceTypeM7g8xlarge InstanceType = "m7g.8xlarge" - InstanceTypeM7g12xlarge InstanceType = "m7g.12xlarge" - InstanceTypeM7g16xlarge InstanceType = "m7g.16xlarge" - InstanceTypeM7gMetal InstanceType = "m7g.metal" - InstanceTypeR7gMedium InstanceType = "r7g.medium" - InstanceTypeR7gLarge InstanceType = "r7g.large" - InstanceTypeR7gXlarge InstanceType = "r7g.xlarge" - InstanceTypeR7g2xlarge InstanceType = "r7g.2xlarge" - InstanceTypeR7g4xlarge InstanceType = "r7g.4xlarge" - InstanceTypeR7g8xlarge InstanceType = "r7g.8xlarge" - InstanceTypeR7g12xlarge InstanceType = "r7g.12xlarge" - InstanceTypeR7g16xlarge InstanceType = "r7g.16xlarge" - InstanceTypeR7gMetal InstanceType = "r7g.metal" - InstanceTypeC6inMetal InstanceType = "c6in.metal" - InstanceTypeM6inMetal InstanceType = "m6in.metal" - InstanceTypeM6idnMetal InstanceType = "m6idn.metal" - InstanceTypeR6inMetal InstanceType = "r6in.metal" - InstanceTypeR6idnMetal InstanceType = "r6idn.metal" - InstanceTypeInf2Xlarge InstanceType = "inf2.xlarge" - InstanceTypeInf28xlarge InstanceType = "inf2.8xlarge" - InstanceTypeInf224xlarge InstanceType = "inf2.24xlarge" - InstanceTypeInf248xlarge InstanceType = "inf2.48xlarge" - InstanceTypeTrn1n32xlarge InstanceType = "trn1n.32xlarge" - InstanceTypeI4gLarge InstanceType = "i4g.large" - InstanceTypeI4gXlarge InstanceType = "i4g.xlarge" - InstanceTypeI4g2xlarge InstanceType = "i4g.2xlarge" - InstanceTypeI4g4xlarge InstanceType = "i4g.4xlarge" - InstanceTypeI4g8xlarge InstanceType = "i4g.8xlarge" - InstanceTypeI4g16xlarge InstanceType = "i4g.16xlarge" - InstanceTypeHpc7g4xlarge InstanceType = "hpc7g.4xlarge" - InstanceTypeHpc7g8xlarge InstanceType = "hpc7g.8xlarge" - InstanceTypeHpc7g16xlarge InstanceType = "hpc7g.16xlarge" - InstanceTypeC7gnMedium InstanceType = "c7gn.medium" - InstanceTypeC7gnLarge InstanceType = "c7gn.large" - InstanceTypeC7gnXlarge InstanceType = "c7gn.xlarge" - InstanceTypeC7gn2xlarge InstanceType = "c7gn.2xlarge" - InstanceTypeC7gn4xlarge InstanceType = "c7gn.4xlarge" - InstanceTypeC7gn8xlarge InstanceType = "c7gn.8xlarge" - InstanceTypeC7gn12xlarge InstanceType = "c7gn.12xlarge" - InstanceTypeC7gn16xlarge InstanceType = "c7gn.16xlarge" - InstanceTypeP548xlarge InstanceType = "p5.48xlarge" - InstanceTypeM7iLarge InstanceType = "m7i.large" - InstanceTypeM7iXlarge InstanceType = "m7i.xlarge" - InstanceTypeM7i2xlarge InstanceType = "m7i.2xlarge" - InstanceTypeM7i4xlarge InstanceType = "m7i.4xlarge" - InstanceTypeM7i8xlarge InstanceType = "m7i.8xlarge" - InstanceTypeM7i12xlarge InstanceType = "m7i.12xlarge" - InstanceTypeM7i16xlarge InstanceType = "m7i.16xlarge" - InstanceTypeM7i24xlarge InstanceType = "m7i.24xlarge" - InstanceTypeM7i48xlarge InstanceType = "m7i.48xlarge" - InstanceTypeM7iFlexLarge InstanceType = "m7i-flex.large" - InstanceTypeM7iFlexXlarge InstanceType = "m7i-flex.xlarge" - InstanceTypeM7iFlex2xlarge InstanceType = "m7i-flex.2xlarge" - InstanceTypeM7iFlex4xlarge InstanceType = "m7i-flex.4xlarge" - InstanceTypeM7iFlex8xlarge InstanceType = "m7i-flex.8xlarge" - InstanceTypeM7aMedium InstanceType = "m7a.medium" - InstanceTypeM7aLarge InstanceType = "m7a.large" - InstanceTypeM7aXlarge InstanceType = "m7a.xlarge" - InstanceTypeM7a2xlarge InstanceType = "m7a.2xlarge" - InstanceTypeM7a4xlarge InstanceType = "m7a.4xlarge" - InstanceTypeM7a8xlarge InstanceType = "m7a.8xlarge" - InstanceTypeM7a12xlarge InstanceType = "m7a.12xlarge" - InstanceTypeM7a16xlarge InstanceType = "m7a.16xlarge" - InstanceTypeM7a24xlarge InstanceType = "m7a.24xlarge" - InstanceTypeM7a32xlarge InstanceType = "m7a.32xlarge" - InstanceTypeM7a48xlarge InstanceType = "m7a.48xlarge" - InstanceTypeM7aMetal48xl InstanceType = "m7a.metal-48xl" - InstanceTypeHpc7a12xlarge InstanceType = "hpc7a.12xlarge" - InstanceTypeHpc7a24xlarge InstanceType = "hpc7a.24xlarge" - InstanceTypeHpc7a48xlarge InstanceType = "hpc7a.48xlarge" - InstanceTypeHpc7a96xlarge InstanceType = "hpc7a.96xlarge" - InstanceTypeC7gdMedium InstanceType = "c7gd.medium" - InstanceTypeC7gdLarge InstanceType = "c7gd.large" - InstanceTypeC7gdXlarge InstanceType = "c7gd.xlarge" - InstanceTypeC7gd2xlarge InstanceType = "c7gd.2xlarge" - InstanceTypeC7gd4xlarge InstanceType = "c7gd.4xlarge" - InstanceTypeC7gd8xlarge InstanceType = "c7gd.8xlarge" - InstanceTypeC7gd12xlarge InstanceType = "c7gd.12xlarge" - InstanceTypeC7gd16xlarge InstanceType = "c7gd.16xlarge" - InstanceTypeM7gdMedium InstanceType = "m7gd.medium" - InstanceTypeM7gdLarge InstanceType = "m7gd.large" - InstanceTypeM7gdXlarge InstanceType = "m7gd.xlarge" - InstanceTypeM7gd2xlarge InstanceType = "m7gd.2xlarge" - InstanceTypeM7gd4xlarge InstanceType = "m7gd.4xlarge" - InstanceTypeM7gd8xlarge InstanceType = "m7gd.8xlarge" - InstanceTypeM7gd12xlarge InstanceType = "m7gd.12xlarge" - InstanceTypeM7gd16xlarge InstanceType = "m7gd.16xlarge" - InstanceTypeR7gdMedium InstanceType = "r7gd.medium" - InstanceTypeR7gdLarge InstanceType = "r7gd.large" - InstanceTypeR7gdXlarge InstanceType = "r7gd.xlarge" - InstanceTypeR7gd2xlarge InstanceType = "r7gd.2xlarge" - InstanceTypeR7gd4xlarge InstanceType = "r7gd.4xlarge" - InstanceTypeR7gd8xlarge InstanceType = "r7gd.8xlarge" - InstanceTypeR7gd12xlarge InstanceType = "r7gd.12xlarge" - InstanceTypeR7gd16xlarge InstanceType = "r7gd.16xlarge" - InstanceTypeR7aMedium InstanceType = "r7a.medium" - InstanceTypeR7aLarge InstanceType = "r7a.large" - InstanceTypeR7aXlarge InstanceType = "r7a.xlarge" - InstanceTypeR7a2xlarge InstanceType = "r7a.2xlarge" - InstanceTypeR7a4xlarge InstanceType = "r7a.4xlarge" - InstanceTypeR7a8xlarge InstanceType = "r7a.8xlarge" - InstanceTypeR7a12xlarge InstanceType = "r7a.12xlarge" - InstanceTypeR7a16xlarge InstanceType = "r7a.16xlarge" - InstanceTypeR7a24xlarge InstanceType = "r7a.24xlarge" - InstanceTypeR7a32xlarge InstanceType = "r7a.32xlarge" - InstanceTypeR7a48xlarge InstanceType = "r7a.48xlarge" - InstanceTypeC7iLarge InstanceType = "c7i.large" - InstanceTypeC7iXlarge InstanceType = "c7i.xlarge" - InstanceTypeC7i2xlarge InstanceType = "c7i.2xlarge" - InstanceTypeC7i4xlarge InstanceType = "c7i.4xlarge" - InstanceTypeC7i8xlarge InstanceType = "c7i.8xlarge" - InstanceTypeC7i12xlarge InstanceType = "c7i.12xlarge" - InstanceTypeC7i16xlarge InstanceType = "c7i.16xlarge" - InstanceTypeC7i24xlarge InstanceType = "c7i.24xlarge" - InstanceTypeC7i48xlarge InstanceType = "c7i.48xlarge" - InstanceTypeMac2M2proMetal InstanceType = "mac2-m2pro.metal" - InstanceTypeR7izLarge InstanceType = "r7iz.large" - InstanceTypeR7izXlarge InstanceType = "r7iz.xlarge" - InstanceTypeR7iz2xlarge InstanceType = "r7iz.2xlarge" - InstanceTypeR7iz4xlarge InstanceType = "r7iz.4xlarge" - InstanceTypeR7iz8xlarge InstanceType = "r7iz.8xlarge" - InstanceTypeR7iz12xlarge InstanceType = "r7iz.12xlarge" - InstanceTypeR7iz16xlarge InstanceType = "r7iz.16xlarge" - InstanceTypeR7iz32xlarge InstanceType = "r7iz.32xlarge" - InstanceTypeC7aMedium InstanceType = "c7a.medium" - InstanceTypeC7aLarge InstanceType = "c7a.large" - InstanceTypeC7aXlarge InstanceType = "c7a.xlarge" - InstanceTypeC7a2xlarge InstanceType = "c7a.2xlarge" - InstanceTypeC7a4xlarge InstanceType = "c7a.4xlarge" - InstanceTypeC7a8xlarge InstanceType = "c7a.8xlarge" - InstanceTypeC7a12xlarge InstanceType = "c7a.12xlarge" - InstanceTypeC7a16xlarge InstanceType = "c7a.16xlarge" - InstanceTypeC7a24xlarge InstanceType = "c7a.24xlarge" - InstanceTypeC7a32xlarge InstanceType = "c7a.32xlarge" - InstanceTypeC7a48xlarge InstanceType = "c7a.48xlarge" - InstanceTypeC7aMetal48xl InstanceType = "c7a.metal-48xl" - InstanceTypeR7aMetal48xl InstanceType = "r7a.metal-48xl" - InstanceTypeR7iLarge InstanceType = "r7i.large" - InstanceTypeR7iXlarge InstanceType = "r7i.xlarge" - InstanceTypeR7i2xlarge InstanceType = "r7i.2xlarge" - InstanceTypeR7i4xlarge InstanceType = "r7i.4xlarge" - InstanceTypeR7i8xlarge InstanceType = "r7i.8xlarge" - InstanceTypeR7i12xlarge InstanceType = "r7i.12xlarge" - InstanceTypeR7i16xlarge InstanceType = "r7i.16xlarge" - InstanceTypeR7i24xlarge InstanceType = "r7i.24xlarge" - InstanceTypeR7i48xlarge InstanceType = "r7i.48xlarge" - InstanceTypeDl2q24xlarge InstanceType = "dl2q.24xlarge" - InstanceTypeMac2M2Metal InstanceType = "mac2-m2.metal" - InstanceTypeI4i12xlarge InstanceType = "i4i.12xlarge" - InstanceTypeI4i24xlarge InstanceType = "i4i.24xlarge" - InstanceTypeC7iMetal24xl InstanceType = "c7i.metal-24xl" - InstanceTypeC7iMetal48xl InstanceType = "c7i.metal-48xl" - InstanceTypeM7iMetal24xl InstanceType = "m7i.metal-24xl" - InstanceTypeM7iMetal48xl InstanceType = "m7i.metal-48xl" - InstanceTypeR7iMetal24xl InstanceType = "r7i.metal-24xl" - InstanceTypeR7iMetal48xl InstanceType = "r7i.metal-48xl" - InstanceTypeR7izMetal16xl InstanceType = "r7iz.metal-16xl" - InstanceTypeR7izMetal32xl InstanceType = "r7iz.metal-32xl" -) - -// Values returns all known values for InstanceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceType) Values() []InstanceType { - return []InstanceType{ - "a1.medium", - "a1.large", - "a1.xlarge", - "a1.2xlarge", - "a1.4xlarge", - "a1.metal", - "c1.medium", - "c1.xlarge", - "c3.large", - "c3.xlarge", - "c3.2xlarge", - "c3.4xlarge", - "c3.8xlarge", - "c4.large", - "c4.xlarge", - "c4.2xlarge", - "c4.4xlarge", - "c4.8xlarge", - "c5.large", - "c5.xlarge", - "c5.2xlarge", - "c5.4xlarge", - "c5.9xlarge", - "c5.12xlarge", - "c5.18xlarge", - "c5.24xlarge", - "c5.metal", - "c5a.large", - "c5a.xlarge", - "c5a.2xlarge", - "c5a.4xlarge", - "c5a.8xlarge", - "c5a.12xlarge", - "c5a.16xlarge", - "c5a.24xlarge", - "c5ad.large", - "c5ad.xlarge", - "c5ad.2xlarge", - "c5ad.4xlarge", - "c5ad.8xlarge", - "c5ad.12xlarge", - "c5ad.16xlarge", - "c5ad.24xlarge", - "c5d.large", - "c5d.xlarge", - "c5d.2xlarge", - "c5d.4xlarge", - "c5d.9xlarge", - "c5d.12xlarge", - "c5d.18xlarge", - "c5d.24xlarge", - "c5d.metal", - "c5n.large", - "c5n.xlarge", - "c5n.2xlarge", - "c5n.4xlarge", - "c5n.9xlarge", - "c5n.18xlarge", - "c5n.metal", - "c6g.medium", - "c6g.large", - "c6g.xlarge", - "c6g.2xlarge", - "c6g.4xlarge", - "c6g.8xlarge", - "c6g.12xlarge", - "c6g.16xlarge", - "c6g.metal", - "c6gd.medium", - "c6gd.large", - "c6gd.xlarge", - "c6gd.2xlarge", - "c6gd.4xlarge", - "c6gd.8xlarge", - "c6gd.12xlarge", - "c6gd.16xlarge", - "c6gd.metal", - "c6gn.medium", - "c6gn.large", - "c6gn.xlarge", - "c6gn.2xlarge", - "c6gn.4xlarge", - "c6gn.8xlarge", - "c6gn.12xlarge", - "c6gn.16xlarge", - "c6i.large", - "c6i.xlarge", - "c6i.2xlarge", - "c6i.4xlarge", - "c6i.8xlarge", - "c6i.12xlarge", - "c6i.16xlarge", - "c6i.24xlarge", - "c6i.32xlarge", - "c6i.metal", - "cc1.4xlarge", - "cc2.8xlarge", - "cg1.4xlarge", - "cr1.8xlarge", - "d2.xlarge", - "d2.2xlarge", - "d2.4xlarge", - "d2.8xlarge", - "d3.xlarge", - "d3.2xlarge", - "d3.4xlarge", - "d3.8xlarge", - "d3en.xlarge", - "d3en.2xlarge", - "d3en.4xlarge", - "d3en.6xlarge", - "d3en.8xlarge", - "d3en.12xlarge", - "dl1.24xlarge", - "f1.2xlarge", - "f1.4xlarge", - "f1.16xlarge", - "g2.2xlarge", - "g2.8xlarge", - "g3.4xlarge", - "g3.8xlarge", - "g3.16xlarge", - "g3s.xlarge", - "g4ad.xlarge", - "g4ad.2xlarge", - "g4ad.4xlarge", - "g4ad.8xlarge", - "g4ad.16xlarge", - "g4dn.xlarge", - "g4dn.2xlarge", - "g4dn.4xlarge", - "g4dn.8xlarge", - "g4dn.12xlarge", - "g4dn.16xlarge", - "g4dn.metal", - "g5.xlarge", - "g5.2xlarge", - "g5.4xlarge", - "g5.8xlarge", - "g5.12xlarge", - "g5.16xlarge", - "g5.24xlarge", - "g5.48xlarge", - "g5g.xlarge", - "g5g.2xlarge", - "g5g.4xlarge", - "g5g.8xlarge", - "g5g.16xlarge", - "g5g.metal", - "hi1.4xlarge", - "hpc6a.48xlarge", - "hs1.8xlarge", - "h1.2xlarge", - "h1.4xlarge", - "h1.8xlarge", - "h1.16xlarge", - "i2.xlarge", - "i2.2xlarge", - "i2.4xlarge", - "i2.8xlarge", - "i3.large", - "i3.xlarge", - "i3.2xlarge", - "i3.4xlarge", - "i3.8xlarge", - "i3.16xlarge", - "i3.metal", - "i3en.large", - "i3en.xlarge", - "i3en.2xlarge", - "i3en.3xlarge", - "i3en.6xlarge", - "i3en.12xlarge", - "i3en.24xlarge", - "i3en.metal", - "im4gn.large", - "im4gn.xlarge", - "im4gn.2xlarge", - "im4gn.4xlarge", - "im4gn.8xlarge", - "im4gn.16xlarge", - "inf1.xlarge", - "inf1.2xlarge", - "inf1.6xlarge", - "inf1.24xlarge", - "is4gen.medium", - "is4gen.large", - "is4gen.xlarge", - "is4gen.2xlarge", - "is4gen.4xlarge", - "is4gen.8xlarge", - "m1.small", - "m1.medium", - "m1.large", - "m1.xlarge", - "m2.xlarge", - "m2.2xlarge", - "m2.4xlarge", - "m3.medium", - "m3.large", - "m3.xlarge", - "m3.2xlarge", - "m4.large", - "m4.xlarge", - "m4.2xlarge", - "m4.4xlarge", - "m4.10xlarge", - "m4.16xlarge", - "m5.large", - "m5.xlarge", - "m5.2xlarge", - "m5.4xlarge", - "m5.8xlarge", - "m5.12xlarge", - "m5.16xlarge", - "m5.24xlarge", - "m5.metal", - "m5a.large", - "m5a.xlarge", - "m5a.2xlarge", - "m5a.4xlarge", - "m5a.8xlarge", - "m5a.12xlarge", - "m5a.16xlarge", - "m5a.24xlarge", - "m5ad.large", - "m5ad.xlarge", - "m5ad.2xlarge", - "m5ad.4xlarge", - "m5ad.8xlarge", - "m5ad.12xlarge", - "m5ad.16xlarge", - "m5ad.24xlarge", - "m5d.large", - "m5d.xlarge", - "m5d.2xlarge", - "m5d.4xlarge", - "m5d.8xlarge", - "m5d.12xlarge", - "m5d.16xlarge", - "m5d.24xlarge", - "m5d.metal", - "m5dn.large", - "m5dn.xlarge", - "m5dn.2xlarge", - "m5dn.4xlarge", - "m5dn.8xlarge", - "m5dn.12xlarge", - "m5dn.16xlarge", - "m5dn.24xlarge", - "m5dn.metal", - "m5n.large", - "m5n.xlarge", - "m5n.2xlarge", - "m5n.4xlarge", - "m5n.8xlarge", - "m5n.12xlarge", - "m5n.16xlarge", - "m5n.24xlarge", - "m5n.metal", - "m5zn.large", - "m5zn.xlarge", - "m5zn.2xlarge", - "m5zn.3xlarge", - "m5zn.6xlarge", - "m5zn.12xlarge", - "m5zn.metal", - "m6a.large", - "m6a.xlarge", - "m6a.2xlarge", - "m6a.4xlarge", - "m6a.8xlarge", - "m6a.12xlarge", - "m6a.16xlarge", - "m6a.24xlarge", - "m6a.32xlarge", - "m6a.48xlarge", - "m6g.metal", - "m6g.medium", - "m6g.large", - "m6g.xlarge", - "m6g.2xlarge", - "m6g.4xlarge", - "m6g.8xlarge", - "m6g.12xlarge", - "m6g.16xlarge", - "m6gd.metal", - "m6gd.medium", - "m6gd.large", - "m6gd.xlarge", - "m6gd.2xlarge", - "m6gd.4xlarge", - "m6gd.8xlarge", - "m6gd.12xlarge", - "m6gd.16xlarge", - "m6i.large", - "m6i.xlarge", - "m6i.2xlarge", - "m6i.4xlarge", - "m6i.8xlarge", - "m6i.12xlarge", - "m6i.16xlarge", - "m6i.24xlarge", - "m6i.32xlarge", - "m6i.metal", - "mac1.metal", - "p2.xlarge", - "p2.8xlarge", - "p2.16xlarge", - "p3.2xlarge", - "p3.8xlarge", - "p3.16xlarge", - "p3dn.24xlarge", - "p4d.24xlarge", - "r3.large", - "r3.xlarge", - "r3.2xlarge", - "r3.4xlarge", - "r3.8xlarge", - "r4.large", - "r4.xlarge", - "r4.2xlarge", - "r4.4xlarge", - "r4.8xlarge", - "r4.16xlarge", - "r5.large", - "r5.xlarge", - "r5.2xlarge", - "r5.4xlarge", - "r5.8xlarge", - "r5.12xlarge", - "r5.16xlarge", - "r5.24xlarge", - "r5.metal", - "r5a.large", - "r5a.xlarge", - "r5a.2xlarge", - "r5a.4xlarge", - "r5a.8xlarge", - "r5a.12xlarge", - "r5a.16xlarge", - "r5a.24xlarge", - "r5ad.large", - "r5ad.xlarge", - "r5ad.2xlarge", - "r5ad.4xlarge", - "r5ad.8xlarge", - "r5ad.12xlarge", - "r5ad.16xlarge", - "r5ad.24xlarge", - "r5b.large", - "r5b.xlarge", - "r5b.2xlarge", - "r5b.4xlarge", - "r5b.8xlarge", - "r5b.12xlarge", - "r5b.16xlarge", - "r5b.24xlarge", - "r5b.metal", - "r5d.large", - "r5d.xlarge", - "r5d.2xlarge", - "r5d.4xlarge", - "r5d.8xlarge", - "r5d.12xlarge", - "r5d.16xlarge", - "r5d.24xlarge", - "r5d.metal", - "r5dn.large", - "r5dn.xlarge", - "r5dn.2xlarge", - "r5dn.4xlarge", - "r5dn.8xlarge", - "r5dn.12xlarge", - "r5dn.16xlarge", - "r5dn.24xlarge", - "r5dn.metal", - "r5n.large", - "r5n.xlarge", - "r5n.2xlarge", - "r5n.4xlarge", - "r5n.8xlarge", - "r5n.12xlarge", - "r5n.16xlarge", - "r5n.24xlarge", - "r5n.metal", - "r6g.medium", - "r6g.large", - "r6g.xlarge", - "r6g.2xlarge", - "r6g.4xlarge", - "r6g.8xlarge", - "r6g.12xlarge", - "r6g.16xlarge", - "r6g.metal", - "r6gd.medium", - "r6gd.large", - "r6gd.xlarge", - "r6gd.2xlarge", - "r6gd.4xlarge", - "r6gd.8xlarge", - "r6gd.12xlarge", - "r6gd.16xlarge", - "r6gd.metal", - "r6i.large", - "r6i.xlarge", - "r6i.2xlarge", - "r6i.4xlarge", - "r6i.8xlarge", - "r6i.12xlarge", - "r6i.16xlarge", - "r6i.24xlarge", - "r6i.32xlarge", - "r6i.metal", - "t1.micro", - "t2.nano", - "t2.micro", - "t2.small", - "t2.medium", - "t2.large", - "t2.xlarge", - "t2.2xlarge", - "t3.nano", - "t3.micro", - "t3.small", - "t3.medium", - "t3.large", - "t3.xlarge", - "t3.2xlarge", - "t3a.nano", - "t3a.micro", - "t3a.small", - "t3a.medium", - "t3a.large", - "t3a.xlarge", - "t3a.2xlarge", - "t4g.nano", - "t4g.micro", - "t4g.small", - "t4g.medium", - "t4g.large", - "t4g.xlarge", - "t4g.2xlarge", - "u-6tb1.56xlarge", - "u-6tb1.112xlarge", - "u-9tb1.112xlarge", - "u-12tb1.112xlarge", - "u-6tb1.metal", - "u-9tb1.metal", - "u-12tb1.metal", - "u-18tb1.metal", - "u-24tb1.metal", - "vt1.3xlarge", - "vt1.6xlarge", - "vt1.24xlarge", - "x1.16xlarge", - "x1.32xlarge", - "x1e.xlarge", - "x1e.2xlarge", - "x1e.4xlarge", - "x1e.8xlarge", - "x1e.16xlarge", - "x1e.32xlarge", - "x2iezn.2xlarge", - "x2iezn.4xlarge", - "x2iezn.6xlarge", - "x2iezn.8xlarge", - "x2iezn.12xlarge", - "x2iezn.metal", - "x2gd.medium", - "x2gd.large", - "x2gd.xlarge", - "x2gd.2xlarge", - "x2gd.4xlarge", - "x2gd.8xlarge", - "x2gd.12xlarge", - "x2gd.16xlarge", - "x2gd.metal", - "z1d.large", - "z1d.xlarge", - "z1d.2xlarge", - "z1d.3xlarge", - "z1d.6xlarge", - "z1d.12xlarge", - "z1d.metal", - "x2idn.16xlarge", - "x2idn.24xlarge", - "x2idn.32xlarge", - "x2iedn.xlarge", - "x2iedn.2xlarge", - "x2iedn.4xlarge", - "x2iedn.8xlarge", - "x2iedn.16xlarge", - "x2iedn.24xlarge", - "x2iedn.32xlarge", - "c6a.large", - "c6a.xlarge", - "c6a.2xlarge", - "c6a.4xlarge", - "c6a.8xlarge", - "c6a.12xlarge", - "c6a.16xlarge", - "c6a.24xlarge", - "c6a.32xlarge", - "c6a.48xlarge", - "c6a.metal", - "m6a.metal", - "i4i.large", - "i4i.xlarge", - "i4i.2xlarge", - "i4i.4xlarge", - "i4i.8xlarge", - "i4i.16xlarge", - "i4i.32xlarge", - "i4i.metal", - "x2idn.metal", - "x2iedn.metal", - "c7g.medium", - "c7g.large", - "c7g.xlarge", - "c7g.2xlarge", - "c7g.4xlarge", - "c7g.8xlarge", - "c7g.12xlarge", - "c7g.16xlarge", - "mac2.metal", - "c6id.large", - "c6id.xlarge", - "c6id.2xlarge", - "c6id.4xlarge", - "c6id.8xlarge", - "c6id.12xlarge", - "c6id.16xlarge", - "c6id.24xlarge", - "c6id.32xlarge", - "c6id.metal", - "m6id.large", - "m6id.xlarge", - "m6id.2xlarge", - "m6id.4xlarge", - "m6id.8xlarge", - "m6id.12xlarge", - "m6id.16xlarge", - "m6id.24xlarge", - "m6id.32xlarge", - "m6id.metal", - "r6id.large", - "r6id.xlarge", - "r6id.2xlarge", - "r6id.4xlarge", - "r6id.8xlarge", - "r6id.12xlarge", - "r6id.16xlarge", - "r6id.24xlarge", - "r6id.32xlarge", - "r6id.metal", - "r6a.large", - "r6a.xlarge", - "r6a.2xlarge", - "r6a.4xlarge", - "r6a.8xlarge", - "r6a.12xlarge", - "r6a.16xlarge", - "r6a.24xlarge", - "r6a.32xlarge", - "r6a.48xlarge", - "r6a.metal", - "p4de.24xlarge", - "u-3tb1.56xlarge", - "u-18tb1.112xlarge", - "u-24tb1.112xlarge", - "trn1.2xlarge", - "trn1.32xlarge", - "hpc6id.32xlarge", - "c6in.large", - "c6in.xlarge", - "c6in.2xlarge", - "c6in.4xlarge", - "c6in.8xlarge", - "c6in.12xlarge", - "c6in.16xlarge", - "c6in.24xlarge", - "c6in.32xlarge", - "m6in.large", - "m6in.xlarge", - "m6in.2xlarge", - "m6in.4xlarge", - "m6in.8xlarge", - "m6in.12xlarge", - "m6in.16xlarge", - "m6in.24xlarge", - "m6in.32xlarge", - "m6idn.large", - "m6idn.xlarge", - "m6idn.2xlarge", - "m6idn.4xlarge", - "m6idn.8xlarge", - "m6idn.12xlarge", - "m6idn.16xlarge", - "m6idn.24xlarge", - "m6idn.32xlarge", - "r6in.large", - "r6in.xlarge", - "r6in.2xlarge", - "r6in.4xlarge", - "r6in.8xlarge", - "r6in.12xlarge", - "r6in.16xlarge", - "r6in.24xlarge", - "r6in.32xlarge", - "r6idn.large", - "r6idn.xlarge", - "r6idn.2xlarge", - "r6idn.4xlarge", - "r6idn.8xlarge", - "r6idn.12xlarge", - "r6idn.16xlarge", - "r6idn.24xlarge", - "r6idn.32xlarge", - "c7g.metal", - "m7g.medium", - "m7g.large", - "m7g.xlarge", - "m7g.2xlarge", - "m7g.4xlarge", - "m7g.8xlarge", - "m7g.12xlarge", - "m7g.16xlarge", - "m7g.metal", - "r7g.medium", - "r7g.large", - "r7g.xlarge", - "r7g.2xlarge", - "r7g.4xlarge", - "r7g.8xlarge", - "r7g.12xlarge", - "r7g.16xlarge", - "r7g.metal", - "c6in.metal", - "m6in.metal", - "m6idn.metal", - "r6in.metal", - "r6idn.metal", - "inf2.xlarge", - "inf2.8xlarge", - "inf2.24xlarge", - "inf2.48xlarge", - "trn1n.32xlarge", - "i4g.large", - "i4g.xlarge", - "i4g.2xlarge", - "i4g.4xlarge", - "i4g.8xlarge", - "i4g.16xlarge", - "hpc7g.4xlarge", - "hpc7g.8xlarge", - "hpc7g.16xlarge", - "c7gn.medium", - "c7gn.large", - "c7gn.xlarge", - "c7gn.2xlarge", - "c7gn.4xlarge", - "c7gn.8xlarge", - "c7gn.12xlarge", - "c7gn.16xlarge", - "p5.48xlarge", - "m7i.large", - "m7i.xlarge", - "m7i.2xlarge", - "m7i.4xlarge", - "m7i.8xlarge", - "m7i.12xlarge", - "m7i.16xlarge", - "m7i.24xlarge", - "m7i.48xlarge", - "m7i-flex.large", - "m7i-flex.xlarge", - "m7i-flex.2xlarge", - "m7i-flex.4xlarge", - "m7i-flex.8xlarge", - "m7a.medium", - "m7a.large", - "m7a.xlarge", - "m7a.2xlarge", - "m7a.4xlarge", - "m7a.8xlarge", - "m7a.12xlarge", - "m7a.16xlarge", - "m7a.24xlarge", - "m7a.32xlarge", - "m7a.48xlarge", - "m7a.metal-48xl", - "hpc7a.12xlarge", - "hpc7a.24xlarge", - "hpc7a.48xlarge", - "hpc7a.96xlarge", - "c7gd.medium", - "c7gd.large", - "c7gd.xlarge", - "c7gd.2xlarge", - "c7gd.4xlarge", - "c7gd.8xlarge", - "c7gd.12xlarge", - "c7gd.16xlarge", - "m7gd.medium", - "m7gd.large", - "m7gd.xlarge", - "m7gd.2xlarge", - "m7gd.4xlarge", - "m7gd.8xlarge", - "m7gd.12xlarge", - "m7gd.16xlarge", - "r7gd.medium", - "r7gd.large", - "r7gd.xlarge", - "r7gd.2xlarge", - "r7gd.4xlarge", - "r7gd.8xlarge", - "r7gd.12xlarge", - "r7gd.16xlarge", - "r7a.medium", - "r7a.large", - "r7a.xlarge", - "r7a.2xlarge", - "r7a.4xlarge", - "r7a.8xlarge", - "r7a.12xlarge", - "r7a.16xlarge", - "r7a.24xlarge", - "r7a.32xlarge", - "r7a.48xlarge", - "c7i.large", - "c7i.xlarge", - "c7i.2xlarge", - "c7i.4xlarge", - "c7i.8xlarge", - "c7i.12xlarge", - "c7i.16xlarge", - "c7i.24xlarge", - "c7i.48xlarge", - "mac2-m2pro.metal", - "r7iz.large", - "r7iz.xlarge", - "r7iz.2xlarge", - "r7iz.4xlarge", - "r7iz.8xlarge", - "r7iz.12xlarge", - "r7iz.16xlarge", - "r7iz.32xlarge", - "c7a.medium", - "c7a.large", - "c7a.xlarge", - "c7a.2xlarge", - "c7a.4xlarge", - "c7a.8xlarge", - "c7a.12xlarge", - "c7a.16xlarge", - "c7a.24xlarge", - "c7a.32xlarge", - "c7a.48xlarge", - "c7a.metal-48xl", - "r7a.metal-48xl", - "r7i.large", - "r7i.xlarge", - "r7i.2xlarge", - "r7i.4xlarge", - "r7i.8xlarge", - "r7i.12xlarge", - "r7i.16xlarge", - "r7i.24xlarge", - "r7i.48xlarge", - "dl2q.24xlarge", - "mac2-m2.metal", - "i4i.12xlarge", - "i4i.24xlarge", - "c7i.metal-24xl", - "c7i.metal-48xl", - "m7i.metal-24xl", - "m7i.metal-48xl", - "r7i.metal-24xl", - "r7i.metal-48xl", - "r7iz.metal-16xl", - "r7iz.metal-32xl", - } -} - -type InstanceTypeHypervisor string - -// Enum values for InstanceTypeHypervisor -const ( - InstanceTypeHypervisorNitro InstanceTypeHypervisor = "nitro" - InstanceTypeHypervisorXen InstanceTypeHypervisor = "xen" -) - -// Values returns all known values for InstanceTypeHypervisor. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InstanceTypeHypervisor) Values() []InstanceTypeHypervisor { - return []InstanceTypeHypervisor{ - "nitro", - "xen", - } -} - -type InterfacePermissionType string - -// Enum values for InterfacePermissionType -const ( - InterfacePermissionTypeInstanceAttach InterfacePermissionType = "INSTANCE-ATTACH" - InterfacePermissionTypeEipAssociate InterfacePermissionType = "EIP-ASSOCIATE" -) - -// Values returns all known values for InterfacePermissionType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InterfacePermissionType) Values() []InterfacePermissionType { - return []InterfacePermissionType{ - "INSTANCE-ATTACH", - "EIP-ASSOCIATE", - } -} - -type InterfaceProtocolType string - -// Enum values for InterfaceProtocolType -const ( - InterfaceProtocolTypeVlan InterfaceProtocolType = "VLAN" - InterfaceProtocolTypeGre InterfaceProtocolType = "GRE" -) - -// Values returns all known values for InterfaceProtocolType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (InterfaceProtocolType) Values() []InterfaceProtocolType { - return []InterfaceProtocolType{ - "VLAN", - "GRE", - } -} - -type IpAddressType string - -// Enum values for IpAddressType -const ( - IpAddressTypeIpv4 IpAddressType = "ipv4" - IpAddressTypeDualstack IpAddressType = "dualstack" - IpAddressTypeIpv6 IpAddressType = "ipv6" -) - -// Values returns all known values for IpAddressType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpAddressType) Values() []IpAddressType { - return []IpAddressType{ - "ipv4", - "dualstack", - "ipv6", - } -} - -type IpamAddressHistoryResourceType string - -// Enum values for IpamAddressHistoryResourceType -const ( - IpamAddressHistoryResourceTypeEip IpamAddressHistoryResourceType = "eip" - IpamAddressHistoryResourceTypeVpc IpamAddressHistoryResourceType = "vpc" - IpamAddressHistoryResourceTypeSubnet IpamAddressHistoryResourceType = "subnet" - IpamAddressHistoryResourceTypeNetworkInterface IpamAddressHistoryResourceType = "network-interface" - IpamAddressHistoryResourceTypeInstance IpamAddressHistoryResourceType = "instance" -) - -// Values returns all known values for IpamAddressHistoryResourceType. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (IpamAddressHistoryResourceType) Values() []IpamAddressHistoryResourceType { - return []IpamAddressHistoryResourceType{ - "eip", - "vpc", - "subnet", - "network-interface", - "instance", - } -} - -type IpamAssociatedResourceDiscoveryStatus string - -// Enum values for IpamAssociatedResourceDiscoveryStatus -const ( - IpamAssociatedResourceDiscoveryStatusActive IpamAssociatedResourceDiscoveryStatus = "active" - IpamAssociatedResourceDiscoveryStatusNotFound IpamAssociatedResourceDiscoveryStatus = "not-found" -) - -// Values returns all known values for IpamAssociatedResourceDiscoveryStatus. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (IpamAssociatedResourceDiscoveryStatus) Values() []IpamAssociatedResourceDiscoveryStatus { - return []IpamAssociatedResourceDiscoveryStatus{ - "active", - "not-found", - } -} - -type IpamComplianceStatus string - -// Enum values for IpamComplianceStatus -const ( - IpamComplianceStatusCompliant IpamComplianceStatus = "compliant" - IpamComplianceStatusNoncompliant IpamComplianceStatus = "noncompliant" - IpamComplianceStatusUnmanaged IpamComplianceStatus = "unmanaged" - IpamComplianceStatusIgnored IpamComplianceStatus = "ignored" -) - -// Values returns all known values for IpamComplianceStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamComplianceStatus) Values() []IpamComplianceStatus { - return []IpamComplianceStatus{ - "compliant", - "noncompliant", - "unmanaged", - "ignored", - } -} - -type IpamDiscoveryFailureCode string - -// Enum values for IpamDiscoveryFailureCode -const ( - IpamDiscoveryFailureCodeAssumeRoleFailure IpamDiscoveryFailureCode = "assume-role-failure" - IpamDiscoveryFailureCodeThrottlingFailure IpamDiscoveryFailureCode = "throttling-failure" - IpamDiscoveryFailureCodeUnauthorizedFailure IpamDiscoveryFailureCode = "unauthorized-failure" -) - -// Values returns all known values for IpamDiscoveryFailureCode. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (IpamDiscoveryFailureCode) Values() []IpamDiscoveryFailureCode { - return []IpamDiscoveryFailureCode{ - "assume-role-failure", - "throttling-failure", - "unauthorized-failure", - } -} - -type IpamManagementState string - -// Enum values for IpamManagementState -const ( - IpamManagementStateManaged IpamManagementState = "managed" - IpamManagementStateUnmanaged IpamManagementState = "unmanaged" - IpamManagementStateIgnored IpamManagementState = "ignored" -) - -// Values returns all known values for IpamManagementState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamManagementState) Values() []IpamManagementState { - return []IpamManagementState{ - "managed", - "unmanaged", - "ignored", - } -} - -type IpamOverlapStatus string - -// Enum values for IpamOverlapStatus -const ( - IpamOverlapStatusOverlapping IpamOverlapStatus = "overlapping" - IpamOverlapStatusNonoverlapping IpamOverlapStatus = "nonoverlapping" - IpamOverlapStatusIgnored IpamOverlapStatus = "ignored" -) - -// Values returns all known values for IpamOverlapStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamOverlapStatus) Values() []IpamOverlapStatus { - return []IpamOverlapStatus{ - "overlapping", - "nonoverlapping", - "ignored", - } -} - -type IpamPoolAllocationResourceType string - -// Enum values for IpamPoolAllocationResourceType -const ( - IpamPoolAllocationResourceTypeIpamPool IpamPoolAllocationResourceType = "ipam-pool" - IpamPoolAllocationResourceTypeVpc IpamPoolAllocationResourceType = "vpc" - IpamPoolAllocationResourceTypeEc2PublicIpv4Pool IpamPoolAllocationResourceType = "ec2-public-ipv4-pool" - IpamPoolAllocationResourceTypeCustom IpamPoolAllocationResourceType = "custom" - IpamPoolAllocationResourceTypeSubnet IpamPoolAllocationResourceType = "subnet" -) - -// Values returns all known values for IpamPoolAllocationResourceType. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (IpamPoolAllocationResourceType) Values() []IpamPoolAllocationResourceType { - return []IpamPoolAllocationResourceType{ - "ipam-pool", - "vpc", - "ec2-public-ipv4-pool", - "custom", - "subnet", - } -} - -type IpamPoolAwsService string - -// Enum values for IpamPoolAwsService -const ( - IpamPoolAwsServiceEc2 IpamPoolAwsService = "ec2" -) - -// Values returns all known values for IpamPoolAwsService. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamPoolAwsService) Values() []IpamPoolAwsService { - return []IpamPoolAwsService{ - "ec2", - } -} - -type IpamPoolCidrFailureCode string - -// Enum values for IpamPoolCidrFailureCode -const ( - IpamPoolCidrFailureCodeCidrNotAvailable IpamPoolCidrFailureCode = "cidr-not-available" - IpamPoolCidrFailureCodeLimitExceeded IpamPoolCidrFailureCode = "limit-exceeded" -) - -// Values returns all known values for IpamPoolCidrFailureCode. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamPoolCidrFailureCode) Values() []IpamPoolCidrFailureCode { - return []IpamPoolCidrFailureCode{ - "cidr-not-available", - "limit-exceeded", - } -} - -type IpamPoolCidrState string - -// Enum values for IpamPoolCidrState -const ( - IpamPoolCidrStatePendingProvision IpamPoolCidrState = "pending-provision" - IpamPoolCidrStateProvisioned IpamPoolCidrState = "provisioned" - IpamPoolCidrStateFailedProvision IpamPoolCidrState = "failed-provision" - IpamPoolCidrStatePendingDeprovision IpamPoolCidrState = "pending-deprovision" - IpamPoolCidrStateDeprovisioned IpamPoolCidrState = "deprovisioned" - IpamPoolCidrStateFailedDeprovision IpamPoolCidrState = "failed-deprovision" - IpamPoolCidrStatePendingImport IpamPoolCidrState = "pending-import" - IpamPoolCidrStateFailedImport IpamPoolCidrState = "failed-import" -) - -// Values returns all known values for IpamPoolCidrState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamPoolCidrState) Values() []IpamPoolCidrState { - return []IpamPoolCidrState{ - "pending-provision", - "provisioned", - "failed-provision", - "pending-deprovision", - "deprovisioned", - "failed-deprovision", - "pending-import", - "failed-import", - } -} - -type IpamPoolPublicIpSource string - -// Enum values for IpamPoolPublicIpSource -const ( - IpamPoolPublicIpSourceAmazon IpamPoolPublicIpSource = "amazon" - IpamPoolPublicIpSourceByoip IpamPoolPublicIpSource = "byoip" -) - -// Values returns all known values for IpamPoolPublicIpSource. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamPoolPublicIpSource) Values() []IpamPoolPublicIpSource { - return []IpamPoolPublicIpSource{ - "amazon", - "byoip", - } -} - -type IpamPoolSourceResourceType string - -// Enum values for IpamPoolSourceResourceType -const ( - IpamPoolSourceResourceTypeVpc IpamPoolSourceResourceType = "vpc" -) - -// Values returns all known values for IpamPoolSourceResourceType. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (IpamPoolSourceResourceType) Values() []IpamPoolSourceResourceType { - return []IpamPoolSourceResourceType{ - "vpc", - } -} - -type IpamPoolState string - -// Enum values for IpamPoolState -const ( - IpamPoolStateCreateInProgress IpamPoolState = "create-in-progress" - IpamPoolStateCreateComplete IpamPoolState = "create-complete" - IpamPoolStateCreateFailed IpamPoolState = "create-failed" - IpamPoolStateModifyInProgress IpamPoolState = "modify-in-progress" - IpamPoolStateModifyComplete IpamPoolState = "modify-complete" - IpamPoolStateModifyFailed IpamPoolState = "modify-failed" - IpamPoolStateDeleteInProgress IpamPoolState = "delete-in-progress" - IpamPoolStateDeleteComplete IpamPoolState = "delete-complete" - IpamPoolStateDeleteFailed IpamPoolState = "delete-failed" - IpamPoolStateIsolateInProgress IpamPoolState = "isolate-in-progress" - IpamPoolStateIsolateComplete IpamPoolState = "isolate-complete" - IpamPoolStateRestoreInProgress IpamPoolState = "restore-in-progress" -) - -// Values returns all known values for IpamPoolState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamPoolState) Values() []IpamPoolState { - return []IpamPoolState{ - "create-in-progress", - "create-complete", - "create-failed", - "modify-in-progress", - "modify-complete", - "modify-failed", - "delete-in-progress", - "delete-complete", - "delete-failed", - "isolate-in-progress", - "isolate-complete", - "restore-in-progress", - } -} - -type IpamPublicAddressAssociationStatus string - -// Enum values for IpamPublicAddressAssociationStatus -const ( - IpamPublicAddressAssociationStatusAssociated IpamPublicAddressAssociationStatus = "associated" - IpamPublicAddressAssociationStatusDisassociated IpamPublicAddressAssociationStatus = "disassociated" -) - -// Values returns all known values for IpamPublicAddressAssociationStatus. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (IpamPublicAddressAssociationStatus) Values() []IpamPublicAddressAssociationStatus { - return []IpamPublicAddressAssociationStatus{ - "associated", - "disassociated", - } -} - -type IpamPublicAddressAwsService string - -// Enum values for IpamPublicAddressAwsService -const ( - IpamPublicAddressAwsServiceNatGateway IpamPublicAddressAwsService = "nat-gateway" - IpamPublicAddressAwsServiceDms IpamPublicAddressAwsService = "database-migration-service" - IpamPublicAddressAwsServiceRedshift IpamPublicAddressAwsService = "redshift" - IpamPublicAddressAwsServiceEcs IpamPublicAddressAwsService = "elastic-container-service" - IpamPublicAddressAwsServiceRds IpamPublicAddressAwsService = "relational-database-service" - IpamPublicAddressAwsServiceS2sVpn IpamPublicAddressAwsService = "site-to-site-vpn" - IpamPublicAddressAwsServiceEc2Lb IpamPublicAddressAwsService = "load-balancer" - IpamPublicAddressAwsServiceAga IpamPublicAddressAwsService = "global-accelerator" - IpamPublicAddressAwsServiceOther IpamPublicAddressAwsService = "other" -) - -// Values returns all known values for IpamPublicAddressAwsService. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (IpamPublicAddressAwsService) Values() []IpamPublicAddressAwsService { - return []IpamPublicAddressAwsService{ - "nat-gateway", - "database-migration-service", - "redshift", - "elastic-container-service", - "relational-database-service", - "site-to-site-vpn", - "load-balancer", - "global-accelerator", - "other", - } -} - -type IpamPublicAddressType string - -// Enum values for IpamPublicAddressType -const ( - IpamPublicAddressTypeServiceManagedIp IpamPublicAddressType = "service-managed-ip" - IpamPublicAddressTypeServiceManagedByoip IpamPublicAddressType = "service-managed-byoip" - IpamPublicAddressTypeAmazonOwnedEip IpamPublicAddressType = "amazon-owned-eip" - IpamPublicAddressTypeByoip IpamPublicAddressType = "byoip" - IpamPublicAddressTypeEc2PublicIp IpamPublicAddressType = "ec2-public-ip" -) - -// Values returns all known values for IpamPublicAddressType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamPublicAddressType) Values() []IpamPublicAddressType { - return []IpamPublicAddressType{ - "service-managed-ip", - "service-managed-byoip", - "amazon-owned-eip", - "byoip", - "ec2-public-ip", - } -} - -type IpamResourceDiscoveryAssociationState string - -// Enum values for IpamResourceDiscoveryAssociationState -const ( - IpamResourceDiscoveryAssociationStateAssociateInProgress IpamResourceDiscoveryAssociationState = "associate-in-progress" - IpamResourceDiscoveryAssociationStateAssociateComplete IpamResourceDiscoveryAssociationState = "associate-complete" - IpamResourceDiscoveryAssociationStateAssociateFailed IpamResourceDiscoveryAssociationState = "associate-failed" - IpamResourceDiscoveryAssociationStateDisassociateInProgress IpamResourceDiscoveryAssociationState = "disassociate-in-progress" - IpamResourceDiscoveryAssociationStateDisassociateComplete IpamResourceDiscoveryAssociationState = "disassociate-complete" - IpamResourceDiscoveryAssociationStateDisassociateFailed IpamResourceDiscoveryAssociationState = "disassociate-failed" - IpamResourceDiscoveryAssociationStateIsolateInProgress IpamResourceDiscoveryAssociationState = "isolate-in-progress" - IpamResourceDiscoveryAssociationStateIsolateComplete IpamResourceDiscoveryAssociationState = "isolate-complete" - IpamResourceDiscoveryAssociationStateRestoreInProgress IpamResourceDiscoveryAssociationState = "restore-in-progress" -) - -// Values returns all known values for IpamResourceDiscoveryAssociationState. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (IpamResourceDiscoveryAssociationState) Values() []IpamResourceDiscoveryAssociationState { - return []IpamResourceDiscoveryAssociationState{ - "associate-in-progress", - "associate-complete", - "associate-failed", - "disassociate-in-progress", - "disassociate-complete", - "disassociate-failed", - "isolate-in-progress", - "isolate-complete", - "restore-in-progress", - } -} - -type IpamResourceDiscoveryState string - -// Enum values for IpamResourceDiscoveryState -const ( - IpamResourceDiscoveryStateCreateInProgress IpamResourceDiscoveryState = "create-in-progress" - IpamResourceDiscoveryStateCreateComplete IpamResourceDiscoveryState = "create-complete" - IpamResourceDiscoveryStateCreateFailed IpamResourceDiscoveryState = "create-failed" - IpamResourceDiscoveryStateModifyInProgress IpamResourceDiscoveryState = "modify-in-progress" - IpamResourceDiscoveryStateModifyComplete IpamResourceDiscoveryState = "modify-complete" - IpamResourceDiscoveryStateModifyFailed IpamResourceDiscoveryState = "modify-failed" - IpamResourceDiscoveryStateDeleteInProgress IpamResourceDiscoveryState = "delete-in-progress" - IpamResourceDiscoveryStateDeleteComplete IpamResourceDiscoveryState = "delete-complete" - IpamResourceDiscoveryStateDeleteFailed IpamResourceDiscoveryState = "delete-failed" - IpamResourceDiscoveryStateIsolateInProgress IpamResourceDiscoveryState = "isolate-in-progress" - IpamResourceDiscoveryStateIsolateComplete IpamResourceDiscoveryState = "isolate-complete" - IpamResourceDiscoveryStateRestoreInProgress IpamResourceDiscoveryState = "restore-in-progress" -) - -// Values returns all known values for IpamResourceDiscoveryState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (IpamResourceDiscoveryState) Values() []IpamResourceDiscoveryState { - return []IpamResourceDiscoveryState{ - "create-in-progress", - "create-complete", - "create-failed", - "modify-in-progress", - "modify-complete", - "modify-failed", - "delete-in-progress", - "delete-complete", - "delete-failed", - "isolate-in-progress", - "isolate-complete", - "restore-in-progress", - } -} - -type IpamResourceType string - -// Enum values for IpamResourceType -const ( - IpamResourceTypeVpc IpamResourceType = "vpc" - IpamResourceTypeSubnet IpamResourceType = "subnet" - IpamResourceTypeEip IpamResourceType = "eip" - IpamResourceTypePublicIpv4Pool IpamResourceType = "public-ipv4-pool" - IpamResourceTypeIpv6Pool IpamResourceType = "ipv6-pool" - IpamResourceTypeEni IpamResourceType = "eni" -) - -// Values returns all known values for IpamResourceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamResourceType) Values() []IpamResourceType { - return []IpamResourceType{ - "vpc", - "subnet", - "eip", - "public-ipv4-pool", - "ipv6-pool", - "eni", - } -} - -type IpamScopeState string - -// Enum values for IpamScopeState -const ( - IpamScopeStateCreateInProgress IpamScopeState = "create-in-progress" - IpamScopeStateCreateComplete IpamScopeState = "create-complete" - IpamScopeStateCreateFailed IpamScopeState = "create-failed" - IpamScopeStateModifyInProgress IpamScopeState = "modify-in-progress" - IpamScopeStateModifyComplete IpamScopeState = "modify-complete" - IpamScopeStateModifyFailed IpamScopeState = "modify-failed" - IpamScopeStateDeleteInProgress IpamScopeState = "delete-in-progress" - IpamScopeStateDeleteComplete IpamScopeState = "delete-complete" - IpamScopeStateDeleteFailed IpamScopeState = "delete-failed" - IpamScopeStateIsolateInProgress IpamScopeState = "isolate-in-progress" - IpamScopeStateIsolateComplete IpamScopeState = "isolate-complete" - IpamScopeStateRestoreInProgress IpamScopeState = "restore-in-progress" -) - -// Values returns all known values for IpamScopeState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamScopeState) Values() []IpamScopeState { - return []IpamScopeState{ - "create-in-progress", - "create-complete", - "create-failed", - "modify-in-progress", - "modify-complete", - "modify-failed", - "delete-in-progress", - "delete-complete", - "delete-failed", - "isolate-in-progress", - "isolate-complete", - "restore-in-progress", - } -} - -type IpamScopeType string - -// Enum values for IpamScopeType -const ( - IpamScopeTypePublic IpamScopeType = "public" - IpamScopeTypePrivate IpamScopeType = "private" -) - -// Values returns all known values for IpamScopeType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (IpamScopeType) Values() []IpamScopeType { - return []IpamScopeType{ - "public", - "private", - } -} - -type IpamState string - -// Enum values for IpamState -const ( - IpamStateCreateInProgress IpamState = "create-in-progress" - IpamStateCreateComplete IpamState = "create-complete" - IpamStateCreateFailed IpamState = "create-failed" - IpamStateModifyInProgress IpamState = "modify-in-progress" - IpamStateModifyComplete IpamState = "modify-complete" - IpamStateModifyFailed IpamState = "modify-failed" - IpamStateDeleteInProgress IpamState = "delete-in-progress" - IpamStateDeleteComplete IpamState = "delete-complete" - IpamStateDeleteFailed IpamState = "delete-failed" - IpamStateIsolateInProgress IpamState = "isolate-in-progress" - IpamStateIsolateComplete IpamState = "isolate-complete" - IpamStateRestoreInProgress IpamState = "restore-in-progress" -) - -// Values returns all known values for IpamState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (IpamState) Values() []IpamState { - return []IpamState{ - "create-in-progress", - "create-complete", - "create-failed", - "modify-in-progress", - "modify-complete", - "modify-failed", - "delete-in-progress", - "delete-complete", - "delete-failed", - "isolate-in-progress", - "isolate-complete", - "restore-in-progress", - } -} - -type IpamTier string - -// Enum values for IpamTier -const ( - IpamTierFree IpamTier = "free" - IpamTierAdvanced IpamTier = "advanced" -) - -// Values returns all known values for IpamTier. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (IpamTier) Values() []IpamTier { - return []IpamTier{ - "free", - "advanced", - } -} - -type Ipv6SupportValue string - -// Enum values for Ipv6SupportValue -const ( - Ipv6SupportValueEnable Ipv6SupportValue = "enable" - Ipv6SupportValueDisable Ipv6SupportValue = "disable" -) - -// Values returns all known values for Ipv6SupportValue. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (Ipv6SupportValue) Values() []Ipv6SupportValue { - return []Ipv6SupportValue{ - "enable", - "disable", - } -} - -type KeyFormat string - -// Enum values for KeyFormat -const ( - KeyFormatPem KeyFormat = "pem" - KeyFormatPpk KeyFormat = "ppk" -) - -// Values returns all known values for KeyFormat. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (KeyFormat) Values() []KeyFormat { - return []KeyFormat{ - "pem", - "ppk", - } -} - -type KeyType string - -// Enum values for KeyType -const ( - KeyTypeRsa KeyType = "rsa" - KeyTypeEd25519 KeyType = "ed25519" -) - -// Values returns all known values for KeyType. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (KeyType) Values() []KeyType { - return []KeyType{ - "rsa", - "ed25519", - } -} - -type LaunchTemplateAutoRecoveryState string - -// Enum values for LaunchTemplateAutoRecoveryState -const ( - LaunchTemplateAutoRecoveryStateDefault LaunchTemplateAutoRecoveryState = "default" - LaunchTemplateAutoRecoveryStateDisabled LaunchTemplateAutoRecoveryState = "disabled" -) - -// Values returns all known values for LaunchTemplateAutoRecoveryState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (LaunchTemplateAutoRecoveryState) Values() []LaunchTemplateAutoRecoveryState { - return []LaunchTemplateAutoRecoveryState{ - "default", - "disabled", - } -} - -type LaunchTemplateErrorCode string - -// Enum values for LaunchTemplateErrorCode -const ( - LaunchTemplateErrorCodeLaunchTemplateIdDoesNotExist LaunchTemplateErrorCode = "launchTemplateIdDoesNotExist" - LaunchTemplateErrorCodeLaunchTemplateIdMalformed LaunchTemplateErrorCode = "launchTemplateIdMalformed" - LaunchTemplateErrorCodeLaunchTemplateNameDoesNotExist LaunchTemplateErrorCode = "launchTemplateNameDoesNotExist" - LaunchTemplateErrorCodeLaunchTemplateNameMalformed LaunchTemplateErrorCode = "launchTemplateNameMalformed" - LaunchTemplateErrorCodeLaunchTemplateVersionDoesNotExist LaunchTemplateErrorCode = "launchTemplateVersionDoesNotExist" - LaunchTemplateErrorCodeUnexpectedError LaunchTemplateErrorCode = "unexpectedError" -) - -// Values returns all known values for LaunchTemplateErrorCode. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LaunchTemplateErrorCode) Values() []LaunchTemplateErrorCode { - return []LaunchTemplateErrorCode{ - "launchTemplateIdDoesNotExist", - "launchTemplateIdMalformed", - "launchTemplateNameDoesNotExist", - "launchTemplateNameMalformed", - "launchTemplateVersionDoesNotExist", - "unexpectedError", - } -} - -type LaunchTemplateHttpTokensState string - -// Enum values for LaunchTemplateHttpTokensState -const ( - LaunchTemplateHttpTokensStateOptional LaunchTemplateHttpTokensState = "optional" - LaunchTemplateHttpTokensStateRequired LaunchTemplateHttpTokensState = "required" -) - -// Values returns all known values for LaunchTemplateHttpTokensState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (LaunchTemplateHttpTokensState) Values() []LaunchTemplateHttpTokensState { - return []LaunchTemplateHttpTokensState{ - "optional", - "required", - } -} - -type LaunchTemplateInstanceMetadataEndpointState string - -// Enum values for LaunchTemplateInstanceMetadataEndpointState -const ( - LaunchTemplateInstanceMetadataEndpointStateDisabled LaunchTemplateInstanceMetadataEndpointState = "disabled" - LaunchTemplateInstanceMetadataEndpointStateEnabled LaunchTemplateInstanceMetadataEndpointState = "enabled" -) - -// Values returns all known values for -// LaunchTemplateInstanceMetadataEndpointState. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (LaunchTemplateInstanceMetadataEndpointState) Values() []LaunchTemplateInstanceMetadataEndpointState { - return []LaunchTemplateInstanceMetadataEndpointState{ - "disabled", - "enabled", - } -} - -type LaunchTemplateInstanceMetadataOptionsState string - -// Enum values for LaunchTemplateInstanceMetadataOptionsState -const ( - LaunchTemplateInstanceMetadataOptionsStatePending LaunchTemplateInstanceMetadataOptionsState = "pending" - LaunchTemplateInstanceMetadataOptionsStateApplied LaunchTemplateInstanceMetadataOptionsState = "applied" -) - -// Values returns all known values for LaunchTemplateInstanceMetadataOptionsState. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (LaunchTemplateInstanceMetadataOptionsState) Values() []LaunchTemplateInstanceMetadataOptionsState { - return []LaunchTemplateInstanceMetadataOptionsState{ - "pending", - "applied", - } -} - -type LaunchTemplateInstanceMetadataProtocolIpv6 string - -// Enum values for LaunchTemplateInstanceMetadataProtocolIpv6 -const ( - LaunchTemplateInstanceMetadataProtocolIpv6Disabled LaunchTemplateInstanceMetadataProtocolIpv6 = "disabled" - LaunchTemplateInstanceMetadataProtocolIpv6Enabled LaunchTemplateInstanceMetadataProtocolIpv6 = "enabled" -) - -// Values returns all known values for LaunchTemplateInstanceMetadataProtocolIpv6. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (LaunchTemplateInstanceMetadataProtocolIpv6) Values() []LaunchTemplateInstanceMetadataProtocolIpv6 { - return []LaunchTemplateInstanceMetadataProtocolIpv6{ - "disabled", - "enabled", - } -} - -type LaunchTemplateInstanceMetadataTagsState string - -// Enum values for LaunchTemplateInstanceMetadataTagsState -const ( - LaunchTemplateInstanceMetadataTagsStateDisabled LaunchTemplateInstanceMetadataTagsState = "disabled" - LaunchTemplateInstanceMetadataTagsStateEnabled LaunchTemplateInstanceMetadataTagsState = "enabled" -) - -// Values returns all known values for LaunchTemplateInstanceMetadataTagsState. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (LaunchTemplateInstanceMetadataTagsState) Values() []LaunchTemplateInstanceMetadataTagsState { - return []LaunchTemplateInstanceMetadataTagsState{ - "disabled", - "enabled", - } -} - -type ListingState string - -// Enum values for ListingState -const ( - ListingStateAvailable ListingState = "available" - ListingStateSold ListingState = "sold" - ListingStateCancelled ListingState = "cancelled" - ListingStatePending ListingState = "pending" -) - -// Values returns all known values for ListingState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ListingState) Values() []ListingState { - return []ListingState{ - "available", - "sold", - "cancelled", - "pending", - } -} - -type ListingStatus string - -// Enum values for ListingStatus -const ( - ListingStatusActive ListingStatus = "active" - ListingStatusPending ListingStatus = "pending" - ListingStatusCancelled ListingStatus = "cancelled" - ListingStatusClosed ListingStatus = "closed" -) - -// Values returns all known values for ListingStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ListingStatus) Values() []ListingStatus { - return []ListingStatus{ - "active", - "pending", - "cancelled", - "closed", - } -} - -type LocalGatewayRouteState string - -// Enum values for LocalGatewayRouteState -const ( - LocalGatewayRouteStatePending LocalGatewayRouteState = "pending" - LocalGatewayRouteStateActive LocalGatewayRouteState = "active" - LocalGatewayRouteStateBlackhole LocalGatewayRouteState = "blackhole" - LocalGatewayRouteStateDeleting LocalGatewayRouteState = "deleting" - LocalGatewayRouteStateDeleted LocalGatewayRouteState = "deleted" -) - -// Values returns all known values for LocalGatewayRouteState. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LocalGatewayRouteState) Values() []LocalGatewayRouteState { - return []LocalGatewayRouteState{ - "pending", - "active", - "blackhole", - "deleting", - "deleted", - } -} - -type LocalGatewayRouteTableMode string - -// Enum values for LocalGatewayRouteTableMode -const ( - LocalGatewayRouteTableModeDirectVpcRouting LocalGatewayRouteTableMode = "direct-vpc-routing" - LocalGatewayRouteTableModeCoip LocalGatewayRouteTableMode = "coip" -) - -// Values returns all known values for LocalGatewayRouteTableMode. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (LocalGatewayRouteTableMode) Values() []LocalGatewayRouteTableMode { - return []LocalGatewayRouteTableMode{ - "direct-vpc-routing", - "coip", - } -} - -type LocalGatewayRouteType string - -// Enum values for LocalGatewayRouteType -const ( - LocalGatewayRouteTypeStatic LocalGatewayRouteType = "static" - LocalGatewayRouteTypePropagated LocalGatewayRouteType = "propagated" -) - -// Values returns all known values for LocalGatewayRouteType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LocalGatewayRouteType) Values() []LocalGatewayRouteType { - return []LocalGatewayRouteType{ - "static", - "propagated", - } -} - -type LocalStorage string - -// Enum values for LocalStorage -const ( - LocalStorageIncluded LocalStorage = "included" - LocalStorageRequired LocalStorage = "required" - LocalStorageExcluded LocalStorage = "excluded" -) - -// Values returns all known values for LocalStorage. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LocalStorage) Values() []LocalStorage { - return []LocalStorage{ - "included", - "required", - "excluded", - } -} - -type LocalStorageType string - -// Enum values for LocalStorageType -const ( - LocalStorageTypeHdd LocalStorageType = "hdd" - LocalStorageTypeSsd LocalStorageType = "ssd" -) - -// Values returns all known values for LocalStorageType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LocalStorageType) Values() []LocalStorageType { - return []LocalStorageType{ - "hdd", - "ssd", - } -} - -type LocationType string - -// Enum values for LocationType -const ( - LocationTypeRegion LocationType = "region" - LocationTypeAvailabilityZone LocationType = "availability-zone" - LocationTypeAvailabilityZoneId LocationType = "availability-zone-id" - LocationTypeOutpost LocationType = "outpost" -) - -// Values returns all known values for LocationType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LocationType) Values() []LocationType { - return []LocationType{ - "region", - "availability-zone", - "availability-zone-id", - "outpost", - } -} - -type LockMode string - -// Enum values for LockMode -const ( - LockModeCompliance LockMode = "compliance" - LockModeGovernance LockMode = "governance" -) - -// Values returns all known values for LockMode. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (LockMode) Values() []LockMode { - return []LockMode{ - "compliance", - "governance", - } -} - -type LockState string - -// Enum values for LockState -const ( - LockStateCompliance LockState = "compliance" - LockStateGovernance LockState = "governance" - LockStateComplianceCooloff LockState = "compliance-cooloff" - LockStateExpired LockState = "expired" -) - -// Values returns all known values for LockState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (LockState) Values() []LockState { - return []LockState{ - "compliance", - "governance", - "compliance-cooloff", - "expired", - } -} - -type LogDestinationType string - -// Enum values for LogDestinationType -const ( - LogDestinationTypeCloudWatchLogs LogDestinationType = "cloud-watch-logs" - LogDestinationTypeS3 LogDestinationType = "s3" - LogDestinationTypeKinesisDataFirehose LogDestinationType = "kinesis-data-firehose" -) - -// Values returns all known values for LogDestinationType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (LogDestinationType) Values() []LogDestinationType { - return []LogDestinationType{ - "cloud-watch-logs", - "s3", - "kinesis-data-firehose", - } -} - -type MarketType string - -// Enum values for MarketType -const ( - MarketTypeSpot MarketType = "spot" - MarketTypeCapacityBlock MarketType = "capacity-block" -) - -// Values returns all known values for MarketType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (MarketType) Values() []MarketType { - return []MarketType{ - "spot", - "capacity-block", - } -} - -type MembershipType string - -// Enum values for MembershipType -const ( - MembershipTypeStatic MembershipType = "static" - MembershipTypeIgmp MembershipType = "igmp" -) - -// Values returns all known values for MembershipType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (MembershipType) Values() []MembershipType { - return []MembershipType{ - "static", - "igmp", - } -} - -type MetricType string - -// Enum values for MetricType -const ( - MetricTypeAggregateLatency MetricType = "aggregate-latency" -) - -// Values returns all known values for MetricType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (MetricType) Values() []MetricType { - return []MetricType{ - "aggregate-latency", - } -} - -type ModifyAvailabilityZoneOptInStatus string - -// Enum values for ModifyAvailabilityZoneOptInStatus -const ( - ModifyAvailabilityZoneOptInStatusOptedIn ModifyAvailabilityZoneOptInStatus = "opted-in" - ModifyAvailabilityZoneOptInStatusNotOptedIn ModifyAvailabilityZoneOptInStatus = "not-opted-in" -) - -// Values returns all known values for ModifyAvailabilityZoneOptInStatus. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (ModifyAvailabilityZoneOptInStatus) Values() []ModifyAvailabilityZoneOptInStatus { - return []ModifyAvailabilityZoneOptInStatus{ - "opted-in", - "not-opted-in", - } -} - -type MonitoringState string - -// Enum values for MonitoringState -const ( - MonitoringStateDisabled MonitoringState = "disabled" - MonitoringStateDisabling MonitoringState = "disabling" - MonitoringStateEnabled MonitoringState = "enabled" - MonitoringStatePending MonitoringState = "pending" -) - -// Values returns all known values for MonitoringState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (MonitoringState) Values() []MonitoringState { - return []MonitoringState{ - "disabled", - "disabling", - "enabled", - "pending", - } -} - -type MoveStatus string - -// Enum values for MoveStatus -const ( - MoveStatusMovingToVpc MoveStatus = "movingToVpc" - MoveStatusRestoringToClassic MoveStatus = "restoringToClassic" -) - -// Values returns all known values for MoveStatus. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (MoveStatus) Values() []MoveStatus { - return []MoveStatus{ - "movingToVpc", - "restoringToClassic", - } -} - -type MulticastSupportValue string - -// Enum values for MulticastSupportValue -const ( - MulticastSupportValueEnable MulticastSupportValue = "enable" - MulticastSupportValueDisable MulticastSupportValue = "disable" -) - -// Values returns all known values for MulticastSupportValue. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (MulticastSupportValue) Values() []MulticastSupportValue { - return []MulticastSupportValue{ - "enable", - "disable", - } -} - -type NatGatewayAddressStatus string - -// Enum values for NatGatewayAddressStatus -const ( - NatGatewayAddressStatusAssigning NatGatewayAddressStatus = "assigning" - NatGatewayAddressStatusUnassigning NatGatewayAddressStatus = "unassigning" - NatGatewayAddressStatusAssociating NatGatewayAddressStatus = "associating" - NatGatewayAddressStatusDisassociating NatGatewayAddressStatus = "disassociating" - NatGatewayAddressStatusSucceeded NatGatewayAddressStatus = "succeeded" - NatGatewayAddressStatusFailed NatGatewayAddressStatus = "failed" -) - -// Values returns all known values for NatGatewayAddressStatus. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (NatGatewayAddressStatus) Values() []NatGatewayAddressStatus { - return []NatGatewayAddressStatus{ - "assigning", - "unassigning", - "associating", - "disassociating", - "succeeded", - "failed", - } -} - -type NatGatewayState string - -// Enum values for NatGatewayState -const ( - NatGatewayStatePending NatGatewayState = "pending" - NatGatewayStateFailed NatGatewayState = "failed" - NatGatewayStateAvailable NatGatewayState = "available" - NatGatewayStateDeleting NatGatewayState = "deleting" - NatGatewayStateDeleted NatGatewayState = "deleted" -) - -// Values returns all known values for NatGatewayState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (NatGatewayState) Values() []NatGatewayState { - return []NatGatewayState{ - "pending", - "failed", - "available", - "deleting", - "deleted", - } -} - -type NetworkInterfaceAttribute string - -// Enum values for NetworkInterfaceAttribute -const ( - NetworkInterfaceAttributeDescription NetworkInterfaceAttribute = "description" - NetworkInterfaceAttributeGroupSet NetworkInterfaceAttribute = "groupSet" - NetworkInterfaceAttributeSourceDestCheck NetworkInterfaceAttribute = "sourceDestCheck" - NetworkInterfaceAttributeAttachment NetworkInterfaceAttribute = "attachment" -) - -// Values returns all known values for NetworkInterfaceAttribute. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (NetworkInterfaceAttribute) Values() []NetworkInterfaceAttribute { - return []NetworkInterfaceAttribute{ - "description", - "groupSet", - "sourceDestCheck", - "attachment", - } -} - -type NetworkInterfaceCreationType string - -// Enum values for NetworkInterfaceCreationType -const ( - NetworkInterfaceCreationTypeEfa NetworkInterfaceCreationType = "efa" - NetworkInterfaceCreationTypeBranch NetworkInterfaceCreationType = "branch" - NetworkInterfaceCreationTypeTrunk NetworkInterfaceCreationType = "trunk" -) - -// Values returns all known values for NetworkInterfaceCreationType. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (NetworkInterfaceCreationType) Values() []NetworkInterfaceCreationType { - return []NetworkInterfaceCreationType{ - "efa", - "branch", - "trunk", - } -} - -type NetworkInterfacePermissionStateCode string - -// Enum values for NetworkInterfacePermissionStateCode -const ( - NetworkInterfacePermissionStateCodePending NetworkInterfacePermissionStateCode = "pending" - NetworkInterfacePermissionStateCodeGranted NetworkInterfacePermissionStateCode = "granted" - NetworkInterfacePermissionStateCodeRevoking NetworkInterfacePermissionStateCode = "revoking" - NetworkInterfacePermissionStateCodeRevoked NetworkInterfacePermissionStateCode = "revoked" -) - -// Values returns all known values for NetworkInterfacePermissionStateCode. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (NetworkInterfacePermissionStateCode) Values() []NetworkInterfacePermissionStateCode { - return []NetworkInterfacePermissionStateCode{ - "pending", - "granted", - "revoking", - "revoked", - } -} - -type NetworkInterfaceStatus string - -// Enum values for NetworkInterfaceStatus -const ( - NetworkInterfaceStatusAvailable NetworkInterfaceStatus = "available" - NetworkInterfaceStatusAssociated NetworkInterfaceStatus = "associated" - NetworkInterfaceStatusAttaching NetworkInterfaceStatus = "attaching" - NetworkInterfaceStatusInUse NetworkInterfaceStatus = "in-use" - NetworkInterfaceStatusDetaching NetworkInterfaceStatus = "detaching" -) - -// Values returns all known values for NetworkInterfaceStatus. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (NetworkInterfaceStatus) Values() []NetworkInterfaceStatus { - return []NetworkInterfaceStatus{ - "available", - "associated", - "attaching", - "in-use", - "detaching", - } -} - -type NetworkInterfaceType string - -// Enum values for NetworkInterfaceType -const ( - NetworkInterfaceTypeInterface NetworkInterfaceType = "interface" - NetworkInterfaceTypeNatGateway NetworkInterfaceType = "natGateway" - NetworkInterfaceTypeEfa NetworkInterfaceType = "efa" - NetworkInterfaceTypeTrunk NetworkInterfaceType = "trunk" - NetworkInterfaceTypeLoadBalancer NetworkInterfaceType = "load_balancer" - NetworkInterfaceTypeNetworkLoadBalancer NetworkInterfaceType = "network_load_balancer" - NetworkInterfaceTypeVpcEndpoint NetworkInterfaceType = "vpc_endpoint" - NetworkInterfaceTypeBranch NetworkInterfaceType = "branch" - NetworkInterfaceTypeTransitGateway NetworkInterfaceType = "transit_gateway" - NetworkInterfaceTypeLambda NetworkInterfaceType = "lambda" - NetworkInterfaceTypeQuicksight NetworkInterfaceType = "quicksight" - NetworkInterfaceTypeGlobalAcceleratorManaged NetworkInterfaceType = "global_accelerator_managed" - NetworkInterfaceTypeApiGatewayManaged NetworkInterfaceType = "api_gateway_managed" - NetworkInterfaceTypeGatewayLoadBalancer NetworkInterfaceType = "gateway_load_balancer" - NetworkInterfaceTypeGatewayLoadBalancerEndpoint NetworkInterfaceType = "gateway_load_balancer_endpoint" - NetworkInterfaceTypeIotRulesManaged NetworkInterfaceType = "iot_rules_managed" - NetworkInterfaceTypeAwsCodestarConnectionsManaged NetworkInterfaceType = "aws_codestar_connections_managed" -) - -// Values returns all known values for NetworkInterfaceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (NetworkInterfaceType) Values() []NetworkInterfaceType { - return []NetworkInterfaceType{ - "interface", - "natGateway", - "efa", - "trunk", - "load_balancer", - "network_load_balancer", - "vpc_endpoint", - "branch", - "transit_gateway", - "lambda", - "quicksight", - "global_accelerator_managed", - "api_gateway_managed", - "gateway_load_balancer", - "gateway_load_balancer_endpoint", - "iot_rules_managed", - "aws_codestar_connections_managed", - } -} - -type NitroEnclavesSupport string - -// Enum values for NitroEnclavesSupport -const ( - NitroEnclavesSupportUnsupported NitroEnclavesSupport = "unsupported" - NitroEnclavesSupportSupported NitroEnclavesSupport = "supported" -) - -// Values returns all known values for NitroEnclavesSupport. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (NitroEnclavesSupport) Values() []NitroEnclavesSupport { - return []NitroEnclavesSupport{ - "unsupported", - "supported", - } -} - -type NitroTpmSupport string - -// Enum values for NitroTpmSupport -const ( - NitroTpmSupportUnsupported NitroTpmSupport = "unsupported" - NitroTpmSupportSupported NitroTpmSupport = "supported" -) - -// Values returns all known values for NitroTpmSupport. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (NitroTpmSupport) Values() []NitroTpmSupport { - return []NitroTpmSupport{ - "unsupported", - "supported", - } -} - -type OfferingClassType string - -// Enum values for OfferingClassType -const ( - OfferingClassTypeStandard OfferingClassType = "standard" - OfferingClassTypeConvertible OfferingClassType = "convertible" -) - -// Values returns all known values for OfferingClassType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (OfferingClassType) Values() []OfferingClassType { - return []OfferingClassType{ - "standard", - "convertible", - } -} - -type OfferingTypeValues string - -// Enum values for OfferingTypeValues -const ( - OfferingTypeValuesHeavyUtilization OfferingTypeValues = "Heavy Utilization" - OfferingTypeValuesMediumUtilization OfferingTypeValues = "Medium Utilization" - OfferingTypeValuesLightUtilization OfferingTypeValues = "Light Utilization" - OfferingTypeValuesNoUpfront OfferingTypeValues = "No Upfront" - OfferingTypeValuesPartialUpfront OfferingTypeValues = "Partial Upfront" - OfferingTypeValuesAllUpfront OfferingTypeValues = "All Upfront" -) - -// Values returns all known values for OfferingTypeValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (OfferingTypeValues) Values() []OfferingTypeValues { - return []OfferingTypeValues{ - "Heavy Utilization", - "Medium Utilization", - "Light Utilization", - "No Upfront", - "Partial Upfront", - "All Upfront", - } -} - -type OnDemandAllocationStrategy string - -// Enum values for OnDemandAllocationStrategy -const ( - OnDemandAllocationStrategyLowestPrice OnDemandAllocationStrategy = "lowestPrice" - OnDemandAllocationStrategyPrioritized OnDemandAllocationStrategy = "prioritized" -) - -// Values returns all known values for OnDemandAllocationStrategy. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (OnDemandAllocationStrategy) Values() []OnDemandAllocationStrategy { - return []OnDemandAllocationStrategy{ - "lowestPrice", - "prioritized", - } -} - -type OperationType string - -// Enum values for OperationType -const ( - OperationTypeAdd OperationType = "add" - OperationTypeRemove OperationType = "remove" -) - -// Values returns all known values for OperationType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (OperationType) Values() []OperationType { - return []OperationType{ - "add", - "remove", - } -} - -type PartitionLoadFrequency string - -// Enum values for PartitionLoadFrequency -const ( - PartitionLoadFrequencyNone PartitionLoadFrequency = "none" - PartitionLoadFrequencyDaily PartitionLoadFrequency = "daily" - PartitionLoadFrequencyWeekly PartitionLoadFrequency = "weekly" - PartitionLoadFrequencyMonthly PartitionLoadFrequency = "monthly" -) - -// Values returns all known values for PartitionLoadFrequency. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PartitionLoadFrequency) Values() []PartitionLoadFrequency { - return []PartitionLoadFrequency{ - "none", - "daily", - "weekly", - "monthly", - } -} - -type PayerResponsibility string - -// Enum values for PayerResponsibility -const ( - PayerResponsibilityServiceOwner PayerResponsibility = "ServiceOwner" -) - -// Values returns all known values for PayerResponsibility. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PayerResponsibility) Values() []PayerResponsibility { - return []PayerResponsibility{ - "ServiceOwner", - } -} - -type PaymentOption string - -// Enum values for PaymentOption -const ( - PaymentOptionAllUpfront PaymentOption = "AllUpfront" - PaymentOptionPartialUpfront PaymentOption = "PartialUpfront" - PaymentOptionNoUpfront PaymentOption = "NoUpfront" -) - -// Values returns all known values for PaymentOption. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PaymentOption) Values() []PaymentOption { - return []PaymentOption{ - "AllUpfront", - "PartialUpfront", - "NoUpfront", - } -} - -type PeriodType string - -// Enum values for PeriodType -const ( - PeriodTypeFiveMinutes PeriodType = "five-minutes" - PeriodTypeFifteenMinutes PeriodType = "fifteen-minutes" - PeriodTypeOneHour PeriodType = "one-hour" - PeriodTypeThreeHours PeriodType = "three-hours" - PeriodTypeOneDay PeriodType = "one-day" - PeriodTypeOneWeek PeriodType = "one-week" -) - -// Values returns all known values for PeriodType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (PeriodType) Values() []PeriodType { - return []PeriodType{ - "five-minutes", - "fifteen-minutes", - "one-hour", - "three-hours", - "one-day", - "one-week", - } -} - -type PermissionGroup string - -// Enum values for PermissionGroup -const ( - PermissionGroupAll PermissionGroup = "all" -) - -// Values returns all known values for PermissionGroup. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PermissionGroup) Values() []PermissionGroup { - return []PermissionGroup{ - "all", - } -} - -type PlacementGroupState string - -// Enum values for PlacementGroupState -const ( - PlacementGroupStatePending PlacementGroupState = "pending" - PlacementGroupStateAvailable PlacementGroupState = "available" - PlacementGroupStateDeleting PlacementGroupState = "deleting" - PlacementGroupStateDeleted PlacementGroupState = "deleted" -) - -// Values returns all known values for PlacementGroupState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PlacementGroupState) Values() []PlacementGroupState { - return []PlacementGroupState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type PlacementGroupStrategy string - -// Enum values for PlacementGroupStrategy -const ( - PlacementGroupStrategyCluster PlacementGroupStrategy = "cluster" - PlacementGroupStrategyPartition PlacementGroupStrategy = "partition" - PlacementGroupStrategySpread PlacementGroupStrategy = "spread" -) - -// Values returns all known values for PlacementGroupStrategy. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PlacementGroupStrategy) Values() []PlacementGroupStrategy { - return []PlacementGroupStrategy{ - "cluster", - "partition", - "spread", - } -} - -type PlacementStrategy string - -// Enum values for PlacementStrategy -const ( - PlacementStrategyCluster PlacementStrategy = "cluster" - PlacementStrategySpread PlacementStrategy = "spread" - PlacementStrategyPartition PlacementStrategy = "partition" -) - -// Values returns all known values for PlacementStrategy. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PlacementStrategy) Values() []PlacementStrategy { - return []PlacementStrategy{ - "cluster", - "spread", - "partition", - } -} - -type PlatformValues string - -// Enum values for PlatformValues -const ( - PlatformValuesWindows PlatformValues = "Windows" -) - -// Values returns all known values for PlatformValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PlatformValues) Values() []PlatformValues { - return []PlatformValues{ - "Windows", - } -} - -type PrefixListState string - -// Enum values for PrefixListState -const ( - PrefixListStateCreateInProgress PrefixListState = "create-in-progress" - PrefixListStateCreateComplete PrefixListState = "create-complete" - PrefixListStateCreateFailed PrefixListState = "create-failed" - PrefixListStateModifyInProgress PrefixListState = "modify-in-progress" - PrefixListStateModifyComplete PrefixListState = "modify-complete" - PrefixListStateModifyFailed PrefixListState = "modify-failed" - PrefixListStateRestoreInProgress PrefixListState = "restore-in-progress" - PrefixListStateRestoreComplete PrefixListState = "restore-complete" - PrefixListStateRestoreFailed PrefixListState = "restore-failed" - PrefixListStateDeleteInProgress PrefixListState = "delete-in-progress" - PrefixListStateDeleteComplete PrefixListState = "delete-complete" - PrefixListStateDeleteFailed PrefixListState = "delete-failed" -) - -// Values returns all known values for PrefixListState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PrefixListState) Values() []PrefixListState { - return []PrefixListState{ - "create-in-progress", - "create-complete", - "create-failed", - "modify-in-progress", - "modify-complete", - "modify-failed", - "restore-in-progress", - "restore-complete", - "restore-failed", - "delete-in-progress", - "delete-complete", - "delete-failed", - } -} - -type PrincipalType string - -// Enum values for PrincipalType -const ( - PrincipalTypeAll PrincipalType = "All" - PrincipalTypeService PrincipalType = "Service" - PrincipalTypeOrganizationUnit PrincipalType = "OrganizationUnit" - PrincipalTypeAccount PrincipalType = "Account" - PrincipalTypeUser PrincipalType = "User" - PrincipalTypeRole PrincipalType = "Role" -) - -// Values returns all known values for PrincipalType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (PrincipalType) Values() []PrincipalType { - return []PrincipalType{ - "All", - "Service", - "OrganizationUnit", - "Account", - "User", - "Role", - } -} - -type ProductCodeValues string - -// Enum values for ProductCodeValues -const ( - ProductCodeValuesDevpay ProductCodeValues = "devpay" - ProductCodeValuesMarketplace ProductCodeValues = "marketplace" -) - -// Values returns all known values for ProductCodeValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ProductCodeValues) Values() []ProductCodeValues { - return []ProductCodeValues{ - "devpay", - "marketplace", - } -} - -type Protocol string - -// Enum values for Protocol -const ( - ProtocolTcp Protocol = "tcp" - ProtocolUdp Protocol = "udp" -) - -// Values returns all known values for Protocol. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (Protocol) Values() []Protocol { - return []Protocol{ - "tcp", - "udp", - } -} - -type ProtocolValue string - -// Enum values for ProtocolValue -const ( - ProtocolValueGre ProtocolValue = "gre" -) - -// Values returns all known values for ProtocolValue. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ProtocolValue) Values() []ProtocolValue { - return []ProtocolValue{ - "gre", - } -} - -type RecurringChargeFrequency string - -// Enum values for RecurringChargeFrequency -const ( - RecurringChargeFrequencyHourly RecurringChargeFrequency = "Hourly" -) - -// Values returns all known values for RecurringChargeFrequency. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (RecurringChargeFrequency) Values() []RecurringChargeFrequency { - return []RecurringChargeFrequency{ - "Hourly", - } -} - -type ReplacementStrategy string - -// Enum values for ReplacementStrategy -const ( - ReplacementStrategyLaunch ReplacementStrategy = "launch" - ReplacementStrategyLaunchBeforeTerminate ReplacementStrategy = "launch-before-terminate" -) - -// Values returns all known values for ReplacementStrategy. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ReplacementStrategy) Values() []ReplacementStrategy { - return []ReplacementStrategy{ - "launch", - "launch-before-terminate", - } -} - -type ReplaceRootVolumeTaskState string - -// Enum values for ReplaceRootVolumeTaskState -const ( - ReplaceRootVolumeTaskStatePending ReplaceRootVolumeTaskState = "pending" - ReplaceRootVolumeTaskStateInProgress ReplaceRootVolumeTaskState = "in-progress" - ReplaceRootVolumeTaskStateFailing ReplaceRootVolumeTaskState = "failing" - ReplaceRootVolumeTaskStateSucceeded ReplaceRootVolumeTaskState = "succeeded" - ReplaceRootVolumeTaskStateFailed ReplaceRootVolumeTaskState = "failed" - ReplaceRootVolumeTaskStateFailedDetached ReplaceRootVolumeTaskState = "failed-detached" -) - -// Values returns all known values for ReplaceRootVolumeTaskState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ReplaceRootVolumeTaskState) Values() []ReplaceRootVolumeTaskState { - return []ReplaceRootVolumeTaskState{ - "pending", - "in-progress", - "failing", - "succeeded", - "failed", - "failed-detached", - } -} - -type ReportInstanceReasonCodes string - -// Enum values for ReportInstanceReasonCodes -const ( - ReportInstanceReasonCodesInstanceStuckInState ReportInstanceReasonCodes = "instance-stuck-in-state" - ReportInstanceReasonCodesUnresponsive ReportInstanceReasonCodes = "unresponsive" - ReportInstanceReasonCodesNotAcceptingCredentials ReportInstanceReasonCodes = "not-accepting-credentials" - ReportInstanceReasonCodesPasswordNotAvailable ReportInstanceReasonCodes = "password-not-available" - ReportInstanceReasonCodesPerformanceNetwork ReportInstanceReasonCodes = "performance-network" - ReportInstanceReasonCodesPerformanceInstanceStore ReportInstanceReasonCodes = "performance-instance-store" - ReportInstanceReasonCodesPerformanceEbsVolume ReportInstanceReasonCodes = "performance-ebs-volume" - ReportInstanceReasonCodesPerformanceOther ReportInstanceReasonCodes = "performance-other" - ReportInstanceReasonCodesOther ReportInstanceReasonCodes = "other" -) - -// Values returns all known values for ReportInstanceReasonCodes. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ReportInstanceReasonCodes) Values() []ReportInstanceReasonCodes { - return []ReportInstanceReasonCodes{ - "instance-stuck-in-state", - "unresponsive", - "not-accepting-credentials", - "password-not-available", - "performance-network", - "performance-instance-store", - "performance-ebs-volume", - "performance-other", - "other", - } -} - -type ReportStatusType string - -// Enum values for ReportStatusType -const ( - ReportStatusTypeOk ReportStatusType = "ok" - ReportStatusTypeImpaired ReportStatusType = "impaired" -) - -// Values returns all known values for ReportStatusType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ReportStatusType) Values() []ReportStatusType { - return []ReportStatusType{ - "ok", - "impaired", - } -} - -type ReservationState string - -// Enum values for ReservationState -const ( - ReservationStatePaymentPending ReservationState = "payment-pending" - ReservationStatePaymentFailed ReservationState = "payment-failed" - ReservationStateActive ReservationState = "active" - ReservationStateRetired ReservationState = "retired" -) - -// Values returns all known values for ReservationState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ReservationState) Values() []ReservationState { - return []ReservationState{ - "payment-pending", - "payment-failed", - "active", - "retired", - } -} - -type ReservedInstanceState string - -// Enum values for ReservedInstanceState -const ( - ReservedInstanceStatePaymentPending ReservedInstanceState = "payment-pending" - ReservedInstanceStateActive ReservedInstanceState = "active" - ReservedInstanceStatePaymentFailed ReservedInstanceState = "payment-failed" - ReservedInstanceStateRetired ReservedInstanceState = "retired" - ReservedInstanceStateQueued ReservedInstanceState = "queued" - ReservedInstanceStateQueuedDeleted ReservedInstanceState = "queued-deleted" -) - -// Values returns all known values for ReservedInstanceState. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ReservedInstanceState) Values() []ReservedInstanceState { - return []ReservedInstanceState{ - "payment-pending", - "active", - "payment-failed", - "retired", - "queued", - "queued-deleted", - } -} - -type ResetFpgaImageAttributeName string - -// Enum values for ResetFpgaImageAttributeName -const ( - ResetFpgaImageAttributeNameLoadPermission ResetFpgaImageAttributeName = "loadPermission" -) - -// Values returns all known values for ResetFpgaImageAttributeName. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (ResetFpgaImageAttributeName) Values() []ResetFpgaImageAttributeName { - return []ResetFpgaImageAttributeName{ - "loadPermission", - } -} - -type ResetImageAttributeName string - -// Enum values for ResetImageAttributeName -const ( - ResetImageAttributeNameLaunchPermission ResetImageAttributeName = "launchPermission" -) - -// Values returns all known values for ResetImageAttributeName. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ResetImageAttributeName) Values() []ResetImageAttributeName { - return []ResetImageAttributeName{ - "launchPermission", - } -} - -type ResourceType string - -// Enum values for ResourceType -const ( - ResourceTypeCapacityReservation ResourceType = "capacity-reservation" - ResourceTypeClientVpnEndpoint ResourceType = "client-vpn-endpoint" - ResourceTypeCustomerGateway ResourceType = "customer-gateway" - ResourceTypeCarrierGateway ResourceType = "carrier-gateway" - ResourceTypeCoipPool ResourceType = "coip-pool" - ResourceTypeDedicatedHost ResourceType = "dedicated-host" - ResourceTypeDhcpOptions ResourceType = "dhcp-options" - ResourceTypeEgressOnlyInternetGateway ResourceType = "egress-only-internet-gateway" - ResourceTypeElasticIp ResourceType = "elastic-ip" - ResourceTypeElasticGpu ResourceType = "elastic-gpu" - ResourceTypeExportImageTask ResourceType = "export-image-task" - ResourceTypeExportInstanceTask ResourceType = "export-instance-task" - ResourceTypeFleet ResourceType = "fleet" - ResourceTypeFpgaImage ResourceType = "fpga-image" - ResourceTypeHostReservation ResourceType = "host-reservation" - ResourceTypeImage ResourceType = "image" - ResourceTypeImportImageTask ResourceType = "import-image-task" - ResourceTypeImportSnapshotTask ResourceType = "import-snapshot-task" - ResourceTypeInstance ResourceType = "instance" - ResourceTypeInstanceEventWindow ResourceType = "instance-event-window" - ResourceTypeInternetGateway ResourceType = "internet-gateway" - ResourceTypeIpam ResourceType = "ipam" - ResourceTypeIpamPool ResourceType = "ipam-pool" - ResourceTypeIpamScope ResourceType = "ipam-scope" - ResourceTypeIpv4poolEc2 ResourceType = "ipv4pool-ec2" - ResourceTypeIpv6poolEc2 ResourceType = "ipv6pool-ec2" - ResourceTypeKeyPair ResourceType = "key-pair" - ResourceTypeLaunchTemplate ResourceType = "launch-template" - ResourceTypeLocalGateway ResourceType = "local-gateway" - ResourceTypeLocalGatewayRouteTable ResourceType = "local-gateway-route-table" - ResourceTypeLocalGatewayVirtualInterface ResourceType = "local-gateway-virtual-interface" - ResourceTypeLocalGatewayVirtualInterfaceGroup ResourceType = "local-gateway-virtual-interface-group" - ResourceTypeLocalGatewayRouteTableVpcAssociation ResourceType = "local-gateway-route-table-vpc-association" - ResourceTypeLocalGatewayRouteTableVirtualInterfaceGroupAssociation ResourceType = "local-gateway-route-table-virtual-interface-group-association" - ResourceTypeNatgateway ResourceType = "natgateway" - ResourceTypeNetworkAcl ResourceType = "network-acl" - ResourceTypeNetworkInterface ResourceType = "network-interface" - ResourceTypeNetworkInsightsAnalysis ResourceType = "network-insights-analysis" - ResourceTypeNetworkInsightsPath ResourceType = "network-insights-path" - ResourceTypeNetworkInsightsAccessScope ResourceType = "network-insights-access-scope" - ResourceTypeNetworkInsightsAccessScopeAnalysis ResourceType = "network-insights-access-scope-analysis" - ResourceTypePlacementGroup ResourceType = "placement-group" - ResourceTypePrefixList ResourceType = "prefix-list" - ResourceTypeReplaceRootVolumeTask ResourceType = "replace-root-volume-task" - ResourceTypeReservedInstances ResourceType = "reserved-instances" - ResourceTypeRouteTable ResourceType = "route-table" - ResourceTypeSecurityGroup ResourceType = "security-group" - ResourceTypeSecurityGroupRule ResourceType = "security-group-rule" - ResourceTypeSnapshot ResourceType = "snapshot" - ResourceTypeSpotFleetRequest ResourceType = "spot-fleet-request" - ResourceTypeSpotInstancesRequest ResourceType = "spot-instances-request" - ResourceTypeSubnet ResourceType = "subnet" - ResourceTypeSubnetCidrReservation ResourceType = "subnet-cidr-reservation" - ResourceTypeTrafficMirrorFilter ResourceType = "traffic-mirror-filter" - ResourceTypeTrafficMirrorSession ResourceType = "traffic-mirror-session" - ResourceTypeTrafficMirrorTarget ResourceType = "traffic-mirror-target" - ResourceTypeTransitGateway ResourceType = "transit-gateway" - ResourceTypeTransitGatewayAttachment ResourceType = "transit-gateway-attachment" - ResourceTypeTransitGatewayConnectPeer ResourceType = "transit-gateway-connect-peer" - ResourceTypeTransitGatewayMulticastDomain ResourceType = "transit-gateway-multicast-domain" - ResourceTypeTransitGatewayPolicyTable ResourceType = "transit-gateway-policy-table" - ResourceTypeTransitGatewayRouteTable ResourceType = "transit-gateway-route-table" - ResourceTypeTransitGatewayRouteTableAnnouncement ResourceType = "transit-gateway-route-table-announcement" - ResourceTypeVolume ResourceType = "volume" - ResourceTypeVpc ResourceType = "vpc" - ResourceTypeVpcEndpoint ResourceType = "vpc-endpoint" - ResourceTypeVpcEndpointConnection ResourceType = "vpc-endpoint-connection" - ResourceTypeVpcEndpointService ResourceType = "vpc-endpoint-service" - ResourceTypeVpcEndpointServicePermission ResourceType = "vpc-endpoint-service-permission" - ResourceTypeVpcPeeringConnection ResourceType = "vpc-peering-connection" - ResourceTypeVpnConnection ResourceType = "vpn-connection" - ResourceTypeVpnGateway ResourceType = "vpn-gateway" - ResourceTypeVpcFlowLog ResourceType = "vpc-flow-log" - ResourceTypeCapacityReservationFleet ResourceType = "capacity-reservation-fleet" - ResourceTypeTrafficMirrorFilterRule ResourceType = "traffic-mirror-filter-rule" - ResourceTypeVpcEndpointConnectionDeviceType ResourceType = "vpc-endpoint-connection-device-type" - ResourceTypeVerifiedAccessInstance ResourceType = "verified-access-instance" - ResourceTypeVerifiedAccessGroup ResourceType = "verified-access-group" - ResourceTypeVerifiedAccessEndpoint ResourceType = "verified-access-endpoint" - ResourceTypeVerifiedAccessPolicy ResourceType = "verified-access-policy" - ResourceTypeVerifiedAccessTrustProvider ResourceType = "verified-access-trust-provider" - ResourceTypeVpnConnectionDeviceType ResourceType = "vpn-connection-device-type" - ResourceTypeVpcBlockPublicAccessExclusion ResourceType = "vpc-block-public-access-exclusion" - ResourceTypeIpamResourceDiscovery ResourceType = "ipam-resource-discovery" - ResourceTypeIpamResourceDiscoveryAssociation ResourceType = "ipam-resource-discovery-association" - ResourceTypeInstanceConnectEndpoint ResourceType = "instance-connect-endpoint" -) - -// Values returns all known values for ResourceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ResourceType) Values() []ResourceType { - return []ResourceType{ - "capacity-reservation", - "client-vpn-endpoint", - "customer-gateway", - "carrier-gateway", - "coip-pool", - "dedicated-host", - "dhcp-options", - "egress-only-internet-gateway", - "elastic-ip", - "elastic-gpu", - "export-image-task", - "export-instance-task", - "fleet", - "fpga-image", - "host-reservation", - "image", - "import-image-task", - "import-snapshot-task", - "instance", - "instance-event-window", - "internet-gateway", - "ipam", - "ipam-pool", - "ipam-scope", - "ipv4pool-ec2", - "ipv6pool-ec2", - "key-pair", - "launch-template", - "local-gateway", - "local-gateway-route-table", - "local-gateway-virtual-interface", - "local-gateway-virtual-interface-group", - "local-gateway-route-table-vpc-association", - "local-gateway-route-table-virtual-interface-group-association", - "natgateway", - "network-acl", - "network-interface", - "network-insights-analysis", - "network-insights-path", - "network-insights-access-scope", - "network-insights-access-scope-analysis", - "placement-group", - "prefix-list", - "replace-root-volume-task", - "reserved-instances", - "route-table", - "security-group", - "security-group-rule", - "snapshot", - "spot-fleet-request", - "spot-instances-request", - "subnet", - "subnet-cidr-reservation", - "traffic-mirror-filter", - "traffic-mirror-session", - "traffic-mirror-target", - "transit-gateway", - "transit-gateway-attachment", - "transit-gateway-connect-peer", - "transit-gateway-multicast-domain", - "transit-gateway-policy-table", - "transit-gateway-route-table", - "transit-gateway-route-table-announcement", - "volume", - "vpc", - "vpc-endpoint", - "vpc-endpoint-connection", - "vpc-endpoint-service", - "vpc-endpoint-service-permission", - "vpc-peering-connection", - "vpn-connection", - "vpn-gateway", - "vpc-flow-log", - "capacity-reservation-fleet", - "traffic-mirror-filter-rule", - "vpc-endpoint-connection-device-type", - "verified-access-instance", - "verified-access-group", - "verified-access-endpoint", - "verified-access-policy", - "verified-access-trust-provider", - "vpn-connection-device-type", - "vpc-block-public-access-exclusion", - "ipam-resource-discovery", - "ipam-resource-discovery-association", - "instance-connect-endpoint", - } -} - -type RIProductDescription string - -// Enum values for RIProductDescription -const ( - RIProductDescriptionLinuxUnix RIProductDescription = "Linux/UNIX" - RIProductDescriptionLinuxUnixAmazonVpc RIProductDescription = "Linux/UNIX (Amazon VPC)" - RIProductDescriptionWindows RIProductDescription = "Windows" - RIProductDescriptionWindowsAmazonVpc RIProductDescription = "Windows (Amazon VPC)" -) - -// Values returns all known values for RIProductDescription. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (RIProductDescription) Values() []RIProductDescription { - return []RIProductDescription{ - "Linux/UNIX", - "Linux/UNIX (Amazon VPC)", - "Windows", - "Windows (Amazon VPC)", - } -} - -type RootDeviceType string - -// Enum values for RootDeviceType -const ( - RootDeviceTypeEbs RootDeviceType = "ebs" - RootDeviceTypeInstanceStore RootDeviceType = "instance-store" -) - -// Values returns all known values for RootDeviceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (RootDeviceType) Values() []RootDeviceType { - return []RootDeviceType{ - "ebs", - "instance-store", - } -} - -type RouteOrigin string - -// Enum values for RouteOrigin -const ( - RouteOriginCreateRouteTable RouteOrigin = "CreateRouteTable" - RouteOriginCreateRoute RouteOrigin = "CreateRoute" - RouteOriginEnableVgwRoutePropagation RouteOrigin = "EnableVgwRoutePropagation" -) - -// Values returns all known values for RouteOrigin. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (RouteOrigin) Values() []RouteOrigin { - return []RouteOrigin{ - "CreateRouteTable", - "CreateRoute", - "EnableVgwRoutePropagation", - } -} - -type RouteState string - -// Enum values for RouteState -const ( - RouteStateActive RouteState = "active" - RouteStateBlackhole RouteState = "blackhole" -) - -// Values returns all known values for RouteState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (RouteState) Values() []RouteState { - return []RouteState{ - "active", - "blackhole", - } -} - -type RouteTableAssociationStateCode string - -// Enum values for RouteTableAssociationStateCode -const ( - RouteTableAssociationStateCodeAssociating RouteTableAssociationStateCode = "associating" - RouteTableAssociationStateCodeAssociated RouteTableAssociationStateCode = "associated" - RouteTableAssociationStateCodeDisassociating RouteTableAssociationStateCode = "disassociating" - RouteTableAssociationStateCodeDisassociated RouteTableAssociationStateCode = "disassociated" - RouteTableAssociationStateCodeFailed RouteTableAssociationStateCode = "failed" -) - -// Values returns all known values for RouteTableAssociationStateCode. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (RouteTableAssociationStateCode) Values() []RouteTableAssociationStateCode { - return []RouteTableAssociationStateCode{ - "associating", - "associated", - "disassociating", - "disassociated", - "failed", - } -} - -type RuleAction string - -// Enum values for RuleAction -const ( - RuleActionAllow RuleAction = "allow" - RuleActionDeny RuleAction = "deny" -) - -// Values returns all known values for RuleAction. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (RuleAction) Values() []RuleAction { - return []RuleAction{ - "allow", - "deny", - } -} - -type Scope string - -// Enum values for Scope -const ( - ScopeAvailabilityZone Scope = "Availability Zone" - ScopeRegional Scope = "Region" -) - -// Values returns all known values for Scope. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (Scope) Values() []Scope { - return []Scope{ - "Availability Zone", - "Region", - } -} - -type SecurityGroupReferencingSupportValue string - -// Enum values for SecurityGroupReferencingSupportValue -const ( - SecurityGroupReferencingSupportValueEnable SecurityGroupReferencingSupportValue = "enable" - SecurityGroupReferencingSupportValueDisable SecurityGroupReferencingSupportValue = "disable" -) - -// Values returns all known values for SecurityGroupReferencingSupportValue. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (SecurityGroupReferencingSupportValue) Values() []SecurityGroupReferencingSupportValue { - return []SecurityGroupReferencingSupportValue{ - "enable", - "disable", - } -} - -type SelfServicePortal string - -// Enum values for SelfServicePortal -const ( - SelfServicePortalEnabled SelfServicePortal = "enabled" - SelfServicePortalDisabled SelfServicePortal = "disabled" -) - -// Values returns all known values for SelfServicePortal. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SelfServicePortal) Values() []SelfServicePortal { - return []SelfServicePortal{ - "enabled", - "disabled", - } -} - -type ServiceConnectivityType string - -// Enum values for ServiceConnectivityType -const ( - ServiceConnectivityTypeIpv4 ServiceConnectivityType = "ipv4" - ServiceConnectivityTypeIpv6 ServiceConnectivityType = "ipv6" -) - -// Values returns all known values for ServiceConnectivityType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ServiceConnectivityType) Values() []ServiceConnectivityType { - return []ServiceConnectivityType{ - "ipv4", - "ipv6", - } -} - -type ServiceState string - -// Enum values for ServiceState -const ( - ServiceStatePending ServiceState = "Pending" - ServiceStateAvailable ServiceState = "Available" - ServiceStateDeleting ServiceState = "Deleting" - ServiceStateDeleted ServiceState = "Deleted" - ServiceStateFailed ServiceState = "Failed" -) - -// Values returns all known values for ServiceState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ServiceState) Values() []ServiceState { - return []ServiceState{ - "Pending", - "Available", - "Deleting", - "Deleted", - "Failed", - } -} - -type ServiceType string - -// Enum values for ServiceType -const ( - ServiceTypeInterface ServiceType = "Interface" - ServiceTypeGateway ServiceType = "Gateway" - ServiceTypeGatewayLoadBalancer ServiceType = "GatewayLoadBalancer" -) - -// Values returns all known values for ServiceType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (ServiceType) Values() []ServiceType { - return []ServiceType{ - "Interface", - "Gateway", - "GatewayLoadBalancer", - } -} - -type ShutdownBehavior string - -// Enum values for ShutdownBehavior -const ( - ShutdownBehaviorStop ShutdownBehavior = "stop" - ShutdownBehaviorTerminate ShutdownBehavior = "terminate" -) - -// Values returns all known values for ShutdownBehavior. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (ShutdownBehavior) Values() []ShutdownBehavior { - return []ShutdownBehavior{ - "stop", - "terminate", - } -} - -type SnapshotAttributeName string - -// Enum values for SnapshotAttributeName -const ( - SnapshotAttributeNameProductCodes SnapshotAttributeName = "productCodes" - SnapshotAttributeNameCreateVolumePermission SnapshotAttributeName = "createVolumePermission" -) - -// Values returns all known values for SnapshotAttributeName. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SnapshotAttributeName) Values() []SnapshotAttributeName { - return []SnapshotAttributeName{ - "productCodes", - "createVolumePermission", - } -} - -type SnapshotBlockPublicAccessState string - -// Enum values for SnapshotBlockPublicAccessState -const ( - SnapshotBlockPublicAccessStateBlockAllSharing SnapshotBlockPublicAccessState = "block-all-sharing" - SnapshotBlockPublicAccessStateBlockNewSharing SnapshotBlockPublicAccessState = "block-new-sharing" - SnapshotBlockPublicAccessStateUnblocked SnapshotBlockPublicAccessState = "unblocked" -) - -// Values returns all known values for SnapshotBlockPublicAccessState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (SnapshotBlockPublicAccessState) Values() []SnapshotBlockPublicAccessState { - return []SnapshotBlockPublicAccessState{ - "block-all-sharing", - "block-new-sharing", - "unblocked", - } -} - -type SnapshotState string - -// Enum values for SnapshotState -const ( - SnapshotStatePending SnapshotState = "pending" - SnapshotStateCompleted SnapshotState = "completed" - SnapshotStateError SnapshotState = "error" - SnapshotStateRecoverable SnapshotState = "recoverable" - SnapshotStateRecovering SnapshotState = "recovering" -) - -// Values returns all known values for SnapshotState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SnapshotState) Values() []SnapshotState { - return []SnapshotState{ - "pending", - "completed", - "error", - "recoverable", - "recovering", - } -} - -type SpotAllocationStrategy string - -// Enum values for SpotAllocationStrategy -const ( - SpotAllocationStrategyLowestPrice SpotAllocationStrategy = "lowest-price" - SpotAllocationStrategyDiversified SpotAllocationStrategy = "diversified" - SpotAllocationStrategyCapacityOptimized SpotAllocationStrategy = "capacity-optimized" - SpotAllocationStrategyCapacityOptimizedPrioritized SpotAllocationStrategy = "capacity-optimized-prioritized" - SpotAllocationStrategyPriceCapacityOptimized SpotAllocationStrategy = "price-capacity-optimized" -) - -// Values returns all known values for SpotAllocationStrategy. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SpotAllocationStrategy) Values() []SpotAllocationStrategy { - return []SpotAllocationStrategy{ - "lowest-price", - "diversified", - "capacity-optimized", - "capacity-optimized-prioritized", - "price-capacity-optimized", - } -} - -type SpotInstanceInterruptionBehavior string - -// Enum values for SpotInstanceInterruptionBehavior -const ( - SpotInstanceInterruptionBehaviorHibernate SpotInstanceInterruptionBehavior = "hibernate" - SpotInstanceInterruptionBehaviorStop SpotInstanceInterruptionBehavior = "stop" - SpotInstanceInterruptionBehaviorTerminate SpotInstanceInterruptionBehavior = "terminate" -) - -// Values returns all known values for SpotInstanceInterruptionBehavior. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (SpotInstanceInterruptionBehavior) Values() []SpotInstanceInterruptionBehavior { - return []SpotInstanceInterruptionBehavior{ - "hibernate", - "stop", - "terminate", - } -} - -type SpotInstanceState string - -// Enum values for SpotInstanceState -const ( - SpotInstanceStateOpen SpotInstanceState = "open" - SpotInstanceStateActive SpotInstanceState = "active" - SpotInstanceStateClosed SpotInstanceState = "closed" - SpotInstanceStateCancelled SpotInstanceState = "cancelled" - SpotInstanceStateFailed SpotInstanceState = "failed" - SpotInstanceStateDisabled SpotInstanceState = "disabled" -) - -// Values returns all known values for SpotInstanceState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SpotInstanceState) Values() []SpotInstanceState { - return []SpotInstanceState{ - "open", - "active", - "closed", - "cancelled", - "failed", - "disabled", - } -} - -type SpotInstanceType string - -// Enum values for SpotInstanceType -const ( - SpotInstanceTypeOneTime SpotInstanceType = "one-time" - SpotInstanceTypePersistent SpotInstanceType = "persistent" -) - -// Values returns all known values for SpotInstanceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SpotInstanceType) Values() []SpotInstanceType { - return []SpotInstanceType{ - "one-time", - "persistent", - } -} - -type SpreadLevel string - -// Enum values for SpreadLevel -const ( - SpreadLevelHost SpreadLevel = "host" - SpreadLevelRack SpreadLevel = "rack" -) - -// Values returns all known values for SpreadLevel. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (SpreadLevel) Values() []SpreadLevel { - return []SpreadLevel{ - "host", - "rack", - } -} - -type SSEType string - -// Enum values for SSEType -const ( - SSETypeSseEbs SSEType = "sse-ebs" - SSETypeSseKms SSEType = "sse-kms" - SSETypeNone SSEType = "none" -) - -// Values returns all known values for SSEType. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (SSEType) Values() []SSEType { - return []SSEType{ - "sse-ebs", - "sse-kms", - "none", - } -} - -type State string - -// Enum values for State -const ( - StatePendingAcceptance State = "PendingAcceptance" - StatePending State = "Pending" - StateAvailable State = "Available" - StateDeleting State = "Deleting" - StateDeleted State = "Deleted" - StateRejected State = "Rejected" - StateFailed State = "Failed" - StateExpired State = "Expired" -) - -// Values returns all known values for State. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (State) Values() []State { - return []State{ - "PendingAcceptance", - "Pending", - "Available", - "Deleting", - "Deleted", - "Rejected", - "Failed", - "Expired", - } -} - -type StaticSourcesSupportValue string - -// Enum values for StaticSourcesSupportValue -const ( - StaticSourcesSupportValueEnable StaticSourcesSupportValue = "enable" - StaticSourcesSupportValueDisable StaticSourcesSupportValue = "disable" -) - -// Values returns all known values for StaticSourcesSupportValue. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (StaticSourcesSupportValue) Values() []StaticSourcesSupportValue { - return []StaticSourcesSupportValue{ - "enable", - "disable", - } -} - -type StatisticType string - -// Enum values for StatisticType -const ( - StatisticTypeP50 StatisticType = "p50" -) - -// Values returns all known values for StatisticType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (StatisticType) Values() []StatisticType { - return []StatisticType{ - "p50", - } -} - -type Status string - -// Enum values for Status -const ( - StatusMoveInProgress Status = "MoveInProgress" - StatusInVpc Status = "InVpc" - StatusInClassic Status = "InClassic" -) - -// Values returns all known values for Status. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (Status) Values() []Status { - return []Status{ - "MoveInProgress", - "InVpc", - "InClassic", - } -} - -type StatusName string - -// Enum values for StatusName -const ( - StatusNameReachability StatusName = "reachability" -) - -// Values returns all known values for StatusName. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (StatusName) Values() []StatusName { - return []StatusName{ - "reachability", - } -} - -type StatusType string - -// Enum values for StatusType -const ( - StatusTypePassed StatusType = "passed" - StatusTypeFailed StatusType = "failed" - StatusTypeInsufficientData StatusType = "insufficient-data" - StatusTypeInitializing StatusType = "initializing" -) - -// Values returns all known values for StatusType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (StatusType) Values() []StatusType { - return []StatusType{ - "passed", - "failed", - "insufficient-data", - "initializing", - } -} - -type StorageTier string - -// Enum values for StorageTier -const ( - StorageTierArchive StorageTier = "archive" - StorageTierStandard StorageTier = "standard" -) - -// Values returns all known values for StorageTier. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (StorageTier) Values() []StorageTier { - return []StorageTier{ - "archive", - "standard", - } -} - -type SubnetCidrBlockStateCode string - -// Enum values for SubnetCidrBlockStateCode -const ( - SubnetCidrBlockStateCodeAssociating SubnetCidrBlockStateCode = "associating" - SubnetCidrBlockStateCodeAssociated SubnetCidrBlockStateCode = "associated" - SubnetCidrBlockStateCodeDisassociating SubnetCidrBlockStateCode = "disassociating" - SubnetCidrBlockStateCodeDisassociated SubnetCidrBlockStateCode = "disassociated" - SubnetCidrBlockStateCodeFailing SubnetCidrBlockStateCode = "failing" - SubnetCidrBlockStateCodeFailed SubnetCidrBlockStateCode = "failed" -) - -// Values returns all known values for SubnetCidrBlockStateCode. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (SubnetCidrBlockStateCode) Values() []SubnetCidrBlockStateCode { - return []SubnetCidrBlockStateCode{ - "associating", - "associated", - "disassociating", - "disassociated", - "failing", - "failed", - } -} - -type SubnetCidrReservationType string - -// Enum values for SubnetCidrReservationType -const ( - SubnetCidrReservationTypePrefix SubnetCidrReservationType = "prefix" - SubnetCidrReservationTypeExplicit SubnetCidrReservationType = "explicit" -) - -// Values returns all known values for SubnetCidrReservationType. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (SubnetCidrReservationType) Values() []SubnetCidrReservationType { - return []SubnetCidrReservationType{ - "prefix", - "explicit", - } -} - -type SubnetState string - -// Enum values for SubnetState -const ( - SubnetStatePending SubnetState = "pending" - SubnetStateAvailable SubnetState = "available" - SubnetStateUnavailable SubnetState = "unavailable" -) - -// Values returns all known values for SubnetState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (SubnetState) Values() []SubnetState { - return []SubnetState{ - "pending", - "available", - "unavailable", - } -} - -type SummaryStatus string - -// Enum values for SummaryStatus -const ( - SummaryStatusOk SummaryStatus = "ok" - SummaryStatusImpaired SummaryStatus = "impaired" - SummaryStatusInsufficientData SummaryStatus = "insufficient-data" - SummaryStatusNotApplicable SummaryStatus = "not-applicable" - SummaryStatusInitializing SummaryStatus = "initializing" -) - -// Values returns all known values for SummaryStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (SummaryStatus) Values() []SummaryStatus { - return []SummaryStatus{ - "ok", - "impaired", - "insufficient-data", - "not-applicable", - "initializing", - } -} - -type SupportedAdditionalProcessorFeature string - -// Enum values for SupportedAdditionalProcessorFeature -const ( - SupportedAdditionalProcessorFeatureAmdSevSnp SupportedAdditionalProcessorFeature = "amd-sev-snp" -) - -// Values returns all known values for SupportedAdditionalProcessorFeature. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (SupportedAdditionalProcessorFeature) Values() []SupportedAdditionalProcessorFeature { - return []SupportedAdditionalProcessorFeature{ - "amd-sev-snp", - } -} - -type TargetCapacityUnitType string - -// Enum values for TargetCapacityUnitType -const ( - TargetCapacityUnitTypeVcpu TargetCapacityUnitType = "vcpu" - TargetCapacityUnitTypeMemoryMib TargetCapacityUnitType = "memory-mib" - TargetCapacityUnitTypeUnits TargetCapacityUnitType = "units" -) - -// Values returns all known values for TargetCapacityUnitType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TargetCapacityUnitType) Values() []TargetCapacityUnitType { - return []TargetCapacityUnitType{ - "vcpu", - "memory-mib", - "units", - } -} - -type TargetStorageTier string - -// Enum values for TargetStorageTier -const ( - TargetStorageTierArchive TargetStorageTier = "archive" -) - -// Values returns all known values for TargetStorageTier. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TargetStorageTier) Values() []TargetStorageTier { - return []TargetStorageTier{ - "archive", - } -} - -type TelemetryStatus string - -// Enum values for TelemetryStatus -const ( - TelemetryStatusUp TelemetryStatus = "UP" - TelemetryStatusDown TelemetryStatus = "DOWN" -) - -// Values returns all known values for TelemetryStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TelemetryStatus) Values() []TelemetryStatus { - return []TelemetryStatus{ - "UP", - "DOWN", - } -} - -type Tenancy string - -// Enum values for Tenancy -const ( - TenancyDefault Tenancy = "default" - TenancyDedicated Tenancy = "dedicated" - TenancyHost Tenancy = "host" -) - -// Values returns all known values for Tenancy. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (Tenancy) Values() []Tenancy { - return []Tenancy{ - "default", - "dedicated", - "host", - } -} - -type TieringOperationStatus string - -// Enum values for TieringOperationStatus -const ( - TieringOperationStatusArchivalInProgress TieringOperationStatus = "archival-in-progress" - TieringOperationStatusArchivalCompleted TieringOperationStatus = "archival-completed" - TieringOperationStatusArchivalFailed TieringOperationStatus = "archival-failed" - TieringOperationStatusTemporaryRestoreInProgress TieringOperationStatus = "temporary-restore-in-progress" - TieringOperationStatusTemporaryRestoreCompleted TieringOperationStatus = "temporary-restore-completed" - TieringOperationStatusTemporaryRestoreFailed TieringOperationStatus = "temporary-restore-failed" - TieringOperationStatusPermanentRestoreInProgress TieringOperationStatus = "permanent-restore-in-progress" - TieringOperationStatusPermanentRestoreCompleted TieringOperationStatus = "permanent-restore-completed" - TieringOperationStatusPermanentRestoreFailed TieringOperationStatus = "permanent-restore-failed" -) - -// Values returns all known values for TieringOperationStatus. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TieringOperationStatus) Values() []TieringOperationStatus { - return []TieringOperationStatus{ - "archival-in-progress", - "archival-completed", - "archival-failed", - "temporary-restore-in-progress", - "temporary-restore-completed", - "temporary-restore-failed", - "permanent-restore-in-progress", - "permanent-restore-completed", - "permanent-restore-failed", - } -} - -type TpmSupportValues string - -// Enum values for TpmSupportValues -const ( - TpmSupportValuesV20 TpmSupportValues = "v2.0" -) - -// Values returns all known values for TpmSupportValues. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TpmSupportValues) Values() []TpmSupportValues { - return []TpmSupportValues{ - "v2.0", - } -} - -type TrafficDirection string - -// Enum values for TrafficDirection -const ( - TrafficDirectionIngress TrafficDirection = "ingress" - TrafficDirectionEgress TrafficDirection = "egress" -) - -// Values returns all known values for TrafficDirection. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TrafficDirection) Values() []TrafficDirection { - return []TrafficDirection{ - "ingress", - "egress", - } -} - -type TrafficMirrorFilterRuleField string - -// Enum values for TrafficMirrorFilterRuleField -const ( - TrafficMirrorFilterRuleFieldDestinationPortRange TrafficMirrorFilterRuleField = "destination-port-range" - TrafficMirrorFilterRuleFieldSourcePortRange TrafficMirrorFilterRuleField = "source-port-range" - TrafficMirrorFilterRuleFieldProtocol TrafficMirrorFilterRuleField = "protocol" - TrafficMirrorFilterRuleFieldDescription TrafficMirrorFilterRuleField = "description" -) - -// Values returns all known values for TrafficMirrorFilterRuleField. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TrafficMirrorFilterRuleField) Values() []TrafficMirrorFilterRuleField { - return []TrafficMirrorFilterRuleField{ - "destination-port-range", - "source-port-range", - "protocol", - "description", - } -} - -type TrafficMirrorNetworkService string - -// Enum values for TrafficMirrorNetworkService -const ( - TrafficMirrorNetworkServiceAmazonDns TrafficMirrorNetworkService = "amazon-dns" -) - -// Values returns all known values for TrafficMirrorNetworkService. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (TrafficMirrorNetworkService) Values() []TrafficMirrorNetworkService { - return []TrafficMirrorNetworkService{ - "amazon-dns", - } -} - -type TrafficMirrorRuleAction string - -// Enum values for TrafficMirrorRuleAction -const ( - TrafficMirrorRuleActionAccept TrafficMirrorRuleAction = "accept" - TrafficMirrorRuleActionReject TrafficMirrorRuleAction = "reject" -) - -// Values returns all known values for TrafficMirrorRuleAction. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TrafficMirrorRuleAction) Values() []TrafficMirrorRuleAction { - return []TrafficMirrorRuleAction{ - "accept", - "reject", - } -} - -type TrafficMirrorSessionField string - -// Enum values for TrafficMirrorSessionField -const ( - TrafficMirrorSessionFieldPacketLength TrafficMirrorSessionField = "packet-length" - TrafficMirrorSessionFieldDescription TrafficMirrorSessionField = "description" - TrafficMirrorSessionFieldVirtualNetworkId TrafficMirrorSessionField = "virtual-network-id" -) - -// Values returns all known values for TrafficMirrorSessionField. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (TrafficMirrorSessionField) Values() []TrafficMirrorSessionField { - return []TrafficMirrorSessionField{ - "packet-length", - "description", - "virtual-network-id", - } -} - -type TrafficMirrorTargetType string - -// Enum values for TrafficMirrorTargetType -const ( - TrafficMirrorTargetTypeNetworkInterface TrafficMirrorTargetType = "network-interface" - TrafficMirrorTargetTypeNetworkLoadBalancer TrafficMirrorTargetType = "network-load-balancer" - TrafficMirrorTargetTypeGatewayLoadBalancerEndpoint TrafficMirrorTargetType = "gateway-load-balancer-endpoint" -) - -// Values returns all known values for TrafficMirrorTargetType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TrafficMirrorTargetType) Values() []TrafficMirrorTargetType { - return []TrafficMirrorTargetType{ - "network-interface", - "network-load-balancer", - "gateway-load-balancer-endpoint", - } -} - -type TrafficType string - -// Enum values for TrafficType -const ( - TrafficTypeAccept TrafficType = "ACCEPT" - TrafficTypeReject TrafficType = "REJECT" - TrafficTypeAll TrafficType = "ALL" -) - -// Values returns all known values for TrafficType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (TrafficType) Values() []TrafficType { - return []TrafficType{ - "ACCEPT", - "REJECT", - "ALL", - } -} - -type TransitGatewayAssociationState string - -// Enum values for TransitGatewayAssociationState -const ( - TransitGatewayAssociationStateAssociating TransitGatewayAssociationState = "associating" - TransitGatewayAssociationStateAssociated TransitGatewayAssociationState = "associated" - TransitGatewayAssociationStateDisassociating TransitGatewayAssociationState = "disassociating" - TransitGatewayAssociationStateDisassociated TransitGatewayAssociationState = "disassociated" -) - -// Values returns all known values for TransitGatewayAssociationState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayAssociationState) Values() []TransitGatewayAssociationState { - return []TransitGatewayAssociationState{ - "associating", - "associated", - "disassociating", - "disassociated", - } -} - -type TransitGatewayAttachmentResourceType string - -// Enum values for TransitGatewayAttachmentResourceType -const ( - TransitGatewayAttachmentResourceTypeVpc TransitGatewayAttachmentResourceType = "vpc" - TransitGatewayAttachmentResourceTypeVpn TransitGatewayAttachmentResourceType = "vpn" - TransitGatewayAttachmentResourceTypeDirectConnectGateway TransitGatewayAttachmentResourceType = "direct-connect-gateway" - TransitGatewayAttachmentResourceTypeConnect TransitGatewayAttachmentResourceType = "connect" - TransitGatewayAttachmentResourceTypePeering TransitGatewayAttachmentResourceType = "peering" - TransitGatewayAttachmentResourceTypeTgwPeering TransitGatewayAttachmentResourceType = "tgw-peering" -) - -// Values returns all known values for TransitGatewayAttachmentResourceType. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayAttachmentResourceType) Values() []TransitGatewayAttachmentResourceType { - return []TransitGatewayAttachmentResourceType{ - "vpc", - "vpn", - "direct-connect-gateway", - "connect", - "peering", - "tgw-peering", - } -} - -type TransitGatewayAttachmentState string - -// Enum values for TransitGatewayAttachmentState -const ( - TransitGatewayAttachmentStateInitiating TransitGatewayAttachmentState = "initiating" - TransitGatewayAttachmentStateInitiatingRequest TransitGatewayAttachmentState = "initiatingRequest" - TransitGatewayAttachmentStatePendingAcceptance TransitGatewayAttachmentState = "pendingAcceptance" - TransitGatewayAttachmentStateRollingBack TransitGatewayAttachmentState = "rollingBack" - TransitGatewayAttachmentStatePending TransitGatewayAttachmentState = "pending" - TransitGatewayAttachmentStateAvailable TransitGatewayAttachmentState = "available" - TransitGatewayAttachmentStateModifying TransitGatewayAttachmentState = "modifying" - TransitGatewayAttachmentStateDeleting TransitGatewayAttachmentState = "deleting" - TransitGatewayAttachmentStateDeleted TransitGatewayAttachmentState = "deleted" - TransitGatewayAttachmentStateFailed TransitGatewayAttachmentState = "failed" - TransitGatewayAttachmentStateRejected TransitGatewayAttachmentState = "rejected" - TransitGatewayAttachmentStateRejecting TransitGatewayAttachmentState = "rejecting" - TransitGatewayAttachmentStateFailing TransitGatewayAttachmentState = "failing" -) - -// Values returns all known values for TransitGatewayAttachmentState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayAttachmentState) Values() []TransitGatewayAttachmentState { - return []TransitGatewayAttachmentState{ - "initiating", - "initiatingRequest", - "pendingAcceptance", - "rollingBack", - "pending", - "available", - "modifying", - "deleting", - "deleted", - "failed", - "rejected", - "rejecting", - "failing", - } -} - -type TransitGatewayConnectPeerState string - -// Enum values for TransitGatewayConnectPeerState -const ( - TransitGatewayConnectPeerStatePending TransitGatewayConnectPeerState = "pending" - TransitGatewayConnectPeerStateAvailable TransitGatewayConnectPeerState = "available" - TransitGatewayConnectPeerStateDeleting TransitGatewayConnectPeerState = "deleting" - TransitGatewayConnectPeerStateDeleted TransitGatewayConnectPeerState = "deleted" -) - -// Values returns all known values for TransitGatewayConnectPeerState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayConnectPeerState) Values() []TransitGatewayConnectPeerState { - return []TransitGatewayConnectPeerState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type TransitGatewayMulitcastDomainAssociationState string - -// Enum values for TransitGatewayMulitcastDomainAssociationState -const ( - TransitGatewayMulitcastDomainAssociationStatePendingAcceptance TransitGatewayMulitcastDomainAssociationState = "pendingAcceptance" - TransitGatewayMulitcastDomainAssociationStateAssociating TransitGatewayMulitcastDomainAssociationState = "associating" - TransitGatewayMulitcastDomainAssociationStateAssociated TransitGatewayMulitcastDomainAssociationState = "associated" - TransitGatewayMulitcastDomainAssociationStateDisassociating TransitGatewayMulitcastDomainAssociationState = "disassociating" - TransitGatewayMulitcastDomainAssociationStateDisassociated TransitGatewayMulitcastDomainAssociationState = "disassociated" - TransitGatewayMulitcastDomainAssociationStateRejected TransitGatewayMulitcastDomainAssociationState = "rejected" - TransitGatewayMulitcastDomainAssociationStateFailed TransitGatewayMulitcastDomainAssociationState = "failed" -) - -// Values returns all known values for -// TransitGatewayMulitcastDomainAssociationState. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (TransitGatewayMulitcastDomainAssociationState) Values() []TransitGatewayMulitcastDomainAssociationState { - return []TransitGatewayMulitcastDomainAssociationState{ - "pendingAcceptance", - "associating", - "associated", - "disassociating", - "disassociated", - "rejected", - "failed", - } -} - -type TransitGatewayMulticastDomainState string - -// Enum values for TransitGatewayMulticastDomainState -const ( - TransitGatewayMulticastDomainStatePending TransitGatewayMulticastDomainState = "pending" - TransitGatewayMulticastDomainStateAvailable TransitGatewayMulticastDomainState = "available" - TransitGatewayMulticastDomainStateDeleting TransitGatewayMulticastDomainState = "deleting" - TransitGatewayMulticastDomainStateDeleted TransitGatewayMulticastDomainState = "deleted" -) - -// Values returns all known values for TransitGatewayMulticastDomainState. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayMulticastDomainState) Values() []TransitGatewayMulticastDomainState { - return []TransitGatewayMulticastDomainState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type TransitGatewayPolicyTableState string - -// Enum values for TransitGatewayPolicyTableState -const ( - TransitGatewayPolicyTableStatePending TransitGatewayPolicyTableState = "pending" - TransitGatewayPolicyTableStateAvailable TransitGatewayPolicyTableState = "available" - TransitGatewayPolicyTableStateDeleting TransitGatewayPolicyTableState = "deleting" - TransitGatewayPolicyTableStateDeleted TransitGatewayPolicyTableState = "deleted" -) - -// Values returns all known values for TransitGatewayPolicyTableState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayPolicyTableState) Values() []TransitGatewayPolicyTableState { - return []TransitGatewayPolicyTableState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type TransitGatewayPrefixListReferenceState string - -// Enum values for TransitGatewayPrefixListReferenceState -const ( - TransitGatewayPrefixListReferenceStatePending TransitGatewayPrefixListReferenceState = "pending" - TransitGatewayPrefixListReferenceStateAvailable TransitGatewayPrefixListReferenceState = "available" - TransitGatewayPrefixListReferenceStateModifying TransitGatewayPrefixListReferenceState = "modifying" - TransitGatewayPrefixListReferenceStateDeleting TransitGatewayPrefixListReferenceState = "deleting" -) - -// Values returns all known values for TransitGatewayPrefixListReferenceState. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayPrefixListReferenceState) Values() []TransitGatewayPrefixListReferenceState { - return []TransitGatewayPrefixListReferenceState{ - "pending", - "available", - "modifying", - "deleting", - } -} - -type TransitGatewayPropagationState string - -// Enum values for TransitGatewayPropagationState -const ( - TransitGatewayPropagationStateEnabling TransitGatewayPropagationState = "enabling" - TransitGatewayPropagationStateEnabled TransitGatewayPropagationState = "enabled" - TransitGatewayPropagationStateDisabling TransitGatewayPropagationState = "disabling" - TransitGatewayPropagationStateDisabled TransitGatewayPropagationState = "disabled" -) - -// Values returns all known values for TransitGatewayPropagationState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayPropagationState) Values() []TransitGatewayPropagationState { - return []TransitGatewayPropagationState{ - "enabling", - "enabled", - "disabling", - "disabled", - } -} - -type TransitGatewayRouteState string - -// Enum values for TransitGatewayRouteState -const ( - TransitGatewayRouteStatePending TransitGatewayRouteState = "pending" - TransitGatewayRouteStateActive TransitGatewayRouteState = "active" - TransitGatewayRouteStateBlackhole TransitGatewayRouteState = "blackhole" - TransitGatewayRouteStateDeleting TransitGatewayRouteState = "deleting" - TransitGatewayRouteStateDeleted TransitGatewayRouteState = "deleted" -) - -// Values returns all known values for TransitGatewayRouteState. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (TransitGatewayRouteState) Values() []TransitGatewayRouteState { - return []TransitGatewayRouteState{ - "pending", - "active", - "blackhole", - "deleting", - "deleted", - } -} - -type TransitGatewayRouteTableAnnouncementDirection string - -// Enum values for TransitGatewayRouteTableAnnouncementDirection -const ( - TransitGatewayRouteTableAnnouncementDirectionOutgoing TransitGatewayRouteTableAnnouncementDirection = "outgoing" - TransitGatewayRouteTableAnnouncementDirectionIncoming TransitGatewayRouteTableAnnouncementDirection = "incoming" -) - -// Values returns all known values for -// TransitGatewayRouteTableAnnouncementDirection. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (TransitGatewayRouteTableAnnouncementDirection) Values() []TransitGatewayRouteTableAnnouncementDirection { - return []TransitGatewayRouteTableAnnouncementDirection{ - "outgoing", - "incoming", - } -} - -type TransitGatewayRouteTableAnnouncementState string - -// Enum values for TransitGatewayRouteTableAnnouncementState -const ( - TransitGatewayRouteTableAnnouncementStateAvailable TransitGatewayRouteTableAnnouncementState = "available" - TransitGatewayRouteTableAnnouncementStatePending TransitGatewayRouteTableAnnouncementState = "pending" - TransitGatewayRouteTableAnnouncementStateFailing TransitGatewayRouteTableAnnouncementState = "failing" - TransitGatewayRouteTableAnnouncementStateFailed TransitGatewayRouteTableAnnouncementState = "failed" - TransitGatewayRouteTableAnnouncementStateDeleting TransitGatewayRouteTableAnnouncementState = "deleting" - TransitGatewayRouteTableAnnouncementStateDeleted TransitGatewayRouteTableAnnouncementState = "deleted" -) - -// Values returns all known values for TransitGatewayRouteTableAnnouncementState. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayRouteTableAnnouncementState) Values() []TransitGatewayRouteTableAnnouncementState { - return []TransitGatewayRouteTableAnnouncementState{ - "available", - "pending", - "failing", - "failed", - "deleting", - "deleted", - } -} - -type TransitGatewayRouteTableState string - -// Enum values for TransitGatewayRouteTableState -const ( - TransitGatewayRouteTableStatePending TransitGatewayRouteTableState = "pending" - TransitGatewayRouteTableStateAvailable TransitGatewayRouteTableState = "available" - TransitGatewayRouteTableStateDeleting TransitGatewayRouteTableState = "deleting" - TransitGatewayRouteTableStateDeleted TransitGatewayRouteTableState = "deleted" -) - -// Values returns all known values for TransitGatewayRouteTableState. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (TransitGatewayRouteTableState) Values() []TransitGatewayRouteTableState { - return []TransitGatewayRouteTableState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type TransitGatewayRouteType string - -// Enum values for TransitGatewayRouteType -const ( - TransitGatewayRouteTypeStatic TransitGatewayRouteType = "static" - TransitGatewayRouteTypePropagated TransitGatewayRouteType = "propagated" -) - -// Values returns all known values for TransitGatewayRouteType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TransitGatewayRouteType) Values() []TransitGatewayRouteType { - return []TransitGatewayRouteType{ - "static", - "propagated", - } -} - -type TransitGatewayState string - -// Enum values for TransitGatewayState -const ( - TransitGatewayStatePending TransitGatewayState = "pending" - TransitGatewayStateAvailable TransitGatewayState = "available" - TransitGatewayStateModifying TransitGatewayState = "modifying" - TransitGatewayStateDeleting TransitGatewayState = "deleting" - TransitGatewayStateDeleted TransitGatewayState = "deleted" -) - -// Values returns all known values for TransitGatewayState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TransitGatewayState) Values() []TransitGatewayState { - return []TransitGatewayState{ - "pending", - "available", - "modifying", - "deleting", - "deleted", - } -} - -type TransportProtocol string - -// Enum values for TransportProtocol -const ( - TransportProtocolTcp TransportProtocol = "tcp" - TransportProtocolUdp TransportProtocol = "udp" -) - -// Values returns all known values for TransportProtocol. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TransportProtocol) Values() []TransportProtocol { - return []TransportProtocol{ - "tcp", - "udp", - } -} - -type TrustProviderType string - -// Enum values for TrustProviderType -const ( - TrustProviderTypeUser TrustProviderType = "user" - TrustProviderTypeDevice TrustProviderType = "device" -) - -// Values returns all known values for TrustProviderType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TrustProviderType) Values() []TrustProviderType { - return []TrustProviderType{ - "user", - "device", - } -} - -type TunnelInsideIpVersion string - -// Enum values for TunnelInsideIpVersion -const ( - TunnelInsideIpVersionIpv4 TunnelInsideIpVersion = "ipv4" - TunnelInsideIpVersionIpv6 TunnelInsideIpVersion = "ipv6" -) - -// Values returns all known values for TunnelInsideIpVersion. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (TunnelInsideIpVersion) Values() []TunnelInsideIpVersion { - return []TunnelInsideIpVersion{ - "ipv4", - "ipv6", - } -} - -type UnlimitedSupportedInstanceFamily string - -// Enum values for UnlimitedSupportedInstanceFamily -const ( - UnlimitedSupportedInstanceFamilyT2 UnlimitedSupportedInstanceFamily = "t2" - UnlimitedSupportedInstanceFamilyT3 UnlimitedSupportedInstanceFamily = "t3" - UnlimitedSupportedInstanceFamilyT3a UnlimitedSupportedInstanceFamily = "t3a" - UnlimitedSupportedInstanceFamilyT4g UnlimitedSupportedInstanceFamily = "t4g" -) - -// Values returns all known values for UnlimitedSupportedInstanceFamily. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (UnlimitedSupportedInstanceFamily) Values() []UnlimitedSupportedInstanceFamily { - return []UnlimitedSupportedInstanceFamily{ - "t2", - "t3", - "t3a", - "t4g", - } -} - -type UnsuccessfulInstanceCreditSpecificationErrorCode string - -// Enum values for UnsuccessfulInstanceCreditSpecificationErrorCode -const ( - UnsuccessfulInstanceCreditSpecificationErrorCodeInvalidInstanceId UnsuccessfulInstanceCreditSpecificationErrorCode = "InvalidInstanceID.Malformed" - UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceNotFound UnsuccessfulInstanceCreditSpecificationErrorCode = "InvalidInstanceID.NotFound" - UnsuccessfulInstanceCreditSpecificationErrorCodeIncorrectInstanceState UnsuccessfulInstanceCreditSpecificationErrorCode = "IncorrectInstanceState" - UnsuccessfulInstanceCreditSpecificationErrorCodeInstanceCreditSpecificationNotSupported UnsuccessfulInstanceCreditSpecificationErrorCode = "InstanceCreditSpecification.NotSupported" -) - -// Values returns all known values for -// UnsuccessfulInstanceCreditSpecificationErrorCode. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (UnsuccessfulInstanceCreditSpecificationErrorCode) Values() []UnsuccessfulInstanceCreditSpecificationErrorCode { - return []UnsuccessfulInstanceCreditSpecificationErrorCode{ - "InvalidInstanceID.Malformed", - "InvalidInstanceID.NotFound", - "IncorrectInstanceState", - "InstanceCreditSpecification.NotSupported", - } -} - -type UsageClassType string - -// Enum values for UsageClassType -const ( - UsageClassTypeSpot UsageClassType = "spot" - UsageClassTypeOnDemand UsageClassType = "on-demand" - UsageClassTypeCapacityBlock UsageClassType = "capacity-block" -) - -// Values returns all known values for UsageClassType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (UsageClassType) Values() []UsageClassType { - return []UsageClassType{ - "spot", - "on-demand", - "capacity-block", - } -} - -type UserTrustProviderType string - -// Enum values for UserTrustProviderType -const ( - UserTrustProviderTypeIamIdentityCenter UserTrustProviderType = "iam-identity-center" - UserTrustProviderTypeOidc UserTrustProviderType = "oidc" -) - -// Values returns all known values for UserTrustProviderType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (UserTrustProviderType) Values() []UserTrustProviderType { - return []UserTrustProviderType{ - "iam-identity-center", - "oidc", - } -} - -type VerifiedAccessEndpointAttachmentType string - -// Enum values for VerifiedAccessEndpointAttachmentType -const ( - VerifiedAccessEndpointAttachmentTypeVpc VerifiedAccessEndpointAttachmentType = "vpc" -) - -// Values returns all known values for VerifiedAccessEndpointAttachmentType. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (VerifiedAccessEndpointAttachmentType) Values() []VerifiedAccessEndpointAttachmentType { - return []VerifiedAccessEndpointAttachmentType{ - "vpc", - } -} - -type VerifiedAccessEndpointProtocol string - -// Enum values for VerifiedAccessEndpointProtocol -const ( - VerifiedAccessEndpointProtocolHttp VerifiedAccessEndpointProtocol = "http" - VerifiedAccessEndpointProtocolHttps VerifiedAccessEndpointProtocol = "https" -) - -// Values returns all known values for VerifiedAccessEndpointProtocol. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (VerifiedAccessEndpointProtocol) Values() []VerifiedAccessEndpointProtocol { - return []VerifiedAccessEndpointProtocol{ - "http", - "https", - } -} - -type VerifiedAccessEndpointStatusCode string - -// Enum values for VerifiedAccessEndpointStatusCode -const ( - VerifiedAccessEndpointStatusCodePending VerifiedAccessEndpointStatusCode = "pending" - VerifiedAccessEndpointStatusCodeActive VerifiedAccessEndpointStatusCode = "active" - VerifiedAccessEndpointStatusCodeUpdating VerifiedAccessEndpointStatusCode = "updating" - VerifiedAccessEndpointStatusCodeDeleting VerifiedAccessEndpointStatusCode = "deleting" - VerifiedAccessEndpointStatusCodeDeleted VerifiedAccessEndpointStatusCode = "deleted" -) - -// Values returns all known values for VerifiedAccessEndpointStatusCode. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (VerifiedAccessEndpointStatusCode) Values() []VerifiedAccessEndpointStatusCode { - return []VerifiedAccessEndpointStatusCode{ - "pending", - "active", - "updating", - "deleting", - "deleted", - } -} - -type VerifiedAccessEndpointType string - -// Enum values for VerifiedAccessEndpointType -const ( - VerifiedAccessEndpointTypeLoadBalancer VerifiedAccessEndpointType = "load-balancer" - VerifiedAccessEndpointTypeNetworkInterface VerifiedAccessEndpointType = "network-interface" -) - -// Values returns all known values for VerifiedAccessEndpointType. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// The ordering of this slice is not guaranteed to be stable across updates. -func (VerifiedAccessEndpointType) Values() []VerifiedAccessEndpointType { - return []VerifiedAccessEndpointType{ - "load-balancer", - "network-interface", - } -} - -type VerifiedAccessLogDeliveryStatusCode string - -// Enum values for VerifiedAccessLogDeliveryStatusCode -const ( - VerifiedAccessLogDeliveryStatusCodeSuccess VerifiedAccessLogDeliveryStatusCode = "success" - VerifiedAccessLogDeliveryStatusCodeFailed VerifiedAccessLogDeliveryStatusCode = "failed" -) - -// Values returns all known values for VerifiedAccessLogDeliveryStatusCode. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (VerifiedAccessLogDeliveryStatusCode) Values() []VerifiedAccessLogDeliveryStatusCode { - return []VerifiedAccessLogDeliveryStatusCode{ - "success", - "failed", - } -} - -type VirtualizationType string - -// Enum values for VirtualizationType -const ( - VirtualizationTypeHvm VirtualizationType = "hvm" - VirtualizationTypeParavirtual VirtualizationType = "paravirtual" -) - -// Values returns all known values for VirtualizationType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VirtualizationType) Values() []VirtualizationType { - return []VirtualizationType{ - "hvm", - "paravirtual", - } -} - -type VolumeAttachmentState string - -// Enum values for VolumeAttachmentState -const ( - VolumeAttachmentStateAttaching VolumeAttachmentState = "attaching" - VolumeAttachmentStateAttached VolumeAttachmentState = "attached" - VolumeAttachmentStateDetaching VolumeAttachmentState = "detaching" - VolumeAttachmentStateDetached VolumeAttachmentState = "detached" - VolumeAttachmentStateBusy VolumeAttachmentState = "busy" -) - -// Values returns all known values for VolumeAttachmentState. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VolumeAttachmentState) Values() []VolumeAttachmentState { - return []VolumeAttachmentState{ - "attaching", - "attached", - "detaching", - "detached", - "busy", - } -} - -type VolumeAttributeName string - -// Enum values for VolumeAttributeName -const ( - VolumeAttributeNameAutoEnableIO VolumeAttributeName = "autoEnableIO" - VolumeAttributeNameProductCodes VolumeAttributeName = "productCodes" -) - -// Values returns all known values for VolumeAttributeName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VolumeAttributeName) Values() []VolumeAttributeName { - return []VolumeAttributeName{ - "autoEnableIO", - "productCodes", - } -} - -type VolumeModificationState string - -// Enum values for VolumeModificationState -const ( - VolumeModificationStateModifying VolumeModificationState = "modifying" - VolumeModificationStateOptimizing VolumeModificationState = "optimizing" - VolumeModificationStateCompleted VolumeModificationState = "completed" - VolumeModificationStateFailed VolumeModificationState = "failed" -) - -// Values returns all known values for VolumeModificationState. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VolumeModificationState) Values() []VolumeModificationState { - return []VolumeModificationState{ - "modifying", - "optimizing", - "completed", - "failed", - } -} - -type VolumeState string - -// Enum values for VolumeState -const ( - VolumeStateCreating VolumeState = "creating" - VolumeStateAvailable VolumeState = "available" - VolumeStateInUse VolumeState = "in-use" - VolumeStateDeleting VolumeState = "deleting" - VolumeStateDeleted VolumeState = "deleted" - VolumeStateError VolumeState = "error" -) - -// Values returns all known values for VolumeState. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (VolumeState) Values() []VolumeState { - return []VolumeState{ - "creating", - "available", - "in-use", - "deleting", - "deleted", - "error", - } -} - -type VolumeStatusInfoStatus string - -// Enum values for VolumeStatusInfoStatus -const ( - VolumeStatusInfoStatusOk VolumeStatusInfoStatus = "ok" - VolumeStatusInfoStatusImpaired VolumeStatusInfoStatus = "impaired" - VolumeStatusInfoStatusInsufficientData VolumeStatusInfoStatus = "insufficient-data" -) - -// Values returns all known values for VolumeStatusInfoStatus. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VolumeStatusInfoStatus) Values() []VolumeStatusInfoStatus { - return []VolumeStatusInfoStatus{ - "ok", - "impaired", - "insufficient-data", - } -} - -type VolumeStatusName string - -// Enum values for VolumeStatusName -const ( - VolumeStatusNameIoEnabled VolumeStatusName = "io-enabled" - VolumeStatusNameIoPerformance VolumeStatusName = "io-performance" -) - -// Values returns all known values for VolumeStatusName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VolumeStatusName) Values() []VolumeStatusName { - return []VolumeStatusName{ - "io-enabled", - "io-performance", - } -} - -type VolumeType string - -// Enum values for VolumeType -const ( - VolumeTypeStandard VolumeType = "standard" - VolumeTypeIo1 VolumeType = "io1" - VolumeTypeIo2 VolumeType = "io2" - VolumeTypeGp2 VolumeType = "gp2" - VolumeTypeSc1 VolumeType = "sc1" - VolumeTypeSt1 VolumeType = "st1" - VolumeTypeGp3 VolumeType = "gp3" -) - -// Values returns all known values for VolumeType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (VolumeType) Values() []VolumeType { - return []VolumeType{ - "standard", - "io1", - "io2", - "gp2", - "sc1", - "st1", - "gp3", - } -} - -type VpcAttributeName string - -// Enum values for VpcAttributeName -const ( - VpcAttributeNameEnableDnsSupport VpcAttributeName = "enableDnsSupport" - VpcAttributeNameEnableDnsHostnames VpcAttributeName = "enableDnsHostnames" - VpcAttributeNameEnableNetworkAddressUsageMetrics VpcAttributeName = "enableNetworkAddressUsageMetrics" -) - -// Values returns all known values for VpcAttributeName. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VpcAttributeName) Values() []VpcAttributeName { - return []VpcAttributeName{ - "enableDnsSupport", - "enableDnsHostnames", - "enableNetworkAddressUsageMetrics", - } -} - -type VpcCidrBlockStateCode string - -// Enum values for VpcCidrBlockStateCode -const ( - VpcCidrBlockStateCodeAssociating VpcCidrBlockStateCode = "associating" - VpcCidrBlockStateCodeAssociated VpcCidrBlockStateCode = "associated" - VpcCidrBlockStateCodeDisassociating VpcCidrBlockStateCode = "disassociating" - VpcCidrBlockStateCodeDisassociated VpcCidrBlockStateCode = "disassociated" - VpcCidrBlockStateCodeFailing VpcCidrBlockStateCode = "failing" - VpcCidrBlockStateCodeFailed VpcCidrBlockStateCode = "failed" -) - -// Values returns all known values for VpcCidrBlockStateCode. Note that this can -// be expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VpcCidrBlockStateCode) Values() []VpcCidrBlockStateCode { - return []VpcCidrBlockStateCode{ - "associating", - "associated", - "disassociating", - "disassociated", - "failing", - "failed", - } -} - -type VpcEndpointType string - -// Enum values for VpcEndpointType -const ( - VpcEndpointTypeInterface VpcEndpointType = "Interface" - VpcEndpointTypeGateway VpcEndpointType = "Gateway" - VpcEndpointTypeGatewayLoadBalancer VpcEndpointType = "GatewayLoadBalancer" -) - -// Values returns all known values for VpcEndpointType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VpcEndpointType) Values() []VpcEndpointType { - return []VpcEndpointType{ - "Interface", - "Gateway", - "GatewayLoadBalancer", - } -} - -type VpcPeeringConnectionStateReasonCode string - -// Enum values for VpcPeeringConnectionStateReasonCode -const ( - VpcPeeringConnectionStateReasonCodeInitiatingRequest VpcPeeringConnectionStateReasonCode = "initiating-request" - VpcPeeringConnectionStateReasonCodePendingAcceptance VpcPeeringConnectionStateReasonCode = "pending-acceptance" - VpcPeeringConnectionStateReasonCodeActive VpcPeeringConnectionStateReasonCode = "active" - VpcPeeringConnectionStateReasonCodeDeleted VpcPeeringConnectionStateReasonCode = "deleted" - VpcPeeringConnectionStateReasonCodeRejected VpcPeeringConnectionStateReasonCode = "rejected" - VpcPeeringConnectionStateReasonCodeFailed VpcPeeringConnectionStateReasonCode = "failed" - VpcPeeringConnectionStateReasonCodeExpired VpcPeeringConnectionStateReasonCode = "expired" - VpcPeeringConnectionStateReasonCodeProvisioning VpcPeeringConnectionStateReasonCode = "provisioning" - VpcPeeringConnectionStateReasonCodeDeleting VpcPeeringConnectionStateReasonCode = "deleting" -) - -// Values returns all known values for VpcPeeringConnectionStateReasonCode. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. The ordering of this slice is not guaranteed to be stable across -// updates. -func (VpcPeeringConnectionStateReasonCode) Values() []VpcPeeringConnectionStateReasonCode { - return []VpcPeeringConnectionStateReasonCode{ - "initiating-request", - "pending-acceptance", - "active", - "deleted", - "rejected", - "failed", - "expired", - "provisioning", - "deleting", - } -} - -type VpcState string - -// Enum values for VpcState -const ( - VpcStatePending VpcState = "pending" - VpcStateAvailable VpcState = "available" -) - -// Values returns all known values for VpcState. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (VpcState) Values() []VpcState { - return []VpcState{ - "pending", - "available", - } -} - -type VpcTenancy string - -// Enum values for VpcTenancy -const ( - VpcTenancyDefault VpcTenancy = "default" -) - -// Values returns all known values for VpcTenancy. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (VpcTenancy) Values() []VpcTenancy { - return []VpcTenancy{ - "default", - } -} - -type VpnEcmpSupportValue string - -// Enum values for VpnEcmpSupportValue -const ( - VpnEcmpSupportValueEnable VpnEcmpSupportValue = "enable" - VpnEcmpSupportValueDisable VpnEcmpSupportValue = "disable" -) - -// Values returns all known values for VpnEcmpSupportValue. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VpnEcmpSupportValue) Values() []VpnEcmpSupportValue { - return []VpnEcmpSupportValue{ - "enable", - "disable", - } -} - -type VpnProtocol string - -// Enum values for VpnProtocol -const ( - VpnProtocolOpenvpn VpnProtocol = "openvpn" -) - -// Values returns all known values for VpnProtocol. Note that this can be expanded -// in the future, and so it is only as up to date as the client. The ordering of -// this slice is not guaranteed to be stable across updates. -func (VpnProtocol) Values() []VpnProtocol { - return []VpnProtocol{ - "openvpn", - } -} - -type VpnState string - -// Enum values for VpnState -const ( - VpnStatePending VpnState = "pending" - VpnStateAvailable VpnState = "available" - VpnStateDeleting VpnState = "deleting" - VpnStateDeleted VpnState = "deleted" -) - -// Values returns all known values for VpnState. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (VpnState) Values() []VpnState { - return []VpnState{ - "pending", - "available", - "deleting", - "deleted", - } -} - -type VpnStaticRouteSource string - -// Enum values for VpnStaticRouteSource -const ( - VpnStaticRouteSourceStatic VpnStaticRouteSource = "Static" -) - -// Values returns all known values for VpnStaticRouteSource. Note that this can be -// expanded in the future, and so it is only as up to date as the client. The -// ordering of this slice is not guaranteed to be stable across updates. -func (VpnStaticRouteSource) Values() []VpnStaticRouteSource { - return []VpnStaticRouteSource{ - "Static", - } -} - -type WeekDay string - -// Enum values for WeekDay -const ( - WeekDaySunday WeekDay = "sunday" - WeekDayMonday WeekDay = "monday" - WeekDayTuesday WeekDay = "tuesday" - WeekDayWednesday WeekDay = "wednesday" - WeekDayThursday WeekDay = "thursday" - WeekDayFriday WeekDay = "friday" - WeekDaySaturday WeekDay = "saturday" -) - -// Values returns all known values for WeekDay. Note that this can be expanded in -// the future, and so it is only as up to date as the client. The ordering of this -// slice is not guaranteed to be stable across updates. -func (WeekDay) Values() []WeekDay { - return []WeekDay{ - "sunday", - "monday", - "tuesday", - "wednesday", - "thursday", - "friday", - "saturday", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go deleted file mode 100644 index 86bab2984..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/types/types.go +++ /dev/null @@ -1,18612 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" - "time" -) - -// The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web -// Services Inferentia chips) on an instance. -type AcceleratorCount struct { - - // The maximum number of accelerators. If this parameter is not specified, there - // is no maximum limit. - Max *int32 - - // The minimum number of accelerators. If this parameter is not specified, there - // is no minimum limit. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web -// Services Inferentia chips) on an instance. To exclude accelerator-enabled -// instance types, set Max to 0 . -type AcceleratorCountRequest struct { - - // The maximum number of accelerators. To specify no maximum limit, omit this - // parameter. To exclude accelerator-enabled instance types, set Max to 0 . - Max *int32 - - // The minimum number of accelerators. To specify no minimum limit, omit this - // parameter. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of total accelerator memory, in MiB. -type AcceleratorTotalMemoryMiB struct { - - // The maximum amount of accelerator memory, in MiB. If this parameter is not - // specified, there is no maximum limit. - Max *int32 - - // The minimum amount of accelerator memory, in MiB. If this parameter is not - // specified, there is no minimum limit. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of total accelerator memory, in MiB. -type AcceleratorTotalMemoryMiBRequest struct { - - // The maximum amount of accelerator memory, in MiB. To specify no maximum limit, - // omit this parameter. - Max *int32 - - // The minimum amount of accelerator memory, in MiB. To specify no minimum limit, - // omit this parameter. - Min *int32 - - noSmithyDocumentSerde -} - -// Describes a finding for a Network Access Scope. -type AccessScopeAnalysisFinding struct { - - // The finding components. - FindingComponents []PathComponent - - // The ID of the finding. - FindingId *string - - // The ID of the Network Access Scope analysis. - NetworkInsightsAccessScopeAnalysisId *string - - // The ID of the Network Access Scope. - NetworkInsightsAccessScopeId *string - - noSmithyDocumentSerde -} - -// Describes a path. -type AccessScopePath struct { - - // The destination. - Destination *PathStatement - - // The source. - Source *PathStatement - - // The through resources. - ThroughResources []ThroughResourcesStatement - - noSmithyDocumentSerde -} - -// Describes a path. -type AccessScopePathRequest struct { - - // The destination. - Destination *PathStatementRequest - - // The source. - Source *PathStatementRequest - - // The through resources. - ThroughResources []ThroughResourcesStatementRequest - - noSmithyDocumentSerde -} - -// Describes an account attribute. -type AccountAttribute struct { - - // The name of the account attribute. - AttributeName *string - - // The values for the account attribute. - AttributeValues []AccountAttributeValue - - noSmithyDocumentSerde -} - -// Describes a value of an account attribute. -type AccountAttributeValue struct { - - // The value of the attribute. - AttributeValue *string - - noSmithyDocumentSerde -} - -// Describes a running instance in a Spot Fleet. -type ActiveInstance struct { - - // The health status of the instance. If the status of either the instance status - // check or the system status check is impaired , the health status of the instance - // is unhealthy . Otherwise, the health status is healthy . - InstanceHealth InstanceHealthStatus - - // The ID of the instance. - InstanceId *string - - // The instance type. - InstanceType *string - - // The ID of the Spot Instance request. - SpotInstanceRequestId *string - - noSmithyDocumentSerde -} - -// Describes a principal. -type AddedPrincipal struct { - - // The Amazon Resource Name (ARN) of the principal. - Principal *string - - // The type of principal. - PrincipalType PrincipalType - - // The ID of the service. - ServiceId *string - - // The ID of the service permission. - ServicePermissionId *string - - noSmithyDocumentSerde -} - -// Add an operating Region to an IPAM. Operating Regions are Amazon Web Services -// Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only -// discovers and monitors resources in the Amazon Web Services Regions you select -// as operating Regions. For more information about operating Regions, see Create -// an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) in the -// Amazon VPC IPAM User Guide. -type AddIpamOperatingRegion struct { - - // The name of the operating Region. - RegionName *string - - noSmithyDocumentSerde -} - -// Describes an additional detail for a path analysis. For more information, see -// Reachability Analyzer additional detail codes (https://docs.aws.amazon.com/vpc/latest/reachability/additional-detail-codes.html) -// . -type AdditionalDetail struct { - - // The additional detail code. - AdditionalDetailType *string - - // The path component. - Component *AnalysisComponent - - // The load balancers. - LoadBalancers []AnalysisComponent - - // The rule options. - RuleGroupRuleOptionsPairs []RuleGroupRuleOptionsPair - - // The rule group type. - RuleGroupTypePairs []RuleGroupTypePair - - // The rule options. - RuleOptions []RuleOption - - // The name of the VPC endpoint service. - ServiceName *string - - // The VPC endpoint service. - VpcEndpointService *AnalysisComponent - - noSmithyDocumentSerde -} - -// An entry for a prefix list. -type AddPrefixListEntry struct { - - // The CIDR block. - // - // This member is required. - Cidr *string - - // A description for the entry. Constraints: Up to 255 characters in length. - Description *string - - noSmithyDocumentSerde -} - -// Describes an Elastic IP address, or a carrier IP address. -type Address struct { - - // The ID representing the allocation of the address. - AllocationId *string - - // The ID representing the association of the address with an instance. - AssociationId *string - - // The carrier IP address associated. This option is only available for network - // interfaces which reside in a subnet in a Wavelength Zone (for example an EC2 - // instance). - CarrierIp *string - - // The customer-owned IP address. - CustomerOwnedIp *string - - // The ID of the customer-owned address pool. - CustomerOwnedIpv4Pool *string - - // The network ( vpc ). - Domain DomainType - - // The ID of the instance that the address is associated with (if any). - InstanceId *string - - // The name of the unique set of Availability Zones, Local Zones, or Wavelength - // Zones from which Amazon Web Services advertises IP addresses. - NetworkBorderGroup *string - - // The ID of the network interface. - NetworkInterfaceId *string - - // The ID of the Amazon Web Services account that owns the network interface. - NetworkInterfaceOwnerId *string - - // The private IP address associated with the Elastic IP address. - PrivateIpAddress *string - - // The Elastic IP address. - PublicIp *string - - // The ID of an address pool. - PublicIpv4Pool *string - - // Any tags assigned to the Elastic IP address. - Tags []Tag - - noSmithyDocumentSerde -} - -// The attributes associated with an Elastic IP address. -type AddressAttribute struct { - - // [EC2-VPC] The allocation ID. - AllocationId *string - - // The pointer (PTR) record for the IP address. - PtrRecord *string - - // The updated PTR record for the IP address. - PtrRecordUpdate *PtrUpdateStatus - - // The public IP address. - PublicIp *string - - noSmithyDocumentSerde -} - -// Details on the Elastic IP address transfer. For more information, see Transfer -// Elastic IP addresses (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-eips.html#transfer-EIPs-intro) -// in the Amazon Virtual Private Cloud User Guide. -type AddressTransfer struct { - - // The Elastic IP address transfer status. - AddressTransferStatus AddressTransferStatus - - // The allocation ID of an Elastic IP address. - AllocationId *string - - // The Elastic IP address being transferred. - PublicIp *string - - // The ID of the account that you want to transfer the Elastic IP address to. - TransferAccountId *string - - // The timestamp when the Elastic IP address transfer was accepted. - TransferOfferAcceptedTimestamp *time.Time - - // The timestamp when the Elastic IP address transfer expired. When the source - // account starts the transfer, the transfer account has seven hours to allocate - // the Elastic IP address to complete the transfer, or the Elastic IP address will - // return to its original owner. - TransferOfferExpirationTimestamp *time.Time - - noSmithyDocumentSerde -} - -// Describes a principal. -type AllowedPrincipal struct { - - // The Amazon Resource Name (ARN) of the principal. - Principal *string - - // The type of principal. - PrincipalType PrincipalType - - // The ID of the service. - ServiceId *string - - // The ID of the service permission. - ServicePermissionId *string - - // The tags. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an potential intermediate component of a feasible path. -type AlternatePathHint struct { - - // The Amazon Resource Name (ARN) of the component. - ComponentArn *string - - // The ID of the component. - ComponentId *string - - noSmithyDocumentSerde -} - -// Describes a network access control (ACL) rule. -type AnalysisAclRule struct { - - // The IPv4 address range, in CIDR notation. - Cidr *string - - // Indicates whether the rule is an outbound rule. - Egress *bool - - // The range of ports. - PortRange *PortRange - - // The protocol. - Protocol *string - - // Indicates whether to allow or deny traffic that matches the rule. - RuleAction *string - - // The rule number. - RuleNumber *int32 - - noSmithyDocumentSerde -} - -// Describes a path component. -type AnalysisComponent struct { - - // The Amazon Resource Name (ARN) of the component. - Arn *string - - // The ID of the component. - Id *string - - // The name of the analysis component. - Name *string - - noSmithyDocumentSerde -} - -// Describes a load balancer listener. -type AnalysisLoadBalancerListener struct { - - // [Classic Load Balancers] The back-end port for the listener. - InstancePort *int32 - - // The port on which the load balancer is listening. - LoadBalancerPort *int32 - - noSmithyDocumentSerde -} - -// Describes a load balancer target. -type AnalysisLoadBalancerTarget struct { - - // The IP address. - Address *string - - // The Availability Zone. - AvailabilityZone *string - - // Information about the instance. - Instance *AnalysisComponent - - // The port on which the target is listening. - Port *int32 - - noSmithyDocumentSerde -} - -// Describes a header. Reflects any changes made by a component as traffic passes -// through. The fields of an inbound header are null except for the first component -// of a path. -type AnalysisPacketHeader struct { - - // The destination addresses. - DestinationAddresses []string - - // The destination port ranges. - DestinationPortRanges []PortRange - - // The protocol. - Protocol *string - - // The source addresses. - SourceAddresses []string - - // The source port ranges. - SourcePortRanges []PortRange - - noSmithyDocumentSerde -} - -// Describes a route table route. -type AnalysisRouteTableRoute struct { - - // The ID of a carrier gateway. - CarrierGatewayId *string - - // The Amazon Resource Name (ARN) of a core network. - CoreNetworkArn *string - - // The destination IPv4 address, in CIDR notation. - DestinationCidr *string - - // The prefix of the Amazon Web Service. - DestinationPrefixListId *string - - // The ID of an egress-only internet gateway. - EgressOnlyInternetGatewayId *string - - // The ID of the gateway, such as an internet gateway or virtual private gateway. - GatewayId *string - - // The ID of the instance, such as a NAT instance. - InstanceId *string - - // The ID of a local gateway. - LocalGatewayId *string - - // The ID of a NAT gateway. - NatGatewayId *string - - // The ID of a network interface. - NetworkInterfaceId *string - - // Describes how the route was created. The following are the possible values: - // - CreateRouteTable - The route was automatically created when the route table - // was created. - // - CreateRoute - The route was manually added to the route table. - // - EnableVgwRoutePropagation - The route was propagated by route propagation. - Origin *string - - // The state. The following are the possible values: - // - active - // - blackhole - State *string - - // The ID of a transit gateway. - TransitGatewayId *string - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -// Describes a security group rule. -type AnalysisSecurityGroupRule struct { - - // The IPv4 address range, in CIDR notation. - Cidr *string - - // The direction. The following are the possible values: - // - egress - // - ingress - Direction *string - - // The port range. - PortRange *PortRange - - // The prefix list ID. - PrefixListId *string - - // The protocol name. - Protocol *string - - // The security group ID. - SecurityGroupId *string - - noSmithyDocumentSerde -} - -// An Autonomous System Number (ASN) and BYOIP CIDR association. -type AsnAssociation struct { - - // The association's ASN. - Asn *string - - // The association's CIDR. - Cidr *string - - // The association's state. - State AsnAssociationState - - // The association's status message. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Provides authorization for Amazon to bring an Autonomous System Number (ASN) to -// a specific Amazon Web Services account using bring your own ASN (BYOASN). For -// details on the format of the message and signature, see Tutorial: Bring your -// ASN to IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-byoasn.html) -// in the Amazon VPC IPAM guide. -type AsnAuthorizationContext struct { - - // The authorization context's message. - // - // This member is required. - Message *string - - // The authorization context's signature. - // - // This member is required. - Signature *string - - noSmithyDocumentSerde -} - -// Describes the private IP addresses assigned to a network interface. -type AssignedPrivateIpAddress struct { - - // The private IP address assigned to the network interface. - PrivateIpAddress *string - - noSmithyDocumentSerde -} - -// Information about the associated IAM roles. -type AssociatedRole struct { - - // The ARN of the associated IAM role. - AssociatedRoleArn *string - - // The name of the Amazon S3 bucket in which the Amazon S3 object is stored. - CertificateS3BucketName *string - - // The key of the Amazon S3 object ey where the certificate, certificate chain, - // and encrypted private key bundle is stored. The object key is formated as - // follows: role_arn / certificate_arn . - CertificateS3ObjectKey *string - - // The ID of the KMS customer master key (CMK) used to encrypt the private key. - EncryptionKmsKeyId *string - - noSmithyDocumentSerde -} - -// Describes a target network that is associated with a Client VPN endpoint. A -// target network is a subnet in a VPC. -type AssociatedTargetNetwork struct { - - // The ID of the subnet. - NetworkId *string - - // The target network type. - NetworkType AssociatedNetworkType - - noSmithyDocumentSerde -} - -// Describes the state of a target network association. -type AssociationStatus struct { - - // The state of the target network association. - Code AssociationStatusCode - - // A message about the status of the target network association, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// Describes integration options for Amazon Athena. -type AthenaIntegration struct { - - // The location in Amazon S3 to store the generated CloudFormation template. - // - // This member is required. - IntegrationResultS3DestinationArn *string - - // The schedule for adding new partitions to the table. - // - // This member is required. - PartitionLoadFrequency PartitionLoadFrequency - - // The end date for the partition. - PartitionEndDate *time.Time - - // The start date for the partition. - PartitionStartDate *time.Time - - noSmithyDocumentSerde -} - -// ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) -// technology to increase the maximum bandwidth used per stream and minimize tail -// latency of network traffic between EC2 instances. With ENA Express, you can -// communicate between two EC2 instances in the same subnet within the same -// account, or in different accounts. Both sending and receiving instances must -// have ENA Express enabled. To improve the reliability of network packet delivery, -// ENA Express reorders network packets on the receiving end by default. However, -// some UDP-based applications are designed to handle network packets that are out -// of order to reduce the overhead for packet delivery at the network layer. When -// ENA Express is enabled, you can specify whether UDP network traffic uses it. -type AttachmentEnaSrdSpecification struct { - - // Indicates whether ENA Express is enabled for the network interface. - EnaSrdEnabled *bool - - // Configures ENA Express for UDP network traffic. - EnaSrdUdpSpecification *AttachmentEnaSrdUdpSpecification - - noSmithyDocumentSerde -} - -// ENA Express is compatible with both TCP and UDP transport protocols. When it's -// enabled, TCP traffic automatically uses it. However, some UDP-based applications -// are designed to handle network packets that are out of order, without a need for -// retransmission, such as live video broadcasting or other near-real-time -// applications. For UDP traffic, you can specify whether to use ENA Express, based -// on your application environment needs. -type AttachmentEnaSrdUdpSpecification struct { - - // Indicates whether UDP traffic to and from the instance uses ENA Express. To - // specify this setting, you must first enable ENA Express. - EnaSrdUdpEnabled *bool - - noSmithyDocumentSerde -} - -// Describes a value for a resource attribute that is a Boolean value. -type AttributeBooleanValue struct { - - // The attribute value. The valid values are true or false . - Value *bool - - noSmithyDocumentSerde -} - -// Describes a value for a resource attribute that is a String. -type AttributeValue struct { - - // The attribute value. The value is case-sensitive. - Value *string - - noSmithyDocumentSerde -} - -// Information about an authorization rule. -type AuthorizationRule struct { - - // Indicates whether the authorization rule grants access to all clients. - AccessAll *bool - - // The ID of the Client VPN endpoint with which the authorization rule is - // associated. - ClientVpnEndpointId *string - - // A brief description of the authorization rule. - Description *string - - // The IPv4 address range, in CIDR notation, of the network to which the - // authorization rule applies. - DestinationCidr *string - - // The ID of the Active Directory group to which the authorization rule grants - // access. - GroupId *string - - // The current state of the authorization rule. - Status *ClientVpnAuthorizationRuleStatus - - noSmithyDocumentSerde -} - -// Describes Availability Zones, Local Zones, and Wavelength Zones. -type AvailabilityZone struct { - - // For Availability Zones, this parameter has the same value as the Region name. - // For Local Zones, the name of the associated group, for example us-west-2-lax-1 . - // For Wavelength Zones, the name of the associated group, for example - // us-east-1-wl1-bos-wlz-1 . - GroupName *string - - // Any messages about the Availability Zone, Local Zone, or Wavelength Zone. - Messages []AvailabilityZoneMessage - - // The name of the network border group. - NetworkBorderGroup *string - - // For Availability Zones, this parameter always has the value of - // opt-in-not-required . For Local Zones and Wavelength Zones, this parameter is - // the opt-in status. The possible values are opted-in , and not-opted-in . - OptInStatus AvailabilityZoneOptInStatus - - // The ID of the zone that handles some of the Local Zone or Wavelength Zone - // control plane operations, such as API calls. - ParentZoneId *string - - // The name of the zone that handles some of the Local Zone or Wavelength Zone - // control plane operations, such as API calls. - ParentZoneName *string - - // The name of the Region. - RegionName *string - - // The state of the Availability Zone, Local Zone, or Wavelength Zone. This value - // is always available . - State AvailabilityZoneState - - // The ID of the Availability Zone, Local Zone, or Wavelength Zone. - ZoneId *string - - // The name of the Availability Zone, Local Zone, or Wavelength Zone. - ZoneName *string - - // The type of zone. The valid values are availability-zone , local-zone , and - // wavelength-zone . - ZoneType *string - - noSmithyDocumentSerde -} - -// Describes a message about an Availability Zone, Local Zone, or Wavelength Zone. -type AvailabilityZoneMessage struct { - - // The message about the Availability Zone, Local Zone, or Wavelength Zone. - Message *string - - noSmithyDocumentSerde -} - -// The capacity information for instances that can be launched onto the Dedicated -// Host. -type AvailableCapacity struct { - - // The number of instances that can be launched onto the Dedicated Host depending - // on the host's available capacity. For Dedicated Hosts that support multiple - // instance types, this parameter represents the number of instances for each - // instance size that is supported on the host. - AvailableInstanceCapacity []InstanceCapacity - - // The number of vCPUs available for launching instances onto the Dedicated Host. - AvailableVCpus *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more -// information, see Amazon EBS–optimized instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) -// in the Amazon EC2 User Guide. -type BaselineEbsBandwidthMbps struct { - - // The maximum baseline bandwidth, in Mbps. If this parameter is not specified, - // there is no maximum limit. - Max *int32 - - // The minimum baseline bandwidth, in Mbps. If this parameter is not specified, - // there is no minimum limit. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more -// information, see Amazon EBS–optimized instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) -// in the Amazon EC2 User Guide. -type BaselineEbsBandwidthMbpsRequest struct { - - // The maximum baseline bandwidth, in Mbps. To specify no maximum limit, omit this - // parameter. - Max *int32 - - // The minimum baseline bandwidth, in Mbps. To specify no minimum limit, omit this - // parameter. - Min *int32 - - noSmithyDocumentSerde -} - -type BlobAttributeValue struct { - Value []byte - - noSmithyDocumentSerde -} - -// Describes a block device mapping, which defines the EBS volumes and instance -// store volumes to attach to an instance at launch. -type BlockDeviceMapping struct { - - // The device name (for example, /dev/sdh or xvdh ). - DeviceName *string - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsBlockDevice - - // To omit the device from the block device mapping, specify an empty string. When - // this property is specified, the device is removed from the block device mapping - // regardless of the assigned value. - NoDevice *string - - // The virtual device name ( ephemeral N). Instance store volumes are numbered - // starting from 0. An instance type with 2 available instance store volumes can - // specify mappings for ephemeral0 and ephemeral1 . The number of available - // instance store volumes depends on the instance type. After you connect to the - // instance, you must mount the volume. NVMe instance store volumes are - // automatically enumerated and assigned a device name. Including them in your - // block device mapping has no effect. Constraints: For M3 instances, you must - // specify instance store volumes in the block device mapping for the instance. - // When you launch an M3 instance, we ignore any instance store volumes specified - // in the block device mapping for the AMI. - VirtualName *string - - noSmithyDocumentSerde -} - -// Describes a bundle task. -type BundleTask struct { - - // The ID of the bundle task. - BundleId *string - - // If the task fails, a description of the error. - BundleTaskError *BundleTaskError - - // The ID of the instance associated with this bundle task. - InstanceId *string - - // The level of task completion, as a percent (for example, 20%). - Progress *string - - // The time this task started. - StartTime *time.Time - - // The state of the task. - State BundleTaskState - - // The Amazon S3 storage locations. - Storage *Storage - - // The time of the most recent update for the task. - UpdateTime *time.Time - - noSmithyDocumentSerde -} - -// Describes an error for BundleInstance . -type BundleTaskError struct { - - // The error code. - Code *string - - // The error message. - Message *string - - noSmithyDocumentSerde -} - -// The Autonomous System Number (ASN) and BYOIP CIDR association. -type Byoasn struct { - - // A public 2-byte or 4-byte ASN. - Asn *string - - // An IPAM ID. - IpamId *string - - // The provisioning state of the BYOASN. - State AsnState - - // The status message. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Information about an address range that is provisioned for use with your Amazon -// Web Services resources through bring your own IP addresses (BYOIP). -type ByoipCidr struct { - - // The BYOIP CIDR associations with ASNs. - AsnAssociations []AsnAssociation - - // The address range, in CIDR notation. - Cidr *string - - // The description of the address range. - Description *string - - // If you have Local Zones (https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html) - // enabled, you can choose a network border group for Local Zones when you - // provision and advertise a BYOIPv4 CIDR. Choose the network border group - // carefully as the EIP and the Amazon Web Services resource it is associated with - // must reside in the same network border group. You can provision BYOIP address - // ranges to and advertise them in the following Local Zone network border groups: - // - us-east-1-dfw-2 - // - us-west-2-lax-1 - // - us-west-2-phx-2 - // You cannot provision or advertise BYOIPv6 address ranges in Local Zones at this - // time. - NetworkBorderGroup *string - - // The state of the address pool. - State ByoipCidrState - - // Upon success, contains the ID of the address pool. Otherwise, contains an error - // message. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Describes a Capacity Reservation Fleet cancellation error. -type CancelCapacityReservationFleetError struct { - - // The error code. - Code *string - - // The error message. - Message *string - - noSmithyDocumentSerde -} - -// Describes a request to cancel a Spot Instance. -type CancelledSpotInstanceRequest struct { - - // The ID of the Spot Instance request. - SpotInstanceRequestId *string - - // The state of the Spot Instance request. - State CancelSpotInstanceRequestState - - noSmithyDocumentSerde -} - -// Describes a Spot Fleet error. -type CancelSpotFleetRequestsError struct { - - // The error code. - Code CancelBatchErrorCode - - // The description for the error code. - Message *string - - noSmithyDocumentSerde -} - -// Describes a Spot Fleet request that was not successfully canceled. -type CancelSpotFleetRequestsErrorItem struct { - - // The error. - Error *CancelSpotFleetRequestsError - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string - - noSmithyDocumentSerde -} - -// Describes a Spot Fleet request that was successfully canceled. -type CancelSpotFleetRequestsSuccessItem struct { - - // The current state of the Spot Fleet request. - CurrentSpotFleetRequestState BatchState - - // The previous state of the Spot Fleet request. - PreviousSpotFleetRequestState BatchState - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string - - noSmithyDocumentSerde -} - -// Information about instance capacity usage for a Capacity Reservation. -type CapacityAllocation struct { - - // The usage type. used indicates that the instance capacity is in use by - // instances that are running in the Capacity Reservation. - AllocationType AllocationType - - // The amount of instance capacity associated with the usage. For example a value - // of 4 indicates that instance capacity for 4 instances is currently in use. - Count *int32 - - noSmithyDocumentSerde -} - -// The recommended Capacity Block that fits your search requirements. -type CapacityBlockOffering struct { - - // The Availability Zone of the Capacity Block offering. - AvailabilityZone *string - - // The amount of time of the Capacity Block reservation in hours. - CapacityBlockDurationHours *int32 - - // The ID of the Capacity Block offering. - CapacityBlockOfferingId *string - - // The currency of the payment for the Capacity Block. - CurrencyCode *string - - // The end date of the Capacity Block offering. - EndDate *time.Time - - // The number of instances in the Capacity Block offering. - InstanceCount *int32 - - // The instance type of the Capacity Block offering. - InstanceType *string - - // The start date of the Capacity Block offering. - StartDate *time.Time - - // The tenancy of the Capacity Block. - Tenancy CapacityReservationTenancy - - // The total price to be paid up front. - UpfrontFee *string - - noSmithyDocumentSerde -} - -// Describes a Capacity Reservation. -type CapacityReservation struct { - - // The Availability Zone in which the capacity is reserved. - AvailabilityZone *string - - // The Availability Zone ID of the Capacity Reservation. - AvailabilityZoneId *string - - // The remaining capacity. Indicates the number of instances that can be launched - // in the Capacity Reservation. - AvailableInstanceCount *int32 - - // Information about instance capacity usage. - CapacityAllocations []CapacityAllocation - - // The Amazon Resource Name (ARN) of the Capacity Reservation. - CapacityReservationArn *string - - // The ID of the Capacity Reservation Fleet to which the Capacity Reservation - // belongs. Only valid for Capacity Reservations that were created by a Capacity - // Reservation Fleet. - CapacityReservationFleetId *string - - // The ID of the Capacity Reservation. - CapacityReservationId *string - - // The date and time at which the Capacity Reservation was created. - CreateDate *time.Time - - // Indicates whether the Capacity Reservation supports EBS-optimized instances. - // This optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using an - // EBS- optimized instance. - EbsOptimized *bool - - // The date and time at which the Capacity Reservation expires. When a Capacity - // Reservation expires, the reserved capacity is released and you can no longer - // launch instances into it. The Capacity Reservation's state changes to expired - // when it reaches its end date and time. - EndDate *time.Time - - // Indicates the way in which the Capacity Reservation ends. A Capacity - // Reservation can have one of the following end types: - // - unlimited - The Capacity Reservation remains active until you explicitly - // cancel it. - // - limited - The Capacity Reservation expires automatically at a specified date - // and time. - EndDateType EndDateType - - // Deprecated. - EphemeralStorage *bool - - // Indicates the type of instance launches that the Capacity Reservation accepts. - // The options include: - // - open - The Capacity Reservation accepts all instances that have matching - // attributes (instance type, platform, and Availability Zone). Instances that have - // matching attributes launch into the Capacity Reservation automatically without - // specifying any additional parameters. - // - targeted - The Capacity Reservation only accepts instances that have - // matching attributes (instance type, platform, and Availability Zone), and - // explicitly target the Capacity Reservation. This ensures that only permitted - // instances can use the reserved capacity. - InstanceMatchCriteria InstanceMatchCriteria - - // The type of operating system for which the Capacity Reservation reserves - // capacity. - InstancePlatform CapacityReservationInstancePlatform - - // The type of instance for which the Capacity Reservation reserves capacity. - InstanceType *string - - // The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation - // was created. - OutpostArn *string - - // The ID of the Amazon Web Services account that owns the Capacity Reservation. - OwnerId *string - - // The Amazon Resource Name (ARN) of the cluster placement group in which the - // Capacity Reservation was created. For more information, see Capacity - // Reservations for cluster placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html) - // in the Amazon EC2 User Guide. - PlacementGroupArn *string - - // The type of Capacity Reservation. - ReservationType CapacityReservationType - - // The date and time at which the Capacity Reservation was started. - StartDate *time.Time - - // The current state of the Capacity Reservation. A Capacity Reservation can be in - // one of the following states: - // - active - The Capacity Reservation is active and the capacity is available - // for your use. - // - expired - The Capacity Reservation expired automatically at the date and - // time specified in your request. The reserved capacity is no longer available for - // your use. - // - cancelled - The Capacity Reservation was cancelled. The reserved capacity is - // no longer available for your use. - // - pending - The Capacity Reservation request was successful but the capacity - // provisioning is still pending. - // - failed - The Capacity Reservation request has failed. A request might fail - // due to invalid request parameters, capacity constraints, or instance limit - // constraints. Failed requests are retained for 60 minutes. - State CapacityReservationState - - // Any tags assigned to the Capacity Reservation. - Tags []Tag - - // Indicates the tenancy of the Capacity Reservation. A Capacity Reservation can - // have one of the following tenancy settings: - // - default - The Capacity Reservation is created on hardware that is shared - // with other Amazon Web Services accounts. - // - dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single Amazon Web Services account. - Tenancy CapacityReservationTenancy - - // The total number of instances for which the Capacity Reservation reserves - // capacity. - TotalInstanceCount *int32 - - noSmithyDocumentSerde -} - -// Information about a Capacity Reservation Fleet. -type CapacityReservationFleet struct { - - // The strategy used by the Capacity Reservation Fleet to determine which of the - // specified instance types to use. For more information, see For more information, - // see Allocation strategy (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#allocation-strategy) - // in the Amazon EC2 User Guide. - AllocationStrategy *string - - // The ARN of the Capacity Reservation Fleet. - CapacityReservationFleetArn *string - - // The ID of the Capacity Reservation Fleet. - CapacityReservationFleetId *string - - // The date and time at which the Capacity Reservation Fleet was created. - CreateTime *time.Time - - // The date and time at which the Capacity Reservation Fleet expires. - EndDate *time.Time - - // Indicates the type of instance launches that the Capacity Reservation Fleet - // accepts. All Capacity Reservations in the Fleet inherit this instance matching - // criteria. Currently, Capacity Reservation Fleets support open instance matching - // criteria only. This means that instances that have matching attributes (instance - // type, platform, and Availability Zone) run in the Capacity Reservations - // automatically. Instances do not need to explicitly target a Capacity Reservation - // Fleet to use its reserved capacity. - InstanceMatchCriteria FleetInstanceMatchCriteria - - // Information about the instance types for which to reserve the capacity. - InstanceTypeSpecifications []FleetCapacityReservation - - // The state of the Capacity Reservation Fleet. Possible states include: - // - submitted - The Capacity Reservation Fleet request has been submitted and - // Amazon Elastic Compute Cloud is preparing to create the Capacity Reservations. - // - modifying - The Capacity Reservation Fleet is being modified. The Fleet - // remains in this state until the modification is complete. - // - active - The Capacity Reservation Fleet has fulfilled its total target - // capacity and it is attempting to maintain this capacity. The Fleet remains in - // this state until it is modified or deleted. - // - partially_fulfilled - The Capacity Reservation Fleet has partially fulfilled - // its total target capacity. There is insufficient Amazon EC2 to fulfill the total - // target capacity. The Fleet is attempting to asynchronously fulfill its total - // target capacity. - // - expiring - The Capacity Reservation Fleet has reach its end date and it is - // in the process of expiring. One or more of its Capacity reservations might still - // be active. - // - expired - The Capacity Reservation Fleet has reach its end date. The Fleet - // and its Capacity Reservations are expired. The Fleet can't create new Capacity - // Reservations. - // - cancelling - The Capacity Reservation Fleet is in the process of being - // cancelled. One or more of its Capacity reservations might still be active. - // - cancelled - The Capacity Reservation Fleet has been manually cancelled. The - // Fleet and its Capacity Reservations are cancelled and the Fleet can't create new - // Capacity Reservations. - // - failed - The Capacity Reservation Fleet failed to reserve capacity for the - // specified instance types. - State CapacityReservationFleetState - - // The tags assigned to the Capacity Reservation Fleet. - Tags []Tag - - // The tenancy of the Capacity Reservation Fleet. Tenancies include: - // - default - The Capacity Reservation Fleet is created on hardware that is - // shared with other Amazon Web Services accounts. - // - dedicated - The Capacity Reservation Fleet is created on single-tenant - // hardware that is dedicated to a single Amazon Web Services account. - Tenancy FleetCapacityReservationTenancy - - // The capacity units that have been fulfilled. - TotalFulfilledCapacity *float64 - - // The total number of capacity units for which the Capacity Reservation Fleet - // reserves capacity. For more information, see Total target capacity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) - // in the Amazon EC2 User Guide. - TotalTargetCapacity *int32 - - noSmithyDocumentSerde -} - -// Describes a Capacity Reservation Fleet that was successfully cancelled. -type CapacityReservationFleetCancellationState struct { - - // The ID of the Capacity Reservation Fleet that was successfully cancelled. - CapacityReservationFleetId *string - - // The current state of the Capacity Reservation Fleet. - CurrentFleetState CapacityReservationFleetState - - // The previous state of the Capacity Reservation Fleet. - PreviousFleetState CapacityReservationFleetState - - noSmithyDocumentSerde -} - -// Describes a resource group to which a Capacity Reservation has been added. -type CapacityReservationGroup struct { - - // The ARN of the resource group. - GroupArn *string - - // The ID of the Amazon Web Services account that owns the resource group. - OwnerId *string - - noSmithyDocumentSerde -} - -// Describes the strategy for using unused Capacity Reservations for fulfilling -// On-Demand capacity. This strategy can only be used if the EC2 Fleet is of type -// instant . For more information about Capacity Reservations, see On-Demand -// Capacity Reservations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon EC2 User Guide. For examples of using Capacity Reservations in an -// EC2 Fleet, see EC2 Fleet example configurations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) -// in the Amazon EC2 User Guide. -type CapacityReservationOptions struct { - - // Indicates whether to use unused Capacity Reservations for fulfilling On-Demand - // capacity. If you specify use-capacity-reservations-first , the fleet uses unused - // Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand - // capacity. If multiple instance pools have unused Capacity Reservations, the - // On-Demand allocation strategy ( lowest-price or prioritized ) is applied. If the - // number of unused Capacity Reservations is less than the On-Demand target - // capacity, the remaining On-Demand target capacity is launched according to the - // On-Demand allocation strategy ( lowest-price or prioritized ). If you do not - // specify a value, the fleet fulfils the On-Demand capacity according to the - // chosen On-Demand allocation strategy. - UsageStrategy FleetCapacityReservationUsageStrategy - - noSmithyDocumentSerde -} - -// Describes the strategy for using unused Capacity Reservations for fulfilling -// On-Demand capacity. This strategy can only be used if the EC2 Fleet is of type -// instant . For more information about Capacity Reservations, see On-Demand -// Capacity Reservations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon EC2 User Guide. For examples of using Capacity Reservations in an -// EC2 Fleet, see EC2 Fleet example configurations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) -// in the Amazon EC2 User Guide. -type CapacityReservationOptionsRequest struct { - - // Indicates whether to use unused Capacity Reservations for fulfilling On-Demand - // capacity. If you specify use-capacity-reservations-first , the fleet uses unused - // Capacity Reservations to fulfill On-Demand capacity up to the target On-Demand - // capacity. If multiple instance pools have unused Capacity Reservations, the - // On-Demand allocation strategy ( lowest-price or prioritized ) is applied. If the - // number of unused Capacity Reservations is less than the On-Demand target - // capacity, the remaining On-Demand target capacity is launched according to the - // On-Demand allocation strategy ( lowest-price or prioritized ). If you do not - // specify a value, the fleet fulfils the On-Demand capacity according to the - // chosen On-Demand allocation strategy. - UsageStrategy FleetCapacityReservationUsageStrategy - - noSmithyDocumentSerde -} - -// Describes an instance's Capacity Reservation targeting option. You can specify -// only one parameter at a time. If you specify CapacityReservationPreference and -// CapacityReservationTarget , the request fails. Use the -// CapacityReservationPreference parameter to configure the instance to run as an -// On-Demand Instance or to run in any open Capacity Reservation that has matching -// attributes (instance type, platform, Availability Zone). Use the -// CapacityReservationTarget parameter to explicitly target a specific Capacity -// Reservation or a Capacity Reservation group. -type CapacityReservationSpecification struct { - - // Indicates the instance's Capacity Reservation preferences. Possible preferences - // include: - // - open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - none - The instance avoids running in a Capacity Reservation even if one is - // available. The instance runs as an On-Demand Instance. - CapacityReservationPreference CapacityReservationPreference - - // Information about the target Capacity Reservation or Capacity Reservation group. - CapacityReservationTarget *CapacityReservationTarget - - noSmithyDocumentSerde -} - -// Describes the instance's Capacity Reservation targeting preferences. The action -// returns the capacityReservationPreference response element if the instance is -// configured to run in On-Demand capacity, or if it is configured in run in any -// open Capacity Reservation that has matching attributes (instance type, platform, -// Availability Zone). The action returns the capacityReservationTarget response -// element if the instance explicily targets a specific Capacity Reservation or -// Capacity Reservation group. -type CapacityReservationSpecificationResponse struct { - - // Describes the instance's Capacity Reservation preferences. Possible preferences - // include: - // - open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - none - The instance avoids running in a Capacity Reservation even if one is - // available. The instance runs in On-Demand capacity. - CapacityReservationPreference CapacityReservationPreference - - // Information about the targeted Capacity Reservation or Capacity Reservation - // group. - CapacityReservationTarget *CapacityReservationTargetResponse - - noSmithyDocumentSerde -} - -// Describes a target Capacity Reservation or Capacity Reservation group. -type CapacityReservationTarget struct { - - // The ID of the Capacity Reservation in which to run the instance. - CapacityReservationId *string - - // The ARN of the Capacity Reservation resource group in which to run the instance. - CapacityReservationResourceGroupArn *string - - noSmithyDocumentSerde -} - -// Describes a target Capacity Reservation or Capacity Reservation group. -type CapacityReservationTargetResponse struct { - - // The ID of the targeted Capacity Reservation. - CapacityReservationId *string - - // The ARN of the targeted Capacity Reservation group. - CapacityReservationResourceGroupArn *string - - noSmithyDocumentSerde -} - -// Describes a carrier gateway. -type CarrierGateway struct { - - // The ID of the carrier gateway. - CarrierGatewayId *string - - // The Amazon Web Services account ID of the owner of the carrier gateway. - OwnerId *string - - // The state of the carrier gateway. - State CarrierGatewayState - - // The tags assigned to the carrier gateway. - Tags []Tag - - // The ID of the VPC associated with the carrier gateway. - VpcId *string - - noSmithyDocumentSerde -} - -// Information about the client certificate used for authentication. -type CertificateAuthentication struct { - - // The ARN of the client certificate. - ClientRootCertificateChain *string - - noSmithyDocumentSerde -} - -// Information about the client certificate to be used for authentication. -type CertificateAuthenticationRequest struct { - - // The ARN of the client certificate. The certificate must be signed by a - // certificate authority (CA) and it must be provisioned in Certificate Manager - // (ACM). - ClientRootCertificateChainArn *string - - noSmithyDocumentSerde -} - -// Provides authorization for Amazon to bring a specific IP address range to a -// specific Amazon Web Services account using bring your own IP addresses (BYOIP). -// For more information, see Configuring your BYOIP address range (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip) -// in the Amazon Elastic Compute Cloud User Guide. -type CidrAuthorizationContext struct { - - // The plain-text authorization message for the prefix and account. - // - // This member is required. - Message *string - - // The signed authorization message for the prefix and account. - // - // This member is required. - Signature *string - - noSmithyDocumentSerde -} - -// Describes an IPv4 CIDR block. -type CidrBlock struct { - - // The IPv4 CIDR block. - CidrBlock *string - - noSmithyDocumentSerde -} - -// Deprecated. Describes the ClassicLink DNS support status of a VPC. -type ClassicLinkDnsSupport struct { - - // Indicates whether ClassicLink DNS support is enabled for the VPC. - ClassicLinkDnsSupported *bool - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Deprecated. Describes a linked EC2-Classic instance. -type ClassicLinkInstance struct { - - // The security groups. - Groups []GroupIdentifier - - // The ID of the instance. - InstanceId *string - - // Any tags assigned to the instance. - Tags []Tag - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes a Classic Load Balancer. -type ClassicLoadBalancer struct { - - // The name of the load balancer. - Name *string - - noSmithyDocumentSerde -} - -// Describes the Classic Load Balancers to attach to a Spot Fleet. Spot Fleet -// registers the running Spot Instances with these Classic Load Balancers. -type ClassicLoadBalancersConfig struct { - - // One or more Classic Load Balancers. - ClassicLoadBalancers []ClassicLoadBalancer - - noSmithyDocumentSerde -} - -// Describes the state of a client certificate revocation list. -type ClientCertificateRevocationListStatus struct { - - // The state of the client certificate revocation list. - Code ClientCertificateRevocationListStatusCode - - // A message about the status of the client certificate revocation list, if - // applicable. - Message *string - - noSmithyDocumentSerde -} - -// The options for managing connection authorization for new client connections. -type ClientConnectOptions struct { - - // Indicates whether client connect options are enabled. The default is false (not - // enabled). - Enabled *bool - - // The Amazon Resource Name (ARN) of the Lambda function used for connection - // authorization. - LambdaFunctionArn *string - - noSmithyDocumentSerde -} - -// The options for managing connection authorization for new client connections. -type ClientConnectResponseOptions struct { - - // Indicates whether client connect options are enabled. - Enabled *bool - - // The Amazon Resource Name (ARN) of the Lambda function used for connection - // authorization. - LambdaFunctionArn *string - - // The status of any updates to the client connect options. - Status *ClientVpnEndpointAttributeStatus - - noSmithyDocumentSerde -} - -// Describes the client-specific data. -type ClientData struct { - - // A user-defined comment about the disk upload. - Comment *string - - // The time that the disk upload ends. - UploadEnd *time.Time - - // The size of the uploaded disk image, in GiB. - UploadSize *float64 - - // The time that the disk upload starts. - UploadStart *time.Time - - noSmithyDocumentSerde -} - -// Options for enabling a customizable text banner that will be displayed on -// Amazon Web Services provided clients when a VPN session is established. -type ClientLoginBannerOptions struct { - - // Customizable text that will be displayed in a banner on Amazon Web Services - // provided clients when a VPN session is established. UTF-8 encoded characters - // only. Maximum of 1400 characters. - BannerText *string - - // Enable or disable a customizable text banner that will be displayed on Amazon - // Web Services provided clients when a VPN session is established. Valid values: - // true | false Default value: false - Enabled *bool - - noSmithyDocumentSerde -} - -// Current state of options for customizable text banner that will be displayed on -// Amazon Web Services provided clients when a VPN session is established. -type ClientLoginBannerResponseOptions struct { - - // Customizable text that will be displayed in a banner on Amazon Web Services - // provided clients when a VPN session is established. UTF-8 encoded characters - // only. Maximum of 1400 characters. - BannerText *string - - // Current state of text banner feature. Valid values: true | false - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes the authentication methods used by a Client VPN endpoint. For more -// information, see Authentication (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/client-authentication.html) -// in the Client VPN Administrator Guide. -type ClientVpnAuthentication struct { - - // Information about the Active Directory, if applicable. - ActiveDirectory *DirectoryServiceAuthentication - - // Information about the IAM SAML identity provider, if applicable. - FederatedAuthentication *FederatedAuthentication - - // Information about the authentication certificates, if applicable. - MutualAuthentication *CertificateAuthentication - - // The authentication type used. - Type ClientVpnAuthenticationType - - noSmithyDocumentSerde -} - -// Describes the authentication method to be used by a Client VPN endpoint. For -// more information, see Authentication (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/authentication-authrization.html#client-authentication) -// in the Client VPN Administrator Guide. -type ClientVpnAuthenticationRequest struct { - - // Information about the Active Directory to be used, if applicable. You must - // provide this information if Type is directory-service-authentication . - ActiveDirectory *DirectoryServiceAuthenticationRequest - - // Information about the IAM SAML identity provider to be used, if applicable. You - // must provide this information if Type is federated-authentication . - FederatedAuthentication *FederatedAuthenticationRequest - - // Information about the authentication certificates to be used, if applicable. - // You must provide this information if Type is certificate-authentication . - MutualAuthentication *CertificateAuthenticationRequest - - // The type of client authentication to be used. - Type ClientVpnAuthenticationType - - noSmithyDocumentSerde -} - -// Describes the state of an authorization rule. -type ClientVpnAuthorizationRuleStatus struct { - - // The state of the authorization rule. - Code ClientVpnAuthorizationRuleStatusCode - - // A message about the status of the authorization rule, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// Describes a client connection. -type ClientVpnConnection struct { - - // The IP address of the client. - ClientIp *string - - // The ID of the Client VPN endpoint to which the client is connected. - ClientVpnEndpointId *string - - // The common name associated with the client. This is either the name of the - // client certificate, or the Active Directory user name. - CommonName *string - - // The date and time the client connection was terminated. - ConnectionEndTime *string - - // The date and time the client connection was established. - ConnectionEstablishedTime *string - - // The ID of the client connection. - ConnectionId *string - - // The number of bytes received by the client. - EgressBytes *string - - // The number of packets received by the client. - EgressPackets *string - - // The number of bytes sent by the client. - IngressBytes *string - - // The number of packets sent by the client. - IngressPackets *string - - // The statuses returned by the client connect handler for posture compliance, if - // applicable. - PostureComplianceStatuses []string - - // The current state of the client connection. - Status *ClientVpnConnectionStatus - - // The current date and time. - Timestamp *string - - // The username of the client who established the client connection. This - // information is only provided if Active Directory client authentication is used. - Username *string - - noSmithyDocumentSerde -} - -// Describes the status of a client connection. -type ClientVpnConnectionStatus struct { - - // The state of the client connection. - Code ClientVpnConnectionStatusCode - - // A message about the status of the client connection, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// Describes a Client VPN endpoint. -type ClientVpnEndpoint struct { - - // Information about the associated target networks. A target network is a subnet - // in a VPC. - // - // Deprecated: This property is deprecated. To view the target networks associated - // with a Client VPN endpoint, call DescribeClientVpnTargetNetworks and inspect the - // clientVpnTargetNetworks response element. - AssociatedTargetNetworks []AssociatedTargetNetwork - - // Information about the authentication method used by the Client VPN endpoint. - AuthenticationOptions []ClientVpnAuthentication - - // The IPv4 address range, in CIDR notation, from which client IP addresses are - // assigned. - ClientCidrBlock *string - - // The options for managing connection authorization for new client connections. - ClientConnectOptions *ClientConnectResponseOptions - - // Options for enabling a customizable text banner that will be displayed on - // Amazon Web Services provided clients when a VPN session is established. - ClientLoginBannerOptions *ClientLoginBannerResponseOptions - - // The ID of the Client VPN endpoint. - ClientVpnEndpointId *string - - // Information about the client connection logging options for the Client VPN - // endpoint. - ConnectionLogOptions *ConnectionLogResponseOptions - - // The date and time the Client VPN endpoint was created. - CreationTime *string - - // The date and time the Client VPN endpoint was deleted, if applicable. - DeletionTime *string - - // A brief description of the endpoint. - Description *string - - // The DNS name to be used by clients when connecting to the Client VPN endpoint. - DnsName *string - - // Information about the DNS servers to be used for DNS resolution. - DnsServers []string - - // The IDs of the security groups for the target network. - SecurityGroupIds []string - - // The URL of the self-service portal. - SelfServicePortalUrl *string - - // The ARN of the server certificate. - ServerCertificateArn *string - - // The maximum VPN session duration time in hours. Valid values: 8 | 10 | 12 | 24 - // Default value: 24 - SessionTimeoutHours *int32 - - // Indicates whether split-tunnel is enabled in the Client VPN endpoint. For - // information about split-tunnel VPN endpoints, see Split-Tunnel Client VPN - // endpoint (https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/split-tunnel-vpn.html) - // in the Client VPN Administrator Guide. - SplitTunnel *bool - - // The current state of the Client VPN endpoint. - Status *ClientVpnEndpointStatus - - // Any tags assigned to the Client VPN endpoint. - Tags []Tag - - // The transport protocol used by the Client VPN endpoint. - TransportProtocol TransportProtocol - - // The ID of the VPC. - VpcId *string - - // The port number for the Client VPN endpoint. - VpnPort *int32 - - // The protocol used by the VPN session. - VpnProtocol VpnProtocol - - noSmithyDocumentSerde -} - -// Describes the status of the Client VPN endpoint attribute. -type ClientVpnEndpointAttributeStatus struct { - - // The status code. - Code ClientVpnEndpointAttributeStatusCode - - // The status message. - Message *string - - noSmithyDocumentSerde -} - -// Describes the state of a Client VPN endpoint. -type ClientVpnEndpointStatus struct { - - // The state of the Client VPN endpoint. Possible states include: - // - pending-associate - The Client VPN endpoint has been created but no target - // networks have been associated. The Client VPN endpoint cannot accept - // connections. - // - available - The Client VPN endpoint has been created and a target network - // has been associated. The Client VPN endpoint can accept connections. - // - deleting - The Client VPN endpoint is being deleted. The Client VPN endpoint - // cannot accept connections. - // - deleted - The Client VPN endpoint has been deleted. The Client VPN endpoint - // cannot accept connections. - Code ClientVpnEndpointStatusCode - - // A message about the status of the Client VPN endpoint. - Message *string - - noSmithyDocumentSerde -} - -// Information about a Client VPN endpoint route. -type ClientVpnRoute struct { - - // The ID of the Client VPN endpoint with which the route is associated. - ClientVpnEndpointId *string - - // A brief description of the route. - Description *string - - // The IPv4 address range, in CIDR notation, of the route destination. - DestinationCidr *string - - // Indicates how the route was associated with the Client VPN endpoint. associate - // indicates that the route was automatically added when the target network was - // associated with the Client VPN endpoint. add-route indicates that the route was - // manually added using the CreateClientVpnRoute action. - Origin *string - - // The current state of the route. - Status *ClientVpnRouteStatus - - // The ID of the subnet through which traffic is routed. - TargetSubnet *string - - // The route type. - Type *string - - noSmithyDocumentSerde -} - -// Describes the state of a Client VPN endpoint route. -type ClientVpnRouteStatus struct { - - // The state of the Client VPN endpoint route. - Code ClientVpnRouteStatusCode - - // A message about the status of the Client VPN endpoint route, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// Options for sending VPN tunnel logs to CloudWatch. -type CloudWatchLogOptions struct { - - // Status of VPN tunnel logging feature. Default value is False . Valid values: - // True | False - LogEnabled *bool - - // The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to. - LogGroupArn *string - - // Configured log format. Default format is json . Valid values: json | text - LogOutputFormat *string - - noSmithyDocumentSerde -} - -// Options for sending VPN tunnel logs to CloudWatch. -type CloudWatchLogOptionsSpecification struct { - - // Enable or disable VPN tunnel logging feature. Default value is False . Valid - // values: True | False - LogEnabled *bool - - // The Amazon Resource Name (ARN) of the CloudWatch log group to send logs to. - LogGroupArn *string - - // Set log format. Default format is json . Valid values: json | text - LogOutputFormat *string - - noSmithyDocumentSerde -} - -// Describes address usage for a customer-owned address pool. -type CoipAddressUsage struct { - - // The allocation ID of the address. - AllocationId *string - - // The Amazon Web Services account ID. - AwsAccountId *string - - // The Amazon Web Services service. - AwsService *string - - // The customer-owned IP address. - CoIp *string - - noSmithyDocumentSerde -} - -// Information about a customer-owned IP address range. -type CoipCidr struct { - - // An address range in a customer-owned IP address space. - Cidr *string - - // The ID of the address pool. - CoipPoolId *string - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes a customer-owned address pool. -type CoipPool struct { - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - // The ARN of the address pool. - PoolArn *string - - // The address ranges of the address pool. - PoolCidrs []string - - // The ID of the address pool. - PoolId *string - - // The tags. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the client connection logging options for the Client VPN endpoint. -type ConnectionLogOptions struct { - - // The name of the CloudWatch Logs log group. Required if connection logging is - // enabled. - CloudwatchLogGroup *string - - // The name of the CloudWatch Logs log stream to which the connection data is - // published. - CloudwatchLogStream *string - - // Indicates whether connection logging is enabled. - Enabled *bool - - noSmithyDocumentSerde -} - -// Information about the client connection logging options for a Client VPN -// endpoint. -type ConnectionLogResponseOptions struct { - - // The name of the Amazon CloudWatch Logs log group to which connection logging - // data is published. - CloudwatchLogGroup *string - - // The name of the Amazon CloudWatch Logs log stream to which connection logging - // data is published. - CloudwatchLogStream *string - - // Indicates whether client connection logging is enabled for the Client VPN - // endpoint. - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes a connection notification for a VPC endpoint or VPC endpoint service. -type ConnectionNotification struct { - - // The events for the notification. Valid values are Accept , Connect , Delete , - // and Reject . - ConnectionEvents []string - - // The ARN of the SNS topic for the notification. - ConnectionNotificationArn *string - - // The ID of the notification. - ConnectionNotificationId *string - - // The state of the notification. - ConnectionNotificationState ConnectionNotificationState - - // The type of notification. - ConnectionNotificationType ConnectionNotificationType - - // The ID of the endpoint service. - ServiceId *string - - // The ID of the VPC endpoint. - VpcEndpointId *string - - noSmithyDocumentSerde -} - -// A security group connection tracking configuration that enables you to set the -// idle timeout for connection tracking on an Elastic network interface. For more -// information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) -// in the Amazon Elastic Compute Cloud User Guide. -type ConnectionTrackingConfiguration struct { - - // Timeout (in seconds) for idle TCP connections in an established state. Min: 60 - // seconds. Max: 432000 seconds (5 days). Default: 432000 seconds. Recommended: - // Less than 432000 seconds. - TcpEstablishedTimeout *int32 - - // Timeout (in seconds) for idle UDP flows classified as streams which have seen - // more than one request-response transaction. Min: 60 seconds. Max: 180 seconds (3 - // minutes). Default: 180 seconds. - UdpStreamTimeout *int32 - - // Timeout (in seconds) for idle UDP flows that have seen traffic only in a single - // direction or a single request-response transaction. Min: 30 seconds. Max: 60 - // seconds. Default: 30 seconds. - UdpTimeout *int32 - - noSmithyDocumentSerde -} - -// A security group connection tracking specification that enables you to set the -// idle timeout for connection tracking on an Elastic network interface. For more -// information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) -// in the Amazon Elastic Compute Cloud User Guide. -type ConnectionTrackingSpecification struct { - - // Timeout (in seconds) for idle TCP connections in an established state. Min: 60 - // seconds. Max: 432000 seconds (5 days). Default: 432000 seconds. Recommended: - // Less than 432000 seconds. - TcpEstablishedTimeout *int32 - - // Timeout (in seconds) for idle UDP flows classified as streams which have seen - // more than one request-response transaction. Min: 60 seconds. Max: 180 seconds (3 - // minutes). Default: 180 seconds. - UdpStreamTimeout *int32 - - // Timeout (in seconds) for idle UDP flows that have seen traffic only in a single - // direction or a single request-response transaction. Min: 30 seconds. Max: 60 - // seconds. Default: 30 seconds. - UdpTimeout *int32 - - noSmithyDocumentSerde -} - -// A security group connection tracking specification request that enables you to -// set the idle timeout for connection tracking on an Elastic network interface. -// For more information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) -// in the Amazon Elastic Compute Cloud User Guide. -type ConnectionTrackingSpecificationRequest struct { - - // Timeout (in seconds) for idle TCP connections in an established state. Min: 60 - // seconds. Max: 432000 seconds (5 days). Default: 432000 seconds. Recommended: - // Less than 432000 seconds. - TcpEstablishedTimeout *int32 - - // Timeout (in seconds) for idle UDP flows classified as streams which have seen - // more than one request-response transaction. Min: 60 seconds. Max: 180 seconds (3 - // minutes). Default: 180 seconds. - UdpStreamTimeout *int32 - - // Timeout (in seconds) for idle UDP flows that have seen traffic only in a single - // direction or a single request-response transaction. Min: 30 seconds. Max: 60 - // seconds. Default: 30 seconds. - UdpTimeout *int32 - - noSmithyDocumentSerde -} - -// A security group connection tracking specification response that enables you to -// set the idle timeout for connection tracking on an Elastic network interface. -// For more information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) -// in the Amazon Elastic Compute Cloud User Guide. -type ConnectionTrackingSpecificationResponse struct { - - // Timeout (in seconds) for idle TCP connections in an established state. Min: 60 - // seconds. Max: 432000 seconds (5 days). Default: 432000 seconds. Recommended: - // Less than 432000 seconds. - TcpEstablishedTimeout *int32 - - // Timeout (in seconds) for idle UDP flows classified as streams which have seen - // more than one request-response transaction. Min: 60 seconds. Max: 180 seconds (3 - // minutes). Default: 180 seconds. - UdpStreamTimeout *int32 - - // Timeout (in seconds) for idle UDP flows that have seen traffic only in a single - // direction or a single request-response transaction. Min: 30 seconds. Max: 60 - // seconds. Default: 30 seconds. - UdpTimeout *int32 - - noSmithyDocumentSerde -} - -// Describes a conversion task. -type ConversionTask struct { - - // The ID of the conversion task. - ConversionTaskId *string - - // The time when the task expires. If the upload isn't complete before the - // expiration time, we automatically cancel the task. - ExpirationTime *string - - // If the task is for importing an instance, this contains information about the - // import instance task. - ImportInstance *ImportInstanceTaskDetails - - // If the task is for importing a volume, this contains information about the - // import volume task. - ImportVolume *ImportVolumeTaskDetails - - // The state of the conversion task. - State ConversionTaskState - - // The status message related to the conversion task. - StatusMessage *string - - // Any tags assigned to the task. - Tags []Tag - - noSmithyDocumentSerde -} - -// The CPU options for the instance. -type CpuOptions struct { - - // Indicates whether the instance is enabled for AMD SEV-SNP. For more - // information, see AMD SEV-SNP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html) - // . - AmdSevSnp AmdSevSnpSpecification - - // The number of CPU cores for the instance. - CoreCount *int32 - - // The number of threads per CPU core. - ThreadsPerCore *int32 - - noSmithyDocumentSerde -} - -// The CPU options for the instance. Both the core count and threads per core must -// be specified in the request. -type CpuOptionsRequest struct { - - // Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is - // supported with M6a, R6a, and C6a instance types only. For more information, see - // AMD SEV-SNP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html) . - AmdSevSnp AmdSevSnpSpecification - - // The number of CPU cores for the instance. - CoreCount *int32 - - // The number of threads per CPU core. To disable multithreading for the instance, - // specify a value of 1 . Otherwise, specify the default value of 2 . - ThreadsPerCore *int32 - - noSmithyDocumentSerde -} - -// Describes the instances that could not be launched by the fleet. -type CreateFleetError struct { - - // The error code that indicates why the instance could not be launched. For more - // information about error codes, see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html) - // . - ErrorCode *string - - // The error message that describes why the instance could not be launched. For - // more information about error messages, see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html) - // . - ErrorMessage *string - - // The launch templates and overrides that were used for launching the instances. - // The values that you specify in the Overrides replace the values in the launch - // template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - - // Indicates if the instance that could not be launched was a Spot Instance or - // On-Demand Instance. - Lifecycle InstanceLifecycle - - noSmithyDocumentSerde -} - -// Describes the instances that were launched by the fleet. -type CreateFleetInstance struct { - - // The IDs of the instances. - InstanceIds []string - - // The instance type. - InstanceType InstanceType - - // The launch templates and overrides that were used for launching the instances. - // The values that you specify in the Overrides replace the values in the launch - // template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - - // Indicates if the instance that was launched is a Spot Instance or On-Demand - // Instance. - Lifecycle InstanceLifecycle - - // The value is Windows for Windows instances. Otherwise, the value is blank. - Platform PlatformValues - - noSmithyDocumentSerde -} - -// The options for a Connect attachment. -type CreateTransitGatewayConnectRequestOptions struct { - - // The tunnel protocol. - // - // This member is required. - Protocol ProtocolValue - - noSmithyDocumentSerde -} - -// The options for the transit gateway multicast domain. -type CreateTransitGatewayMulticastDomainRequestOptions struct { - - // Indicates whether to automatically accept cross-account subnet associations - // that are associated with the transit gateway multicast domain. - AutoAcceptSharedAssociations AutoAcceptSharedAssociationsValue - - // Specify whether to enable Internet Group Management Protocol (IGMP) version 2 - // for the transit gateway multicast domain. - Igmpv2Support Igmpv2SupportValue - - // Specify whether to enable support for statically configuring multicast group - // sources for a domain. - StaticSourcesSupport StaticSourcesSupportValue - - noSmithyDocumentSerde -} - -// Describes whether dynamic routing is enabled or disabled for the transit -// gateway peering request. -type CreateTransitGatewayPeeringAttachmentRequestOptions struct { - - // Indicates whether dynamic routing is enabled or disabled. - DynamicRouting DynamicRoutingValue - - noSmithyDocumentSerde -} - -// Describes the options for a VPC attachment. -type CreateTransitGatewayVpcAttachmentRequestOptions struct { - - // Enable or disable support for appliance mode. If enabled, a traffic flow - // between a source and destination uses the same Availability Zone for the VPC - // attachment for the lifetime of that flow. The default is disable . - ApplianceModeSupport ApplianceModeSupportValue - - // Enable or disable DNS support. The default is enable . - DnsSupport DnsSupportValue - - // Enable or disable IPv6 support. The default is disable . - Ipv6Support Ipv6SupportValue - - // Enables you to reference a security group across VPCs attached to a transit - // gateway (TGW). Use this option to simplify security group management and control - // of instance-to-instance traffic across VPCs that are connected by transit - // gateway. You can also use this option to migrate from VPC peering (which was the - // only option that supported security group referencing) to transit gateways - // (which now also support security group referencing). This option is disabled by - // default and there are no additional costs to use this feature. If you don't - // enable or disable SecurityGroupReferencingSupport in the request, the attachment - // will inherit the security group referencing support setting on the transit - // gateway. For important information about this feature, see Create a transit - // gateway attachment to a VPC (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-vpc-attachments.html#create-vpc-attachment) - // in the Amazon Web Services Transit Gateway Guide. - SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue - - noSmithyDocumentSerde -} - -// Describes the network interface options when creating an Amazon Web Services -// Verified Access endpoint using the network-interface type. -type CreateVerifiedAccessEndpointEniOptions struct { - - // The ID of the network interface. - NetworkInterfaceId *string - - // The IP port number. - Port *int32 - - // The IP protocol. - Protocol VerifiedAccessEndpointProtocol - - noSmithyDocumentSerde -} - -// Describes the load balancer options when creating an Amazon Web Services -// Verified Access endpoint using the load-balancer type. -type CreateVerifiedAccessEndpointLoadBalancerOptions struct { - - // The ARN of the load balancer. - LoadBalancerArn *string - - // The IP port number. - Port *int32 - - // The IP protocol. - Protocol VerifiedAccessEndpointProtocol - - // The IDs of the subnets. - SubnetIds []string - - noSmithyDocumentSerde -} - -// Describes the options when creating an Amazon Web Services Verified Access -// trust provider using the device type. -type CreateVerifiedAccessTrustProviderDeviceOptions struct { - - // The URL Amazon Web Services Verified Access will use to verify the authenticity - // of the device tokens. - PublicSigningKeyUrl *string - - // The ID of the tenant application with the device-identity provider. - TenantId *string - - noSmithyDocumentSerde -} - -// Describes the options when creating an Amazon Web Services Verified Access -// trust provider using the user type. -type CreateVerifiedAccessTrustProviderOidcOptions struct { - - // The OIDC authorization endpoint. - AuthorizationEndpoint *string - - // The client identifier. - ClientId *string - - // The client secret. - ClientSecret *string - - // The OIDC issuer. - Issuer *string - - // OpenID Connect (OIDC) scopes are used by an application during authentication - // to authorize access to a user's details. Each scope returns a specific set of - // user attributes. - Scope *string - - // The OIDC token endpoint. - TokenEndpoint *string - - // The OIDC user info endpoint. - UserInfoEndpoint *string - - noSmithyDocumentSerde -} - -// Describes the user or group to be added or removed from the list of create -// volume permissions for a volume. -type CreateVolumePermission struct { - - // The group to be added or removed. The possible value is all . - Group PermissionGroup - - // The ID of the Amazon Web Services account to be added or removed. - UserId *string - - noSmithyDocumentSerde -} - -// Describes modifications to the list of create volume permissions for a volume. -type CreateVolumePermissionModifications struct { - - // Adds the specified Amazon Web Services account ID or group to the list. - Add []CreateVolumePermission - - // Removes the specified Amazon Web Services account ID or group from the list. - Remove []CreateVolumePermission - - noSmithyDocumentSerde -} - -// Describes the credit option for CPU usage of a T instance. -type CreditSpecification struct { - - // The credit option for CPU usage of a T instance. Valid values: standard | - // unlimited - CpuCredits *string - - noSmithyDocumentSerde -} - -// The credit option for CPU usage of a T instance. -type CreditSpecificationRequest struct { - - // The credit option for CPU usage of a T instance. Valid values: standard | - // unlimited - // - // This member is required. - CpuCredits *string - - noSmithyDocumentSerde -} - -// Describes a customer gateway. -type CustomerGateway struct { - - // The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number - // (ASN). - BgpAsn *string - - // The Amazon Resource Name (ARN) for the customer gateway certificate. - CertificateArn *string - - // The ID of the customer gateway. - CustomerGatewayId *string - - // The name of customer gateway device. - DeviceName *string - - // The IP address of the customer gateway device's outside interface. - IpAddress *string - - // The current state of the customer gateway ( pending | available | deleting | - // deleted ). - State *string - - // Any tags assigned to the customer gateway. - Tags []Tag - - // The type of VPN connection the customer gateway supports ( ipsec.1 ). - Type *string - - noSmithyDocumentSerde -} - -// A query used for retrieving network health data. -type DataQuery struct { - - // The Region or Availability Zone that's the target for the data query. For - // example, eu-north-1 . - Destination *string - - // A user-defined ID associated with a data query that's returned in the - // dataResponse identifying the query. For example, if you set the Id to MyQuery01 - // in the query, the dataResponse identifies the query as MyQuery01 . - Id *string - - // The metric, aggregation-latency , indicating that network latency is aggregated - // for the query. This is the only supported metric. - Metric MetricType - - // The aggregation period used for the data query. - Period PeriodType - - // The Region or Availability Zone that's the source for the data query. For - // example, us-east-1 . - Source *string - - // The metric data aggregation period, p50 , between the specified startDate and - // endDate . For example, a metric of five_minutes is the median of all the data - // points gathered within those five minutes. p50 is the only supported metric. - Statistic StatisticType - - noSmithyDocumentSerde -} - -// The response to a DataQuery . -type DataResponse struct { - - // The Region or Availability Zone that's the destination for the data query. For - // example, eu-west-1 . - Destination *string - - // The ID passed in the DataQuery . - Id *string - - // The metric used for the network performance request. Only aggregate-latency is - // supported, which shows network latency during a specified period. - Metric MetricType - - // A list of MetricPoint objects. - MetricPoints []MetricPoint - - // The period used for the network performance request. - Period PeriodType - - // The Region or Availability Zone that's the source for the data query. For - // example, us-east-1 . - Source *string - - // The statistic used for the network performance request. - Statistic StatisticType - - noSmithyDocumentSerde -} - -// Describes an EC2 Fleet error. -type DeleteFleetError struct { - - // The error code. - Code DeleteFleetErrorCode - - // The description for the error code. - Message *string - - noSmithyDocumentSerde -} - -// Describes an EC2 Fleet that was not successfully deleted. -type DeleteFleetErrorItem struct { - - // The error. - Error *DeleteFleetError - - // The ID of the EC2 Fleet. - FleetId *string - - noSmithyDocumentSerde -} - -// Describes an EC2 Fleet that was successfully deleted. -type DeleteFleetSuccessItem struct { - - // The current state of the EC2 Fleet. - CurrentFleetState FleetStateCode - - // The ID of the EC2 Fleet. - FleetId *string - - // The previous state of the EC2 Fleet. - PreviousFleetState FleetStateCode - - noSmithyDocumentSerde -} - -// Describes a launch template version that could not be deleted. -type DeleteLaunchTemplateVersionsResponseErrorItem struct { - - // The ID of the launch template. - LaunchTemplateId *string - - // The name of the launch template. - LaunchTemplateName *string - - // Information about the error. - ResponseError *ResponseError - - // The version number of the launch template. - VersionNumber *int64 - - noSmithyDocumentSerde -} - -// Describes a launch template version that was successfully deleted. -type DeleteLaunchTemplateVersionsResponseSuccessItem struct { - - // The ID of the launch template. - LaunchTemplateId *string - - // The name of the launch template. - LaunchTemplateName *string - - // The version number of the launch template. - VersionNumber *int64 - - noSmithyDocumentSerde -} - -// Describes the error for a Reserved Instance whose queued purchase could not be -// deleted. -type DeleteQueuedReservedInstancesError struct { - - // The error code. - Code DeleteQueuedReservedInstancesErrorCode - - // The error message. - Message *string - - noSmithyDocumentSerde -} - -// Information about the tag keys to deregister for the current Region. You can -// either specify individual tag keys or deregister all tag keys in the current -// Region. You must specify either IncludeAllTagsOfInstance or InstanceTagKeys in -// the request -type DeregisterInstanceTagAttributeRequest struct { - - // Indicates whether to deregister all tag keys in the current Region. Specify - // false to deregister all tag keys. - IncludeAllTagsOfInstance *bool - - // Information about the tag keys to deregister. - InstanceTagKeys []string - - noSmithyDocumentSerde -} - -// Describe details about a Windows image with Windows fast launch enabled that -// meets the requested criteria. Criteria are defined by the -// DescribeFastLaunchImages action filters. -type DescribeFastLaunchImagesSuccessItem struct { - - // The image ID that identifies the Windows fast launch enabled image. - ImageId *string - - // The launch template that the Windows fast launch enabled AMI uses when it - // launches Windows instances from pre-provisioned snapshots. - LaunchTemplate *FastLaunchLaunchTemplateSpecificationResponse - - // The maximum number of instances that Amazon EC2 can launch at the same time to - // create pre-provisioned snapshots for Windows fast launch. - MaxParallelLaunches *int32 - - // The owner ID for the Windows fast launch enabled AMI. - OwnerId *string - - // The resource type that Amazon EC2 uses for pre-provisioning the Windows AMI. - // Supported values include: snapshot . - ResourceType FastLaunchResourceType - - // A group of parameters that are used for pre-provisioning the associated Windows - // AMI using snapshots. - SnapshotConfiguration *FastLaunchSnapshotConfigurationResponse - - // The current state of Windows fast launch for the specified Windows AMI. - State FastLaunchStateCode - - // The reason that Windows fast launch for the AMI changed to the current state. - StateTransitionReason *string - - // The time that Windows fast launch for the AMI changed to the current state. - StateTransitionTime *time.Time - - noSmithyDocumentSerde -} - -// Describes fast snapshot restores for a snapshot. -type DescribeFastSnapshotRestoreSuccessItem struct { - - // The Availability Zone. - AvailabilityZone *string - - // The time at which fast snapshot restores entered the disabled state. - DisabledTime *time.Time - - // The time at which fast snapshot restores entered the disabling state. - DisablingTime *time.Time - - // The time at which fast snapshot restores entered the enabled state. - EnabledTime *time.Time - - // The time at which fast snapshot restores entered the enabling state. - EnablingTime *time.Time - - // The time at which fast snapshot restores entered the optimizing state. - OptimizingTime *time.Time - - // The Amazon Web Services owner alias that enabled fast snapshot restores on the - // snapshot. This is intended for future use. - OwnerAlias *string - - // The ID of the Amazon Web Services account that enabled fast snapshot restores - // on the snapshot. - OwnerId *string - - // The ID of the snapshot. - SnapshotId *string - - // The state of fast snapshot restores. - State FastSnapshotRestoreStateCode - - // The reason for the state transition. The possible values are as follows: - // - Client.UserInitiated - The state successfully transitioned to enabling or - // disabling . - // - Client.UserInitiated - Lifecycle state transition - The state successfully - // transitioned to optimizing , enabled , or disabled . - StateTransitionReason *string - - noSmithyDocumentSerde -} - -// Describes the instances that could not be launched by the fleet. -type DescribeFleetError struct { - - // The error code that indicates why the instance could not be launched. For more - // information about error codes, see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html) - // . - ErrorCode *string - - // The error message that describes why the instance could not be launched. For - // more information about error messages, see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html.html) - // . - ErrorMessage *string - - // The launch templates and overrides that were used for launching the instances. - // The values that you specify in the Overrides replace the values in the launch - // template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - - // Indicates if the instance that could not be launched was a Spot Instance or - // On-Demand Instance. - Lifecycle InstanceLifecycle - - noSmithyDocumentSerde -} - -// Describes the instances that were launched by the fleet. -type DescribeFleetsInstances struct { - - // The IDs of the instances. - InstanceIds []string - - // The instance type. - InstanceType InstanceType - - // The launch templates and overrides that were used for launching the instances. - // The values that you specify in the Overrides replace the values in the launch - // template. - LaunchTemplateAndOverrides *LaunchTemplateAndOverridesResponse - - // Indicates if the instance that was launched is a Spot Instance or On-Demand - // Instance. - Lifecycle InstanceLifecycle - - // The value is Windows for Windows instances. Otherwise, the value is blank. - Platform PlatformValues - - noSmithyDocumentSerde -} - -// Describes the destination options for a flow log. -type DestinationOptionsRequest struct { - - // The format for the flow log. The default is plain-text . - FileFormat DestinationFileFormat - - // Indicates whether to use Hive-compatible prefixes for flow logs stored in - // Amazon S3. The default is false . - HiveCompatiblePartitions *bool - - // Indicates whether to partition the flow log per hour. This reduces the cost and - // response time for queries. The default is false . - PerHourPartition *bool - - noSmithyDocumentSerde -} - -// Describes the destination options for a flow log. -type DestinationOptionsResponse struct { - - // The format for the flow log. - FileFormat DestinationFileFormat - - // Indicates whether to use Hive-compatible prefixes for flow logs stored in - // Amazon S3. - HiveCompatiblePartitions *bool - - // Indicates whether to partition the flow log per hour. - PerHourPartition *bool - - noSmithyDocumentSerde -} - -// Describes the options for an Amazon Web Services Verified Access -// device-identity based trust provider. -type DeviceOptions struct { - - // The URL Amazon Web Services Verified Access will use to verify the authenticity - // of the device tokens. - PublicSigningKeyUrl *string - - // The ID of the tenant application with the device-identity provider. - TenantId *string - - noSmithyDocumentSerde -} - -// Describes a DHCP configuration option. -type DhcpConfiguration struct { - - // The name of a DHCP option. - Key *string - - // The values for the DHCP option. - Values []AttributeValue - - noSmithyDocumentSerde -} - -// The set of DHCP options. -type DhcpOptions struct { - - // The DHCP options in the set. - DhcpConfigurations []DhcpConfiguration - - // The ID of the set of DHCP options. - DhcpOptionsId *string - - // The ID of the Amazon Web Services account that owns the DHCP options set. - OwnerId *string - - // Any tags assigned to the DHCP options set. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an Active Directory. -type DirectoryServiceAuthentication struct { - - // The ID of the Active Directory used for authentication. - DirectoryId *string - - noSmithyDocumentSerde -} - -// Describes the Active Directory to be used for client authentication. -type DirectoryServiceAuthenticationRequest struct { - - // The ID of the Active Directory to be used for authentication. - DirectoryId *string - - noSmithyDocumentSerde -} - -// Contains information about the errors that occurred when disabling fast -// snapshot restores. -type DisableFastSnapshotRestoreErrorItem struct { - - // The errors. - FastSnapshotRestoreStateErrors []DisableFastSnapshotRestoreStateErrorItem - - // The ID of the snapshot. - SnapshotId *string - - noSmithyDocumentSerde -} - -// Describes an error that occurred when disabling fast snapshot restores. -type DisableFastSnapshotRestoreStateError struct { - - // The error code. - Code *string - - // The error message. - Message *string - - noSmithyDocumentSerde -} - -// Contains information about an error that occurred when disabling fast snapshot -// restores. -type DisableFastSnapshotRestoreStateErrorItem struct { - - // The Availability Zone. - AvailabilityZone *string - - // The error. - Error *DisableFastSnapshotRestoreStateError - - noSmithyDocumentSerde -} - -// Describes fast snapshot restores that were successfully disabled. -type DisableFastSnapshotRestoreSuccessItem struct { - - // The Availability Zone. - AvailabilityZone *string - - // The time at which fast snapshot restores entered the disabled state. - DisabledTime *time.Time - - // The time at which fast snapshot restores entered the disabling state. - DisablingTime *time.Time - - // The time at which fast snapshot restores entered the enabled state. - EnabledTime *time.Time - - // The time at which fast snapshot restores entered the enabling state. - EnablingTime *time.Time - - // The time at which fast snapshot restores entered the optimizing state. - OptimizingTime *time.Time - - // The Amazon Web Services owner alias that enabled fast snapshot restores on the - // snapshot. This is intended for future use. - OwnerAlias *string - - // The ID of the Amazon Web Services account that enabled fast snapshot restores - // on the snapshot. - OwnerId *string - - // The ID of the snapshot. - SnapshotId *string - - // The state of fast snapshot restores for the snapshot. - State FastSnapshotRestoreStateCode - - // The reason for the state transition. The possible values are as follows: - // - Client.UserInitiated - The state successfully transitioned to enabling or - // disabling . - // - Client.UserInitiated - Lifecycle state transition - The state successfully - // transitioned to optimizing , enabled , or disabled . - StateTransitionReason *string - - noSmithyDocumentSerde -} - -// Describes a disk image. -type DiskImage struct { - - // A description of the disk image. - Description *string - - // Information about the disk image. - Image *DiskImageDetail - - // Information about the volume. - Volume *VolumeDetail - - noSmithyDocumentSerde -} - -// Describes a disk image. -type DiskImageDescription struct { - - // The checksum computed for the disk image. - Checksum *string - - // The disk image format. - Format DiskImageFormat - - // A presigned URL for the import manifest stored in Amazon S3. For information - // about creating a presigned URL for an Amazon S3 object, read the "Query String - // Request Authentication Alternative" section of the Authenticating REST Requests (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // topic in the Amazon Simple Storage Service Developer Guide. For information - // about the import manifest referenced by this API action, see VM Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html) - // . - ImportManifestUrl *string - - // The size of the disk image, in GiB. - Size *int64 - - noSmithyDocumentSerde -} - -// Describes a disk image. -type DiskImageDetail struct { - - // The size of the disk image, in GiB. - // - // This member is required. - Bytes *int64 - - // The disk image format. - // - // This member is required. - Format DiskImageFormat - - // A presigned URL for the import manifest stored in Amazon S3 and presented here - // as an Amazon S3 presigned URL. For information about creating a presigned URL - // for an Amazon S3 object, read the "Query String Request Authentication - // Alternative" section of the Authenticating REST Requests (https://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html) - // topic in the Amazon Simple Storage Service Developer Guide. For information - // about the import manifest referenced by this API action, see VM Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html) - // . - // - // This member is required. - ImportManifestUrl *string - - noSmithyDocumentSerde -} - -// Describes a disk image volume. -type DiskImageVolumeDescription struct { - - // The volume identifier. - Id *string - - // The size of the volume, in GiB. - Size *int64 - - noSmithyDocumentSerde -} - -// Describes a disk. -type DiskInfo struct { - - // The number of disks with this configuration. - Count *int32 - - // The size of the disk in GB. - SizeInGB *int64 - - // The type of disk. - Type DiskType - - noSmithyDocumentSerde -} - -// Describes a DNS entry. -type DnsEntry struct { - - // The DNS name. - DnsName *string - - // The ID of the private hosted zone. - HostedZoneId *string - - noSmithyDocumentSerde -} - -// Describes the DNS options for an endpoint. -type DnsOptions struct { - - // The DNS records created for the endpoint. - DnsRecordIpType DnsRecordIpType - - // Indicates whether to enable private DNS only for inbound endpoints. - PrivateDnsOnlyForInboundResolverEndpoint *bool - - noSmithyDocumentSerde -} - -// Describes the DNS options for an endpoint. -type DnsOptionsSpecification struct { - - // The DNS records created for the endpoint. - DnsRecordIpType DnsRecordIpType - - // Indicates whether to enable private DNS only for inbound endpoints. This option - // is available only for services that support both gateway and interface - // endpoints. It routes traffic that originates from the VPC to the gateway - // endpoint and traffic that originates from on-premises to the interface endpoint. - PrivateDnsOnlyForInboundResolverEndpoint *bool - - noSmithyDocumentSerde -} - -// Information about the DNS server to be used. -type DnsServersOptionsModifyStructure struct { - - // The IPv4 address range, in CIDR notation, of the DNS servers to be used. You - // can specify up to two DNS servers. Ensure that the DNS servers can be reached by - // the clients. The specified values overwrite the existing values. - CustomDnsServers []string - - // Indicates whether DNS servers should be used. Specify False to delete the - // existing DNS servers. - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes a block device for an EBS volume. -type EbsBlockDevice struct { - - // Indicates whether the EBS volume is deleted on instance termination. For more - // information, see Preserving Amazon EBS volumes on instance termination (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination) - // in the Amazon EC2 User Guide. - DeleteOnTermination *bool - - // Indicates whether the encryption state of an EBS volume is changed while being - // restored from a backing snapshot. The effect of setting the encryption state to - // true depends on the volume origin (new or from a snapshot), starting encryption - // state, ownership, and whether encryption by default is enabled. For more - // information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters) - // in the Amazon EC2 User Guide. In no case can you remove encryption from an - // encrypted volume. Encrypted volumes can only be attached to instances that - // support Amazon EBS encryption. For more information, see Supported instance - // types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#EBSEncryption_supported_instances) - // . This parameter is not returned by DescribeImageAttribute . For CreateImage - // and RegisterImage , whether you can include this parameter, and the allowed - // values differ depending on the type of block device mapping you are creating. - // - If you are creating a block device mapping for a new (empty) volume, you - // can include this parameter, and specify either true for an encrypted volume, - // or false for an unencrypted volume. If you omit this parameter, it defaults to - // false (unencrypted). - // - If you are creating a block device mapping from an existing encrypted or - // unencrypted snapshot, you must omit this parameter. If you include this - // parameter, the request will fail, regardless of the value that you specify. - // - If you are creating a block device mapping from an existing unencrypted - // volume, you can include this parameter, but you must specify false . If you - // specify true , the request will fail. In this case, we recommend that you omit - // the parameter. - // - If you are creating a block device mapping from an existing encrypted - // volume, you can include this parameter, and specify either true or false . - // However, if you specify false , the parameter is ignored and the block device - // mapping is always encrypted. In this case, we recommend that you omit the - // parameter. - Encrypted *bool - - // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 - // volumes, this represents the number of IOPS that are provisioned for the volume. - // For gp2 volumes, this represents the baseline performance of the volume and the - // rate at which the volume accumulates I/O credits for bursting. The following are - // the supported values for each volume type: - // - gp3 : 3,000 - 16,000 IOPS - // - io1 : 100 - 64,000 IOPS - // - io2 : 100 - 256,000 IOPS - // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the - // Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // . On other instances, you can achieve performance up to 32,000 IOPS. This - // parameter is required for io1 and io2 volumes. The default for gp3 volumes is - // 3,000 IOPS. - Iops *int32 - - // Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed CMK - // under which the EBS volume is encrypted. This parameter is only supported on - // BlockDeviceMapping objects called by RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // , RequestSpotFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html) - // , and RequestSpotInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html) - // . - KmsKeyId *string - - // The ARN of the Outpost on which the snapshot is stored. This parameter is not - // supported when using CreateImage (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html) - // . - OutpostArn *string - - // The ID of the snapshot. - SnapshotId *string - - // The throughput that the volume supports, in MiB/s. This parameter is valid only - // for gp3 volumes. Valid Range: Minimum value of 125. Maximum value of 1000. - Throughput *int32 - - // The size of the volume, in GiBs. You must specify either a snapshot ID or a - // volume size. If you specify a snapshot, the default is the snapshot size. You - // can specify a volume size that is equal to or larger than the snapshot size. The - // following are the supported sizes for each volume type: - // - gp2 and gp3 : 1 - 16,384 GiB - // - io1 : 4 - 16,384 GiB - // - io2 : 4 - 65,536 GiB - // - st1 and sc1 : 125 - 16,384 GiB - // - standard : 1 - 1024 GiB - VolumeSize *int32 - - // The volume type. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon EC2 User Guide. - VolumeType VolumeType - - noSmithyDocumentSerde -} - -// Describes the Amazon EBS features supported by the instance type. -type EbsInfo struct { - - // Describes the optimized EBS performance for the instance type. - EbsOptimizedInfo *EbsOptimizedInfo - - // Indicates whether the instance type is Amazon EBS-optimized. For more - // information, see Amazon EBS-optimized instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) - // in Amazon EC2 User Guide. - EbsOptimizedSupport EbsOptimizedSupport - - // Indicates whether Amazon EBS encryption is supported. - EncryptionSupport EbsEncryptionSupport - - // Indicates whether non-volatile memory express (NVMe) is supported. - NvmeSupport EbsNvmeSupport - - noSmithyDocumentSerde -} - -// Describes a parameter used to set up an EBS volume in a block device mapping. -type EbsInstanceBlockDevice struct { - - // The ARN of the Amazon ECS or Fargate task to which the volume is attached. - AssociatedResource *string - - // The time stamp when the attachment initiated. - AttachTime *time.Time - - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool - - // The attachment state. - Status AttachmentStatus - - // The ID of the EBS volume. - VolumeId *string - - // The ID of the Amazon Web Services account that owns the volume. This parameter - // is returned only for volumes that are attached to Fargate tasks. - VolumeOwnerId *string - - noSmithyDocumentSerde -} - -// Describes information used to set up an EBS volume specified in a block device -// mapping. -type EbsInstanceBlockDeviceSpecification struct { - - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool - - // The ID of the EBS volume. - VolumeId *string - - noSmithyDocumentSerde -} - -// Describes the optimized EBS performance for supported instance types. -type EbsOptimizedInfo struct { - - // The baseline bandwidth performance for an EBS-optimized instance type, in Mbps. - BaselineBandwidthInMbps *int32 - - // The baseline input/output storage operations per seconds for an EBS-optimized - // instance type. - BaselineIops *int32 - - // The baseline throughput performance for an EBS-optimized instance type, in MB/s. - BaselineThroughputInMBps *float64 - - // The maximum bandwidth performance for an EBS-optimized instance type, in Mbps. - MaximumBandwidthInMbps *int32 - - // The maximum input/output storage operations per second for an EBS-optimized - // instance type. - MaximumIops *int32 - - // The maximum throughput performance for an EBS-optimized instance type, in MB/s. - MaximumThroughputInMBps *float64 - - noSmithyDocumentSerde -} - -// The EC2 Instance Connect Endpoint. -type Ec2InstanceConnectEndpoint struct { - - // The Availability Zone of the EC2 Instance Connect Endpoint. - AvailabilityZone *string - - // The date and time that the EC2 Instance Connect Endpoint was created. - CreatedAt *time.Time - - // The DNS name of the EC2 Instance Connect Endpoint. - DnsName *string - - // - FipsDnsName *string - - // The Amazon Resource Name (ARN) of the EC2 Instance Connect Endpoint. - InstanceConnectEndpointArn *string - - // The ID of the EC2 Instance Connect Endpoint. - InstanceConnectEndpointId *string - - // The ID of the elastic network interface that Amazon EC2 automatically created - // when creating the EC2 Instance Connect Endpoint. - NetworkInterfaceIds []string - - // The ID of the Amazon Web Services account that created the EC2 Instance Connect - // Endpoint. - OwnerId *string - - // Indicates whether your client's IP address is preserved as the source. The - // value is true or false . - // - If true , your client's IP address is used when you connect to a resource. - // - If false , the elastic network interface IP address is used when you connect - // to a resource. - // Default: true - PreserveClientIp *bool - - // The security groups associated with the endpoint. If you didn't specify a - // security group, the default security group for your VPC is associated with the - // endpoint. - SecurityGroupIds []string - - // The current state of the EC2 Instance Connect Endpoint. - State Ec2InstanceConnectEndpointState - - // The message for the current state of the EC2 Instance Connect Endpoint. Can - // include a failure message. - StateMessage *string - - // The ID of the subnet in which the EC2 Instance Connect Endpoint was created. - SubnetId *string - - // The tags assigned to the EC2 Instance Connect Endpoint. - Tags []Tag - - // The ID of the VPC in which the EC2 Instance Connect Endpoint was created. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes the Elastic Fabric Adapters for the instance type. -type EfaInfo struct { - - // The maximum number of Elastic Fabric Adapters for the instance type. - MaximumEfaInterfaces *int32 - - noSmithyDocumentSerde -} - -// Describes an egress-only internet gateway. -type EgressOnlyInternetGateway struct { - - // Information about the attachment of the egress-only internet gateway. - Attachments []InternetGatewayAttachment - - // The ID of the egress-only internet gateway. - EgressOnlyInternetGatewayId *string - - // The tags assigned to the egress-only internet gateway. - Tags []Tag - - noSmithyDocumentSerde -} - -// Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads -// that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, -// G4dn, or G5 instances. Describes the association between an instance and an -// Elastic Graphics accelerator. -type ElasticGpuAssociation struct { - - // The ID of the association. - ElasticGpuAssociationId *string - - // The state of the association between the instance and the Elastic Graphics - // accelerator. - ElasticGpuAssociationState *string - - // The time the Elastic Graphics accelerator was associated with the instance. - ElasticGpuAssociationTime *string - - // The ID of the Elastic Graphics accelerator. - ElasticGpuId *string - - noSmithyDocumentSerde -} - -// Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads -// that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, -// G4dn, or G5 instances. Describes the status of an Elastic Graphics accelerator. -type ElasticGpuHealth struct { - - // The health status. - Status ElasticGpuStatus - - noSmithyDocumentSerde -} - -// Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads -// that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, -// G4dn, or G5 instances. Describes an Elastic Graphics accelerator. -type ElasticGpus struct { - - // The Availability Zone in the which the Elastic Graphics accelerator resides. - AvailabilityZone *string - - // The status of the Elastic Graphics accelerator. - ElasticGpuHealth *ElasticGpuHealth - - // The ID of the Elastic Graphics accelerator. - ElasticGpuId *string - - // The state of the Elastic Graphics accelerator. - ElasticGpuState ElasticGpuState - - // The type of Elastic Graphics accelerator. - ElasticGpuType *string - - // The ID of the instance to which the Elastic Graphics accelerator is attached. - InstanceId *string - - // The tags assigned to the Elastic Graphics accelerator. - Tags []Tag - - noSmithyDocumentSerde -} - -// Amazon Elastic Graphics reached end of life on January 8, 2024. For workloads -// that require graphics acceleration, we recommend that you use Amazon EC2 G4ad, -// G4dn, or G5 instances. A specification for an Elastic Graphics accelerator. -type ElasticGpuSpecification struct { - - // The type of Elastic Graphics accelerator. For more information about the values - // to specify for Type , see Elastic Graphics Basics (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html#elastic-graphics-basics) - // , specifically the Elastic Graphics accelerator column, in the Amazon Elastic - // Compute Cloud User Guide for Windows Instances. - // - // This member is required. - Type *string - - noSmithyDocumentSerde -} - -// Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. For -// workloads that require graphics acceleration, we recommend that you use Amazon -// EC2 G4ad, G4dn, or G5 instances. -type ElasticGpuSpecificationResponse struct { - - // Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. For - // workloads that require graphics acceleration, we recommend that you use Amazon - // EC2 G4ad, G4dn, or G5 instances. - Type *string - - noSmithyDocumentSerde -} - -// Describes an elastic inference accelerator. -type ElasticInferenceAccelerator struct { - - // The type of elastic inference accelerator. The possible values are eia1.medium , - // eia1.large , eia1.xlarge , eia2.medium , eia2.large , and eia2.xlarge . - // - // This member is required. - Type *string - - // The number of elastic inference accelerators to attach to the instance. - // Default: 1 - Count *int32 - - noSmithyDocumentSerde -} - -// Describes the association between an instance and an elastic inference -// accelerator. -type ElasticInferenceAcceleratorAssociation struct { - - // The Amazon Resource Name (ARN) of the elastic inference accelerator. - ElasticInferenceAcceleratorArn *string - - // The ID of the association. - ElasticInferenceAcceleratorAssociationId *string - - // The state of the elastic inference accelerator. - ElasticInferenceAcceleratorAssociationState *string - - // The time at which the elastic inference accelerator is associated with an - // instance. - ElasticInferenceAcceleratorAssociationTime *time.Time - - noSmithyDocumentSerde -} - -// Contains information about the errors that occurred when enabling fast snapshot -// restores. -type EnableFastSnapshotRestoreErrorItem struct { - - // The errors. - FastSnapshotRestoreStateErrors []EnableFastSnapshotRestoreStateErrorItem - - // The ID of the snapshot. - SnapshotId *string - - noSmithyDocumentSerde -} - -// Describes an error that occurred when enabling fast snapshot restores. -type EnableFastSnapshotRestoreStateError struct { - - // The error code. - Code *string - - // The error message. - Message *string - - noSmithyDocumentSerde -} - -// Contains information about an error that occurred when enabling fast snapshot -// restores. -type EnableFastSnapshotRestoreStateErrorItem struct { - - // The Availability Zone. - AvailabilityZone *string - - // The error. - Error *EnableFastSnapshotRestoreStateError - - noSmithyDocumentSerde -} - -// Describes fast snapshot restores that were successfully enabled. -type EnableFastSnapshotRestoreSuccessItem struct { - - // The Availability Zone. - AvailabilityZone *string - - // The time at which fast snapshot restores entered the disabled state. - DisabledTime *time.Time - - // The time at which fast snapshot restores entered the disabling state. - DisablingTime *time.Time - - // The time at which fast snapshot restores entered the enabled state. - EnabledTime *time.Time - - // The time at which fast snapshot restores entered the enabling state. - EnablingTime *time.Time - - // The time at which fast snapshot restores entered the optimizing state. - OptimizingTime *time.Time - - // The Amazon Web Services owner alias that enabled fast snapshot restores on the - // snapshot. This is intended for future use. - OwnerAlias *string - - // The ID of the Amazon Web Services account that enabled fast snapshot restores - // on the snapshot. - OwnerId *string - - // The ID of the snapshot. - SnapshotId *string - - // The state of fast snapshot restores. - State FastSnapshotRestoreStateCode - - // The reason for the state transition. The possible values are as follows: - // - Client.UserInitiated - The state successfully transitioned to enabling or - // disabling . - // - Client.UserInitiated - Lifecycle state transition - The state successfully - // transitioned to optimizing , enabled , or disabled . - StateTransitionReason *string - - noSmithyDocumentSerde -} - -// ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) -// technology to increase the maximum bandwidth used per stream and minimize tail -// latency of network traffic between EC2 instances. With ENA Express, you can -// communicate between two EC2 instances in the same subnet within the same -// account, or in different accounts. Both sending and receiving instances must -// have ENA Express enabled. To improve the reliability of network packet delivery, -// ENA Express reorders network packets on the receiving end by default. However, -// some UDP-based applications are designed to handle network packets that are out -// of order to reduce the overhead for packet delivery at the network layer. When -// ENA Express is enabled, you can specify whether UDP network traffic uses it. -type EnaSrdSpecification struct { - - // Indicates whether ENA Express is enabled for the network interface. - EnaSrdEnabled *bool - - // Configures ENA Express for UDP network traffic. - EnaSrdUdpSpecification *EnaSrdUdpSpecification - - noSmithyDocumentSerde -} - -// Launch instances with ENA Express settings configured from your launch template. -type EnaSrdSpecificationRequest struct { - - // Specifies whether ENA Express is enabled for the network interface when you - // launch an instance from your launch template. - EnaSrdEnabled *bool - - // Contains ENA Express settings for UDP network traffic in your launch template. - EnaSrdUdpSpecification *EnaSrdUdpSpecificationRequest - - noSmithyDocumentSerde -} - -// ENA Express is compatible with both TCP and UDP transport protocols. When it's -// enabled, TCP traffic automatically uses it. However, some UDP-based applications -// are designed to handle network packets that are out of order, without a need for -// retransmission, such as live video broadcasting or other near-real-time -// applications. For UDP traffic, you can specify whether to use ENA Express, based -// on your application environment needs. -type EnaSrdUdpSpecification struct { - - // Indicates whether UDP traffic to and from the instance uses ENA Express. To - // specify this setting, you must first enable ENA Express. - EnaSrdUdpEnabled *bool - - noSmithyDocumentSerde -} - -// Configures ENA Express for UDP network traffic from your launch template. -type EnaSrdUdpSpecificationRequest struct { - - // Indicates whether UDP traffic uses ENA Express for your instance. To ensure - // that UDP traffic can use ENA Express when you launch an instance, you must also - // set EnaSrdEnabled in the EnaSrdSpecificationRequest to true in your launch - // template. - EnaSrdUdpEnabled *bool - - noSmithyDocumentSerde -} - -// Indicates whether the instance is enabled for Amazon Web Services Nitro -// Enclaves. -type EnclaveOptions struct { - - // If this parameter is set to true , the instance is enabled for Amazon Web - // Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services - // Nitro Enclaves. - Enabled *bool - - noSmithyDocumentSerde -} - -// Indicates whether the instance is enabled for Amazon Web Services Nitro -// Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) -// in the Amazon Web Services Nitro Enclaves User Guide. -type EnclaveOptionsRequest struct { - - // To enable the instance for Amazon Web Services Nitro Enclaves, set this - // parameter to true . - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes an EC2 Fleet or Spot Fleet event. -type EventInformation struct { - - // The description of the event. - EventDescription *string - - // The event. error events: - // - iamFleetRoleInvalid - The EC2 Fleet or Spot Fleet does not have the required - // permissions either to launch or terminate an instance. - // - allLaunchSpecsTemporarilyBlacklisted - None of the configurations are valid, - // and several attempts to launch instances have failed. For more information, see - // the description of the event. - // - spotInstanceCountLimitExceeded - You've reached the limit on the number of - // Spot Instances that you can launch. - // - spotFleetRequestConfigurationInvalid - The configuration is not valid. For - // more information, see the description of the event. - // fleetRequestChange events: - // - active - The EC2 Fleet or Spot Fleet request has been validated and Amazon - // EC2 is attempting to maintain the target number of running instances. - // - deleted (EC2 Fleet) / cancelled (Spot Fleet) - The EC2 Fleet is deleted or - // the Spot Fleet request is canceled and has no running instances. The EC2 Fleet - // or Spot Fleet will be deleted two days after its instances are terminated. - // - deleted_running (EC2 Fleet) / cancelled_running (Spot Fleet) - The EC2 Fleet - // is deleted or the Spot Fleet request is canceled and does not launch additional - // instances. Its existing instances continue to run until they are interrupted or - // terminated. The request remains in this state until all instances are - // interrupted or terminated. - // - deleted_terminating (EC2 Fleet) / cancelled_terminating (Spot Fleet) - The - // EC2 Fleet is deleted or the Spot Fleet request is canceled and its instances are - // terminating. The request remains in this state until all instances are - // terminated. - // - expired - The EC2 Fleet or Spot Fleet request has expired. If the request - // was created with TerminateInstancesWithExpiration set, a subsequent terminated - // event indicates that the instances are terminated. - // - modify_in_progress - The EC2 Fleet or Spot Fleet request is being modified. - // The request remains in this state until the modification is fully processed. - // - modify_succeeded - The EC2 Fleet or Spot Fleet request was modified. - // - submitted - The EC2 Fleet or Spot Fleet request is being evaluated and - // Amazon EC2 is preparing to launch the target number of instances. - // - progress - The EC2 Fleet or Spot Fleet request is in the process of being - // fulfilled. - // instanceChange events: - // - launched - A new instance was launched. - // - terminated - An instance was terminated by the user. - // - termination_notified - An instance termination notification was sent when a - // Spot Instance was terminated by Amazon EC2 during scale-down, when the target - // capacity of the fleet was modified down, for example, from a target capacity of - // 4 to a target capacity of 3. - // Information events: - // - fleetProgressHalted - The price in every launch specification is not valid - // because it is below the Spot price (all the launch specifications have produced - // launchSpecUnusable events). A launch specification might become valid if the - // Spot price changes. - // - launchSpecTemporarilyBlacklisted - The configuration is not valid and - // several attempts to launch instances have failed. For more information, see the - // description of the event. - // - launchSpecUnusable - The price in a launch specification is not valid - // because it is below the Spot price. - // - registerWithLoadBalancersFailed - An attempt to register instances with load - // balancers failed. For more information, see the description of the event. - EventSubType *string - - // The ID of the instance. This information is available only for instanceChange - // events. - InstanceId *string - - noSmithyDocumentSerde -} - -// Describes an explanation code for an unreachable path. For more information, -// see Reachability Analyzer explanation codes (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html) -// . -type Explanation struct { - - // The network ACL. - Acl *AnalysisComponent - - // The network ACL rule. - AclRule *AnalysisAclRule - - // The IPv4 address, in CIDR notation. - Address *string - - // The IPv4 addresses, in CIDR notation. - Addresses []string - - // The resource to which the component is attached. - AttachedTo *AnalysisComponent - - // The Availability Zones. - AvailabilityZones []string - - // The CIDR ranges. - Cidrs []string - - // The listener for a Classic Load Balancer. - ClassicLoadBalancerListener *AnalysisLoadBalancerListener - - // The component. - Component *AnalysisComponent - - // The Amazon Web Services account for the component. - ComponentAccount *string - - // The Region for the component. - ComponentRegion *string - - // The customer gateway. - CustomerGateway *AnalysisComponent - - // The destination. - Destination *AnalysisComponent - - // The destination VPC. - DestinationVpc *AnalysisComponent - - // The direction. The following are the possible values: - // - egress - // - ingress - Direction *string - - // The load balancer listener. - ElasticLoadBalancerListener *AnalysisComponent - - // The explanation code. - ExplanationCode *string - - // The Network Firewall stateful rule. - FirewallStatefulRule *FirewallStatefulRule - - // The Network Firewall stateless rule. - FirewallStatelessRule *FirewallStatelessRule - - // The route table. - IngressRouteTable *AnalysisComponent - - // The internet gateway. - InternetGateway *AnalysisComponent - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string - - // The listener port of the load balancer. - LoadBalancerListenerPort *int32 - - // The target. - LoadBalancerTarget *AnalysisLoadBalancerTarget - - // The target group. - LoadBalancerTargetGroup *AnalysisComponent - - // The target groups. - LoadBalancerTargetGroups []AnalysisComponent - - // The target port. - LoadBalancerTargetPort *int32 - - // The missing component. - MissingComponent *string - - // The NAT gateway. - NatGateway *AnalysisComponent - - // The network interface. - NetworkInterface *AnalysisComponent - - // The packet field. - PacketField *string - - // The port. - Port *int32 - - // The port ranges. - PortRanges []PortRange - - // The prefix list. - PrefixList *AnalysisComponent - - // The protocols. - Protocols []string - - // The route table. - RouteTable *AnalysisComponent - - // The route table route. - RouteTableRoute *AnalysisRouteTableRoute - - // The security group. - SecurityGroup *AnalysisComponent - - // The security group rule. - SecurityGroupRule *AnalysisSecurityGroupRule - - // The security groups. - SecurityGroups []AnalysisComponent - - // The source VPC. - SourceVpc *AnalysisComponent - - // The state. - State *string - - // The subnet. - Subnet *AnalysisComponent - - // The route table for the subnet. - SubnetRouteTable *AnalysisComponent - - // The transit gateway. - TransitGateway *AnalysisComponent - - // The transit gateway attachment. - TransitGatewayAttachment *AnalysisComponent - - // The transit gateway route table. - TransitGatewayRouteTable *AnalysisComponent - - // The transit gateway route table route. - TransitGatewayRouteTableRoute *TransitGatewayRouteTableRoute - - // The component VPC. - Vpc *AnalysisComponent - - // The VPC endpoint. - VpcEndpoint *AnalysisComponent - - // The VPC peering connection. - VpcPeeringConnection *AnalysisComponent - - // The VPN connection. - VpnConnection *AnalysisComponent - - // The VPN gateway. - VpnGateway *AnalysisComponent - - noSmithyDocumentSerde -} - -// Describes an export image task. -type ExportImageTask struct { - - // A description of the image being exported. - Description *string - - // The ID of the export image task. - ExportImageTaskId *string - - // The ID of the image. - ImageId *string - - // The percent complete of the export image task. - Progress *string - - // Information about the destination Amazon S3 bucket. - S3ExportLocation *ExportTaskS3Location - - // The status of the export image task. The possible values are active , completed - // , deleting , and deleted . - Status *string - - // The status message for the export image task. - StatusMessage *string - - // Any tags assigned to the export image task. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an export instance task. -type ExportTask struct { - - // A description of the resource being exported. - Description *string - - // The ID of the export task. - ExportTaskId *string - - // Information about the export task. - ExportToS3Task *ExportToS3Task - - // Information about the instance to export. - InstanceExportDetails *InstanceExportDetails - - // The state of the export task. - State ExportTaskState - - // The status message related to the export task. - StatusMessage *string - - // The tags for the export task. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the destination for an export image task. -type ExportTaskS3Location struct { - - // The destination Amazon S3 bucket. - S3Bucket *string - - // The prefix (logical hierarchy) in the bucket. - S3Prefix *string - - noSmithyDocumentSerde -} - -// Describes the destination for an export image task. -type ExportTaskS3LocationRequest struct { - - // The destination Amazon S3 bucket. - // - // This member is required. - S3Bucket *string - - // The prefix (logical hierarchy) in the bucket. - S3Prefix *string - - noSmithyDocumentSerde -} - -// Describes the format and location for the export task. -type ExportToS3Task struct { - - // The container format used to combine disk images with metadata (such as OVF). - // If absent, only the disk image is exported. - ContainerFormat ContainerFormat - - // The format for the exported image. - DiskImageFormat DiskImageFormat - - // The Amazon S3 bucket for the destination image. The destination bucket must - // exist and have an access control list (ACL) attached that specifies the - // Region-specific canonical account ID for the Grantee . For more information - // about the ACL to your S3 bucket, see Prerequisites (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites) - // in the VM Import/Export User Guide. - S3Bucket *string - - // The encryption key for your S3 bucket. - S3Key *string - - noSmithyDocumentSerde -} - -// Describes an export instance task. -type ExportToS3TaskSpecification struct { - - // The container format used to combine disk images with metadata (such as OVF). - // If absent, only the disk image is exported. - ContainerFormat ContainerFormat - - // The format for the exported image. - DiskImageFormat DiskImageFormat - - // The Amazon S3 bucket for the destination image. The destination bucket must - // exist and have an access control list (ACL) attached that specifies the - // Region-specific canonical account ID for the Grantee . For more information - // about the ACL to your S3 bucket, see Prerequisites (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites) - // in the VM Import/Export User Guide. - S3Bucket *string - - // The image is written to a single object in the Amazon S3 bucket at the S3 key - // s3prefix + exportTaskId + '.' + diskImageFormat. - S3Prefix *string - - noSmithyDocumentSerde -} - -// Describes a Capacity Reservation Fleet that could not be cancelled. -type FailedCapacityReservationFleetCancellationResult struct { - - // Information about the Capacity Reservation Fleet cancellation error. - CancelCapacityReservationFleetError *CancelCapacityReservationFleetError - - // The ID of the Capacity Reservation Fleet that could not be cancelled. - CapacityReservationFleetId *string - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance whose queued purchase was not deleted. -type FailedQueuedPurchaseDeletion struct { - - // The error. - Error *DeleteQueuedReservedInstancesError - - // The ID of the Reserved Instance. - ReservedInstancesId *string - - noSmithyDocumentSerde -} - -// Request to create a launch template for a Windows fast launch enabled AMI. Note -// - You can specify either the LaunchTemplateName or the LaunchTemplateId , but -// not both. -type FastLaunchLaunchTemplateSpecificationRequest struct { - - // Specify the version of the launch template that the AMI should use for Windows - // fast launch. - // - // This member is required. - Version *string - - // Specify the ID of the launch template that the AMI should use for Windows fast - // launch. - LaunchTemplateId *string - - // Specify the name of the launch template that the AMI should use for Windows - // fast launch. - LaunchTemplateName *string - - noSmithyDocumentSerde -} - -// Identifies the launch template that the AMI uses for Windows fast launch. -type FastLaunchLaunchTemplateSpecificationResponse struct { - - // The ID of the launch template that the AMI uses for Windows fast launch. - LaunchTemplateId *string - - // The name of the launch template that the AMI uses for Windows fast launch. - LaunchTemplateName *string - - // The version of the launch template that the AMI uses for Windows fast launch. - Version *string - - noSmithyDocumentSerde -} - -// Configuration settings for creating and managing pre-provisioned snapshots for -// a Windows fast launch enabled AMI. -type FastLaunchSnapshotConfigurationRequest struct { - - // The number of pre-provisioned snapshots to keep on hand for a Windows fast - // launch enabled AMI. - TargetResourceCount *int32 - - noSmithyDocumentSerde -} - -// Configuration settings for creating and managing pre-provisioned snapshots for -// a Windows fast launch enabled Windows AMI. -type FastLaunchSnapshotConfigurationResponse struct { - - // The number of pre-provisioned snapshots requested to keep on hand for a Windows - // fast launch enabled AMI. - TargetResourceCount *int32 - - noSmithyDocumentSerde -} - -// Describes the IAM SAML identity providers used for federated authentication. -type FederatedAuthentication struct { - - // The Amazon Resource Name (ARN) of the IAM SAML identity provider. - SamlProviderArn *string - - // The Amazon Resource Name (ARN) of the IAM SAML identity provider for the - // self-service portal. - SelfServiceSamlProviderArn *string - - noSmithyDocumentSerde -} - -// The IAM SAML identity provider used for federated authentication. -type FederatedAuthenticationRequest struct { - - // The Amazon Resource Name (ARN) of the IAM SAML identity provider. - SAMLProviderArn *string - - // The Amazon Resource Name (ARN) of the IAM SAML identity provider for the - // self-service portal. - SelfServiceSAMLProviderArn *string - - noSmithyDocumentSerde -} - -// A filter name and value pair that is used to return a more specific list of -// results from a describe operation. Filters can be used to match a set of -// resources by specific criteria, such as tags, attributes, or IDs. If you specify -// multiple filters, the filters are joined with an AND , and the request returns -// only results that match all of the specified filters. -type Filter struct { - - // The name of the filter. Filter names are case-sensitive. - Name *string - - // The filter values. Filter values are case-sensitive. If you specify multiple - // values for a filter, the values are joined with an OR , and the request returns - // all results that match any of the specified values. - Values []string - - noSmithyDocumentSerde -} - -// Describes a port range. -type FilterPortRange struct { - - // The first port in the range. - FromPort *int32 - - // The last port in the range. - ToPort *int32 - - noSmithyDocumentSerde -} - -// Describes a stateful rule. -type FirewallStatefulRule struct { - - // The destination ports. - DestinationPorts []PortRange - - // The destination IP addresses, in CIDR notation. - Destinations []string - - // The direction. The possible values are FORWARD and ANY . - Direction *string - - // The protocol. - Protocol *string - - // The rule action. The possible values are pass , drop , and alert . - RuleAction *string - - // The ARN of the stateful rule group. - RuleGroupArn *string - - // The source ports. - SourcePorts []PortRange - - // The source IP addresses, in CIDR notation. - Sources []string - - noSmithyDocumentSerde -} - -// Describes a stateless rule. -type FirewallStatelessRule struct { - - // The destination ports. - DestinationPorts []PortRange - - // The destination IP addresses, in CIDR notation. - Destinations []string - - // The rule priority. - Priority *int32 - - // The protocols. - Protocols []int32 - - // The rule action. The possible values are pass , drop , and forward_to_site . - RuleAction *string - - // The ARN of the stateless rule group. - RuleGroupArn *string - - // The source ports. - SourcePorts []PortRange - - // The source IP addresses, in CIDR notation. - Sources []string - - noSmithyDocumentSerde -} - -// Information about a Capacity Reservation in a Capacity Reservation Fleet. -type FleetCapacityReservation struct { - - // The Availability Zone in which the Capacity Reservation reserves capacity. - AvailabilityZone *string - - // The ID of the Availability Zone in which the Capacity Reservation reserves - // capacity. - AvailabilityZoneId *string - - // The ID of the Capacity Reservation. - CapacityReservationId *string - - // The date and time at which the Capacity Reservation was created. - CreateDate *time.Time - - // Indicates whether the Capacity Reservation reserves capacity for EBS-optimized - // instance types. - EbsOptimized *bool - - // The number of capacity units fulfilled by the Capacity Reservation. For more - // information, see Total target capacity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) - // in the Amazon EC2 User Guide. - FulfilledCapacity *float64 - - // The type of operating system for which the Capacity Reservation reserves - // capacity. - InstancePlatform CapacityReservationInstancePlatform - - // The instance type for which the Capacity Reservation reserves capacity. - InstanceType InstanceType - - // The priority of the instance type in the Capacity Reservation Fleet. For more - // information, see Instance type priority (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority) - // in the Amazon EC2 User Guide. - Priority *int32 - - // The total number of instances for which the Capacity Reservation reserves - // capacity. - TotalInstanceCount *int32 - - // The weight of the instance type in the Capacity Reservation Fleet. For more - // information, see Instance type weight (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-weight) - // in the Amazon EC2 User Guide. - Weight *float64 - - noSmithyDocumentSerde -} - -// Describes an EC2 Fleet. -type FleetData struct { - - // The progress of the EC2 Fleet. If there is an error, the status is error . After - // all requests are placed, the status is pending_fulfillment . If the size of the - // EC2 Fleet is equal to or greater than its target capacity, the status is - // fulfilled . If the size of the EC2 Fleet is decreased, the status is - // pending_termination while instances are terminating. - ActivityStatus FleetActivityStatus - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . Constraints: Maximum 64 ASCII characters - ClientToken *string - - // Reserved. - Context *string - - // The creation date and time of the EC2 Fleet. - CreateTime *time.Time - - // Information about the instances that could not be launched by the fleet. Valid - // only when Type is set to instant . - Errors []DescribeFleetError - - // Indicates whether running instances should be terminated if the target capacity - // of the EC2 Fleet is decreased below the current size of the EC2 Fleet. Supported - // only for fleets of type maintain . - ExcessCapacityTerminationPolicy FleetExcessCapacityTerminationPolicy - - // The ID of the EC2 Fleet. - FleetId *string - - // The state of the EC2 Fleet. - FleetState FleetStateCode - - // The number of units fulfilled by this request compared to the set target - // capacity. - FulfilledCapacity *float64 - - // The number of units fulfilled by this request compared to the set target - // On-Demand capacity. - FulfilledOnDemandCapacity *float64 - - // Information about the instances that were launched by the fleet. Valid only - // when Type is set to instant . - Instances []DescribeFleetsInstances - - // The launch template and overrides. - LaunchTemplateConfigs []FleetLaunchTemplateConfig - - // The allocation strategy of On-Demand Instances in an EC2 Fleet. - OnDemandOptions *OnDemandOptions - - // Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported - // only for fleets of type maintain . For more information, see EC2 Fleet health - // checks (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) - // in the Amazon EC2 User Guide. - ReplaceUnhealthyInstances *bool - - // The configuration of Spot Instances in an EC2 Fleet. - SpotOptions *SpotOptions - - // The tags for an EC2 Fleet resource. - Tags []Tag - - // The number of units to request. You can choose to set the target capacity in - // terms of instances or a performance characteristic that is important to your - // application workload, such as vCPUs, memory, or I/O. If the request type is - // maintain , you can specify a target capacity of 0 and add capacity later. - TargetCapacitySpecification *TargetCapacitySpecification - - // Indicates whether running instances should be terminated when the EC2 Fleet - // expires. - TerminateInstancesWithExpiration *bool - - // The type of request. Indicates whether the EC2 Fleet only requests the target - // capacity, or also attempts to maintain it. If you request a certain target - // capacity, EC2 Fleet only places the required requests; it does not attempt to - // replenish instances if capacity is diminished, and it does not submit requests - // in alternative capacity pools if capacity is unavailable. To maintain a certain - // target capacity, EC2 Fleet places the required requests to meet this target - // capacity. It also automatically replenishes any interrupted Spot Instances. - // Default: maintain . - Type FleetType - - // The start date and time of the request, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). The default is to start fulfilling the request - // immediately. - ValidFrom *time.Time - - // The end date and time of the request, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). At this point, no new instance requests are placed or - // able to fulfill the request. The default end date is 7 days from the current - // date. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// Describes a launch template and overrides. -type FleetLaunchTemplateConfig struct { - - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []FleetLaunchTemplateOverrides - - noSmithyDocumentSerde -} - -// Describes a launch template and overrides. -type FleetLaunchTemplateConfigRequest struct { - - // The launch template to use. You must specify either the launch template ID or - // launch template name in the request. - LaunchTemplateSpecification *FleetLaunchTemplateSpecificationRequest - - // Any parameters that you specify override the same parameters in the launch - // template. For fleets of type request and maintain , a maximum of 300 items is - // allowed across all launch templates. - Overrides []FleetLaunchTemplateOverridesRequest - - noSmithyDocumentSerde -} - -// Describes overrides for a launch template. -type FleetLaunchTemplateOverrides struct { - - // The Availability Zone in which to launch the instances. - AvailabilityZone *string - - // The ID of the AMI. An AMI is required to launch an instance. This parameter is - // only available for fleets of type instant . For fleets of type maintain and - // request , you must specify the AMI ID in the launch template. - ImageId *string - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirements , you can't specify InstanceType . - InstanceRequirements *InstanceRequirements - - // The instance type. mac1.metal is not supported as a launch template override. - // If you specify InstanceType , you can't specify InstanceRequirements . - InstanceType InstanceType - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - MaxPrice *string - - // The location where the instance launched, if applicable. - Placement *PlacementResponse - - // The priority for the launch template override. The highest priority is launched - // first. If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet - // uses priority to determine which launch template override to use first in - // fulfilling On-Demand capacity. If the Spot AllocationStrategy is set to - // capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis - // to determine which launch template override to use in fulfilling Spot capacity, - // but optimizes for capacity first. Valid values are whole numbers starting at 0 . - // The lower the number, the higher the priority. If no number is set, the override - // has the lowest priority. You can set the same priority for different launch - // template overrides. - Priority *float64 - - // The ID of the subnet in which to launch the instances. - SubnetId *string - - // The number of units provided by the specified instance type. - WeightedCapacity *float64 - - noSmithyDocumentSerde -} - -// Describes overrides for a launch template. -type FleetLaunchTemplateOverridesRequest struct { - - // The Availability Zone in which to launch the instances. - AvailabilityZone *string - - // The ID of the AMI. An AMI is required to launch an instance. This parameter is - // only available for fleets of type instant . For fleets of type maintain and - // request , you must specify the AMI ID in the launch template. - ImageId *string - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirements , you can't specify InstanceType . - InstanceRequirements *InstanceRequirementsRequest - - // The instance type. mac1.metal is not supported as a launch template override. - // If you specify InstanceType , you can't specify InstanceRequirements . - InstanceType InstanceType - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - MaxPrice *string - - // The location where the instance launched, if applicable. - Placement *Placement - - // The priority for the launch template override. The highest priority is launched - // first. If the On-Demand AllocationStrategy is set to prioritized , EC2 Fleet - // uses priority to determine which launch template override to use first in - // fulfilling On-Demand capacity. If the Spot AllocationStrategy is set to - // capacity-optimized-prioritized , EC2 Fleet uses priority on a best-effort basis - // to determine which launch template override to use in fulfilling Spot capacity, - // but optimizes for capacity first. Valid values are whole numbers starting at 0 . - // The lower the number, the higher the priority. If no number is set, the launch - // template override has the lowest priority. You can set the same priority for - // different launch template overrides. - Priority *float64 - - // The IDs of the subnets in which to launch the instances. Separate multiple - // subnet IDs using commas (for example, subnet-1234abcdeexample1, - // subnet-0987cdef6example2 ). A request of type instant can have only one subnet - // ID. - SubnetId *string - - // The number of units provided by the specified instance type. - WeightedCapacity *float64 - - noSmithyDocumentSerde -} - -// The Amazon EC2 launch template that can be used by a Spot Fleet to configure -// Amazon EC2 instances. You must specify either the ID or name of the launch -// template in the request, but not both. For information about launch templates, -// see Launch an instance from a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) -// in the Amazon EC2 User Guide. -type FleetLaunchTemplateSpecification struct { - - // The ID of the launch template. You must specify the LaunchTemplateId or the - // LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify the LaunchTemplateName or the - // LaunchTemplateId , but not both. - LaunchTemplateName *string - - // The launch template version number, $Latest , or $Default . You must specify a - // value, otherwise the request fails. If the value is $Latest , Amazon EC2 uses - // the latest version of the launch template. If the value is $Default , Amazon EC2 - // uses the default version of the launch template. - Version *string - - noSmithyDocumentSerde -} - -// The Amazon EC2 launch template that can be used by an EC2 Fleet to configure -// Amazon EC2 instances. You must specify either the ID or name of the launch -// template in the request, but not both. For information about launch templates, -// see Launch an instance from a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) -// in the Amazon EC2 User Guide. -type FleetLaunchTemplateSpecificationRequest struct { - - // The ID of the launch template. You must specify the LaunchTemplateId or the - // LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify the LaunchTemplateName or the - // LaunchTemplateId , but not both. - LaunchTemplateName *string - - // The launch template version number, $Latest , or $Default . You must specify a - // value, otherwise the request fails. If the value is $Latest , Amazon EC2 uses - // the latest version of the launch template. If the value is $Default , Amazon EC2 - // uses the default version of the launch template. - Version *string - - noSmithyDocumentSerde -} - -// The strategy to use when Amazon EC2 emits a signal that your Spot Instance is -// at an elevated risk of being interrupted. -type FleetSpotCapacityRebalance struct { - - // The replacement strategy to use. Only available for fleets of type maintain . - // launch - EC2 Fleet launches a new replacement Spot Instance when a rebalance - // notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet - // does not terminate the instances that receive a rebalance notification. You can - // terminate the old instances, or you can leave them running. You are charged for - // all instances while they are running. launch-before-terminate - EC2 Fleet - // launches a new replacement Spot Instance when a rebalance notification is - // emitted for an existing Spot Instance in the fleet, and then, after a delay that - // you specify (in TerminationDelay ), terminates the instances that received a - // rebalance notification. - ReplacementStrategy FleetReplacementStrategy - - // The amount of time (in seconds) that Amazon EC2 waits before terminating the - // old Spot Instance after launching a new replacement Spot Instance. Required when - // ReplacementStrategy is set to launch-before-terminate . Not valid when - // ReplacementStrategy is set to launch . Valid values: Minimum value of 120 - // seconds. Maximum value of 7200 seconds. - TerminationDelay *int32 - - noSmithyDocumentSerde -} - -// The Spot Instance replacement strategy to use when Amazon EC2 emits a rebalance -// notification signal that your Spot Instance is at an elevated risk of being -// interrupted. For more information, see Capacity rebalancing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-capacity-rebalance.html) -// in the Amazon EC2 User Guide. -type FleetSpotCapacityRebalanceRequest struct { - - // The replacement strategy to use. Only available for fleets of type maintain . - // launch - EC2 Fleet launches a replacement Spot Instance when a rebalance - // notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet - // does not terminate the instances that receive a rebalance notification. You can - // terminate the old instances, or you can leave them running. You are charged for - // all instances while they are running. launch-before-terminate - EC2 Fleet - // launches a replacement Spot Instance when a rebalance notification is emitted - // for an existing Spot Instance in the fleet, and then, after a delay that you - // specify (in TerminationDelay ), terminates the instances that received a - // rebalance notification. - ReplacementStrategy FleetReplacementStrategy - - // The amount of time (in seconds) that Amazon EC2 waits before terminating the - // old Spot Instance after launching a new replacement Spot Instance. Required when - // ReplacementStrategy is set to launch-before-terminate . Not valid when - // ReplacementStrategy is set to launch . Valid values: Minimum value of 120 - // seconds. Maximum value of 7200 seconds. - TerminationDelay *int32 - - noSmithyDocumentSerde -} - -// The strategies for managing your Spot Instances that are at an elevated risk of -// being interrupted. -type FleetSpotMaintenanceStrategies struct { - - // The strategy to use when Amazon EC2 emits a signal that your Spot Instance is - // at an elevated risk of being interrupted. - CapacityRebalance *FleetSpotCapacityRebalance - - noSmithyDocumentSerde -} - -// The strategies for managing your Spot Instances that are at an elevated risk of -// being interrupted. -type FleetSpotMaintenanceStrategiesRequest struct { - - // The strategy to use when Amazon EC2 emits a signal that your Spot Instance is - // at an elevated risk of being interrupted. - CapacityRebalance *FleetSpotCapacityRebalanceRequest - - noSmithyDocumentSerde -} - -// Describes a flow log. -type FlowLog struct { - - // The date and time the flow log was created. - CreationTime *time.Time - - // The ARN of the IAM role that allows the service to publish flow logs across - // accounts. - DeliverCrossAccountRole *string - - // Information about the error that occurred. Rate limited indicates that - // CloudWatch Logs throttling has been applied for one or more network interfaces, - // or that you've reached the limit on the number of log groups that you can - // create. Access error indicates that the IAM role associated with the flow log - // does not have sufficient permissions to publish to CloudWatch Logs. Unknown - // error indicates an internal error. - DeliverLogsErrorMessage *string - - // The ARN of the IAM role allows the service to publish logs to CloudWatch Logs. - DeliverLogsPermissionArn *string - - // The status of the logs delivery ( SUCCESS | FAILED ). - DeliverLogsStatus *string - - // The destination options. - DestinationOptions *DestinationOptionsResponse - - // The ID of the flow log. - FlowLogId *string - - // The status of the flow log ( ACTIVE ). - FlowLogStatus *string - - // The Amazon Resource Name (ARN) of the destination for the flow log data. - LogDestination *string - - // The type of destination for the flow log data. - LogDestinationType LogDestinationType - - // The format of the flow log record. - LogFormat *string - - // The name of the flow log group. - LogGroupName *string - - // The maximum interval of time, in seconds, during which a flow of packets is - // captured and aggregated into a flow log record. When a network interface is - // attached to a Nitro-based instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // , the aggregation interval is always 60 seconds (1 minute) or less, regardless - // of the specified value. Valid Values: 60 | 600 - MaxAggregationInterval *int32 - - // The ID of the resource being monitored. - ResourceId *string - - // The tags for the flow log. - Tags []Tag - - // The type of traffic captured for the flow log. - TrafficType TrafficType - - noSmithyDocumentSerde -} - -// Describes the FPGA accelerator for the instance type. -type FpgaDeviceInfo struct { - - // The count of FPGA accelerators for the instance type. - Count *int32 - - // The manufacturer of the FPGA accelerator. - Manufacturer *string - - // Describes the memory for the FPGA accelerator for the instance type. - MemoryInfo *FpgaDeviceMemoryInfo - - // The name of the FPGA accelerator. - Name *string - - noSmithyDocumentSerde -} - -// Describes the memory for the FPGA accelerator for the instance type. -type FpgaDeviceMemoryInfo struct { - - // The size of the memory available to the FPGA accelerator, in MiB. - SizeInMiB *int32 - - noSmithyDocumentSerde -} - -// Describes an Amazon FPGA image (AFI). -type FpgaImage struct { - - // The date and time the AFI was created. - CreateTime *time.Time - - // Indicates whether data retention support is enabled for the AFI. - DataRetentionSupport *bool - - // The description of the AFI. - Description *string - - // The global FPGA image identifier (AGFI ID). - FpgaImageGlobalId *string - - // The FPGA image identifier (AFI ID). - FpgaImageId *string - - // The instance types supported by the AFI. - InstanceTypes []string - - // The name of the AFI. - Name *string - - // The alias of the AFI owner. Possible values include self , amazon , and - // aws-marketplace . - OwnerAlias *string - - // The ID of the Amazon Web Services account that owns the AFI. - OwnerId *string - - // Information about the PCI bus. - PciId *PciId - - // The product codes for the AFI. - ProductCodes []ProductCode - - // Indicates whether the AFI is public. - Public *bool - - // The version of the Amazon Web Services Shell that was used to create the - // bitstream. - ShellVersion *string - - // Information about the state of the AFI. - State *FpgaImageState - - // Any tags assigned to the AFI. - Tags []Tag - - // The time of the most recent update to the AFI. - UpdateTime *time.Time - - noSmithyDocumentSerde -} - -// Describes an Amazon FPGA image (AFI) attribute. -type FpgaImageAttribute struct { - - // The description of the AFI. - Description *string - - // The ID of the AFI. - FpgaImageId *string - - // The load permissions. - LoadPermissions []LoadPermission - - // The name of the AFI. - Name *string - - // The product codes. - ProductCodes []ProductCode - - noSmithyDocumentSerde -} - -// Describes the state of the bitstream generation process for an Amazon FPGA -// image (AFI). -type FpgaImageState struct { - - // The state. The following are the possible values: - // - pending - AFI bitstream generation is in progress. - // - available - The AFI is available for use. - // - failed - AFI bitstream generation failed. - // - unavailable - The AFI is no longer available for use. - Code FpgaImageStateCode - - // If the state is failed , this is the error message. - Message *string - - noSmithyDocumentSerde -} - -// Describes the FPGAs for the instance type. -type FpgaInfo struct { - - // Describes the FPGAs for the instance type. - Fpgas []FpgaDeviceInfo - - // The total memory of all FPGA accelerators for the instance type. - TotalFpgaMemoryInMiB *int32 - - noSmithyDocumentSerde -} - -// Describes the GPU accelerators for the instance type. -type GpuDeviceInfo struct { - - // The number of GPUs for the instance type. - Count *int32 - - // The manufacturer of the GPU accelerator. - Manufacturer *string - - // Describes the memory available to the GPU accelerator. - MemoryInfo *GpuDeviceMemoryInfo - - // The name of the GPU accelerator. - Name *string - - noSmithyDocumentSerde -} - -// Describes the memory available to the GPU accelerator. -type GpuDeviceMemoryInfo struct { - - // The size of the memory available to the GPU accelerator, in MiB. - SizeInMiB *int32 - - noSmithyDocumentSerde -} - -// Describes the GPU accelerators for the instance type. -type GpuInfo struct { - - // Describes the GPU accelerators for the instance type. - Gpus []GpuDeviceInfo - - // The total size of the memory for the GPU accelerators for the instance type, in - // MiB. - TotalGpuMemoryInMiB *int32 - - noSmithyDocumentSerde -} - -// Describes a security group. -type GroupIdentifier struct { - - // The ID of the security group. - GroupId *string - - // The name of the security group. - GroupName *string - - noSmithyDocumentSerde -} - -// Indicates whether your instance is configured for hibernation. This parameter -// is valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html) -// . For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon EC2 User Guide. -type HibernationOptions struct { - - // If true , your instance is enabled for hibernation; otherwise, it is not enabled - // for hibernation. - Configured *bool - - noSmithyDocumentSerde -} - -// Indicates whether your instance is configured for hibernation. This parameter -// is valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html) -// . For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon EC2 User Guide. -type HibernationOptionsRequest struct { - - // Set to true to enable your instance for hibernation. For Spot Instances, if you - // set Configured to true , either omit the InstanceInterruptionBehavior parameter - // (for SpotMarketOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotMarketOptions.html) - // ), or set it to hibernate . When Configured is true: - // - If you omit InstanceInterruptionBehavior , it defaults to hibernate . - // - If you set InstanceInterruptionBehavior to a value other than hibernate , - // you'll get an error. - // Default: false - Configured *bool - - noSmithyDocumentSerde -} - -// Describes an event in the history of the Spot Fleet request. -type HistoryRecord struct { - - // Information about the event. - EventInformation *EventInformation - - // The event type. - // - error - An error with the Spot Fleet request. - // - fleetRequestChange - A change in the status or configuration of the Spot - // Fleet request. - // - instanceChange - An instance was launched or terminated. - // - Information - An informational event. - EventType EventType - - // The date and time of the event, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time - - noSmithyDocumentSerde -} - -// Describes an event in the history of an EC2 Fleet. -type HistoryRecordEntry struct { - - // Information about the event. - EventInformation *EventInformation - - // The event type. - EventType FleetEventType - - // The date and time of the event, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time - - noSmithyDocumentSerde -} - -// Describes the properties of the Dedicated Host. -type Host struct { - - // The time that the Dedicated Host was allocated. - AllocationTime *time.Time - - // Indicates whether the Dedicated Host supports multiple instance types of the - // same instance family. If the value is on , the Dedicated Host supports multiple - // instance types in the instance family. If the value is off , the Dedicated Host - // supports a single instance type only. - AllowsMultipleInstanceTypes AllowsMultipleInstanceTypes - - // The ID of the Outpost hardware asset on which the Dedicated Host is allocated. - AssetId *string - - // Whether auto-placement is on or off. - AutoPlacement AutoPlacement - - // The Availability Zone of the Dedicated Host. - AvailabilityZone *string - - // The ID of the Availability Zone in which the Dedicated Host is allocated. - AvailabilityZoneId *string - - // Information about the instances running on the Dedicated Host. - AvailableCapacity *AvailableCapacity - - // Unique, case-sensitive identifier that you provide to ensure the idempotency of - // the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The ID of the Dedicated Host. - HostId *string - - // Indicates whether host maintenance is enabled or disabled for the Dedicated - // Host. - HostMaintenance HostMaintenance - - // The hardware specifications of the Dedicated Host. - HostProperties *HostProperties - - // Indicates whether host recovery is enabled or disabled for the Dedicated Host. - HostRecovery HostRecovery - - // The reservation ID of the Dedicated Host. This returns a null response if the - // Dedicated Host doesn't have an associated reservation. - HostReservationId *string - - // The IDs and instance type that are currently running on the Dedicated Host. - Instances []HostInstance - - // Indicates whether the Dedicated Host is in a host resource group. If - // memberOfServiceLinkedResourceGroup is true , the host is in a host resource - // group; otherwise, it is not. - MemberOfServiceLinkedResourceGroup *bool - - // The Amazon Resource Name (ARN) of the Amazon Web Services Outpost on which the - // Dedicated Host is allocated. - OutpostArn *string - - // The ID of the Amazon Web Services account that owns the Dedicated Host. - OwnerId *string - - // The time that the Dedicated Host was released. - ReleaseTime *time.Time - - // The Dedicated Host's state. - State AllocationState - - // Any tags assigned to the Dedicated Host. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an instance running on a Dedicated Host. -type HostInstance struct { - - // The ID of instance that is running on the Dedicated Host. - InstanceId *string - - // The instance type (for example, m3.medium ) of the running instance. - InstanceType *string - - // The ID of the Amazon Web Services account that owns the instance. - OwnerId *string - - noSmithyDocumentSerde -} - -// Details about the Dedicated Host Reservation offering. -type HostOffering struct { - - // The currency of the offering. - CurrencyCode CurrencyCodeValues - - // The duration of the offering (in seconds). - Duration *int32 - - // The hourly price of the offering. - HourlyPrice *string - - // The instance family of the offering. - InstanceFamily *string - - // The ID of the offering. - OfferingId *string - - // The available payment option. - PaymentOption PaymentOption - - // The upfront price of the offering. Does not apply to No Upfront offerings. - UpfrontPrice *string - - noSmithyDocumentSerde -} - -// Describes the properties of a Dedicated Host. -type HostProperties struct { - - // The number of cores on the Dedicated Host. - Cores *int32 - - // The instance family supported by the Dedicated Host. For example, m5 . - InstanceFamily *string - - // The instance type supported by the Dedicated Host. For example, m5.large . If - // the host supports multiple instance types, no instanceType is returned. - InstanceType *string - - // The number of sockets on the Dedicated Host. - Sockets *int32 - - // The total number of vCPUs on the Dedicated Host. - TotalVCpus *int32 - - noSmithyDocumentSerde -} - -// Details about the Dedicated Host Reservation and associated Dedicated Hosts. -type HostReservation struct { - - // The number of Dedicated Hosts the reservation is associated with. - Count *int32 - - // The currency in which the upfrontPrice and hourlyPrice amounts are specified. - // At this time, the only supported currency is USD . - CurrencyCode CurrencyCodeValues - - // The length of the reservation's term, specified in seconds. Can be 31536000 (1 - // year) | 94608000 (3 years) . - Duration *int32 - - // The date and time that the reservation ends. - End *time.Time - - // The IDs of the Dedicated Hosts associated with the reservation. - HostIdSet []string - - // The ID of the reservation that specifies the associated Dedicated Hosts. - HostReservationId *string - - // The hourly price of the reservation. - HourlyPrice *string - - // The instance family of the Dedicated Host Reservation. The instance family on - // the Dedicated Host must be the same in order for it to benefit from the - // reservation. - InstanceFamily *string - - // The ID of the reservation. This remains the same regardless of which Dedicated - // Hosts are associated with it. - OfferingId *string - - // The payment option selected for this reservation. - PaymentOption PaymentOption - - // The date and time that the reservation started. - Start *time.Time - - // The state of the reservation. - State ReservationState - - // Any tags assigned to the Dedicated Host Reservation. - Tags []Tag - - // The upfront price of the reservation. - UpfrontPrice *string - - noSmithyDocumentSerde -} - -// Describes an IAM instance profile. -type IamInstanceProfile struct { - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string - - // The ID of the instance profile. - Id *string - - noSmithyDocumentSerde -} - -// Describes an association between an IAM instance profile and an instance. -type IamInstanceProfileAssociation struct { - - // The ID of the association. - AssociationId *string - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfile - - // The ID of the instance. - InstanceId *string - - // The state of the association. - State IamInstanceProfileAssociationState - - // The time the IAM instance profile was associated with the instance. - Timestamp *time.Time - - noSmithyDocumentSerde -} - -// Describes an IAM instance profile. -type IamInstanceProfileSpecification struct { - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string - - // The name of the instance profile. - Name *string - - noSmithyDocumentSerde -} - -// Describes the ICMP type and code. -type IcmpTypeCode struct { - - // The ICMP code. A value of -1 means all codes for the specified ICMP type. - Code *int32 - - // The ICMP type. A value of -1 means all types. - Type *int32 - - noSmithyDocumentSerde -} - -// Describes the ID format for a resource. -type IdFormat struct { - - // The date in UTC at which you are permanently switched over to using longer IDs. - // If a deadline is not yet available for this resource type, this field is not - // returned. - Deadline *time.Time - - // The type of resource. - Resource *string - - // Indicates whether longer IDs (17-character IDs) are enabled for the resource. - UseLongIds *bool - - noSmithyDocumentSerde -} - -// The internet key exchange (IKE) version permitted for the VPN tunnel. -type IKEVersionsListValue struct { - - // The IKE version. - Value *string - - noSmithyDocumentSerde -} - -// The IKE version that is permitted for the VPN tunnel. -type IKEVersionsRequestListValue struct { - - // The IKE version. - Value *string - - noSmithyDocumentSerde -} - -// Describes an image. -type Image struct { - - // The architecture of the image. - Architecture ArchitectureValues - - // Any block device mapping entries. - BlockDeviceMappings []BlockDeviceMapping - - // The boot mode of the image. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) - // in the Amazon EC2 User Guide. - BootMode BootModeValues - - // The date and time the image was created. - CreationDate *string - - // The date and time to deprecate the AMI, in UTC, in the following format: - // YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds - // the seconds to the nearest minute. - DeprecationTime *string - - // The description of the AMI that was provided during image creation. - Description *string - - // Specifies whether enhanced networking with ENA is enabled. - EnaSupport *bool - - // The hypervisor type of the image. Only xen is supported. ovm is not supported. - Hypervisor HypervisorType - - // The ID of the AMI. - ImageId *string - - // The location of the AMI. - ImageLocation *string - - // The Amazon Web Services account alias (for example, amazon , self ) or the - // Amazon Web Services account ID of the AMI owner. - ImageOwnerAlias *string - - // The type of image. - ImageType ImageTypeValues - - // If v2.0 , it indicates that IMDSv2 is specified in the AMI. Instances launched - // from this AMI will have HttpTokens automatically set to required so that, by - // default, the instance requires that IMDSv2 is used when requesting instance - // metadata. In addition, HttpPutResponseHopLimit is set to 2 . For more - // information, see Configure the AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration) - // in the Amazon EC2 User Guide. - ImdsSupport ImdsSupportValues - - // The kernel associated with the image, if any. Only applicable for machine - // images. - KernelId *string - - // The name of the AMI that was provided during image creation. - Name *string - - // The ID of the Amazon Web Services account that owns the image. - OwnerId *string - - // This value is set to windows for Windows AMIs; otherwise, it is blank. - Platform PlatformValues - - // The platform details associated with the billing code of the AMI. For more - // information, see Understand AMI billing information (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html) - // in the Amazon EC2 User Guide. - PlatformDetails *string - - // Any product codes associated with the AMI. - ProductCodes []ProductCode - - // Indicates whether the image has public launch permissions. The value is true if - // this image has public launch permissions or false if it has only implicit and - // explicit launch permissions. - Public *bool - - // The RAM disk associated with the image, if any. Only applicable for machine - // images. - RamdiskId *string - - // The device name of the root device volume (for example, /dev/sda1 ). - RootDeviceName *string - - // The type of root device used by the AMI. The AMI can use an Amazon EBS volume - // or an instance store volume. - RootDeviceType DeviceType - - // The ID of the instance that the AMI was created from if the AMI was created - // using CreateImage (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateImage.html) - // . This field only appears if the AMI was created using CreateImage. - SourceInstanceId *string - - // Specifies whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *string - - // The current state of the AMI. If the state is available , the image is - // successfully registered and can be used to launch an instance. - State ImageState - - // The reason for the state change. - StateReason *StateReason - - // Any tags assigned to the image. - Tags []Tag - - // If the image is configured for NitroTPM support, the value is v2.0 . For more - // information, see NitroTPM (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) - // in the Amazon EC2 User Guide. - TpmSupport TpmSupportValues - - // The operation of the Amazon EC2 instance and the billing code that is - // associated with the AMI. usageOperation corresponds to the lineitem/Operation (https://docs.aws.amazon.com/cur/latest/userguide/Lineitem-columns.html#Lineitem-details-O-Operation) - // column on your Amazon Web Services Cost and Usage Report and in the Amazon Web - // Services Price List API (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/price-changes.html) - // . You can view these fields on the Instances or AMIs pages in the Amazon EC2 - // console, or in the responses that are returned by the DescribeImages (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeImages.html) - // command in the Amazon EC2 API, or the describe-images (https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html) - // command in the CLI. - UsageOperation *string - - // The type of virtualization of the AMI. - VirtualizationType VirtualizationType - - noSmithyDocumentSerde -} - -// Describes the disk container object for an import image task. -type ImageDiskContainer struct { - - // The description of the disk image. - Description *string - - // The block device mapping for the disk. - DeviceName *string - - // The format of the disk image being imported. Valid values: OVA | VHD | VHDX | - // VMDK | RAW - Format *string - - // The ID of the EBS snapshot to be used for importing the snapshot. - SnapshotId *string - - // The URL to the Amazon S3-based disk image being imported. The URL can either be - // a https URL (https://..) or an Amazon S3 URL (s3://..) - Url *string - - // The S3 bucket for the disk image. - UserBucket *UserBucket - - noSmithyDocumentSerde -} - -// Information about an AMI that is currently in the Recycle Bin. -type ImageRecycleBinInfo struct { - - // The description of the AMI. - Description *string - - // The ID of the AMI. - ImageId *string - - // The name of the AMI. - Name *string - - // The date and time when the AMI entered the Recycle Bin. - RecycleBinEnterTime *time.Time - - // The date and time when the AMI is to be permanently deleted from the Recycle - // Bin. - RecycleBinExitTime *time.Time - - noSmithyDocumentSerde -} - -// The request information of license configurations. -type ImportImageLicenseConfigurationRequest struct { - - // The ARN of a license configuration. - LicenseConfigurationArn *string - - noSmithyDocumentSerde -} - -// The response information for license configurations. -type ImportImageLicenseConfigurationResponse struct { - - // The ARN of a license configuration. - LicenseConfigurationArn *string - - noSmithyDocumentSerde -} - -// Describes an import image task. -type ImportImageTask struct { - - // The architecture of the virtual machine. Valid values: i386 | x86_64 | arm64 - Architecture *string - - // The boot mode of the virtual machine. - BootMode BootModeValues - - // A description of the import task. - Description *string - - // Indicates whether the image is encrypted. - Encrypted *bool - - // The target hypervisor for the import task. Valid values: xen - Hypervisor *string - - // The ID of the Amazon Machine Image (AMI) of the imported virtual machine. - ImageId *string - - // The ID of the import image task. - ImportTaskId *string - - // The identifier for the KMS key that was used to create the encrypted image. - KmsKeyId *string - - // The ARNs of the license configurations that are associated with the import - // image task. - LicenseSpecifications []ImportImageLicenseConfigurationResponse - - // The license type of the virtual machine. - LicenseType *string - - // The description string for the import image task. - Platform *string - - // The percentage of progress of the import image task. - Progress *string - - // Information about the snapshots. - SnapshotDetails []SnapshotDetail - - // A brief status for the import image task. - Status *string - - // A descriptive status message for the import image task. - StatusMessage *string - - // The tags for the import image task. - Tags []Tag - - // The usage operation value. - UsageOperation *string - - noSmithyDocumentSerde -} - -// Describes the launch specification for VM import. -type ImportInstanceLaunchSpecification struct { - - // Reserved. - AdditionalInfo *string - - // The architecture of the instance. - Architecture ArchitectureValues - - // The security group IDs. - GroupIds []string - - // The security group names. - GroupNames []string - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior ShutdownBehavior - - // The instance type. For more information about the instance types that you can - // import, see Instance Types (https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-instance-types) - // in the VM Import/Export User Guide. - InstanceType InstanceType - - // Indicates whether monitoring is enabled. - Monitoring *bool - - // The placement information for the instance. - Placement *Placement - - // [EC2-VPC] An available IP address from the IP address range of the subnet. - PrivateIpAddress *string - - // [EC2-VPC] The ID of the subnet in which to launch the instance. - SubnetId *string - - // The Base64-encoded user data to make available to the instance. - UserData *UserData - - noSmithyDocumentSerde -} - -// Describes an import instance task. -type ImportInstanceTaskDetails struct { - - // A description of the task. - Description *string - - // The ID of the instance. - InstanceId *string - - // The instance operating system. - Platform PlatformValues - - // The volumes. - Volumes []ImportInstanceVolumeDetailItem - - noSmithyDocumentSerde -} - -// Describes an import volume task. -type ImportInstanceVolumeDetailItem struct { - - // The Availability Zone where the resulting instance will reside. - AvailabilityZone *string - - // The number of bytes converted so far. - BytesConverted *int64 - - // A description of the task. - Description *string - - // The image. - Image *DiskImageDescription - - // The status of the import of this particular disk image. - Status *string - - // The status information or errors related to the disk image. - StatusMessage *string - - // The volume. - Volume *DiskImageVolumeDescription - - noSmithyDocumentSerde -} - -// Describes an import snapshot task. -type ImportSnapshotTask struct { - - // A description of the import snapshot task. - Description *string - - // The ID of the import snapshot task. - ImportTaskId *string - - // Describes an import snapshot task. - SnapshotTaskDetail *SnapshotTaskDetail - - // The tags for the import snapshot task. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an import volume task. -type ImportVolumeTaskDetails struct { - - // The Availability Zone where the resulting volume will reside. - AvailabilityZone *string - - // The number of bytes converted so far. - BytesConverted *int64 - - // The description you provided when starting the import volume task. - Description *string - - // The image. - Image *DiskImageDescription - - // The volume. - Volume *DiskImageVolumeDescription - - noSmithyDocumentSerde -} - -// Describes the Inference accelerators for the instance type. -type InferenceAcceleratorInfo struct { - - // Describes the Inference accelerators for the instance type. - Accelerators []InferenceDeviceInfo - - // The total size of the memory for the inference accelerators for the instance - // type, in MiB. - TotalInferenceMemoryInMiB *int32 - - noSmithyDocumentSerde -} - -// Describes the Inference accelerators for the instance type. -type InferenceDeviceInfo struct { - - // The number of Inference accelerators for the instance type. - Count *int32 - - // The manufacturer of the Inference accelerator. - Manufacturer *string - - // Describes the memory available to the inference accelerator. - MemoryInfo *InferenceDeviceMemoryInfo - - // The name of the Inference accelerator. - Name *string - - noSmithyDocumentSerde -} - -// Describes the memory available to the inference accelerator. -type InferenceDeviceMemoryInfo struct { - - // The size of the memory available to the inference accelerator, in MiB. - SizeInMiB *int32 - - noSmithyDocumentSerde -} - -// Describes an instance. -type Instance struct { - - // The AMI launch index, which can be used to find this instance in the launch - // group. - AmiLaunchIndex *int32 - - // The architecture of the image. - Architecture ArchitectureValues - - // Any block device mapping entries for the instance. - BlockDeviceMappings []InstanceBlockDeviceMapping - - // The boot mode that was specified by the AMI. If the value is uefi-preferred , - // the AMI supports both UEFI and Legacy BIOS. The currentInstanceBootMode - // parameter is the boot mode that is used to boot the instance at launch or start. - // The operating system contained in the AMI must be configured to support the - // specified boot mode. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) - // in the Amazon EC2 User Guide. - BootMode BootModeValues - - // The ID of the Capacity Reservation. - CapacityReservationId *string - - // Information about the Capacity Reservation targeting option. - CapacityReservationSpecification *CapacityReservationSpecificationResponse - - // The idempotency token you provided when you launched the instance, if - // applicable. - ClientToken *string - - // The CPU options for the instance. - CpuOptions *CpuOptions - - // The boot mode that is used to boot the instance at launch or start. For more - // information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) - // in the Amazon EC2 User Guide. - CurrentInstanceBootMode InstanceBootModeValues - - // Indicates whether the instance is optimized for Amazon EBS I/O. This - // optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal I/O performance. This optimization isn't - // available with all instance types. Additional usage charges apply when using an - // EBS Optimized instance. - EbsOptimized *bool - - // Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. For - // workloads that require graphics acceleration, we recommend that you use Amazon - // EC2 G4ad, G4dn, or G5 instances. - ElasticGpuAssociations []ElasticGpuAssociation - - // The elastic inference accelerator associated with the instance. - ElasticInferenceAcceleratorAssociations []ElasticInferenceAcceleratorAssociation - - // Specifies whether enhanced networking with ENA is enabled. - EnaSupport *bool - - // Indicates whether the instance is enabled for Amazon Web Services Nitro - // Enclaves. - EnclaveOptions *EnclaveOptions - - // Indicates whether the instance is enabled for hibernation. - HibernationOptions *HibernationOptions - - // The hypervisor type of the instance. The value xen is used for both Xen and - // Nitro hypervisors. - Hypervisor HypervisorType - - // The IAM instance profile associated with the instance, if applicable. - IamInstanceProfile *IamInstanceProfile - - // The ID of the AMI used to launch the instance. - ImageId *string - - // The ID of the instance. - InstanceId *string - - // Indicates whether this is a Spot Instance or a Scheduled Instance. - InstanceLifecycle InstanceLifecycleType - - // The instance type. - InstanceType InstanceType - - // The IPv6 address assigned to the instance. - Ipv6Address *string - - // The kernel associated with this instance, if applicable. - KernelId *string - - // The name of the key pair, if this instance was launched with an associated key - // pair. - KeyName *string - - // The time the instance was launched. - LaunchTime *time.Time - - // The license configurations for the instance. - Licenses []LicenseConfiguration - - // Provides information on the recovery and maintenance options of your instance. - MaintenanceOptions *InstanceMaintenanceOptions - - // The metadata options for the instance. - MetadataOptions *InstanceMetadataOptionsResponse - - // The monitoring for the instance. - Monitoring *Monitoring - - // The network interfaces for the instance. - NetworkInterfaces []InstanceNetworkInterface - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The location where the instance launched, if applicable. - Placement *Placement - - // The platform. This value is windows for Windows instances; otherwise, it is - // empty. - Platform PlatformValues - - // The platform details value for the instance. For more information, see AMI - // billing information fields (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html) - // in the Amazon EC2 User Guide. - PlatformDetails *string - - // [IPv4 only] The private DNS hostname name assigned to the instance. This DNS - // hostname can only be used inside the Amazon EC2 network. This name is not - // available until the instance enters the running state. The Amazon-provided DNS - // server resolves Amazon-provided private DNS hostnames if you've enabled DNS - // resolution and DNS hostnames in your VPC. If you are not using the - // Amazon-provided DNS server in your VPC, your custom domain name servers must - // resolve the hostname as appropriate. - PrivateDnsName *string - - // The options for the instance hostname. - PrivateDnsNameOptions *PrivateDnsNameOptionsResponse - - // The private IPv4 address assigned to the instance. - PrivateIpAddress *string - - // The product codes attached to this instance, if applicable. - ProductCodes []ProductCode - - // [IPv4 only] The public DNS name assigned to the instance. This name is not - // available until the instance enters the running state. This name is only - // available if you've enabled DNS hostnames for your VPC. - PublicDnsName *string - - // The public IPv4 address, or the Carrier IP address assigned to the instance, if - // applicable. A Carrier IP address only applies to an instance launched in a - // subnet associated with a Wavelength Zone. - PublicIpAddress *string - - // The RAM disk associated with this instance, if applicable. - RamdiskId *string - - // The device name of the root device volume (for example, /dev/sda1 ). - RootDeviceName *string - - // The root device type used by the AMI. The AMI can use an EBS volume or an - // instance store volume. - RootDeviceType DeviceType - - // The security groups for the instance. - SecurityGroups []GroupIdentifier - - // Indicates whether source/destination checking is enabled. - SourceDestCheck *bool - - // If the request is a Spot Instance request, the ID of the request. - SpotInstanceRequestId *string - - // Specifies whether enhanced networking with the Intel 82599 Virtual Function - // interface is enabled. - SriovNetSupport *string - - // The current state of the instance. - State *InstanceState - - // The reason for the most recent state transition. - StateReason *StateReason - - // The reason for the most recent state transition. This might be an empty string. - StateTransitionReason *string - - // The ID of the subnet in which the instance is running. - SubnetId *string - - // Any tags assigned to the instance. - Tags []Tag - - // If the instance is configured for NitroTPM support, the value is v2.0 . For more - // information, see NitroTPM (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitrotpm.html) - // in the Amazon EC2 User Guide. - TpmSupport *string - - // The usage operation value for the instance. For more information, see AMI - // billing information fields (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/billing-info-fields.html) - // in the Amazon EC2 User Guide. - UsageOperation *string - - // The time that the usage operation was last updated. - UsageOperationUpdateTime *time.Time - - // The virtualization type of the instance. - VirtualizationType VirtualizationType - - // The ID of the VPC in which the instance is running. - VpcId *string - - noSmithyDocumentSerde -} - -// ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) -// technology to increase the maximum bandwidth used per stream and minimize tail -// latency of network traffic between EC2 instances. With ENA Express, you can -// communicate between two EC2 instances in the same subnet within the same -// account, or in different accounts. Both sending and receiving instances must -// have ENA Express enabled. To improve the reliability of network packet delivery, -// ENA Express reorders network packets on the receiving end by default. However, -// some UDP-based applications are designed to handle network packets that are out -// of order to reduce the overhead for packet delivery at the network layer. When -// ENA Express is enabled, you can specify whether UDP network traffic uses it. -type InstanceAttachmentEnaSrdSpecification struct { - - // Indicates whether ENA Express is enabled for the network interface. - EnaSrdEnabled *bool - - // Configures ENA Express for UDP network traffic. - EnaSrdUdpSpecification *InstanceAttachmentEnaSrdUdpSpecification - - noSmithyDocumentSerde -} - -// ENA Express is compatible with both TCP and UDP transport protocols. When it's -// enabled, TCP traffic automatically uses it. However, some UDP-based applications -// are designed to handle network packets that are out of order, without a need for -// retransmission, such as live video broadcasting or other near-real-time -// applications. For UDP traffic, you can specify whether to use ENA Express, based -// on your application environment needs. -type InstanceAttachmentEnaSrdUdpSpecification struct { - - // Indicates whether UDP traffic to and from the instance uses ENA Express. To - // specify this setting, you must first enable ENA Express. - EnaSrdUdpEnabled *bool - - noSmithyDocumentSerde -} - -// Describes a block device mapping. -type InstanceBlockDeviceMapping struct { - - // The device name (for example, /dev/sdh or xvdh ). - DeviceName *string - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsInstanceBlockDevice - - noSmithyDocumentSerde -} - -// Describes a block device mapping entry. -type InstanceBlockDeviceMappingSpecification struct { - - // The device name (for example, /dev/sdh or xvdh ). - DeviceName *string - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *EbsInstanceBlockDeviceSpecification - - // suppress the specified device included in the block device mapping. - NoDevice *string - - // The virtual device name. - VirtualName *string - - noSmithyDocumentSerde -} - -// Information about the number of instances that can be launched onto the -// Dedicated Host. -type InstanceCapacity struct { - - // The number of instances that can be launched onto the Dedicated Host based on - // the host's available capacity. - AvailableCapacity *int32 - - // The instance type supported by the Dedicated Host. - InstanceType *string - - // The total number of instances that can be launched onto the Dedicated Host if - // there are no instances running on it. - TotalCapacity *int32 - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance listing state. -type InstanceCount struct { - - // The number of listed Reserved Instances in the state specified by the state . - InstanceCount *int32 - - // The states of the listed Reserved Instances. - State ListingState - - noSmithyDocumentSerde -} - -// Describes the credit option for CPU usage of a burstable performance instance. -type InstanceCreditSpecification struct { - - // The credit option for CPU usage of the instance. Valid values: standard | - // unlimited - CpuCredits *string - - // The ID of the instance. - InstanceId *string - - noSmithyDocumentSerde -} - -// Describes the credit option for CPU usage of a burstable performance instance. -type InstanceCreditSpecificationRequest struct { - - // The ID of the instance. - // - // This member is required. - InstanceId *string - - // The credit option for CPU usage of the instance. Valid values: standard | - // unlimited T3 instances with host tenancy do not support the unlimited CPU - // credit option. - CpuCredits *string - - noSmithyDocumentSerde -} - -// The event window. -type InstanceEventWindow struct { - - // One or more targets associated with the event window. - AssociationTarget *InstanceEventWindowAssociationTarget - - // The cron expression defined for the event window. - CronExpression *string - - // The ID of the event window. - InstanceEventWindowId *string - - // The name of the event window. - Name *string - - // The current state of the event window. - State InstanceEventWindowState - - // The instance tags associated with the event window. - Tags []Tag - - // One or more time ranges defined for the event window. - TimeRanges []InstanceEventWindowTimeRange - - noSmithyDocumentSerde -} - -// One or more targets associated with the specified event window. Only one type -// of target (instance ID, instance tag, or Dedicated Host ID) can be associated -// with an event window. -type InstanceEventWindowAssociationRequest struct { - - // The IDs of the Dedicated Hosts to associate with the event window. - DedicatedHostIds []string - - // The IDs of the instances to associate with the event window. If the instance is - // on a Dedicated Host, you can't specify the Instance ID parameter; you must use - // the Dedicated Host ID parameter. - InstanceIds []string - - // The instance tags to associate with the event window. Any instances associated - // with the tags will be associated with the event window. - InstanceTags []Tag - - noSmithyDocumentSerde -} - -// One or more targets associated with the event window. -type InstanceEventWindowAssociationTarget struct { - - // The IDs of the Dedicated Hosts associated with the event window. - DedicatedHostIds []string - - // The IDs of the instances associated with the event window. - InstanceIds []string - - // The instance tags associated with the event window. Any instances associated - // with the tags will be associated with the event window. - Tags []Tag - - noSmithyDocumentSerde -} - -// The targets to disassociate from the specified event window. -type InstanceEventWindowDisassociationRequest struct { - - // The IDs of the Dedicated Hosts to disassociate from the event window. - DedicatedHostIds []string - - // The IDs of the instances to disassociate from the event window. - InstanceIds []string - - // The instance tags to disassociate from the event window. Any instances - // associated with the tags will be disassociated from the event window. - InstanceTags []Tag - - noSmithyDocumentSerde -} - -// The state of the event window. -type InstanceEventWindowStateChange struct { - - // The ID of the event window. - InstanceEventWindowId *string - - // The current state of the event window. - State InstanceEventWindowState - - noSmithyDocumentSerde -} - -// The start day and time and the end day and time of the time range, in UTC. -type InstanceEventWindowTimeRange struct { - - // The hour when the time range ends. - EndHour *int32 - - // The day on which the time range ends. - EndWeekDay WeekDay - - // The hour when the time range begins. - StartHour *int32 - - // The day on which the time range begins. - StartWeekDay WeekDay - - noSmithyDocumentSerde -} - -// The start day and time and the end day and time of the time range, in UTC. -type InstanceEventWindowTimeRangeRequest struct { - - // The hour when the time range ends. - EndHour *int32 - - // The day on which the time range ends. - EndWeekDay WeekDay - - // The hour when the time range begins. - StartHour *int32 - - // The day on which the time range begins. - StartWeekDay WeekDay - - noSmithyDocumentSerde -} - -// Describes an instance to export. -type InstanceExportDetails struct { - - // The ID of the resource being exported. - InstanceId *string - - // The target virtualization environment. - TargetEnvironment ExportEnvironment - - noSmithyDocumentSerde -} - -// Describes the default credit option for CPU usage of a burstable performance -// instance family. -type InstanceFamilyCreditSpecification struct { - - // The default credit option for CPU usage of the instance family. Valid values - // are standard and unlimited . - CpuCredits *string - - // The instance family. - InstanceFamily UnlimitedSupportedInstanceFamily - - noSmithyDocumentSerde -} - -// Information about an IPv4 prefix. -type InstanceIpv4Prefix struct { - - // One or more IPv4 prefixes assigned to the network interface. - Ipv4Prefix *string - - noSmithyDocumentSerde -} - -// Describes an IPv6 address. -type InstanceIpv6Address struct { - - // The IPv6 address. - Ipv6Address *string - - // Determines if an IPv6 address associated with a network interface is the - // primary IPv6 address. When you enable an IPv6 GUA address to be a primary IPv6, - // the first IPv6 GUA will be made the primary IPv6 address until the instance is - // terminated or the network interface is detached. For more information, see - // RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // . - IsPrimaryIpv6 *bool - - noSmithyDocumentSerde -} - -// Describes an IPv6 address. -type InstanceIpv6AddressRequest struct { - - // The IPv6 address. - Ipv6Address *string - - noSmithyDocumentSerde -} - -// Information about an IPv6 prefix. -type InstanceIpv6Prefix struct { - - // One or more IPv6 prefixes assigned to the network interface. - Ipv6Prefix *string - - noSmithyDocumentSerde -} - -// The maintenance options for the instance. -type InstanceMaintenanceOptions struct { - - // Provides information on the current automatic recovery behavior of your - // instance. - AutoRecovery InstanceAutoRecoveryState - - noSmithyDocumentSerde -} - -// The maintenance options for the instance. -type InstanceMaintenanceOptionsRequest struct { - - // Disables the automatic recovery behavior of your instance or sets it to - // default. For more information, see Simplified automatic recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery) - // . - AutoRecovery InstanceAutoRecoveryState - - noSmithyDocumentSerde -} - -// Describes the market (purchasing) option for the instances. -type InstanceMarketOptionsRequest struct { - - // The market type. - MarketType MarketType - - // The options for Spot Instances. - SpotOptions *SpotMarketOptions - - noSmithyDocumentSerde -} - -// The metadata options for the instance. -type InstanceMetadataOptionsRequest struct { - - // Enables or disables the HTTP metadata endpoint on your instances. If you - // specify a value of disabled , you cannot access your instance metadata. Default: - // enabled - HttpEndpoint InstanceMetadataEndpointState - - // Enables or disables the IPv6 endpoint for the instance metadata service. - HttpProtocolIpv6 InstanceMetadataProtocolState - - // The desired HTTP PUT response hop limit for instance metadata requests. The - // larger the number, the further instance metadata requests can travel. Default: 1 - // Possible values: Integers from 1 to 64 - HttpPutResponseHopLimit *int32 - - // Indicates whether IMDSv2 is required. - // - optional - IMDSv2 is optional. You can choose whether to send a session - // token in your instance metadata retrieval requests. If you retrieve IAM role - // credentials without a session token, you receive the IMDSv1 role credentials. If - // you retrieve IAM role credentials using a valid session token, you receive the - // IMDSv2 role credentials. - // - required - IMDSv2 is required. You must send a session token in your - // instance metadata retrieval requests. With this option, retrieving the IAM role - // credentials always returns IMDSv2 credentials; IMDSv1 credentials are not - // available. - // Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) for - // your instance is v2.0 , the default is required . - HttpTokens HttpTokensState - - // Set to enabled to allow access to instance tags from the instance metadata. Set - // to disabled to turn off access to instance tags from the instance metadata. For - // more information, see Work with instance tags using the instance metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS) - // . Default: disabled - InstanceMetadataTags InstanceMetadataTagsState - - noSmithyDocumentSerde -} - -// The metadata options for the instance. -type InstanceMetadataOptionsResponse struct { - - // Indicates whether the HTTP metadata endpoint on your instances is enabled or - // disabled. If the value is disabled , you cannot access your instance metadata. - HttpEndpoint InstanceMetadataEndpointState - - // Indicates whether the IPv6 endpoint for the instance metadata service is - // enabled or disabled. - HttpProtocolIpv6 InstanceMetadataProtocolState - - // The desired HTTP PUT response hop limit for instance metadata requests. The - // larger the number, the further instance metadata requests can travel. Default: 1 - // Possible values: Integers from 1 to 64 - HttpPutResponseHopLimit *int32 - - // Indicates whether IMDSv2 is required. - // - optional - IMDSv2 is optional. You can choose whether to send a session - // token in your instance metadata retrieval requests. If you retrieve IAM role - // credentials without a session token, you receive the IMDSv1 role credentials. If - // you retrieve IAM role credentials using a valid session token, you receive the - // IMDSv2 role credentials. - // - required - IMDSv2 is required. You must send a session token in your - // instance metadata retrieval requests. With this option, retrieving the IAM role - // credentials always returns IMDSv2 credentials; IMDSv1 credentials are not - // available. - HttpTokens HttpTokensState - - // Indicates whether access to instance tags from the instance metadata is enabled - // or disabled. For more information, see Work with instance tags using the - // instance metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS) - // . - InstanceMetadataTags InstanceMetadataTagsState - - // The state of the metadata option changes. pending - The metadata options are - // being updated and the instance is not ready to process metadata traffic with the - // new selection. applied - The metadata options have been successfully applied on - // the instance. - State InstanceMetadataOptionsState - - noSmithyDocumentSerde -} - -// Describes the monitoring of an instance. -type InstanceMonitoring struct { - - // The ID of the instance. - InstanceId *string - - // The monitoring for the instance. - Monitoring *Monitoring - - noSmithyDocumentSerde -} - -// Describes a network interface. -type InstanceNetworkInterface struct { - - // The association information for an Elastic IPv4 associated with the network - // interface. - Association *InstanceNetworkInterfaceAssociation - - // The network interface attachment. - Attachment *InstanceNetworkInterfaceAttachment - - // A security group connection tracking configuration that enables you to set the - // timeout for connection tracking on an Elastic network interface. For more - // information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) - // in the Amazon Elastic Compute Cloud User Guide. - ConnectionTrackingConfiguration *ConnectionTrackingSpecificationResponse - - // The description. - Description *string - - // The security groups. - Groups []GroupIdentifier - - // The type of network interface. Valid values: interface | efa | trunk - InterfaceType *string - - // The IPv4 delegated prefixes that are assigned to the network interface. - Ipv4Prefixes []InstanceIpv4Prefix - - // The IPv6 addresses associated with the network interface. - Ipv6Addresses []InstanceIpv6Address - - // The IPv6 delegated prefixes that are assigned to the network interface. - Ipv6Prefixes []InstanceIpv6Prefix - - // The MAC address. - MacAddress *string - - // The ID of the network interface. - NetworkInterfaceId *string - - // The ID of the Amazon Web Services account that created the network interface. - OwnerId *string - - // The private DNS name. - PrivateDnsName *string - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string - - // The private IPv4 addresses associated with the network interface. - PrivateIpAddresses []InstancePrivateIpAddress - - // Indicates whether source/destination checking is enabled. - SourceDestCheck *bool - - // The status of the network interface. - Status NetworkInterfaceStatus - - // The ID of the subnet. - SubnetId *string - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes association information for an Elastic IP address (IPv4). -type InstanceNetworkInterfaceAssociation struct { - - // The carrier IP address associated with the network interface. - CarrierIp *string - - // The customer-owned IP address associated with the network interface. - CustomerOwnedIp *string - - // The ID of the owner of the Elastic IP address. - IpOwnerId *string - - // The public DNS name. - PublicDnsName *string - - // The public IP address or Elastic IP address bound to the network interface. - PublicIp *string - - noSmithyDocumentSerde -} - -// Describes a network interface attachment. -type InstanceNetworkInterfaceAttachment struct { - - // The time stamp when the attachment initiated. - AttachTime *time.Time - - // The ID of the network interface attachment. - AttachmentId *string - - // Indicates whether the network interface is deleted when the instance is - // terminated. - DeleteOnTermination *bool - - // The index of the device on the instance for the network interface attachment. - DeviceIndex *int32 - - // Contains the ENA Express settings for the network interface that's attached to - // the instance. - EnaSrdSpecification *InstanceAttachmentEnaSrdSpecification - - // The index of the network card. - NetworkCardIndex *int32 - - // The attachment state. - Status AttachmentStatus - - noSmithyDocumentSerde -} - -// Describes a network interface. -type InstanceNetworkInterfaceSpecification struct { - - // Indicates whether to assign a carrier IP address to the network interface. You - // can only assign a carrier IP address to a network interface that is in a subnet - // in a Wavelength Zone. For more information about carrier IP addresses, see - // Carrier IP address (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip) - // in the Amazon Web Services Wavelength Developer Guide. - AssociateCarrierIpAddress *bool - - // Indicates whether to assign a public IPv4 address to an instance you launch in - // a VPC. The public IP address can only be assigned to a network interface for - // eth0, and can only be assigned to a new network interface, not an existing one. - // You cannot specify more than one network interface in the request. If launching - // into a default subnet, the default value is true . Starting on February 1, 2024, - // Amazon Web Services will charge for all public IPv4 addresses, including public - // IPv4 addresses associated with running instances and Elastic IP addresses. For - // more information, see the Public IPv4 Address tab on the Amazon VPC pricing page (http://aws.amazon.com/vpc/pricing/) - // . - AssociatePublicIpAddress *bool - - // A security group connection tracking specification that enables you to set the - // timeout for connection tracking on an Elastic network interface. For more - // information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) - // in the Amazon Elastic Compute Cloud User Guide. - ConnectionTrackingSpecification *ConnectionTrackingSpecificationRequest - - // If set to true , the interface is deleted when the instance is terminated. You - // can specify true only if creating a new network interface when launching an - // instance. - DeleteOnTermination *bool - - // The description of the network interface. Applies only if creating a network - // interface when launching an instance. - Description *string - - // The position of the network interface in the attachment order. A primary - // network interface has a device index of 0. If you specify a network interface - // when launching an instance, you must specify the device index. - DeviceIndex *int32 - - // Specifies the ENA Express settings for the network interface that's attached to - // the instance. - EnaSrdSpecification *EnaSrdSpecificationRequest - - // The IDs of the security groups for the network interface. Applies only if - // creating a network interface when launching an instance. - Groups []string - - // The type of network interface. Valid values: interface | efa - InterfaceType *string - - // The number of IPv4 delegated prefixes to be automatically assigned to the - // network interface. You cannot use this option if you use the Ipv4Prefix option. - Ipv4PrefixCount *int32 - - // The IPv4 delegated prefixes to be assigned to the network interface. You cannot - // use this option if you use the Ipv4PrefixCount option. - Ipv4Prefixes []Ipv4PrefixSpecificationRequest - - // A number of IPv6 addresses to assign to the network interface. Amazon EC2 - // chooses the IPv6 addresses from the range of the subnet. You cannot specify this - // option and the option to assign specific IPv6 addresses in the same request. You - // can specify this option if you've specified a minimum number of instances to - // launch. - Ipv6AddressCount *int32 - - // The IPv6 addresses to assign to the network interface. You cannot specify this - // option and the option to assign a number of IPv6 addresses in the same request. - // You cannot specify this option if you've specified a minimum number of instances - // to launch. - Ipv6Addresses []InstanceIpv6Address - - // The number of IPv6 delegated prefixes to be automatically assigned to the - // network interface. You cannot use this option if you use the Ipv6Prefix option. - Ipv6PrefixCount *int32 - - // The IPv6 delegated prefixes to be assigned to the network interface. You cannot - // use this option if you use the Ipv6PrefixCount option. - Ipv6Prefixes []Ipv6PrefixSpecificationRequest - - // The index of the network card. Some instance types support multiple network - // cards. The primary network interface must be assigned to network card index 0. - // The default is network card index 0. If you are using RequestSpotInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html) - // to create Spot Instances, omit this parameter because you can’t specify the - // network card index when using this API. To specify the network card index, use - // RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // . - NetworkCardIndex *int32 - - // The ID of the network interface. If you are creating a Spot Fleet, omit this - // parameter because you can’t specify a network interface ID in a launch - // specification. - NetworkInterfaceId *string - - // The primary IPv6 address of the network interface. When you enable an IPv6 GUA - // address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 - // address until the instance is terminated or the network interface is detached. - // For more information about primary IPv6 addresses, see RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // . - PrimaryIpv6 *bool - - // The private IPv4 address of the network interface. Applies only if creating a - // network interface when launching an instance. You cannot specify this option if - // you're launching more than one instance in a RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // request. - PrivateIpAddress *string - - // The private IPv4 addresses to assign to the network interface. Only one private - // IPv4 address can be designated as primary. You cannot specify this option if - // you're launching more than one instance in a RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // request. - PrivateIpAddresses []PrivateIpAddressSpecification - - // The number of secondary private IPv4 addresses. You can't specify this option - // and specify more than one private IP address using the private IP addresses - // option. You cannot specify this option if you're launching more than one - // instance in a RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // request. - SecondaryPrivateIpAddressCount *int32 - - // The ID of the subnet associated with the network interface. Applies only if - // creating a network interface when launching an instance. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes a private IPv4 address. -type InstancePrivateIpAddress struct { - - // The association information for an Elastic IP address for the network interface. - Association *InstanceNetworkInterfaceAssociation - - // Indicates whether this IPv4 address is the primary private IP address of the - // network interface. - Primary *bool - - // The private IPv4 DNS name. - PrivateDnsName *string - - // The private IPv4 address of the network interface. - PrivateIpAddress *string - - noSmithyDocumentSerde -} - -// The attributes for the instance types. When you specify instance attributes, -// Amazon EC2 will identify instance types with these attributes. You must specify -// VCpuCount and MemoryMiB . All other attributes are optional. Any unspecified -// optional attribute is set to its default. When you specify multiple attributes, -// you get instance types that satisfy all of the specified attributes. If you -// specify multiple values for an attribute, you get instance types that satisfy -// any of the specified values. To limit the list of instance types from which -// Amazon EC2 can identify matching instance types, you can use one of the -// following parameters, but not both in the same request: -// - AllowedInstanceTypes - The instance types to include in the list. All other -// instance types are ignored, even if they match your specified attributes. -// - ExcludedInstanceTypes - The instance types to exclude from the list, even if -// they match your specified attributes. -// -// If you specify InstanceRequirements , you can't specify InstanceType . -// Attribute-based instance type selection is only supported when using Auto -// Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to -// use the launch template in the launch instance wizard (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance-wizard.html) -// or with the RunInstances API (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) -// , you can't specify InstanceRequirements . For more information, see Create a -// mixed instances group using attribute-based instance type selection (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-mixed-instances-group-attribute-based-instance-type-selection.html) -// in the Amazon EC2 Auto Scaling User Guide, and also Attribute-based instance -// type selection for EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html) -// , Attribute-based instance type selection for Spot Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html) -// , and Spot placement score (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html) -// in the Amazon EC2 User Guide. -type InstanceRequirements struct { - - // The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web - // Services Inferentia chips) on an instance. To exclude accelerator-enabled - // instance types, set Max to 0 . Default: No minimum or maximum limits - AcceleratorCount *AcceleratorCount - - // Indicates whether instance types must have accelerators by specific - // manufacturers. - // - For instance types with Amazon Web Services devices, specify - // amazon-web-services . - // - For instance types with AMD devices, specify amd . - // - For instance types with Habana devices, specify habana . - // - For instance types with NVIDIA devices, specify nvidia . - // - For instance types with Xilinx devices, specify xilinx . - // Default: Any manufacturer - AcceleratorManufacturers []AcceleratorManufacturer - - // The accelerators that must be on the instance type. - // - For instance types with NVIDIA A10G GPUs, specify a10g . - // - For instance types with NVIDIA A100 GPUs, specify a100 . - // - For instance types with NVIDIA H100 GPUs, specify h100 . - // - For instance types with Amazon Web Services Inferentia chips, specify - // inferentia . - // - For instance types with NVIDIA GRID K520 GPUs, specify k520 . - // - For instance types with NVIDIA K80 GPUs, specify k80 . - // - For instance types with NVIDIA M60 GPUs, specify m60 . - // - For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 . - // - For instance types with NVIDIA T4 GPUs, specify t4 . - // - For instance types with NVIDIA T4G GPUs, specify t4g . - // - For instance types with Xilinx VU9P FPGAs, specify vu9p . - // - For instance types with NVIDIA V100 GPUs, specify v100 . - // Default: Any accelerator - AcceleratorNames []AcceleratorName - - // The minimum and maximum amount of total accelerator memory, in MiB. Default: No - // minimum or maximum limits - AcceleratorTotalMemoryMiB *AcceleratorTotalMemoryMiB - - // The accelerator types that must be on the instance type. - // - For instance types with GPU accelerators, specify gpu . - // - For instance types with FPGA accelerators, specify fpga . - // - For instance types with inference accelerators, specify inference . - // Default: Any accelerator type - AcceleratorTypes []AcceleratorType - - // The instance types to apply your specified attributes against. All other - // instance types are ignored, even if they match your specified attributes. You - // can use strings with one or more wild cards, represented by an asterisk ( * ), - // to allow an instance type, size, or generation. The following are examples: - // m5.8xlarge , c5*.* , m5a.* , r* , *3* . For example, if you specify c5* ,Amazon - // EC2 will allow the entire C5 instance family, which includes all C5a and C5n - // instance types. If you specify m5a.* , Amazon EC2 will allow all the M5a - // instance types, but not the M5n instance types. If you specify - // AllowedInstanceTypes , you can't specify ExcludedInstanceTypes . Default: All - // instance types - AllowedInstanceTypes []string - - // Indicates whether bare metal instance types must be included, excluded, or - // required. - // - To include bare metal instance types, specify included . - // - To require only bare metal instance types, specify required . - // - To exclude bare metal instance types, specify excluded . - // Default: excluded - BareMetal BareMetal - - // The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more - // information, see Amazon EBS–optimized instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) - // in the Amazon EC2 User Guide. Default: No minimum or maximum limits - BaselineEbsBandwidthMbps *BaselineEbsBandwidthMbps - - // Indicates whether burstable performance T instance types are included, - // excluded, or required. For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) - // . - // - To include burstable performance instance types, specify included . - // - To require only burstable performance instance types, specify required . - // - To exclude burstable performance instance types, specify excluded . - // Default: excluded - BurstablePerformance BurstablePerformance - - // The CPU manufacturers to include. - // - For instance types with Intel CPUs, specify intel . - // - For instance types with AMD CPUs, specify amd . - // - For instance types with Amazon Web Services CPUs, specify - // amazon-web-services . - // Don't confuse the CPU manufacturer with the CPU architecture. Instances will be - // launched with a compatible CPU architecture based on the Amazon Machine Image - // (AMI) that you specify in your launch template. Default: Any manufacturer - CpuManufacturers []CpuManufacturer - - // The instance types to exclude. You can use strings with one or more wild cards, - // represented by an asterisk ( * ), to exclude an instance type, size, or - // generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* . - // For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance - // family, which includes all C5a and C5n instance types. If you specify m5a.* , - // Amazon EC2 will exclude all the M5a instance types, but not the M5n instance - // types. If you specify ExcludedInstanceTypes , you can't specify - // AllowedInstanceTypes . Default: No excluded instance types - ExcludedInstanceTypes []string - - // Indicates whether current or previous generation instance types are included. - // The current generation instance types are recommended for use. Current - // generation instance types are typically the latest two to three generations in - // each instance family. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. For current generation instance types, specify - // current . For previous generation instance types, specify previous . Default: - // Current and previous generation instance types - InstanceGenerations []InstanceGeneration - - // Indicates whether instance types with instance store volumes are included, - // excluded, or required. For more information, Amazon EC2 instance store (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) - // in the Amazon EC2 User Guide. - // - To include instance types with instance store volumes, specify included . - // - To require only instance types with instance store volumes, specify required - // . - // - To exclude instance types with instance store volumes, specify excluded . - // Default: included - LocalStorage LocalStorage - - // The type of local storage that is required. - // - For instance types with hard disk drive (HDD) storage, specify hdd . - // - For instance types with solid state drive (SSD) storage, specify ssd . - // Default: hdd and ssd - LocalStorageTypes []LocalStorageType - - // [Price protection] The price protection threshold for Spot Instances, as a - // percentage of an identified On-Demand price. The identified On-Demand price is - // the price of the lowest priced current generation C, M, or R instance type with - // your specified attributes. If no current generation C, M, or R instance type - // matches your attributes, then the identified price is from the lowest priced - // current generation instance types, and failing that, from the lowest priced - // previous generation instance types that match your attributes. When Amazon EC2 - // selects instance types with your attributes, it will exclude instance types - // whose price exceeds your specified threshold. The parameter accepts an integer, - // which Amazon EC2 interprets as a percentage. To indicate no price protection - // threshold, specify a high value, such as 999999 . If you set DesiredCapacityType - // to vcpu or memory-mib , the price protection threshold is based on the per vCPU - // or per memory price instead of the per instance price. Only one of - // SpotMaxPricePercentageOverLowestPrice or - // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't - // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the - // value for that parameter defaults to 100 . - MaxSpotPriceAsPercentageOfOptimalOnDemandPrice *int32 - - // The minimum and maximum amount of memory per vCPU, in GiB. Default: No minimum - // or maximum limits - MemoryGiBPerVCpu *MemoryGiBPerVCpu - - // The minimum and maximum amount of memory, in MiB. - MemoryMiB *MemoryMiB - - // The minimum and maximum amount of network bandwidth, in gigabits per second - // (Gbps). Default: No minimum or maximum limits - NetworkBandwidthGbps *NetworkBandwidthGbps - - // The minimum and maximum number of network interfaces. Default: No minimum or - // maximum limits - NetworkInterfaceCount *NetworkInterfaceCount - - // [Price protection] The price protection threshold for On-Demand Instances, as a - // percentage higher than an identified On-Demand price. The identified On-Demand - // price is the price of the lowest priced current generation C, M, or R instance - // type with your specified attributes. When Amazon EC2 selects instance types with - // your attributes, it will exclude instance types whose price exceeds your - // specified threshold. The parameter accepts an integer, which Amazon EC2 - // interprets as a percentage. To turn off price protection, specify a high value, - // such as 999999 . This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) - // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) - // . If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection - // threshold is applied based on the per-vCPU or per-memory price instead of the - // per-instance price. Default: 20 - OnDemandMaxPricePercentageOverLowestPrice *int32 - - // Indicates whether instance types must support hibernation for On-Demand - // Instances. This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) - // . Default: false - RequireHibernateSupport *bool - - // [Price protection] The price protection threshold for Spot Instances, as a - // percentage higher than an identified Spot price. The identified Spot price is - // the Spot price of the lowest priced current generation C, M, or R instance type - // with your specified attributes. If no current generation C, M, or R instance - // type matches your attributes, then the identified Spot price is from the lowest - // priced current generation instance types, and failing that, from the lowest - // priced previous generation instance types that match your attributes. When - // Amazon EC2 selects instance types with your attributes, it will exclude instance - // types whose Spot price exceeds your specified threshold. The parameter accepts - // an integer, which Amazon EC2 interprets as a percentage. To indicate no price - // protection threshold, specify a high value, such as 999999 . If you set - // TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is - // applied based on the per-vCPU or per-memory price instead of the per-instance - // price. This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) - // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) - // . Only one of SpotMaxPricePercentageOverLowestPrice or - // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't - // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the - // value for that parameter defaults to 100 . Default: 100 - SpotMaxPricePercentageOverLowestPrice *int32 - - // The minimum and maximum amount of total local storage, in GB. Default: No - // minimum or maximum limits - TotalLocalStorageGB *TotalLocalStorageGB - - // The minimum and maximum number of vCPUs. - VCpuCount *VCpuCountRange - - noSmithyDocumentSerde -} - -// The attributes for the instance types. When you specify instance attributes, -// Amazon EC2 will identify instance types with these attributes. You must specify -// VCpuCount and MemoryMiB . All other attributes are optional. Any unspecified -// optional attribute is set to its default. When you specify multiple attributes, -// you get instance types that satisfy all of the specified attributes. If you -// specify multiple values for an attribute, you get instance types that satisfy -// any of the specified values. To limit the list of instance types from which -// Amazon EC2 can identify matching instance types, you can use one of the -// following parameters, but not both in the same request: -// - AllowedInstanceTypes - The instance types to include in the list. All other -// instance types are ignored, even if they match your specified attributes. -// - ExcludedInstanceTypes - The instance types to exclude from the list, even if -// they match your specified attributes. -// -// If you specify InstanceRequirements , you can't specify InstanceType . -// Attribute-based instance type selection is only supported when using Auto -// Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to -// use the launch template in the launch instance wizard (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance-wizard.html) -// , or with the RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) -// API or AWS::EC2::Instance (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html) -// Amazon Web Services CloudFormation resource, you can't specify -// InstanceRequirements . For more information, see Attribute-based instance type -// selection for EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html) -// , Attribute-based instance type selection for Spot Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html) -// , and Spot placement score (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html) -// in the Amazon EC2 User Guide. -type InstanceRequirementsRequest struct { - - // The minimum and maximum amount of memory, in MiB. - // - // This member is required. - MemoryMiB *MemoryMiBRequest - - // The minimum and maximum number of vCPUs. - // - // This member is required. - VCpuCount *VCpuCountRangeRequest - - // The minimum and maximum number of accelerators (GPUs, FPGAs, or Amazon Web - // Services Inferentia chips) on an instance. To exclude accelerator-enabled - // instance types, set Max to 0 . Default: No minimum or maximum limits - AcceleratorCount *AcceleratorCountRequest - - // Indicates whether instance types must have accelerators by specific - // manufacturers. - // - For instance types with Amazon Web Services devices, specify - // amazon-web-services . - // - For instance types with AMD devices, specify amd . - // - For instance types with Habana devices, specify habana . - // - For instance types with NVIDIA devices, specify nvidia . - // - For instance types with Xilinx devices, specify xilinx . - // Default: Any manufacturer - AcceleratorManufacturers []AcceleratorManufacturer - - // The accelerators that must be on the instance type. - // - For instance types with NVIDIA A10G GPUs, specify a10g . - // - For instance types with NVIDIA A100 GPUs, specify a100 . - // - For instance types with NVIDIA H100 GPUs, specify h100 . - // - For instance types with Amazon Web Services Inferentia chips, specify - // inferentia . - // - For instance types with NVIDIA GRID K520 GPUs, specify k520 . - // - For instance types with NVIDIA K80 GPUs, specify k80 . - // - For instance types with NVIDIA M60 GPUs, specify m60 . - // - For instance types with AMD Radeon Pro V520 GPUs, specify radeon-pro-v520 . - // - For instance types with NVIDIA T4 GPUs, specify t4 . - // - For instance types with NVIDIA T4G GPUs, specify t4g . - // - For instance types with Xilinx VU9P FPGAs, specify vu9p . - // - For instance types with NVIDIA V100 GPUs, specify v100 . - // Default: Any accelerator - AcceleratorNames []AcceleratorName - - // The minimum and maximum amount of total accelerator memory, in MiB. Default: No - // minimum or maximum limits - AcceleratorTotalMemoryMiB *AcceleratorTotalMemoryMiBRequest - - // The accelerator types that must be on the instance type. - // - To include instance types with GPU hardware, specify gpu . - // - To include instance types with FPGA hardware, specify fpga . - // - To include instance types with inference hardware, specify inference . - // Default: Any accelerator type - AcceleratorTypes []AcceleratorType - - // The instance types to apply your specified attributes against. All other - // instance types are ignored, even if they match your specified attributes. You - // can use strings with one or more wild cards, represented by an asterisk ( * ), - // to allow an instance type, size, or generation. The following are examples: - // m5.8xlarge , c5*.* , m5a.* , r* , *3* . For example, if you specify c5* ,Amazon - // EC2 will allow the entire C5 instance family, which includes all C5a and C5n - // instance types. If you specify m5a.* , Amazon EC2 will allow all the M5a - // instance types, but not the M5n instance types. If you specify - // AllowedInstanceTypes , you can't specify ExcludedInstanceTypes . Default: All - // instance types - AllowedInstanceTypes []string - - // Indicates whether bare metal instance types must be included, excluded, or - // required. - // - To include bare metal instance types, specify included . - // - To require only bare metal instance types, specify required . - // - To exclude bare metal instance types, specify excluded . - // Default: excluded - BareMetal BareMetal - - // The minimum and maximum baseline bandwidth to Amazon EBS, in Mbps. For more - // information, see Amazon EBS–optimized instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) - // in the Amazon EC2 User Guide. Default: No minimum or maximum limits - BaselineEbsBandwidthMbps *BaselineEbsBandwidthMbpsRequest - - // Indicates whether burstable performance T instance types are included, - // excluded, or required. For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) - // . - // - To include burstable performance instance types, specify included . - // - To require only burstable performance instance types, specify required . - // - To exclude burstable performance instance types, specify excluded . - // Default: excluded - BurstablePerformance BurstablePerformance - - // The CPU manufacturers to include. - // - For instance types with Intel CPUs, specify intel . - // - For instance types with AMD CPUs, specify amd . - // - For instance types with Amazon Web Services CPUs, specify - // amazon-web-services . - // Don't confuse the CPU manufacturer with the CPU architecture. Instances will be - // launched with a compatible CPU architecture based on the Amazon Machine Image - // (AMI) that you specify in your launch template. Default: Any manufacturer - CpuManufacturers []CpuManufacturer - - // The instance types to exclude. You can use strings with one or more wild cards, - // represented by an asterisk ( * ), to exclude an instance family, type, size, or - // generation. The following are examples: m5.8xlarge , c5*.* , m5a.* , r* , *3* . - // For example, if you specify c5* ,Amazon EC2 will exclude the entire C5 instance - // family, which includes all C5a and C5n instance types. If you specify m5a.* , - // Amazon EC2 will exclude all the M5a instance types, but not the M5n instance - // types. If you specify ExcludedInstanceTypes , you can't specify - // AllowedInstanceTypes . Default: No excluded instance types - ExcludedInstanceTypes []string - - // Indicates whether current or previous generation instance types are included. - // The current generation instance types are recommended for use. Current - // generation instance types are typically the latest two to three generations in - // each instance family. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. For current generation instance types, specify - // current . For previous generation instance types, specify previous . Default: - // Current and previous generation instance types - InstanceGenerations []InstanceGeneration - - // Indicates whether instance types with instance store volumes are included, - // excluded, or required. For more information, Amazon EC2 instance store (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html) - // in the Amazon EC2 User Guide. - // - To include instance types with instance store volumes, specify included . - // - To require only instance types with instance store volumes, specify required - // . - // - To exclude instance types with instance store volumes, specify excluded . - // Default: included - LocalStorage LocalStorage - - // The type of local storage that is required. - // - For instance types with hard disk drive (HDD) storage, specify hdd . - // - For instance types with solid state drive (SSD) storage, specify ssd . - // Default: hdd and ssd - LocalStorageTypes []LocalStorageType - - // [Price protection] The price protection threshold for Spot Instances, as a - // percentage of an identified On-Demand price. The identified On-Demand price is - // the price of the lowest priced current generation C, M, or R instance type with - // your specified attributes. If no current generation C, M, or R instance type - // matches your attributes, then the identified price is from the lowest priced - // current generation instance types, and failing that, from the lowest priced - // previous generation instance types that match your attributes. When Amazon EC2 - // selects instance types with your attributes, it will exclude instance types - // whose price exceeds your specified threshold. The parameter accepts an integer, - // which Amazon EC2 interprets as a percentage. To indicate no price protection - // threshold, specify a high value, such as 999999 . If you set DesiredCapacityType - // to vcpu or memory-mib , the price protection threshold is based on the per vCPU - // or per memory price instead of the per instance price. Only one of - // SpotMaxPricePercentageOverLowestPrice or - // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't - // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the - // value for that parameter defaults to 100 . - MaxSpotPriceAsPercentageOfOptimalOnDemandPrice *int32 - - // The minimum and maximum amount of memory per vCPU, in GiB. Default: No minimum - // or maximum limits - MemoryGiBPerVCpu *MemoryGiBPerVCpuRequest - - // The minimum and maximum amount of baseline network bandwidth, in gigabits per - // second (Gbps). For more information, see Amazon EC2 instance network bandwidth (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html) - // in the Amazon EC2 User Guide. Default: No minimum or maximum limits - NetworkBandwidthGbps *NetworkBandwidthGbpsRequest - - // The minimum and maximum number of network interfaces. Default: No minimum or - // maximum limits - NetworkInterfaceCount *NetworkInterfaceCountRequest - - // [Price protection] The price protection threshold for On-Demand Instances, as a - // percentage higher than an identified On-Demand price. The identified On-Demand - // price is the price of the lowest priced current generation C, M, or R instance - // type with your specified attributes. When Amazon EC2 selects instance types with - // your attributes, it will exclude instance types whose price exceeds your - // specified threshold. The parameter accepts an integer, which Amazon EC2 - // interprets as a percentage. To indicate no price protection threshold, specify a - // high value, such as 999999 . This parameter is not supported for - // GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) - // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) - // . If you set TargetCapacityUnitType to vcpu or memory-mib , the price protection - // threshold is applied based on the per-vCPU or per-memory price instead of the - // per-instance price. Default: 20 - OnDemandMaxPricePercentageOverLowestPrice *int32 - - // Indicates whether instance types must support hibernation for On-Demand - // Instances. This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) - // . Default: false - RequireHibernateSupport *bool - - // [Price protection] The price protection threshold for Spot Instances, as a - // percentage higher than an identified Spot price. The identified Spot price is - // the Spot price of the lowest priced current generation C, M, or R instance type - // with your specified attributes. If no current generation C, M, or R instance - // type matches your attributes, then the identified Spot price is from the lowest - // priced current generation instance types, and failing that, from the lowest - // priced previous generation instance types that match your attributes. When - // Amazon EC2 selects instance types with your attributes, it will exclude instance - // types whose Spot price exceeds your specified threshold. The parameter accepts - // an integer, which Amazon EC2 interprets as a percentage. To indicate no price - // protection threshold, specify a high value, such as 999999 . If you set - // TargetCapacityUnitType to vcpu or memory-mib , the price protection threshold is - // applied based on the per-vCPU or per-memory price instead of the per-instance - // price. This parameter is not supported for GetSpotPlacementScores (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetSpotPlacementScores.html) - // and GetInstanceTypesFromInstanceRequirements (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetInstanceTypesFromInstanceRequirements.html) - // . Only one of SpotMaxPricePercentageOverLowestPrice or - // MaxSpotPriceAsPercentageOfOptimalOnDemandPrice can be specified. If you don't - // specify either, then SpotMaxPricePercentageOverLowestPrice is used and the - // value for that parameter defaults to 100 . Default: 100 - SpotMaxPricePercentageOverLowestPrice *int32 - - // The minimum and maximum amount of total local storage, in GB. Default: No - // minimum or maximum limits - TotalLocalStorageGB *TotalLocalStorageGBRequest - - noSmithyDocumentSerde -} - -// The architecture type, virtualization type, and other attributes for the -// instance types. When you specify instance attributes, Amazon EC2 will identify -// instance types with those attributes. If you specify -// InstanceRequirementsWithMetadataRequest , you can't specify InstanceTypes . -type InstanceRequirementsWithMetadataRequest struct { - - // The architecture type. - ArchitectureTypes []ArchitectureType - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with those attributes. - InstanceRequirements *InstanceRequirementsRequest - - // The virtualization type. - VirtualizationTypes []VirtualizationType - - noSmithyDocumentSerde -} - -// The instance details to specify which volumes should be snapshotted. -type InstanceSpecification struct { - - // The instance to specify which volumes should be snapshotted. - // - // This member is required. - InstanceId *string - - // Excludes the root volume from being snapshotted. - ExcludeBootVolume *bool - - // The IDs of the data (non-root) volumes to exclude from the multi-volume - // snapshot set. If you specify the ID of the root volume, the request fails. To - // exclude the root volume, use ExcludeBootVolume. You can specify up to 40 volume - // IDs per request. - ExcludeDataVolumeIds []string - - noSmithyDocumentSerde -} - -// Describes the current state of an instance. -type InstanceState struct { - - // The state of the instance as a 16-bit unsigned integer. The high byte is all of - // the bits between 2^8 and (2^16)-1, which equals decimal values between 256 and - // 65,535. These numerical values are used for internal purposes and should be - // ignored. The low byte is all of the bits between 2^0 and (2^8)-1, which equals - // decimal values between 0 and 255. The valid values for instance-state-code will - // all be in the range of the low byte and they are: - // - 0 : pending - // - 16 : running - // - 32 : shutting-down - // - 48 : terminated - // - 64 : stopping - // - 80 : stopped - // You can ignore the high byte value by zeroing out all of the bits above 2^8 or - // 256 in decimal. - Code *int32 - - // The current state of the instance. - Name InstanceStateName - - noSmithyDocumentSerde -} - -// Describes an instance state change. -type InstanceStateChange struct { - - // The current state of the instance. - CurrentState *InstanceState - - // The ID of the instance. - InstanceId *string - - // The previous state of the instance. - PreviousState *InstanceState - - noSmithyDocumentSerde -} - -// Describes the status of an instance. -type InstanceStatus struct { - - // The Availability Zone of the instance. - AvailabilityZone *string - - // Any scheduled events associated with the instance. - Events []InstanceStatusEvent - - // The ID of the instance. - InstanceId *string - - // The intended state of the instance. DescribeInstanceStatus requires that an - // instance be in the running state. - InstanceState *InstanceState - - // Reports impaired functionality that stems from issues internal to the instance, - // such as impaired reachability. - InstanceStatus *InstanceStatusSummary - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // Reports impaired functionality that stems from issues related to the systems - // that support an instance, such as hardware failures and network connectivity - // problems. - SystemStatus *InstanceStatusSummary - - noSmithyDocumentSerde -} - -// Describes the instance status. -type InstanceStatusDetails struct { - - // The time when a status check failed. For an instance that was launched and - // impaired, this is the time when the instance was launched. - ImpairedSince *time.Time - - // The type of instance status. - Name StatusName - - // The status. - Status StatusType - - noSmithyDocumentSerde -} - -// Describes a scheduled event for an instance. -type InstanceStatusEvent struct { - - // The event code. - Code EventCode - - // A description of the event. After a scheduled event is completed, it can still - // be described for up to a week. If the event has been completed, this description - // starts with the following text: [Completed]. - Description *string - - // The ID of the event. - InstanceEventId *string - - // The latest scheduled end time for the event. - NotAfter *time.Time - - // The earliest scheduled start time for the event. - NotBefore *time.Time - - // The deadline for starting the event. - NotBeforeDeadline *time.Time - - noSmithyDocumentSerde -} - -// Describes the status of an instance. -type InstanceStatusSummary struct { - - // The system instance health or application instance health. - Details []InstanceStatusDetails - - // The status. - Status SummaryStatus - - noSmithyDocumentSerde -} - -// Describes the instance store features that are supported by the instance type. -type InstanceStorageInfo struct { - - // Describes the disks that are available for the instance type. - Disks []DiskInfo - - // Indicates whether data is encrypted at rest. - EncryptionSupport InstanceStorageEncryptionSupport - - // Indicates whether non-volatile memory express (NVMe) is supported. - NvmeSupport EphemeralNvmeSupport - - // The total size of the disks, in GB. - TotalSizeInGB *int64 - - noSmithyDocumentSerde -} - -// Describes the registered tag keys for the current Region. -type InstanceTagNotificationAttribute struct { - - // Indicates wheter all tag keys in the current Region are registered to appear in - // scheduled event notifications. true indicates that all tag keys in the current - // Region are registered. - IncludeAllTagsOfInstance *bool - - // The registered tag keys. - InstanceTagKeys []string - - noSmithyDocumentSerde -} - -// Information about the instance topology. -type InstanceTopology struct { - - // The name of the Availability Zone or Local Zone that the instance is in. - AvailabilityZone *string - - // The name of the placement group that the instance is in. - GroupName *string - - // The instance ID. - InstanceId *string - - // The instance type. - InstanceType *string - - // The network nodes. The nodes are hashed based on your account. Instances from - // different accounts running under the same droplet will return a different hashed - // list of strings. - NetworkNodes []string - - // The ID of the Availability Zone or Local Zone that the instance is in. - ZoneId *string - - noSmithyDocumentSerde -} - -// Describes the instance type. -type InstanceTypeInfo struct { - - // Indicates whether Amazon CloudWatch action based recovery is supported. - AutoRecoverySupported *bool - - // Indicates whether the instance is a bare metal instance type. - BareMetal *bool - - // Indicates whether the instance type is a burstable performance T instance type. - // For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) - // . - BurstablePerformanceSupported *bool - - // Indicates whether the instance type is current generation. - CurrentGeneration *bool - - // Indicates whether Dedicated Hosts are supported on the instance type. - DedicatedHostsSupported *bool - - // Describes the Amazon EBS settings for the instance type. - EbsInfo *EbsInfo - - // Describes the FPGA accelerator settings for the instance type. - FpgaInfo *FpgaInfo - - // Indicates whether the instance type is eligible for the free tier. - FreeTierEligible *bool - - // Describes the GPU accelerator settings for the instance type. - GpuInfo *GpuInfo - - // Indicates whether On-Demand hibernation is supported. - HibernationSupported *bool - - // The hypervisor for the instance type. - Hypervisor InstanceTypeHypervisor - - // Describes the Inference accelerator settings for the instance type. - InferenceAcceleratorInfo *InferenceAcceleratorInfo - - // Describes the instance storage for the instance type. - InstanceStorageInfo *InstanceStorageInfo - - // Indicates whether instance storage is supported. - InstanceStorageSupported *bool - - // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - InstanceType InstanceType - - // Describes the memory for the instance type. - MemoryInfo *MemoryInfo - - // Describes the network settings for the instance type. - NetworkInfo *NetworkInfo - - // Indicates whether Nitro Enclaves is supported. - NitroEnclavesSupport NitroEnclavesSupport - - // Describes the supported NitroTPM versions for the instance type. - NitroTpmInfo *NitroTpmInfo - - // Indicates whether NitroTPM is supported. - NitroTpmSupport NitroTpmSupport - - // Describes the placement group settings for the instance type. - PlacementGroupInfo *PlacementGroupInfo - - // Describes the processor. - ProcessorInfo *ProcessorInfo - - // The supported boot modes. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) - // in the Amazon EC2 User Guide. - SupportedBootModes []BootModeType - - // The supported root device types. - SupportedRootDeviceTypes []RootDeviceType - - // Indicates whether the instance type is offered for spot or On-Demand. - SupportedUsageClasses []UsageClassType - - // The supported virtualization types. - SupportedVirtualizationTypes []VirtualizationType - - // Describes the vCPU configurations for the instance type. - VCpuInfo *VCpuInfo - - noSmithyDocumentSerde -} - -// The list of instance types with the specified instance attributes. -type InstanceTypeInfoFromInstanceRequirements struct { - - // The matching instance type. - InstanceType *string - - noSmithyDocumentSerde -} - -// The instance types offered. -type InstanceTypeOffering struct { - - // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon EC2 User Guide. - InstanceType InstanceType - - // The identifier for the location. This depends on the location type. For - // example, if the location type is region , the location is the Region code (for - // example, us-east-2 .) - Location *string - - // The location type. - LocationType LocationType - - noSmithyDocumentSerde -} - -// Information about the Capacity Reservation usage. -type InstanceUsage struct { - - // The ID of the Amazon Web Services account that is making use of the Capacity - // Reservation. - AccountId *string - - // The number of instances the Amazon Web Services account currently has in the - // Capacity Reservation. - UsedInstanceCount *int32 - - noSmithyDocumentSerde -} - -// Describes service integrations with VPC Flow logs. -type IntegrateServices struct { - - // Information about the integration with Amazon Athena. - AthenaIntegrations []AthenaIntegration - - noSmithyDocumentSerde -} - -// Describes an internet gateway. -type InternetGateway struct { - - // Any VPCs attached to the internet gateway. - Attachments []InternetGatewayAttachment - - // The ID of the internet gateway. - InternetGatewayId *string - - // The ID of the Amazon Web Services account that owns the internet gateway. - OwnerId *string - - // Any tags assigned to the internet gateway. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the attachment of a VPC to an internet gateway or an egress-only -// internet gateway. -type InternetGatewayAttachment struct { - - // The current state of the attachment. For an internet gateway, the state is - // available when attached to a VPC; otherwise, this value is not returned. - State AttachmentStatus - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// IPAM is a VPC feature that you can use to automate your IP address management -// workflows including assigning, tracking, troubleshooting, and auditing IP -// addresses across Amazon Web Services Regions and accounts throughout your Amazon -// Web Services Organization. For more information, see What is IPAM? (https://docs.aws.amazon.com/vpc/latest/ipam/what-is-it-ipam.html) -// in the Amazon VPC IPAM User Guide. -type Ipam struct { - - // The IPAM's default resource discovery association ID. - DefaultResourceDiscoveryAssociationId *string - - // The IPAM's default resource discovery ID. - DefaultResourceDiscoveryId *string - - // The description for the IPAM. - Description *string - - // The Amazon Resource Name (ARN) of the IPAM. - IpamArn *string - - // The ID of the IPAM. - IpamId *string - - // The Amazon Web Services Region of the IPAM. - IpamRegion *string - - // The operating Regions for an IPAM. Operating Regions are Amazon Web Services - // Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only - // discovers and monitors resources in the Amazon Web Services Regions you select - // as operating Regions. For more information about operating Regions, see Create - // an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) in the - // Amazon VPC IPAM User Guide. - OperatingRegions []IpamOperatingRegion - - // The Amazon Web Services account ID of the owner of the IPAM. - OwnerId *string - - // The ID of the IPAM's default private scope. - PrivateDefaultScopeId *string - - // The ID of the IPAM's default public scope. - PublicDefaultScopeId *string - - // The IPAM's resource discovery association count. - ResourceDiscoveryAssociationCount *int32 - - // The number of scopes in the IPAM. The scope quota is 5. For more information on - // quotas, see Quotas in IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html) - // in the Amazon VPC IPAM User Guide. - ScopeCount *int32 - - // The state of the IPAM. - State IpamState - - // The state message. - StateMessage *string - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - Tags []Tag - - // IPAM is offered in a Free Tier and an Advanced Tier. For more information about - // the features available in each tier and the costs associated with the tiers, see - // Amazon VPC pricing > IPAM tab (http://aws.amazon.com/vpc/pricing/) . - Tier IpamTier - - noSmithyDocumentSerde -} - -// The historical record of a CIDR within an IPAM scope. For more information, see -// View the history of IP addresses (https://docs.aws.amazon.com/vpc/latest/ipam/view-history-cidr-ipam.html) -// in the Amazon VPC IPAM User Guide. -type IpamAddressHistoryRecord struct { - - // The CIDR of the resource. - ResourceCidr *string - - // The compliance status of a resource. For more information on compliance - // statuses, see Monitor CIDR usage by resource (https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html) - // in the Amazon VPC IPAM User Guide. - ResourceComplianceStatus IpamComplianceStatus - - // The ID of the resource. - ResourceId *string - - // The name of the resource. - ResourceName *string - - // The overlap status of an IPAM resource. The overlap status tells you if the - // CIDR for a resource overlaps with another CIDR in the scope. For more - // information on overlap statuses, see Monitor CIDR usage by resource (https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html) - // in the Amazon VPC IPAM User Guide. - ResourceOverlapStatus IpamOverlapStatus - - // The ID of the resource owner. - ResourceOwnerId *string - - // The Amazon Web Services Region of the resource. - ResourceRegion *string - - // The type of the resource. - ResourceType IpamAddressHistoryResourceType - - // Sampled end time of the resource-to-CIDR association within the IPAM scope. - // Changes are picked up in periodic snapshots, so the end time may have occurred - // before this specific time. - SampledEndTime *time.Time - - // Sampled start time of the resource-to-CIDR association within the IPAM scope. - // Changes are picked up in periodic snapshots, so the start time may have occurred - // before this specific time. - SampledStartTime *time.Time - - // The VPC ID of the resource. - VpcId *string - - noSmithyDocumentSerde -} - -// A signed document that proves that you are authorized to bring the specified IP -// address range to Amazon using BYOIP. -type IpamCidrAuthorizationContext struct { - - // The plain-text authorization message for the prefix and account. - Message *string - - // The signed authorization message for the prefix and account. - Signature *string - - noSmithyDocumentSerde -} - -// An IPAM discovered account. A discovered account is an Amazon Web Services -// account that is monitored under a resource discovery. If you have integrated -// IPAM with Amazon Web Services Organizations, all accounts in the organization -// are discovered accounts. -type IpamDiscoveredAccount struct { - - // The account ID. - AccountId *string - - // The Amazon Web Services Region that the account information is returned from. - // An account can be discovered in multiple regions and will have a separate - // discovered account for each Region. - DiscoveryRegion *string - - // The resource discovery failure reason. - FailureReason *IpamDiscoveryFailureReason - - // The last attempted resource discovery time. - LastAttemptedDiscoveryTime *time.Time - - // The last successful resource discovery time. - LastSuccessfulDiscoveryTime *time.Time - - noSmithyDocumentSerde -} - -// A public IP Address discovered by IPAM. -type IpamDiscoveredPublicAddress struct { - - // The IP address. - Address *string - - // The allocation ID of the resource the IP address is assigned to. - AddressAllocationId *string - - // The ID of the owner of the resource the IP address is assigned to. - AddressOwnerId *string - - // The Region of the resource the IP address is assigned to. - AddressRegion *string - - // The IP address type. - AddressType IpamPublicAddressType - - // The association status. - AssociationStatus IpamPublicAddressAssociationStatus - - // The instance ID of the instance the assigned IP address is assigned to. - InstanceId *string - - // The resource discovery ID. - IpamResourceDiscoveryId *string - - // The network border group that the resource that the IP address is assigned to - // is in. - NetworkBorderGroup *string - - // The description of the network interface that IP address is assigned to. - NetworkInterfaceDescription *string - - // The network interface ID of the resource with the assigned IP address. - NetworkInterfaceId *string - - // The ID of the public IPv4 pool that the resource with the assigned IP address - // is from. - PublicIpv4PoolId *string - - // The last successful resource discovery time. - SampleTime *time.Time - - // Security groups associated with the resource that the IP address is assigned to. - SecurityGroups []IpamPublicAddressSecurityGroup - - // The Amazon Web Services service associated with the IP address. - Service IpamPublicAddressAwsService - - // The resource ARN or ID. - ServiceResource *string - - // The ID of the subnet that the resource with the assigned IP address is in. - SubnetId *string - - // Tags associated with the IP address. - Tags *IpamPublicAddressTags - - // The ID of the VPC that the resource with the assigned IP address is in. - VpcId *string - - noSmithyDocumentSerde -} - -// An IPAM discovered resource CIDR. A discovered resource is a resource CIDR -// monitored under a resource discovery. The following resources can be discovered: -// VPCs, Public IPv4 pools, VPC subnets, and Elastic IP addresses. The discovered -// resource CIDR is the IP address range in CIDR notation that is associated with -// the resource. -type IpamDiscoveredResourceCidr struct { - - // The percentage of IP address space in use. To convert the decimal to a - // percentage, multiply the decimal by 100. Note the following: - // - For resources that are VPCs, this is the percentage of IP address space in - // the VPC that's taken up by subnet CIDRs. - // - For resources that are subnets, if the subnet has an IPv4 CIDR provisioned - // to it, this is the percentage of IPv4 address space in the subnet that's in use. - // If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address - // space in use is not represented. The percentage of IPv6 address space in use - // cannot currently be calculated. - // - For resources that are public IPv4 pools, this is the percentage of IP - // address space in the pool that's been allocated to Elastic IP addresses (EIPs). - IpUsage *float64 - - // The resource discovery ID. - IpamResourceDiscoveryId *string - - // The resource CIDR. - ResourceCidr *string - - // The resource ID. - ResourceId *string - - // The resource owner ID. - ResourceOwnerId *string - - // The resource Region. - ResourceRegion *string - - // The resource tags. - ResourceTags []IpamResourceTag - - // The resource type. - ResourceType IpamResourceType - - // The last successful resource discovery time. - SampleTime *time.Time - - // The VPC ID. - VpcId *string - - noSmithyDocumentSerde -} - -// The discovery failure reason. -type IpamDiscoveryFailureReason struct { - - // The discovery failure code. - // - assume-role-failure - IPAM could not assume the Amazon Web Services IAM - // service-linked role. This could be because of any of the following: - // - SLR has not been created yet and IPAM is still creating it. - // - You have opted-out of the IPAM home Region. - // - Account you are using as your IPAM account has been suspended. - // - throttling-failure - IPAM account is already using the allotted transactions - // per second and IPAM is receiving a throttling error when assuming the Amazon Web - // Services IAM SLR. - // - unauthorized-failure - Amazon Web Services account making the request is not - // authorized. For more information, see AuthFailure (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html) - // in the Amazon Elastic Compute Cloud API Reference. - Code IpamDiscoveryFailureCode - - // The discovery failure message. - Message *string - - noSmithyDocumentSerde -} - -// The operating Regions for an IPAM. Operating Regions are Amazon Web Services -// Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only -// discovers and monitors resources in the Amazon Web Services Regions you select -// as operating Regions. For more information about operating Regions, see Create -// an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) in the -// Amazon VPC IPAM User Guide. -type IpamOperatingRegion struct { - - // The name of the operating Region. - RegionName *string - - noSmithyDocumentSerde -} - -// In IPAM, a pool is a collection of contiguous IP addresses CIDRs. Pools enable -// you to organize your IP addresses according to your routing and security needs. -// For example, if you have separate routing and security needs for development and -// production applications, you can create a pool for each. -type IpamPool struct { - - // The address family of the pool. - AddressFamily AddressFamily - - // The default netmask length for allocations added to this pool. If, for example, - // the CIDR assigned to this pool is 10.0.0.0/8 and you enter 16 here, new - // allocations will default to 10.0.0.0/16. - AllocationDefaultNetmaskLength *int32 - - // The maximum netmask length possible for CIDR allocations in this IPAM pool to - // be compliant. The maximum netmask length must be greater than the minimum - // netmask length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible - // netmask lengths for IPv6 addresses are 0 - 128. - AllocationMaxNetmaskLength *int32 - - // The minimum netmask length required for CIDR allocations in this IPAM pool to - // be compliant. The minimum netmask length must be less than the maximum netmask - // length. Possible netmask lengths for IPv4 addresses are 0 - 32. Possible netmask - // lengths for IPv6 addresses are 0 - 128. - AllocationMinNetmaskLength *int32 - - // Tags that are required for resources that use CIDRs from this IPAM pool. - // Resources that do not have these tags will not be allowed to allocate space from - // the pool. If the resources have their tags changed after they have allocated - // space or if the allocation tagging requirements are changed on the pool, the - // resource may be marked as noncompliant. - AllocationResourceTags []IpamResourceTag - - // If selected, IPAM will continuously look for resources within the CIDR range of - // this pool and automatically import them as allocations into your IPAM. The CIDRs - // that will be allocated for these resources must not already be allocated to - // other resources in order for the import to succeed. IPAM will import a CIDR - // regardless of its compliance with the pool's allocation rules, so a resource - // might be imported and subsequently marked as noncompliant. If IPAM discovers - // multiple CIDRs that overlap, IPAM will import the largest CIDR only. If IPAM - // discovers multiple CIDRs with matching CIDRs, IPAM will randomly import one of - // them only. A locale must be set on the pool for this feature to work. - AutoImport *bool - - // Limits which service in Amazon Web Services that the pool can be used in. - // "ec2", for example, allows users to use space for Elastic IP addresses and VPCs. - AwsService IpamPoolAwsService - - // The description of the IPAM pool. - Description *string - - // The ARN of the IPAM. - IpamArn *string - - // The Amazon Resource Name (ARN) of the IPAM pool. - IpamPoolArn *string - - // The ID of the IPAM pool. - IpamPoolId *string - - // The Amazon Web Services Region of the IPAM pool. - IpamRegion *string - - // The ARN of the scope of the IPAM pool. - IpamScopeArn *string - - // In IPAM, a scope is the highest-level container within IPAM. An IPAM contains - // two default scopes. Each scope represents the IP space for a single network. The - // private scope is intended for all private IP address space. The public scope is - // intended for all public IP address space. Scopes enable you to reuse IP - // addresses across multiple unconnected networks without causing IP address - // overlap or conflict. - IpamScopeType IpamScopeType - - // The locale of the IPAM pool. In IPAM, the locale is the Amazon Web Services - // Region where you want to make an IPAM pool available for allocations. Only - // resources in the same Region as the locale of the pool can get IP address - // allocations from the pool. You can only allocate a CIDR for a VPC, for example, - // from an IPAM pool that shares a locale with the VPC’s Region. Note that once you - // choose a Locale for a pool, you cannot modify it. If you choose an Amazon Web - // Services Region for locale that has not been configured as an operating Region - // for the IPAM, you'll get an error. - Locale *string - - // The Amazon Web Services account ID of the owner of the IPAM pool. - OwnerId *string - - // The depth of pools in your IPAM pool. The pool depth quota is 10. For more - // information, see Quotas in IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html) - // in the Amazon VPC IPAM User Guide. - PoolDepth *int32 - - // The IP address source for pools in the public scope. Only used for provisioning - // IP address CIDRs to pools in the public scope. Default is BYOIP . For more - // information, see Create IPv6 pools (https://docs.aws.amazon.com/vpc/latest/ipam/intro-create-ipv6-pools.html) - // in the Amazon VPC IPAM User Guide. By default, you can add only one - // Amazon-provided IPv6 CIDR block to a top-level IPv6 pool. For information on - // increasing the default limit, see Quotas for your IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/quotas-ipam.html) - // in the Amazon VPC IPAM User Guide. - PublicIpSource IpamPoolPublicIpSource - - // Determines if a pool is publicly advertisable. This option is not available for - // pools with AddressFamily set to ipv4 . - PubliclyAdvertisable *bool - - // The ID of the source IPAM pool. You can use this option to create an IPAM pool - // within an existing source pool. - SourceIpamPoolId *string - - // The resource used to provision CIDRs to a resource planning pool. - SourceResource *IpamPoolSourceResource - - // The state of the IPAM pool. - State IpamPoolState - - // The state message. - StateMessage *string - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - Tags []Tag - - noSmithyDocumentSerde -} - -// In IPAM, an allocation is a CIDR assignment from an IPAM pool to another IPAM -// pool or to a resource. -type IpamPoolAllocation struct { - - // The CIDR for the allocation. A CIDR is a representation of an IP address and - // its associated network mask (or netmask) and refers to a range of IP addresses. - // An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is 2001:DB8::/32 . - Cidr *string - - // A description of the pool allocation. - Description *string - - // The ID of an allocation. - IpamPoolAllocationId *string - - // The ID of the resource. - ResourceId *string - - // The owner of the resource. - ResourceOwner *string - - // The Amazon Web Services Region of the resource. - ResourceRegion *string - - // The type of the resource. - ResourceType IpamPoolAllocationResourceType - - noSmithyDocumentSerde -} - -// A CIDR provisioned to an IPAM pool. -type IpamPoolCidr struct { - - // The CIDR provisioned to the IPAM pool. A CIDR is a representation of an IP - // address and its associated network mask (or netmask) and refers to a range of IP - // addresses. An IPv4 CIDR example is 10.24.34.0/23 . An IPv6 CIDR example is - // 2001:DB8::/32 . - Cidr *string - - // Details related to why an IPAM pool CIDR failed to be provisioned. - FailureReason *IpamPoolCidrFailureReason - - // The IPAM pool CIDR ID. - IpamPoolCidrId *string - - // The netmask length of the CIDR you'd like to provision to a pool. Can be used - // for provisioning Amazon-provided IPv6 CIDRs to top-level pools and for - // provisioning CIDRs to pools with source pools. Cannot be used to provision BYOIP - // CIDRs to top-level pools. "NetmaskLength" or "Cidr" is required. - NetmaskLength *int32 - - // The state of the CIDR. - State IpamPoolCidrState - - noSmithyDocumentSerde -} - -// Details related to why an IPAM pool CIDR failed to be provisioned. -type IpamPoolCidrFailureReason struct { - - // An error code related to why an IPAM pool CIDR failed to be provisioned. - Code IpamPoolCidrFailureCode - - // A message related to why an IPAM pool CIDR failed to be provisioned. - Message *string - - noSmithyDocumentSerde -} - -// The resource used to provision CIDRs to a resource planning pool. -type IpamPoolSourceResource struct { - - // The source resource ID. - ResourceId *string - - // The source resource owner. - ResourceOwner *string - - // The source resource Region. - ResourceRegion *string - - // The source resource type. - ResourceType IpamPoolSourceResourceType - - noSmithyDocumentSerde -} - -// The resource used to provision CIDRs to a resource planning pool. -type IpamPoolSourceResourceRequest struct { - - // The source resource ID. - ResourceId *string - - // The source resource owner. - ResourceOwner *string - - // The source resource Region. - ResourceRegion *string - - // The source resource type. - ResourceType IpamPoolSourceResourceType - - noSmithyDocumentSerde -} - -// The security group that the resource with the public IP address is in. -type IpamPublicAddressSecurityGroup struct { - - // The security group's ID. - GroupId *string - - // The security group's name. - GroupName *string - - noSmithyDocumentSerde -} - -// A tag for a public IP address discovered by IPAM. -type IpamPublicAddressTag struct { - - // The tag's key. - Key *string - - // The tag's value. - Value *string - - noSmithyDocumentSerde -} - -// Tags for a public IP address discovered by IPAM. -type IpamPublicAddressTags struct { - - // Tags for an Elastic IP address. - EipTags []IpamPublicAddressTag - - noSmithyDocumentSerde -} - -// The CIDR for an IPAM resource. -type IpamResourceCidr struct { - - // The compliance status of the IPAM resource. For more information on compliance - // statuses, see Monitor CIDR usage by resource (https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html) - // in the Amazon VPC IPAM User Guide. - ComplianceStatus IpamComplianceStatus - - // The percentage of IP address space in use. To convert the decimal to a - // percentage, multiply the decimal by 100. Note the following: - // - For resources that are VPCs, this is the percentage of IP address space in - // the VPC that's taken up by subnet CIDRs. - // - For resources that are subnets, if the subnet has an IPv4 CIDR provisioned - // to it, this is the percentage of IPv4 address space in the subnet that's in use. - // If the subnet has an IPv6 CIDR provisioned to it, the percentage of IPv6 address - // space in use is not represented. The percentage of IPv6 address space in use - // cannot currently be calculated. - // - For resources that are public IPv4 pools, this is the percentage of IP - // address space in the pool that's been allocated to Elastic IP addresses (EIPs). - IpUsage *float64 - - // The IPAM ID for an IPAM resource. - IpamId *string - - // The pool ID for an IPAM resource. - IpamPoolId *string - - // The scope ID for an IPAM resource. - IpamScopeId *string - - // The management state of the resource. For more information about management - // states, see Monitor CIDR usage by resource (https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html) - // in the Amazon VPC IPAM User Guide. - ManagementState IpamManagementState - - // The overlap status of an IPAM resource. The overlap status tells you if the - // CIDR for a resource overlaps with another CIDR in the scope. For more - // information on overlap statuses, see Monitor CIDR usage by resource (https://docs.aws.amazon.com/vpc/latest/ipam/monitor-cidr-compliance-ipam.html) - // in the Amazon VPC IPAM User Guide. - OverlapStatus IpamOverlapStatus - - // The CIDR for an IPAM resource. - ResourceCidr *string - - // The ID of an IPAM resource. - ResourceId *string - - // The name of an IPAM resource. - ResourceName *string - - // The Amazon Web Services account number of the owner of an IPAM resource. - ResourceOwnerId *string - - // The Amazon Web Services Region for an IPAM resource. - ResourceRegion *string - - // The tags for an IPAM resource. - ResourceTags []IpamResourceTag - - // The type of IPAM resource. - ResourceType IpamResourceType - - // The ID of a VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// A resource discovery is an IPAM component that enables IPAM to manage and -// monitor resources that belong to the owning account. -type IpamResourceDiscovery struct { - - // The resource discovery description. - Description *string - - // The resource discovery Amazon Resource Name (ARN). - IpamResourceDiscoveryArn *string - - // The resource discovery ID. - IpamResourceDiscoveryId *string - - // The resource discovery Region. - IpamResourceDiscoveryRegion *string - - // Defines if the resource discovery is the default. The default resource - // discovery is the resource discovery automatically created when you create an - // IPAM. - IsDefault *bool - - // The operating Regions for the resource discovery. Operating Regions are Amazon - // Web Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM - // only discovers and monitors resources in the Amazon Web Services Regions you - // select as operating Regions. - OperatingRegions []IpamOperatingRegion - - // The ID of the owner. - OwnerId *string - - // The lifecycle state of the resource discovery. - // - create-in-progress - Resource discovery is being created. - // - create-complete - Resource discovery creation is complete. - // - create-failed - Resource discovery creation has failed. - // - modify-in-progress - Resource discovery is being modified. - // - modify-complete - Resource discovery modification is complete. - // - modify-failed - Resource discovery modification has failed. - // - delete-in-progress - Resource discovery is being deleted. - // - delete-complete - Resource discovery deletion is complete. - // - delete-failed - Resource discovery deletion has failed. - // - isolate-in-progress - Amazon Web Services account that created the resource - // discovery has been removed and the resource discovery is being isolated. - // - isolate-complete - Resource discovery isolation is complete. - // - restore-in-progress - Amazon Web Services account that created the resource - // discovery and was isolated has been restored. - State IpamResourceDiscoveryState - - // A tag is a label that you assign to an Amazon Web Services resource. Each tag - // consists of a key and an optional value. You can use tags to search and filter - // your resources or track your Amazon Web Services costs. - Tags []Tag - - noSmithyDocumentSerde -} - -// An IPAM resource discovery association. An associated resource discovery is a -// resource discovery that has been associated with an IPAM. IPAM aggregates the -// resource CIDRs discovered by the associated resource discovery. -type IpamResourceDiscoveryAssociation struct { - - // The IPAM ARN. - IpamArn *string - - // The IPAM ID. - IpamId *string - - // The IPAM home Region. - IpamRegion *string - - // The resource discovery association Amazon Resource Name (ARN). - IpamResourceDiscoveryAssociationArn *string - - // The resource discovery association ID. - IpamResourceDiscoveryAssociationId *string - - // The resource discovery ID. - IpamResourceDiscoveryId *string - - // Defines if the resource discovery is the default. When you create an IPAM, a - // default resource discovery is created for your IPAM and it's associated with - // your IPAM. - IsDefault *bool - - // The Amazon Web Services account ID of the resource discovery owner. - OwnerId *string - - // The resource discovery status. - // - active - Connection or permissions required to read the results of the - // resource discovery are intact. - // - not-found - Connection or permissions required to read the results of the - // resource discovery are broken. This may happen if the owner of the resource - // discovery stopped sharing it or deleted the resource discovery. Verify the - // resource discovery still exists and the Amazon Web Services RAM resource share - // is still intact. - ResourceDiscoveryStatus IpamAssociatedResourceDiscoveryStatus - - // The lifecycle state of the association when you associate or disassociate a - // resource discovery. - // - associate-in-progress - Resource discovery is being associated. - // - associate-complete - Resource discovery association is complete. - // - associate-failed - Resource discovery association has failed. - // - disassociate-in-progress - Resource discovery is being disassociated. - // - disassociate-complete - Resource discovery disassociation is complete. - // - disassociate-failed - Resource discovery disassociation has failed. - // - isolate-in-progress - Amazon Web Services account that created the resource - // discovery association has been removed and the resource discovery associatation - // is being isolated. - // - isolate-complete - Resource discovery isolation is complete.. - // - restore-in-progress - Resource discovery is being restored. - State IpamResourceDiscoveryAssociationState - - // A tag is a label that you assign to an Amazon Web Services resource. Each tag - // consists of a key and an optional value. You can use tags to search and filter - // your resources or track your Amazon Web Services costs. - Tags []Tag - - noSmithyDocumentSerde -} - -// The key/value combination of a tag assigned to the resource. Use the tag key in -// the filter name and the tag value as the filter value. For example, to find all -// resources that have a tag with the key Owner and the value TeamA , specify -// tag:Owner for the filter name and TeamA for the filter value. -type IpamResourceTag struct { - - // The key of a tag assigned to the resource. Use this filter to find all - // resources assigned a tag with a specific key, regardless of the tag value. - Key *string - - // The value of the tag. - Value *string - - noSmithyDocumentSerde -} - -// In IPAM, a scope is the highest-level container within IPAM. An IPAM contains -// two default scopes. Each scope represents the IP space for a single network. The -// private scope is intended for all private IP address space. The public scope is -// intended for all public IP address space. Scopes enable you to reuse IP -// addresses across multiple unconnected networks without causing IP address -// overlap or conflict. For more information, see How IPAM works (https://docs.aws.amazon.com/vpc/latest/ipam/how-it-works-ipam.html) -// in the Amazon VPC IPAM User Guide. -type IpamScope struct { - - // The description of the scope. - Description *string - - // The ARN of the IPAM. - IpamArn *string - - // The Amazon Web Services Region of the IPAM scope. - IpamRegion *string - - // The Amazon Resource Name (ARN) of the scope. - IpamScopeArn *string - - // The ID of the scope. - IpamScopeId *string - - // The type of the scope. - IpamScopeType IpamScopeType - - // Defines if the scope is the default scope or not. - IsDefault *bool - - // The Amazon Web Services account ID of the owner of the scope. - OwnerId *string - - // The number of pools in the scope. - PoolCount *int32 - - // The state of the IPAM scope. - State IpamScopeState - - // The key/value combination of a tag assigned to the resource. Use the tag key in - // the filter name and the tag value as the filter value. For example, to find all - // resources that have a tag with the key Owner and the value TeamA , specify - // tag:Owner for the filter name and TeamA for the filter value. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a set of permissions for a security group rule. -type IpPermission struct { - - // If the protocol is TCP or UDP, this is the start of the port range. If the - // protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all - // ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all - // ICMP/ICMPv6 codes. - FromPort *int32 - - // The IP protocol name ( tcp , udp , icmp , icmpv6 ) or number (see Protocol - // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // ). Use -1 to specify all protocols. When authorizing security group rules, - // specifying -1 or a protocol number other than tcp , udp , icmp , or icmpv6 - // allows traffic on all ports, regardless of any port range you specify. For tcp , - // udp , and icmp , you must specify a port range. For icmpv6 , the port range is - // optional; if you omit the port range, traffic for all types and codes is - // allowed. - IpProtocol *string - - // The IPv4 ranges. - IpRanges []IpRange - - // The IPv6 ranges. - Ipv6Ranges []Ipv6Range - - // The prefix list IDs. - PrefixListIds []PrefixListId - - // If the protocol is TCP or UDP, this is the end of the port range. If the - // protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all - // ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all - // ICMP/ICMPv6 codes. - ToPort *int32 - - // The security group and Amazon Web Services account ID pairs. - UserIdGroupPairs []UserIdGroupPair - - noSmithyDocumentSerde -} - -// Describes an IPv4 range. -type IpRange struct { - - // The IPv4 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv4 address, use the /32 prefix length. - CidrIp *string - - // A description for the security group rule that references this IPv4 address - // range. Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* - Description *string - - noSmithyDocumentSerde -} - -// Describes an IPv4 prefix. -type Ipv4PrefixSpecification struct { - - // The IPv4 prefix. For information, see Assigning prefixes to Amazon EC2 network - // interfaces (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) - // in the Amazon Elastic Compute Cloud User Guide. - Ipv4Prefix *string - - noSmithyDocumentSerde -} - -// Describes the IPv4 prefix option for a network interface. -type Ipv4PrefixSpecificationRequest struct { - - // The IPv4 prefix. For information, see Assigning prefixes to Amazon EC2 network - // interfaces (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-prefix-eni.html) - // in the Amazon Elastic Compute Cloud User Guide. - Ipv4Prefix *string - - noSmithyDocumentSerde -} - -// Information about the IPv4 delegated prefixes assigned to a network interface. -type Ipv4PrefixSpecificationResponse struct { - - // The IPv4 delegated prefixes assigned to the network interface. - Ipv4Prefix *string - - noSmithyDocumentSerde -} - -// Describes an IPv6 CIDR block association. -type Ipv6CidrAssociation struct { - - // The resource that's associated with the IPv6 CIDR block. - AssociatedResource *string - - // The IPv6 CIDR block. - Ipv6Cidr *string - - noSmithyDocumentSerde -} - -// Describes an IPv6 CIDR block. -type Ipv6CidrBlock struct { - - // The IPv6 CIDR block. - Ipv6CidrBlock *string - - noSmithyDocumentSerde -} - -// Describes an IPv6 address pool. -type Ipv6Pool struct { - - // The description for the address pool. - Description *string - - // The CIDR blocks for the address pool. - PoolCidrBlocks []PoolCidrBlock - - // The ID of the address pool. - PoolId *string - - // Any tags for the address pool. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the IPv6 prefix. -type Ipv6PrefixSpecification struct { - - // The IPv6 prefix. - Ipv6Prefix *string - - noSmithyDocumentSerde -} - -// Describes the IPv4 prefix option for a network interface. -type Ipv6PrefixSpecificationRequest struct { - - // The IPv6 prefix. - Ipv6Prefix *string - - noSmithyDocumentSerde -} - -// Information about the IPv6 delegated prefixes assigned to a network interface. -type Ipv6PrefixSpecificationResponse struct { - - // The IPv6 delegated prefixes assigned to the network interface. - Ipv6Prefix *string - - noSmithyDocumentSerde -} - -// Describes an IPv6 range. -type Ipv6Range struct { - - // The IPv6 CIDR range. You can either specify a CIDR range or a source security - // group, not both. To specify a single IPv6 address, use the /128 prefix length. - CidrIpv6 *string - - // A description for the security group rule that references this IPv6 address - // range. Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* - Description *string - - noSmithyDocumentSerde -} - -// Describes a key pair. -type KeyPairInfo struct { - - // If you used Amazon EC2 to create the key pair, this is the date and time when - // the key was created, in ISO 8601 date-time format (https://www.iso.org/iso-8601-date-and-time-format.html) - // , in the UTC time zone. If you imported an existing key pair to Amazon EC2, this - // is the date and time the key was imported, in ISO 8601 date-time format (https://www.iso.org/iso-8601-date-and-time-format.html) - // , in the UTC time zone. - CreateTime *time.Time - - // If you used CreateKeyPair to create the key pair: - // - For RSA key pairs, the key fingerprint is the SHA-1 digest of the DER - // encoded private key. - // - For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 - // digest, which is the default for OpenSSH, starting with OpenSSH 6.8 (http://www.openssh.com/txt/release-6.8) - // . - // If you used ImportKeyPair to provide Amazon Web Services the public key: - // - For RSA key pairs, the key fingerprint is the MD5 public key fingerprint as - // specified in section 4 of RFC4716. - // - For ED25519 key pairs, the key fingerprint is the base64-encoded SHA-256 - // digest, which is the default for OpenSSH, starting with OpenSSH 6.8 (http://www.openssh.com/txt/release-6.8) - // . - KeyFingerprint *string - - // The name of the key pair. - KeyName *string - - // The ID of the key pair. - KeyPairId *string - - // The type of key pair. - KeyType KeyType - - // The public key material. - PublicKey *string - - // Any tags applied to the key pair. - Tags []Tag - - noSmithyDocumentSerde -} - -// The last error that occurred for a VPC endpoint. -type LastError struct { - - // The error code for the VPC endpoint error. - Code *string - - // The error message for the VPC endpoint error. - Message *string - - noSmithyDocumentSerde -} - -// Describes a launch permission. -type LaunchPermission struct { - - // The name of the group. - Group PermissionGroup - - // The Amazon Resource Name (ARN) of an organization. - OrganizationArn *string - - // The Amazon Resource Name (ARN) of an organizational unit (OU). - OrganizationalUnitArn *string - - // The Amazon Web Services account ID. Constraints: Up to 10 000 account IDs can - // be specified in a single request. - UserId *string - - noSmithyDocumentSerde -} - -// Describes a launch permission modification. -type LaunchPermissionModifications struct { - - // The Amazon Web Services account ID, organization ARN, or OU ARN to add to the - // list of launch permissions for the AMI. - Add []LaunchPermission - - // The Amazon Web Services account ID, organization ARN, or OU ARN to remove from - // the list of launch permissions for the AMI. - Remove []LaunchPermission - - noSmithyDocumentSerde -} - -// Describes the launch specification for an instance. -type LaunchSpecification struct { - - // Deprecated. - AddressingType *string - - // The block device mapping entries. - BlockDeviceMappings []BlockDeviceMapping - - // Indicates whether the instance is optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration stack - // to provide optimal EBS I/O performance. This optimization isn't available with - // all instance types. Additional usage charges apply when using an EBS Optimized - // instance. Default: false - EbsOptimized *bool - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification - - // The ID of the AMI. - ImageId *string - - // The instance type. Only one instance type can be specified. - InstanceType InstanceType - - // The ID of the kernel. - KernelId *string - - // The name of the key pair. - KeyName *string - - // Describes the monitoring of an instance. - Monitoring *RunInstancesMonitoringEnabled - - // The network interfaces. If you specify a network interface, you must specify - // subnet IDs and security group IDs using the network interface. - NetworkInterfaces []InstanceNetworkInterfaceSpecification - - // The placement information for the instance. - Placement *SpotPlacement - - // The ID of the RAM disk. - RamdiskId *string - - // The IDs of the security groups. - SecurityGroups []GroupIdentifier - - // The ID of the subnet in which to launch the instance. - SubnetId *string - - // The base64-encoded user data that instances use when starting up. User data is - // limited to 16 KB. - UserData *string - - noSmithyDocumentSerde -} - -// Describes a launch template. -type LaunchTemplate struct { - - // The time launch template was created. - CreateTime *time.Time - - // The principal that created the launch template. - CreatedBy *string - - // The version number of the default version of the launch template. - DefaultVersionNumber *int64 - - // The version number of the latest version of the launch template. - LatestVersionNumber *int64 - - // The ID of the launch template. - LaunchTemplateId *string - - // The name of the launch template. - LaunchTemplateName *string - - // The tags for the launch template. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a launch template and overrides. -type LaunchTemplateAndOverridesResponse struct { - - // The launch template. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides *FleetLaunchTemplateOverrides - - noSmithyDocumentSerde -} - -// Describes a block device mapping. -type LaunchTemplateBlockDeviceMapping struct { - - // The device name. - DeviceName *string - - // Information about the block device for an EBS volume. - Ebs *LaunchTemplateEbsBlockDevice - - // To omit the device from the block device mapping, specify an empty string. - NoDevice *string - - // The virtual device name (ephemeralN). - VirtualName *string - - noSmithyDocumentSerde -} - -// Describes a block device mapping. -type LaunchTemplateBlockDeviceMappingRequest struct { - - // The device name (for example, /dev/sdh or xvdh). - DeviceName *string - - // Parameters used to automatically set up EBS volumes when the instance is - // launched. - Ebs *LaunchTemplateEbsBlockDeviceRequest - - // To omit the device from the block device mapping, specify an empty string. - NoDevice *string - - // The virtual device name (ephemeralN). Instance store volumes are numbered - // starting from 0. An instance type with 2 available instance store volumes can - // specify mappings for ephemeral0 and ephemeral1. The number of available instance - // store volumes depends on the instance type. After you connect to the instance, - // you must mount the volume. - VirtualName *string - - noSmithyDocumentSerde -} - -// Describes an instance's Capacity Reservation targeting option. You can specify -// only one option at a time. Use the CapacityReservationPreference parameter to -// configure the instance to run in On-Demand capacity or to run in any open -// Capacity Reservation that has matching attributes (instance type, platform, -// Availability Zone). Use the CapacityReservationTarget parameter to explicitly -// target a specific Capacity Reservation or a Capacity Reservation group. -type LaunchTemplateCapacityReservationSpecificationRequest struct { - - // Indicates the instance's Capacity Reservation preferences. Possible preferences - // include: - // - open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - none - The instance avoids running in a Capacity Reservation even if one is - // available. The instance runs in On-Demand capacity. - CapacityReservationPreference CapacityReservationPreference - - // Information about the target Capacity Reservation or Capacity Reservation group. - CapacityReservationTarget *CapacityReservationTarget - - noSmithyDocumentSerde -} - -// Information about the Capacity Reservation targeting option. -type LaunchTemplateCapacityReservationSpecificationResponse struct { - - // Indicates the instance's Capacity Reservation preferences. Possible preferences - // include: - // - open - The instance can run in any open Capacity Reservation that has - // matching attributes (instance type, platform, Availability Zone). - // - none - The instance avoids running in a Capacity Reservation even if one is - // available. The instance runs in On-Demand capacity. - CapacityReservationPreference CapacityReservationPreference - - // Information about the target Capacity Reservation or Capacity Reservation group. - CapacityReservationTarget *CapacityReservationTargetResponse - - noSmithyDocumentSerde -} - -// Describes a launch template and overrides. -type LaunchTemplateConfig struct { - - // The launch template to use. Make sure that the launch template does not contain - // the NetworkInterfaceId parameter because you can't specify a network interface - // ID in a Spot Fleet. - LaunchTemplateSpecification *FleetLaunchTemplateSpecification - - // Any parameters that you specify override the same parameters in the launch - // template. - Overrides []LaunchTemplateOverrides - - noSmithyDocumentSerde -} - -// The CPU options for the instance. -type LaunchTemplateCpuOptions struct { - - // Indicates whether the instance is enabled for AMD SEV-SNP. For more - // information, see AMD SEV-SNP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html) - // . - AmdSevSnp AmdSevSnpSpecification - - // The number of CPU cores for the instance. - CoreCount *int32 - - // The number of threads per CPU core. - ThreadsPerCore *int32 - - noSmithyDocumentSerde -} - -// The CPU options for the instance. Both the core count and threads per core must -// be specified in the request. -type LaunchTemplateCpuOptionsRequest struct { - - // Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is - // supported with M6a, R6a, and C6a instance types only. For more information, see - // AMD SEV-SNP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html) . - AmdSevSnp AmdSevSnpSpecification - - // The number of CPU cores for the instance. - CoreCount *int32 - - // The number of threads per CPU core. To disable multithreading for the instance, - // specify a value of 1 . Otherwise, specify the default value of 2 . - ThreadsPerCore *int32 - - noSmithyDocumentSerde -} - -// Describes a block device for an EBS volume. -type LaunchTemplateEbsBlockDevice struct { - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool - - // Indicates whether the EBS volume is encrypted. - Encrypted *bool - - // The number of I/O operations per second (IOPS) that the volume supports. - Iops *int32 - - // The ARN of the Key Management Service (KMS) CMK used for encryption. - KmsKeyId *string - - // The ID of the snapshot. - SnapshotId *string - - // The throughput that the volume supports, in MiB/s. - Throughput *int32 - - // The size of the volume, in GiB. - VolumeSize *int32 - - // The volume type. - VolumeType VolumeType - - noSmithyDocumentSerde -} - -// The parameters for a block device for an EBS volume. -type LaunchTemplateEbsBlockDeviceRequest struct { - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool - - // Indicates whether the EBS volume is encrypted. Encrypted volumes can only be - // attached to instances that support Amazon EBS encryption. If you are creating a - // volume from a snapshot, you can't specify an encryption value. - Encrypted *bool - - // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 - // volumes, this represents the number of IOPS that are provisioned for the volume. - // For gp2 volumes, this represents the baseline performance of the volume and the - // rate at which the volume accumulates I/O credits for bursting. The following are - // the supported values for each volume type: - // - gp3 : 3,000 - 16,000 IOPS - // - io1 : 100 - 64,000 IOPS - // - io2 : 100 - 256,000 IOPS - // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on the - // Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // . On other instances, you can achieve performance up to 32,000 IOPS. This - // parameter is supported for io1 , io2 , and gp3 volumes only. - Iops *int32 - - // The ARN of the symmetric Key Management Service (KMS) CMK used for encryption. - KmsKeyId *string - - // The ID of the snapshot. - SnapshotId *string - - // The throughput to provision for a gp3 volume, with a maximum of 1,000 MiB/s. - // Valid Range: Minimum value of 125. Maximum value of 1000. - Throughput *int32 - - // The size of the volume, in GiBs. You must specify either a snapshot ID or a - // volume size. The following are the supported volumes sizes for each volume type: - // - // - gp2 and gp3 : 1 - 16,384 GiB - // - io1 : 4 - 16,384 GiB - // - io2 : 4 - 65,536 GiB - // - st1 and sc1 : 125 - 16,384 GiB - // - standard : 1 - 1024 GiB - VolumeSize *int32 - - // The volume type. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - VolumeType VolumeType - - noSmithyDocumentSerde -} - -// Describes an elastic inference accelerator. -type LaunchTemplateElasticInferenceAccelerator struct { - - // The type of elastic inference accelerator. The possible values are eia1.medium, - // eia1.large, and eia1.xlarge. - // - // This member is required. - Type *string - - // The number of elastic inference accelerators to attach to the instance. - // Default: 1 - Count *int32 - - noSmithyDocumentSerde -} - -// Describes an elastic inference accelerator. -type LaunchTemplateElasticInferenceAcceleratorResponse struct { - - // The number of elastic inference accelerators to attach to the instance. - // Default: 1 - Count *int32 - - // The type of elastic inference accelerator. The possible values are eia1.medium, - // eia1.large, and eia1.xlarge. - Type *string - - noSmithyDocumentSerde -} - -// ENA Express uses Amazon Web Services Scalable Reliable Datagram (SRD) -// technology to increase the maximum bandwidth used per stream and minimize tail -// latency of network traffic between EC2 instances. With ENA Express, you can -// communicate between two EC2 instances in the same subnet within the same -// account, or in different accounts. Both sending and receiving instances must -// have ENA Express enabled. To improve the reliability of network packet delivery, -// ENA Express reorders network packets on the receiving end by default. However, -// some UDP-based applications are designed to handle network packets that are out -// of order to reduce the overhead for packet delivery at the network layer. When -// ENA Express is enabled, you can specify whether UDP network traffic uses it. -type LaunchTemplateEnaSrdSpecification struct { - - // Indicates whether ENA Express is enabled for the network interface. - EnaSrdEnabled *bool - - // Configures ENA Express for UDP network traffic. - EnaSrdUdpSpecification *LaunchTemplateEnaSrdUdpSpecification - - noSmithyDocumentSerde -} - -// ENA Express is compatible with both TCP and UDP transport protocols. When it's -// enabled, TCP traffic automatically uses it. However, some UDP-based applications -// are designed to handle network packets that are out of order, without a need for -// retransmission, such as live video broadcasting or other near-real-time -// applications. For UDP traffic, you can specify whether to use ENA Express, based -// on your application environment needs. -type LaunchTemplateEnaSrdUdpSpecification struct { - - // Indicates whether UDP traffic to and from the instance uses ENA Express. To - // specify this setting, you must first enable ENA Express. - EnaSrdUdpEnabled *bool - - noSmithyDocumentSerde -} - -// Indicates whether the instance is enabled for Amazon Web Services Nitro -// Enclaves. -type LaunchTemplateEnclaveOptions struct { - - // If this parameter is set to true , the instance is enabled for Amazon Web - // Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services - // Nitro Enclaves. - Enabled *bool - - noSmithyDocumentSerde -} - -// Indicates whether the instance is enabled for Amazon Web Services Nitro -// Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) -// in the Amazon Web Services Nitro Enclaves User Guide. -type LaunchTemplateEnclaveOptionsRequest struct { - - // To enable the instance for Amazon Web Services Nitro Enclaves, set this - // parameter to true . - Enabled *bool - - noSmithyDocumentSerde -} - -// Indicates whether an instance is configured for hibernation. -type LaunchTemplateHibernationOptions struct { - - // If this parameter is set to true , the instance is enabled for hibernation; - // otherwise, it is not enabled for hibernation. - Configured *bool - - noSmithyDocumentSerde -} - -// Indicates whether the instance is configured for hibernation. This parameter is -// valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html) -// . -type LaunchTemplateHibernationOptionsRequest struct { - - // If you set this parameter to true , the instance is enabled for hibernation. - // Default: false - Configured *bool - - noSmithyDocumentSerde -} - -// Describes an IAM instance profile. -type LaunchTemplateIamInstanceProfileSpecification struct { - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string - - // The name of the instance profile. - Name *string - - noSmithyDocumentSerde -} - -// An IAM instance profile. -type LaunchTemplateIamInstanceProfileSpecificationRequest struct { - - // The Amazon Resource Name (ARN) of the instance profile. - Arn *string - - // The name of the instance profile. - Name *string - - noSmithyDocumentSerde -} - -// The maintenance options of your instance. -type LaunchTemplateInstanceMaintenanceOptions struct { - - // Disables the automatic recovery behavior of your instance or sets it to default. - AutoRecovery LaunchTemplateAutoRecoveryState - - noSmithyDocumentSerde -} - -// The maintenance options of your instance. -type LaunchTemplateInstanceMaintenanceOptionsRequest struct { - - // Disables the automatic recovery behavior of your instance or sets it to - // default. For more information, see Simplified automatic recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-recover.html#instance-configuration-recovery) - // . - AutoRecovery LaunchTemplateAutoRecoveryState - - noSmithyDocumentSerde -} - -// The market (purchasing) option for the instances. -type LaunchTemplateInstanceMarketOptions struct { - - // The market type. - MarketType MarketType - - // The options for Spot Instances. - SpotOptions *LaunchTemplateSpotMarketOptions - - noSmithyDocumentSerde -} - -// The market (purchasing) option for the instances. -type LaunchTemplateInstanceMarketOptionsRequest struct { - - // The market type. - MarketType MarketType - - // The options for Spot Instances. - SpotOptions *LaunchTemplateSpotMarketOptionsRequest - - noSmithyDocumentSerde -} - -// The metadata options for the instance. For more information, see Instance -// metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) -// in the Amazon Elastic Compute Cloud User Guide. -type LaunchTemplateInstanceMetadataOptions struct { - - // Enables or disables the HTTP metadata endpoint on your instances. If the - // parameter is not specified, the default state is enabled . If you specify a - // value of disabled , you will not be able to access your instance metadata. - HttpEndpoint LaunchTemplateInstanceMetadataEndpointState - - // Enables or disables the IPv6 endpoint for the instance metadata service. - // Default: disabled - HttpProtocolIpv6 LaunchTemplateInstanceMetadataProtocolIpv6 - - // The desired HTTP PUT response hop limit for instance metadata requests. The - // larger the number, the further instance metadata requests can travel. Default: 1 - // Possible values: Integers from 1 to 64 - HttpPutResponseHopLimit *int32 - - // Indicates whether IMDSv2 is required. - // - optional - IMDSv2 is optional. You can choose whether to send a session - // token in your instance metadata retrieval requests. If you retrieve IAM role - // credentials without a session token, you receive the IMDSv1 role credentials. If - // you retrieve IAM role credentials using a valid session token, you receive the - // IMDSv2 role credentials. - // - required - IMDSv2 is required. You must send a session token in your - // instance metadata retrieval requests. With this option, retrieving the IAM role - // credentials always returns IMDSv2 credentials; IMDSv1 credentials are not - // available. - HttpTokens LaunchTemplateHttpTokensState - - // Set to enabled to allow access to instance tags from the instance metadata. Set - // to disabled to turn off access to instance tags from the instance metadata. For - // more information, see Work with instance tags using the instance metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS) - // . Default: disabled - InstanceMetadataTags LaunchTemplateInstanceMetadataTagsState - - // The state of the metadata option changes. pending - The metadata options are - // being updated and the instance is not ready to process metadata traffic with the - // new selection. applied - The metadata options have been successfully applied on - // the instance. - State LaunchTemplateInstanceMetadataOptionsState - - noSmithyDocumentSerde -} - -// The metadata options for the instance. For more information, see Instance -// metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) -// in the Amazon Elastic Compute Cloud User Guide. -type LaunchTemplateInstanceMetadataOptionsRequest struct { - - // Enables or disables the HTTP metadata endpoint on your instances. If the - // parameter is not specified, the default state is enabled . If you specify a - // value of disabled , you will not be able to access your instance metadata. - HttpEndpoint LaunchTemplateInstanceMetadataEndpointState - - // Enables or disables the IPv6 endpoint for the instance metadata service. - // Default: disabled - HttpProtocolIpv6 LaunchTemplateInstanceMetadataProtocolIpv6 - - // The desired HTTP PUT response hop limit for instance metadata requests. The - // larger the number, the further instance metadata requests can travel. Default: 1 - // Possible values: Integers from 1 to 64 - HttpPutResponseHopLimit *int32 - - // Indicates whether IMDSv2 is required. - // - optional - IMDSv2 is optional. You can choose whether to send a session - // token in your instance metadata retrieval requests. If you retrieve IAM role - // credentials without a session token, you receive the IMDSv1 role credentials. If - // you retrieve IAM role credentials using a valid session token, you receive the - // IMDSv2 role credentials. - // - required - IMDSv2 is required. You must send a session token in your - // instance metadata retrieval requests. With this option, retrieving the IAM role - // credentials always returns IMDSv2 credentials; IMDSv1 credentials are not - // available. - // Default: If the value of ImdsSupport for the Amazon Machine Image (AMI) for - // your instance is v2.0 , the default is required . - HttpTokens LaunchTemplateHttpTokensState - - // Set to enabled to allow access to instance tags from the instance metadata. Set - // to disabled to turn off access to instance tags from the instance metadata. For - // more information, see Work with instance tags using the instance metadata (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS) - // . Default: disabled - InstanceMetadataTags LaunchTemplateInstanceMetadataTagsState - - noSmithyDocumentSerde -} - -// Describes a network interface. -type LaunchTemplateInstanceNetworkInterfaceSpecification struct { - - // Indicates whether to associate a Carrier IP address with eth0 for a new network - // interface. Use this option when you launch an instance in a Wavelength Zone and - // want to associate a Carrier IP address with the network interface. For more - // information about Carrier IP addresses, see Carrier IP addresses (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip) - // in the Wavelength Developer Guide. - AssociateCarrierIpAddress *bool - - // Indicates whether to associate a public IPv4 address with eth0 for a new - // network interface. Starting on February 1, 2024, Amazon Web Services will charge - // for all public IPv4 addresses, including public IPv4 addresses associated with - // running instances and Elastic IP addresses. For more information, see the Public - // IPv4 Address tab on the Amazon VPC pricing page (http://aws.amazon.com/vpc/pricing/) - // . - AssociatePublicIpAddress *bool - - // A security group connection tracking specification that enables you to set the - // timeout for connection tracking on an Elastic network interface. For more - // information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) - // in the Amazon Elastic Compute Cloud User Guide. - ConnectionTrackingSpecification *ConnectionTrackingSpecification - - // Indicates whether the network interface is deleted when the instance is - // terminated. - DeleteOnTermination *bool - - // A description for the network interface. - Description *string - - // The device index for the network interface attachment. - DeviceIndex *int32 - - // Contains the ENA Express settings for instances launched from your launch - // template. - EnaSrdSpecification *LaunchTemplateEnaSrdSpecification - - // The IDs of one or more security groups. - Groups []string - - // The type of network interface. - InterfaceType *string - - // The number of IPv4 prefixes that Amazon Web Services automatically assigned to - // the network interface. - Ipv4PrefixCount *int32 - - // One or more IPv4 prefixes assigned to the network interface. - Ipv4Prefixes []Ipv4PrefixSpecificationResponse - - // The number of IPv6 addresses for the network interface. - Ipv6AddressCount *int32 - - // The IPv6 addresses for the network interface. - Ipv6Addresses []InstanceIpv6Address - - // The number of IPv6 prefixes that Amazon Web Services automatically assigned to - // the network interface. - Ipv6PrefixCount *int32 - - // One or more IPv6 prefixes assigned to the network interface. - Ipv6Prefixes []Ipv6PrefixSpecificationResponse - - // The index of the network card. - NetworkCardIndex *int32 - - // The ID of the network interface. - NetworkInterfaceId *string - - // The primary IPv6 address of the network interface. When you enable an IPv6 GUA - // address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 - // address until the instance is terminated or the network interface is detached. - // For more information about primary IPv6 addresses, see RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // . - PrimaryIpv6 *bool - - // The primary private IPv4 address of the network interface. - PrivateIpAddress *string - - // One or more private IPv4 addresses. - PrivateIpAddresses []PrivateIpAddressSpecification - - // The number of secondary private IPv4 addresses for the network interface. - SecondaryPrivateIpAddressCount *int32 - - // The ID of the subnet for the network interface. - SubnetId *string - - noSmithyDocumentSerde -} - -// The parameters for a network interface. -type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { - - // Associates a Carrier IP address with eth0 for a new network interface. Use this - // option when you launch an instance in a Wavelength Zone and want to associate a - // Carrier IP address with the network interface. For more information about - // Carrier IP addresses, see Carrier IP addresses (https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip) - // in the Wavelength Developer Guide. - AssociateCarrierIpAddress *bool - - // Associates a public IPv4 address with eth0 for a new network interface. - // Starting on February 1, 2024, Amazon Web Services will charge for all public - // IPv4 addresses, including public IPv4 addresses associated with running - // instances and Elastic IP addresses. For more information, see the Public IPv4 - // Address tab on the Amazon VPC pricing page (http://aws.amazon.com/vpc/pricing/) . - AssociatePublicIpAddress *bool - - // A security group connection tracking specification that enables you to set the - // timeout for connection tracking on an Elastic network interface. For more - // information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) - // in the Amazon Elastic Compute Cloud User Guide. - ConnectionTrackingSpecification *ConnectionTrackingSpecificationRequest - - // Indicates whether the network interface is deleted when the instance is - // terminated. - DeleteOnTermination *bool - - // A description for the network interface. - Description *string - - // The device index for the network interface attachment. - DeviceIndex *int32 - - // Configure ENA Express settings for your launch template. - EnaSrdSpecification *EnaSrdSpecificationRequest - - // The IDs of one or more security groups. - Groups []string - - // The type of network interface. To create an Elastic Fabric Adapter (EFA), - // specify efa . For more information, see Elastic Fabric Adapter (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) - // in the Amazon Elastic Compute Cloud User Guide. If you are not creating an EFA, - // specify interface or omit this parameter. Valid values: interface | efa - InterfaceType *string - - // The number of IPv4 prefixes to be automatically assigned to the network - // interface. You cannot use this option if you use the Ipv4Prefix option. - Ipv4PrefixCount *int32 - - // One or more IPv4 prefixes to be assigned to the network interface. You cannot - // use this option if you use the Ipv4PrefixCount option. - Ipv4Prefixes []Ipv4PrefixSpecificationRequest - - // The number of IPv6 addresses to assign to a network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't use - // this option if specifying specific IPv6 addresses. - Ipv6AddressCount *int32 - - // One or more specific IPv6 addresses from the IPv6 CIDR block range of your - // subnet. You can't use this option if you're specifying a number of IPv6 - // addresses. - Ipv6Addresses []InstanceIpv6AddressRequest - - // The number of IPv6 prefixes to be automatically assigned to the network - // interface. You cannot use this option if you use the Ipv6Prefix option. - Ipv6PrefixCount *int32 - - // One or more IPv6 prefixes to be assigned to the network interface. You cannot - // use this option if you use the Ipv6PrefixCount option. - Ipv6Prefixes []Ipv6PrefixSpecificationRequest - - // The index of the network card. Some instance types support multiple network - // cards. The primary network interface must be assigned to network card index 0. - // The default is network card index 0. - NetworkCardIndex *int32 - - // The ID of the network interface. - NetworkInterfaceId *string - - // The primary IPv6 address of the network interface. When you enable an IPv6 GUA - // address to be a primary IPv6, the first IPv6 GUA will be made the primary IPv6 - // address until the instance is terminated or the network interface is detached. - // For more information about primary IPv6 addresses, see RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // . - PrimaryIpv6 *bool - - // The primary private IPv4 address of the network interface. - PrivateIpAddress *string - - // One or more private IPv4 addresses. - PrivateIpAddresses []PrivateIpAddressSpecification - - // The number of secondary private IPv4 addresses to assign to a network interface. - SecondaryPrivateIpAddressCount *int32 - - // The ID of the subnet for the network interface. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes a license configuration. -type LaunchTemplateLicenseConfiguration struct { - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string - - noSmithyDocumentSerde -} - -// Describes a license configuration. -type LaunchTemplateLicenseConfigurationRequest struct { - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string - - noSmithyDocumentSerde -} - -// Describes overrides for a launch template. -type LaunchTemplateOverrides struct { - - // The Availability Zone in which to launch the instances. - AvailabilityZone *string - - // The instance requirements. When you specify instance requirements, Amazon EC2 - // will identify instance types with the provided requirements, and then use your - // On-Demand and Spot allocation strategies to launch instances from these instance - // types, in the same way as when you specify a list of instance types. If you - // specify InstanceRequirements , you can't specify InstanceType . - InstanceRequirements *InstanceRequirements - - // The instance type. - InstanceType InstanceType - - // The priority for the launch template override. The highest priority is launched - // first. If OnDemandAllocationStrategy is set to prioritized , Spot Fleet uses - // priority to determine which launch template override to use first in fulfilling - // On-Demand capacity. If the Spot AllocationStrategy is set to - // capacityOptimizedPrioritized , Spot Fleet uses priority on a best-effort basis - // to determine which launch template override to use in fulfilling Spot capacity, - // but optimizes for capacity first. Valid values are whole numbers starting at 0 . - // The lower the number, the higher the priority. If no number is set, the launch - // template override has the lowest priority. You can set the same priority for - // different launch template overrides. - Priority *float64 - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - SpotPrice *string - - // The ID of the subnet in which to launch the instances. - SubnetId *string - - // The number of units provided by the specified instance type. - WeightedCapacity *float64 - - noSmithyDocumentSerde -} - -// Describes the placement of an instance. -type LaunchTemplatePlacement struct { - - // The affinity setting for the instance on the Dedicated Host. - Affinity *string - - // The Availability Zone of the instance. - AvailabilityZone *string - - // The Group ID of the placement group. You must specify the Placement Group Group - // ID to launch an instance in a shared placement group. - GroupId *string - - // The name of the placement group for the instance. - GroupName *string - - // The ID of the Dedicated Host for the instance. - HostId *string - - // The ARN of the host resource group in which to launch the instances. - HostResourceGroupArn *string - - // The number of the partition the instance should launch in. Valid only if the - // placement group strategy is set to partition . - PartitionNumber *int32 - - // Reserved for future use. - SpreadDomain *string - - // The tenancy of the instance. An instance with a tenancy of dedicated runs on - // single-tenant hardware. - Tenancy Tenancy - - noSmithyDocumentSerde -} - -// Describes the placement of an instance. -type LaunchTemplatePlacementRequest struct { - - // The affinity setting for an instance on a Dedicated Host. - Affinity *string - - // The Availability Zone for the instance. - AvailabilityZone *string - - // The Group Id of a placement group. You must specify the Placement Group Group - // Id to launch an instance in a shared placement group. - GroupId *string - - // The name of the placement group for the instance. - GroupName *string - - // The ID of the Dedicated Host for the instance. - HostId *string - - // The ARN of the host resource group in which to launch the instances. If you - // specify a host resource group ARN, omit the Tenancy parameter or set it to host . - HostResourceGroupArn *string - - // The number of the partition the instance should launch in. Valid only if the - // placement group strategy is set to partition . - PartitionNumber *int32 - - // Reserved for future use. - SpreadDomain *string - - // The tenancy of the instance. An instance with a tenancy of dedicated runs on - // single-tenant hardware. - Tenancy Tenancy - - noSmithyDocumentSerde -} - -// Describes the options for instance hostnames. -type LaunchTemplatePrivateDnsNameOptions struct { - - // Indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - EnableResourceNameDnsAAAARecord *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecord *bool - - // The type of hostname to assign to an instance. - HostnameType HostnameType - - noSmithyDocumentSerde -} - -// Describes the options for instance hostnames. -type LaunchTemplatePrivateDnsNameOptionsRequest struct { - - // Indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - EnableResourceNameDnsAAAARecord *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecord *bool - - // The type of hostname for Amazon EC2 instances. For IPv4 only subnets, an - // instance DNS name must be based on the instance IPv4 address. For IPv6 native - // subnets, an instance DNS name must be based on the instance ID. For dual-stack - // subnets, you can specify whether DNS names use the instance IPv4 address or the - // instance ID. - HostnameType HostnameType - - noSmithyDocumentSerde -} - -// Describes the monitoring for the instance. -type LaunchTemplatesMonitoring struct { - - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes the monitoring for the instance. -type LaunchTemplatesMonitoringRequest struct { - - // Specify true to enable detailed monitoring. Otherwise, basic monitoring is - // enabled. - Enabled *bool - - noSmithyDocumentSerde -} - -// The launch template to use. You must specify either the launch template ID or -// launch template name in the request, but not both. -type LaunchTemplateSpecification struct { - - // The ID of the launch template. You must specify the LaunchTemplateId or the - // LaunchTemplateName , but not both. - LaunchTemplateId *string - - // The name of the launch template. You must specify the LaunchTemplateName or the - // LaunchTemplateId , but not both. - LaunchTemplateName *string - - // The launch template version number, $Latest , or $Default . If the value is - // $Latest , Amazon EC2 uses the latest version of the launch template. If the - // value is $Default , Amazon EC2 uses the default version of the launch template. - // Default: The default version of the launch template. - Version *string - - noSmithyDocumentSerde -} - -// The options for Spot Instances. -type LaunchTemplateSpotMarketOptions struct { - - // The required duration for the Spot Instances (also known as Spot blocks), in - // minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360). - BlockDurationMinutes *int32 - - // The behavior when a Spot Instance is interrupted. - InstanceInterruptionBehavior InstanceInterruptionBehavior - - // The maximum hourly price you're willing to pay for the Spot Instances. We do - // not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. If you specify a maximum price, your Spot Instances will be - // interrupted more frequently than if you do not specify this parameter. - MaxPrice *string - - // The Spot Instance request type. - SpotInstanceType SpotInstanceType - - // The end date of the request. For a one-time request, the request remains active - // until all instances launch, the request is canceled, or this date is reached. If - // the request is persistent, it remains active until it is canceled or this date - // and time is reached. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// The options for Spot Instances. -type LaunchTemplateSpotMarketOptionsRequest struct { - - // Deprecated. - BlockDurationMinutes *int32 - - // The behavior when a Spot Instance is interrupted. The default is terminate . - InstanceInterruptionBehavior InstanceInterruptionBehavior - - // The maximum hourly price you're willing to pay for the Spot Instances. We do - // not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. If you specify a maximum price, your Spot Instances will be - // interrupted more frequently than if you do not specify this parameter. - MaxPrice *string - - // The Spot Instance request type. - SpotInstanceType SpotInstanceType - - // The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported - // only for persistent requests. - // - For a persistent request, the request remains active until the ValidUntil - // date and time is reached. Otherwise, the request remains active until you cancel - // it. - // - For a one-time request, ValidUntil is not supported. The request remains - // active until all instances launch or you cancel the request. - // Default: 7 days from the current date - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// The tags specification for the launch template. -type LaunchTemplateTagSpecification struct { - - // The type of resource to tag. - ResourceType ResourceType - - // The tags for the resource. - Tags []Tag - - noSmithyDocumentSerde -} - -// The tags specification for the resources that are created during instance -// launch. -type LaunchTemplateTagSpecificationRequest struct { - - // The type of resource to tag. Valid Values lists all resource types for Amazon - // EC2 that can be tagged. When you create a launch template, you can specify tags - // for the following resource types only: instance | volume | network-interface | - // spot-instances-request . If the instance does not include the resource type that - // you specify, the instance launch fails. For example, not all instance types - // include a volume. To tag a resource after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html) - // . - ResourceType ResourceType - - // The tags to apply to the resource. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a launch template version. -type LaunchTemplateVersion struct { - - // The time the version was created. - CreateTime *time.Time - - // The principal that created the version. - CreatedBy *string - - // Indicates whether the version is the default version. - DefaultVersion *bool - - // Information about the launch template. - LaunchTemplateData *ResponseLaunchTemplateData - - // The ID of the launch template. - LaunchTemplateId *string - - // The name of the launch template. - LaunchTemplateName *string - - // The description for the version. - VersionDescription *string - - // The version number. - VersionNumber *int64 - - noSmithyDocumentSerde -} - -// Describes a license configuration. -type LicenseConfiguration struct { - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string - - noSmithyDocumentSerde -} - -// Describes a license configuration. -type LicenseConfigurationRequest struct { - - // The Amazon Resource Name (ARN) of the license configuration. - LicenseConfigurationArn *string - - noSmithyDocumentSerde -} - -// Describes the Classic Load Balancers and target groups to attach to a Spot -// Fleet request. -type LoadBalancersConfig struct { - - // The Classic Load Balancers. - ClassicLoadBalancersConfig *ClassicLoadBalancersConfig - - // The target groups. - TargetGroupsConfig *TargetGroupsConfig - - noSmithyDocumentSerde -} - -// Describes a load permission. -type LoadPermission struct { - - // The name of the group. - Group PermissionGroup - - // The Amazon Web Services account ID. - UserId *string - - noSmithyDocumentSerde -} - -// Describes modifications to the load permissions of an Amazon FPGA image (AFI). -type LoadPermissionModifications struct { - - // The load permissions to add. - Add []LoadPermissionRequest - - // The load permissions to remove. - Remove []LoadPermissionRequest - - noSmithyDocumentSerde -} - -// Describes a load permission. -type LoadPermissionRequest struct { - - // The name of the group. - Group PermissionGroup - - // The Amazon Web Services account ID. - UserId *string - - noSmithyDocumentSerde -} - -// Describes a local gateway. -type LocalGateway struct { - - // The ID of the local gateway. - LocalGatewayId *string - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The ID of the Amazon Web Services account that owns the local gateway. - OwnerId *string - - // The state of the local gateway. - State *string - - // The tags assigned to the local gateway. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a route for a local gateway route table. -type LocalGatewayRoute struct { - - // The ID of the customer-owned address pool. - CoipPoolId *string - - // The CIDR block used for destination matches. - DestinationCidrBlock *string - - // The ID of the prefix list. - DestinationPrefixListId *string - - // The Amazon Resource Name (ARN) of the local gateway route table. - LocalGatewayRouteTableArn *string - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - // The ID of the virtual interface group. - LocalGatewayVirtualInterfaceGroupId *string - - // The ID of the network interface. - NetworkInterfaceId *string - - // The ID of the Amazon Web Services account that owns the local gateway route. - OwnerId *string - - // The state of the route. - State LocalGatewayRouteState - - // The ID of the subnet. - SubnetId *string - - // The route type. - Type LocalGatewayRouteType - - noSmithyDocumentSerde -} - -// Describes a local gateway route table. -type LocalGatewayRouteTable struct { - - // The ID of the local gateway. - LocalGatewayId *string - - // The Amazon Resource Name (ARN) of the local gateway route table. - LocalGatewayRouteTableArn *string - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - // The mode of the local gateway route table. - Mode LocalGatewayRouteTableMode - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The ID of the Amazon Web Services account that owns the local gateway route - // table. - OwnerId *string - - // The state of the local gateway route table. - State *string - - // Information about the state change. - StateReason *StateReason - - // The tags assigned to the local gateway route table. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an association between a local gateway route table and a virtual -// interface group. -type LocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { - - // The ID of the local gateway. - LocalGatewayId *string - - // The Amazon Resource Name (ARN) of the local gateway route table for the virtual - // interface group. - LocalGatewayRouteTableArn *string - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - // The ID of the association. - LocalGatewayRouteTableVirtualInterfaceGroupAssociationId *string - - // The ID of the virtual interface group. - LocalGatewayVirtualInterfaceGroupId *string - - // The ID of the Amazon Web Services account that owns the local gateway virtual - // interface group association. - OwnerId *string - - // The state of the association. - State *string - - // The tags assigned to the association. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes an association between a local gateway route table and a VPC. -type LocalGatewayRouteTableVpcAssociation struct { - - // The ID of the local gateway. - LocalGatewayId *string - - // The Amazon Resource Name (ARN) of the local gateway route table for the - // association. - LocalGatewayRouteTableArn *string - - // The ID of the local gateway route table. - LocalGatewayRouteTableId *string - - // The ID of the association. - LocalGatewayRouteTableVpcAssociationId *string - - // The ID of the Amazon Web Services account that owns the local gateway route - // table for the association. - OwnerId *string - - // The state of the association. - State *string - - // The tags assigned to the association. - Tags []Tag - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes a local gateway virtual interface. -type LocalGatewayVirtualInterface struct { - - // The local address. - LocalAddress *string - - // The Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the local - // gateway. - LocalBgpAsn *int32 - - // The ID of the local gateway. - LocalGatewayId *string - - // The ID of the virtual interface. - LocalGatewayVirtualInterfaceId *string - - // The ID of the Amazon Web Services account that owns the local gateway virtual - // interface. - OwnerId *string - - // The peer address. - PeerAddress *string - - // The peer BGP ASN. - PeerBgpAsn *int32 - - // The tags assigned to the virtual interface. - Tags []Tag - - // The ID of the VLAN. - Vlan *int32 - - noSmithyDocumentSerde -} - -// Describes a local gateway virtual interface group. -type LocalGatewayVirtualInterfaceGroup struct { - - // The ID of the local gateway. - LocalGatewayId *string - - // The ID of the virtual interface group. - LocalGatewayVirtualInterfaceGroupId *string - - // The IDs of the virtual interfaces. - LocalGatewayVirtualInterfaceIds []string - - // The ID of the Amazon Web Services account that owns the local gateway virtual - // interface group. - OwnerId *string - - // The tags assigned to the virtual interface group. - Tags []Tag - - noSmithyDocumentSerde -} - -// Information about a locked snapshot. -type LockedSnapshotsInfo struct { - - // The compliance mode cooling-off period, in hours. - CoolOffPeriod *int32 - - // The date and time at which the compliance mode cooling-off period expires, in - // the UTC time zone ( YYYY-MM-DDThh:mm:ss.sssZ ). - CoolOffPeriodExpiresOn *time.Time - - // The date and time at which the snapshot was locked, in the UTC time zone ( - // YYYY-MM-DDThh:mm:ss.sssZ ). - LockCreatedOn *time.Time - - // The period of time for which the snapshot is locked, in days. - LockDuration *int32 - - // The date and time at which the lock duration started, in the UTC time zone ( - // YYYY-MM-DDThh:mm:ss.sssZ ). If you lock a snapshot that is in the pending - // state, the lock duration starts only once the snapshot enters the completed - // state. - LockDurationStartTime *time.Time - - // The date and time at which the lock will expire, in the UTC time zone ( - // YYYY-MM-DDThh:mm:ss.sssZ ). - LockExpiresOn *time.Time - - // The state of the snapshot lock. Valid states include: - // - compliance-cooloff - The snapshot has been locked in compliance mode but it - // is still within the cooling-off period. The snapshot can't be deleted, but it - // can be unlocked and the lock settings can be modified by users with appropriate - // permissions. - // - governance - The snapshot is locked in governance mode. The snapshot can't - // be deleted, but it can be unlocked and the lock settings can be modified by - // users with appropriate permissions. - // - compliance - The snapshot is locked in compliance mode and the cooling-off - // period has expired. The snapshot can't be unlocked or deleted. The lock duration - // can only be increased by users with appropriate permissions. - // - expired - The snapshot was locked in compliance or governance mode but the - // lock duration has expired. The snapshot is not locked and can be deleted. - LockState LockState - - // The account ID of the Amazon Web Services account that owns the snapshot. - OwnerId *string - - // The ID of the snapshot. - SnapshotId *string - - noSmithyDocumentSerde -} - -// Details for Site-to-Site VPN tunnel endpoint maintenance events. -type MaintenanceDetails struct { - - // Timestamp of last applied maintenance. - LastMaintenanceApplied *time.Time - - // The timestamp after which Amazon Web Services will automatically apply - // maintenance. - MaintenanceAutoAppliedAfter *time.Time - - // Verify existence of a pending maintenance. - PendingMaintenance *string - - noSmithyDocumentSerde -} - -// Describes a managed prefix list. -type ManagedPrefixList struct { - - // The IP address version. - AddressFamily *string - - // The maximum number of entries for the prefix list. - MaxEntries *int32 - - // The ID of the owner of the prefix list. - OwnerId *string - - // The Amazon Resource Name (ARN) for the prefix list. - PrefixListArn *string - - // The ID of the prefix list. - PrefixListId *string - - // The name of the prefix list. - PrefixListName *string - - // The current state of the prefix list. - State PrefixListState - - // The state message. - StateMessage *string - - // The tags for the prefix list. - Tags []Tag - - // The version of the prefix list. - Version *int64 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of memory per vCPU, in GiB. -type MemoryGiBPerVCpu struct { - - // The maximum amount of memory per vCPU, in GiB. If this parameter is not - // specified, there is no maximum limit. - Max *float64 - - // The minimum amount of memory per vCPU, in GiB. If this parameter is not - // specified, there is no minimum limit. - Min *float64 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of memory per vCPU, in GiB. -type MemoryGiBPerVCpuRequest struct { - - // The maximum amount of memory per vCPU, in GiB. To specify no maximum limit, - // omit this parameter. - Max *float64 - - // The minimum amount of memory per vCPU, in GiB. To specify no minimum limit, - // omit this parameter. - Min *float64 - - noSmithyDocumentSerde -} - -// Describes the memory for the instance type. -type MemoryInfo struct { - - // The size of the memory, in MiB. - SizeInMiB *int64 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of memory, in MiB. -type MemoryMiB struct { - - // The maximum amount of memory, in MiB. If this parameter is not specified, there - // is no maximum limit. - Max *int32 - - // The minimum amount of memory, in MiB. If this parameter is not specified, there - // is no minimum limit. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of memory, in MiB. -type MemoryMiBRequest struct { - - // The minimum amount of memory, in MiB. To specify no minimum limit, specify 0 . - // - // This member is required. - Min *int32 - - // The maximum amount of memory, in MiB. To specify no maximum limit, omit this - // parameter. - Max *int32 - - noSmithyDocumentSerde -} - -// Indicates whether the network was healthy or degraded at a particular point. -// The value is aggregated from the startDate to the endDate . Currently only -// five_minutes is supported. -type MetricPoint struct { - - // The end date for the metric point. The ending time must be formatted as - // yyyy-mm-ddThh:mm:ss . For example, 2022-06-12T12:00:00.000Z . - EndDate *time.Time - - // The start date for the metric point. The starting date for the metric point. - // The starting time must be formatted as yyyy-mm-ddThh:mm:ss . For example, - // 2022-06-10T12:00:00.000Z . - StartDate *time.Time - - // The status of the metric point. - Status *string - - Value *float32 - - noSmithyDocumentSerde -} - -// The transit gateway options. -type ModifyTransitGatewayOptions struct { - - // Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 CIDR - // block or larger for IPv4, or a size /64 CIDR block or larger for IPv6. - AddTransitGatewayCidrBlocks []string - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for - // 32-bit ASNs. The modify ASN operation is not allowed on a transit gateway with - // active BGP sessions. You must first delete all transit gateway attachments that - // have BGP configured prior to modifying the ASN on the transit gateway. - AmazonSideAsn *int64 - - // The ID of the default association route table. - AssociationDefaultRouteTableId *string - - // Enable or disable automatic acceptance of attachment requests. - AutoAcceptSharedAttachments AutoAcceptSharedAttachmentsValue - - // Enable or disable automatic association with the default association route - // table. - DefaultRouteTableAssociation DefaultRouteTableAssociationValue - - // Enable or disable automatic propagation of routes to the default propagation - // route table. - DefaultRouteTablePropagation DefaultRouteTablePropagationValue - - // Enable or disable DNS support. - DnsSupport DnsSupportValue - - // The ID of the default propagation route table. - PropagationDefaultRouteTableId *string - - // Removes CIDR blocks for the transit gateway. - RemoveTransitGatewayCidrBlocks []string - - // Enables you to reference a security group across VPCs attached to a transit - // gateway (TGW). Use this option to simplify security group management and control - // of instance-to-instance traffic across VPCs that are connected by transit - // gateway. You can also use this option to migrate from VPC peering (which was the - // only option that supported security group referencing) to transit gateways - // (which now also support security group referencing). This option is disabled by - // default and there are no additional costs to use this feature. For important - // information about this feature, see Create a transit gateway (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-transit-gateways.html#create-tgw) - // in the Amazon Web Services Transit Gateway Guide. - SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue - - // Enable or disable Equal Cost Multipath Protocol support. - VpnEcmpSupport VpnEcmpSupportValue - - noSmithyDocumentSerde -} - -// Describes the options for a VPC attachment. -type ModifyTransitGatewayVpcAttachmentRequestOptions struct { - - // Enable or disable support for appliance mode. If enabled, a traffic flow - // between a source and destination uses the same Availability Zone for the VPC - // attachment for the lifetime of that flow. The default is disable . - ApplianceModeSupport ApplianceModeSupportValue - - // Enable or disable DNS support. The default is enable . - DnsSupport DnsSupportValue - - // Enable or disable IPv6 support. The default is enable . - Ipv6Support Ipv6SupportValue - - // Enables you to reference a security group across VPCs attached to a transit - // gateway (TGW). Use this option to simplify security group management and control - // of instance-to-instance traffic across VPCs that are connected by transit - // gateway. You can also use this option to migrate from VPC peering (which was the - // only option that supported security group referencing) to transit gateways - // (which now also support security group referencing). This option is disabled by - // default and there are no additional costs to use this feature. For important - // information about this feature, see Create a transit gateway attachment to a VPC (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-vpc-attachments.html#create-vpc-attachment) - // in the Amazon Web Services Transit Gateway Guide. - SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue - - noSmithyDocumentSerde -} - -// Describes the options when modifying a Verified Access endpoint with the -// network-interface type. -type ModifyVerifiedAccessEndpointEniOptions struct { - - // The IP port number. - Port *int32 - - // The IP protocol. - Protocol VerifiedAccessEndpointProtocol - - noSmithyDocumentSerde -} - -// Describes a load balancer when creating an Amazon Web Services Verified Access -// endpoint using the load-balancer type. -type ModifyVerifiedAccessEndpointLoadBalancerOptions struct { - - // The IP port number. - Port *int32 - - // The IP protocol. - Protocol VerifiedAccessEndpointProtocol - - // The IDs of the subnets. - SubnetIds []string - - noSmithyDocumentSerde -} - -// Modifies the configuration of the specified device-based Amazon Web Services -// Verified Access trust provider. -type ModifyVerifiedAccessTrustProviderDeviceOptions struct { - - // The URL Amazon Web Services Verified Access will use to verify the authenticity - // of the device tokens. - PublicSigningKeyUrl *string - - noSmithyDocumentSerde -} - -// Options for an OpenID Connect-compatible user-identity trust provider. -type ModifyVerifiedAccessTrustProviderOidcOptions struct { - - // The OIDC authorization endpoint. - AuthorizationEndpoint *string - - // The client identifier. - ClientId *string - - // The client secret. - ClientSecret *string - - // The OIDC issuer. - Issuer *string - - // OpenID Connect (OIDC) scopes are used by an application during authentication - // to authorize access to a user's details. Each scope returns a specific set of - // user attributes. - Scope *string - - // The OIDC token endpoint. - TokenEndpoint *string - - // The OIDC user info endpoint. - UserInfoEndpoint *string - - noSmithyDocumentSerde -} - -// The Amazon Web Services Site-to-Site VPN tunnel options to modify. -type ModifyVpnTunnelOptionsSpecification struct { - - // The action to take after DPD timeout occurs. Specify restart to restart the IKE - // initiation. Specify clear to end the IKE session. Valid Values: clear | none | - // restart Default: clear - DPDTimeoutAction *string - - // The number of seconds after which a DPD timeout occurs. A DPD timeout of 40 - // seconds means that the VPN endpoint will consider the peer dead 30 seconds after - // the first failed keep-alive. Constraints: A value greater than or equal to 30. - // Default: 40 - DPDTimeoutSeconds *int32 - - // Turn on or off tunnel endpoint lifecycle control feature. - EnableTunnelLifecycleControl *bool - - // The IKE versions that are permitted for the VPN tunnel. Valid values: ikev1 | - // ikev2 - IKEVersions []IKEVersionsRequestListValue - - // Options for logging VPN tunnel activity. - LogOptions *VpnTunnelLogOptionsSpecification - - // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel - // for phase 1 IKE negotiations. Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 - // | 21 | 22 | 23 | 24 - Phase1DHGroupNumbers []Phase1DHGroupNumbersRequestListValue - - // One or more encryption algorithms that are permitted for the VPN tunnel for - // phase 1 IKE negotiations. Valid values: AES128 | AES256 | AES128-GCM-16 | - // AES256-GCM-16 - Phase1EncryptionAlgorithms []Phase1EncryptionAlgorithmsRequestListValue - - // One or more integrity algorithms that are permitted for the VPN tunnel for - // phase 1 IKE negotiations. Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512 - Phase1IntegrityAlgorithms []Phase1IntegrityAlgorithmsRequestListValue - - // The lifetime for phase 1 of the IKE negotiation, in seconds. Constraints: A - // value between 900 and 28,800. Default: 28800 - Phase1LifetimeSeconds *int32 - - // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel - // for phase 2 IKE negotiations. Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 - // | 20 | 21 | 22 | 23 | 24 - Phase2DHGroupNumbers []Phase2DHGroupNumbersRequestListValue - - // One or more encryption algorithms that are permitted for the VPN tunnel for - // phase 2 IKE negotiations. Valid values: AES128 | AES256 | AES128-GCM-16 | - // AES256-GCM-16 - Phase2EncryptionAlgorithms []Phase2EncryptionAlgorithmsRequestListValue - - // One or more integrity algorithms that are permitted for the VPN tunnel for - // phase 2 IKE negotiations. Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512 - Phase2IntegrityAlgorithms []Phase2IntegrityAlgorithmsRequestListValue - - // The lifetime for phase 2 of the IKE negotiation, in seconds. Constraints: A - // value between 900 and 3,600. The value must be less than the value for - // Phase1LifetimeSeconds . Default: 3600 - Phase2LifetimeSeconds *int32 - - // The pre-shared key (PSK) to establish initial authentication between the - // virtual private gateway and the customer gateway. Constraints: Allowed - // characters are alphanumeric characters, periods (.), and underscores (_). Must - // be between 8 and 64 characters in length and cannot start with zero (0). - PreSharedKey *string - - // The percentage of the rekey window (determined by RekeyMarginTimeSeconds ) - // during which the rekey time is randomly selected. Constraints: A value between 0 - // and 100. Default: 100 - RekeyFuzzPercentage *int32 - - // The margin time, in seconds, before the phase 2 lifetime expires, during which - // the Amazon Web Services side of the VPN connection performs an IKE rekey. The - // exact time of the rekey is randomly selected based on the value for - // RekeyFuzzPercentage . Constraints: A value between 60 and half of - // Phase2LifetimeSeconds . Default: 270 - RekeyMarginTimeSeconds *int32 - - // The number of packets in an IKE replay window. Constraints: A value between 64 - // and 2048. Default: 1024 - ReplayWindowSize *int32 - - // The action to take when the establishing the tunnel for the VPN connection. By - // default, your customer gateway device must initiate the IKE negotiation and - // bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE - // negotiation. Valid Values: add | start Default: add - StartupAction *string - - // The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks - // must be unique across all VPN connections that use the same virtual private - // gateway. Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The - // following CIDR blocks are reserved and cannot be used: - // - 169.254.0.0/30 - // - 169.254.1.0/30 - // - 169.254.2.0/30 - // - 169.254.3.0/30 - // - 169.254.4.0/30 - // - 169.254.5.0/30 - // - 169.254.169.252/30 - TunnelInsideCidr *string - - // The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks - // must be unique across all VPN connections that use the same transit gateway. - // Constraints: A size /126 CIDR block from the local fd00::/8 range. - TunnelInsideIpv6Cidr *string - - noSmithyDocumentSerde -} - -// Describes the monitoring of an instance. -type Monitoring struct { - - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - State MonitoringState - - noSmithyDocumentSerde -} - -// This action is deprecated. Describes the status of a moving Elastic IP address. -type MovingAddressStatus struct { - - // The status of the Elastic IP address that's being moved or restored. - MoveStatus MoveStatus - - // The Elastic IP address. - PublicIp *string - - noSmithyDocumentSerde -} - -// Describes a NAT gateway. -type NatGateway struct { - - // Indicates whether the NAT gateway supports public or private connectivity. - ConnectivityType ConnectivityType - - // The date and time the NAT gateway was created. - CreateTime *time.Time - - // The date and time the NAT gateway was deleted, if applicable. - DeleteTime *time.Time - - // If the NAT gateway could not be created, specifies the error code for the - // failure. ( InsufficientFreeAddressesInSubnet | Gateway.NotAttached | - // InvalidAllocationID.NotFound | Resource.AlreadyAssociated | InternalError | - // InvalidSubnetID.NotFound ) - FailureCode *string - - // If the NAT gateway could not be created, specifies the error message for the - // failure, that corresponds to the error code. - // - For InsufficientFreeAddressesInSubnet: "Subnet has insufficient free - // addresses to create this NAT gateway" - // - For Gateway.NotAttached: "Network vpc-xxxxxxxx has no Internet gateway - // attached" - // - For InvalidAllocationID.NotFound: "Elastic IP address eipalloc-xxxxxxxx - // could not be associated with this NAT gateway" - // - For Resource.AlreadyAssociated: "Elastic IP address eipalloc-xxxxxxxx is - // already associated" - // - For InternalError: "Network interface eni-xxxxxxxx, created and used - // internally by this NAT gateway is in an invalid state. Please try again." - // - For InvalidSubnetID.NotFound: "The specified subnet subnet-xxxxxxxx does - // not exist or could not be found." - FailureMessage *string - - // Information about the IP addresses and network interface associated with the - // NAT gateway. - NatGatewayAddresses []NatGatewayAddress - - // The ID of the NAT gateway. - NatGatewayId *string - - // Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) - // , contact us through the Support Center (https://console.aws.amazon.com/support/home?) - // . - ProvisionedBandwidth *ProvisionedBandwidth - - // The state of the NAT gateway. - // - pending : The NAT gateway is being created and is not ready to process - // traffic. - // - failed : The NAT gateway could not be created. Check the failureCode and - // failureMessage fields for the reason. - // - available : The NAT gateway is able to process traffic. This status remains - // until you delete the NAT gateway, and does not indicate the health of the NAT - // gateway. - // - deleting : The NAT gateway is in the process of being terminated and may - // still be processing traffic. - // - deleted : The NAT gateway has been terminated and is no longer processing - // traffic. - State NatGatewayState - - // The ID of the subnet in which the NAT gateway is located. - SubnetId *string - - // The tags for the NAT gateway. - Tags []Tag - - // The ID of the VPC in which the NAT gateway is located. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes the IP addresses and network interface associated with a NAT gateway. -type NatGatewayAddress struct { - - // [Public NAT gateway only] The allocation ID of the Elastic IP address that's - // associated with the NAT gateway. - AllocationId *string - - // [Public NAT gateway only] The association ID of the Elastic IP address that's - // associated with the NAT gateway. - AssociationId *string - - // The address failure message. - FailureMessage *string - - // Defines if the IP address is the primary address. - IsPrimary *bool - - // The ID of the network interface associated with the NAT gateway. - NetworkInterfaceId *string - - // The private IP address associated with the NAT gateway. - PrivateIp *string - - // [Public NAT gateway only] The Elastic IP address associated with the NAT - // gateway. - PublicIp *string - - // The address status. - Status NatGatewayAddressStatus - - noSmithyDocumentSerde -} - -// Describes a network ACL. -type NetworkAcl struct { - - // Any associations between the network ACL and one or more subnets - Associations []NetworkAclAssociation - - // The entries (rules) in the network ACL. - Entries []NetworkAclEntry - - // Indicates whether this is the default network ACL for the VPC. - IsDefault *bool - - // The ID of the network ACL. - NetworkAclId *string - - // The ID of the Amazon Web Services account that owns the network ACL. - OwnerId *string - - // Any tags assigned to the network ACL. - Tags []Tag - - // The ID of the VPC for the network ACL. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes an association between a network ACL and a subnet. -type NetworkAclAssociation struct { - - // The ID of the association between a network ACL and a subnet. - NetworkAclAssociationId *string - - // The ID of the network ACL. - NetworkAclId *string - - // The ID of the subnet. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes an entry in a network ACL. -type NetworkAclEntry struct { - - // The IPv4 network range to allow or deny, in CIDR notation. - CidrBlock *string - - // Indicates whether the rule is an egress rule (applied to traffic leaving the - // subnet). - Egress *bool - - // ICMP protocol: The ICMP type and code. - IcmpTypeCode *IcmpTypeCode - - // The IPv6 network range to allow or deny, in CIDR notation. - Ipv6CidrBlock *string - - // TCP or UDP protocols: The range of ports the rule applies to. - PortRange *PortRange - - // The protocol number. A value of "-1" means all protocols. - Protocol *string - - // Indicates whether to allow or deny the traffic that matches the rule. - RuleAction RuleAction - - // The rule number for the entry. ACL entries are processed in ascending order by - // rule number. - RuleNumber *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of network bandwidth, in gigabits per second -// (Gbps). Setting the minimum bandwidth does not guarantee that your instance will -// achieve the minimum bandwidth. Amazon EC2 will identify instance types that -// support the specified minimum bandwidth, but the actual bandwidth of your -// instance might go below the specified minimum at times. For more information, -// see Available instance bandwidth (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-bandwidth) -// in the Amazon EC2 User Guide. -type NetworkBandwidthGbps struct { - - // The maximum amount of network bandwidth, in Gbps. If this parameter is not - // specified, there is no maximum limit. - Max *float64 - - // The minimum amount of network bandwidth, in Gbps. If this parameter is not - // specified, there is no minimum limit. - Min *float64 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of network bandwidth, in gigabits per second -// (Gbps). Setting the minimum bandwidth does not guarantee that your instance will -// achieve the minimum bandwidth. Amazon EC2 will identify instance types that -// support the specified minimum bandwidth, but the actual bandwidth of your -// instance might go below the specified minimum at times. For more information, -// see Available instance bandwidth (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-network-bandwidth.html#available-instance-bandwidth) -// in the Amazon EC2 User Guide. -type NetworkBandwidthGbpsRequest struct { - - // The maximum amount of network bandwidth, in Gbps. To specify no maximum limit, - // omit this parameter. - Max *float64 - - // The minimum amount of network bandwidth, in Gbps. To specify no minimum limit, - // omit this parameter. - Min *float64 - - noSmithyDocumentSerde -} - -// Describes the network card support of the instance type. -type NetworkCardInfo struct { - - // The baseline network performance of the network card, in Gbps. - BaselineBandwidthInGbps *float64 - - // The maximum number of network interfaces for the network card. - MaximumNetworkInterfaces *int32 - - // The index of the network card. - NetworkCardIndex *int32 - - // The network performance of the network card. - NetworkPerformance *string - - // The peak (burst) network performance of the network card, in Gbps. - PeakBandwidthInGbps *float64 - - noSmithyDocumentSerde -} - -// Describes the networking features of the instance type. -type NetworkInfo struct { - - // The index of the default network card, starting at 0. - DefaultNetworkCardIndex *int32 - - // Describes the Elastic Fabric Adapters for the instance type. - EfaInfo *EfaInfo - - // Indicates whether Elastic Fabric Adapter (EFA) is supported. - EfaSupported *bool - - // Indicates whether the instance type supports ENA Express. ENA Express uses - // Amazon Web Services Scalable Reliable Datagram (SRD) technology to increase the - // maximum bandwidth used per stream and minimize tail latency of network traffic - // between EC2 instances. - EnaSrdSupported *bool - - // Indicates whether Elastic Network Adapter (ENA) is supported. - EnaSupport EnaSupport - - // Indicates whether the instance type automatically encrypts in-transit traffic - // between instances. - EncryptionInTransitSupported *bool - - // The maximum number of IPv4 addresses per network interface. - Ipv4AddressesPerInterface *int32 - - // The maximum number of IPv6 addresses per network interface. - Ipv6AddressesPerInterface *int32 - - // Indicates whether IPv6 is supported. - Ipv6Supported *bool - - // The maximum number of physical network cards that can be allocated to the - // instance. - MaximumNetworkCards *int32 - - // The maximum number of network interfaces for the instance type. - MaximumNetworkInterfaces *int32 - - // Describes the network cards for the instance type. - NetworkCards []NetworkCardInfo - - // The network performance. - NetworkPerformance *string - - noSmithyDocumentSerde -} - -// Describes a Network Access Scope. -type NetworkInsightsAccessScope struct { - - // The creation date. - CreatedDate *time.Time - - // The Amazon Resource Name (ARN) of the Network Access Scope. - NetworkInsightsAccessScopeArn *string - - // The ID of the Network Access Scope. - NetworkInsightsAccessScopeId *string - - // The tags. - Tags []Tag - - // The last updated date. - UpdatedDate *time.Time - - noSmithyDocumentSerde -} - -// Describes a Network Access Scope analysis. -type NetworkInsightsAccessScopeAnalysis struct { - - // The number of network interfaces analyzed. - AnalyzedEniCount *int32 - - // The analysis end date. - EndDate *time.Time - - // Indicates whether there are findings. - FindingsFound FindingsFound - - // The Amazon Resource Name (ARN) of the Network Access Scope analysis. - NetworkInsightsAccessScopeAnalysisArn *string - - // The ID of the Network Access Scope analysis. - NetworkInsightsAccessScopeAnalysisId *string - - // The ID of the Network Access Scope. - NetworkInsightsAccessScopeId *string - - // The analysis start date. - StartDate *time.Time - - // The status. - Status AnalysisStatus - - // The status message. - StatusMessage *string - - // The tags. - Tags []Tag - - // The warning message. - WarningMessage *string - - noSmithyDocumentSerde -} - -// Describes the Network Access Scope content. -type NetworkInsightsAccessScopeContent struct { - - // The paths to exclude. - ExcludePaths []AccessScopePath - - // The paths to match. - MatchPaths []AccessScopePath - - // The ID of the Network Access Scope. - NetworkInsightsAccessScopeId *string - - noSmithyDocumentSerde -} - -// Describes a network insights analysis. -type NetworkInsightsAnalysis struct { - - // The member accounts that contain resources that the path can traverse. - AdditionalAccounts []string - - // Potential intermediate components. - AlternatePathHints []AlternatePathHint - - // The explanations. For more information, see Reachability Analyzer explanation - // codes (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html) - // . - Explanations []Explanation - - // The Amazon Resource Names (ARN) of the resources that the path must traverse. - FilterInArns []string - - // The components in the path from source to destination. - ForwardPathComponents []PathComponent - - // The Amazon Resource Name (ARN) of the network insights analysis. - NetworkInsightsAnalysisArn *string - - // The ID of the network insights analysis. - NetworkInsightsAnalysisId *string - - // The ID of the path. - NetworkInsightsPathId *string - - // Indicates whether the destination is reachable from the source. - NetworkPathFound *bool - - // The components in the path from destination to source. - ReturnPathComponents []PathComponent - - // The time the analysis started. - StartDate *time.Time - - // The status of the network insights analysis. - Status AnalysisStatus - - // The status message, if the status is failed . - StatusMessage *string - - // Potential intermediate accounts. - SuggestedAccounts []string - - // The tags. - Tags []Tag - - // The warning message. - WarningMessage *string - - noSmithyDocumentSerde -} - -// Describes a path. -type NetworkInsightsPath struct { - - // The time stamp when the path was created. - CreatedDate *time.Time - - // The ID of the destination. - Destination *string - - // The Amazon Resource Name (ARN) of the destination. - DestinationArn *string - - // The IP address of the destination. - DestinationIp *string - - // The destination port. - DestinationPort *int32 - - // Scopes the analysis to network paths that match specific filters at the - // destination. - FilterAtDestination *PathFilter - - // Scopes the analysis to network paths that match specific filters at the source. - FilterAtSource *PathFilter - - // The Amazon Resource Name (ARN) of the path. - NetworkInsightsPathArn *string - - // The ID of the path. - NetworkInsightsPathId *string - - // The protocol. - Protocol Protocol - - // The ID of the source. - Source *string - - // The Amazon Resource Name (ARN) of the source. - SourceArn *string - - // The IP address of the source. - SourceIp *string - - // The tags associated with the path. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a network interface. -type NetworkInterface struct { - - // The association information for an Elastic IP address (IPv4) associated with - // the network interface. - Association *NetworkInterfaceAssociation - - // The network interface attachment. - Attachment *NetworkInterfaceAttachment - - // The Availability Zone. - AvailabilityZone *string - - // A security group connection tracking configuration that enables you to set the - // timeout for connection tracking on an Elastic network interface. For more - // information, see Connection tracking timeouts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html#connection-tracking-timeouts) - // in the Amazon Elastic Compute Cloud User Guide. - ConnectionTrackingConfiguration *ConnectionTrackingConfiguration - - // Indicates whether a network interface with an IPv6 address is unreachable from - // the public internet. If the value is true , inbound traffic from the internet is - // dropped and you cannot assign an elastic IP address to the network interface. - // The network interface is reachable from peered VPCs and resources connected - // through a transit gateway, including on-premises networks. - DenyAllIgwTraffic *bool - - // A description. - Description *string - - // Any security groups for the network interface. - Groups []GroupIdentifier - - // The type of network interface. - InterfaceType NetworkInterfaceType - - // The IPv4 prefixes that are assigned to the network interface. - Ipv4Prefixes []Ipv4PrefixSpecification - - // The IPv6 globally unique address associated with the network interface. - Ipv6Address *string - - // The IPv6 addresses associated with the network interface. - Ipv6Addresses []NetworkInterfaceIpv6Address - - // Indicates whether this is an IPv6 only network interface. - Ipv6Native *bool - - // The IPv6 prefixes that are assigned to the network interface. - Ipv6Prefixes []Ipv6PrefixSpecification - - // The MAC address. - MacAddress *string - - // The ID of the network interface. - NetworkInterfaceId *string - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The Amazon Web Services account ID of the owner of the network interface. - OwnerId *string - - // The private DNS name. - PrivateDnsName *string - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string - - // The private IPv4 addresses associated with the network interface. - PrivateIpAddresses []NetworkInterfacePrivateIpAddress - - // The alias or Amazon Web Services account ID of the principal or service that - // created the network interface. - RequesterId *string - - // Indicates whether the network interface is being managed by Amazon Web Services. - RequesterManaged *bool - - // Indicates whether source/destination checking is enabled. - SourceDestCheck *bool - - // The status of the network interface. - Status NetworkInterfaceStatus - - // The ID of the subnet. - SubnetId *string - - // Any tags assigned to the network interface. - TagSet []Tag - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes association information for an Elastic IP address (IPv4 only), or a -// Carrier IP address (for a network interface which resides in a subnet in a -// Wavelength Zone). -type NetworkInterfaceAssociation struct { - - // The allocation ID. - AllocationId *string - - // The association ID. - AssociationId *string - - // The carrier IP address associated with the network interface. This option is - // only available when the network interface is in a subnet which is associated - // with a Wavelength Zone. - CarrierIp *string - - // The customer-owned IP address associated with the network interface. - CustomerOwnedIp *string - - // The ID of the Elastic IP address owner. - IpOwnerId *string - - // The public DNS name. - PublicDnsName *string - - // The address of the Elastic IP address bound to the network interface. - PublicIp *string - - noSmithyDocumentSerde -} - -// Describes a network interface attachment. -type NetworkInterfaceAttachment struct { - - // The timestamp indicating when the attachment initiated. - AttachTime *time.Time - - // The ID of the network interface attachment. - AttachmentId *string - - // Indicates whether the network interface is deleted when the instance is - // terminated. - DeleteOnTermination *bool - - // The device index of the network interface attachment on the instance. - DeviceIndex *int32 - - // Configures ENA Express for the network interface that this action attaches to - // the instance. - EnaSrdSpecification *AttachmentEnaSrdSpecification - - // The ID of the instance. - InstanceId *string - - // The Amazon Web Services account ID of the owner of the instance. - InstanceOwnerId *string - - // The index of the network card. - NetworkCardIndex *int32 - - // The attachment state. - Status AttachmentStatus - - noSmithyDocumentSerde -} - -// Describes an attachment change. -type NetworkInterfaceAttachmentChanges struct { - - // The ID of the network interface attachment. - AttachmentId *string - - // Indicates whether the network interface is deleted when the instance is - // terminated. - DeleteOnTermination *bool - - noSmithyDocumentSerde -} - -// The minimum and maximum number of network interfaces. -type NetworkInterfaceCount struct { - - // The maximum number of network interfaces. If this parameter is not specified, - // there is no maximum limit. - Max *int32 - - // The minimum number of network interfaces. If this parameter is not specified, - // there is no minimum limit. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum number of network interfaces. -type NetworkInterfaceCountRequest struct { - - // The maximum number of network interfaces. To specify no maximum limit, omit - // this parameter. - Max *int32 - - // The minimum number of network interfaces. To specify no minimum limit, omit - // this parameter. - Min *int32 - - noSmithyDocumentSerde -} - -// Describes an IPv6 address associated with a network interface. -type NetworkInterfaceIpv6Address struct { - - // The IPv6 address. - Ipv6Address *string - - // Determines if an IPv6 address associated with a network interface is the - // primary IPv6 address. When you enable an IPv6 GUA address to be a primary IPv6, - // the first IPv6 GUA will be made the primary IPv6 address until the instance is - // terminated or the network interface is detached. For more information, see - // ModifyNetworkInterfaceAttribute (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyNetworkInterfaceAttribute.html) - // . - IsPrimaryIpv6 *bool - - noSmithyDocumentSerde -} - -// Describes a permission for a network interface. -type NetworkInterfacePermission struct { - - // The Amazon Web Services account ID. - AwsAccountId *string - - // The Amazon Web Service. - AwsService *string - - // The ID of the network interface. - NetworkInterfaceId *string - - // The ID of the network interface permission. - NetworkInterfacePermissionId *string - - // The type of permission. - Permission InterfacePermissionType - - // Information about the state of the permission. - PermissionState *NetworkInterfacePermissionState - - noSmithyDocumentSerde -} - -// Describes the state of a network interface permission. -type NetworkInterfacePermissionState struct { - - // The state of the permission. - State NetworkInterfacePermissionStateCode - - // A status message, if applicable. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Describes the private IPv4 address of a network interface. -type NetworkInterfacePrivateIpAddress struct { - - // The association information for an Elastic IP address (IPv4) associated with - // the network interface. - Association *NetworkInterfaceAssociation - - // Indicates whether this IPv4 address is the primary private IPv4 address of the - // network interface. - Primary *bool - - // The private DNS name. - PrivateDnsName *string - - // The private IPv4 address. - PrivateIpAddress *string - - noSmithyDocumentSerde -} - -// Describes a DHCP configuration option. -type NewDhcpConfiguration struct { - - // The name of a DHCP option. - Key *string - - // The values for the DHCP option. - Values []string - - noSmithyDocumentSerde -} - -// Describes the supported NitroTPM versions for the instance type. -type NitroTpmInfo struct { - - // Indicates the supported NitroTPM versions. - SupportedVersions []string - - noSmithyDocumentSerde -} - -// Describes the options for an OpenID Connect-compatible user-identity trust -// provider. -type OidcOptions struct { - - // The OIDC authorization endpoint. - AuthorizationEndpoint *string - - // The client identifier. - ClientId *string - - // The client secret. - ClientSecret *string - - // The OIDC issuer. - Issuer *string - - // The OpenID Connect (OIDC) scope specified. - Scope *string - - // The OIDC token endpoint. - TokenEndpoint *string - - // The OIDC user info endpoint. - UserInfoEndpoint *string - - noSmithyDocumentSerde -} - -// Describes the configuration of On-Demand Instances in an EC2 Fleet. -type OnDemandOptions struct { - - // The strategy that determines the order of the launch template overrides to use - // in fulfilling On-Demand capacity. lowest-price - EC2 Fleet uses price to - // determine the order, launching the lowest price first. prioritized - EC2 Fleet - // uses the priority that you assigned to each launch template override, launching - // the highest priority first. Default: lowest-price - AllocationStrategy FleetOnDemandAllocationStrategy - - // The strategy for using unused Capacity Reservations for fulfilling On-Demand - // capacity. Supported only for fleets of type instant . - CapacityReservationOptions *CapacityReservationOptions - - // The maximum amount per hour for On-Demand Instances that you're willing to pay. - // If your fleet includes T instances that are configured as unlimited , and if - // their average CPU usage exceeds the baseline utilization, you will incur a - // charge for surplus credits. The maxTotalPrice does not account for surplus - // credits, and, if you use surplus credits, your final cost might be higher than - // what you specified for maxTotalPrice . For more information, see Surplus - // credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits) - // in the EC2 User Guide. - MaxTotalPrice *string - - // The minimum target capacity for On-Demand Instances in the fleet. If the - // minimum target capacity is not reached, the fleet launches no instances. - // Supported only for fleets of type instant . At least one of the following must - // be specified: SingleAvailabilityZone | SingleInstanceType - MinTargetCapacity *int32 - - // Indicates that the fleet launches all On-Demand Instances into a single - // Availability Zone. Supported only for fleets of type instant . - SingleAvailabilityZone *bool - - // Indicates that the fleet uses a single instance type to launch all On-Demand - // Instances in the fleet. Supported only for fleets of type instant . - SingleInstanceType *bool - - noSmithyDocumentSerde -} - -// Describes the configuration of On-Demand Instances in an EC2 Fleet. -type OnDemandOptionsRequest struct { - - // The strategy that determines the order of the launch template overrides to use - // in fulfilling On-Demand capacity. lowest-price - EC2 Fleet uses price to - // determine the order, launching the lowest price first. prioritized - EC2 Fleet - // uses the priority that you assigned to each launch template override, launching - // the highest priority first. Default: lowest-price - AllocationStrategy FleetOnDemandAllocationStrategy - - // The strategy for using unused Capacity Reservations for fulfilling On-Demand - // capacity. Supported only for fleets of type instant . - CapacityReservationOptions *CapacityReservationOptionsRequest - - // The maximum amount per hour for On-Demand Instances that you're willing to pay. - // If your fleet includes T instances that are configured as unlimited , and if - // their average CPU usage exceeds the baseline utilization, you will incur a - // charge for surplus credits. The MaxTotalPrice does not account for surplus - // credits, and, if you use surplus credits, your final cost might be higher than - // what you specified for MaxTotalPrice . For more information, see Surplus - // credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits) - // in the EC2 User Guide. - MaxTotalPrice *string - - // The minimum target capacity for On-Demand Instances in the fleet. If the - // minimum target capacity is not reached, the fleet launches no instances. - // Supported only for fleets of type instant . At least one of the following must - // be specified: SingleAvailabilityZone | SingleInstanceType - MinTargetCapacity *int32 - - // Indicates that the fleet launches all On-Demand Instances into a single - // Availability Zone. Supported only for fleets of type instant . - SingleAvailabilityZone *bool - - // Indicates that the fleet uses a single instance type to launch all On-Demand - // Instances in the fleet. Supported only for fleets of type instant . - SingleInstanceType *bool - - noSmithyDocumentSerde -} - -// Describes a packet header statement. -type PacketHeaderStatement struct { - - // The destination addresses. - DestinationAddresses []string - - // The destination ports. - DestinationPorts []string - - // The destination prefix lists. - DestinationPrefixLists []string - - // The protocols. - Protocols []Protocol - - // The source addresses. - SourceAddresses []string - - // The source ports. - SourcePorts []string - - // The source prefix lists. - SourcePrefixLists []string - - noSmithyDocumentSerde -} - -// Describes a packet header statement. -type PacketHeaderStatementRequest struct { - - // The destination addresses. - DestinationAddresses []string - - // The destination ports. - DestinationPorts []string - - // The destination prefix lists. - DestinationPrefixLists []string - - // The protocols. - Protocols []Protocol - - // The source addresses. - SourceAddresses []string - - // The source ports. - SourcePorts []string - - // The source prefix lists. - SourcePrefixLists []string - - noSmithyDocumentSerde -} - -// Describes a path component. -type PathComponent struct { - - // The network ACL rule. - AclRule *AnalysisAclRule - - // The additional details. - AdditionalDetails []AdditionalDetail - - // The resource to which the path component is attached. - AttachedTo *AnalysisComponent - - // The component. - Component *AnalysisComponent - - // The destination VPC. - DestinationVpc *AnalysisComponent - - // The load balancer listener. - ElasticLoadBalancerListener *AnalysisComponent - - // The explanation codes. - Explanations []Explanation - - // The Network Firewall stateful rule. - FirewallStatefulRule *FirewallStatefulRule - - // The Network Firewall stateless rule. - FirewallStatelessRule *FirewallStatelessRule - - // The inbound header. - InboundHeader *AnalysisPacketHeader - - // The outbound header. - OutboundHeader *AnalysisPacketHeader - - // The route table route. - RouteTableRoute *AnalysisRouteTableRoute - - // The security group rule. - SecurityGroupRule *AnalysisSecurityGroupRule - - // The sequence number. - SequenceNumber *int32 - - // The name of the VPC endpoint service. - ServiceName *string - - // The source VPC. - SourceVpc *AnalysisComponent - - // The subnet. - Subnet *AnalysisComponent - - // The transit gateway. - TransitGateway *AnalysisComponent - - // The route in a transit gateway route table. - TransitGatewayRouteTableRoute *TransitGatewayRouteTableRoute - - // The component VPC. - Vpc *AnalysisComponent - - noSmithyDocumentSerde -} - -// Describes a set of filters for a path analysis. Use path filters to scope the -// analysis when there can be multiple resulting paths. -type PathFilter struct { - - // The destination IPv4 address. - DestinationAddress *string - - // The destination port range. - DestinationPortRange *FilterPortRange - - // The source IPv4 address. - SourceAddress *string - - // The source port range. - SourcePortRange *FilterPortRange - - noSmithyDocumentSerde -} - -// Describes a set of filters for a path analysis. Use path filters to scope the -// analysis when there can be multiple resulting paths. -type PathRequestFilter struct { - - // The destination IPv4 address. - DestinationAddress *string - - // The destination port range. - DestinationPortRange *RequestFilterPortRange - - // The source IPv4 address. - SourceAddress *string - - // The source port range. - SourcePortRange *RequestFilterPortRange - - noSmithyDocumentSerde -} - -// Describes a path statement. -type PathStatement struct { - - // The packet header statement. - PacketHeaderStatement *PacketHeaderStatement - - // The resource statement. - ResourceStatement *ResourceStatement - - noSmithyDocumentSerde -} - -// Describes a path statement. -type PathStatementRequest struct { - - // The packet header statement. - PacketHeaderStatement *PacketHeaderStatementRequest - - // The resource statement. - ResourceStatement *ResourceStatementRequest - - noSmithyDocumentSerde -} - -// Describes the data that identifies an Amazon FPGA image (AFI) on the PCI bus. -type PciId struct { - - // The ID of the device. - DeviceId *string - - // The ID of the subsystem. - SubsystemId *string - - // The ID of the vendor for the subsystem. - SubsystemVendorId *string - - // The ID of the vendor. - VendorId *string - - noSmithyDocumentSerde -} - -// The status of the transit gateway peering attachment. -type PeeringAttachmentStatus struct { - - // The status code. - Code *string - - // The status message, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// Describes the VPC peering connection options. -type PeeringConnectionOptions struct { - - // If true, the public DNS hostnames of instances in the specified VPC resolve to - // private IP addresses when queried from instances in the peer VPC. - AllowDnsResolutionFromRemoteVpc *bool - - // Deprecated. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool - - // Deprecated. - AllowEgressFromLocalVpcToRemoteClassicLink *bool - - noSmithyDocumentSerde -} - -// The VPC peering connection options. -type PeeringConnectionOptionsRequest struct { - - // If true, enables a local VPC to resolve public DNS hostnames to private IP - // addresses when queried from instances in the peer VPC. - AllowDnsResolutionFromRemoteVpc *bool - - // Deprecated. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool - - // Deprecated. - AllowEgressFromLocalVpcToRemoteClassicLink *bool - - noSmithyDocumentSerde -} - -// Information about the transit gateway in the peering attachment. -type PeeringTgwInfo struct { - - // The ID of the core network where the transit gateway peer is located. - CoreNetworkId *string - - // The ID of the Amazon Web Services account that owns the transit gateway. - OwnerId *string - - // The Region of the transit gateway. - Region *string - - // The ID of the transit gateway. - TransitGatewayId *string - - noSmithyDocumentSerde -} - -// The Diffie-Hellmann group number for phase 1 IKE negotiations. -type Phase1DHGroupNumbersListValue struct { - - // The Diffie-Hellmann group number. - Value *int32 - - noSmithyDocumentSerde -} - -// Specifies a Diffie-Hellman group number for the VPN tunnel for phase 1 IKE -// negotiations. -type Phase1DHGroupNumbersRequestListValue struct { - - // The Diffie-Hellmann group number. - Value *int32 - - noSmithyDocumentSerde -} - -// The encryption algorithm for phase 1 IKE negotiations. -type Phase1EncryptionAlgorithmsListValue struct { - - // The value for the encryption algorithm. - Value *string - - noSmithyDocumentSerde -} - -// Specifies the encryption algorithm for the VPN tunnel for phase 1 IKE -// negotiations. -type Phase1EncryptionAlgorithmsRequestListValue struct { - - // The value for the encryption algorithm. - Value *string - - noSmithyDocumentSerde -} - -// The integrity algorithm for phase 1 IKE negotiations. -type Phase1IntegrityAlgorithmsListValue struct { - - // The value for the integrity algorithm. - Value *string - - noSmithyDocumentSerde -} - -// Specifies the integrity algorithm for the VPN tunnel for phase 1 IKE -// negotiations. -type Phase1IntegrityAlgorithmsRequestListValue struct { - - // The value for the integrity algorithm. - Value *string - - noSmithyDocumentSerde -} - -// The Diffie-Hellmann group number for phase 2 IKE negotiations. -type Phase2DHGroupNumbersListValue struct { - - // The Diffie-Hellmann group number. - Value *int32 - - noSmithyDocumentSerde -} - -// Specifies a Diffie-Hellman group number for the VPN tunnel for phase 2 IKE -// negotiations. -type Phase2DHGroupNumbersRequestListValue struct { - - // The Diffie-Hellmann group number. - Value *int32 - - noSmithyDocumentSerde -} - -// The encryption algorithm for phase 2 IKE negotiations. -type Phase2EncryptionAlgorithmsListValue struct { - - // The encryption algorithm. - Value *string - - noSmithyDocumentSerde -} - -// Specifies the encryption algorithm for the VPN tunnel for phase 2 IKE -// negotiations. -type Phase2EncryptionAlgorithmsRequestListValue struct { - - // The encryption algorithm. - Value *string - - noSmithyDocumentSerde -} - -// The integrity algorithm for phase 2 IKE negotiations. -type Phase2IntegrityAlgorithmsListValue struct { - - // The integrity algorithm. - Value *string - - noSmithyDocumentSerde -} - -// Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE -// negotiations. -type Phase2IntegrityAlgorithmsRequestListValue struct { - - // The integrity algorithm. - Value *string - - noSmithyDocumentSerde -} - -// Describes the placement of an instance. -type Placement struct { - - // The affinity setting for the instance on the Dedicated Host. This parameter is - // not supported for CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) - // or ImportInstance (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) - // . - Affinity *string - - // The Availability Zone of the instance. If not specified, an Availability Zone - // will be automatically chosen for you based on the load balancing criteria for - // the Region. This parameter is not supported for CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) - // . - AvailabilityZone *string - - // The ID of the placement group that the instance is in. If you specify GroupId , - // you can't specify GroupName . - GroupId *string - - // The name of the placement group that the instance is in. If you specify - // GroupName , you can't specify GroupId . - GroupName *string - - // The ID of the Dedicated Host on which the instance resides. This parameter is - // not supported for CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) - // or ImportInstance (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) - // . - HostId *string - - // The ARN of the host resource group in which to launch the instances. If you - // specify this parameter, either omit the Tenancy parameter or set it to host . - // This parameter is not supported for CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) - // . - HostResourceGroupArn *string - - // The number of the partition that the instance is in. Valid only if the - // placement group strategy is set to partition . This parameter is not supported - // for CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) - // . - PartitionNumber *int32 - - // Reserved for future use. - SpreadDomain *string - - // The tenancy of the instance. An instance with a tenancy of dedicated runs on - // single-tenant hardware. This parameter is not supported for CreateFleet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateFleet) - // . The host tenancy is not supported for ImportInstance (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportInstance.html) - // or for T3 instances that are configured for the unlimited CPU credit option. - Tenancy Tenancy - - noSmithyDocumentSerde -} - -// Describes a placement group. -type PlacementGroup struct { - - // The Amazon Resource Name (ARN) of the placement group. - GroupArn *string - - // The ID of the placement group. - GroupId *string - - // The name of the placement group. - GroupName *string - - // The number of partitions. Valid only if strategy is set to partition . - PartitionCount *int32 - - // The spread level for the placement group. Only Outpost placement groups can be - // spread across hosts. - SpreadLevel SpreadLevel - - // The state of the placement group. - State PlacementGroupState - - // The placement strategy. - Strategy PlacementStrategy - - // Any tags applied to the placement group. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the placement group support of the instance type. -type PlacementGroupInfo struct { - - // The supported placement group types. - SupportedStrategies []PlacementGroupStrategy - - noSmithyDocumentSerde -} - -// Describes the placement of an instance. -type PlacementResponse struct { - - // The name of the placement group that the instance is in. - GroupName *string - - noSmithyDocumentSerde -} - -// Describes a CIDR block for an address pool. -type PoolCidrBlock struct { - - // The CIDR block. - Cidr *string - - noSmithyDocumentSerde -} - -// Describes a range of ports. -type PortRange struct { - - // The first port in the range. - From *int32 - - // The last port in the range. - To *int32 - - noSmithyDocumentSerde -} - -// Describes prefixes for Amazon Web Services services. -type PrefixList struct { - - // The IP address range of the Amazon Web Service. - Cidrs []string - - // The ID of the prefix. - PrefixListId *string - - // The name of the prefix. - PrefixListName *string - - noSmithyDocumentSerde -} - -// Describes the resource with which a prefix list is associated. -type PrefixListAssociation struct { - - // The ID of the resource. - ResourceId *string - - // The owner of the resource. - ResourceOwner *string - - noSmithyDocumentSerde -} - -// Describes a prefix list entry. -type PrefixListEntry struct { - - // The CIDR block. - Cidr *string - - // The description. - Description *string - - noSmithyDocumentSerde -} - -// Describes a prefix list ID. -type PrefixListId struct { - - // A description for the security group rule that references this prefix list ID. - // Constraints: Up to 255 characters in length. Allowed characters are a-z, A-Z, - // 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string - - // The ID of the prefix. - PrefixListId *string - - noSmithyDocumentSerde -} - -// Describes the price for a Reserved Instance. -type PriceSchedule struct { - - // The current price schedule, as determined by the term remaining for the - // Reserved Instance in the listing. A specific price schedule is always in effect, - // but only one price schedule can be active at any time. Take, for example, a - // Reserved Instance listing that has five months remaining in its term. When you - // specify price schedules for five months and two months, this means that schedule - // 1, covering the first three months of the remaining term, will be active during - // months 5, 4, and 3. Then schedule 2, covering the last two months of the term, - // will be active for months 2 and 1. - Active *bool - - // The currency for transacting the Reserved Instance resale. At this time, the - // only supported currency is USD . - CurrencyCode CurrencyCodeValues - - // The fixed price for the term. - Price *float64 - - // The number of months remaining in the reservation. For example, 2 is the second - // to the last month before the capacity reservation expires. - Term *int64 - - noSmithyDocumentSerde -} - -// Describes the price for a Reserved Instance. -type PriceScheduleSpecification struct { - - // The currency for transacting the Reserved Instance resale. At this time, the - // only supported currency is USD . - CurrencyCode CurrencyCodeValues - - // The fixed price for the term. - Price *float64 - - // The number of months remaining in the reservation. For example, 2 is the second - // to the last month before the capacity reservation expires. - Term *int64 - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance offering. -type PricingDetail struct { - - // The number of reservations available for the price. - Count *int32 - - // The price per instance. - Price *float64 - - noSmithyDocumentSerde -} - -// PrincipalIdFormat description -type PrincipalIdFormat struct { - - // PrincipalIdFormatARN description - Arn *string - - // PrincipalIdFormatStatuses description - Statuses []IdFormat - - noSmithyDocumentSerde -} - -// Information about the Private DNS name for interface endpoints. -type PrivateDnsDetails struct { - - // The private DNS name assigned to the VPC endpoint service. - PrivateDnsName *string - - noSmithyDocumentSerde -} - -// Information about the private DNS name for the service endpoint. -type PrivateDnsNameConfiguration struct { - - // The name of the record subdomain the service provider needs to create. The - // service provider adds the value text to the name . - Name *string - - // The verification state of the VPC endpoint service. >Consumers of the endpoint - // service can use the private name only when the state is verified . - State DnsNameState - - // The endpoint service verification type, for example TXT. - Type *string - - // The value the service provider adds to the private DNS name domain record - // before verification. - Value *string - - noSmithyDocumentSerde -} - -// Describes the options for instance hostnames. -type PrivateDnsNameOptionsOnLaunch struct { - - // Indicates whether to respond to DNS queries for instance hostname with DNS AAAA - // records. - EnableResourceNameDnsAAAARecord *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecord *bool - - // The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS - // name must be based on the instance IPv4 address. For IPv6 only subnets, an - // instance DNS name must be based on the instance ID. For dual-stack subnets, you - // can specify whether DNS names use the instance IPv4 address or the instance ID. - HostnameType HostnameType - - noSmithyDocumentSerde -} - -// Describes the options for instance hostnames. -type PrivateDnsNameOptionsRequest struct { - - // Indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - EnableResourceNameDnsAAAARecord *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecord *bool - - // The type of hostname for EC2 instances. For IPv4 only subnets, an instance DNS - // name must be based on the instance IPv4 address. For IPv6 only subnets, an - // instance DNS name must be based on the instance ID. For dual-stack subnets, you - // can specify whether DNS names use the instance IPv4 address or the instance ID. - HostnameType HostnameType - - noSmithyDocumentSerde -} - -// Describes the options for instance hostnames. -type PrivateDnsNameOptionsResponse struct { - - // Indicates whether to respond to DNS queries for instance hostnames with DNS - // AAAA records. - EnableResourceNameDnsAAAARecord *bool - - // Indicates whether to respond to DNS queries for instance hostnames with DNS A - // records. - EnableResourceNameDnsARecord *bool - - // The type of hostname to assign to an instance. - HostnameType HostnameType - - noSmithyDocumentSerde -} - -// Describes a secondary private IPv4 address for a network interface. -type PrivateIpAddressSpecification struct { - - // Indicates whether the private IPv4 address is the primary private IPv4 address. - // Only one IPv4 address can be designated as primary. - Primary *bool - - // The private IPv4 address. - PrivateIpAddress *string - - noSmithyDocumentSerde -} - -// Describes the processor used by the instance type. -type ProcessorInfo struct { - - // The manufacturer of the processor. - Manufacturer *string - - // The architectures supported by the instance type. - SupportedArchitectures []ArchitectureType - - // Indicates whether the instance type supports AMD SEV-SNP. If the request - // returns amd-sev-snp , AMD SEV-SNP is supported. Otherwise, it is not supported. - // For more information, see AMD SEV-SNP (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html) - // . - SupportedFeatures []SupportedAdditionalProcessorFeature - - // The speed of the processor, in GHz. - SustainedClockSpeedInGhz *float64 - - noSmithyDocumentSerde -} - -// Describes a product code. -type ProductCode struct { - - // The product code. - ProductCodeId *string - - // The type of product code. - ProductCodeType ProductCodeValues - - noSmithyDocumentSerde -} - -// Describes a virtual private gateway propagating route. -type PropagatingVgw struct { - - // The ID of the virtual private gateway. - GatewayId *string - - noSmithyDocumentSerde -} - -// Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) -// , contact us through the Support Center (https://console.aws.amazon.com/support/home?) -// . -type ProvisionedBandwidth struct { - - // Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) - // , contact us through the Support Center (https://console.aws.amazon.com/support/home?) - // . - ProvisionTime *time.Time - - // Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) - // , contact us through the Support Center (https://console.aws.amazon.com/support/home?) - // . - Provisioned *string - - // Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) - // , contact us through the Support Center (https://console.aws.amazon.com/support/home?) - // . - RequestTime *time.Time - - // Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) - // , contact us through the Support Center (https://console.aws.amazon.com/support/home?) - // . - Requested *string - - // Reserved. If you need to sustain traffic greater than the documented limits (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) - // , contact us through the Support Center (https://console.aws.amazon.com/support/home?) - // . - Status *string - - noSmithyDocumentSerde -} - -// The status of an updated pointer (PTR) record for an Elastic IP address. -type PtrUpdateStatus struct { - - // The reason for the PTR record update. - Reason *string - - // The status of the PTR record update. - Status *string - - // The value for the PTR record update. - Value *string - - noSmithyDocumentSerde -} - -// Describes an IPv4 address pool. -type PublicIpv4Pool struct { - - // A description of the address pool. - Description *string - - // The name of the location from which the address pool is advertised. A network - // border group is a unique set of Availability Zones or Local Zones from where - // Amazon Web Services advertises public IP addresses. - NetworkBorderGroup *string - - // The address ranges. - PoolAddressRanges []PublicIpv4PoolRange - - // The ID of the address pool. - PoolId *string - - // Any tags for the address pool. - Tags []Tag - - // The total number of addresses. - TotalAddressCount *int32 - - // The total number of available addresses. - TotalAvailableAddressCount *int32 - - noSmithyDocumentSerde -} - -// Describes an address range of an IPv4 address pool. -type PublicIpv4PoolRange struct { - - // The number of addresses in the range. - AddressCount *int32 - - // The number of available addresses in the range. - AvailableAddressCount *int32 - - // The first IP address in the range. - FirstAddress *string - - // The last IP address in the range. - LastAddress *string - - noSmithyDocumentSerde -} - -// Describes the result of the purchase. -type Purchase struct { - - // The currency in which the UpfrontPrice and HourlyPrice amounts are specified. - // At this time, the only supported currency is USD . - CurrencyCode CurrencyCodeValues - - // The duration of the reservation's term in seconds. - Duration *int32 - - // The IDs of the Dedicated Hosts associated with the reservation. - HostIdSet []string - - // The ID of the reservation. - HostReservationId *string - - // The hourly price of the reservation per hour. - HourlyPrice *string - - // The instance family on the Dedicated Host that the reservation can be - // associated with. - InstanceFamily *string - - // The payment option for the reservation. - PaymentOption PaymentOption - - // The upfront price of the reservation. - UpfrontPrice *string - - noSmithyDocumentSerde -} - -// Describes a request to purchase Scheduled Instances. -type PurchaseRequest struct { - - // The number of instances. - // - // This member is required. - InstanceCount *int32 - - // The purchase token. - // - // This member is required. - PurchaseToken *string - - noSmithyDocumentSerde -} - -// Describes a recurring charge. -type RecurringCharge struct { - - // The amount of the recurring charge. - Amount *float64 - - // The frequency of the recurring charge. - Frequency RecurringChargeFrequency - - noSmithyDocumentSerde -} - -// Describes the security group that is referenced in the security group rule. -type ReferencedSecurityGroup struct { - - // The ID of the security group. - GroupId *string - - // The status of a VPC peering connection, if applicable. - PeeringStatus *string - - // The Amazon Web Services account ID. - UserId *string - - // The ID of the VPC. - VpcId *string - - // The ID of the VPC peering connection (if applicable). - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -// Describes a Region. -type Region struct { - - // The Region service endpoint. - Endpoint *string - - // The Region opt-in status. The possible values are opt-in-not-required , opted-in - // , and not-opted-in . - OptInStatus *string - - // The name of the Region. - RegionName *string - - noSmithyDocumentSerde -} - -// Information about the tag keys to register for the current Region. You can -// either specify individual tag keys or register all tag keys in the current -// Region. You must specify either IncludeAllTagsOfInstance or InstanceTagKeys in -// the request -type RegisterInstanceTagAttributeRequest struct { - - // Indicates whether to register all tag keys in the current Region. Specify true - // to register all tag keys. - IncludeAllTagsOfInstance *bool - - // The tag keys to register. - InstanceTagKeys []string - - noSmithyDocumentSerde -} - -// Remove an operating Region from an IPAM. Operating Regions are Amazon Web -// Services Regions where the IPAM is allowed to manage IP address CIDRs. IPAM only -// discovers and monitors resources in the Amazon Web Services Regions you select -// as operating Regions. For more information about operating Regions, see Create -// an IPAM (https://docs.aws.amazon.com/vpc/latest/ipam/create-ipam.html) in the -// Amazon VPC IPAM User Guide -type RemoveIpamOperatingRegion struct { - - // The name of the operating Region you want to remove. - RegionName *string - - noSmithyDocumentSerde -} - -// An entry for a prefix list. -type RemovePrefixListEntry struct { - - // The CIDR block. - // - // This member is required. - Cidr *string - - noSmithyDocumentSerde -} - -// Information about a root volume replacement task. -type ReplaceRootVolumeTask struct { - - // The time the task completed. - CompleteTime *string - - // Indicates whether the original root volume is to be deleted after the root - // volume replacement task completes. - DeleteReplacedRootVolume *bool - - // The ID of the AMI used to create the replacement root volume. - ImageId *string - - // The ID of the instance for which the root volume replacement task was created. - InstanceId *string - - // The ID of the root volume replacement task. - ReplaceRootVolumeTaskId *string - - // The ID of the snapshot used to create the replacement root volume. - SnapshotId *string - - // The time the task was started. - StartTime *string - - // The tags assigned to the task. - Tags []Tag - - // The state of the task. The task can be in one of the following states: - // - pending - the replacement volume is being created. - // - in-progress - the original volume is being detached and the replacement - // volume is being attached. - // - succeeded - the replacement volume has been successfully attached to the - // instance and the instance is available. - // - failing - the replacement task is in the process of failing. - // - failed - the replacement task has failed but the original root volume is - // still attached. - // - failing-detached - the replacement task is in the process of failing. The - // instance might have no root volume attached. - // - failed-detached - the replacement task has failed and the instance has no - // root volume attached. - TaskState ReplaceRootVolumeTaskState - - noSmithyDocumentSerde -} - -// Describes a port range. -type RequestFilterPortRange struct { - - // The first port in the range. - FromPort *int32 - - // The last port in the range. - ToPort *int32 - - noSmithyDocumentSerde -} - -// A tag on an IPAM resource. -type RequestIpamResourceTag struct { - - // The key of a tag assigned to the resource. Use this filter to find all - // resources assigned a tag with a specific key, regardless of the tag value. - Key *string - - // The value for the tag. - Value *string - - noSmithyDocumentSerde -} - -// The information to include in the launch template. You must specify at least -// one parameter for the launch template data. -type RequestLaunchTemplateData struct { - - // The block device mapping. - BlockDeviceMappings []LaunchTemplateBlockDeviceMappingRequest - - // The Capacity Reservation targeting option. If you do not specify this - // parameter, the instance's Capacity Reservation preference defaults to open , - // which enables it to run in any open Capacity Reservation that has matching - // attributes (instance type, platform, Availability Zone). - CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationRequest - - // The CPU options for the instance. For more information, see Optimizing CPU - // Options (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *LaunchTemplateCpuOptionsRequest - - // The credit option for CPU usage of the instance. Valid only for T instances. - CreditSpecification *CreditSpecificationRequest - - // Indicates whether to enable the instance for stop protection. For more - // information, see Stop protection (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection) - // in the Amazon Elastic Compute Cloud User Guide. - DisableApiStop *bool - - // If you set this parameter to true , you can't terminate the instance using the - // Amazon EC2 console, CLI, or API; otherwise, you can. To change this attribute - // after launch, use ModifyInstanceAttribute (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceAttribute.html) - // . Alternatively, if you set InstanceInitiatedShutdownBehavior to terminate , you - // can terminate the instance by running the shutdown command from the instance. - DisableApiTermination *bool - - // Indicates whether the instance is optimized for Amazon EBS I/O. This - // optimization provides dedicated throughput to Amazon EBS and an optimized - // configuration stack to provide optimal Amazon EBS I/O performance. This - // optimization isn't available with all instance types. Additional usage charges - // apply when using an EBS-optimized instance. - EbsOptimized *bool - - // Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. For - // workloads that require graphics acceleration, we recommend that you use Amazon - // EC2 G4ad, G4dn, or G5 instances. - ElasticGpuSpecifications []ElasticGpuSpecification - - // An elastic inference accelerator to associate with the instance. Elastic - // inference accelerators are a resource you can attach to your Amazon EC2 - // instances to accelerate your Deep Learning (DL) inference workloads. You cannot - // specify accelerators from different generations in the same request. Starting - // April 15, 2023, Amazon Web Services will not onboard new customers to Amazon - // Elastic Inference (EI), and will help current customers migrate their workloads - // to options that offer better price and performance. After April 15, 2023, new - // customers will not be able to launch instances with Amazon EI accelerators in - // Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used - // Amazon EI at least once during the past 30-day period are considered current - // customers and will be able to continue using the service. - ElasticInferenceAccelerators []LaunchTemplateElasticInferenceAccelerator - - // Indicates whether the instance is enabled for Amazon Web Services Nitro - // Enclaves. For more information, see What is Amazon Web Services Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) - // in the Amazon Web Services Nitro Enclaves User Guide. You can't enable Amazon - // Web Services Nitro Enclaves and hibernation on the same instance. - EnclaveOptions *LaunchTemplateEnclaveOptionsRequest - - // Indicates whether an instance is enabled for hibernation. This parameter is - // valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hibernating-prerequisites.html) - // . For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. - HibernationOptions *LaunchTemplateHibernationOptionsRequest - - // The name or Amazon Resource Name (ARN) of an IAM instance profile. - IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest - - // The ID of the AMI. Alternatively, you can specify a Systems Manager parameter, - // which will resolve to an AMI ID on launch. Valid formats: - // - ami-17characters00000 - // - resolve:ssm:parameter-name - // - resolve:ssm:parameter-name:version-number - // - resolve:ssm:parameter-name:label - // - resolve:ssm:public-parameter - // Currently, EC2 Fleet and Spot Fleet do not support specifying a Systems Manager - // parameter. If the launch template will be used by an EC2 Fleet or Spot Fleet, - // you must specify the AMI ID. For more information, see Use a Systems Manager - // parameter instead of an AMI ID (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id) - // in the Amazon Elastic Compute Cloud User Guide. - ImageId *string - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - // Default: stop - InstanceInitiatedShutdownBehavior ShutdownBehavior - - // The market (purchasing) option for the instances. - InstanceMarketOptions *LaunchTemplateInstanceMarketOptionsRequest - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with these attributes. You must specify - // VCpuCount and MemoryMiB . All other attributes are optional. Any unspecified - // optional attribute is set to its default. When you specify multiple attributes, - // you get instance types that satisfy all of the specified attributes. If you - // specify multiple values for an attribute, you get instance types that satisfy - // any of the specified values. To limit the list of instance types from which - // Amazon EC2 can identify matching instance types, you can use one of the - // following parameters, but not both in the same request: - // - AllowedInstanceTypes - The instance types to include in the list. All other - // instance types are ignored, even if they match your specified attributes. - // - ExcludedInstanceTypes - The instance types to exclude from the list, even if - // they match your specified attributes. - // If you specify InstanceRequirements , you can't specify InstanceType . - // Attribute-based instance type selection is only supported when using Auto - // Scaling groups, EC2 Fleet, and Spot Fleet to launch instances. If you plan to - // use the launch template in the launch instance wizard (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance-wizard.html) - // , or with the RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html) - // API or AWS::EC2::Instance (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html) - // Amazon Web Services CloudFormation resource, you can't specify - // InstanceRequirements . For more information, see Attribute-based instance type - // selection for EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-attribute-based-instance-type-selection.html) - // , Attribute-based instance type selection for Spot Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-attribute-based-instance-type-selection.html) - // , and Spot placement score (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-placement-score.html) - // in the Amazon EC2 User Guide. - InstanceRequirements *InstanceRequirementsRequest - - // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. If you specify InstanceType , - // you can't specify InstanceRequirements . - InstanceType InstanceType - - // The ID of the kernel. We recommend that you use PV-GRUB instead of kernels and - // RAM disks. For more information, see User provided kernels (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - KernelId *string - - // The name of the key pair. You can create a key pair using CreateKeyPair (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html) - // or ImportKeyPair (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ImportKeyPair.html) - // . If you do not specify a key pair, you can't connect to the instance unless you - // choose an AMI that is configured to allow users another way to log in. - KeyName *string - - // The license configurations. - LicenseSpecifications []LaunchTemplateLicenseConfigurationRequest - - // The maintenance options for the instance. - MaintenanceOptions *LaunchTemplateInstanceMaintenanceOptionsRequest - - // The metadata options for the instance. For more information, see Instance - // metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // in the Amazon Elastic Compute Cloud User Guide. - MetadataOptions *LaunchTemplateInstanceMetadataOptionsRequest - - // The monitoring for the instance. - Monitoring *LaunchTemplatesMonitoringRequest - - // One or more network interfaces. If you specify a network interface, you must - // specify any security groups and subnets as part of the network interface. - NetworkInterfaces []LaunchTemplateInstanceNetworkInterfaceSpecificationRequest - - // The placement for the instance. - Placement *LaunchTemplatePlacementRequest - - // The options for the instance hostname. The default values are inherited from - // the subnet. - PrivateDnsNameOptions *LaunchTemplatePrivateDnsNameOptionsRequest - - // The ID of the RAM disk. We recommend that you use PV-GRUB instead of kernels - // and RAM disks. For more information, see User provided kernels (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. - RamDiskId *string - - // One or more security group IDs. You can create a security group using - // CreateSecurityGroup (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateSecurityGroup.html) - // . - SecurityGroupIds []string - - // One or more security group names. For a nondefault VPC, you must use security - // group IDs instead. - SecurityGroups []string - - // The tags to apply to the resources that are created during instance launch. - // These tags are not applied to the launch template. - TagSpecifications []LaunchTemplateTagSpecificationRequest - - // The user data to make available to the instance. You must provide - // base64-encoded text. User data is limited to 16 KB. For more information, see - // Run commands on your Linux instance at launch (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) - // (Linux) or Work with instance user data (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instancedata-add-user-data.html) - // (Windows) in the Amazon Elastic Compute Cloud User Guide. If you are creating - // the launch template for use with Batch, the user data must be provided in the - // MIME multi-part archive format (https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive) - // . For more information, see Amazon EC2 user data in launch templates (https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html) - // in the Batch User Guide. - UserData *string - - noSmithyDocumentSerde -} - -// Describes the launch specification for an instance. -type RequestSpotLaunchSpecification struct { - - // Deprecated. - AddressingType *string - - // The block device mapping entries. You can't specify both a snapshot ID and an - // encryption value. This is because only blank volumes can be encrypted on - // creation. If a snapshot is the basis for a volume, it is not blank and its - // encryption status is used for the volume encryption status. - BlockDeviceMappings []BlockDeviceMapping - - // Indicates whether the instance is optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration stack - // to provide optimal EBS I/O performance. This optimization isn't available with - // all instance types. Additional usage charges apply when using an EBS Optimized - // instance. Default: false - EbsOptimized *bool - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification - - // The ID of the AMI. - ImageId *string - - // The instance type. Only one instance type can be specified. - InstanceType InstanceType - - // The ID of the kernel. - KernelId *string - - // The name of the key pair. - KeyName *string - - // Indicates whether basic or detailed monitoring is enabled for the instance. - // Default: Disabled - Monitoring *RunInstancesMonitoringEnabled - - // The network interfaces. If you specify a network interface, you must specify - // subnet IDs and security group IDs using the network interface. - NetworkInterfaces []InstanceNetworkInterfaceSpecification - - // The placement information for the instance. - Placement *SpotPlacement - - // The ID of the RAM disk. - RamdiskId *string - - // The IDs of the security groups. - SecurityGroupIds []string - - // Not supported. - SecurityGroups []string - - // The ID of the subnet in which to launch the instance. - SubnetId *string - - // The base64-encoded user data that instances use when starting up. User data is - // limited to 16 KB. - UserData *string - - noSmithyDocumentSerde -} - -// Describes a launch request for one or more instances, and includes owner, -// requester, and security group information that applies to all instances in the -// launch request. -type Reservation struct { - - // Not supported. - Groups []GroupIdentifier - - // The instances. - Instances []Instance - - // The ID of the Amazon Web Services account that owns the reservation. - OwnerId *string - - // The ID of the requester that launched the instances on your behalf (for - // example, Amazon Web Services Management Console or Auto Scaling). - RequesterId *string - - // The ID of the reservation. - ReservationId *string - - noSmithyDocumentSerde -} - -// Information about an instance type to use in a Capacity Reservation Fleet. -type ReservationFleetInstanceSpecification struct { - - // The Availability Zone in which the Capacity Reservation Fleet reserves the - // capacity. A Capacity Reservation Fleet can't span Availability Zones. All - // instance type specifications that you specify for the Fleet must use the same - // Availability Zone. - AvailabilityZone *string - - // The ID of the Availability Zone in which the Capacity Reservation Fleet - // reserves the capacity. A Capacity Reservation Fleet can't span Availability - // Zones. All instance type specifications that you specify for the Fleet must use - // the same Availability Zone. - AvailabilityZoneId *string - - // Indicates whether the Capacity Reservation Fleet supports EBS-optimized - // instances types. This optimization provides dedicated throughput to Amazon EBS - // and an optimized configuration stack to provide optimal I/O performance. This - // optimization isn't available with all instance types. Additional usage charges - // apply when using EBS-optimized instance types. - EbsOptimized *bool - - // The type of operating system for which the Capacity Reservation Fleet reserves - // capacity. - InstancePlatform CapacityReservationInstancePlatform - - // The instance type for which the Capacity Reservation Fleet reserves capacity. - InstanceType InstanceType - - // The priority to assign to the instance type. This value is used to determine - // which of the instance types specified for the Fleet should be prioritized for - // use. A lower value indicates a high priority. For more information, see - // Instance type priority (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#instance-priority) - // in the Amazon EC2 User Guide. - Priority *int32 - - // The number of capacity units provided by the specified instance type. This - // value, together with the total target capacity that you specify for the Fleet - // determine the number of instances for which the Fleet reserves capacity. Both - // values are based on units that make sense for your workload. For more - // information, see Total target capacity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/crfleet-concepts.html#target-capacity) - // in the Amazon EC2 User Guide. - Weight *float64 - - noSmithyDocumentSerde -} - -// The cost associated with the Reserved Instance. -type ReservationValue struct { - - // The hourly rate of the reservation. - HourlyPrice *string - - // The balance of the total value (the sum of remainingUpfrontValue + hourlyPrice - // * number of hours remaining). - RemainingTotalValue *string - - // The remaining upfront cost of the reservation. - RemainingUpfrontValue *string - - noSmithyDocumentSerde -} - -// Describes the limit price of a Reserved Instance offering. -type ReservedInstanceLimitPrice struct { - - // Used for Reserved Instance Marketplace offerings. Specifies the limit price on - // the total order (instanceCount * price). - Amount *float64 - - // The currency in which the limitPrice amount is specified. At this time, the - // only supported currency is USD . - CurrencyCode CurrencyCodeValues - - noSmithyDocumentSerde -} - -// The total value of the Convertible Reserved Instance. -type ReservedInstanceReservationValue struct { - - // The total value of the Convertible Reserved Instance that you are exchanging. - ReservationValue *ReservationValue - - // The ID of the Convertible Reserved Instance that you are exchanging. - ReservedInstanceId *string - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance. -type ReservedInstances struct { - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string - - // The currency of the Reserved Instance. It's specified using ISO 4217 standard - // currency codes. At this time, the only supported currency is USD . - CurrencyCode CurrencyCodeValues - - // The duration of the Reserved Instance, in seconds. - Duration *int64 - - // The time when the Reserved Instance expires. - End *time.Time - - // The purchase price of the Reserved Instance. - FixedPrice *float32 - - // The number of reservations purchased. - InstanceCount *int32 - - // The tenancy of the instance. - InstanceTenancy Tenancy - - // The instance type on which the Reserved Instance can be used. - InstanceType InstanceType - - // The offering class of the Reserved Instance. - OfferingClass OfferingClassType - - // The Reserved Instance offering type. - OfferingType OfferingTypeValues - - // The Reserved Instance product platform description. - ProductDescription RIProductDescription - - // The recurring charge tag assigned to the resource. - RecurringCharges []RecurringCharge - - // The ID of the Reserved Instance. - ReservedInstancesId *string - - // The scope of the Reserved Instance. - Scope Scope - - // The date and time the Reserved Instance started. - Start *time.Time - - // The state of the Reserved Instance purchase. - State ReservedInstanceState - - // Any tags assigned to the resource. - Tags []Tag - - // The usage price of the Reserved Instance, per hour. - UsagePrice *float32 - - noSmithyDocumentSerde -} - -// Describes the configuration settings for the modified Reserved Instances. -type ReservedInstancesConfiguration struct { - - // The Availability Zone for the modified Reserved Instances. - AvailabilityZone *string - - // The number of modified Reserved Instances. This is a required field for a - // request. - InstanceCount *int32 - - // The instance type for the modified Reserved Instances. - InstanceType InstanceType - - // The network platform of the modified Reserved Instances. - Platform *string - - // Whether the Reserved Instance is applied to instances in a Region or instances - // in a specific Availability Zone. - Scope Scope - - noSmithyDocumentSerde -} - -// Describes the ID of a Reserved Instance. -type ReservedInstancesId struct { - - // The ID of the Reserved Instance. - ReservedInstancesId *string - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance listing. -type ReservedInstancesListing struct { - - // A unique, case-sensitive key supplied by the client to ensure that the request - // is idempotent. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The time the listing was created. - CreateDate *time.Time - - // The number of instances in this state. - InstanceCounts []InstanceCount - - // The price of the Reserved Instance listing. - PriceSchedules []PriceSchedule - - // The ID of the Reserved Instance. - ReservedInstancesId *string - - // The ID of the Reserved Instance listing. - ReservedInstancesListingId *string - - // The status of the Reserved Instance listing. - Status ListingStatus - - // The reason for the current status of the Reserved Instance listing. The - // response can be blank. - StatusMessage *string - - // Any tags assigned to the resource. - Tags []Tag - - // The last modified timestamp of the listing. - UpdateDate *time.Time - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance modification. -type ReservedInstancesModification struct { - - // A unique, case-sensitive key supplied by the client to ensure that the request - // is idempotent. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // The time when the modification request was created. - CreateDate *time.Time - - // The time for the modification to become effective. - EffectiveDate *time.Time - - // Contains target configurations along with their corresponding new Reserved - // Instance IDs. - ModificationResults []ReservedInstancesModificationResult - - // The IDs of one or more Reserved Instances. - ReservedInstancesIds []ReservedInstancesId - - // A unique ID for the Reserved Instance modification. - ReservedInstancesModificationId *string - - // The status of the Reserved Instances modification request. - Status *string - - // The reason for the status. - StatusMessage *string - - // The time when the modification request was last updated. - UpdateDate *time.Time - - noSmithyDocumentSerde -} - -// Describes the modification request/s. -type ReservedInstancesModificationResult struct { - - // The ID for the Reserved Instances that were created as part of the modification - // request. This field is only available when the modification is fulfilled. - ReservedInstancesId *string - - // The target Reserved Instances configurations supplied as part of the - // modification request. - TargetConfiguration *ReservedInstancesConfiguration - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance offering. -type ReservedInstancesOffering struct { - - // The Availability Zone in which the Reserved Instance can be used. - AvailabilityZone *string - - // The currency of the Reserved Instance offering you are purchasing. It's - // specified using ISO 4217 standard currency codes. At this time, the only - // supported currency is USD . - CurrencyCode CurrencyCodeValues - - // The duration of the Reserved Instance, in seconds. - Duration *int64 - - // The purchase price of the Reserved Instance. - FixedPrice *float32 - - // The tenancy of the instance. - InstanceTenancy Tenancy - - // The instance type on which the Reserved Instance can be used. - InstanceType InstanceType - - // Indicates whether the offering is available through the Reserved Instance - // Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance - // Marketplace offering, this is true . - Marketplace *bool - - // If convertible it can be exchanged for Reserved Instances of the same or higher - // monetary value, with different configurations. If standard , it is not possible - // to perform an exchange. - OfferingClass OfferingClassType - - // The Reserved Instance offering type. - OfferingType OfferingTypeValues - - // The pricing details of the Reserved Instance offering. - PricingDetails []PricingDetail - - // The Reserved Instance product platform description. - ProductDescription RIProductDescription - - // The recurring charge tag assigned to the resource. - RecurringCharges []RecurringCharge - - // The ID of the Reserved Instance offering. This is the offering ID used in - // GetReservedInstancesExchangeQuote to confirm that an exchange can be made. - ReservedInstancesOfferingId *string - - // Whether the Reserved Instance is applied to instances in a Region or an - // Availability Zone. - Scope Scope - - // The usage price of the Reserved Instance, per hour. - UsagePrice *float32 - - noSmithyDocumentSerde -} - -// Describes a resource statement. -type ResourceStatement struct { - - // The resource types. - ResourceTypes []string - - // The resources. - Resources []string - - noSmithyDocumentSerde -} - -// Describes a resource statement. -type ResourceStatementRequest struct { - - // The resource types. - ResourceTypes []string - - // The resources. - Resources []string - - noSmithyDocumentSerde -} - -// Describes the error that's returned when you cannot delete a launch template -// version. -type ResponseError struct { - - // The error code. - Code LaunchTemplateErrorCode - - // The error message, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// The information for a launch template. -type ResponseLaunchTemplateData struct { - - // The block device mappings. - BlockDeviceMappings []LaunchTemplateBlockDeviceMapping - - // Information about the Capacity Reservation targeting option. - CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationResponse - - // The CPU options for the instance. For more information, see Optimizing CPU - // options (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. - CpuOptions *LaunchTemplateCpuOptions - - // The credit option for CPU usage of the instance. - CreditSpecification *CreditSpecification - - // Indicates whether the instance is enabled for stop protection. For more - // information, see Stop protection (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html#Using_StopProtection) - // in the Amazon Elastic Compute Cloud User Guide. - DisableApiStop *bool - - // If set to true , indicates that the instance cannot be terminated using the - // Amazon EC2 console, command line tool, or API. - DisableApiTermination *bool - - // Indicates whether the instance is optimized for Amazon EBS I/O. - EbsOptimized *bool - - // Deprecated. Amazon Elastic Graphics reached end of life on January 8, 2024. For - // workloads that require graphics acceleration, we recommend that you use Amazon - // EC2 G4ad, G4dn, or G5 instances. - ElasticGpuSpecifications []ElasticGpuSpecificationResponse - - // An elastic inference accelerator to associate with the instance. Elastic - // inference accelerators are a resource you can attach to your Amazon EC2 - // instances to accelerate your Deep Learning (DL) inference workloads. You cannot - // specify accelerators from different generations in the same request. Starting - // April 15, 2023, Amazon Web Services will not onboard new customers to Amazon - // Elastic Inference (EI), and will help current customers migrate their workloads - // to options that offer better price and performance. After April 15, 2023, new - // customers will not be able to launch instances with Amazon EI accelerators in - // Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used - // Amazon EI at least once during the past 30-day period are considered current - // customers and will be able to continue using the service. - ElasticInferenceAccelerators []LaunchTemplateElasticInferenceAcceleratorResponse - - // Indicates whether the instance is enabled for Amazon Web Services Nitro - // Enclaves. - EnclaveOptions *LaunchTemplateEnclaveOptions - - // Indicates whether an instance is configured for hibernation. For more - // information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. - HibernationOptions *LaunchTemplateHibernationOptions - - // The IAM instance profile. - IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecification - - // The ID of the AMI or a Systems Manager parameter. The Systems Manager parameter - // will resolve to the ID of the AMI at instance launch. The value depends on what - // you specified in the request. The possible values are: - // - If an AMI ID was specified in the request, then this is the AMI ID. - // - If a Systems Manager parameter was specified in the request, and - // ResolveAlias was configured as true , then this is the AMI ID that the - // parameter is mapped to in the Parameter Store. - // - If a Systems Manager parameter was specified in the request, and - // ResolveAlias was configured as false , then this is the parameter value. - // For more information, see Use a Systems Manager parameter instead of an AMI ID (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id) - // in the Amazon Elastic Compute Cloud User Guide. - ImageId *string - - // Indicates whether an instance stops or terminates when you initiate shutdown - // from the instance (using the operating system command for system shutdown). - InstanceInitiatedShutdownBehavior ShutdownBehavior - - // The market (purchasing) option for the instances. - InstanceMarketOptions *LaunchTemplateInstanceMarketOptions - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with these attributes. If you specify - // InstanceRequirements , you can't specify InstanceTypes . - InstanceRequirements *InstanceRequirements - - // The instance type. - InstanceType InstanceType - - // The ID of the kernel, if applicable. - KernelId *string - - // The name of the key pair. - KeyName *string - - // The license configurations. - LicenseSpecifications []LaunchTemplateLicenseConfiguration - - // The maintenance options for your instance. - MaintenanceOptions *LaunchTemplateInstanceMaintenanceOptions - - // The metadata options for the instance. For more information, see Instance - // metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // in the Amazon Elastic Compute Cloud User Guide. - MetadataOptions *LaunchTemplateInstanceMetadataOptions - - // The monitoring for the instance. - Monitoring *LaunchTemplatesMonitoring - - // The network interfaces. - NetworkInterfaces []LaunchTemplateInstanceNetworkInterfaceSpecification - - // The placement of the instance. - Placement *LaunchTemplatePlacement - - // The options for the instance hostname. - PrivateDnsNameOptions *LaunchTemplatePrivateDnsNameOptions - - // The ID of the RAM disk, if applicable. - RamDiskId *string - - // The security group IDs. - SecurityGroupIds []string - - // The security group names. - SecurityGroups []string - - // The tags that are applied to the resources that are created during instance - // launch. - TagSpecifications []LaunchTemplateTagSpecification - - // The user data for the instance. - UserData *string - - noSmithyDocumentSerde -} - -// Describes a route in a route table. -type Route struct { - - // The ID of the carrier gateway. - CarrierGatewayId *string - - // The Amazon Resource Name (ARN) of the core network. - CoreNetworkArn *string - - // The IPv4 CIDR block used for the destination match. - DestinationCidrBlock *string - - // The IPv6 CIDR block used for the destination match. - DestinationIpv6CidrBlock *string - - // The prefix of the Amazon Web Service. - DestinationPrefixListId *string - - // The ID of the egress-only internet gateway. - EgressOnlyInternetGatewayId *string - - // The ID of a gateway attached to your VPC. - GatewayId *string - - // The ID of a NAT instance in your VPC. - InstanceId *string - - // The ID of Amazon Web Services account that owns the instance. - InstanceOwnerId *string - - // The ID of the local gateway. - LocalGatewayId *string - - // The ID of a NAT gateway. - NatGatewayId *string - - // The ID of the network interface. - NetworkInterfaceId *string - - // Describes how the route was created. - // - CreateRouteTable - The route was automatically created when the route table - // was created. - // - CreateRoute - The route was manually added to the route table. - // - EnableVgwRoutePropagation - The route was propagated by route propagation. - Origin RouteOrigin - - // The state of the route. The blackhole state indicates that the route's target - // isn't available (for example, the specified gateway isn't attached to the VPC, - // or the specified NAT instance has been terminated). - State RouteState - - // The ID of a transit gateway. - TransitGatewayId *string - - // The ID of a VPC peering connection. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -// Describes a route table. -type RouteTable struct { - - // The associations between the route table and one or more subnets or a gateway. - Associations []RouteTableAssociation - - // The ID of the Amazon Web Services account that owns the route table. - OwnerId *string - - // Any virtual private gateway (VGW) propagating routes. - PropagatingVgws []PropagatingVgw - - // The ID of the route table. - RouteTableId *string - - // The routes in the route table. - Routes []Route - - // Any tags assigned to the route table. - Tags []Tag - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes an association between a route table and a subnet or gateway. -type RouteTableAssociation struct { - - // The state of the association. - AssociationState *RouteTableAssociationState - - // The ID of the internet gateway or virtual private gateway. - GatewayId *string - - // Indicates whether this is the main route table. - Main *bool - - // The ID of the association. - RouteTableAssociationId *string - - // The ID of the route table. - RouteTableId *string - - // The ID of the subnet. A subnet ID is not returned for an implicit association. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes the state of an association between a route table and a subnet or -// gateway. -type RouteTableAssociationState struct { - - // The state of the association. - State RouteTableAssociationStateCode - - // The status message, if applicable. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Describes the rule options for a stateful rule group. -type RuleGroupRuleOptionsPair struct { - - // The ARN of the rule group. - RuleGroupArn *string - - // The rule options. - RuleOptions []RuleOption - - noSmithyDocumentSerde -} - -// Describes the type of a stateful rule group. -type RuleGroupTypePair struct { - - // The ARN of the rule group. - RuleGroupArn *string - - // The rule group type. The possible values are Domain List and Suricata . - RuleGroupType *string - - noSmithyDocumentSerde -} - -// Describes additional settings for a stateful rule. -type RuleOption struct { - - // The Suricata keyword. - Keyword *string - - // The settings for the keyword. - Settings []string - - noSmithyDocumentSerde -} - -// Describes the monitoring of an instance. -type RunInstancesMonitoringEnabled struct { - - // Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring - // is enabled. - // - // This member is required. - Enabled *bool - - noSmithyDocumentSerde -} - -// The tags to apply to the AMI object that will be stored in the Amazon S3 -// bucket. For more information, see Categorizing your storage using tags (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html) -// in the Amazon Simple Storage Service User Guide. -type S3ObjectTag struct { - - // The key of the tag. Constraints: Tag keys are case-sensitive and can be up to - // 128 Unicode characters in length. May not begin with aws :. - Key *string - - // The value of the tag. Constraints: Tag values are case-sensitive and can be up - // to 256 Unicode characters in length. - Value *string - - noSmithyDocumentSerde -} - -// Describes the storage parameters for Amazon S3 and Amazon S3 buckets for an -// instance store-backed AMI. -type S3Storage struct { - - // The access key ID of the owner of the bucket. Before you specify a value for - // your access key ID, review and follow the guidance in Best Practices for Amazon - // Web Services accounts (https://docs.aws.amazon.com/accounts/latest/reference/best-practices.html) - // in the Account ManagementReference Guide. - AWSAccessKeyId *string - - // The bucket in which to store the AMI. You can specify a bucket that you already - // own or a new bucket that Amazon EC2 creates on your behalf. If you specify a - // bucket that belongs to someone else, Amazon EC2 returns an error. - Bucket *string - - // The beginning of the file name of the AMI. - Prefix *string - - // An Amazon S3 upload policy that gives Amazon EC2 permission to upload items - // into Amazon S3 on your behalf. - UploadPolicy []byte - - // The signature of the JSON document. - UploadPolicySignature *string - - noSmithyDocumentSerde -} - -// Describes a Scheduled Instance. -type ScheduledInstance struct { - - // The Availability Zone. - AvailabilityZone *string - - // The date when the Scheduled Instance was purchased. - CreateDate *time.Time - - // The hourly price for a single instance. - HourlyPrice *string - - // The number of instances. - InstanceCount *int32 - - // The instance type. - InstanceType *string - - // The network platform. - NetworkPlatform *string - - // The time for the next schedule to start. - NextSlotStartTime *time.Time - - // The platform ( Linux/UNIX or Windows ). - Platform *string - - // The time that the previous schedule ended or will end. - PreviousSlotEndTime *time.Time - - // The schedule recurrence. - Recurrence *ScheduledInstanceRecurrence - - // The Scheduled Instance ID. - ScheduledInstanceId *string - - // The number of hours in the schedule. - SlotDurationInHours *int32 - - // The end date for the Scheduled Instance. - TermEndDate *time.Time - - // The start date for the Scheduled Instance. - TermStartDate *time.Time - - // The total number of hours for a single instance for the entire term. - TotalScheduledInstanceHours *int32 - - noSmithyDocumentSerde -} - -// Describes a schedule that is available for your Scheduled Instances. -type ScheduledInstanceAvailability struct { - - // The Availability Zone. - AvailabilityZone *string - - // The number of available instances. - AvailableInstanceCount *int32 - - // The time period for the first schedule to start. - FirstSlotStartTime *time.Time - - // The hourly price for a single instance. - HourlyPrice *string - - // The instance type. You can specify one of the C3, C4, M4, or R3 instance types. - InstanceType *string - - // The maximum term. The only possible value is 365 days. - MaxTermDurationInDays *int32 - - // The minimum term. The only possible value is 365 days. - MinTermDurationInDays *int32 - - // The network platform. - NetworkPlatform *string - - // The platform ( Linux/UNIX or Windows ). - Platform *string - - // The purchase token. This token expires in two hours. - PurchaseToken *string - - // The schedule recurrence. - Recurrence *ScheduledInstanceRecurrence - - // The number of hours in the schedule. - SlotDurationInHours *int32 - - // The total number of hours for a single instance for the entire term. - TotalScheduledInstanceHours *int32 - - noSmithyDocumentSerde -} - -// Describes the recurring schedule for a Scheduled Instance. -type ScheduledInstanceRecurrence struct { - - // The frequency ( Daily , Weekly , or Monthly ). - Frequency *string - - // The interval quantity. The interval unit depends on the value of frequency . For - // example, every 2 weeks or every 2 months. - Interval *int32 - - // The days. For a monthly schedule, this is one or more days of the month (1-31). - // For a weekly schedule, this is one or more days of the week (1-7, where 1 is - // Sunday). - OccurrenceDaySet []int32 - - // Indicates whether the occurrence is relative to the end of the specified week - // or month. - OccurrenceRelativeToEnd *bool - - // The unit for occurrenceDaySet ( DayOfWeek or DayOfMonth ). - OccurrenceUnit *string - - noSmithyDocumentSerde -} - -// Describes the recurring schedule for a Scheduled Instance. -type ScheduledInstanceRecurrenceRequest struct { - - // The frequency ( Daily , Weekly , or Monthly ). - Frequency *string - - // The interval quantity. The interval unit depends on the value of Frequency . For - // example, every 2 weeks or every 2 months. - Interval *int32 - - // The days. For a monthly schedule, this is one or more days of the month (1-31). - // For a weekly schedule, this is one or more days of the week (1-7, where 1 is - // Sunday). You can't specify this value with a daily schedule. If the occurrence - // is relative to the end of the month, you can specify only a single day. - OccurrenceDays []int32 - - // Indicates whether the occurrence is relative to the end of the specified week - // or month. You can't specify this value with a daily schedule. - OccurrenceRelativeToEnd *bool - - // The unit for OccurrenceDays ( DayOfWeek or DayOfMonth ). This value is required - // for a monthly schedule. You can't specify DayOfWeek with a weekly schedule. You - // can't specify this value with a daily schedule. - OccurrenceUnit *string - - noSmithyDocumentSerde -} - -// Describes a block device mapping for a Scheduled Instance. -type ScheduledInstancesBlockDeviceMapping struct { - - // The device name (for example, /dev/sdh or xvdh ). - DeviceName *string - - // Parameters used to set up EBS volumes automatically when the instance is - // launched. - Ebs *ScheduledInstancesEbs - - // To omit the device from the block device mapping, specify an empty string. - NoDevice *string - - // The virtual device name ( ephemeral N). Instance store volumes are numbered - // starting from 0. An instance type with two available instance store volumes can - // specify mappings for ephemeral0 and ephemeral1 . The number of available - // instance store volumes depends on the instance type. After you connect to the - // instance, you must mount the volume. Constraints: For M3 instances, you must - // specify instance store volumes in the block device mapping for the instance. - // When you launch an M3 instance, we ignore any instance store volumes specified - // in the block device mapping for the AMI. - VirtualName *string - - noSmithyDocumentSerde -} - -// Describes an EBS volume for a Scheduled Instance. -type ScheduledInstancesEbs struct { - - // Indicates whether the volume is deleted on instance termination. - DeleteOnTermination *bool - - // Indicates whether the volume is encrypted. You can attached encrypted volumes - // only to instances that support them. - Encrypted *bool - - // The number of I/O operations per second (IOPS) to provision for a gp3 , io1 , or - // io2 volume. - Iops *int32 - - // The ID of the snapshot. - SnapshotId *string - - // The size of the volume, in GiB. Default: If you're creating the volume from a - // snapshot and don't specify a volume size, the default is the snapshot size. - VolumeSize *int32 - - // The volume type. Default: gp2 - VolumeType *string - - noSmithyDocumentSerde -} - -// Describes an IAM instance profile for a Scheduled Instance. -type ScheduledInstancesIamInstanceProfile struct { - - // The Amazon Resource Name (ARN). - Arn *string - - // The name. - Name *string - - noSmithyDocumentSerde -} - -// Describes an IPv6 address. -type ScheduledInstancesIpv6Address struct { - - // The IPv6 address. - Ipv6Address *string - - noSmithyDocumentSerde -} - -// Describes the launch specification for a Scheduled Instance. If you are -// launching the Scheduled Instance in EC2-VPC, you must specify the ID of the -// subnet. You can specify the subnet using either SubnetId or NetworkInterface . -type ScheduledInstancesLaunchSpecification struct { - - // The ID of the Amazon Machine Image (AMI). - // - // This member is required. - ImageId *string - - // The block device mapping entries. - BlockDeviceMappings []ScheduledInstancesBlockDeviceMapping - - // Indicates whether the instances are optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration stack - // to provide optimal EBS I/O performance. This optimization isn't available with - // all instance types. Additional usage charges apply when using an EBS-optimized - // instance. Default: false - EbsOptimized *bool - - // The IAM instance profile. - IamInstanceProfile *ScheduledInstancesIamInstanceProfile - - // The instance type. - InstanceType *string - - // The ID of the kernel. - KernelId *string - - // The name of the key pair. - KeyName *string - - // Enable or disable monitoring for the instances. - Monitoring *ScheduledInstancesMonitoring - - // The network interfaces. - NetworkInterfaces []ScheduledInstancesNetworkInterface - - // The placement information. - Placement *ScheduledInstancesPlacement - - // The ID of the RAM disk. - RamdiskId *string - - // The IDs of the security groups. - SecurityGroupIds []string - - // The ID of the subnet in which to launch the instances. - SubnetId *string - - // The base64-encoded MIME user data. - UserData *string - - noSmithyDocumentSerde -} - -// Describes whether monitoring is enabled for a Scheduled Instance. -type ScheduledInstancesMonitoring struct { - - // Indicates whether monitoring is enabled. - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes a network interface for a Scheduled Instance. -type ScheduledInstancesNetworkInterface struct { - - // Indicates whether to assign a public IPv4 address to instances launched in a - // VPC. The public IPv4 address can only be assigned to a network interface for - // eth0, and can only be assigned to a new network interface, not an existing one. - // You cannot specify more than one network interface in the request. If launching - // into a default subnet, the default value is true . Starting on February 1, 2024, - // Amazon Web Services will charge for all public IPv4 addresses, including public - // IPv4 addresses associated with running instances and Elastic IP addresses. For - // more information, see the Public IPv4 Address tab on the Amazon VPC pricing page (http://aws.amazon.com/vpc/pricing/) - // . - AssociatePublicIpAddress *bool - - // Indicates whether to delete the interface when the instance is terminated. - DeleteOnTermination *bool - - // The description. - Description *string - - // The index of the device for the network interface attachment. - DeviceIndex *int32 - - // The IDs of the security groups. - Groups []string - - // The number of IPv6 addresses to assign to the network interface. The IPv6 - // addresses are automatically selected from the subnet range. - Ipv6AddressCount *int32 - - // The specific IPv6 addresses from the subnet range. - Ipv6Addresses []ScheduledInstancesIpv6Address - - // The ID of the network interface. - NetworkInterfaceId *string - - // The IPv4 address of the network interface within the subnet. - PrivateIpAddress *string - - // The private IPv4 addresses. - PrivateIpAddressConfigs []ScheduledInstancesPrivateIpAddressConfig - - // The number of secondary private IPv4 addresses. - SecondaryPrivateIpAddressCount *int32 - - // The ID of the subnet. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes the placement for a Scheduled Instance. -type ScheduledInstancesPlacement struct { - - // The Availability Zone. - AvailabilityZone *string - - // The name of the placement group. - GroupName *string - - noSmithyDocumentSerde -} - -// Describes a private IPv4 address for a Scheduled Instance. -type ScheduledInstancesPrivateIpAddressConfig struct { - - // Indicates whether this is a primary IPv4 address. Otherwise, this is a - // secondary IPv4 address. - Primary *bool - - // The IPv4 address. - PrivateIpAddress *string - - noSmithyDocumentSerde -} - -// Describes a security group. -type SecurityGroup struct { - - // A description of the security group. - Description *string - - // The ID of the security group. - GroupId *string - - // The name of the security group. - GroupName *string - - // The inbound rules associated with the security group. - IpPermissions []IpPermission - - // The outbound rules associated with the security group. - IpPermissionsEgress []IpPermission - - // The Amazon Web Services account ID of the owner of the security group. - OwnerId *string - - // Any tags assigned to the security group. - Tags []Tag - - // The ID of the VPC for the security group. - VpcId *string - - noSmithyDocumentSerde -} - -// A security group that can be used by interfaces in the VPC. -type SecurityGroupForVpc struct { - - // The security group's description. - Description *string - - // The security group ID. - GroupId *string - - // The security group name. - GroupName *string - - // The security group owner ID. - OwnerId *string - - // The VPC ID in which the security group was created. - PrimaryVpcId *string - - // The security group tags. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a security group. -type SecurityGroupIdentifier struct { - - // The ID of the security group. - GroupId *string - - // The name of the security group. - GroupName *string - - noSmithyDocumentSerde -} - -// Describes a VPC with a security group that references your security group. -type SecurityGroupReference struct { - - // The ID of your security group. - GroupId *string - - // The ID of the VPC with the referencing security group. - ReferencingVpcId *string - - // The ID of the transit gateway (if applicable). For more information about - // security group referencing for transit gateways, see Create a transit gateway - // attachment to a VPC (https://docs.aws.amazon.com/tgw/tgw-vpc-attachments.html#create-vpc-attachment) - // in the Amazon Web Services Transit Gateway Guide. - TransitGatewayId *string - - // The ID of the VPC peering connection (if applicable). For more information - // about security group referencing for peering connections, see Update your - // security groups to reference peer security groups (https://docs.aws.amazon.com/peering/vpc-peering-security-groups.html) - // in the VPC Peering Guide. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -// Describes a security group rule. -type SecurityGroupRule struct { - - // The IPv4 CIDR range. - CidrIpv4 *string - - // The IPv6 CIDR range. - CidrIpv6 *string - - // The security group rule description. - Description *string - - // If the protocol is TCP or UDP, this is the start of the port range. If the - // protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all - // ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all - // ICMP/ICMPv6 codes. - FromPort *int32 - - // The ID of the security group. - GroupId *string - - // The ID of the Amazon Web Services account that owns the security group. - GroupOwnerId *string - - // The IP protocol name ( tcp , udp , icmp , icmpv6 ) or number (see Protocol - // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // ). Use -1 to specify all protocols. - IpProtocol *string - - // Indicates whether the security group rule is an outbound rule. - IsEgress *bool - - // The ID of the prefix list. - PrefixListId *string - - // Describes the security group that is referenced in the rule. - ReferencedGroupInfo *ReferencedSecurityGroup - - // The ID of the security group rule. - SecurityGroupRuleId *string - - // The tags applied to the security group rule. - Tags []Tag - - // If the protocol is TCP or UDP, this is the end of the port range. If the - // protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all - // ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all - // ICMP/ICMPv6 codes. - ToPort *int32 - - noSmithyDocumentSerde -} - -// Describes the description of a security group rule. You can use this when you -// want to update the security group rule description for either an inbound or -// outbound rule. -type SecurityGroupRuleDescription struct { - - // The description of the security group rule. - Description *string - - // The ID of the security group rule. - SecurityGroupRuleId *string - - noSmithyDocumentSerde -} - -// Describes a security group rule. You must specify exactly one of the following -// parameters, based on the rule type: -// - CidrIpv4 -// - CidrIpv6 -// - PrefixListId -// - ReferencedGroupId -// -// When you modify a rule, you cannot change the rule type. For example, if the -// rule uses an IPv4 address range, you must use CidrIpv4 to specify a new IPv4 -// address range. -type SecurityGroupRuleRequest struct { - - // The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix - // length. - CidrIpv4 *string - - // The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix - // length. - CidrIpv6 *string - - // The description of the security group rule. - Description *string - - // If the protocol is TCP or UDP, this is the start of the port range. If the - // protocol is ICMP or ICMPv6, this is the type number. A value of -1 indicates all - // ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all - // ICMP/ICMPv6 codes. - FromPort *int32 - - // The IP protocol name ( tcp , udp , icmp , icmpv6 ) or number (see Protocol - // Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // ). Use -1 to specify all protocols. - IpProtocol *string - - // The ID of the prefix list. - PrefixListId *string - - // The ID of the security group that is referenced in the security group rule. - ReferencedGroupId *string - - // If the protocol is TCP or UDP, this is the end of the port range. If the - // protocol is ICMP or ICMPv6, this is the code. A value of -1 indicates all - // ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all - // ICMP/ICMPv6 codes. - ToPort *int32 - - noSmithyDocumentSerde -} - -// Describes an update to a security group rule. -type SecurityGroupRuleUpdate struct { - - // The ID of the security group rule. - // - // This member is required. - SecurityGroupRuleId *string - - // Information about the security group rule. - SecurityGroupRule *SecurityGroupRuleRequest - - noSmithyDocumentSerde -} - -// Describes a service configuration for a VPC endpoint service. -type ServiceConfiguration struct { - - // Indicates whether requests from other Amazon Web Services accounts to create an - // endpoint to the service must first be accepted. - AcceptanceRequired *bool - - // The Availability Zones in which the service is available. - AvailabilityZones []string - - // The DNS names for the service. - BaseEndpointDnsNames []string - - // The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. - GatewayLoadBalancerArns []string - - // Indicates whether the service manages its VPC endpoints. Management of the - // service VPC endpoints using the VPC endpoint API is restricted. - ManagesVpcEndpoints *bool - - // The Amazon Resource Names (ARNs) of the Network Load Balancers for the service. - NetworkLoadBalancerArns []string - - // The payer responsibility. - PayerResponsibility PayerResponsibility - - // The private DNS name for the service. - PrivateDnsName *string - - // Information about the endpoint service private DNS name configuration. - PrivateDnsNameConfiguration *PrivateDnsNameConfiguration - - // The ID of the service. - ServiceId *string - - // The name of the service. - ServiceName *string - - // The service state. - ServiceState ServiceState - - // The type of service. - ServiceType []ServiceTypeDetail - - // The supported IP address types. - SupportedIpAddressTypes []ServiceConnectivityType - - // The tags assigned to the service. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a VPC endpoint service. -type ServiceDetail struct { - - // Indicates whether VPC endpoint connection requests to the service must be - // accepted by the service owner. - AcceptanceRequired *bool - - // The Availability Zones in which the service is available. - AvailabilityZones []string - - // The DNS names for the service. - BaseEndpointDnsNames []string - - // Indicates whether the service manages its VPC endpoints. Management of the - // service VPC endpoints using the VPC endpoint API is restricted. - ManagesVpcEndpoints *bool - - // The Amazon Web Services account ID of the service owner. - Owner *string - - // The payer responsibility. - PayerResponsibility PayerResponsibility - - // The private DNS name for the service. - PrivateDnsName *string - - // The verification state of the VPC endpoint service. Consumers of the endpoint - // service cannot use the private name when the state is not verified . - PrivateDnsNameVerificationState DnsNameState - - // The private DNS names assigned to the VPC endpoint service. - PrivateDnsNames []PrivateDnsDetails - - // The ID of the endpoint service. - ServiceId *string - - // The name of the service. - ServiceName *string - - // The type of service. - ServiceType []ServiceTypeDetail - - // The supported IP address types. - SupportedIpAddressTypes []ServiceConnectivityType - - // The tags assigned to the service. - Tags []Tag - - // Indicates whether the service supports endpoint policies. - VpcEndpointPolicySupported *bool - - noSmithyDocumentSerde -} - -// Describes the type of service for a VPC endpoint. -type ServiceTypeDetail struct { - - // The type of service. - ServiceType ServiceType - - noSmithyDocumentSerde -} - -// Describes the time period for a Scheduled Instance to start its first schedule. -// The time period must span less than one day. -type SlotDateTimeRangeRequest struct { - - // The earliest date and time, in UTC, for the Scheduled Instance to start. - // - // This member is required. - EarliestTime *time.Time - - // The latest date and time, in UTC, for the Scheduled Instance to start. This - // value must be later than or equal to the earliest date and at most three months - // in the future. - // - // This member is required. - LatestTime *time.Time - - noSmithyDocumentSerde -} - -// Describes the time period for a Scheduled Instance to start its first schedule. -type SlotStartTimeRangeRequest struct { - - // The earliest date and time, in UTC, for the Scheduled Instance to start. - EarliestTime *time.Time - - // The latest date and time, in UTC, for the Scheduled Instance to start. - LatestTime *time.Time - - noSmithyDocumentSerde -} - -// Describes a snapshot. -type Snapshot struct { - - // The data encryption key identifier for the snapshot. This value is a unique - // identifier that corresponds to the data encryption key that was used to encrypt - // the original volume or snapshot copy. Because data encryption keys are inherited - // by volumes created from snapshots, and vice versa, if snapshots share the same - // data encryption key identifier, then they belong to the same volume/snapshot - // lineage. This parameter is only returned by DescribeSnapshots . - DataEncryptionKeyId *string - - // The description for the snapshot. - Description *string - - // Indicates whether the snapshot is encrypted. - Encrypted *bool - - // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that - // was used to protect the volume encryption key for the parent volume. - KmsKeyId *string - - // The ARN of the Outpost on which the snapshot is stored. For more information, - // see Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) - // in the Amazon Elastic Compute Cloud User Guide. - OutpostArn *string - - // The Amazon Web Services owner alias, from an Amazon-maintained list ( amazon ). - // This is not the user-configured Amazon Web Services account alias set using the - // IAM console. - OwnerAlias *string - - // The ID of the Amazon Web Services account that owns the EBS snapshot. - OwnerId *string - - // The progress of the snapshot, as a percentage. - Progress *string - - // Only for archived snapshots that are temporarily restored. Indicates the date - // and time when a temporarily restored snapshot will be automatically re-archived. - RestoreExpiryTime *time.Time - - // The ID of the snapshot. Each snapshot receives a unique identifier when it is - // created. - SnapshotId *string - - // Reserved for future use. - SseType SSEType - - // The time stamp when the snapshot was initiated. - StartTime *time.Time - - // The snapshot state. - State SnapshotState - - // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy - // operation fails (for example, if the proper Key Management Service (KMS) - // permissions are not obtained) this field displays error state details to help - // you diagnose why the error occurred. This parameter is only returned by - // DescribeSnapshots . - StateMessage *string - - // The storage tier in which the snapshot is stored. standard indicates that the - // snapshot is stored in the standard snapshot storage tier and that it is ready - // for use. archive indicates that the snapshot is currently archived and that it - // must be restored before it can be used. - StorageTier StorageTier - - // Any tags assigned to the snapshot. - Tags []Tag - - // The ID of the volume that was used to create the snapshot. Snapshots created by - // the CopySnapshot action have an arbitrary volume ID that should not be used for - // any purpose. - VolumeId *string - - // The size of the volume, in GiB. - VolumeSize *int32 - - noSmithyDocumentSerde -} - -// Describes the snapshot created from the imported disk. -type SnapshotDetail struct { - - // A description for the snapshot. - Description *string - - // The block device mapping for the snapshot. - DeviceName *string - - // The size of the disk in the snapshot, in GiB. - DiskImageSize *float64 - - // The format of the disk image from which the snapshot is created. - Format *string - - // The percentage of progress for the task. - Progress *string - - // The snapshot ID of the disk being imported. - SnapshotId *string - - // A brief status of the snapshot creation. - Status *string - - // A detailed status message for the snapshot creation. - StatusMessage *string - - // The URL used to access the disk image. - Url *string - - // The Amazon S3 bucket for the disk image. - UserBucket *UserBucketDetails - - noSmithyDocumentSerde -} - -// The disk container object for the import snapshot request. -type SnapshotDiskContainer struct { - - // The description of the disk image being imported. - Description *string - - // The format of the disk image being imported. Valid values: VHD | VMDK | RAW - Format *string - - // The URL to the Amazon S3-based disk image being imported. It can either be a - // https URL (https://..) or an Amazon S3 URL (s3://..). - Url *string - - // The Amazon S3 bucket for the disk image. - UserBucket *UserBucket - - noSmithyDocumentSerde -} - -// Information about a snapshot. -type SnapshotInfo struct { - - // Description specified by the CreateSnapshotRequest that has been applied to all - // snapshots. - Description *string - - // Indicates whether the snapshot is encrypted. - Encrypted *bool - - // The ARN of the Outpost on which the snapshot is stored. For more information, - // see Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) - // in the Amazon Elastic Compute Cloud User Guide. - OutpostArn *string - - // Account id used when creating this snapshot. - OwnerId *string - - // Progress this snapshot has made towards completing. - Progress *string - - // Snapshot id that can be used to describe this snapshot. - SnapshotId *string - - // Reserved for future use. - SseType SSEType - - // Time this snapshot was started. This is the same for all snapshots initiated by - // the same request. - StartTime *time.Time - - // Current state of the snapshot. - State SnapshotState - - // Tags associated with this snapshot. - Tags []Tag - - // Source volume from which this snapshot was created. - VolumeId *string - - // Size of the volume from which this snapshot was created. - VolumeSize *int32 - - noSmithyDocumentSerde -} - -// Information about a snapshot that is currently in the Recycle Bin. -type SnapshotRecycleBinInfo struct { - - // The description for the snapshot. - Description *string - - // The date and time when the snaphsot entered the Recycle Bin. - RecycleBinEnterTime *time.Time - - // The date and time when the snapshot is to be permanently deleted from the - // Recycle Bin. - RecycleBinExitTime *time.Time - - // The ID of the snapshot. - SnapshotId *string - - // The ID of the volume from which the snapshot was created. - VolumeId *string - - noSmithyDocumentSerde -} - -// Details about the import snapshot task. -type SnapshotTaskDetail struct { - - // The description of the snapshot. - Description *string - - // The size of the disk in the snapshot, in GiB. - DiskImageSize *float64 - - // Indicates whether the snapshot is encrypted. - Encrypted *bool - - // The format of the disk image from which the snapshot is created. - Format *string - - // The identifier for the KMS key that was used to create the encrypted snapshot. - KmsKeyId *string - - // The percentage of completion for the import snapshot task. - Progress *string - - // The snapshot ID of the disk being imported. - SnapshotId *string - - // A brief status for the import snapshot task. - Status *string - - // A detailed status message for the import snapshot task. - StatusMessage *string - - // The URL of the disk image from which the snapshot is created. - Url *string - - // The Amazon S3 bucket for the disk image. - UserBucket *UserBucketDetails - - noSmithyDocumentSerde -} - -// Provides information about a snapshot's storage tier. -type SnapshotTierStatus struct { - - // The date and time when the last archive process was completed. - ArchivalCompleteTime *time.Time - - // The status of the last archive or restore process. - LastTieringOperationStatus TieringOperationStatus - - // A message describing the status of the last archive or restore process. - LastTieringOperationStatusDetail *string - - // The progress of the last archive or restore process, as a percentage. - LastTieringProgress *int32 - - // The date and time when the last archive or restore process was started. - LastTieringStartTime *time.Time - - // The ID of the Amazon Web Services account that owns the snapshot. - OwnerId *string - - // Only for archived snapshots that are temporarily restored. Indicates the date - // and time when a temporarily restored snapshot will be automatically re-archived. - RestoreExpiryTime *time.Time - - // The ID of the snapshot. - SnapshotId *string - - // The state of the snapshot. - Status SnapshotState - - // The storage tier in which the snapshot is stored. standard indicates that the - // snapshot is stored in the standard snapshot storage tier and that it is ready - // for use. archive indicates that the snapshot is currently archived and that it - // must be restored before it can be used. - StorageTier StorageTier - - // The tags that are assigned to the snapshot. - Tags []Tag - - // The ID of the volume from which the snapshot was created. - VolumeId *string - - noSmithyDocumentSerde -} - -// The Spot Instance replacement strategy to use when Amazon EC2 emits a signal -// that your Spot Instance is at an elevated risk of being interrupted. For more -// information, see Capacity rebalancing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html) -// in the Amazon EC2 User Guide for Linux Instances. -type SpotCapacityRebalance struct { - - // The replacement strategy to use. Only available for fleets of type maintain . - // launch - Spot Fleet launches a new replacement Spot Instance when a rebalance - // notification is emitted for an existing Spot Instance in the fleet. Spot Fleet - // does not terminate the instances that receive a rebalance notification. You can - // terminate the old instances, or you can leave them running. You are charged for - // all instances while they are running. launch-before-terminate - Spot Fleet - // launches a new replacement Spot Instance when a rebalance notification is - // emitted for an existing Spot Instance in the fleet, and then, after a delay that - // you specify (in TerminationDelay ), terminates the instances that received a - // rebalance notification. - ReplacementStrategy ReplacementStrategy - - // The amount of time (in seconds) that Amazon EC2 waits before terminating the - // old Spot Instance after launching a new replacement Spot Instance. Required when - // ReplacementStrategy is set to launch-before-terminate . Not valid when - // ReplacementStrategy is set to launch . Valid values: Minimum value of 120 - // seconds. Maximum value of 7200 seconds. - TerminationDelay *int32 - - noSmithyDocumentSerde -} - -// Describes the data feed for a Spot Instance. -type SpotDatafeedSubscription struct { - - // The name of the Amazon S3 bucket where the Spot Instance data feed is located. - Bucket *string - - // The fault codes for the Spot Instance request, if any. - Fault *SpotInstanceStateFault - - // The Amazon Web Services account ID of the account. - OwnerId *string - - // The prefix for the data feed files. - Prefix *string - - // The state of the Spot Instance data feed subscription. - State DatafeedSubscriptionState - - noSmithyDocumentSerde -} - -// Describes the launch specification for one or more Spot Instances. If you -// include On-Demand capacity in your fleet request or want to specify an EFA -// network device, you can't use SpotFleetLaunchSpecification ; you must use -// LaunchTemplateConfig (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html) -// . -type SpotFleetLaunchSpecification struct { - - // Deprecated. - AddressingType *string - - // One or more block devices that are mapped to the Spot Instances. You can't - // specify both a snapshot ID and an encryption value. This is because only blank - // volumes can be encrypted on creation. If a snapshot is the basis for a volume, - // it is not blank and its encryption status is used for the volume encryption - // status. - BlockDeviceMappings []BlockDeviceMapping - - // Indicates whether the instances are optimized for EBS I/O. This optimization - // provides dedicated throughput to Amazon EBS and an optimized configuration stack - // to provide optimal EBS I/O performance. This optimization isn't available with - // all instance types. Additional usage charges apply when using an EBS Optimized - // instance. Default: false - EbsOptimized *bool - - // The IAM instance profile. - IamInstanceProfile *IamInstanceProfileSpecification - - // The ID of the AMI. - ImageId *string - - // The attributes for the instance types. When you specify instance attributes, - // Amazon EC2 will identify instance types with those attributes. If you specify - // InstanceRequirements , you can't specify InstanceType . - InstanceRequirements *InstanceRequirements - - // The instance type. - InstanceType InstanceType - - // The ID of the kernel. - KernelId *string - - // The name of the key pair. - KeyName *string - - // Enable or disable monitoring for the instances. - Monitoring *SpotFleetMonitoring - - // One or more network interfaces. If you specify a network interface, you must - // specify subnet IDs and security group IDs using the network interface. - // SpotFleetLaunchSpecification currently does not support Elastic Fabric Adapter - // (EFA). To specify an EFA, you must use LaunchTemplateConfig (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_LaunchTemplateConfig.html) - // . - NetworkInterfaces []InstanceNetworkInterfaceSpecification - - // The placement information. - Placement *SpotPlacement - - // The ID of the RAM disk. Some kernels require additional drivers at launch. - // Check the kernel requirements for information about whether you need to specify - // a RAM disk. To find kernel requirements, refer to the Amazon Web Services - // Resource Center and search for the kernel ID. - RamdiskId *string - - // The security groups. - SecurityGroups []GroupIdentifier - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - SpotPrice *string - - // The IDs of the subnets in which to launch the instances. To specify multiple - // subnets, separate them using commas; for example, "subnet-1234abcdeexample1, - // subnet-0987cdef6example2". - SubnetId *string - - // The tags to apply during creation. - TagSpecifications []SpotFleetTagSpecification - - // The base64-encoded user data that instances use when starting up. User data is - // limited to 16 KB. - UserData *string - - // The number of units provided by the specified instance type. These are the same - // units that you chose to set the target capacity in terms of instances, or a - // performance characteristic such as vCPUs, memory, or I/O. If the target capacity - // divided by this value is not a whole number, Amazon EC2 rounds the number of - // instances to the next whole number. If this value is not specified, the default - // is 1. - WeightedCapacity *float64 - - noSmithyDocumentSerde -} - -// Describes whether monitoring is enabled. -type SpotFleetMonitoring struct { - - // Enables monitoring for the instance. Default: false - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes a Spot Fleet request. -type SpotFleetRequestConfig struct { - - // The progress of the Spot Fleet request. If there is an error, the status is - // error . After all requests are placed, the status is pending_fulfillment . If - // the size of the fleet is equal to or greater than its target capacity, the - // status is fulfilled . If the size of the fleet is decreased, the status is - // pending_termination while Spot Instances are terminating. - ActivityStatus ActivityStatus - - // The creation date and time of the request. - CreateTime *time.Time - - // The configuration of the Spot Fleet request. - SpotFleetRequestConfig *SpotFleetRequestConfigData - - // The ID of the Spot Fleet request. - SpotFleetRequestId *string - - // The state of the Spot Fleet request. - SpotFleetRequestState BatchState - - // The tags for a Spot Fleet resource. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the configuration of a Spot Fleet request. -type SpotFleetRequestConfigData struct { - - // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) role - // that grants the Spot Fleet the permission to request, launch, terminate, and tag - // instances on your behalf. For more information, see Spot Fleet prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites) - // in the Amazon EC2 User Guide. Spot Fleet can terminate Spot Instances on your - // behalf when you cancel its Spot Fleet request using CancelSpotFleetRequests (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CancelSpotFleetRequests) - // or when the Spot Fleet request expires, if you set - // TerminateInstancesWithExpiration . - // - // This member is required. - IamFleetRole *string - - // The number of units to request for the Spot Fleet. You can choose to set the - // target capacity in terms of instances or a performance characteristic that is - // important to your application workload, such as vCPUs, memory, or I/O. If the - // request type is maintain , you can specify a target capacity of 0 and add - // capacity later. - // - // This member is required. - TargetCapacity *int32 - - // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the Spot Fleet launch configuration. - // For more information, see Allocation strategies for Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html) - // in the Amazon EC2 User Guide. priceCapacityOptimized (recommended) Spot Fleet - // identifies the pools with the highest capacity availability for the number of - // instances that are launching. This means that we will request Spot Instances - // from the pools that we believe have the lowest chance of interruption in the - // near term. Spot Fleet then requests Spot Instances from the lowest priced of - // these pools. capacityOptimized Spot Fleet identifies the pools with the highest - // capacity availability for the number of instances that are launching. This means - // that we will request Spot Instances from the pools that we believe have the - // lowest chance of interruption in the near term. To give certain instance types a - // higher chance of launching first, use capacityOptimizedPrioritized . Set a - // priority for each instance type by using the Priority parameter for - // LaunchTemplateOverrides . You can assign the same priority to different - // LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, - // but optimizes for capacity first. capacityOptimizedPrioritized is supported - // only if your Spot Fleet uses a launch template. Note that if the - // OnDemandAllocationStrategy is set to prioritized , the same priority is applied - // when fulfilling On-Demand capacity. diversified Spot Fleet requests instances - // from all of the Spot Instance pools that you specify. lowestPrice Spot Fleet - // requests instances from the lowest priced Spot Instance pool that has available - // capacity. If the lowest priced pool doesn't have available capacity, the Spot - // Instances come from the next lowest priced pool that has available capacity. If - // a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet - // will continue to fulfill your request by drawing from the next lowest priced - // pool. To ensure that your desired capacity is met, you might receive Spot - // Instances from several pools. Because this strategy only considers instance - // price and not capacity availability, it might lead to high interruption rates. - // Default: lowestPrice - AllocationStrategy AllocationStrategy - - // A unique, case-sensitive identifier that you provide to ensure the idempotency - // of your listings. This helps to avoid duplicate listings. For more information, - // see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) - // . - ClientToken *string - - // Reserved. - Context *string - - // Indicates whether running instances should be terminated if you decrease the - // target capacity of the Spot Fleet request below the current size of the Spot - // Fleet. Supported only for fleets of type maintain . - ExcessCapacityTerminationPolicy ExcessCapacityTerminationPolicy - - // The number of units fulfilled by this request compared to the set target - // capacity. You cannot set this value. - FulfilledCapacity *float64 - - // The behavior when a Spot Instance is interrupted. The default is terminate . - InstanceInterruptionBehavior InstanceInterruptionBehavior - - // The number of Spot pools across which to allocate your target Spot capacity. - // Valid only when Spot AllocationStrategy is set to lowest-price . Spot Fleet - // selects the cheapest Spot pools and evenly allocates your target Spot capacity - // across the number of Spot pools that you specify. Note that Spot Fleet attempts - // to draw Spot Instances from the number of pools that you specify on a best - // effort basis. If a pool runs out of Spot capacity before fulfilling your target - // capacity, Spot Fleet will continue to fulfill your request by drawing from the - // next cheapest pool. To ensure that your target capacity is met, you might - // receive Spot Instances from more than the number of pools that you specified. - // Similarly, if most of the pools have no Spot capacity, you might receive your - // full target capacity from fewer than the number of pools that you specified. - InstancePoolsToUseCount *int32 - - // The launch specifications for the Spot Fleet request. If you specify - // LaunchSpecifications , you can't specify LaunchTemplateConfigs . If you include - // On-Demand capacity in your request, you must use LaunchTemplateConfigs . - LaunchSpecifications []SpotFleetLaunchSpecification - - // The launch template and overrides. If you specify LaunchTemplateConfigs , you - // can't specify LaunchSpecifications . If you include On-Demand capacity in your - // request, you must use LaunchTemplateConfigs . - LaunchTemplateConfigs []LaunchTemplateConfig - - // One or more Classic Load Balancers and target groups to attach to the Spot - // Fleet request. Spot Fleet registers the running Spot Instances with the - // specified Classic Load Balancers and target groups. With Network Load Balancers, - // Spot Fleet cannot register instances that have the following instance types: C1, - // CC1, CC2, CG1, CG2, CR1, CS1, G1, G2, HI1, HS1, M1, M2, M3, and T1. - LoadBalancersConfig *LoadBalancersConfig - - // The order of the launch template overrides to use in fulfilling On-Demand - // capacity. If you specify lowestPrice , Spot Fleet uses price to determine the - // order, launching the lowest price first. If you specify prioritized , Spot Fleet - // uses the priority that you assign to each Spot Fleet launch template override, - // launching the highest priority first. If you do not specify a value, Spot Fleet - // defaults to lowestPrice . - OnDemandAllocationStrategy OnDemandAllocationStrategy - - // The number of On-Demand units fulfilled by this request compared to the set - // target On-Demand capacity. - OnDemandFulfilledCapacity *float64 - - // The maximum amount per hour for On-Demand Instances that you're willing to pay. - // You can use the onDemandMaxTotalPrice parameter, the spotMaxTotalPrice - // parameter, or both parameters to ensure that your fleet cost does not exceed - // your budget. If you set a maximum price per hour for the On-Demand Instances and - // Spot Instances in your request, Spot Fleet will launch instances until it - // reaches the maximum amount you're willing to pay. When the maximum amount you're - // willing to pay is reached, the fleet stops launching instances even if it hasn’t - // met the target capacity. If your fleet includes T instances that are configured - // as unlimited , and if their average CPU usage exceeds the baseline utilization, - // you will incur a charge for surplus credits. The onDemandMaxTotalPrice does not - // account for surplus credits, and, if you use surplus credits, your final cost - // might be higher than what you specified for onDemandMaxTotalPrice . For more - // information, see Surplus credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits) - // in the EC2 User Guide. - OnDemandMaxTotalPrice *string - - // The number of On-Demand units to request. You can choose to set the target - // capacity in terms of instances or a performance characteristic that is important - // to your application workload, such as vCPUs, memory, or I/O. If the request type - // is maintain , you can specify a target capacity of 0 and add capacity later. - OnDemandTargetCapacity *int32 - - // Indicates whether Spot Fleet should replace unhealthy instances. - ReplaceUnhealthyInstances *bool - - // The strategies for managing your Spot Instances that are at an elevated risk of - // being interrupted. - SpotMaintenanceStrategies *SpotMaintenanceStrategies - - // The maximum amount per hour for Spot Instances that you're willing to pay. You - // can use the spotMaxTotalPrice parameter, the onDemandMaxTotalPrice parameter, - // or both parameters to ensure that your fleet cost does not exceed your budget. - // If you set a maximum price per hour for the On-Demand Instances and Spot - // Instances in your request, Spot Fleet will launch instances until it reaches the - // maximum amount you're willing to pay. When the maximum amount you're willing to - // pay is reached, the fleet stops launching instances even if it hasn’t met the - // target capacity. If your fleet includes T instances that are configured as - // unlimited , and if their average CPU usage exceeds the baseline utilization, you - // will incur a charge for surplus credits. The spotMaxTotalPrice does not account - // for surplus credits, and, if you use surplus credits, your final cost might be - // higher than what you specified for spotMaxTotalPrice . For more information, see - // Surplus credits can incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits) - // in the EC2 User Guide. - SpotMaxTotalPrice *string - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - SpotPrice *string - - // The key-value pair for tagging the Spot Fleet request on creation. The value - // for ResourceType must be spot-fleet-request , otherwise the Spot Fleet request - // fails. To tag instances at launch, specify the tags in the launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) - // (valid only if you use LaunchTemplateConfigs ) or in the - // SpotFleetTagSpecification (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetTagSpecification.html) - // (valid only if you use LaunchSpecifications ). For information about tagging - // after launch, see Tag your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) - // . - TagSpecifications []TagSpecification - - // The unit for the target capacity. You can specify this parameter only when - // using attribute-based instance type selection. Default: units (the number of - // instances) - TargetCapacityUnitType TargetCapacityUnitType - - // Indicates whether running Spot Instances are terminated when the Spot Fleet - // request expires. - TerminateInstancesWithExpiration *bool - - // The type of request. Indicates whether the Spot Fleet only requests the target - // capacity or also attempts to maintain it. When this value is request , the Spot - // Fleet only places the required requests. It does not attempt to replenish Spot - // Instances if capacity is diminished, nor does it submit requests in alternative - // Spot pools if capacity is not available. When this value is maintain , the Spot - // Fleet maintains the target capacity. The Spot Fleet places the required requests - // to meet capacity and automatically replenishes any interrupted instances. - // Default: maintain . instant is listed but is not used by Spot Fleet. - Type FleetType - - // The start date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). - // By default, Amazon EC2 starts fulfilling the request immediately. - ValidFrom *time.Time - - // The end date and time of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). - // After the end date and time, no new Spot Instance requests are placed or able to - // fulfill the request. If no value is specified, the Spot Fleet request remains - // until you cancel it. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// The tags for a Spot Fleet resource. -type SpotFleetTagSpecification struct { - - // The type of resource. Currently, the only resource type that is supported is - // instance . To tag the Spot Fleet request on creation, use the TagSpecifications - // parameter in SpotFleetRequestConfigData (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotFleetRequestConfigData.html) - // . - ResourceType ResourceType - - // The tags. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes a Spot Instance request. -type SpotInstanceRequest struct { - - // Deprecated. - ActualBlockHourlyPrice *string - - // The Availability Zone group. If you specify the same Availability Zone group - // for all Spot Instance requests, all Spot Instances are launched in the same - // Availability Zone. - AvailabilityZoneGroup *string - - // Deprecated. - BlockDurationMinutes *int32 - - // The date and time when the Spot Instance request was created, in UTC format - // (for example, YYYY-MM-DDTHH:MM:SSZ). - CreateTime *time.Time - - // The fault codes for the Spot Instance request, if any. - Fault *SpotInstanceStateFault - - // The instance ID, if an instance has been launched to fulfill the Spot Instance - // request. - InstanceId *string - - // The behavior when a Spot Instance is interrupted. - InstanceInterruptionBehavior InstanceInterruptionBehavior - - // The instance launch group. Launch groups are Spot Instances that launch - // together and terminate together. - LaunchGroup *string - - // Additional information for launching instances. - LaunchSpecification *LaunchSpecification - - // The Availability Zone in which the request is launched. - LaunchedAvailabilityZone *string - - // The product description associated with the Spot Instance. - ProductDescription RIProductDescription - - // The ID of the Spot Instance request. - SpotInstanceRequestId *string - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - SpotPrice *string - - // The state of the Spot Instance request. Spot request status information helps - // track your Spot Instance requests. For more information, see Spot request status (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html) - // in the Amazon EC2 User Guide for Linux Instances. - State SpotInstanceState - - // The status code and status message describing the Spot Instance request. - Status *SpotInstanceStatus - - // Any tags assigned to the resource. - Tags []Tag - - // The Spot Instance request type. - Type SpotInstanceType - - // The start date of the request, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). The request becomes active at this date and time. - ValidFrom *time.Time - - // The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). - // - For a persistent request, the request remains active until the validUntil - // date and time is reached. Otherwise, the request remains active until you cancel - // it. - // - For a one-time request, the request remains active until all instances - // launch, the request is canceled, or the validUntil date and time is reached. - // By default, the request is valid for 7 days from the date the request was - // created. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// Describes a Spot Instance state change. -type SpotInstanceStateFault struct { - - // The reason code for the Spot Instance state change. - Code *string - - // The message for the Spot Instance state change. - Message *string - - noSmithyDocumentSerde -} - -// Describes the status of a Spot Instance request. -type SpotInstanceStatus struct { - - // The status code. For a list of status codes, see Spot request status codes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-request-status.html#spot-instance-request-status-understand) - // in the Amazon EC2 User Guide for Linux Instances. - Code *string - - // The description for the status code. - Message *string - - // The date and time of the most recent status update, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - UpdateTime *time.Time - - noSmithyDocumentSerde -} - -// The strategies for managing your Spot Instances that are at an elevated risk of -// being interrupted. -type SpotMaintenanceStrategies struct { - - // The Spot Instance replacement strategy to use when Amazon EC2 emits a signal - // that your Spot Instance is at an elevated risk of being interrupted. For more - // information, see Capacity rebalancing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-capacity-rebalance.html) - // in the Amazon EC2 User Guide for Linux Instances. - CapacityRebalance *SpotCapacityRebalance - - noSmithyDocumentSerde -} - -// The options for Spot Instances. -type SpotMarketOptions struct { - - // Deprecated. - BlockDurationMinutes *int32 - - // The behavior when a Spot Instance is interrupted. If Configured (for - // HibernationOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html) - // ) is set to true , the InstanceInterruptionBehavior parameter is automatically - // set to hibernate . If you set it to stop or terminate , you'll get an error. If - // Configured (for HibernationOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html) - // ) is set to false or null , the InstanceInterruptionBehavior parameter is - // automatically set to terminate . You can also set it to stop or hibernate . For - // more information, see Interruption behavior (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/interruption-behavior.html) - // in the Amazon EC2 User Guide. - InstanceInterruptionBehavior InstanceInterruptionBehavior - - // The maximum hourly price that you're willing to pay for a Spot Instance. We do - // not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. If you specify a maximum price, your Spot Instances will be - // interrupted more frequently than if you do not specify this parameter. - MaxPrice *string - - // The Spot Instance request type. For RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances) - // , persistent Spot Instance requests are only supported when the instance - // interruption behavior is either hibernate or stop . - SpotInstanceType SpotInstanceType - - // The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported - // only for persistent requests. - // - For a persistent request, the request remains active until the ValidUntil - // date and time is reached. Otherwise, the request remains active until you cancel - // it. - // - For a one-time request, ValidUntil is not supported. The request remains - // active until all instances launch or you cancel the request. - ValidUntil *time.Time - - noSmithyDocumentSerde -} - -// Describes the configuration of Spot Instances in an EC2 Fleet. -type SpotOptions struct { - - // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the EC2 Fleet launch configuration. - // For more information, see Allocation strategies for Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) - // in the Amazon EC2 User Guide. price-capacity-optimized (recommended) EC2 Fleet - // identifies the pools with the highest capacity availability for the number of - // instances that are launching. This means that we will request Spot Instances - // from the pools that we believe have the lowest chance of interruption in the - // near term. EC2 Fleet then requests Spot Instances from the lowest priced of - // these pools. capacity-optimized EC2 Fleet identifies the pools with the highest - // capacity availability for the number of instances that are launching. This means - // that we will request Spot Instances from the pools that we believe have the - // lowest chance of interruption in the near term. To give certain instance types a - // higher chance of launching first, use capacity-optimized-prioritized . Set a - // priority for each instance type by using the Priority parameter for - // LaunchTemplateOverrides . You can assign the same priority to different - // LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, - // but optimizes for capacity first. capacity-optimized-prioritized is supported - // only if your EC2 Fleet uses a launch template. Note that if the On-Demand - // AllocationStrategy is set to prioritized , the same priority is applied when - // fulfilling On-Demand capacity. diversified EC2 Fleet requests instances from all - // of the Spot Instance pools that you specify. lowest-price EC2 Fleet requests - // instances from the lowest priced Spot Instance pool that has available capacity. - // If the lowest priced pool doesn't have available capacity, the Spot Instances - // come from the next lowest priced pool that has available capacity. If a pool - // runs out of capacity before fulfilling your desired capacity, EC2 Fleet will - // continue to fulfill your request by drawing from the next lowest priced pool. To - // ensure that your desired capacity is met, you might receive Spot Instances from - // several pools. Because this strategy only considers instance price and not - // capacity availability, it might lead to high interruption rates. Default: - // lowest-price - AllocationStrategy SpotAllocationStrategy - - // The behavior when a Spot Instance is interrupted. Default: terminate - InstanceInterruptionBehavior SpotInstanceInterruptionBehavior - - // The number of Spot pools across which to allocate your target Spot capacity. - // Supported only when AllocationStrategy is set to lowest-price . EC2 Fleet - // selects the cheapest Spot pools and evenly allocates your target Spot capacity - // across the number of Spot pools that you specify. Note that EC2 Fleet attempts - // to draw Spot Instances from the number of pools that you specify on a best - // effort basis. If a pool runs out of Spot capacity before fulfilling your target - // capacity, EC2 Fleet will continue to fulfill your request by drawing from the - // next cheapest pool. To ensure that your target capacity is met, you might - // receive Spot Instances from more than the number of pools that you specified. - // Similarly, if most of the pools have no Spot capacity, you might receive your - // full target capacity from fewer than the number of pools that you specified. - InstancePoolsToUseCount *int32 - - // The strategies for managing your workloads on your Spot Instances that will be - // interrupted. Currently only the capacity rebalance strategy is available. - MaintenanceStrategies *FleetSpotMaintenanceStrategies - - // The maximum amount per hour for Spot Instances that you're willing to pay. We - // do not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. If you specify a maximum price, your Spot Instances will be - // interrupted more frequently than if you do not specify this parameter. If your - // fleet includes T instances that are configured as unlimited , and if their - // average CPU usage exceeds the baseline utilization, you will incur a charge for - // surplus credits. The maxTotalPrice does not account for surplus credits, and, - // if you use surplus credits, your final cost might be higher than what you - // specified for maxTotalPrice . For more information, see Surplus credits can - // incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits) - // in the EC2 User Guide. - MaxTotalPrice *string - - // The minimum target capacity for Spot Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. Supported only - // for fleets of type instant . At least one of the following must be specified: - // SingleAvailabilityZone | SingleInstanceType - MinTargetCapacity *int32 - - // Indicates that the fleet launches all Spot Instances into a single Availability - // Zone. Supported only for fleets of type instant . - SingleAvailabilityZone *bool - - // Indicates that the fleet uses a single instance type to launch all Spot - // Instances in the fleet. Supported only for fleets of type instant . - SingleInstanceType *bool - - noSmithyDocumentSerde -} - -// Describes the configuration of Spot Instances in an EC2 Fleet request. -type SpotOptionsRequest struct { - - // The strategy that determines how to allocate the target Spot Instance capacity - // across the Spot Instance pools specified by the EC2 Fleet launch configuration. - // For more information, see Allocation strategies for Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html) - // in the Amazon EC2 User Guide. price-capacity-optimized (recommended) EC2 Fleet - // identifies the pools with the highest capacity availability for the number of - // instances that are launching. This means that we will request Spot Instances - // from the pools that we believe have the lowest chance of interruption in the - // near term. EC2 Fleet then requests Spot Instances from the lowest priced of - // these pools. capacity-optimized EC2 Fleet identifies the pools with the highest - // capacity availability for the number of instances that are launching. This means - // that we will request Spot Instances from the pools that we believe have the - // lowest chance of interruption in the near term. To give certain instance types a - // higher chance of launching first, use capacity-optimized-prioritized . Set a - // priority for each instance type by using the Priority parameter for - // LaunchTemplateOverrides . You can assign the same priority to different - // LaunchTemplateOverrides . EC2 implements the priorities on a best-effort basis, - // but optimizes for capacity first. capacity-optimized-prioritized is supported - // only if your EC2 Fleet uses a launch template. Note that if the On-Demand - // AllocationStrategy is set to prioritized , the same priority is applied when - // fulfilling On-Demand capacity. diversified EC2 Fleet requests instances from all - // of the Spot Instance pools that you specify. lowest-price EC2 Fleet requests - // instances from the lowest priced Spot Instance pool that has available capacity. - // If the lowest priced pool doesn't have available capacity, the Spot Instances - // come from the next lowest priced pool that has available capacity. If a pool - // runs out of capacity before fulfilling your desired capacity, EC2 Fleet will - // continue to fulfill your request by drawing from the next lowest priced pool. To - // ensure that your desired capacity is met, you might receive Spot Instances from - // several pools. Because this strategy only considers instance price and not - // capacity availability, it might lead to high interruption rates. Default: - // lowest-price - AllocationStrategy SpotAllocationStrategy - - // The behavior when a Spot Instance is interrupted. Default: terminate - InstanceInterruptionBehavior SpotInstanceInterruptionBehavior - - // The number of Spot pools across which to allocate your target Spot capacity. - // Supported only when Spot AllocationStrategy is set to lowest-price . EC2 Fleet - // selects the cheapest Spot pools and evenly allocates your target Spot capacity - // across the number of Spot pools that you specify. Note that EC2 Fleet attempts - // to draw Spot Instances from the number of pools that you specify on a best - // effort basis. If a pool runs out of Spot capacity before fulfilling your target - // capacity, EC2 Fleet will continue to fulfill your request by drawing from the - // next cheapest pool. To ensure that your target capacity is met, you might - // receive Spot Instances from more than the number of pools that you specified. - // Similarly, if most of the pools have no Spot capacity, you might receive your - // full target capacity from fewer than the number of pools that you specified. - InstancePoolsToUseCount *int32 - - // The strategies for managing your Spot Instances that are at an elevated risk of - // being interrupted. - MaintenanceStrategies *FleetSpotMaintenanceStrategiesRequest - - // The maximum amount per hour for Spot Instances that you're willing to pay. We - // do not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. If you specify a maximum price, your Spot Instances will be - // interrupted more frequently than if you do not specify this parameter. If your - // fleet includes T instances that are configured as unlimited , and if their - // average CPU usage exceeds the baseline utilization, you will incur a charge for - // surplus credits. The MaxTotalPrice does not account for surplus credits, and, - // if you use surplus credits, your final cost might be higher than what you - // specified for MaxTotalPrice . For more information, see Surplus credits can - // incur charges (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances-unlimited-mode-concepts.html#unlimited-mode-surplus-credits) - // in the EC2 User Guide. - MaxTotalPrice *string - - // The minimum target capacity for Spot Instances in the fleet. If the minimum - // target capacity is not reached, the fleet launches no instances. Supported only - // for fleets of type instant . At least one of the following must be specified: - // SingleAvailabilityZone | SingleInstanceType - MinTargetCapacity *int32 - - // Indicates that the fleet launches all Spot Instances into a single Availability - // Zone. Supported only for fleets of type instant . - SingleAvailabilityZone *bool - - // Indicates that the fleet uses a single instance type to launch all Spot - // Instances in the fleet. Supported only for fleets of type instant . - SingleInstanceType *bool - - noSmithyDocumentSerde -} - -// Describes Spot Instance placement. -type SpotPlacement struct { - - // The Availability Zone. [Spot Fleet only] To specify multiple Availability - // Zones, separate them using commas; for example, "us-west-2a, us-west-2b". - AvailabilityZone *string - - // The name of the placement group. - GroupName *string - - // The tenancy of the instance (if the instance is running in a VPC). An instance - // with a tenancy of dedicated runs on single-tenant hardware. The host tenancy is - // not supported for Spot Instances. - Tenancy Tenancy - - noSmithyDocumentSerde -} - -// The Spot placement score for this Region or Availability Zone. The score is -// calculated based on the assumption that the capacity-optimized allocation -// strategy is used and that all of the Availability Zones in the Region can be -// used. -type SpotPlacementScore struct { - - // The Availability Zone. - AvailabilityZoneId *string - - // The Region. - Region *string - - // The placement score, on a scale from 1 to 10 . A score of 10 indicates that - // your Spot request is highly likely to succeed in this Region or Availability - // Zone. A score of 1 indicates that your Spot request is not likely to succeed. - Score *int32 - - noSmithyDocumentSerde -} - -// The maximum price per unit hour that you are willing to pay for a Spot -// Instance. We do not recommend using this parameter because it can lead to -// increased interruptions. If you do not specify this parameter, you will pay the -// current Spot price. If you specify a maximum price, your instances will be -// interrupted more frequently than if you do not specify this parameter. -type SpotPrice struct { - - // The Availability Zone. - AvailabilityZone *string - - // The instance type. - InstanceType InstanceType - - // A general description of the AMI. - ProductDescription RIProductDescription - - // The maximum price per unit hour that you are willing to pay for a Spot - // Instance. We do not recommend using this parameter because it can lead to - // increased interruptions. If you do not specify this parameter, you will pay the - // current Spot price. If you specify a maximum price, your instances will be - // interrupted more frequently than if you do not specify this parameter. - SpotPrice *string - - // The date and time the request was created, in UTC format (for example, - // YYYY-MM-DDTHH:MM:SSZ). - Timestamp *time.Time - - noSmithyDocumentSerde -} - -// Describes a stale rule in a security group. -type StaleIpPermission struct { - - // The start of the port range for the TCP and UDP protocols, or an ICMP type - // number. A value of -1 indicates all ICMP types. - FromPort *int32 - - // The IP protocol name (for tcp , udp , and icmp ) or number (see Protocol - // Numbers) (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - // . - IpProtocol *string - - // The IP ranges. Not applicable for stale security group rules. - IpRanges []string - - // The prefix list IDs. Not applicable for stale security group rules. - PrefixListIds []string - - // The end of the port range for the TCP and UDP protocols, or an ICMP type - // number. A value of -1 indicates all ICMP types. - ToPort *int32 - - // The security group pairs. Returns the ID of the referenced security group and - // VPC, and the ID and status of the VPC peering connection. - UserIdGroupPairs []UserIdGroupPair - - noSmithyDocumentSerde -} - -// Describes a stale security group (a security group that contains stale rules). -type StaleSecurityGroup struct { - - // The description of the security group. - Description *string - - // The ID of the security group. - GroupId *string - - // The name of the security group. - GroupName *string - - // Information about the stale inbound rules in the security group. - StaleIpPermissions []StaleIpPermission - - // Information about the stale outbound rules in the security group. - StaleIpPermissionsEgress []StaleIpPermission - - // The ID of the VPC for the security group. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes a state change. -type StateReason struct { - - // The reason code for the state change. - Code *string - - // The message for the state change. - // - Server.InsufficientInstanceCapacity : There was insufficient capacity - // available to satisfy the launch request. - // - Server.InternalError : An internal error caused the instance to terminate - // during launch. - // - Server.ScheduledStop : The instance was stopped due to a scheduled - // retirement. - // - Server.SpotInstanceShutdown : The instance was stopped because the number of - // Spot requests with a maximum price equal to or higher than the Spot price - // exceeded available capacity or because of an increase in the Spot price. - // - Server.SpotInstanceTermination : The instance was terminated because the - // number of Spot requests with a maximum price equal to or higher than the Spot - // price exceeded available capacity or because of an increase in the Spot price. - // - Client.InstanceInitiatedShutdown : The instance was shut down from the - // operating system of the instance. - // - Client.InstanceTerminated : The instance was terminated or rebooted during - // AMI creation. - // - Client.InternalError : A client error caused the instance to terminate - // during launch. - // - Client.InvalidSnapshot.NotFound : The specified snapshot was not found. - // - Client.UserInitiatedHibernate : Hibernation was initiated on the instance. - // - Client.UserInitiatedShutdown : The instance was shut down using the Amazon - // EC2 API. - // - Client.VolumeLimitExceeded : The limit on the number of EBS volumes or total - // storage was exceeded. Decrease usage or request an increase in your account - // limits. - Message *string - - noSmithyDocumentSerde -} - -// Describes the storage location for an instance store-backed AMI. -type Storage struct { - - // An Amazon S3 storage location. - S3 *S3Storage - - noSmithyDocumentSerde -} - -// Describes a storage location in Amazon S3. -type StorageLocation struct { - - // The name of the S3 bucket. - Bucket *string - - // The key. - Key *string - - noSmithyDocumentSerde -} - -// The information about the AMI store task, including the progress of the task. -type StoreImageTaskResult struct { - - // The ID of the AMI that is being stored. - AmiId *string - - // The name of the Amazon S3 bucket that contains the stored AMI object. - Bucket *string - - // The progress of the task as a percentage. - ProgressPercentage *int32 - - // The name of the stored AMI object in the bucket. - S3objectKey *string - - // If the tasks fails, the reason for the failure is returned. If the task - // succeeds, null is returned. - StoreTaskFailureReason *string - - // The state of the store task ( InProgress , Completed , or Failed ). - StoreTaskState *string - - // The time the task started. - TaskStartTime *time.Time - - noSmithyDocumentSerde -} - -// Describes a subnet. -type Subnet struct { - - // Indicates whether a network interface created in this subnet (including a - // network interface created by RunInstances ) receives an IPv6 address. - AssignIpv6AddressOnCreation *bool - - // The Availability Zone of the subnet. - AvailabilityZone *string - - // The AZ ID of the subnet. - AvailabilityZoneId *string - - // The number of unused private IPv4 addresses in the subnet. The IPv4 addresses - // for any stopped instances are considered unavailable. - AvailableIpAddressCount *int32 - - // The IPv4 CIDR block assigned to the subnet. - CidrBlock *string - - // The customer-owned IPv4 address pool associated with the subnet. - CustomerOwnedIpv4Pool *string - - // Indicates whether this is the default subnet for the Availability Zone. - DefaultForAz *bool - - // Indicates whether DNS queries made to the Amazon-provided DNS Resolver in this - // subnet should return synthetic IPv6 addresses for IPv4-only destinations. - EnableDns64 *bool - - // Indicates the device position for local network interfaces in this subnet. For - // example, 1 indicates local network interfaces in this subnet are the secondary - // network interface (eth1). - EnableLniAtDeviceIndex *int32 - - // Information about the IPv6 CIDR blocks associated with the subnet. - Ipv6CidrBlockAssociationSet []SubnetIpv6CidrBlockAssociation - - // Indicates whether this is an IPv6 only subnet. - Ipv6Native *bool - - // Indicates whether a network interface created in this subnet (including a - // network interface created by RunInstances ) receives a customer-owned IPv4 - // address. - MapCustomerOwnedIpOnLaunch *bool - - // Indicates whether instances launched in this subnet receive a public IPv4 - // address. Starting on February 1, 2024, Amazon Web Services will charge for all - // public IPv4 addresses, including public IPv4 addresses associated with running - // instances and Elastic IP addresses. For more information, see the Public IPv4 - // Address tab on the Amazon VPC pricing page (http://aws.amazon.com/vpc/pricing/) . - MapPublicIpOnLaunch *bool - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The ID of the Amazon Web Services account that owns the subnet. - OwnerId *string - - // The type of hostnames to assign to instances in the subnet at launch. An - // instance hostname is based on the IPv4 address or ID of the instance. - PrivateDnsNameOptionsOnLaunch *PrivateDnsNameOptionsOnLaunch - - // The current state of the subnet. - State SubnetState - - // The Amazon Resource Name (ARN) of the subnet. - SubnetArn *string - - // The ID of the subnet. - SubnetId *string - - // Any tags assigned to the subnet. - Tags []Tag - - // The ID of the VPC the subnet is in. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes the subnet association with the transit gateway multicast domain. -type SubnetAssociation struct { - - // The state of the subnet association. - State TransitGatewayMulitcastDomainAssociationState - - // The ID of the subnet. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes the state of a CIDR block. -type SubnetCidrBlockState struct { - - // The state of a CIDR block. - State SubnetCidrBlockStateCode - - // A message about the status of the CIDR block, if applicable. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Describes a subnet CIDR reservation. -type SubnetCidrReservation struct { - - // The CIDR that has been reserved. - Cidr *string - - // The description assigned to the subnet CIDR reservation. - Description *string - - // The ID of the account that owns the subnet CIDR reservation. - OwnerId *string - - // The type of reservation. - ReservationType SubnetCidrReservationType - - // The ID of the subnet CIDR reservation. - SubnetCidrReservationId *string - - // The ID of the subnet. - SubnetId *string - - // The tags assigned to the subnet CIDR reservation. - Tags []Tag - - noSmithyDocumentSerde -} - -// Describes the configuration of a subnet for a VPC endpoint. -type SubnetConfiguration struct { - - // The IPv4 address to assign to the endpoint network interface in the subnet. You - // must provide an IPv4 address if the VPC endpoint supports IPv4. If you specify - // an IPv4 address when modifying a VPC endpoint, we replace the existing endpoint - // network interface with a new endpoint network interface with this IP address. - // This process temporarily disconnects the subnet and the VPC endpoint. - Ipv4 *string - - // The IPv6 address to assign to the endpoint network interface in the subnet. You - // must provide an IPv6 address if the VPC endpoint supports IPv6. If you specify - // an IPv6 address when modifying a VPC endpoint, we replace the existing endpoint - // network interface with a new endpoint network interface with this IP address. - // This process temporarily disconnects the subnet and the VPC endpoint. - Ipv6 *string - - // The ID of the subnet. - SubnetId *string - - noSmithyDocumentSerde -} - -// Describes an association between a subnet and an IPv6 CIDR block. -type SubnetIpv6CidrBlockAssociation struct { - - // The ID of the association. - AssociationId *string - - // The IPv6 CIDR block. - Ipv6CidrBlock *string - - // The state of the CIDR block. - Ipv6CidrBlockState *SubnetCidrBlockState - - noSmithyDocumentSerde -} - -// Describes an Infrastructure Performance subscription. -type Subscription struct { - - // The Region or Availability Zone that's the target for the subscription. For - // example, eu-west-1 . - Destination *string - - // The metric used for the subscription. - Metric MetricType - - // The data aggregation time for the subscription. - Period PeriodType - - // The Region or Availability Zone that's the source for the subscription. For - // example, us-east-1 . - Source *string - - // The statistic used for the subscription. - Statistic StatisticType - - noSmithyDocumentSerde -} - -// Describes the burstable performance instance whose credit option for CPU usage -// was successfully modified. -type SuccessfulInstanceCreditSpecificationItem struct { - - // The ID of the instance. - InstanceId *string - - noSmithyDocumentSerde -} - -// Describes a Reserved Instance whose queued purchase was successfully deleted. -type SuccessfulQueuedPurchaseDeletion struct { - - // The ID of the Reserved Instance. - ReservedInstancesId *string - - noSmithyDocumentSerde -} - -// Describes a tag. -type Tag struct { - - // The key of the tag. Constraints: Tag keys are case-sensitive and accept a - // maximum of 127 Unicode characters. May not begin with aws: . - Key *string - - // The value of the tag. Constraints: Tag values are case-sensitive and accept a - // maximum of 256 Unicode characters. - Value *string - - noSmithyDocumentSerde -} - -// Describes a tag. -type TagDescription struct { - - // The tag key. - Key *string - - // The ID of the resource. - ResourceId *string - - // The resource type. - ResourceType ResourceType - - // The tag value. - Value *string - - noSmithyDocumentSerde -} - -// The tags to apply to a resource when the resource is being created. When you -// specify a tag, you must specify the resource type to tag, otherwise the request -// will fail. The Valid Values lists all the resource types that can be tagged. -// However, the action you're using might not support tagging all of these resource -// types. If you try to tag a resource type that is unsupported for the action -// you're using, you'll get an error. -type TagSpecification struct { - - // The type of resource to tag on creation. - ResourceType ResourceType - - // The tags to apply to the resource. - Tags []Tag - - noSmithyDocumentSerde -} - -// The number of units to request. You can choose to set the target capacity in -// terms of instances or a performance characteristic that is important to your -// application workload, such as vCPUs, memory, or I/O. If the request type is -// maintain , you can specify a target capacity of 0 and add capacity later. You -// can use the On-Demand Instance MaxTotalPrice parameter, the Spot Instance -// MaxTotalPrice , or both to ensure that your fleet cost does not exceed your -// budget. If you set a maximum price per hour for the On-Demand Instances and Spot -// Instances in your request, EC2 Fleet will launch instances until it reaches the -// maximum amount that you're willing to pay. When the maximum amount you're -// willing to pay is reached, the fleet stops launching instances even if it hasn’t -// met the target capacity. The MaxTotalPrice parameters are located in -// OnDemandOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptions.html) -// and SpotOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptions) -// . -type TargetCapacitySpecification struct { - - // The default target capacity type. - DefaultTargetCapacityType DefaultTargetCapacityType - - // The number of On-Demand units to request. If you specify a target capacity for - // Spot units, you cannot specify a target capacity for On-Demand units. - OnDemandTargetCapacity *int32 - - // The maximum number of Spot units to launch. If you specify a target capacity - // for On-Demand units, you cannot specify a target capacity for Spot units. - SpotTargetCapacity *int32 - - // The unit for the target capacity. - TargetCapacityUnitType TargetCapacityUnitType - - // The number of units to request, filled the default target capacity type. - TotalTargetCapacity *int32 - - noSmithyDocumentSerde -} - -// The number of units to request. You can choose to set the target capacity as -// the number of instances. Or you can set the target capacity to a performance -// characteristic that is important to your application workload, such as vCPUs, -// memory, or I/O. If the request type is maintain , you can specify a target -// capacity of 0 and add capacity later. You can use the On-Demand Instance -// MaxTotalPrice parameter, the Spot Instance MaxTotalPrice parameter, or both -// parameters to ensure that your fleet cost does not exceed your budget. If you -// set a maximum price per hour for the On-Demand Instances and Spot Instances in -// your request, EC2 Fleet will launch instances until it reaches the maximum -// amount that you're willing to pay. When the maximum amount you're willing to pay -// is reached, the fleet stops launching instances even if it hasn't met the target -// capacity. The MaxTotalPrice parameters are located in OnDemandOptionsRequest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptionsRequest) -// and SpotOptionsRequest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptionsRequest) -// . -type TargetCapacitySpecificationRequest struct { - - // The number of units to request, filled using the default target capacity type. - // - // This member is required. - TotalTargetCapacity *int32 - - // The default target capacity type. - DefaultTargetCapacityType DefaultTargetCapacityType - - // The number of On-Demand units to request. - OnDemandTargetCapacity *int32 - - // The number of Spot units to request. - SpotTargetCapacity *int32 - - // The unit for the target capacity. You can specify this parameter only when - // using attributed-based instance type selection. Default: units (the number of - // instances) - TargetCapacityUnitType TargetCapacityUnitType - - noSmithyDocumentSerde -} - -// Information about the Convertible Reserved Instance offering. -type TargetConfiguration struct { - - // The number of instances the Convertible Reserved Instance offering can be - // applied to. This parameter is reserved and cannot be specified in a request - InstanceCount *int32 - - // The ID of the Convertible Reserved Instance offering. - OfferingId *string - - noSmithyDocumentSerde -} - -// Details about the target configuration. -type TargetConfigurationRequest struct { - - // The Convertible Reserved Instance offering ID. - // - // This member is required. - OfferingId *string - - // The number of instances the Convertible Reserved Instance offering can be - // applied to. This parameter is reserved and cannot be specified in a request - InstanceCount *int32 - - noSmithyDocumentSerde -} - -// Describes a load balancer target group. -type TargetGroup struct { - - // The Amazon Resource Name (ARN) of the target group. - Arn *string - - noSmithyDocumentSerde -} - -// Describes the target groups to attach to a Spot Fleet. Spot Fleet registers the -// running Spot Instances with these target groups. -type TargetGroupsConfig struct { - - // One or more target groups. - TargetGroups []TargetGroup - - noSmithyDocumentSerde -} - -// Describes a target network associated with a Client VPN endpoint. -type TargetNetwork struct { - - // The ID of the association. - AssociationId *string - - // The ID of the Client VPN endpoint with which the target network is associated. - ClientVpnEndpointId *string - - // The IDs of the security groups applied to the target network association. - SecurityGroups []string - - // The current state of the target network association. - Status *AssociationStatus - - // The ID of the subnet specified as the target network. - TargetNetworkId *string - - // The ID of the VPC in which the target network (subnet) is located. - VpcId *string - - noSmithyDocumentSerde -} - -// The total value of the new Convertible Reserved Instances. -type TargetReservationValue struct { - - // The total value of the Convertible Reserved Instances that make up the - // exchange. This is the sum of the list value, remaining upfront price, and - // additional upfront cost of the exchange. - ReservationValue *ReservationValue - - // The configuration of the Convertible Reserved Instances that make up the - // exchange. - TargetConfiguration *TargetConfiguration - - noSmithyDocumentSerde -} - -// Information about a terminated Client VPN endpoint client connection. -type TerminateConnectionStatus struct { - - // The ID of the client connection. - ConnectionId *string - - // A message about the status of the client connection, if applicable. - CurrentStatus *ClientVpnConnectionStatus - - // The state of the client connection. - PreviousStatus *ClientVpnConnectionStatus - - noSmithyDocumentSerde -} - -// Describes a through resource statement. -type ThroughResourcesStatement struct { - - // The resource statement. - ResourceStatement *ResourceStatement - - noSmithyDocumentSerde -} - -// Describes a through resource statement. -type ThroughResourcesStatementRequest struct { - - // The resource statement. - ResourceStatement *ResourceStatementRequest - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of total local storage, in GB. -type TotalLocalStorageGB struct { - - // The maximum amount of total local storage, in GB. If this parameter is not - // specified, there is no maximum limit. - Max *float64 - - // The minimum amount of total local storage, in GB. If this parameter is not - // specified, there is no minimum limit. - Min *float64 - - noSmithyDocumentSerde -} - -// The minimum and maximum amount of total local storage, in GB. -type TotalLocalStorageGBRequest struct { - - // The maximum amount of total local storage, in GB. To specify no maximum limit, - // omit this parameter. - Max *float64 - - // The minimum amount of total local storage, in GB. To specify no minimum limit, - // omit this parameter. - Min *float64 - - noSmithyDocumentSerde -} - -// Describes the Traffic Mirror filter. -type TrafficMirrorFilter struct { - - // The description of the Traffic Mirror filter. - Description *string - - // Information about the egress rules that are associated with the Traffic Mirror - // filter. - EgressFilterRules []TrafficMirrorFilterRule - - // Information about the ingress rules that are associated with the Traffic Mirror - // filter. - IngressFilterRules []TrafficMirrorFilterRule - - // The network service traffic that is associated with the Traffic Mirror filter. - NetworkServices []TrafficMirrorNetworkService - - // The tags assigned to the Traffic Mirror filter. - Tags []Tag - - // The ID of the Traffic Mirror filter. - TrafficMirrorFilterId *string - - noSmithyDocumentSerde -} - -// Describes the Traffic Mirror rule. -type TrafficMirrorFilterRule struct { - - // The description of the Traffic Mirror rule. - Description *string - - // The destination CIDR block assigned to the Traffic Mirror rule. - DestinationCidrBlock *string - - // The destination port range assigned to the Traffic Mirror rule. - DestinationPortRange *TrafficMirrorPortRange - - // The protocol assigned to the Traffic Mirror rule. - Protocol *int32 - - // The action assigned to the Traffic Mirror rule. - RuleAction TrafficMirrorRuleAction - - // The rule number of the Traffic Mirror rule. - RuleNumber *int32 - - // The source CIDR block assigned to the Traffic Mirror rule. - SourceCidrBlock *string - - // The source port range assigned to the Traffic Mirror rule. - SourcePortRange *TrafficMirrorPortRange - - // The traffic direction assigned to the Traffic Mirror rule. - TrafficDirection TrafficDirection - - // The ID of the Traffic Mirror filter that the rule is associated with. - TrafficMirrorFilterId *string - - // The ID of the Traffic Mirror rule. - TrafficMirrorFilterRuleId *string - - noSmithyDocumentSerde -} - -// Describes the Traffic Mirror port range. -type TrafficMirrorPortRange struct { - - // The start of the Traffic Mirror port range. This applies to the TCP and UDP - // protocols. - FromPort *int32 - - // The end of the Traffic Mirror port range. This applies to the TCP and UDP - // protocols. - ToPort *int32 - - noSmithyDocumentSerde -} - -// Information about the Traffic Mirror filter rule port range. -type TrafficMirrorPortRangeRequest struct { - - // The first port in the Traffic Mirror port range. This applies to the TCP and - // UDP protocols. - FromPort *int32 - - // The last port in the Traffic Mirror port range. This applies to the TCP and UDP - // protocols. - ToPort *int32 - - noSmithyDocumentSerde -} - -// Describes a Traffic Mirror session. -type TrafficMirrorSession struct { - - // The description of the Traffic Mirror session. - Description *string - - // The ID of the Traffic Mirror session's network interface. - NetworkInterfaceId *string - - // The ID of the account that owns the Traffic Mirror session. - OwnerId *string - - // The number of bytes in each packet to mirror. These are the bytes after the - // VXLAN header. To mirror a subset, set this to the length (in bytes) to mirror. - // For example, if you set this value to 100, then the first 100 bytes that meet - // the filter criteria are copied to the target. Do not specify this parameter when - // you want to mirror the entire packet - PacketLength *int32 - - // The session number determines the order in which sessions are evaluated when an - // interface is used by multiple sessions. The first session with a matching filter - // is the one that mirrors the packets. Valid values are 1-32766. - SessionNumber *int32 - - // The tags assigned to the Traffic Mirror session. - Tags []Tag - - // The ID of the Traffic Mirror filter. - TrafficMirrorFilterId *string - - // The ID for the Traffic Mirror session. - TrafficMirrorSessionId *string - - // The ID of the Traffic Mirror target. - TrafficMirrorTargetId *string - - // The virtual network ID associated with the Traffic Mirror session. - VirtualNetworkId *int32 - - noSmithyDocumentSerde -} - -// Describes a Traffic Mirror target. -type TrafficMirrorTarget struct { - - // Information about the Traffic Mirror target. - Description *string - - // The ID of the Gateway Load Balancer endpoint. - GatewayLoadBalancerEndpointId *string - - // The network interface ID that is attached to the target. - NetworkInterfaceId *string - - // The Amazon Resource Name (ARN) of the Network Load Balancer. - NetworkLoadBalancerArn *string - - // The ID of the account that owns the Traffic Mirror target. - OwnerId *string - - // The tags assigned to the Traffic Mirror target. - Tags []Tag - - // The ID of the Traffic Mirror target. - TrafficMirrorTargetId *string - - // The type of Traffic Mirror target. - Type TrafficMirrorTargetType - - noSmithyDocumentSerde -} - -// Describes a transit gateway. -type TransitGateway struct { - - // The creation time. - CreationTime *time.Time - - // The description of the transit gateway. - Description *string - - // The transit gateway options. - Options *TransitGatewayOptions - - // The ID of the Amazon Web Services account that owns the transit gateway. - OwnerId *string - - // The state of the transit gateway. - State TransitGatewayState - - // The tags for the transit gateway. - Tags []Tag - - // The Amazon Resource Name (ARN) of the transit gateway. - TransitGatewayArn *string - - // The ID of the transit gateway. - TransitGatewayId *string - - noSmithyDocumentSerde -} - -// Describes an association between a resource attachment and a transit gateway -// route table. -type TransitGatewayAssociation struct { - - // The ID of the resource. - ResourceId *string - - // The resource type. Note that the tgw-peering resource type has been deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The state of the association. - State TransitGatewayAssociationState - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes an attachment between a resource and a transit gateway. -type TransitGatewayAttachment struct { - - // The association. - Association *TransitGatewayAttachmentAssociation - - // The creation time. - CreationTime *time.Time - - // The ID of the resource. - ResourceId *string - - // The ID of the Amazon Web Services account that owns the resource. - ResourceOwnerId *string - - // The resource type. Note that the tgw-peering resource type has been deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The attachment state. Note that the initiating state has been deprecated. - State TransitGatewayAttachmentState - - // The tags for the attachment. - Tags []Tag - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the Amazon Web Services account that owns the transit gateway. - TransitGatewayOwnerId *string - - noSmithyDocumentSerde -} - -// Describes an association. -type TransitGatewayAttachmentAssociation struct { - - // The state of the association. - State TransitGatewayAssociationState - - // The ID of the route table for the transit gateway. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// The BGP configuration information. -type TransitGatewayAttachmentBgpConfiguration struct { - - // The BGP status. - BgpStatus BgpStatus - - // The interior BGP peer IP address for the appliance. - PeerAddress *string - - // The peer Autonomous System Number (ASN). - PeerAsn *int64 - - // The interior BGP peer IP address for the transit gateway. - TransitGatewayAddress *string - - // The transit gateway Autonomous System Number (ASN). - TransitGatewayAsn *int64 - - noSmithyDocumentSerde -} - -// Describes a propagation route table. -type TransitGatewayAttachmentPropagation struct { - - // The state of the propagation route table. - State TransitGatewayPropagationState - - // The ID of the propagation route table. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway Connect attachment. -type TransitGatewayConnect struct { - - // The creation time. - CreationTime *time.Time - - // The Connect attachment options. - Options *TransitGatewayConnectOptions - - // The state of the attachment. - State TransitGatewayAttachmentState - - // The tags for the attachment. - Tags []Tag - - // The ID of the Connect attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the attachment from which the Connect attachment was created. - TransportTransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes the Connect attachment options. -type TransitGatewayConnectOptions struct { - - // The tunnel protocol. - Protocol ProtocolValue - - noSmithyDocumentSerde -} - -// Describes a transit gateway Connect peer. -type TransitGatewayConnectPeer struct { - - // The Connect peer details. - ConnectPeerConfiguration *TransitGatewayConnectPeerConfiguration - - // The creation time. - CreationTime *time.Time - - // The state of the Connect peer. - State TransitGatewayConnectPeerState - - // The tags for the Connect peer. - Tags []Tag - - // The ID of the Connect attachment. - TransitGatewayAttachmentId *string - - // The ID of the Connect peer. - TransitGatewayConnectPeerId *string - - noSmithyDocumentSerde -} - -// Describes the Connect peer details. -type TransitGatewayConnectPeerConfiguration struct { - - // The BGP configuration details. - BgpConfigurations []TransitGatewayAttachmentBgpConfiguration - - // The range of interior BGP peer IP addresses. - InsideCidrBlocks []string - - // The Connect peer IP address on the appliance side of the tunnel. - PeerAddress *string - - // The tunnel protocol. - Protocol ProtocolValue - - // The Connect peer IP address on the transit gateway side of the tunnel. - TransitGatewayAddress *string - - noSmithyDocumentSerde -} - -// The BGP options for the Connect attachment. -type TransitGatewayConnectRequestBgpOptions struct { - - // The peer Autonomous System Number (ASN). - PeerAsn *int64 - - noSmithyDocumentSerde -} - -// Describes the deregistered transit gateway multicast group members. -type TransitGatewayMulticastDeregisteredGroupMembers struct { - - // The network interface IDs of the deregistered members. - DeregisteredNetworkInterfaceIds []string - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -// Describes the deregistered transit gateway multicast group sources. -type TransitGatewayMulticastDeregisteredGroupSources struct { - - // The network interface IDs of the non-registered members. - DeregisteredNetworkInterfaceIds []string - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -// Describes the transit gateway multicast domain. -type TransitGatewayMulticastDomain struct { - - // The time the transit gateway multicast domain was created. - CreationTime *time.Time - - // The options for the transit gateway multicast domain. - Options *TransitGatewayMulticastDomainOptions - - // The ID of the Amazon Web Services account that owns the transit gateway - // multicast domain. - OwnerId *string - - // The state of the transit gateway multicast domain. - State TransitGatewayMulticastDomainState - - // The tags for the transit gateway multicast domain. - Tags []Tag - - // The ID of the transit gateway. - TransitGatewayId *string - - // The Amazon Resource Name (ARN) of the transit gateway multicast domain. - TransitGatewayMulticastDomainArn *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -// Describes the resources associated with the transit gateway multicast domain. -type TransitGatewayMulticastDomainAssociation struct { - - // The ID of the resource. - ResourceId *string - - // The ID of the Amazon Web Services account that owns the transit gateway - // multicast domain association resource. - ResourceOwnerId *string - - // The type of resource, for example a VPC attachment. - ResourceType TransitGatewayAttachmentResourceType - - // The subnet associated with the transit gateway multicast domain. - Subnet *SubnetAssociation - - // The ID of the transit gateway attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes the multicast domain associations. -type TransitGatewayMulticastDomainAssociations struct { - - // The ID of the resource. - ResourceId *string - - // The ID of the Amazon Web Services account that owns the resource. - ResourceOwnerId *string - - // The type of resource, for example a VPC attachment. - ResourceType TransitGatewayAttachmentResourceType - - // The subnets associated with the multicast domain. - Subnets []SubnetAssociation - - // The ID of the transit gateway attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -// Describes the options for a transit gateway multicast domain. -type TransitGatewayMulticastDomainOptions struct { - - // Indicates whether to automatically cross-account subnet associations that are - // associated with the transit gateway multicast domain. - AutoAcceptSharedAssociations AutoAcceptSharedAssociationsValue - - // Indicates whether Internet Group Management Protocol (IGMP) version 2 is turned - // on for the transit gateway multicast domain. - Igmpv2Support Igmpv2SupportValue - - // Indicates whether support for statically configuring transit gateway multicast - // group sources is turned on. - StaticSourcesSupport StaticSourcesSupportValue - - noSmithyDocumentSerde -} - -// Describes the transit gateway multicast group resources. -type TransitGatewayMulticastGroup struct { - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // Indicates that the resource is a transit gateway multicast group member. - GroupMember *bool - - // Indicates that the resource is a transit gateway multicast group member. - GroupSource *bool - - // The member type (for example, static ). - MemberType MembershipType - - // The ID of the transit gateway attachment. - NetworkInterfaceId *string - - // The ID of the resource. - ResourceId *string - - // The ID of the Amazon Web Services account that owns the transit gateway - // multicast domain group resource. - ResourceOwnerId *string - - // The type of resource, for example a VPC attachment. - ResourceType TransitGatewayAttachmentResourceType - - // The source type. - SourceType MembershipType - - // The ID of the subnet. - SubnetId *string - - // The ID of the transit gateway attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes the registered transit gateway multicast group members. -type TransitGatewayMulticastRegisteredGroupMembers struct { - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // The ID of the registered network interfaces. - RegisteredNetworkInterfaceIds []string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -// Describes the members registered with the transit gateway multicast group. -type TransitGatewayMulticastRegisteredGroupSources struct { - - // The IP address assigned to the transit gateway multicast group. - GroupIpAddress *string - - // The IDs of the network interfaces members registered with the transit gateway - // multicast group. - RegisteredNetworkInterfaceIds []string - - // The ID of the transit gateway multicast domain. - TransitGatewayMulticastDomainId *string - - noSmithyDocumentSerde -} - -// Describes the options for a transit gateway. -type TransitGatewayOptions struct { - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for - // 32-bit ASNs. - AmazonSideAsn *int64 - - // The ID of the default association route table. - AssociationDefaultRouteTableId *string - - // Indicates whether attachment requests are automatically accepted. - AutoAcceptSharedAttachments AutoAcceptSharedAttachmentsValue - - // Indicates whether resource attachments are automatically associated with the - // default association route table. - DefaultRouteTableAssociation DefaultRouteTableAssociationValue - - // Indicates whether resource attachments automatically propagate routes to the - // default propagation route table. - DefaultRouteTablePropagation DefaultRouteTablePropagationValue - - // Indicates whether DNS support is enabled. - DnsSupport DnsSupportValue - - // Indicates whether multicast is enabled on the transit gateway - MulticastSupport MulticastSupportValue - - // The ID of the default propagation route table. - PropagationDefaultRouteTableId *string - - // Enables you to reference a security group across VPCs attached to a transit - // gateway (TGW). Use this option to simplify security group management and control - // of instance-to-instance traffic across VPCs that are connected by transit - // gateway. You can also use this option to migrate from VPC peering (which was the - // only option that supported security group referencing) to transit gateways - // (which now also support security group referencing). This option is disabled by - // default and there are no additional costs to use this feature. For important - // information about this feature, see Create a transit gateway (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-transit-gateways.html#create-tgw) - // in the Amazon Web Services Transit Gateway Guide. - SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue - - // The transit gateway CIDR blocks. - TransitGatewayCidrBlocks []string - - // Indicates whether Equal Cost Multipath Protocol support is enabled. - VpnEcmpSupport VpnEcmpSupportValue - - noSmithyDocumentSerde -} - -// Describes the transit gateway peering attachment. -type TransitGatewayPeeringAttachment struct { - - // Information about the accepter transit gateway. - AccepterTgwInfo *PeeringTgwInfo - - // The ID of the accepter transit gateway attachment. - AccepterTransitGatewayAttachmentId *string - - // The time the transit gateway peering attachment was created. - CreationTime *time.Time - - // Details about the transit gateway peering attachment. - Options *TransitGatewayPeeringAttachmentOptions - - // Information about the requester transit gateway. - RequesterTgwInfo *PeeringTgwInfo - - // The state of the transit gateway peering attachment. Note that the initiating - // state has been deprecated. - State TransitGatewayAttachmentState - - // The status of the transit gateway peering attachment. - Status *PeeringAttachmentStatus - - // The tags for the transit gateway peering attachment. - Tags []Tag - - // The ID of the transit gateway peering attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes dynamic routing for the transit gateway peering attachment. -type TransitGatewayPeeringAttachmentOptions struct { - - // Describes whether dynamic routing is enabled or disabled for the transit - // gateway peering attachment. - DynamicRouting DynamicRoutingValue - - noSmithyDocumentSerde -} - -// Describes a rule associated with a transit gateway policy. -type TransitGatewayPolicyRule struct { - - // The destination CIDR block for the transit gateway policy rule. - DestinationCidrBlock *string - - // The port range for the transit gateway policy rule. Currently this is set to * - // (all). - DestinationPortRange *string - - // The meta data tags used for the transit gateway policy rule. - MetaData *TransitGatewayPolicyRuleMetaData - - // The protocol used by the transit gateway policy rule. - Protocol *string - - // The source CIDR block for the transit gateway policy rule. - SourceCidrBlock *string - - // The port range for the transit gateway policy rule. Currently this is set to * - // (all). - SourcePortRange *string - - noSmithyDocumentSerde -} - -// Describes the meta data tags associated with a transit gateway policy rule. -type TransitGatewayPolicyRuleMetaData struct { - - // The key name for the transit gateway policy rule meta data tag. - MetaDataKey *string - - // The value of the key for the transit gateway policy rule meta data tag. - MetaDataValue *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway policy table. -type TransitGatewayPolicyTable struct { - - // The timestamp when the transit gateway policy table was created. - CreationTime *time.Time - - // The state of the transit gateway policy table - State TransitGatewayPolicyTableState - - // he key-value pairs associated with the transit gateway policy table. - Tags []Tag - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the transit gateway policy table. - TransitGatewayPolicyTableId *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway policy table association. -type TransitGatewayPolicyTableAssociation struct { - - // The resource ID of the transit gateway attachment. - ResourceId *string - - // The resource type for the transit gateway policy table association. - ResourceType TransitGatewayAttachmentResourceType - - // The state of the transit gateway policy table association. - State TransitGatewayAssociationState - - // The ID of the transit gateway attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway policy table. - TransitGatewayPolicyTableId *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway policy table entry -type TransitGatewayPolicyTableEntry struct { - - // The policy rule associated with the transit gateway policy table. - PolicyRule *TransitGatewayPolicyRule - - // The rule number for the transit gateway policy table entry. - PolicyRuleNumber *string - - // The ID of the target route table. - TargetRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway prefix list attachment. -type TransitGatewayPrefixListAttachment struct { - - // The ID of the resource. - ResourceId *string - - // The resource type. Note that the tgw-peering resource type has been deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes a prefix list reference. -type TransitGatewayPrefixListReference struct { - - // Indicates whether traffic that matches this route is dropped. - Blackhole *bool - - // The ID of the prefix list. - PrefixListId *string - - // The ID of the prefix list owner. - PrefixListOwnerId *string - - // The state of the prefix list reference. - State TransitGatewayPrefixListReferenceState - - // Information about the transit gateway attachment. - TransitGatewayAttachment *TransitGatewayPrefixListAttachment - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes route propagation. -type TransitGatewayPropagation struct { - - // The ID of the resource. - ResourceId *string - - // The resource type. Note that the tgw-peering resource type has been deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The state. - State TransitGatewayPropagationState - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncementId *string - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes the options for a transit gateway. -type TransitGatewayRequestOptions struct { - - // A private Autonomous System Number (ASN) for the Amazon side of a BGP session. - // The range is 64512 to 65534 for 16-bit ASNs and 4200000000 to 4294967294 for - // 32-bit ASNs. The default is 64512 . - AmazonSideAsn *int64 - - // Enable or disable automatic acceptance of attachment requests. Disabled by - // default. - AutoAcceptSharedAttachments AutoAcceptSharedAttachmentsValue - - // Enable or disable automatic association with the default association route - // table. Enabled by default. - DefaultRouteTableAssociation DefaultRouteTableAssociationValue - - // Enable or disable automatic propagation of routes to the default propagation - // route table. Enabled by default. - DefaultRouteTablePropagation DefaultRouteTablePropagationValue - - // Enable or disable DNS support. Enabled by default. - DnsSupport DnsSupportValue - - // Indicates whether multicast is enabled on the transit gateway - MulticastSupport MulticastSupportValue - - // Enables you to reference a security group across VPCs attached to a transit - // gateway (TGW). Use this option to simplify security group management and control - // of instance-to-instance traffic across VPCs that are connected by transit - // gateway. You can also use this option to migrate from VPC peering (which was the - // only option that supported security group referencing) to transit gateways - // (which now also support security group referencing). This option is disabled by - // default and there are no additional costs to use this feature. For important - // information about this feature, see Create a transit gateway (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-transit-gateways.html#create-tgw) - // in the Amazon Web Services Transit Gateway Guide. - SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue - - // One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size - // /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6. - TransitGatewayCidrBlocks []string - - // Enable or disable Equal Cost Multipath Protocol support. Enabled by default. - VpnEcmpSupport VpnEcmpSupportValue - - noSmithyDocumentSerde -} - -// Describes a route for a transit gateway route table. -type TransitGatewayRoute struct { - - // The CIDR block used for destination matches. - DestinationCidrBlock *string - - // The ID of the prefix list used for destination matches. - PrefixListId *string - - // The state of the route. - State TransitGatewayRouteState - - // The attachments. - TransitGatewayAttachments []TransitGatewayRouteAttachment - - // The ID of the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncementId *string - - // The route type. - Type TransitGatewayRouteType - - noSmithyDocumentSerde -} - -// Describes a route attachment. -type TransitGatewayRouteAttachment struct { - - // The ID of the resource. - ResourceId *string - - // The resource type. Note that the tgw-peering resource type has been deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway route table. -type TransitGatewayRouteTable struct { - - // The creation time. - CreationTime *time.Time - - // Indicates whether this is the default association route table for the transit - // gateway. - DefaultAssociationRouteTable *bool - - // Indicates whether this is the default propagation route table for the transit - // gateway. - DefaultPropagationRouteTable *bool - - // The state of the transit gateway route table. - State TransitGatewayRouteTableState - - // Any tags assigned to the route table. - Tags []Tag - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes a transit gateway route table announcement. -type TransitGatewayRouteTableAnnouncement struct { - - // The direction for the route table announcement. - AnnouncementDirection TransitGatewayRouteTableAnnouncementDirection - - // The ID of the core network for the transit gateway route table announcement. - CoreNetworkId *string - - // The timestamp when the transit gateway route table announcement was created. - CreationTime *time.Time - - // The ID of the core network ID for the peer. - PeerCoreNetworkId *string - - // The ID of the peer transit gateway. - PeerTransitGatewayId *string - - // The ID of the peering attachment. - PeeringAttachmentId *string - - // The state of the transit gateway announcement. - State TransitGatewayRouteTableAnnouncementState - - // The key-value pairs associated with the route table announcement. - Tags []Tag - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncementId *string - - // The ID of the transit gateway route table. - TransitGatewayRouteTableId *string - - noSmithyDocumentSerde -} - -// Describes an association between a route table and a resource attachment. -type TransitGatewayRouteTableAssociation struct { - - // The ID of the resource. - ResourceId *string - - // The resource type. Note that the tgw-peering resource type has been deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The state of the association. - State TransitGatewayAssociationState - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - noSmithyDocumentSerde -} - -// Describes a route table propagation. -type TransitGatewayRouteTablePropagation struct { - - // The ID of the resource. - ResourceId *string - - // The type of resource. Note that the tgw-peering resource type has been - // deprecated. - ResourceType TransitGatewayAttachmentResourceType - - // The state of the resource. - State TransitGatewayPropagationState - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway route table announcement. - TransitGatewayRouteTableAnnouncementId *string - - noSmithyDocumentSerde -} - -// Describes a route in a transit gateway route table. -type TransitGatewayRouteTableRoute struct { - - // The ID of the route attachment. - AttachmentId *string - - // The CIDR block used for destination matches. - DestinationCidr *string - - // The ID of the prefix list. - PrefixListId *string - - // The ID of the resource for the route attachment. - ResourceId *string - - // The resource type for the route attachment. - ResourceType *string - - // The route origin. The following are the possible values: - // - static - // - propagated - RouteOrigin *string - - // The state of the route. - State *string - - noSmithyDocumentSerde -} - -// Describes a VPC attachment. -type TransitGatewayVpcAttachment struct { - - // The creation time. - CreationTime *time.Time - - // The VPC attachment options. - Options *TransitGatewayVpcAttachmentOptions - - // The state of the VPC attachment. Note that the initiating state has been - // deprecated. - State TransitGatewayAttachmentState - - // The IDs of the subnets. - SubnetIds []string - - // The tags for the VPC attachment. - Tags []Tag - - // The ID of the attachment. - TransitGatewayAttachmentId *string - - // The ID of the transit gateway. - TransitGatewayId *string - - // The ID of the VPC. - VpcId *string - - // The ID of the Amazon Web Services account that owns the VPC. - VpcOwnerId *string - - noSmithyDocumentSerde -} - -// Describes the VPC attachment options. -type TransitGatewayVpcAttachmentOptions struct { - - // Indicates whether appliance mode support is enabled. - ApplianceModeSupport ApplianceModeSupportValue - - // Indicates whether DNS support is enabled. - DnsSupport DnsSupportValue - - // Indicates whether IPv6 support is disabled. - Ipv6Support Ipv6SupportValue - - // For important information about this feature, see Create a transit gateway - // attachment to a VPC (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-vpc-attachments.html#create-vpc-attachment) - // in the Amazon Web Services Transit Gateway Guide. - SecurityGroupReferencingSupport SecurityGroupReferencingSupportValue - - noSmithyDocumentSerde -} - -// Information about an association between a branch network interface with a -// trunk network interface. -type TrunkInterfaceAssociation struct { - - // The ID of the association. - AssociationId *string - - // The ID of the branch network interface. - BranchInterfaceId *string - - // The application key when you use the GRE protocol. - GreKey *int32 - - // The interface protocol. Valid values are VLAN and GRE . - InterfaceProtocol InterfaceProtocolType - - // The tags for the trunk interface association. - Tags []Tag - - // The ID of the trunk network interface. - TrunkInterfaceId *string - - // The ID of the VLAN when you use the VLAN protocol. - VlanId *int32 - - noSmithyDocumentSerde -} - -// The VPN tunnel options. -type TunnelOption struct { - - // The action to take after a DPD timeout occurs. - DpdTimeoutAction *string - - // The number of seconds after which a DPD timeout occurs. - DpdTimeoutSeconds *int32 - - // Status of tunnel endpoint lifecycle control feature. - EnableTunnelLifecycleControl *bool - - // The IKE versions that are permitted for the VPN tunnel. - IkeVersions []IKEVersionsListValue - - // Options for logging VPN tunnel activity. - LogOptions *VpnTunnelLogOptions - - // The external IP address of the VPN tunnel. - OutsideIpAddress *string - - // The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 1 IKE - // negotiations. - Phase1DHGroupNumbers []Phase1DHGroupNumbersListValue - - // The permitted encryption algorithms for the VPN tunnel for phase 1 IKE - // negotiations. - Phase1EncryptionAlgorithms []Phase1EncryptionAlgorithmsListValue - - // The permitted integrity algorithms for the VPN tunnel for phase 1 IKE - // negotiations. - Phase1IntegrityAlgorithms []Phase1IntegrityAlgorithmsListValue - - // The lifetime for phase 1 of the IKE negotiation, in seconds. - Phase1LifetimeSeconds *int32 - - // The permitted Diffie-Hellman group numbers for the VPN tunnel for phase 2 IKE - // negotiations. - Phase2DHGroupNumbers []Phase2DHGroupNumbersListValue - - // The permitted encryption algorithms for the VPN tunnel for phase 2 IKE - // negotiations. - Phase2EncryptionAlgorithms []Phase2EncryptionAlgorithmsListValue - - // The permitted integrity algorithms for the VPN tunnel for phase 2 IKE - // negotiations. - Phase2IntegrityAlgorithms []Phase2IntegrityAlgorithmsListValue - - // The lifetime for phase 2 of the IKE negotiation, in seconds. - Phase2LifetimeSeconds *int32 - - // The pre-shared key (PSK) to establish initial authentication between the - // virtual private gateway and the customer gateway. - PreSharedKey *string - - // The percentage of the rekey window determined by RekeyMarginTimeSeconds during - // which the rekey time is randomly selected. - RekeyFuzzPercentage *int32 - - // The margin time, in seconds, before the phase 2 lifetime expires, during which - // the Amazon Web Services side of the VPN connection performs an IKE rekey. - RekeyMarginTimeSeconds *int32 - - // The number of packets in an IKE replay window. - ReplayWindowSize *int32 - - // The action to take when the establishing the VPN tunnels for a VPN connection. - StartupAction *string - - // The range of inside IPv4 addresses for the tunnel. - TunnelInsideCidr *string - - // The range of inside IPv6 addresses for the tunnel. - TunnelInsideIpv6Cidr *string - - noSmithyDocumentSerde -} - -// Describes the burstable performance instance whose credit option for CPU usage -// was not modified. -type UnsuccessfulInstanceCreditSpecificationItem struct { - - // The applicable error for the burstable performance instance whose credit option - // for CPU usage was not modified. - Error *UnsuccessfulInstanceCreditSpecificationItemError - - // The ID of the instance. - InstanceId *string - - noSmithyDocumentSerde -} - -// Information about the error for the burstable performance instance whose credit -// option for CPU usage was not modified. -type UnsuccessfulInstanceCreditSpecificationItemError struct { - - // The error code. - Code UnsuccessfulInstanceCreditSpecificationErrorCode - - // The applicable error message. - Message *string - - noSmithyDocumentSerde -} - -// Information about items that were not successfully processed in a batch call. -type UnsuccessfulItem struct { - - // Information about the error. - Error *UnsuccessfulItemError - - // The ID of the resource. - ResourceId *string - - noSmithyDocumentSerde -} - -// Information about the error that occurred. For more information about errors, -// see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html) -// . -type UnsuccessfulItemError struct { - - // The error code. - Code *string - - // The error message accompanying the error code. - Message *string - - noSmithyDocumentSerde -} - -// Describes the Amazon S3 bucket for the disk image. -type UserBucket struct { - - // The name of the Amazon S3 bucket where the disk image is located. - S3Bucket *string - - // The file name of the disk image. - S3Key *string - - noSmithyDocumentSerde -} - -// Describes the Amazon S3 bucket for the disk image. -type UserBucketDetails struct { - - // The Amazon S3 bucket from which the disk image was created. - S3Bucket *string - - // The file name of the disk image. - S3Key *string - - noSmithyDocumentSerde -} - -// Describes the user data for an instance. -type UserData struct { - - // The user data. If you are using an Amazon Web Services SDK or command line - // tool, Base64-encoding is performed for you, and you can load the text from a - // file. Otherwise, you must provide Base64-encoded text. - Data *string - - noSmithyDocumentSerde -} - -// Describes a security group and Amazon Web Services account ID pair. -type UserIdGroupPair struct { - - // A description for the security group rule that references this user ID group - // pair. Constraints: Up to 255 characters in length. Allowed characters are a-z, - // A-Z, 0-9, spaces, and ._-:/()#,@[]+=;{}!$* - Description *string - - // The ID of the security group. - GroupId *string - - // [Default VPC] The name of the security group. For a security group in a - // nondefault VPC, use the security group ID. For a referenced security group in - // another VPC, this value is not returned if the referenced security group is - // deleted. - GroupName *string - - // The status of a VPC peering connection, if applicable. - PeeringStatus *string - - // The ID of an Amazon Web Services account. For a referenced security group in - // another VPC, the account ID of the referenced security group is returned in the - // response. If the referenced security group is deleted, this value is not - // returned. - UserId *string - - // The ID of the VPC for the referenced security group, if applicable. - VpcId *string - - // The ID of the VPC peering connection, if applicable. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -// The error code and error message that is returned for a parameter or parameter -// combination that is not valid when a new launch template or new version of a -// launch template is created. -type ValidationError struct { - - // The error code that indicates why the parameter or parameter combination is not - // valid. For more information about error codes, see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html) - // . - Code *string - - // The error message that describes why the parameter or parameter combination is - // not valid. For more information about error messages, see Error codes (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html) - // . - Message *string - - noSmithyDocumentSerde -} - -// The error codes and error messages that are returned for the parameters or -// parameter combinations that are not valid when a new launch template or new -// version of a launch template is created. -type ValidationWarning struct { - - // The error codes and error messages. - Errors []ValidationError - - noSmithyDocumentSerde -} - -// The minimum and maximum number of vCPUs. -type VCpuCountRange struct { - - // The maximum number of vCPUs. If this parameter is not specified, there is no - // maximum limit. - Max *int32 - - // The minimum number of vCPUs. If the value is 0 , there is no minimum limit. - Min *int32 - - noSmithyDocumentSerde -} - -// The minimum and maximum number of vCPUs. -type VCpuCountRangeRequest struct { - - // The minimum number of vCPUs. To specify no minimum limit, specify 0 . - // - // This member is required. - Min *int32 - - // The maximum number of vCPUs. To specify no maximum limit, omit this parameter. - Max *int32 - - noSmithyDocumentSerde -} - -// Describes the vCPU configurations for the instance type. -type VCpuInfo struct { - - // The default number of cores for the instance type. - DefaultCores *int32 - - // The default number of threads per core for the instance type. - DefaultThreadsPerCore *int32 - - // The default number of vCPUs for the instance type. - DefaultVCpus *int32 - - // The valid number of cores that can be configured for the instance type. - ValidCores []int32 - - // The valid number of threads per core that can be configured for the instance - // type. - ValidThreadsPerCore []int32 - - noSmithyDocumentSerde -} - -// An Amazon Web Services Verified Access endpoint specifies the application that -// Amazon Web Services Verified Access provides access to. It must be attached to -// an Amazon Web Services Verified Access group. An Amazon Web Services Verified -// Access endpoint must also have an attached access policy before you attached it -// to a group. -type VerifiedAccessEndpoint struct { - - // The DNS name for users to reach your application. - ApplicationDomain *string - - // The type of attachment used to provide connectivity between the Amazon Web - // Services Verified Access endpoint and the application. - AttachmentType VerifiedAccessEndpointAttachmentType - - // The creation time. - CreationTime *string - - // The deletion time. - DeletionTime *string - - // A description for the Amazon Web Services Verified Access endpoint. - Description *string - - // Returned if endpoint has a device trust provider attached. - DeviceValidationDomain *string - - // The ARN of a public TLS/SSL certificate imported into or created with ACM. - DomainCertificateArn *string - - // A DNS name that is generated for the endpoint. - EndpointDomain *string - - // The type of Amazon Web Services Verified Access endpoint. Incoming application - // requests will be sent to an IP address, load balancer or a network interface - // depending on the endpoint type specified. - EndpointType VerifiedAccessEndpointType - - // The last updated time. - LastUpdatedTime *string - - // The load balancer details if creating the Amazon Web Services Verified Access - // endpoint as load-balancer type. - LoadBalancerOptions *VerifiedAccessEndpointLoadBalancerOptions - - // The options for network-interface type endpoint. - NetworkInterfaceOptions *VerifiedAccessEndpointEniOptions - - // The IDs of the security groups for the endpoint. - SecurityGroupIds []string - - // The options in use for server side encryption. - SseSpecification *VerifiedAccessSseSpecificationResponse - - // The endpoint status. - Status *VerifiedAccessEndpointStatus - - // The tags. - Tags []Tag - - // The ID of the Amazon Web Services Verified Access endpoint. - VerifiedAccessEndpointId *string - - // The ID of the Amazon Web Services Verified Access group. - VerifiedAccessGroupId *string - - // The ID of the Amazon Web Services Verified Access instance. - VerifiedAccessInstanceId *string - - noSmithyDocumentSerde -} - -// Options for a network-interface type endpoint. -type VerifiedAccessEndpointEniOptions struct { - - // The ID of the network interface. - NetworkInterfaceId *string - - // The IP port number. - Port *int32 - - // The IP protocol. - Protocol VerifiedAccessEndpointProtocol - - noSmithyDocumentSerde -} - -// Describes a load balancer when creating an Amazon Web Services Verified Access -// endpoint using the load-balancer type. -type VerifiedAccessEndpointLoadBalancerOptions struct { - - // The ARN of the load balancer. - LoadBalancerArn *string - - // The IP port number. - Port *int32 - - // The IP protocol. - Protocol VerifiedAccessEndpointProtocol - - // The IDs of the subnets. - SubnetIds []string - - noSmithyDocumentSerde -} - -// Describes the status of a Verified Access endpoint. -type VerifiedAccessEndpointStatus struct { - - // The status code of the Verified Access endpoint. - Code VerifiedAccessEndpointStatusCode - - // The status message of the Verified Access endpoint. - Message *string - - noSmithyDocumentSerde -} - -// Describes a Verified Access group. -type VerifiedAccessGroup struct { - - // The creation time. - CreationTime *string - - // The deletion time. - DeletionTime *string - - // A description for the Amazon Web Services Verified Access group. - Description *string - - // The last updated time. - LastUpdatedTime *string - - // The Amazon Web Services account number that owns the group. - Owner *string - - // The options in use for server side encryption. - SseSpecification *VerifiedAccessSseSpecificationResponse - - // The tags. - Tags []Tag - - // The ARN of the Verified Access group. - VerifiedAccessGroupArn *string - - // The ID of the Verified Access group. - VerifiedAccessGroupId *string - - // The ID of the Amazon Web Services Verified Access instance. - VerifiedAccessInstanceId *string - - noSmithyDocumentSerde -} - -// Describes a Verified Access instance. -type VerifiedAccessInstance struct { - - // The creation time. - CreationTime *string - - // A description for the Amazon Web Services Verified Access instance. - Description *string - - // Indicates whether support for Federal Information Processing Standards (FIPS) - // is enabled on the instance. - FipsEnabled *bool - - // The last updated time. - LastUpdatedTime *string - - // The tags. - Tags []Tag - - // The ID of the Amazon Web Services Verified Access instance. - VerifiedAccessInstanceId *string - - // The IDs of the Amazon Web Services Verified Access trust providers. - VerifiedAccessTrustProviders []VerifiedAccessTrustProviderCondensed - - noSmithyDocumentSerde -} - -// Describes logging options for an Amazon Web Services Verified Access instance. -type VerifiedAccessInstanceLoggingConfiguration struct { - - // Details about the logging options. - AccessLogs *VerifiedAccessLogs - - // The ID of the Amazon Web Services Verified Access instance. - VerifiedAccessInstanceId *string - - noSmithyDocumentSerde -} - -// Options for CloudWatch Logs as a logging destination. -type VerifiedAccessLogCloudWatchLogsDestination struct { - - // The delivery status for access logs. - DeliveryStatus *VerifiedAccessLogDeliveryStatus - - // Indicates whether logging is enabled. - Enabled *bool - - // The ID of the CloudWatch Logs log group. - LogGroup *string - - noSmithyDocumentSerde -} - -// Options for CloudWatch Logs as a logging destination. -type VerifiedAccessLogCloudWatchLogsDestinationOptions struct { - - // Indicates whether logging is enabled. - // - // This member is required. - Enabled *bool - - // The ID of the CloudWatch Logs log group. - LogGroup *string - - noSmithyDocumentSerde -} - -// Describes a log delivery status. -type VerifiedAccessLogDeliveryStatus struct { - - // The status code. - Code VerifiedAccessLogDeliveryStatusCode - - // The status message. - Message *string - - noSmithyDocumentSerde -} - -// Options for Kinesis as a logging destination. -type VerifiedAccessLogKinesisDataFirehoseDestination struct { - - // The delivery status. - DeliveryStatus *VerifiedAccessLogDeliveryStatus - - // The ID of the delivery stream. - DeliveryStream *string - - // Indicates whether logging is enabled. - Enabled *bool - - noSmithyDocumentSerde -} - -// Describes Amazon Kinesis Data Firehose logging options. -type VerifiedAccessLogKinesisDataFirehoseDestinationOptions struct { - - // Indicates whether logging is enabled. - // - // This member is required. - Enabled *bool - - // The ID of the delivery stream. - DeliveryStream *string - - noSmithyDocumentSerde -} - -// Options for Verified Access logs. -type VerifiedAccessLogOptions struct { - - // Sends Verified Access logs to CloudWatch Logs. - CloudWatchLogs *VerifiedAccessLogCloudWatchLogsDestinationOptions - - // Indicates whether to include trust data sent by trust providers in the logs. - IncludeTrustContext *bool - - // Sends Verified Access logs to Kinesis. - KinesisDataFirehose *VerifiedAccessLogKinesisDataFirehoseDestinationOptions - - // The logging version. Valid values: ocsf-0.1 | ocsf-1.0.0-rc.2 - LogVersion *string - - // Sends Verified Access logs to Amazon S3. - S3 *VerifiedAccessLogS3DestinationOptions - - noSmithyDocumentSerde -} - -// Describes the options for Verified Access logs. -type VerifiedAccessLogs struct { - - // CloudWatch Logs logging destination. - CloudWatchLogs *VerifiedAccessLogCloudWatchLogsDestination - - // Indicates whether trust data is included in the logs. - IncludeTrustContext *bool - - // Kinesis logging destination. - KinesisDataFirehose *VerifiedAccessLogKinesisDataFirehoseDestination - - // The log version. - LogVersion *string - - // Amazon S3 logging options. - S3 *VerifiedAccessLogS3Destination - - noSmithyDocumentSerde -} - -// Options for Amazon S3 as a logging destination. -type VerifiedAccessLogS3Destination struct { - - // The bucket name. - BucketName *string - - // The Amazon Web Services account number that owns the bucket. - BucketOwner *string - - // The delivery status. - DeliveryStatus *VerifiedAccessLogDeliveryStatus - - // Indicates whether logging is enabled. - Enabled *bool - - // The bucket prefix. - Prefix *string - - noSmithyDocumentSerde -} - -// Options for Amazon S3 as a logging destination. -type VerifiedAccessLogS3DestinationOptions struct { - - // Indicates whether logging is enabled. - // - // This member is required. - Enabled *bool - - // The bucket name. - BucketName *string - - // The ID of the Amazon Web Services account that owns the Amazon S3 bucket. - BucketOwner *string - - // The bucket prefix. - Prefix *string - - noSmithyDocumentSerde -} - -// Verified Access provides server side encryption by default to data at rest -// using Amazon Web Services-owned KMS keys. You also have the option of using -// customer managed KMS keys, which can be specified using the options below. -type VerifiedAccessSseSpecificationRequest struct { - - // Enable or disable the use of customer managed KMS keys for server side - // encryption. Valid values: True | False - CustomerManagedKeyEnabled *bool - - // The ARN of the KMS key. - KmsKeyArn *string - - noSmithyDocumentSerde -} - -// The options in use for server side encryption. -type VerifiedAccessSseSpecificationResponse struct { - - // Indicates whether customer managed KMS keys are in use for server side - // encryption. Valid values: True | False - CustomerManagedKeyEnabled *bool - - // The ARN of the KMS key. - KmsKeyArn *string - - noSmithyDocumentSerde -} - -// Describes a Verified Access trust provider. -type VerifiedAccessTrustProvider struct { - - // The creation time. - CreationTime *string - - // A description for the Amazon Web Services Verified Access trust provider. - Description *string - - // The options for device-identity trust provider. - DeviceOptions *DeviceOptions - - // The type of device-based trust provider. - DeviceTrustProviderType DeviceTrustProviderType - - // The last updated time. - LastUpdatedTime *string - - // The options for an OpenID Connect-compatible user-identity trust provider. - OidcOptions *OidcOptions - - // The identifier to be used when working with policy rules. - PolicyReferenceName *string - - // The options in use for server side encryption. - SseSpecification *VerifiedAccessSseSpecificationResponse - - // The tags. - Tags []Tag - - // The type of Verified Access trust provider. - TrustProviderType TrustProviderType - - // The type of user-based trust provider. - UserTrustProviderType UserTrustProviderType - - // The ID of the Amazon Web Services Verified Access trust provider. - VerifiedAccessTrustProviderId *string - - noSmithyDocumentSerde -} - -// Condensed information about a trust provider. -type VerifiedAccessTrustProviderCondensed struct { - - // The description of trust provider. - Description *string - - // The type of device-based trust provider. - DeviceTrustProviderType DeviceTrustProviderType - - // The type of trust provider (user- or device-based). - TrustProviderType TrustProviderType - - // The type of user-based trust provider. - UserTrustProviderType UserTrustProviderType - - // The ID of the trust provider. - VerifiedAccessTrustProviderId *string - - noSmithyDocumentSerde -} - -// Describes telemetry for a VPN tunnel. -type VgwTelemetry struct { - - // The number of accepted routes. - AcceptedRouteCount *int32 - - // The Amazon Resource Name (ARN) of the VPN tunnel endpoint certificate. - CertificateArn *string - - // The date and time of the last change in status. This field is updated when - // changes in IKE (Phase 1), IPSec (Phase 2), or BGP status are detected. - LastStatusChange *time.Time - - // The Internet-routable IP address of the virtual private gateway's outside - // interface. - OutsideIpAddress *string - - // The status of the VPN tunnel. - Status TelemetryStatus - - // If an error occurs, a description of the error. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Describes a volume. -type Volume struct { - - // Information about the volume attachments. - Attachments []VolumeAttachment - - // The Availability Zone for the volume. - AvailabilityZone *string - - // The time stamp when volume creation was initiated. - CreateTime *time.Time - - // Indicates whether the volume is encrypted. - Encrypted *bool - - // Indicates whether the volume was created using fast snapshot restore. - FastRestored *bool - - // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 - // volumes, this represents the number of IOPS that are provisioned for the volume. - // For gp2 volumes, this represents the baseline performance of the volume and the - // rate at which the volume accumulates I/O credits for bursting. - Iops *int32 - - // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key that - // was used to protect the volume encryption key for the volume. - KmsKeyId *string - - // Indicates whether Amazon EBS Multi-Attach is enabled. - MultiAttachEnabled *bool - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The size of the volume, in GiBs. - Size *int32 - - // The snapshot from which the volume was created, if applicable. - SnapshotId *string - - // Reserved for future use. - SseType SSEType - - // The volume state. - State VolumeState - - // Any tags assigned to the volume. - Tags []Tag - - // The throughput that the volume supports, in MiB/s. - Throughput *int32 - - // The ID of the volume. - VolumeId *string - - // The volume type. - VolumeType VolumeType - - noSmithyDocumentSerde -} - -// Describes volume attachment details. -type VolumeAttachment struct { - - // The ARN of the Amazon ECS or Fargate task to which the volume is attached. - AssociatedResource *string - - // The time stamp when the attachment initiated. - AttachTime *time.Time - - // Indicates whether the EBS volume is deleted on instance termination. - DeleteOnTermination *bool - - // The device name. If the volume is attached to a Fargate task, this parameter - // returns null . - Device *string - - // The ID of the instance. If the volume is attached to a Fargate task, this - // parameter returns null . - InstanceId *string - - // The service principal of Amazon Web Services service that owns the underlying - // instance to which the volume is attached. This parameter is returned only for - // volumes that are attached to Fargate tasks. - InstanceOwningService *string - - // The attachment state of the volume. - State VolumeAttachmentState - - // The ID of the volume. - VolumeId *string - - noSmithyDocumentSerde -} - -// Describes an EBS volume. -type VolumeDetail struct { - - // The size of the volume, in GiB. - // - // This member is required. - Size *int64 - - noSmithyDocumentSerde -} - -// Describes the modification status of an EBS volume. If the volume has never -// been modified, some element values will be null. -type VolumeModification struct { - - // The modification completion or failure time. - EndTime *time.Time - - // The current modification state. The modification state is null for unmodified - // volumes. - ModificationState VolumeModificationState - - // The original IOPS rate of the volume. - OriginalIops *int32 - - // The original setting for Amazon EBS Multi-Attach. - OriginalMultiAttachEnabled *bool - - // The original size of the volume, in GiB. - OriginalSize *int32 - - // The original throughput of the volume, in MiB/s. - OriginalThroughput *int32 - - // The original EBS volume type of the volume. - OriginalVolumeType VolumeType - - // The modification progress, from 0 to 100 percent complete. - Progress *int64 - - // The modification start time. - StartTime *time.Time - - // A status message about the modification progress or failure. - StatusMessage *string - - // The target IOPS rate of the volume. - TargetIops *int32 - - // The target setting for Amazon EBS Multi-Attach. - TargetMultiAttachEnabled *bool - - // The target size of the volume, in GiB. - TargetSize *int32 - - // The target throughput of the volume, in MiB/s. - TargetThroughput *int32 - - // The target EBS volume type of the volume. - TargetVolumeType VolumeType - - // The ID of the volume. - VolumeId *string - - noSmithyDocumentSerde -} - -// Describes a volume status operation code. -type VolumeStatusAction struct { - - // The code identifying the operation, for example, enable-volume-io . - Code *string - - // A description of the operation. - Description *string - - // The ID of the event associated with this operation. - EventId *string - - // The event type associated with this operation. - EventType *string - - noSmithyDocumentSerde -} - -// Information about the instances to which the volume is attached. -type VolumeStatusAttachmentStatus struct { - - // The ID of the attached instance. - InstanceId *string - - // The maximum IOPS supported by the attached instance. - IoPerformance *string - - noSmithyDocumentSerde -} - -// Describes a volume status. -type VolumeStatusDetails struct { - - // The name of the volume status. - Name VolumeStatusName - - // The intended status of the volume status. - Status *string - - noSmithyDocumentSerde -} - -// Describes a volume status event. -type VolumeStatusEvent struct { - - // A description of the event. - Description *string - - // The ID of this event. - EventId *string - - // The type of this event. - EventType *string - - // The ID of the instance associated with the event. - InstanceId *string - - // The latest end time of the event. - NotAfter *time.Time - - // The earliest start time of the event. - NotBefore *time.Time - - noSmithyDocumentSerde -} - -// Describes the status of a volume. -type VolumeStatusInfo struct { - - // The details of the volume status. - Details []VolumeStatusDetails - - // The status of the volume. - Status VolumeStatusInfoStatus - - noSmithyDocumentSerde -} - -// Describes the volume status. -type VolumeStatusItem struct { - - // The details of the operation. - Actions []VolumeStatusAction - - // Information about the instances to which the volume is attached. - AttachmentStatuses []VolumeStatusAttachmentStatus - - // The Availability Zone of the volume. - AvailabilityZone *string - - // A list of events associated with the volume. - Events []VolumeStatusEvent - - // The Amazon Resource Name (ARN) of the Outpost. - OutpostArn *string - - // The volume ID. - VolumeId *string - - // The volume status. - VolumeStatus *VolumeStatusInfo - - noSmithyDocumentSerde -} - -// Describes a VPC. -type Vpc struct { - - // The primary IPv4 CIDR block for the VPC. - CidrBlock *string - - // Information about the IPv4 CIDR blocks associated with the VPC. - CidrBlockAssociationSet []VpcCidrBlockAssociation - - // The ID of the set of DHCP options you've associated with the VPC. - DhcpOptionsId *string - - // The allowed tenancy of instances launched into the VPC. - InstanceTenancy Tenancy - - // Information about the IPv6 CIDR blocks associated with the VPC. - Ipv6CidrBlockAssociationSet []VpcIpv6CidrBlockAssociation - - // Indicates whether the VPC is the default VPC. - IsDefault *bool - - // The ID of the Amazon Web Services account that owns the VPC. - OwnerId *string - - // The current state of the VPC. - State VpcState - - // Any tags assigned to the VPC. - Tags []Tag - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes an attachment between a virtual private gateway and a VPC. -type VpcAttachment struct { - - // The current state of the attachment. - State AttachmentStatus - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes an IPv4 CIDR block associated with a VPC. -type VpcCidrBlockAssociation struct { - - // The association ID for the IPv4 CIDR block. - AssociationId *string - - // The IPv4 CIDR block. - CidrBlock *string - - // Information about the state of the CIDR block. - CidrBlockState *VpcCidrBlockState - - noSmithyDocumentSerde -} - -// Describes the state of a CIDR block. -type VpcCidrBlockState struct { - - // The state of the CIDR block. - State VpcCidrBlockStateCode - - // A message about the status of the CIDR block, if applicable. - StatusMessage *string - - noSmithyDocumentSerde -} - -// Deprecated. Describes whether a VPC is enabled for ClassicLink. -type VpcClassicLink struct { - - // Indicates whether the VPC is enabled for ClassicLink. - ClassicLinkEnabled *bool - - // Any tags assigned to the VPC. - Tags []Tag - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes a VPC endpoint. -type VpcEndpoint struct { - - // The date and time that the endpoint was created. - CreationTimestamp *time.Time - - // (Interface endpoint) The DNS entries for the endpoint. - DnsEntries []DnsEntry - - // The DNS options for the endpoint. - DnsOptions *DnsOptions - - // (Interface endpoint) Information about the security groups that are associated - // with the network interface. - Groups []SecurityGroupIdentifier - - // The IP address type for the endpoint. - IpAddressType IpAddressType - - // The last error that occurred for endpoint. - LastError *LastError - - // (Interface endpoint) The network interfaces for the endpoint. - NetworkInterfaceIds []string - - // The ID of the Amazon Web Services account that owns the endpoint. - OwnerId *string - - // The policy document associated with the endpoint, if applicable. - PolicyDocument *string - - // (Interface endpoint) Indicates whether the VPC is associated with a private - // hosted zone. - PrivateDnsEnabled *bool - - // Indicates whether the endpoint is being managed by its service. - RequesterManaged *bool - - // (Gateway endpoint) The IDs of the route tables associated with the endpoint. - RouteTableIds []string - - // The name of the service to which the endpoint is associated. - ServiceName *string - - // The state of the endpoint. - State State - - // (Interface endpoint) The subnets for the endpoint. - SubnetIds []string - - // The tags assigned to the endpoint. - Tags []Tag - - // The ID of the endpoint. - VpcEndpointId *string - - // The type of endpoint. - VpcEndpointType VpcEndpointType - - // The ID of the VPC to which the endpoint is associated. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes a VPC endpoint connection to a service. -type VpcEndpointConnection struct { - - // The date and time that the VPC endpoint was created. - CreationTimestamp *time.Time - - // The DNS entries for the VPC endpoint. - DnsEntries []DnsEntry - - // The Amazon Resource Names (ARNs) of the Gateway Load Balancers for the service. - GatewayLoadBalancerArns []string - - // The IP address type for the endpoint. - IpAddressType IpAddressType - - // The Amazon Resource Names (ARNs) of the network load balancers for the service. - NetworkLoadBalancerArns []string - - // The ID of the service to which the endpoint is connected. - ServiceId *string - - // The tags. - Tags []Tag - - // The ID of the VPC endpoint connection. - VpcEndpointConnectionId *string - - // The ID of the VPC endpoint. - VpcEndpointId *string - - // The ID of the Amazon Web Services account that owns the VPC endpoint. - VpcEndpointOwner *string - - // The state of the VPC endpoint. - VpcEndpointState State - - noSmithyDocumentSerde -} - -// Describes an IPv6 CIDR block associated with a VPC. -type VpcIpv6CidrBlockAssociation struct { - - // The association ID for the IPv6 CIDR block. - AssociationId *string - - // The IPv6 CIDR block. - Ipv6CidrBlock *string - - // Information about the state of the CIDR block. - Ipv6CidrBlockState *VpcCidrBlockState - - // The ID of the IPv6 address pool from which the IPv6 CIDR block is allocated. - Ipv6Pool *string - - // The name of the unique set of Availability Zones, Local Zones, or Wavelength - // Zones from which Amazon Web Services advertises IP addresses, for example, - // us-east-1-wl1-bos-wlz-1 . - NetworkBorderGroup *string - - noSmithyDocumentSerde -} - -// Describes a VPC peering connection. -type VpcPeeringConnection struct { - - // Information about the accepter VPC. CIDR block information is only returned - // when describing an active VPC peering connection. - AccepterVpcInfo *VpcPeeringConnectionVpcInfo - - // The time that an unaccepted VPC peering connection will expire. - ExpirationTime *time.Time - - // Information about the requester VPC. CIDR block information is only returned - // when describing an active VPC peering connection. - RequesterVpcInfo *VpcPeeringConnectionVpcInfo - - // The status of the VPC peering connection. - Status *VpcPeeringConnectionStateReason - - // Any tags assigned to the resource. - Tags []Tag - - // The ID of the VPC peering connection. - VpcPeeringConnectionId *string - - noSmithyDocumentSerde -} - -// Describes the VPC peering connection options. -type VpcPeeringConnectionOptionsDescription struct { - - // Indicates whether a local VPC can resolve public DNS hostnames to private IP - // addresses when queried from instances in a peer VPC. - AllowDnsResolutionFromRemoteVpc *bool - - // Deprecated. - AllowEgressFromLocalClassicLinkToRemoteVpc *bool - - // Deprecated. - AllowEgressFromLocalVpcToRemoteClassicLink *bool - - noSmithyDocumentSerde -} - -// Describes the status of a VPC peering connection. -type VpcPeeringConnectionStateReason struct { - - // The status of the VPC peering connection. - Code VpcPeeringConnectionStateReasonCode - - // A message that provides more information about the status, if applicable. - Message *string - - noSmithyDocumentSerde -} - -// Describes a VPC in a VPC peering connection. -type VpcPeeringConnectionVpcInfo struct { - - // The IPv4 CIDR block for the VPC. - CidrBlock *string - - // Information about the IPv4 CIDR blocks for the VPC. - CidrBlockSet []CidrBlock - - // The IPv6 CIDR block for the VPC. - Ipv6CidrBlockSet []Ipv6CidrBlock - - // The ID of the Amazon Web Services account that owns the VPC. - OwnerId *string - - // Information about the VPC peering connection options for the accepter or - // requester VPC. - PeeringOptions *VpcPeeringConnectionOptionsDescription - - // The Region in which the VPC is located. - Region *string - - // The ID of the VPC. - VpcId *string - - noSmithyDocumentSerde -} - -// Describes a VPN connection. -type VpnConnection struct { - - // The category of the VPN connection. A value of VPN indicates an Amazon Web - // Services VPN connection. A value of VPN-Classic indicates an Amazon Web - // Services Classic VPN connection. - Category *string - - // The ARN of the core network. - CoreNetworkArn *string - - // The ARN of the core network attachment. - CoreNetworkAttachmentArn *string - - // The configuration information for the VPN connection's customer gateway (in the - // native XML format). This element is always present in the CreateVpnConnection - // response; however, it's present in the DescribeVpnConnections response only if - // the VPN connection is in the pending or available state. - CustomerGatewayConfiguration *string - - // The ID of the customer gateway at your end of the VPN connection. - CustomerGatewayId *string - - // The current state of the gateway association. - GatewayAssociationState GatewayAssociationState - - // The VPN connection options. - Options *VpnConnectionOptions - - // The static routes associated with the VPN connection. - Routes []VpnStaticRoute - - // The current state of the VPN connection. - State VpnState - - // Any tags assigned to the VPN connection. - Tags []Tag - - // The ID of the transit gateway associated with the VPN connection. - TransitGatewayId *string - - // The type of VPN connection. - Type GatewayType - - // Information about the VPN tunnel. - VgwTelemetry []VgwTelemetry - - // The ID of the VPN connection. - VpnConnectionId *string - - // The ID of the virtual private gateway at the Amazon Web Services side of the - // VPN connection. - VpnGatewayId *string - - noSmithyDocumentSerde -} - -// List of customer gateway devices that have a sample configuration file -// available for use. You can also see the list of device types with sample -// configuration files available under Your customer gateway device (https://docs.aws.amazon.com/vpn/latest/s2svpn/your-cgw.html) -// in the Amazon Web Services Site-to-Site VPN User Guide. -type VpnConnectionDeviceType struct { - - // Customer gateway device platform. - Platform *string - - // Customer gateway device software version. - Software *string - - // Customer gateway device vendor. - Vendor *string - - // Customer gateway device identifier. - VpnConnectionDeviceTypeId *string - - noSmithyDocumentSerde -} - -// Describes VPN connection options. -type VpnConnectionOptions struct { - - // Indicates whether acceleration is enabled for the VPN connection. - EnableAcceleration *bool - - // The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection. - LocalIpv4NetworkCidr *string - - // The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection. - LocalIpv6NetworkCidr *string - - // The type of IPv4 address assigned to the outside interface of the customer - // gateway. Valid values: PrivateIpv4 | PublicIpv4 Default: PublicIpv4 - OutsideIpAddressType *string - - // The IPv4 CIDR on the Amazon Web Services side of the VPN connection. - RemoteIpv4NetworkCidr *string - - // The IPv6 CIDR on the Amazon Web Services side of the VPN connection. - RemoteIpv6NetworkCidr *string - - // Indicates whether the VPN connection uses static routes only. Static routes - // must be used for devices that don't support BGP. - StaticRoutesOnly *bool - - // The transit gateway attachment ID in use for the VPN tunnel. - TransportTransitGatewayAttachmentId *string - - // Indicates whether the VPN tunnels process IPv4 or IPv6 traffic. - TunnelInsideIpVersion TunnelInsideIpVersion - - // Indicates the VPN tunnel options. - TunnelOptions []TunnelOption - - noSmithyDocumentSerde -} - -// Describes VPN connection options. -type VpnConnectionOptionsSpecification struct { - - // Indicate whether to enable acceleration for the VPN connection. Default: false - EnableAcceleration *bool - - // The IPv4 CIDR on the customer gateway (on-premises) side of the VPN connection. - // Default: 0.0.0.0/0 - LocalIpv4NetworkCidr *string - - // The IPv6 CIDR on the customer gateway (on-premises) side of the VPN connection. - // Default: ::/0 - LocalIpv6NetworkCidr *string - - // The type of IPv4 address assigned to the outside interface of the customer - // gateway device. Valid values: PrivateIpv4 | PublicIpv4 Default: PublicIpv4 - OutsideIpAddressType *string - - // The IPv4 CIDR on the Amazon Web Services side of the VPN connection. Default: - // 0.0.0.0/0 - RemoteIpv4NetworkCidr *string - - // The IPv6 CIDR on the Amazon Web Services side of the VPN connection. Default: - // ::/0 - RemoteIpv6NetworkCidr *string - - // Indicate whether the VPN connection uses static routes only. If you are - // creating a VPN connection for a device that does not support BGP, you must - // specify true . Use CreateVpnConnectionRoute to create a static route. Default: - // false - StaticRoutesOnly *bool - - // The transit gateway attachment ID to use for the VPN tunnel. Required if - // OutsideIpAddressType is set to PrivateIpv4 . - TransportTransitGatewayAttachmentId *string - - // Indicate whether the VPN tunnels process IPv4 or IPv6 traffic. Default: ipv4 - TunnelInsideIpVersion TunnelInsideIpVersion - - // The tunnel options for the VPN connection. - TunnelOptions []VpnTunnelOptionsSpecification - - noSmithyDocumentSerde -} - -// Describes a virtual private gateway. -type VpnGateway struct { - - // The private Autonomous System Number (ASN) for the Amazon side of a BGP session. - AmazonSideAsn *int64 - - // The Availability Zone where the virtual private gateway was created, if - // applicable. This field may be empty or not returned. - AvailabilityZone *string - - // The current state of the virtual private gateway. - State VpnState - - // Any tags assigned to the virtual private gateway. - Tags []Tag - - // The type of VPN connection the virtual private gateway supports. - Type GatewayType - - // Any VPCs attached to the virtual private gateway. - VpcAttachments []VpcAttachment - - // The ID of the virtual private gateway. - VpnGatewayId *string - - noSmithyDocumentSerde -} - -// Describes a static route for a VPN connection. -type VpnStaticRoute struct { - - // The CIDR block associated with the local subnet of the customer data center. - DestinationCidrBlock *string - - // Indicates how the routes were provided. - Source VpnStaticRouteSource - - // The current state of the static route. - State VpnState - - noSmithyDocumentSerde -} - -// Options for logging VPN tunnel activity. -type VpnTunnelLogOptions struct { - - // Options for sending VPN tunnel logs to CloudWatch. - CloudWatchLogOptions *CloudWatchLogOptions - - noSmithyDocumentSerde -} - -// Options for logging VPN tunnel activity. -type VpnTunnelLogOptionsSpecification struct { - - // Options for sending VPN tunnel logs to CloudWatch. - CloudWatchLogOptions *CloudWatchLogOptionsSpecification - - noSmithyDocumentSerde -} - -// The tunnel options for a single VPN tunnel. -type VpnTunnelOptionsSpecification struct { - - // The action to take after DPD timeout occurs. Specify restart to restart the IKE - // initiation. Specify clear to end the IKE session. Valid Values: clear | none | - // restart Default: clear - DPDTimeoutAction *string - - // The number of seconds after which a DPD timeout occurs. Constraints: A value - // greater than or equal to 30. Default: 30 - DPDTimeoutSeconds *int32 - - // Turn on or off tunnel endpoint lifecycle control feature. - EnableTunnelLifecycleControl *bool - - // The IKE versions that are permitted for the VPN tunnel. Valid values: ikev1 | - // ikev2 - IKEVersions []IKEVersionsRequestListValue - - // Options for logging VPN tunnel activity. - LogOptions *VpnTunnelLogOptionsSpecification - - // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel - // for phase 1 IKE negotiations. Valid values: 2 | 14 | 15 | 16 | 17 | 18 | 19 | 20 - // | 21 | 22 | 23 | 24 - Phase1DHGroupNumbers []Phase1DHGroupNumbersRequestListValue - - // One or more encryption algorithms that are permitted for the VPN tunnel for - // phase 1 IKE negotiations. Valid values: AES128 | AES256 | AES128-GCM-16 | - // AES256-GCM-16 - Phase1EncryptionAlgorithms []Phase1EncryptionAlgorithmsRequestListValue - - // One or more integrity algorithms that are permitted for the VPN tunnel for - // phase 1 IKE negotiations. Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512 - Phase1IntegrityAlgorithms []Phase1IntegrityAlgorithmsRequestListValue - - // The lifetime for phase 1 of the IKE negotiation, in seconds. Constraints: A - // value between 900 and 28,800. Default: 28800 - Phase1LifetimeSeconds *int32 - - // One or more Diffie-Hellman group numbers that are permitted for the VPN tunnel - // for phase 2 IKE negotiations. Valid values: 2 | 5 | 14 | 15 | 16 | 17 | 18 | 19 - // | 20 | 21 | 22 | 23 | 24 - Phase2DHGroupNumbers []Phase2DHGroupNumbersRequestListValue - - // One or more encryption algorithms that are permitted for the VPN tunnel for - // phase 2 IKE negotiations. Valid values: AES128 | AES256 | AES128-GCM-16 | - // AES256-GCM-16 - Phase2EncryptionAlgorithms []Phase2EncryptionAlgorithmsRequestListValue - - // One or more integrity algorithms that are permitted for the VPN tunnel for - // phase 2 IKE negotiations. Valid values: SHA1 | SHA2-256 | SHA2-384 | SHA2-512 - Phase2IntegrityAlgorithms []Phase2IntegrityAlgorithmsRequestListValue - - // The lifetime for phase 2 of the IKE negotiation, in seconds. Constraints: A - // value between 900 and 3,600. The value must be less than the value for - // Phase1LifetimeSeconds . Default: 3600 - Phase2LifetimeSeconds *int32 - - // The pre-shared key (PSK) to establish initial authentication between the - // virtual private gateway and customer gateway. Constraints: Allowed characters - // are alphanumeric characters, periods (.), and underscores (_). Must be between 8 - // and 64 characters in length and cannot start with zero (0). - PreSharedKey *string - - // The percentage of the rekey window (determined by RekeyMarginTimeSeconds ) - // during which the rekey time is randomly selected. Constraints: A value between 0 - // and 100. Default: 100 - RekeyFuzzPercentage *int32 - - // The margin time, in seconds, before the phase 2 lifetime expires, during which - // the Amazon Web Services side of the VPN connection performs an IKE rekey. The - // exact time of the rekey is randomly selected based on the value for - // RekeyFuzzPercentage . Constraints: A value between 60 and half of - // Phase2LifetimeSeconds . Default: 270 - RekeyMarginTimeSeconds *int32 - - // The number of packets in an IKE replay window. Constraints: A value between 64 - // and 2048. Default: 1024 - ReplayWindowSize *int32 - - // The action to take when the establishing the tunnel for the VPN connection. By - // default, your customer gateway device must initiate the IKE negotiation and - // bring up the tunnel. Specify start for Amazon Web Services to initiate the IKE - // negotiation. Valid Values: add | start Default: add - StartupAction *string - - // The range of inside IPv4 addresses for the tunnel. Any specified CIDR blocks - // must be unique across all VPN connections that use the same virtual private - // gateway. Constraints: A size /30 CIDR block from the 169.254.0.0/16 range. The - // following CIDR blocks are reserved and cannot be used: - // - 169.254.0.0/30 - // - 169.254.1.0/30 - // - 169.254.2.0/30 - // - 169.254.3.0/30 - // - 169.254.4.0/30 - // - 169.254.5.0/30 - // - 169.254.169.252/30 - TunnelInsideCidr *string - - // The range of inside IPv6 addresses for the tunnel. Any specified CIDR blocks - // must be unique across all VPN connections that use the same transit gateway. - // Constraints: A size /126 CIDR block from the local fd00::/8 range. - TunnelInsideIpv6Cidr *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go deleted file mode 100644 index 889864af4..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ec2/validators.go +++ /dev/null @@ -1,18627 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ec2 - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/ec2/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpAcceptAddressTransfer struct { -} - -func (*validateOpAcceptAddressTransfer) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptAddressTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptAddressTransferInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptAddressTransferInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAcceptReservedInstancesExchangeQuote struct { -} - -func (*validateOpAcceptReservedInstancesExchangeQuote) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptReservedInstancesExchangeQuote) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptReservedInstancesExchangeQuoteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptReservedInstancesExchangeQuoteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAcceptTransitGatewayPeeringAttachment struct { -} - -func (*validateOpAcceptTransitGatewayPeeringAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptTransitGatewayPeeringAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptTransitGatewayPeeringAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptTransitGatewayPeeringAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAcceptTransitGatewayVpcAttachment struct { -} - -func (*validateOpAcceptTransitGatewayVpcAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptTransitGatewayVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptTransitGatewayVpcAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptTransitGatewayVpcAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAcceptVpcEndpointConnections struct { -} - -func (*validateOpAcceptVpcEndpointConnections) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptVpcEndpointConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptVpcEndpointConnectionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptVpcEndpointConnectionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAcceptVpcPeeringConnection struct { -} - -func (*validateOpAcceptVpcPeeringConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAcceptVpcPeeringConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AcceptVpcPeeringConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAcceptVpcPeeringConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAdvertiseByoipCidr struct { -} - -func (*validateOpAdvertiseByoipCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAdvertiseByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AdvertiseByoipCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAdvertiseByoipCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAllocateHosts struct { -} - -func (*validateOpAllocateHosts) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAllocateHosts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AllocateHostsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAllocateHostsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAllocateIpamPoolCidr struct { -} - -func (*validateOpAllocateIpamPoolCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAllocateIpamPoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AllocateIpamPoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAllocateIpamPoolCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpApplySecurityGroupsToClientVpnTargetNetwork struct { -} - -func (*validateOpApplySecurityGroupsToClientVpnTargetNetwork) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpApplySecurityGroupsToClientVpnTargetNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ApplySecurityGroupsToClientVpnTargetNetworkInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpApplySecurityGroupsToClientVpnTargetNetworkInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssignIpv6Addresses struct { -} - -func (*validateOpAssignIpv6Addresses) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssignIpv6Addresses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssignIpv6AddressesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssignIpv6AddressesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssignPrivateIpAddresses struct { -} - -func (*validateOpAssignPrivateIpAddresses) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssignPrivateIpAddresses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssignPrivateIpAddressesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssignPrivateIpAddressesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssignPrivateNatGatewayAddress struct { -} - -func (*validateOpAssignPrivateNatGatewayAddress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssignPrivateNatGatewayAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssignPrivateNatGatewayAddressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssignPrivateNatGatewayAddressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateClientVpnTargetNetwork struct { -} - -func (*validateOpAssociateClientVpnTargetNetwork) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateClientVpnTargetNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateClientVpnTargetNetworkInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateClientVpnTargetNetworkInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateDhcpOptions struct { -} - -func (*validateOpAssociateDhcpOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateDhcpOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateDhcpOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateDhcpOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateEnclaveCertificateIamRole struct { -} - -func (*validateOpAssociateEnclaveCertificateIamRole) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateEnclaveCertificateIamRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateEnclaveCertificateIamRoleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateEnclaveCertificateIamRoleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateIamInstanceProfile struct { -} - -func (*validateOpAssociateIamInstanceProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateIamInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateIamInstanceProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateIamInstanceProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateInstanceEventWindow struct { -} - -func (*validateOpAssociateInstanceEventWindow) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateInstanceEventWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateInstanceEventWindowInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateInstanceEventWindowInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateIpamByoasn struct { -} - -func (*validateOpAssociateIpamByoasn) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateIpamByoasn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateIpamByoasnInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateIpamByoasnInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateIpamResourceDiscovery struct { -} - -func (*validateOpAssociateIpamResourceDiscovery) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateIpamResourceDiscovery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateIpamResourceDiscoveryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateIpamResourceDiscoveryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateNatGatewayAddress struct { -} - -func (*validateOpAssociateNatGatewayAddress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateNatGatewayAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateNatGatewayAddressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateNatGatewayAddressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateRouteTable struct { -} - -func (*validateOpAssociateRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateSubnetCidrBlock struct { -} - -func (*validateOpAssociateSubnetCidrBlock) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateSubnetCidrBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateSubnetCidrBlockInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateSubnetCidrBlockInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateTransitGatewayMulticastDomain struct { -} - -func (*validateOpAssociateTransitGatewayMulticastDomain) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateTransitGatewayMulticastDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateTransitGatewayMulticastDomainInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateTransitGatewayMulticastDomainInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateTransitGatewayPolicyTable struct { -} - -func (*validateOpAssociateTransitGatewayPolicyTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateTransitGatewayPolicyTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateTransitGatewayPolicyTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateTransitGatewayPolicyTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateTransitGatewayRouteTable struct { -} - -func (*validateOpAssociateTransitGatewayRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateTransitGatewayRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateTransitGatewayRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateTransitGatewayRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateTrunkInterface struct { -} - -func (*validateOpAssociateTrunkInterface) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateTrunkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateTrunkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateTrunkInterfaceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateVpcCidrBlock struct { -} - -func (*validateOpAssociateVpcCidrBlock) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateVpcCidrBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateVpcCidrBlockInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateVpcCidrBlockInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAttachClassicLinkVpc struct { -} - -func (*validateOpAttachClassicLinkVpc) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAttachClassicLinkVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AttachClassicLinkVpcInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAttachClassicLinkVpcInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAttachInternetGateway struct { -} - -func (*validateOpAttachInternetGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAttachInternetGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AttachInternetGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAttachInternetGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAttachNetworkInterface struct { -} - -func (*validateOpAttachNetworkInterface) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAttachNetworkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AttachNetworkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAttachNetworkInterfaceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAttachVerifiedAccessTrustProvider struct { -} - -func (*validateOpAttachVerifiedAccessTrustProvider) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAttachVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AttachVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAttachVerifiedAccessTrustProviderInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAttachVolume struct { -} - -func (*validateOpAttachVolume) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAttachVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AttachVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAttachVolumeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAttachVpnGateway struct { -} - -func (*validateOpAttachVpnGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAttachVpnGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AttachVpnGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAttachVpnGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAuthorizeClientVpnIngress struct { -} - -func (*validateOpAuthorizeClientVpnIngress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAuthorizeClientVpnIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AuthorizeClientVpnIngressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAuthorizeClientVpnIngressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAuthorizeSecurityGroupEgress struct { -} - -func (*validateOpAuthorizeSecurityGroupEgress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAuthorizeSecurityGroupEgress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AuthorizeSecurityGroupEgressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAuthorizeSecurityGroupEgressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpBundleInstance struct { -} - -func (*validateOpBundleInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBundleInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BundleInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBundleInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelBundleTask struct { -} - -func (*validateOpCancelBundleTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelBundleTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelBundleTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelBundleTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelCapacityReservationFleets struct { -} - -func (*validateOpCancelCapacityReservationFleets) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelCapacityReservationFleets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelCapacityReservationFleetsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelCapacityReservationFleetsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelCapacityReservation struct { -} - -func (*validateOpCancelCapacityReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelCapacityReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelCapacityReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelCapacityReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelConversionTask struct { -} - -func (*validateOpCancelConversionTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelConversionTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelConversionTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelConversionTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelExportTask struct { -} - -func (*validateOpCancelExportTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelExportTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelExportTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelImageLaunchPermission struct { -} - -func (*validateOpCancelImageLaunchPermission) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelImageLaunchPermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelImageLaunchPermissionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelImageLaunchPermissionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelReservedInstancesListing struct { -} - -func (*validateOpCancelReservedInstancesListing) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelReservedInstancesListing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelReservedInstancesListingInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelReservedInstancesListingInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelSpotFleetRequests struct { -} - -func (*validateOpCancelSpotFleetRequests) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelSpotFleetRequests) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelSpotFleetRequestsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelSpotFleetRequestsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCancelSpotInstanceRequests struct { -} - -func (*validateOpCancelSpotInstanceRequests) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelSpotInstanceRequests) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelSpotInstanceRequestsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelSpotInstanceRequestsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpConfirmProductInstance struct { -} - -func (*validateOpConfirmProductInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpConfirmProductInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ConfirmProductInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpConfirmProductInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCopyFpgaImage struct { -} - -func (*validateOpCopyFpgaImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCopyFpgaImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CopyFpgaImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCopyFpgaImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCopyImage struct { -} - -func (*validateOpCopyImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCopyImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CopyImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCopyImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCopySnapshot struct { -} - -func (*validateOpCopySnapshot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCopySnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CopySnapshotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCopySnapshotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCapacityReservationFleet struct { -} - -func (*validateOpCreateCapacityReservationFleet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCapacityReservationFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCapacityReservationFleetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCapacityReservationFleetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCapacityReservation struct { -} - -func (*validateOpCreateCapacityReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCapacityReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCapacityReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCapacityReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCarrierGateway struct { -} - -func (*validateOpCreateCarrierGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCarrierGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCarrierGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCarrierGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateClientVpnEndpoint struct { -} - -func (*validateOpCreateClientVpnEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateClientVpnEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateClientVpnEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateClientVpnEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateClientVpnRoute struct { -} - -func (*validateOpCreateClientVpnRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateClientVpnRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateClientVpnRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateClientVpnRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCoipCidr struct { -} - -func (*validateOpCreateCoipCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCoipCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCoipCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCoipPool struct { -} - -func (*validateOpCreateCoipPool) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCoipPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCoipPoolInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCoipPoolInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCustomerGateway struct { -} - -func (*validateOpCreateCustomerGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCustomerGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCustomerGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCustomerGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateDefaultSubnet struct { -} - -func (*validateOpCreateDefaultSubnet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateDefaultSubnet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateDefaultSubnetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateDefaultSubnetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateDhcpOptions struct { -} - -func (*validateOpCreateDhcpOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateDhcpOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateDhcpOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateDhcpOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateEgressOnlyInternetGateway struct { -} - -func (*validateOpCreateEgressOnlyInternetGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateEgressOnlyInternetGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateEgressOnlyInternetGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateEgressOnlyInternetGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateFleet struct { -} - -func (*validateOpCreateFleet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateFleetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateFleetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateFlowLogs struct { -} - -func (*validateOpCreateFlowLogs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateFlowLogs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateFlowLogsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateFlowLogsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateFpgaImage struct { -} - -func (*validateOpCreateFpgaImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateFpgaImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateFpgaImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateFpgaImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateImage struct { -} - -func (*validateOpCreateImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateInstanceConnectEndpoint struct { -} - -func (*validateOpCreateInstanceConnectEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateInstanceConnectEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateInstanceConnectEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateInstanceConnectEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateInstanceExportTask struct { -} - -func (*validateOpCreateInstanceExportTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateInstanceExportTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateInstanceExportTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateInstanceExportTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateIpamPool struct { -} - -func (*validateOpCreateIpamPool) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateIpamPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateIpamPoolInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateIpamPoolInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateIpamScope struct { -} - -func (*validateOpCreateIpamScope) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateIpamScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateIpamScopeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateIpamScopeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateKeyPair struct { -} - -func (*validateOpCreateKeyPair) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateKeyPair) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateKeyPairInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateKeyPairInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLaunchTemplate struct { -} - -func (*validateOpCreateLaunchTemplate) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLaunchTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLaunchTemplateInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLaunchTemplateInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLaunchTemplateVersion struct { -} - -func (*validateOpCreateLaunchTemplateVersion) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLaunchTemplateVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLaunchTemplateVersionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLaunchTemplateVersionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLocalGatewayRoute struct { -} - -func (*validateOpCreateLocalGatewayRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLocalGatewayRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLocalGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLocalGatewayRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLocalGatewayRouteTable struct { -} - -func (*validateOpCreateLocalGatewayRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLocalGatewayRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLocalGatewayRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLocalGatewayRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { -} - -func (*validateOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateLocalGatewayRouteTableVpcAssociation struct { -} - -func (*validateOpCreateLocalGatewayRouteTableVpcAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateLocalGatewayRouteTableVpcAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateLocalGatewayRouteTableVpcAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateLocalGatewayRouteTableVpcAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateManagedPrefixList struct { -} - -func (*validateOpCreateManagedPrefixList) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateManagedPrefixList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateManagedPrefixListInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateManagedPrefixListInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNatGateway struct { -} - -func (*validateOpCreateNatGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNatGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNatGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNatGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNetworkAclEntry struct { -} - -func (*validateOpCreateNetworkAclEntry) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNetworkAclEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNetworkAclEntryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNetworkAclEntryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNetworkAcl struct { -} - -func (*validateOpCreateNetworkAcl) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNetworkAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNetworkAclInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNetworkAclInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNetworkInsightsAccessScope struct { -} - -func (*validateOpCreateNetworkInsightsAccessScope) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNetworkInsightsAccessScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNetworkInsightsAccessScopeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNetworkInsightsAccessScopeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNetworkInsightsPath struct { -} - -func (*validateOpCreateNetworkInsightsPath) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNetworkInsightsPath) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNetworkInsightsPathInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNetworkInsightsPathInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNetworkInterface struct { -} - -func (*validateOpCreateNetworkInterface) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNetworkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNetworkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNetworkInterfaceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateNetworkInterfacePermission struct { -} - -func (*validateOpCreateNetworkInterfacePermission) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateNetworkInterfacePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateNetworkInterfacePermissionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateNetworkInterfacePermissionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateReplaceRootVolumeTask struct { -} - -func (*validateOpCreateReplaceRootVolumeTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateReplaceRootVolumeTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateReplaceRootVolumeTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateReplaceRootVolumeTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateReservedInstancesListing struct { -} - -func (*validateOpCreateReservedInstancesListing) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateReservedInstancesListing) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateReservedInstancesListingInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateReservedInstancesListingInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateRestoreImageTask struct { -} - -func (*validateOpCreateRestoreImageTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateRestoreImageTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateRestoreImageTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateRestoreImageTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateRoute struct { -} - -func (*validateOpCreateRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateRouteTable struct { -} - -func (*validateOpCreateRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSecurityGroup struct { -} - -func (*validateOpCreateSecurityGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSecurityGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSecurityGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSecurityGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSnapshot struct { -} - -func (*validateOpCreateSnapshot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSnapshotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSnapshotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSnapshots struct { -} - -func (*validateOpCreateSnapshots) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSnapshotsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSnapshotsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSpotDatafeedSubscription struct { -} - -func (*validateOpCreateSpotDatafeedSubscription) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSpotDatafeedSubscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSpotDatafeedSubscriptionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSpotDatafeedSubscriptionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateStoreImageTask struct { -} - -func (*validateOpCreateStoreImageTask) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateStoreImageTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateStoreImageTaskInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateStoreImageTaskInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSubnetCidrReservation struct { -} - -func (*validateOpCreateSubnetCidrReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSubnetCidrReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSubnetCidrReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSubnetCidrReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSubnet struct { -} - -func (*validateOpCreateSubnet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSubnet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSubnetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSubnetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTags struct { -} - -func (*validateOpCreateTags) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTagsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTagsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTrafficMirrorFilterRule struct { -} - -func (*validateOpCreateTrafficMirrorFilterRule) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTrafficMirrorFilterRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTrafficMirrorFilterRuleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTrafficMirrorFilterRuleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTrafficMirrorSession struct { -} - -func (*validateOpCreateTrafficMirrorSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTrafficMirrorSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTrafficMirrorSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTrafficMirrorSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayConnect struct { -} - -func (*validateOpCreateTransitGatewayConnect) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayConnect) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayConnectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayConnectInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayConnectPeer struct { -} - -func (*validateOpCreateTransitGatewayConnectPeer) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayConnectPeerInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayConnectPeerInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayMulticastDomain struct { -} - -func (*validateOpCreateTransitGatewayMulticastDomain) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayMulticastDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayMulticastDomainInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayMulticastDomainInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayPeeringAttachment struct { -} - -func (*validateOpCreateTransitGatewayPeeringAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayPeeringAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayPeeringAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayPeeringAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayPolicyTable struct { -} - -func (*validateOpCreateTransitGatewayPolicyTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayPolicyTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayPolicyTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayPolicyTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayPrefixListReference struct { -} - -func (*validateOpCreateTransitGatewayPrefixListReference) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayPrefixListReference) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayPrefixListReferenceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayPrefixListReferenceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayRoute struct { -} - -func (*validateOpCreateTransitGatewayRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayRouteTableAnnouncement struct { -} - -func (*validateOpCreateTransitGatewayRouteTableAnnouncement) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayRouteTableAnnouncement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayRouteTableAnnouncementInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayRouteTableAnnouncementInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayRouteTable struct { -} - -func (*validateOpCreateTransitGatewayRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTransitGatewayVpcAttachment struct { -} - -func (*validateOpCreateTransitGatewayVpcAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTransitGatewayVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTransitGatewayVpcAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTransitGatewayVpcAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVerifiedAccessEndpoint struct { -} - -func (*validateOpCreateVerifiedAccessEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVerifiedAccessEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVerifiedAccessEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVerifiedAccessEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVerifiedAccessGroup struct { -} - -func (*validateOpCreateVerifiedAccessGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVerifiedAccessGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVerifiedAccessGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVerifiedAccessGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVerifiedAccessTrustProvider struct { -} - -func (*validateOpCreateVerifiedAccessTrustProvider) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVerifiedAccessTrustProviderInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVolume struct { -} - -func (*validateOpCreateVolume) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVolumeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVpcEndpointConnectionNotification struct { -} - -func (*validateOpCreateVpcEndpointConnectionNotification) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVpcEndpointConnectionNotification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVpcEndpointConnectionNotificationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVpcEndpointConnectionNotificationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVpcEndpoint struct { -} - -func (*validateOpCreateVpcEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVpcEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVpcEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVpcEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVpcPeeringConnection struct { -} - -func (*validateOpCreateVpcPeeringConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVpcPeeringConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVpcPeeringConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVpcPeeringConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVpnConnection struct { -} - -func (*validateOpCreateVpnConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVpnConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVpnConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVpnConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVpnConnectionRoute struct { -} - -func (*validateOpCreateVpnConnectionRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVpnConnectionRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVpnConnectionRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVpnConnectionRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVpnGateway struct { -} - -func (*validateOpCreateVpnGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVpnGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVpnGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVpnGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteCarrierGateway struct { -} - -func (*validateOpDeleteCarrierGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteCarrierGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteCarrierGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteCarrierGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteClientVpnEndpoint struct { -} - -func (*validateOpDeleteClientVpnEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteClientVpnEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteClientVpnEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteClientVpnEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteClientVpnRoute struct { -} - -func (*validateOpDeleteClientVpnRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteClientVpnRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteClientVpnRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteClientVpnRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteCoipCidr struct { -} - -func (*validateOpDeleteCoipCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteCoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteCoipCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteCoipCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteCoipPool struct { -} - -func (*validateOpDeleteCoipPool) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteCoipPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteCoipPoolInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteCoipPoolInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteCustomerGateway struct { -} - -func (*validateOpDeleteCustomerGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteCustomerGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteCustomerGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteCustomerGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteDhcpOptions struct { -} - -func (*validateOpDeleteDhcpOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteDhcpOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteDhcpOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteDhcpOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteEgressOnlyInternetGateway struct { -} - -func (*validateOpDeleteEgressOnlyInternetGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteEgressOnlyInternetGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteEgressOnlyInternetGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteEgressOnlyInternetGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteFleets struct { -} - -func (*validateOpDeleteFleets) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteFleets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteFleetsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteFleetsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteFlowLogs struct { -} - -func (*validateOpDeleteFlowLogs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteFlowLogs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteFlowLogsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteFlowLogsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteFpgaImage struct { -} - -func (*validateOpDeleteFpgaImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteFpgaImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteFpgaImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteFpgaImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteInstanceConnectEndpoint struct { -} - -func (*validateOpDeleteInstanceConnectEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteInstanceConnectEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteInstanceConnectEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteInstanceConnectEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteInstanceEventWindow struct { -} - -func (*validateOpDeleteInstanceEventWindow) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteInstanceEventWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteInstanceEventWindowInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteInstanceEventWindowInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteInternetGateway struct { -} - -func (*validateOpDeleteInternetGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteInternetGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteInternetGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteInternetGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteIpam struct { -} - -func (*validateOpDeleteIpam) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteIpam) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteIpamInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteIpamInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteIpamPool struct { -} - -func (*validateOpDeleteIpamPool) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteIpamPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteIpamPoolInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteIpamPoolInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteIpamResourceDiscovery struct { -} - -func (*validateOpDeleteIpamResourceDiscovery) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteIpamResourceDiscovery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteIpamResourceDiscoveryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteIpamResourceDiscoveryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteIpamScope struct { -} - -func (*validateOpDeleteIpamScope) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteIpamScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteIpamScopeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteIpamScopeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLaunchTemplateVersions struct { -} - -func (*validateOpDeleteLaunchTemplateVersions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLaunchTemplateVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLaunchTemplateVersionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLaunchTemplateVersionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLocalGatewayRoute struct { -} - -func (*validateOpDeleteLocalGatewayRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLocalGatewayRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLocalGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLocalGatewayRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLocalGatewayRouteTable struct { -} - -func (*validateOpDeleteLocalGatewayRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLocalGatewayRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLocalGatewayRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation struct { -} - -func (*validateOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteLocalGatewayRouteTableVpcAssociation struct { -} - -func (*validateOpDeleteLocalGatewayRouteTableVpcAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteLocalGatewayRouteTableVpcAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteLocalGatewayRouteTableVpcAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteLocalGatewayRouteTableVpcAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteManagedPrefixList struct { -} - -func (*validateOpDeleteManagedPrefixList) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteManagedPrefixList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteManagedPrefixListInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteManagedPrefixListInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNatGateway struct { -} - -func (*validateOpDeleteNatGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNatGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNatGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNatGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkAclEntry struct { -} - -func (*validateOpDeleteNetworkAclEntry) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkAclEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkAclEntryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkAclEntryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkAcl struct { -} - -func (*validateOpDeleteNetworkAcl) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkAcl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkAclInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkAclInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkInsightsAccessScopeAnalysis struct { -} - -func (*validateOpDeleteNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkInsightsAccessScopeAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkInsightsAccessScopeAnalysisInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkInsightsAccessScopeAnalysisInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkInsightsAccessScope struct { -} - -func (*validateOpDeleteNetworkInsightsAccessScope) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkInsightsAccessScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkInsightsAccessScopeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkInsightsAccessScopeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkInsightsAnalysis struct { -} - -func (*validateOpDeleteNetworkInsightsAnalysis) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkInsightsAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkInsightsAnalysisInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkInsightsAnalysisInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkInsightsPath struct { -} - -func (*validateOpDeleteNetworkInsightsPath) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkInsightsPath) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkInsightsPathInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkInsightsPathInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkInterface struct { -} - -func (*validateOpDeleteNetworkInterface) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkInterfaceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteNetworkInterfacePermission struct { -} - -func (*validateOpDeleteNetworkInterfacePermission) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteNetworkInterfacePermission) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteNetworkInterfacePermissionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteNetworkInterfacePermissionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeletePlacementGroup struct { -} - -func (*validateOpDeletePlacementGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeletePlacementGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeletePlacementGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeletePlacementGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeletePublicIpv4Pool struct { -} - -func (*validateOpDeletePublicIpv4Pool) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeletePublicIpv4Pool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeletePublicIpv4PoolInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeletePublicIpv4PoolInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteQueuedReservedInstances struct { -} - -func (*validateOpDeleteQueuedReservedInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteQueuedReservedInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteQueuedReservedInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteQueuedReservedInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteRoute struct { -} - -func (*validateOpDeleteRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteRouteTable struct { -} - -func (*validateOpDeleteRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteSnapshot struct { -} - -func (*validateOpDeleteSnapshot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteSnapshotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteSnapshotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteSubnetCidrReservation struct { -} - -func (*validateOpDeleteSubnetCidrReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteSubnetCidrReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteSubnetCidrReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteSubnetCidrReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteSubnet struct { -} - -func (*validateOpDeleteSubnet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteSubnet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteSubnetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteSubnetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTags struct { -} - -func (*validateOpDeleteTags) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTagsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTagsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTrafficMirrorFilter struct { -} - -func (*validateOpDeleteTrafficMirrorFilter) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTrafficMirrorFilter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTrafficMirrorFilterInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTrafficMirrorFilterInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTrafficMirrorFilterRule struct { -} - -func (*validateOpDeleteTrafficMirrorFilterRule) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTrafficMirrorFilterRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTrafficMirrorFilterRuleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTrafficMirrorFilterRuleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTrafficMirrorSession struct { -} - -func (*validateOpDeleteTrafficMirrorSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTrafficMirrorSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTrafficMirrorSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTrafficMirrorSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTrafficMirrorTarget struct { -} - -func (*validateOpDeleteTrafficMirrorTarget) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTrafficMirrorTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTrafficMirrorTargetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTrafficMirrorTargetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayConnect struct { -} - -func (*validateOpDeleteTransitGatewayConnect) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayConnect) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayConnectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayConnectInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayConnectPeer struct { -} - -func (*validateOpDeleteTransitGatewayConnectPeer) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayConnectPeer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayConnectPeerInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayConnectPeerInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGateway struct { -} - -func (*validateOpDeleteTransitGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayMulticastDomain struct { -} - -func (*validateOpDeleteTransitGatewayMulticastDomain) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayMulticastDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayMulticastDomainInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayMulticastDomainInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayPeeringAttachment struct { -} - -func (*validateOpDeleteTransitGatewayPeeringAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayPeeringAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayPeeringAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayPeeringAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayPolicyTable struct { -} - -func (*validateOpDeleteTransitGatewayPolicyTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayPolicyTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayPolicyTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayPolicyTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayPrefixListReference struct { -} - -func (*validateOpDeleteTransitGatewayPrefixListReference) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayPrefixListReference) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayPrefixListReferenceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayPrefixListReferenceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayRoute struct { -} - -func (*validateOpDeleteTransitGatewayRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayRouteTableAnnouncement struct { -} - -func (*validateOpDeleteTransitGatewayRouteTableAnnouncement) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayRouteTableAnnouncement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayRouteTableAnnouncementInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayRouteTableAnnouncementInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayRouteTable struct { -} - -func (*validateOpDeleteTransitGatewayRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTransitGatewayVpcAttachment struct { -} - -func (*validateOpDeleteTransitGatewayVpcAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTransitGatewayVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTransitGatewayVpcAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTransitGatewayVpcAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVerifiedAccessEndpoint struct { -} - -func (*validateOpDeleteVerifiedAccessEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVerifiedAccessEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVerifiedAccessEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVerifiedAccessEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVerifiedAccessGroup struct { -} - -func (*validateOpDeleteVerifiedAccessGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVerifiedAccessGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVerifiedAccessGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVerifiedAccessGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVerifiedAccessInstance struct { -} - -func (*validateOpDeleteVerifiedAccessInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVerifiedAccessInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVerifiedAccessInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVerifiedAccessInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVerifiedAccessTrustProvider struct { -} - -func (*validateOpDeleteVerifiedAccessTrustProvider) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVerifiedAccessTrustProviderInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVolume struct { -} - -func (*validateOpDeleteVolume) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVolumeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpcEndpointConnectionNotifications struct { -} - -func (*validateOpDeleteVpcEndpointConnectionNotifications) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpcEndpointConnectionNotifications) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpcEndpointConnectionNotificationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpcEndpointConnectionNotificationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpcEndpointServiceConfigurations struct { -} - -func (*validateOpDeleteVpcEndpointServiceConfigurations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpcEndpointServiceConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpcEndpointServiceConfigurationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpcEndpointServiceConfigurationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpcEndpoints struct { -} - -func (*validateOpDeleteVpcEndpoints) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpcEndpoints) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpcEndpointsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpcEndpointsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpc struct { -} - -func (*validateOpDeleteVpc) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpcInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpcInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpcPeeringConnection struct { -} - -func (*validateOpDeleteVpcPeeringConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpcPeeringConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpcPeeringConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpcPeeringConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpnConnection struct { -} - -func (*validateOpDeleteVpnConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpnConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpnConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpnConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpnConnectionRoute struct { -} - -func (*validateOpDeleteVpnConnectionRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpnConnectionRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpnConnectionRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpnConnectionRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVpnGateway struct { -} - -func (*validateOpDeleteVpnGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVpnGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVpnGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVpnGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeprovisionByoipCidr struct { -} - -func (*validateOpDeprovisionByoipCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeprovisionByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeprovisionByoipCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeprovisionByoipCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeprovisionIpamByoasn struct { -} - -func (*validateOpDeprovisionIpamByoasn) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeprovisionIpamByoasn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeprovisionIpamByoasnInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeprovisionIpamByoasnInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeprovisionIpamPoolCidr struct { -} - -func (*validateOpDeprovisionIpamPoolCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeprovisionIpamPoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeprovisionIpamPoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeprovisionIpamPoolCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeprovisionPublicIpv4PoolCidr struct { -} - -func (*validateOpDeprovisionPublicIpv4PoolCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeprovisionPublicIpv4PoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeprovisionPublicIpv4PoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeprovisionPublicIpv4PoolCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeregisterImage struct { -} - -func (*validateOpDeregisterImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeregisterImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeregisterImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeregisterImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeregisterInstanceEventNotificationAttributes struct { -} - -func (*validateOpDeregisterInstanceEventNotificationAttributes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeregisterInstanceEventNotificationAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeregisterInstanceEventNotificationAttributesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeregisterInstanceEventNotificationAttributesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeByoipCidrs struct { -} - -func (*validateOpDescribeByoipCidrs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeByoipCidrs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeByoipCidrsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeByoipCidrsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeCapacityBlockOfferings struct { -} - -func (*validateOpDescribeCapacityBlockOfferings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeCapacityBlockOfferings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeCapacityBlockOfferingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeCapacityBlockOfferingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeClientVpnAuthorizationRules struct { -} - -func (*validateOpDescribeClientVpnAuthorizationRules) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeClientVpnAuthorizationRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeClientVpnAuthorizationRulesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeClientVpnAuthorizationRulesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeClientVpnConnections struct { -} - -func (*validateOpDescribeClientVpnConnections) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeClientVpnConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeClientVpnConnectionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeClientVpnConnectionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeClientVpnRoutes struct { -} - -func (*validateOpDescribeClientVpnRoutes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeClientVpnRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeClientVpnRoutesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeClientVpnRoutesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeClientVpnTargetNetworks struct { -} - -func (*validateOpDescribeClientVpnTargetNetworks) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeClientVpnTargetNetworks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeClientVpnTargetNetworksInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeClientVpnTargetNetworksInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeFleetHistory struct { -} - -func (*validateOpDescribeFleetHistory) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeFleetHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeFleetHistoryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeFleetHistoryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeFleetInstances struct { -} - -func (*validateOpDescribeFleetInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeFleetInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeFleetInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeFleetInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeFpgaImageAttribute struct { -} - -func (*validateOpDescribeFpgaImageAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeFpgaImageAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeFpgaImageAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeFpgaImageAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeIdentityIdFormat struct { -} - -func (*validateOpDescribeIdentityIdFormat) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeIdentityIdFormat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeIdentityIdFormatInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeIdentityIdFormatInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeImageAttribute struct { -} - -func (*validateOpDescribeImageAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeImageAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeImageAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeImageAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeInstanceAttribute struct { -} - -func (*validateOpDescribeInstanceAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeInstanceAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeInstanceAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeInstanceAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeNetworkInterfaceAttribute struct { -} - -func (*validateOpDescribeNetworkInterfaceAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeNetworkInterfaceAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeNetworkInterfaceAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeNetworkInterfaceAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeScheduledInstanceAvailability struct { -} - -func (*validateOpDescribeScheduledInstanceAvailability) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeScheduledInstanceAvailability) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeScheduledInstanceAvailabilityInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeScheduledInstanceAvailabilityInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeSecurityGroupReferences struct { -} - -func (*validateOpDescribeSecurityGroupReferences) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeSecurityGroupReferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeSecurityGroupReferencesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeSecurityGroupReferencesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeSnapshotAttribute struct { -} - -func (*validateOpDescribeSnapshotAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeSnapshotAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeSnapshotAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeSnapshotAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeSpotFleetInstances struct { -} - -func (*validateOpDescribeSpotFleetInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeSpotFleetInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeSpotFleetInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeSpotFleetInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeSpotFleetRequestHistory struct { -} - -func (*validateOpDescribeSpotFleetRequestHistory) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeSpotFleetRequestHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeSpotFleetRequestHistoryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeSpotFleetRequestHistoryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeStaleSecurityGroups struct { -} - -func (*validateOpDescribeStaleSecurityGroups) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeStaleSecurityGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeStaleSecurityGroupsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeStaleSecurityGroupsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeVolumeAttribute struct { -} - -func (*validateOpDescribeVolumeAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeVolumeAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeVolumeAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeVolumeAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeVpcAttribute struct { -} - -func (*validateOpDescribeVpcAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeVpcAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeVpcAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeVpcAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeVpcEndpointServicePermissions struct { -} - -func (*validateOpDescribeVpcEndpointServicePermissions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeVpcEndpointServicePermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeVpcEndpointServicePermissionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeVpcEndpointServicePermissionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDetachClassicLinkVpc struct { -} - -func (*validateOpDetachClassicLinkVpc) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDetachClassicLinkVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DetachClassicLinkVpcInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDetachClassicLinkVpcInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDetachInternetGateway struct { -} - -func (*validateOpDetachInternetGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDetachInternetGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DetachInternetGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDetachInternetGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDetachNetworkInterface struct { -} - -func (*validateOpDetachNetworkInterface) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDetachNetworkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DetachNetworkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDetachNetworkInterfaceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDetachVerifiedAccessTrustProvider struct { -} - -func (*validateOpDetachVerifiedAccessTrustProvider) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDetachVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DetachVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDetachVerifiedAccessTrustProviderInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDetachVolume struct { -} - -func (*validateOpDetachVolume) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDetachVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DetachVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDetachVolumeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDetachVpnGateway struct { -} - -func (*validateOpDetachVpnGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDetachVpnGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DetachVpnGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDetachVpnGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableAddressTransfer struct { -} - -func (*validateOpDisableAddressTransfer) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableAddressTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableAddressTransferInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableAddressTransferInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableFastLaunch struct { -} - -func (*validateOpDisableFastLaunch) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableFastLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableFastLaunchInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableFastLaunchInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableFastSnapshotRestores struct { -} - -func (*validateOpDisableFastSnapshotRestores) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableFastSnapshotRestores) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableFastSnapshotRestoresInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableFastSnapshotRestoresInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableImageDeprecation struct { -} - -func (*validateOpDisableImageDeprecation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableImageDeprecation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableImageDeprecationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableImageDeprecationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableImage struct { -} - -func (*validateOpDisableImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableIpamOrganizationAdminAccount struct { -} - -func (*validateOpDisableIpamOrganizationAdminAccount) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableIpamOrganizationAdminAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableIpamOrganizationAdminAccountInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableIpamOrganizationAdminAccountInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableTransitGatewayRouteTablePropagation struct { -} - -func (*validateOpDisableTransitGatewayRouteTablePropagation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableTransitGatewayRouteTablePropagation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableTransitGatewayRouteTablePropagationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableTransitGatewayRouteTablePropagationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableVgwRoutePropagation struct { -} - -func (*validateOpDisableVgwRoutePropagation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableVgwRoutePropagation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableVgwRoutePropagationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableVgwRoutePropagationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableVpcClassicLink struct { -} - -func (*validateOpDisableVpcClassicLink) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableVpcClassicLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableVpcClassicLinkInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableVpcClassicLinkInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateClientVpnTargetNetwork struct { -} - -func (*validateOpDisassociateClientVpnTargetNetwork) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateClientVpnTargetNetwork) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateClientVpnTargetNetworkInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateClientVpnTargetNetworkInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateEnclaveCertificateIamRole struct { -} - -func (*validateOpDisassociateEnclaveCertificateIamRole) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateEnclaveCertificateIamRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateEnclaveCertificateIamRoleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateEnclaveCertificateIamRoleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateIamInstanceProfile struct { -} - -func (*validateOpDisassociateIamInstanceProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateIamInstanceProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateIamInstanceProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateIamInstanceProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateInstanceEventWindow struct { -} - -func (*validateOpDisassociateInstanceEventWindow) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateInstanceEventWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateInstanceEventWindowInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateInstanceEventWindowInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateIpamByoasn struct { -} - -func (*validateOpDisassociateIpamByoasn) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateIpamByoasn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateIpamByoasnInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateIpamByoasnInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateIpamResourceDiscovery struct { -} - -func (*validateOpDisassociateIpamResourceDiscovery) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateIpamResourceDiscovery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateIpamResourceDiscoveryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateIpamResourceDiscoveryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateNatGatewayAddress struct { -} - -func (*validateOpDisassociateNatGatewayAddress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateNatGatewayAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateNatGatewayAddressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateNatGatewayAddressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateRouteTable struct { -} - -func (*validateOpDisassociateRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateSubnetCidrBlock struct { -} - -func (*validateOpDisassociateSubnetCidrBlock) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateSubnetCidrBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateSubnetCidrBlockInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateSubnetCidrBlockInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateTransitGatewayMulticastDomain struct { -} - -func (*validateOpDisassociateTransitGatewayMulticastDomain) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateTransitGatewayMulticastDomain) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateTransitGatewayMulticastDomainInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateTransitGatewayMulticastDomainInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateTransitGatewayPolicyTable struct { -} - -func (*validateOpDisassociateTransitGatewayPolicyTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateTransitGatewayPolicyTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateTransitGatewayPolicyTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateTransitGatewayPolicyTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateTransitGatewayRouteTable struct { -} - -func (*validateOpDisassociateTransitGatewayRouteTable) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateTransitGatewayRouteTable) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateTransitGatewayRouteTableInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateTransitGatewayRouteTableInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateTrunkInterface struct { -} - -func (*validateOpDisassociateTrunkInterface) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateTrunkInterface) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateTrunkInterfaceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateTrunkInterfaceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateVpcCidrBlock struct { -} - -func (*validateOpDisassociateVpcCidrBlock) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateVpcCidrBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateVpcCidrBlockInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateVpcCidrBlockInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableAddressTransfer struct { -} - -func (*validateOpEnableAddressTransfer) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableAddressTransfer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableAddressTransferInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableAddressTransferInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableFastLaunch struct { -} - -func (*validateOpEnableFastLaunch) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableFastLaunch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableFastLaunchInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableFastLaunchInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableFastSnapshotRestores struct { -} - -func (*validateOpEnableFastSnapshotRestores) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableFastSnapshotRestores) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableFastSnapshotRestoresInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableFastSnapshotRestoresInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableImageBlockPublicAccess struct { -} - -func (*validateOpEnableImageBlockPublicAccess) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableImageBlockPublicAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableImageBlockPublicAccessInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableImageBlockPublicAccessInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableImageDeprecation struct { -} - -func (*validateOpEnableImageDeprecation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableImageDeprecation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableImageDeprecationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableImageDeprecationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableImage struct { -} - -func (*validateOpEnableImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableIpamOrganizationAdminAccount struct { -} - -func (*validateOpEnableIpamOrganizationAdminAccount) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableIpamOrganizationAdminAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableIpamOrganizationAdminAccountInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableIpamOrganizationAdminAccountInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableSnapshotBlockPublicAccess struct { -} - -func (*validateOpEnableSnapshotBlockPublicAccess) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableSnapshotBlockPublicAccess) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableSnapshotBlockPublicAccessInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableSnapshotBlockPublicAccessInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableTransitGatewayRouteTablePropagation struct { -} - -func (*validateOpEnableTransitGatewayRouteTablePropagation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableTransitGatewayRouteTablePropagation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableTransitGatewayRouteTablePropagationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableTransitGatewayRouteTablePropagationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableVgwRoutePropagation struct { -} - -func (*validateOpEnableVgwRoutePropagation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableVgwRoutePropagation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableVgwRoutePropagationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableVgwRoutePropagationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableVolumeIO struct { -} - -func (*validateOpEnableVolumeIO) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableVolumeIO) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableVolumeIOInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableVolumeIOInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableVpcClassicLink struct { -} - -func (*validateOpEnableVpcClassicLink) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableVpcClassicLink) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableVpcClassicLinkInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableVpcClassicLinkInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpExportClientVpnClientCertificateRevocationList struct { -} - -func (*validateOpExportClientVpnClientCertificateRevocationList) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpExportClientVpnClientCertificateRevocationList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ExportClientVpnClientCertificateRevocationListInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpExportClientVpnClientCertificateRevocationListInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpExportClientVpnClientConfiguration struct { -} - -func (*validateOpExportClientVpnClientConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpExportClientVpnClientConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ExportClientVpnClientConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpExportClientVpnClientConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpExportImage struct { -} - -func (*validateOpExportImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpExportImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ExportImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpExportImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpExportTransitGatewayRoutes struct { -} - -func (*validateOpExportTransitGatewayRoutes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpExportTransitGatewayRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ExportTransitGatewayRoutesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpExportTransitGatewayRoutesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetAssociatedEnclaveCertificateIamRoles struct { -} - -func (*validateOpGetAssociatedEnclaveCertificateIamRoles) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetAssociatedEnclaveCertificateIamRoles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAssociatedEnclaveCertificateIamRolesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAssociatedEnclaveCertificateIamRolesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetAssociatedIpv6PoolCidrs struct { -} - -func (*validateOpGetAssociatedIpv6PoolCidrs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetAssociatedIpv6PoolCidrs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAssociatedIpv6PoolCidrsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAssociatedIpv6PoolCidrsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetCapacityReservationUsage struct { -} - -func (*validateOpGetCapacityReservationUsage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetCapacityReservationUsage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetCapacityReservationUsageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetCapacityReservationUsageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetCoipPoolUsage struct { -} - -func (*validateOpGetCoipPoolUsage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetCoipPoolUsage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetCoipPoolUsageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetCoipPoolUsageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetConsoleOutput struct { -} - -func (*validateOpGetConsoleOutput) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetConsoleOutput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetConsoleOutputInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetConsoleOutputInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetConsoleScreenshot struct { -} - -func (*validateOpGetConsoleScreenshot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetConsoleScreenshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetConsoleScreenshotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetConsoleScreenshotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetDefaultCreditSpecification struct { -} - -func (*validateOpGetDefaultCreditSpecification) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetDefaultCreditSpecification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetDefaultCreditSpecificationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetDefaultCreditSpecificationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetFlowLogsIntegrationTemplate struct { -} - -func (*validateOpGetFlowLogsIntegrationTemplate) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetFlowLogsIntegrationTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetFlowLogsIntegrationTemplateInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetFlowLogsIntegrationTemplateInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetGroupsForCapacityReservation struct { -} - -func (*validateOpGetGroupsForCapacityReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetGroupsForCapacityReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetGroupsForCapacityReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetGroupsForCapacityReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetHostReservationPurchasePreview struct { -} - -func (*validateOpGetHostReservationPurchasePreview) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetHostReservationPurchasePreview) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetHostReservationPurchasePreviewInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetHostReservationPurchasePreviewInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetInstanceTypesFromInstanceRequirements struct { -} - -func (*validateOpGetInstanceTypesFromInstanceRequirements) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetInstanceTypesFromInstanceRequirements) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetInstanceTypesFromInstanceRequirementsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetInstanceTypesFromInstanceRequirementsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetInstanceUefiData struct { -} - -func (*validateOpGetInstanceUefiData) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetInstanceUefiData) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetInstanceUefiDataInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetInstanceUefiDataInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamAddressHistory struct { -} - -func (*validateOpGetIpamAddressHistory) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamAddressHistory) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamAddressHistoryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamAddressHistoryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamDiscoveredAccounts struct { -} - -func (*validateOpGetIpamDiscoveredAccounts) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamDiscoveredAccounts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamDiscoveredAccountsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamDiscoveredAccountsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamDiscoveredPublicAddresses struct { -} - -func (*validateOpGetIpamDiscoveredPublicAddresses) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamDiscoveredPublicAddresses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamDiscoveredPublicAddressesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamDiscoveredPublicAddressesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamDiscoveredResourceCidrs struct { -} - -func (*validateOpGetIpamDiscoveredResourceCidrs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamDiscoveredResourceCidrs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamDiscoveredResourceCidrsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamDiscoveredResourceCidrsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamPoolAllocations struct { -} - -func (*validateOpGetIpamPoolAllocations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamPoolAllocations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamPoolAllocationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamPoolAllocationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamPoolCidrs struct { -} - -func (*validateOpGetIpamPoolCidrs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamPoolCidrs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamPoolCidrsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamPoolCidrsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetIpamResourceCidrs struct { -} - -func (*validateOpGetIpamResourceCidrs) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetIpamResourceCidrs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetIpamResourceCidrsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetIpamResourceCidrsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetLaunchTemplateData struct { -} - -func (*validateOpGetLaunchTemplateData) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetLaunchTemplateData) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetLaunchTemplateDataInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetLaunchTemplateDataInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetManagedPrefixListAssociations struct { -} - -func (*validateOpGetManagedPrefixListAssociations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetManagedPrefixListAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetManagedPrefixListAssociationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetManagedPrefixListAssociationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetManagedPrefixListEntries struct { -} - -func (*validateOpGetManagedPrefixListEntries) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetManagedPrefixListEntries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetManagedPrefixListEntriesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetManagedPrefixListEntriesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetNetworkInsightsAccessScopeAnalysisFindings struct { -} - -func (*validateOpGetNetworkInsightsAccessScopeAnalysisFindings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetNetworkInsightsAccessScopeAnalysisFindings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetNetworkInsightsAccessScopeAnalysisFindingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetNetworkInsightsAccessScopeAnalysisFindingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetNetworkInsightsAccessScopeContent struct { -} - -func (*validateOpGetNetworkInsightsAccessScopeContent) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetNetworkInsightsAccessScopeContent) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetNetworkInsightsAccessScopeContentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetNetworkInsightsAccessScopeContentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetPasswordData struct { -} - -func (*validateOpGetPasswordData) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetPasswordData) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetPasswordDataInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetPasswordDataInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetReservedInstancesExchangeQuote struct { -} - -func (*validateOpGetReservedInstancesExchangeQuote) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetReservedInstancesExchangeQuote) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetReservedInstancesExchangeQuoteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetReservedInstancesExchangeQuoteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSecurityGroupsForVpc struct { -} - -func (*validateOpGetSecurityGroupsForVpc) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSecurityGroupsForVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSecurityGroupsForVpcInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSecurityGroupsForVpcInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSpotPlacementScores struct { -} - -func (*validateOpGetSpotPlacementScores) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSpotPlacementScores) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSpotPlacementScoresInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSpotPlacementScoresInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSubnetCidrReservations struct { -} - -func (*validateOpGetSubnetCidrReservations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSubnetCidrReservations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSubnetCidrReservationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSubnetCidrReservationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayAttachmentPropagations struct { -} - -func (*validateOpGetTransitGatewayAttachmentPropagations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayAttachmentPropagations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayAttachmentPropagationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayAttachmentPropagationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayMulticastDomainAssociations struct { -} - -func (*validateOpGetTransitGatewayMulticastDomainAssociations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayMulticastDomainAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayMulticastDomainAssociationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayMulticastDomainAssociationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayPolicyTableAssociations struct { -} - -func (*validateOpGetTransitGatewayPolicyTableAssociations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayPolicyTableAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayPolicyTableAssociationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayPolicyTableAssociationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayPolicyTableEntries struct { -} - -func (*validateOpGetTransitGatewayPolicyTableEntries) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayPolicyTableEntries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayPolicyTableEntriesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayPolicyTableEntriesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayPrefixListReferences struct { -} - -func (*validateOpGetTransitGatewayPrefixListReferences) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayPrefixListReferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayPrefixListReferencesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayPrefixListReferencesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayRouteTableAssociations struct { -} - -func (*validateOpGetTransitGatewayRouteTableAssociations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayRouteTableAssociations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayRouteTableAssociationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayRouteTableAssociationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTransitGatewayRouteTablePropagations struct { -} - -func (*validateOpGetTransitGatewayRouteTablePropagations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTransitGatewayRouteTablePropagations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTransitGatewayRouteTablePropagationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTransitGatewayRouteTablePropagationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVerifiedAccessEndpointPolicy struct { -} - -func (*validateOpGetVerifiedAccessEndpointPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVerifiedAccessEndpointPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVerifiedAccessEndpointPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVerifiedAccessEndpointPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVerifiedAccessGroupPolicy struct { -} - -func (*validateOpGetVerifiedAccessGroupPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVerifiedAccessGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVerifiedAccessGroupPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVerifiedAccessGroupPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVpnConnectionDeviceSampleConfiguration struct { -} - -func (*validateOpGetVpnConnectionDeviceSampleConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVpnConnectionDeviceSampleConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVpnConnectionDeviceSampleConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVpnConnectionDeviceSampleConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVpnTunnelReplacementStatus struct { -} - -func (*validateOpGetVpnTunnelReplacementStatus) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVpnTunnelReplacementStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVpnTunnelReplacementStatusInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVpnTunnelReplacementStatusInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpImportClientVpnClientCertificateRevocationList struct { -} - -func (*validateOpImportClientVpnClientCertificateRevocationList) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpImportClientVpnClientCertificateRevocationList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ImportClientVpnClientCertificateRevocationListInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpImportClientVpnClientCertificateRevocationListInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpImportInstance struct { -} - -func (*validateOpImportInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpImportInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ImportInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpImportInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpImportKeyPair struct { -} - -func (*validateOpImportKeyPair) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpImportKeyPair) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ImportKeyPairInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpImportKeyPairInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpImportVolume struct { -} - -func (*validateOpImportVolume) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpImportVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ImportVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpImportVolumeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpLockSnapshot struct { -} - -func (*validateOpLockSnapshot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpLockSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*LockSnapshotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpLockSnapshotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyAddressAttribute struct { -} - -func (*validateOpModifyAddressAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyAddressAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyAddressAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyAddressAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyAvailabilityZoneGroup struct { -} - -func (*validateOpModifyAvailabilityZoneGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyAvailabilityZoneGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyAvailabilityZoneGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyAvailabilityZoneGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyCapacityReservationFleet struct { -} - -func (*validateOpModifyCapacityReservationFleet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyCapacityReservationFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyCapacityReservationFleetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyCapacityReservationFleetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyCapacityReservation struct { -} - -func (*validateOpModifyCapacityReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyCapacityReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyCapacityReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyCapacityReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyClientVpnEndpoint struct { -} - -func (*validateOpModifyClientVpnEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyClientVpnEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyClientVpnEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyClientVpnEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyDefaultCreditSpecification struct { -} - -func (*validateOpModifyDefaultCreditSpecification) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyDefaultCreditSpecification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyDefaultCreditSpecificationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyDefaultCreditSpecificationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyEbsDefaultKmsKeyId struct { -} - -func (*validateOpModifyEbsDefaultKmsKeyId) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyEbsDefaultKmsKeyId) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyEbsDefaultKmsKeyIdInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyEbsDefaultKmsKeyIdInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyFleet struct { -} - -func (*validateOpModifyFleet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyFleetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyFleetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyFpgaImageAttribute struct { -} - -func (*validateOpModifyFpgaImageAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyFpgaImageAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyFpgaImageAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyFpgaImageAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyHosts struct { -} - -func (*validateOpModifyHosts) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyHosts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyHostsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyHostsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIdentityIdFormat struct { -} - -func (*validateOpModifyIdentityIdFormat) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIdentityIdFormat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIdentityIdFormatInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIdentityIdFormatInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIdFormat struct { -} - -func (*validateOpModifyIdFormat) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIdFormat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIdFormatInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIdFormatInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyImageAttribute struct { -} - -func (*validateOpModifyImageAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyImageAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyImageAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyImageAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceAttribute struct { -} - -func (*validateOpModifyInstanceAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceCapacityReservationAttributes struct { -} - -func (*validateOpModifyInstanceCapacityReservationAttributes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceCapacityReservationAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceCapacityReservationAttributesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceCapacityReservationAttributesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceCreditSpecification struct { -} - -func (*validateOpModifyInstanceCreditSpecification) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceCreditSpecification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceCreditSpecificationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceCreditSpecificationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceEventStartTime struct { -} - -func (*validateOpModifyInstanceEventStartTime) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceEventStartTime) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceEventStartTimeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceEventStartTimeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceEventWindow struct { -} - -func (*validateOpModifyInstanceEventWindow) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceEventWindow) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceEventWindowInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceEventWindowInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceMaintenanceOptions struct { -} - -func (*validateOpModifyInstanceMaintenanceOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceMaintenanceOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceMaintenanceOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceMaintenanceOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstanceMetadataOptions struct { -} - -func (*validateOpModifyInstanceMetadataOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstanceMetadataOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstanceMetadataOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstanceMetadataOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyInstancePlacement struct { -} - -func (*validateOpModifyInstancePlacement) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyInstancePlacement) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyInstancePlacementInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyInstancePlacementInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIpam struct { -} - -func (*validateOpModifyIpam) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIpam) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIpamInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIpamInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIpamPool struct { -} - -func (*validateOpModifyIpamPool) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIpamPool) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIpamPoolInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIpamPoolInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIpamResourceCidr struct { -} - -func (*validateOpModifyIpamResourceCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIpamResourceCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIpamResourceCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIpamResourceCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIpamResourceDiscovery struct { -} - -func (*validateOpModifyIpamResourceDiscovery) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIpamResourceDiscovery) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIpamResourceDiscoveryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIpamResourceDiscoveryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyIpamScope struct { -} - -func (*validateOpModifyIpamScope) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyIpamScope) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyIpamScopeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyIpamScopeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyLocalGatewayRoute struct { -} - -func (*validateOpModifyLocalGatewayRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyLocalGatewayRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyLocalGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyLocalGatewayRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyManagedPrefixList struct { -} - -func (*validateOpModifyManagedPrefixList) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyManagedPrefixList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyManagedPrefixListInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyManagedPrefixListInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyNetworkInterfaceAttribute struct { -} - -func (*validateOpModifyNetworkInterfaceAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyNetworkInterfaceAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyNetworkInterfaceAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyNetworkInterfaceAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyPrivateDnsNameOptions struct { -} - -func (*validateOpModifyPrivateDnsNameOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyPrivateDnsNameOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyPrivateDnsNameOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyPrivateDnsNameOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyReservedInstances struct { -} - -func (*validateOpModifyReservedInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyReservedInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyReservedInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyReservedInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifySecurityGroupRules struct { -} - -func (*validateOpModifySecurityGroupRules) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifySecurityGroupRules) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifySecurityGroupRulesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifySecurityGroupRulesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifySnapshotAttribute struct { -} - -func (*validateOpModifySnapshotAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifySnapshotAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifySnapshotAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifySnapshotAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifySnapshotTier struct { -} - -func (*validateOpModifySnapshotTier) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifySnapshotTier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifySnapshotTierInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifySnapshotTierInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifySpotFleetRequest struct { -} - -func (*validateOpModifySpotFleetRequest) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifySpotFleetRequest) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifySpotFleetRequestInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifySpotFleetRequestInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifySubnetAttribute struct { -} - -func (*validateOpModifySubnetAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifySubnetAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifySubnetAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifySubnetAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyTrafficMirrorFilterNetworkServices struct { -} - -func (*validateOpModifyTrafficMirrorFilterNetworkServices) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyTrafficMirrorFilterNetworkServices) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyTrafficMirrorFilterNetworkServicesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyTrafficMirrorFilterNetworkServicesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyTrafficMirrorFilterRule struct { -} - -func (*validateOpModifyTrafficMirrorFilterRule) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyTrafficMirrorFilterRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyTrafficMirrorFilterRuleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyTrafficMirrorFilterRuleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyTrafficMirrorSession struct { -} - -func (*validateOpModifyTrafficMirrorSession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyTrafficMirrorSession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyTrafficMirrorSessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyTrafficMirrorSessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyTransitGateway struct { -} - -func (*validateOpModifyTransitGateway) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyTransitGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyTransitGatewayInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyTransitGatewayInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyTransitGatewayPrefixListReference struct { -} - -func (*validateOpModifyTransitGatewayPrefixListReference) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyTransitGatewayPrefixListReference) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyTransitGatewayPrefixListReferenceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyTransitGatewayPrefixListReferenceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyTransitGatewayVpcAttachment struct { -} - -func (*validateOpModifyTransitGatewayVpcAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyTransitGatewayVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyTransitGatewayVpcAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyTransitGatewayVpcAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessEndpoint struct { -} - -func (*validateOpModifyVerifiedAccessEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessEndpointPolicy struct { -} - -func (*validateOpModifyVerifiedAccessEndpointPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessEndpointPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessEndpointPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessEndpointPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessGroup struct { -} - -func (*validateOpModifyVerifiedAccessGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessGroupPolicy struct { -} - -func (*validateOpModifyVerifiedAccessGroupPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessGroupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessGroupPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessGroupPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessInstance struct { -} - -func (*validateOpModifyVerifiedAccessInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessInstanceLoggingConfiguration struct { -} - -func (*validateOpModifyVerifiedAccessInstanceLoggingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessInstanceLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessInstanceLoggingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessInstanceLoggingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVerifiedAccessTrustProvider struct { -} - -func (*validateOpModifyVerifiedAccessTrustProvider) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVerifiedAccessTrustProvider) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVerifiedAccessTrustProviderInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVerifiedAccessTrustProviderInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVolumeAttribute struct { -} - -func (*validateOpModifyVolumeAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVolumeAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVolumeAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVolumeAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVolume struct { -} - -func (*validateOpModifyVolume) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVolume) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVolumeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVolumeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcAttribute struct { -} - -func (*validateOpModifyVpcAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcEndpointConnectionNotification struct { -} - -func (*validateOpModifyVpcEndpointConnectionNotification) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcEndpointConnectionNotification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcEndpointConnectionNotificationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcEndpointConnectionNotificationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcEndpoint struct { -} - -func (*validateOpModifyVpcEndpoint) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcEndpointInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcEndpointInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcEndpointServiceConfiguration struct { -} - -func (*validateOpModifyVpcEndpointServiceConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcEndpointServiceConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcEndpointServiceConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcEndpointServiceConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcEndpointServicePayerResponsibility struct { -} - -func (*validateOpModifyVpcEndpointServicePayerResponsibility) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcEndpointServicePayerResponsibility) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcEndpointServicePayerResponsibilityInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcEndpointServicePayerResponsibilityInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcEndpointServicePermissions struct { -} - -func (*validateOpModifyVpcEndpointServicePermissions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcEndpointServicePermissions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcEndpointServicePermissionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcEndpointServicePermissionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcPeeringConnectionOptions struct { -} - -func (*validateOpModifyVpcPeeringConnectionOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcPeeringConnectionOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcPeeringConnectionOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcPeeringConnectionOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpcTenancy struct { -} - -func (*validateOpModifyVpcTenancy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpcTenancy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpcTenancyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpcTenancyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpnConnection struct { -} - -func (*validateOpModifyVpnConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpnConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpnConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpnConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpnConnectionOptions struct { -} - -func (*validateOpModifyVpnConnectionOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpnConnectionOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpnConnectionOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpnConnectionOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpnTunnelCertificate struct { -} - -func (*validateOpModifyVpnTunnelCertificate) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpnTunnelCertificate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpnTunnelCertificateInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpnTunnelCertificateInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpModifyVpnTunnelOptions struct { -} - -func (*validateOpModifyVpnTunnelOptions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpModifyVpnTunnelOptions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ModifyVpnTunnelOptionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpModifyVpnTunnelOptionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpMonitorInstances struct { -} - -func (*validateOpMonitorInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpMonitorInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*MonitorInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpMonitorInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpMoveAddressToVpc struct { -} - -func (*validateOpMoveAddressToVpc) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpMoveAddressToVpc) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*MoveAddressToVpcInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpMoveAddressToVpcInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpMoveByoipCidrToIpam struct { -} - -func (*validateOpMoveByoipCidrToIpam) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpMoveByoipCidrToIpam) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*MoveByoipCidrToIpamInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpMoveByoipCidrToIpamInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpProvisionByoipCidr struct { -} - -func (*validateOpProvisionByoipCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpProvisionByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ProvisionByoipCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpProvisionByoipCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpProvisionIpamByoasn struct { -} - -func (*validateOpProvisionIpamByoasn) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpProvisionIpamByoasn) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ProvisionIpamByoasnInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpProvisionIpamByoasnInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpProvisionIpamPoolCidr struct { -} - -func (*validateOpProvisionIpamPoolCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpProvisionIpamPoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ProvisionIpamPoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpProvisionIpamPoolCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpProvisionPublicIpv4PoolCidr struct { -} - -func (*validateOpProvisionPublicIpv4PoolCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpProvisionPublicIpv4PoolCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ProvisionPublicIpv4PoolCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpProvisionPublicIpv4PoolCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPurchaseCapacityBlock struct { -} - -func (*validateOpPurchaseCapacityBlock) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPurchaseCapacityBlock) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PurchaseCapacityBlockInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPurchaseCapacityBlockInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPurchaseHostReservation struct { -} - -func (*validateOpPurchaseHostReservation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPurchaseHostReservation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PurchaseHostReservationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPurchaseHostReservationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPurchaseReservedInstancesOffering struct { -} - -func (*validateOpPurchaseReservedInstancesOffering) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPurchaseReservedInstancesOffering) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PurchaseReservedInstancesOfferingInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPurchaseReservedInstancesOfferingInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPurchaseScheduledInstances struct { -} - -func (*validateOpPurchaseScheduledInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPurchaseScheduledInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PurchaseScheduledInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPurchaseScheduledInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRebootInstances struct { -} - -func (*validateOpRebootInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRebootInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RebootInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRebootInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRegisterImage struct { -} - -func (*validateOpRegisterImage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRegisterImage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RegisterImageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRegisterImageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRegisterInstanceEventNotificationAttributes struct { -} - -func (*validateOpRegisterInstanceEventNotificationAttributes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRegisterInstanceEventNotificationAttributes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RegisterInstanceEventNotificationAttributesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRegisterInstanceEventNotificationAttributesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRegisterTransitGatewayMulticastGroupMembers struct { -} - -func (*validateOpRegisterTransitGatewayMulticastGroupMembers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRegisterTransitGatewayMulticastGroupMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RegisterTransitGatewayMulticastGroupMembersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRegisterTransitGatewayMulticastGroupMembersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRegisterTransitGatewayMulticastGroupSources struct { -} - -func (*validateOpRegisterTransitGatewayMulticastGroupSources) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRegisterTransitGatewayMulticastGroupSources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RegisterTransitGatewayMulticastGroupSourcesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRegisterTransitGatewayMulticastGroupSourcesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRejectTransitGatewayPeeringAttachment struct { -} - -func (*validateOpRejectTransitGatewayPeeringAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRejectTransitGatewayPeeringAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RejectTransitGatewayPeeringAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRejectTransitGatewayPeeringAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRejectTransitGatewayVpcAttachment struct { -} - -func (*validateOpRejectTransitGatewayVpcAttachment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRejectTransitGatewayVpcAttachment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RejectTransitGatewayVpcAttachmentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRejectTransitGatewayVpcAttachmentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRejectVpcEndpointConnections struct { -} - -func (*validateOpRejectVpcEndpointConnections) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRejectVpcEndpointConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RejectVpcEndpointConnectionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRejectVpcEndpointConnectionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRejectVpcPeeringConnection struct { -} - -func (*validateOpRejectVpcPeeringConnection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRejectVpcPeeringConnection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RejectVpcPeeringConnectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRejectVpcPeeringConnectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReleaseHosts struct { -} - -func (*validateOpReleaseHosts) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReleaseHosts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReleaseHostsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReleaseHostsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReleaseIpamPoolAllocation struct { -} - -func (*validateOpReleaseIpamPoolAllocation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReleaseIpamPoolAllocation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReleaseIpamPoolAllocationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReleaseIpamPoolAllocationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceIamInstanceProfileAssociation struct { -} - -func (*validateOpReplaceIamInstanceProfileAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceIamInstanceProfileAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceIamInstanceProfileAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceIamInstanceProfileAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceNetworkAclAssociation struct { -} - -func (*validateOpReplaceNetworkAclAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceNetworkAclAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceNetworkAclAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceNetworkAclAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceNetworkAclEntry struct { -} - -func (*validateOpReplaceNetworkAclEntry) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceNetworkAclEntry) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceNetworkAclEntryInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceNetworkAclEntryInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceRoute struct { -} - -func (*validateOpReplaceRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceRouteTableAssociation struct { -} - -func (*validateOpReplaceRouteTableAssociation) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceRouteTableAssociation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceRouteTableAssociationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceRouteTableAssociationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceTransitGatewayRoute struct { -} - -func (*validateOpReplaceTransitGatewayRoute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceTransitGatewayRoute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceTransitGatewayRouteInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceTransitGatewayRouteInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplaceVpnTunnel struct { -} - -func (*validateOpReplaceVpnTunnel) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplaceVpnTunnel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplaceVpnTunnelInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplaceVpnTunnelInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReportInstanceStatus struct { -} - -func (*validateOpReportInstanceStatus) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReportInstanceStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReportInstanceStatusInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReportInstanceStatusInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRequestSpotFleet struct { -} - -func (*validateOpRequestSpotFleet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRequestSpotFleet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RequestSpotFleetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRequestSpotFleetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRequestSpotInstances struct { -} - -func (*validateOpRequestSpotInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRequestSpotInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RequestSpotInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRequestSpotInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetAddressAttribute struct { -} - -func (*validateOpResetAddressAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetAddressAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetAddressAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetAddressAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetFpgaImageAttribute struct { -} - -func (*validateOpResetFpgaImageAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetFpgaImageAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetFpgaImageAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetFpgaImageAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetImageAttribute struct { -} - -func (*validateOpResetImageAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetImageAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetImageAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetImageAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetInstanceAttribute struct { -} - -func (*validateOpResetInstanceAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetInstanceAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetInstanceAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetInstanceAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetNetworkInterfaceAttribute struct { -} - -func (*validateOpResetNetworkInterfaceAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetNetworkInterfaceAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetNetworkInterfaceAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetNetworkInterfaceAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetSnapshotAttribute struct { -} - -func (*validateOpResetSnapshotAttribute) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetSnapshotAttribute) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetSnapshotAttributeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetSnapshotAttributeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestoreAddressToClassic struct { -} - -func (*validateOpRestoreAddressToClassic) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestoreAddressToClassic) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestoreAddressToClassicInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestoreAddressToClassicInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestoreImageFromRecycleBin struct { -} - -func (*validateOpRestoreImageFromRecycleBin) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestoreImageFromRecycleBin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestoreImageFromRecycleBinInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestoreImageFromRecycleBinInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestoreManagedPrefixListVersion struct { -} - -func (*validateOpRestoreManagedPrefixListVersion) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestoreManagedPrefixListVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestoreManagedPrefixListVersionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestoreManagedPrefixListVersionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestoreSnapshotFromRecycleBin struct { -} - -func (*validateOpRestoreSnapshotFromRecycleBin) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestoreSnapshotFromRecycleBin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestoreSnapshotFromRecycleBinInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestoreSnapshotFromRecycleBinInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestoreSnapshotTier struct { -} - -func (*validateOpRestoreSnapshotTier) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestoreSnapshotTier) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestoreSnapshotTierInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestoreSnapshotTierInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRevokeClientVpnIngress struct { -} - -func (*validateOpRevokeClientVpnIngress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRevokeClientVpnIngress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RevokeClientVpnIngressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRevokeClientVpnIngressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRevokeSecurityGroupEgress struct { -} - -func (*validateOpRevokeSecurityGroupEgress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRevokeSecurityGroupEgress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RevokeSecurityGroupEgressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRevokeSecurityGroupEgressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRunInstances struct { -} - -func (*validateOpRunInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRunInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RunInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRunInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRunScheduledInstances struct { -} - -func (*validateOpRunScheduledInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRunScheduledInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RunScheduledInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRunScheduledInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpSearchLocalGatewayRoutes struct { -} - -func (*validateOpSearchLocalGatewayRoutes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpSearchLocalGatewayRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*SearchLocalGatewayRoutesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpSearchLocalGatewayRoutesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpSearchTransitGatewayMulticastGroups struct { -} - -func (*validateOpSearchTransitGatewayMulticastGroups) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpSearchTransitGatewayMulticastGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*SearchTransitGatewayMulticastGroupsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpSearchTransitGatewayMulticastGroupsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpSearchTransitGatewayRoutes struct { -} - -func (*validateOpSearchTransitGatewayRoutes) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpSearchTransitGatewayRoutes) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*SearchTransitGatewayRoutesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpSearchTransitGatewayRoutesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpSendDiagnosticInterrupt struct { -} - -func (*validateOpSendDiagnosticInterrupt) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpSendDiagnosticInterrupt) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*SendDiagnosticInterruptInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpSendDiagnosticInterruptInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartInstances struct { -} - -func (*validateOpStartInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartNetworkInsightsAccessScopeAnalysis struct { -} - -func (*validateOpStartNetworkInsightsAccessScopeAnalysis) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartNetworkInsightsAccessScopeAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartNetworkInsightsAccessScopeAnalysisInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartNetworkInsightsAccessScopeAnalysisInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartNetworkInsightsAnalysis struct { -} - -func (*validateOpStartNetworkInsightsAnalysis) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartNetworkInsightsAnalysis) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartNetworkInsightsAnalysisInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartNetworkInsightsAnalysisInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartVpcEndpointServicePrivateDnsVerification struct { -} - -func (*validateOpStartVpcEndpointServicePrivateDnsVerification) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartVpcEndpointServicePrivateDnsVerification) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartVpcEndpointServicePrivateDnsVerificationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartVpcEndpointServicePrivateDnsVerificationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStopInstances struct { -} - -func (*validateOpStopInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStopInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StopInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStopInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTerminateClientVpnConnections struct { -} - -func (*validateOpTerminateClientVpnConnections) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTerminateClientVpnConnections) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TerminateClientVpnConnectionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTerminateClientVpnConnectionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTerminateInstances struct { -} - -func (*validateOpTerminateInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTerminateInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TerminateInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTerminateInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUnassignIpv6Addresses struct { -} - -func (*validateOpUnassignIpv6Addresses) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUnassignIpv6Addresses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UnassignIpv6AddressesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUnassignIpv6AddressesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUnassignPrivateIpAddresses struct { -} - -func (*validateOpUnassignPrivateIpAddresses) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUnassignPrivateIpAddresses) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UnassignPrivateIpAddressesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUnassignPrivateIpAddressesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUnassignPrivateNatGatewayAddress struct { -} - -func (*validateOpUnassignPrivateNatGatewayAddress) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUnassignPrivateNatGatewayAddress) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UnassignPrivateNatGatewayAddressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUnassignPrivateNatGatewayAddressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUnlockSnapshot struct { -} - -func (*validateOpUnlockSnapshot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUnlockSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UnlockSnapshotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUnlockSnapshotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUnmonitorInstances struct { -} - -func (*validateOpUnmonitorInstances) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUnmonitorInstances) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UnmonitorInstancesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUnmonitorInstancesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpWithdrawByoipCidr struct { -} - -func (*validateOpWithdrawByoipCidr) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpWithdrawByoipCidr) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*WithdrawByoipCidrInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpWithdrawByoipCidrInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpAcceptAddressTransferValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptAddressTransfer{}, middleware.After) -} - -func addOpAcceptReservedInstancesExchangeQuoteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptReservedInstancesExchangeQuote{}, middleware.After) -} - -func addOpAcceptTransitGatewayPeeringAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptTransitGatewayPeeringAttachment{}, middleware.After) -} - -func addOpAcceptTransitGatewayVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptTransitGatewayVpcAttachment{}, middleware.After) -} - -func addOpAcceptVpcEndpointConnectionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptVpcEndpointConnections{}, middleware.After) -} - -func addOpAcceptVpcPeeringConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAcceptVpcPeeringConnection{}, middleware.After) -} - -func addOpAdvertiseByoipCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAdvertiseByoipCidr{}, middleware.After) -} - -func addOpAllocateHostsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAllocateHosts{}, middleware.After) -} - -func addOpAllocateIpamPoolCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAllocateIpamPoolCidr{}, middleware.After) -} - -func addOpApplySecurityGroupsToClientVpnTargetNetworkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpApplySecurityGroupsToClientVpnTargetNetwork{}, middleware.After) -} - -func addOpAssignIpv6AddressesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssignIpv6Addresses{}, middleware.After) -} - -func addOpAssignPrivateIpAddressesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssignPrivateIpAddresses{}, middleware.After) -} - -func addOpAssignPrivateNatGatewayAddressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssignPrivateNatGatewayAddress{}, middleware.After) -} - -func addOpAssociateClientVpnTargetNetworkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateClientVpnTargetNetwork{}, middleware.After) -} - -func addOpAssociateDhcpOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateDhcpOptions{}, middleware.After) -} - -func addOpAssociateEnclaveCertificateIamRoleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateEnclaveCertificateIamRole{}, middleware.After) -} - -func addOpAssociateIamInstanceProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateIamInstanceProfile{}, middleware.After) -} - -func addOpAssociateInstanceEventWindowValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateInstanceEventWindow{}, middleware.After) -} - -func addOpAssociateIpamByoasnValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateIpamByoasn{}, middleware.After) -} - -func addOpAssociateIpamResourceDiscoveryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateIpamResourceDiscovery{}, middleware.After) -} - -func addOpAssociateNatGatewayAddressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateNatGatewayAddress{}, middleware.After) -} - -func addOpAssociateRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateRouteTable{}, middleware.After) -} - -func addOpAssociateSubnetCidrBlockValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateSubnetCidrBlock{}, middleware.After) -} - -func addOpAssociateTransitGatewayMulticastDomainValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateTransitGatewayMulticastDomain{}, middleware.After) -} - -func addOpAssociateTransitGatewayPolicyTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateTransitGatewayPolicyTable{}, middleware.After) -} - -func addOpAssociateTransitGatewayRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateTransitGatewayRouteTable{}, middleware.After) -} - -func addOpAssociateTrunkInterfaceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateTrunkInterface{}, middleware.After) -} - -func addOpAssociateVpcCidrBlockValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateVpcCidrBlock{}, middleware.After) -} - -func addOpAttachClassicLinkVpcValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAttachClassicLinkVpc{}, middleware.After) -} - -func addOpAttachInternetGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAttachInternetGateway{}, middleware.After) -} - -func addOpAttachNetworkInterfaceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAttachNetworkInterface{}, middleware.After) -} - -func addOpAttachVerifiedAccessTrustProviderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAttachVerifiedAccessTrustProvider{}, middleware.After) -} - -func addOpAttachVolumeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAttachVolume{}, middleware.After) -} - -func addOpAttachVpnGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAttachVpnGateway{}, middleware.After) -} - -func addOpAuthorizeClientVpnIngressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAuthorizeClientVpnIngress{}, middleware.After) -} - -func addOpAuthorizeSecurityGroupEgressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAuthorizeSecurityGroupEgress{}, middleware.After) -} - -func addOpBundleInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBundleInstance{}, middleware.After) -} - -func addOpCancelBundleTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelBundleTask{}, middleware.After) -} - -func addOpCancelCapacityReservationFleetsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelCapacityReservationFleets{}, middleware.After) -} - -func addOpCancelCapacityReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelCapacityReservation{}, middleware.After) -} - -func addOpCancelConversionTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelConversionTask{}, middleware.After) -} - -func addOpCancelExportTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelExportTask{}, middleware.After) -} - -func addOpCancelImageLaunchPermissionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelImageLaunchPermission{}, middleware.After) -} - -func addOpCancelReservedInstancesListingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelReservedInstancesListing{}, middleware.After) -} - -func addOpCancelSpotFleetRequestsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelSpotFleetRequests{}, middleware.After) -} - -func addOpCancelSpotInstanceRequestsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelSpotInstanceRequests{}, middleware.After) -} - -func addOpConfirmProductInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpConfirmProductInstance{}, middleware.After) -} - -func addOpCopyFpgaImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCopyFpgaImage{}, middleware.After) -} - -func addOpCopyImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCopyImage{}, middleware.After) -} - -func addOpCopySnapshotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCopySnapshot{}, middleware.After) -} - -func addOpCreateCapacityReservationFleetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCapacityReservationFleet{}, middleware.After) -} - -func addOpCreateCapacityReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCapacityReservation{}, middleware.After) -} - -func addOpCreateCarrierGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCarrierGateway{}, middleware.After) -} - -func addOpCreateClientVpnEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateClientVpnEndpoint{}, middleware.After) -} - -func addOpCreateClientVpnRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateClientVpnRoute{}, middleware.After) -} - -func addOpCreateCoipCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCoipCidr{}, middleware.After) -} - -func addOpCreateCoipPoolValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCoipPool{}, middleware.After) -} - -func addOpCreateCustomerGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCustomerGateway{}, middleware.After) -} - -func addOpCreateDefaultSubnetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateDefaultSubnet{}, middleware.After) -} - -func addOpCreateDhcpOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateDhcpOptions{}, middleware.After) -} - -func addOpCreateEgressOnlyInternetGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateEgressOnlyInternetGateway{}, middleware.After) -} - -func addOpCreateFleetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateFleet{}, middleware.After) -} - -func addOpCreateFlowLogsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateFlowLogs{}, middleware.After) -} - -func addOpCreateFpgaImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateFpgaImage{}, middleware.After) -} - -func addOpCreateImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateImage{}, middleware.After) -} - -func addOpCreateInstanceConnectEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateInstanceConnectEndpoint{}, middleware.After) -} - -func addOpCreateInstanceExportTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateInstanceExportTask{}, middleware.After) -} - -func addOpCreateIpamPoolValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateIpamPool{}, middleware.After) -} - -func addOpCreateIpamScopeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateIpamScope{}, middleware.After) -} - -func addOpCreateKeyPairValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateKeyPair{}, middleware.After) -} - -func addOpCreateLaunchTemplateValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLaunchTemplate{}, middleware.After) -} - -func addOpCreateLaunchTemplateVersionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLaunchTemplateVersion{}, middleware.After) -} - -func addOpCreateLocalGatewayRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLocalGatewayRoute{}, middleware.After) -} - -func addOpCreateLocalGatewayRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLocalGatewayRouteTable{}, middleware.After) -} - -func addOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation{}, middleware.After) -} - -func addOpCreateLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateLocalGatewayRouteTableVpcAssociation{}, middleware.After) -} - -func addOpCreateManagedPrefixListValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateManagedPrefixList{}, middleware.After) -} - -func addOpCreateNatGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNatGateway{}, middleware.After) -} - -func addOpCreateNetworkAclEntryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNetworkAclEntry{}, middleware.After) -} - -func addOpCreateNetworkAclValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNetworkAcl{}, middleware.After) -} - -func addOpCreateNetworkInsightsAccessScopeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNetworkInsightsAccessScope{}, middleware.After) -} - -func addOpCreateNetworkInsightsPathValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNetworkInsightsPath{}, middleware.After) -} - -func addOpCreateNetworkInterfaceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNetworkInterface{}, middleware.After) -} - -func addOpCreateNetworkInterfacePermissionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateNetworkInterfacePermission{}, middleware.After) -} - -func addOpCreateReplaceRootVolumeTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateReplaceRootVolumeTask{}, middleware.After) -} - -func addOpCreateReservedInstancesListingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateReservedInstancesListing{}, middleware.After) -} - -func addOpCreateRestoreImageTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateRestoreImageTask{}, middleware.After) -} - -func addOpCreateRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateRoute{}, middleware.After) -} - -func addOpCreateRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateRouteTable{}, middleware.After) -} - -func addOpCreateSecurityGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSecurityGroup{}, middleware.After) -} - -func addOpCreateSnapshotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSnapshot{}, middleware.After) -} - -func addOpCreateSnapshotsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSnapshots{}, middleware.After) -} - -func addOpCreateSpotDatafeedSubscriptionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSpotDatafeedSubscription{}, middleware.After) -} - -func addOpCreateStoreImageTaskValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateStoreImageTask{}, middleware.After) -} - -func addOpCreateSubnetCidrReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSubnetCidrReservation{}, middleware.After) -} - -func addOpCreateSubnetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSubnet{}, middleware.After) -} - -func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After) -} - -func addOpCreateTrafficMirrorFilterRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTrafficMirrorFilterRule{}, middleware.After) -} - -func addOpCreateTrafficMirrorSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTrafficMirrorSession{}, middleware.After) -} - -func addOpCreateTransitGatewayConnectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayConnect{}, middleware.After) -} - -func addOpCreateTransitGatewayConnectPeerValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayConnectPeer{}, middleware.After) -} - -func addOpCreateTransitGatewayMulticastDomainValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayMulticastDomain{}, middleware.After) -} - -func addOpCreateTransitGatewayPeeringAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayPeeringAttachment{}, middleware.After) -} - -func addOpCreateTransitGatewayPolicyTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayPolicyTable{}, middleware.After) -} - -func addOpCreateTransitGatewayPrefixListReferenceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayPrefixListReference{}, middleware.After) -} - -func addOpCreateTransitGatewayRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayRoute{}, middleware.After) -} - -func addOpCreateTransitGatewayRouteTableAnnouncementValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayRouteTableAnnouncement{}, middleware.After) -} - -func addOpCreateTransitGatewayRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayRouteTable{}, middleware.After) -} - -func addOpCreateTransitGatewayVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTransitGatewayVpcAttachment{}, middleware.After) -} - -func addOpCreateVerifiedAccessEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVerifiedAccessEndpoint{}, middleware.After) -} - -func addOpCreateVerifiedAccessGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVerifiedAccessGroup{}, middleware.After) -} - -func addOpCreateVerifiedAccessTrustProviderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVerifiedAccessTrustProvider{}, middleware.After) -} - -func addOpCreateVolumeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVolume{}, middleware.After) -} - -func addOpCreateVpcEndpointConnectionNotificationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVpcEndpointConnectionNotification{}, middleware.After) -} - -func addOpCreateVpcEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVpcEndpoint{}, middleware.After) -} - -func addOpCreateVpcPeeringConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVpcPeeringConnection{}, middleware.After) -} - -func addOpCreateVpnConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVpnConnection{}, middleware.After) -} - -func addOpCreateVpnConnectionRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVpnConnectionRoute{}, middleware.After) -} - -func addOpCreateVpnGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVpnGateway{}, middleware.After) -} - -func addOpDeleteCarrierGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteCarrierGateway{}, middleware.After) -} - -func addOpDeleteClientVpnEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteClientVpnEndpoint{}, middleware.After) -} - -func addOpDeleteClientVpnRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteClientVpnRoute{}, middleware.After) -} - -func addOpDeleteCoipCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteCoipCidr{}, middleware.After) -} - -func addOpDeleteCoipPoolValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteCoipPool{}, middleware.After) -} - -func addOpDeleteCustomerGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteCustomerGateway{}, middleware.After) -} - -func addOpDeleteDhcpOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteDhcpOptions{}, middleware.After) -} - -func addOpDeleteEgressOnlyInternetGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteEgressOnlyInternetGateway{}, middleware.After) -} - -func addOpDeleteFleetsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteFleets{}, middleware.After) -} - -func addOpDeleteFlowLogsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteFlowLogs{}, middleware.After) -} - -func addOpDeleteFpgaImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteFpgaImage{}, middleware.After) -} - -func addOpDeleteInstanceConnectEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteInstanceConnectEndpoint{}, middleware.After) -} - -func addOpDeleteInstanceEventWindowValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteInstanceEventWindow{}, middleware.After) -} - -func addOpDeleteInternetGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteInternetGateway{}, middleware.After) -} - -func addOpDeleteIpamValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteIpam{}, middleware.After) -} - -func addOpDeleteIpamPoolValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteIpamPool{}, middleware.After) -} - -func addOpDeleteIpamResourceDiscoveryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteIpamResourceDiscovery{}, middleware.After) -} - -func addOpDeleteIpamScopeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteIpamScope{}, middleware.After) -} - -func addOpDeleteLaunchTemplateVersionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLaunchTemplateVersions{}, middleware.After) -} - -func addOpDeleteLocalGatewayRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLocalGatewayRoute{}, middleware.After) -} - -func addOpDeleteLocalGatewayRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLocalGatewayRouteTable{}, middleware.After) -} - -func addOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociation{}, middleware.After) -} - -func addOpDeleteLocalGatewayRouteTableVpcAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteLocalGatewayRouteTableVpcAssociation{}, middleware.After) -} - -func addOpDeleteManagedPrefixListValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteManagedPrefixList{}, middleware.After) -} - -func addOpDeleteNatGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNatGateway{}, middleware.After) -} - -func addOpDeleteNetworkAclEntryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkAclEntry{}, middleware.After) -} - -func addOpDeleteNetworkAclValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkAcl{}, middleware.After) -} - -func addOpDeleteNetworkInsightsAccessScopeAnalysisValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkInsightsAccessScopeAnalysis{}, middleware.After) -} - -func addOpDeleteNetworkInsightsAccessScopeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkInsightsAccessScope{}, middleware.After) -} - -func addOpDeleteNetworkInsightsAnalysisValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkInsightsAnalysis{}, middleware.After) -} - -func addOpDeleteNetworkInsightsPathValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkInsightsPath{}, middleware.After) -} - -func addOpDeleteNetworkInterfaceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkInterface{}, middleware.After) -} - -func addOpDeleteNetworkInterfacePermissionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteNetworkInterfacePermission{}, middleware.After) -} - -func addOpDeletePlacementGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeletePlacementGroup{}, middleware.After) -} - -func addOpDeletePublicIpv4PoolValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeletePublicIpv4Pool{}, middleware.After) -} - -func addOpDeleteQueuedReservedInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteQueuedReservedInstances{}, middleware.After) -} - -func addOpDeleteRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteRoute{}, middleware.After) -} - -func addOpDeleteRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteRouteTable{}, middleware.After) -} - -func addOpDeleteSnapshotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSnapshot{}, middleware.After) -} - -func addOpDeleteSubnetCidrReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSubnetCidrReservation{}, middleware.After) -} - -func addOpDeleteSubnetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSubnet{}, middleware.After) -} - -func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After) -} - -func addOpDeleteTrafficMirrorFilterValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTrafficMirrorFilter{}, middleware.After) -} - -func addOpDeleteTrafficMirrorFilterRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTrafficMirrorFilterRule{}, middleware.After) -} - -func addOpDeleteTrafficMirrorSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTrafficMirrorSession{}, middleware.After) -} - -func addOpDeleteTrafficMirrorTargetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTrafficMirrorTarget{}, middleware.After) -} - -func addOpDeleteTransitGatewayConnectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayConnect{}, middleware.After) -} - -func addOpDeleteTransitGatewayConnectPeerValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayConnectPeer{}, middleware.After) -} - -func addOpDeleteTransitGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGateway{}, middleware.After) -} - -func addOpDeleteTransitGatewayMulticastDomainValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayMulticastDomain{}, middleware.After) -} - -func addOpDeleteTransitGatewayPeeringAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayPeeringAttachment{}, middleware.After) -} - -func addOpDeleteTransitGatewayPolicyTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayPolicyTable{}, middleware.After) -} - -func addOpDeleteTransitGatewayPrefixListReferenceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayPrefixListReference{}, middleware.After) -} - -func addOpDeleteTransitGatewayRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayRoute{}, middleware.After) -} - -func addOpDeleteTransitGatewayRouteTableAnnouncementValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayRouteTableAnnouncement{}, middleware.After) -} - -func addOpDeleteTransitGatewayRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayRouteTable{}, middleware.After) -} - -func addOpDeleteTransitGatewayVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTransitGatewayVpcAttachment{}, middleware.After) -} - -func addOpDeleteVerifiedAccessEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVerifiedAccessEndpoint{}, middleware.After) -} - -func addOpDeleteVerifiedAccessGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVerifiedAccessGroup{}, middleware.After) -} - -func addOpDeleteVerifiedAccessInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVerifiedAccessInstance{}, middleware.After) -} - -func addOpDeleteVerifiedAccessTrustProviderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVerifiedAccessTrustProvider{}, middleware.After) -} - -func addOpDeleteVolumeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVolume{}, middleware.After) -} - -func addOpDeleteVpcEndpointConnectionNotificationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpcEndpointConnectionNotifications{}, middleware.After) -} - -func addOpDeleteVpcEndpointServiceConfigurationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpcEndpointServiceConfigurations{}, middleware.After) -} - -func addOpDeleteVpcEndpointsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpcEndpoints{}, middleware.After) -} - -func addOpDeleteVpcValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpc{}, middleware.After) -} - -func addOpDeleteVpcPeeringConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpcPeeringConnection{}, middleware.After) -} - -func addOpDeleteVpnConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpnConnection{}, middleware.After) -} - -func addOpDeleteVpnConnectionRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpnConnectionRoute{}, middleware.After) -} - -func addOpDeleteVpnGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVpnGateway{}, middleware.After) -} - -func addOpDeprovisionByoipCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeprovisionByoipCidr{}, middleware.After) -} - -func addOpDeprovisionIpamByoasnValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeprovisionIpamByoasn{}, middleware.After) -} - -func addOpDeprovisionIpamPoolCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeprovisionIpamPoolCidr{}, middleware.After) -} - -func addOpDeprovisionPublicIpv4PoolCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeprovisionPublicIpv4PoolCidr{}, middleware.After) -} - -func addOpDeregisterImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeregisterImage{}, middleware.After) -} - -func addOpDeregisterInstanceEventNotificationAttributesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeregisterInstanceEventNotificationAttributes{}, middleware.After) -} - -func addOpDescribeByoipCidrsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeByoipCidrs{}, middleware.After) -} - -func addOpDescribeCapacityBlockOfferingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeCapacityBlockOfferings{}, middleware.After) -} - -func addOpDescribeClientVpnAuthorizationRulesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeClientVpnAuthorizationRules{}, middleware.After) -} - -func addOpDescribeClientVpnConnectionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeClientVpnConnections{}, middleware.After) -} - -func addOpDescribeClientVpnRoutesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeClientVpnRoutes{}, middleware.After) -} - -func addOpDescribeClientVpnTargetNetworksValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeClientVpnTargetNetworks{}, middleware.After) -} - -func addOpDescribeFleetHistoryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeFleetHistory{}, middleware.After) -} - -func addOpDescribeFleetInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeFleetInstances{}, middleware.After) -} - -func addOpDescribeFpgaImageAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeFpgaImageAttribute{}, middleware.After) -} - -func addOpDescribeIdentityIdFormatValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeIdentityIdFormat{}, middleware.After) -} - -func addOpDescribeImageAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeImageAttribute{}, middleware.After) -} - -func addOpDescribeInstanceAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeInstanceAttribute{}, middleware.After) -} - -func addOpDescribeNetworkInterfaceAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeNetworkInterfaceAttribute{}, middleware.After) -} - -func addOpDescribeScheduledInstanceAvailabilityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeScheduledInstanceAvailability{}, middleware.After) -} - -func addOpDescribeSecurityGroupReferencesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeSecurityGroupReferences{}, middleware.After) -} - -func addOpDescribeSnapshotAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeSnapshotAttribute{}, middleware.After) -} - -func addOpDescribeSpotFleetInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeSpotFleetInstances{}, middleware.After) -} - -func addOpDescribeSpotFleetRequestHistoryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeSpotFleetRequestHistory{}, middleware.After) -} - -func addOpDescribeStaleSecurityGroupsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeStaleSecurityGroups{}, middleware.After) -} - -func addOpDescribeVolumeAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeVolumeAttribute{}, middleware.After) -} - -func addOpDescribeVpcAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeVpcAttribute{}, middleware.After) -} - -func addOpDescribeVpcEndpointServicePermissionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeVpcEndpointServicePermissions{}, middleware.After) -} - -func addOpDetachClassicLinkVpcValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDetachClassicLinkVpc{}, middleware.After) -} - -func addOpDetachInternetGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDetachInternetGateway{}, middleware.After) -} - -func addOpDetachNetworkInterfaceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDetachNetworkInterface{}, middleware.After) -} - -func addOpDetachVerifiedAccessTrustProviderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDetachVerifiedAccessTrustProvider{}, middleware.After) -} - -func addOpDetachVolumeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDetachVolume{}, middleware.After) -} - -func addOpDetachVpnGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDetachVpnGateway{}, middleware.After) -} - -func addOpDisableAddressTransferValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableAddressTransfer{}, middleware.After) -} - -func addOpDisableFastLaunchValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableFastLaunch{}, middleware.After) -} - -func addOpDisableFastSnapshotRestoresValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableFastSnapshotRestores{}, middleware.After) -} - -func addOpDisableImageDeprecationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableImageDeprecation{}, middleware.After) -} - -func addOpDisableImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableImage{}, middleware.After) -} - -func addOpDisableIpamOrganizationAdminAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableIpamOrganizationAdminAccount{}, middleware.After) -} - -func addOpDisableTransitGatewayRouteTablePropagationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableTransitGatewayRouteTablePropagation{}, middleware.After) -} - -func addOpDisableVgwRoutePropagationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableVgwRoutePropagation{}, middleware.After) -} - -func addOpDisableVpcClassicLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableVpcClassicLink{}, middleware.After) -} - -func addOpDisassociateClientVpnTargetNetworkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateClientVpnTargetNetwork{}, middleware.After) -} - -func addOpDisassociateEnclaveCertificateIamRoleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateEnclaveCertificateIamRole{}, middleware.After) -} - -func addOpDisassociateIamInstanceProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateIamInstanceProfile{}, middleware.After) -} - -func addOpDisassociateInstanceEventWindowValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateInstanceEventWindow{}, middleware.After) -} - -func addOpDisassociateIpamByoasnValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateIpamByoasn{}, middleware.After) -} - -func addOpDisassociateIpamResourceDiscoveryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateIpamResourceDiscovery{}, middleware.After) -} - -func addOpDisassociateNatGatewayAddressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateNatGatewayAddress{}, middleware.After) -} - -func addOpDisassociateRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateRouteTable{}, middleware.After) -} - -func addOpDisassociateSubnetCidrBlockValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateSubnetCidrBlock{}, middleware.After) -} - -func addOpDisassociateTransitGatewayMulticastDomainValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateTransitGatewayMulticastDomain{}, middleware.After) -} - -func addOpDisassociateTransitGatewayPolicyTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateTransitGatewayPolicyTable{}, middleware.After) -} - -func addOpDisassociateTransitGatewayRouteTableValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateTransitGatewayRouteTable{}, middleware.After) -} - -func addOpDisassociateTrunkInterfaceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateTrunkInterface{}, middleware.After) -} - -func addOpDisassociateVpcCidrBlockValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateVpcCidrBlock{}, middleware.After) -} - -func addOpEnableAddressTransferValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableAddressTransfer{}, middleware.After) -} - -func addOpEnableFastLaunchValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableFastLaunch{}, middleware.After) -} - -func addOpEnableFastSnapshotRestoresValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableFastSnapshotRestores{}, middleware.After) -} - -func addOpEnableImageBlockPublicAccessValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableImageBlockPublicAccess{}, middleware.After) -} - -func addOpEnableImageDeprecationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableImageDeprecation{}, middleware.After) -} - -func addOpEnableImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableImage{}, middleware.After) -} - -func addOpEnableIpamOrganizationAdminAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableIpamOrganizationAdminAccount{}, middleware.After) -} - -func addOpEnableSnapshotBlockPublicAccessValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableSnapshotBlockPublicAccess{}, middleware.After) -} - -func addOpEnableTransitGatewayRouteTablePropagationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableTransitGatewayRouteTablePropagation{}, middleware.After) -} - -func addOpEnableVgwRoutePropagationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableVgwRoutePropagation{}, middleware.After) -} - -func addOpEnableVolumeIOValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableVolumeIO{}, middleware.After) -} - -func addOpEnableVpcClassicLinkValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableVpcClassicLink{}, middleware.After) -} - -func addOpExportClientVpnClientCertificateRevocationListValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpExportClientVpnClientCertificateRevocationList{}, middleware.After) -} - -func addOpExportClientVpnClientConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpExportClientVpnClientConfiguration{}, middleware.After) -} - -func addOpExportImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpExportImage{}, middleware.After) -} - -func addOpExportTransitGatewayRoutesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpExportTransitGatewayRoutes{}, middleware.After) -} - -func addOpGetAssociatedEnclaveCertificateIamRolesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAssociatedEnclaveCertificateIamRoles{}, middleware.After) -} - -func addOpGetAssociatedIpv6PoolCidrsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAssociatedIpv6PoolCidrs{}, middleware.After) -} - -func addOpGetCapacityReservationUsageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetCapacityReservationUsage{}, middleware.After) -} - -func addOpGetCoipPoolUsageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetCoipPoolUsage{}, middleware.After) -} - -func addOpGetConsoleOutputValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetConsoleOutput{}, middleware.After) -} - -func addOpGetConsoleScreenshotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetConsoleScreenshot{}, middleware.After) -} - -func addOpGetDefaultCreditSpecificationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetDefaultCreditSpecification{}, middleware.After) -} - -func addOpGetFlowLogsIntegrationTemplateValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetFlowLogsIntegrationTemplate{}, middleware.After) -} - -func addOpGetGroupsForCapacityReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetGroupsForCapacityReservation{}, middleware.After) -} - -func addOpGetHostReservationPurchasePreviewValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetHostReservationPurchasePreview{}, middleware.After) -} - -func addOpGetInstanceTypesFromInstanceRequirementsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetInstanceTypesFromInstanceRequirements{}, middleware.After) -} - -func addOpGetInstanceUefiDataValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetInstanceUefiData{}, middleware.After) -} - -func addOpGetIpamAddressHistoryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamAddressHistory{}, middleware.After) -} - -func addOpGetIpamDiscoveredAccountsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamDiscoveredAccounts{}, middleware.After) -} - -func addOpGetIpamDiscoveredPublicAddressesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamDiscoveredPublicAddresses{}, middleware.After) -} - -func addOpGetIpamDiscoveredResourceCidrsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamDiscoveredResourceCidrs{}, middleware.After) -} - -func addOpGetIpamPoolAllocationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamPoolAllocations{}, middleware.After) -} - -func addOpGetIpamPoolCidrsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamPoolCidrs{}, middleware.After) -} - -func addOpGetIpamResourceCidrsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetIpamResourceCidrs{}, middleware.After) -} - -func addOpGetLaunchTemplateDataValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetLaunchTemplateData{}, middleware.After) -} - -func addOpGetManagedPrefixListAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetManagedPrefixListAssociations{}, middleware.After) -} - -func addOpGetManagedPrefixListEntriesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetManagedPrefixListEntries{}, middleware.After) -} - -func addOpGetNetworkInsightsAccessScopeAnalysisFindingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkInsightsAccessScopeAnalysisFindings{}, middleware.After) -} - -func addOpGetNetworkInsightsAccessScopeContentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetNetworkInsightsAccessScopeContent{}, middleware.After) -} - -func addOpGetPasswordDataValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetPasswordData{}, middleware.After) -} - -func addOpGetReservedInstancesExchangeQuoteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetReservedInstancesExchangeQuote{}, middleware.After) -} - -func addOpGetSecurityGroupsForVpcValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSecurityGroupsForVpc{}, middleware.After) -} - -func addOpGetSpotPlacementScoresValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSpotPlacementScores{}, middleware.After) -} - -func addOpGetSubnetCidrReservationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSubnetCidrReservations{}, middleware.After) -} - -func addOpGetTransitGatewayAttachmentPropagationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayAttachmentPropagations{}, middleware.After) -} - -func addOpGetTransitGatewayMulticastDomainAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayMulticastDomainAssociations{}, middleware.After) -} - -func addOpGetTransitGatewayPolicyTableAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayPolicyTableAssociations{}, middleware.After) -} - -func addOpGetTransitGatewayPolicyTableEntriesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayPolicyTableEntries{}, middleware.After) -} - -func addOpGetTransitGatewayPrefixListReferencesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayPrefixListReferences{}, middleware.After) -} - -func addOpGetTransitGatewayRouteTableAssociationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayRouteTableAssociations{}, middleware.After) -} - -func addOpGetTransitGatewayRouteTablePropagationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTransitGatewayRouteTablePropagations{}, middleware.After) -} - -func addOpGetVerifiedAccessEndpointPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVerifiedAccessEndpointPolicy{}, middleware.After) -} - -func addOpGetVerifiedAccessGroupPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVerifiedAccessGroupPolicy{}, middleware.After) -} - -func addOpGetVpnConnectionDeviceSampleConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVpnConnectionDeviceSampleConfiguration{}, middleware.After) -} - -func addOpGetVpnTunnelReplacementStatusValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVpnTunnelReplacementStatus{}, middleware.After) -} - -func addOpImportClientVpnClientCertificateRevocationListValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpImportClientVpnClientCertificateRevocationList{}, middleware.After) -} - -func addOpImportInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpImportInstance{}, middleware.After) -} - -func addOpImportKeyPairValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpImportKeyPair{}, middleware.After) -} - -func addOpImportVolumeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpImportVolume{}, middleware.After) -} - -func addOpLockSnapshotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpLockSnapshot{}, middleware.After) -} - -func addOpModifyAddressAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyAddressAttribute{}, middleware.After) -} - -func addOpModifyAvailabilityZoneGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyAvailabilityZoneGroup{}, middleware.After) -} - -func addOpModifyCapacityReservationFleetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyCapacityReservationFleet{}, middleware.After) -} - -func addOpModifyCapacityReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyCapacityReservation{}, middleware.After) -} - -func addOpModifyClientVpnEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyClientVpnEndpoint{}, middleware.After) -} - -func addOpModifyDefaultCreditSpecificationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyDefaultCreditSpecification{}, middleware.After) -} - -func addOpModifyEbsDefaultKmsKeyIdValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyEbsDefaultKmsKeyId{}, middleware.After) -} - -func addOpModifyFleetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyFleet{}, middleware.After) -} - -func addOpModifyFpgaImageAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyFpgaImageAttribute{}, middleware.After) -} - -func addOpModifyHostsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyHosts{}, middleware.After) -} - -func addOpModifyIdentityIdFormatValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIdentityIdFormat{}, middleware.After) -} - -func addOpModifyIdFormatValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIdFormat{}, middleware.After) -} - -func addOpModifyImageAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyImageAttribute{}, middleware.After) -} - -func addOpModifyInstanceAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceAttribute{}, middleware.After) -} - -func addOpModifyInstanceCapacityReservationAttributesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceCapacityReservationAttributes{}, middleware.After) -} - -func addOpModifyInstanceCreditSpecificationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceCreditSpecification{}, middleware.After) -} - -func addOpModifyInstanceEventStartTimeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceEventStartTime{}, middleware.After) -} - -func addOpModifyInstanceEventWindowValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceEventWindow{}, middleware.After) -} - -func addOpModifyInstanceMaintenanceOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceMaintenanceOptions{}, middleware.After) -} - -func addOpModifyInstanceMetadataOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstanceMetadataOptions{}, middleware.After) -} - -func addOpModifyInstancePlacementValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyInstancePlacement{}, middleware.After) -} - -func addOpModifyIpamValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIpam{}, middleware.After) -} - -func addOpModifyIpamPoolValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIpamPool{}, middleware.After) -} - -func addOpModifyIpamResourceCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIpamResourceCidr{}, middleware.After) -} - -func addOpModifyIpamResourceDiscoveryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIpamResourceDiscovery{}, middleware.After) -} - -func addOpModifyIpamScopeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyIpamScope{}, middleware.After) -} - -func addOpModifyLocalGatewayRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyLocalGatewayRoute{}, middleware.After) -} - -func addOpModifyManagedPrefixListValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyManagedPrefixList{}, middleware.After) -} - -func addOpModifyNetworkInterfaceAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyNetworkInterfaceAttribute{}, middleware.After) -} - -func addOpModifyPrivateDnsNameOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyPrivateDnsNameOptions{}, middleware.After) -} - -func addOpModifyReservedInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyReservedInstances{}, middleware.After) -} - -func addOpModifySecurityGroupRulesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifySecurityGroupRules{}, middleware.After) -} - -func addOpModifySnapshotAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifySnapshotAttribute{}, middleware.After) -} - -func addOpModifySnapshotTierValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifySnapshotTier{}, middleware.After) -} - -func addOpModifySpotFleetRequestValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifySpotFleetRequest{}, middleware.After) -} - -func addOpModifySubnetAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifySubnetAttribute{}, middleware.After) -} - -func addOpModifyTrafficMirrorFilterNetworkServicesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyTrafficMirrorFilterNetworkServices{}, middleware.After) -} - -func addOpModifyTrafficMirrorFilterRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyTrafficMirrorFilterRule{}, middleware.After) -} - -func addOpModifyTrafficMirrorSessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyTrafficMirrorSession{}, middleware.After) -} - -func addOpModifyTransitGatewayValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyTransitGateway{}, middleware.After) -} - -func addOpModifyTransitGatewayPrefixListReferenceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyTransitGatewayPrefixListReference{}, middleware.After) -} - -func addOpModifyTransitGatewayVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyTransitGatewayVpcAttachment{}, middleware.After) -} - -func addOpModifyVerifiedAccessEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessEndpoint{}, middleware.After) -} - -func addOpModifyVerifiedAccessEndpointPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessEndpointPolicy{}, middleware.After) -} - -func addOpModifyVerifiedAccessGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessGroup{}, middleware.After) -} - -func addOpModifyVerifiedAccessGroupPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessGroupPolicy{}, middleware.After) -} - -func addOpModifyVerifiedAccessInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessInstance{}, middleware.After) -} - -func addOpModifyVerifiedAccessInstanceLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessInstanceLoggingConfiguration{}, middleware.After) -} - -func addOpModifyVerifiedAccessTrustProviderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVerifiedAccessTrustProvider{}, middleware.After) -} - -func addOpModifyVolumeAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVolumeAttribute{}, middleware.After) -} - -func addOpModifyVolumeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVolume{}, middleware.After) -} - -func addOpModifyVpcAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcAttribute{}, middleware.After) -} - -func addOpModifyVpcEndpointConnectionNotificationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcEndpointConnectionNotification{}, middleware.After) -} - -func addOpModifyVpcEndpointValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcEndpoint{}, middleware.After) -} - -func addOpModifyVpcEndpointServiceConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcEndpointServiceConfiguration{}, middleware.After) -} - -func addOpModifyVpcEndpointServicePayerResponsibilityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcEndpointServicePayerResponsibility{}, middleware.After) -} - -func addOpModifyVpcEndpointServicePermissionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcEndpointServicePermissions{}, middleware.After) -} - -func addOpModifyVpcPeeringConnectionOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcPeeringConnectionOptions{}, middleware.After) -} - -func addOpModifyVpcTenancyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpcTenancy{}, middleware.After) -} - -func addOpModifyVpnConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpnConnection{}, middleware.After) -} - -func addOpModifyVpnConnectionOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpnConnectionOptions{}, middleware.After) -} - -func addOpModifyVpnTunnelCertificateValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpnTunnelCertificate{}, middleware.After) -} - -func addOpModifyVpnTunnelOptionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpModifyVpnTunnelOptions{}, middleware.After) -} - -func addOpMonitorInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpMonitorInstances{}, middleware.After) -} - -func addOpMoveAddressToVpcValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpMoveAddressToVpc{}, middleware.After) -} - -func addOpMoveByoipCidrToIpamValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpMoveByoipCidrToIpam{}, middleware.After) -} - -func addOpProvisionByoipCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpProvisionByoipCidr{}, middleware.After) -} - -func addOpProvisionIpamByoasnValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpProvisionIpamByoasn{}, middleware.After) -} - -func addOpProvisionIpamPoolCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpProvisionIpamPoolCidr{}, middleware.After) -} - -func addOpProvisionPublicIpv4PoolCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpProvisionPublicIpv4PoolCidr{}, middleware.After) -} - -func addOpPurchaseCapacityBlockValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPurchaseCapacityBlock{}, middleware.After) -} - -func addOpPurchaseHostReservationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPurchaseHostReservation{}, middleware.After) -} - -func addOpPurchaseReservedInstancesOfferingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPurchaseReservedInstancesOffering{}, middleware.After) -} - -func addOpPurchaseScheduledInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPurchaseScheduledInstances{}, middleware.After) -} - -func addOpRebootInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRebootInstances{}, middleware.After) -} - -func addOpRegisterImageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegisterImage{}, middleware.After) -} - -func addOpRegisterInstanceEventNotificationAttributesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegisterInstanceEventNotificationAttributes{}, middleware.After) -} - -func addOpRegisterTransitGatewayMulticastGroupMembersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegisterTransitGatewayMulticastGroupMembers{}, middleware.After) -} - -func addOpRegisterTransitGatewayMulticastGroupSourcesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegisterTransitGatewayMulticastGroupSources{}, middleware.After) -} - -func addOpRejectTransitGatewayPeeringAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRejectTransitGatewayPeeringAttachment{}, middleware.After) -} - -func addOpRejectTransitGatewayVpcAttachmentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRejectTransitGatewayVpcAttachment{}, middleware.After) -} - -func addOpRejectVpcEndpointConnectionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRejectVpcEndpointConnections{}, middleware.After) -} - -func addOpRejectVpcPeeringConnectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRejectVpcPeeringConnection{}, middleware.After) -} - -func addOpReleaseHostsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReleaseHosts{}, middleware.After) -} - -func addOpReleaseIpamPoolAllocationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReleaseIpamPoolAllocation{}, middleware.After) -} - -func addOpReplaceIamInstanceProfileAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceIamInstanceProfileAssociation{}, middleware.After) -} - -func addOpReplaceNetworkAclAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceNetworkAclAssociation{}, middleware.After) -} - -func addOpReplaceNetworkAclEntryValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceNetworkAclEntry{}, middleware.After) -} - -func addOpReplaceRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceRoute{}, middleware.After) -} - -func addOpReplaceRouteTableAssociationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceRouteTableAssociation{}, middleware.After) -} - -func addOpReplaceTransitGatewayRouteValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceTransitGatewayRoute{}, middleware.After) -} - -func addOpReplaceVpnTunnelValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplaceVpnTunnel{}, middleware.After) -} - -func addOpReportInstanceStatusValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReportInstanceStatus{}, middleware.After) -} - -func addOpRequestSpotFleetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRequestSpotFleet{}, middleware.After) -} - -func addOpRequestSpotInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRequestSpotInstances{}, middleware.After) -} - -func addOpResetAddressAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetAddressAttribute{}, middleware.After) -} - -func addOpResetFpgaImageAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetFpgaImageAttribute{}, middleware.After) -} - -func addOpResetImageAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetImageAttribute{}, middleware.After) -} - -func addOpResetInstanceAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetInstanceAttribute{}, middleware.After) -} - -func addOpResetNetworkInterfaceAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetNetworkInterfaceAttribute{}, middleware.After) -} - -func addOpResetSnapshotAttributeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetSnapshotAttribute{}, middleware.After) -} - -func addOpRestoreAddressToClassicValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestoreAddressToClassic{}, middleware.After) -} - -func addOpRestoreImageFromRecycleBinValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestoreImageFromRecycleBin{}, middleware.After) -} - -func addOpRestoreManagedPrefixListVersionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestoreManagedPrefixListVersion{}, middleware.After) -} - -func addOpRestoreSnapshotFromRecycleBinValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestoreSnapshotFromRecycleBin{}, middleware.After) -} - -func addOpRestoreSnapshotTierValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestoreSnapshotTier{}, middleware.After) -} - -func addOpRevokeClientVpnIngressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRevokeClientVpnIngress{}, middleware.After) -} - -func addOpRevokeSecurityGroupEgressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRevokeSecurityGroupEgress{}, middleware.After) -} - -func addOpRunInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRunInstances{}, middleware.After) -} - -func addOpRunScheduledInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRunScheduledInstances{}, middleware.After) -} - -func addOpSearchLocalGatewayRoutesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpSearchLocalGatewayRoutes{}, middleware.After) -} - -func addOpSearchTransitGatewayMulticastGroupsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpSearchTransitGatewayMulticastGroups{}, middleware.After) -} - -func addOpSearchTransitGatewayRoutesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpSearchTransitGatewayRoutes{}, middleware.After) -} - -func addOpSendDiagnosticInterruptValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpSendDiagnosticInterrupt{}, middleware.After) -} - -func addOpStartInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartInstances{}, middleware.After) -} - -func addOpStartNetworkInsightsAccessScopeAnalysisValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartNetworkInsightsAccessScopeAnalysis{}, middleware.After) -} - -func addOpStartNetworkInsightsAnalysisValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartNetworkInsightsAnalysis{}, middleware.After) -} - -func addOpStartVpcEndpointServicePrivateDnsVerificationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartVpcEndpointServicePrivateDnsVerification{}, middleware.After) -} - -func addOpStopInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStopInstances{}, middleware.After) -} - -func addOpTerminateClientVpnConnectionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTerminateClientVpnConnections{}, middleware.After) -} - -func addOpTerminateInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTerminateInstances{}, middleware.After) -} - -func addOpUnassignIpv6AddressesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUnassignIpv6Addresses{}, middleware.After) -} - -func addOpUnassignPrivateIpAddressesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUnassignPrivateIpAddresses{}, middleware.After) -} - -func addOpUnassignPrivateNatGatewayAddressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUnassignPrivateNatGatewayAddress{}, middleware.After) -} - -func addOpUnlockSnapshotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUnlockSnapshot{}, middleware.After) -} - -func addOpUnmonitorInstancesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUnmonitorInstances{}, middleware.After) -} - -func addOpWithdrawByoipCidrValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpWithdrawByoipCidr{}, middleware.After) -} - -func validateAddPrefixListEntries(v []types.AddPrefixListEntry) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AddPrefixListEntries"} - for i := range v { - if err := validateAddPrefixListEntry(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAddPrefixListEntry(v *types.AddPrefixListEntry) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AddPrefixListEntry"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAsnAuthorizationContext(v *types.AsnAuthorizationContext) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AsnAuthorizationContext"} - if v.Message == nil { - invalidParams.Add(smithy.NewErrParamRequired("Message")) - } - if v.Signature == nil { - invalidParams.Add(smithy.NewErrParamRequired("Signature")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAthenaIntegration(v *types.AthenaIntegration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AthenaIntegration"} - if v.IntegrationResultS3DestinationArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("IntegrationResultS3DestinationArn")) - } - if len(v.PartitionLoadFrequency) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("PartitionLoadFrequency")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAthenaIntegrationsSet(v []types.AthenaIntegration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AthenaIntegrationsSet"} - for i := range v { - if err := validateAthenaIntegration(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCidrAuthorizationContext(v *types.CidrAuthorizationContext) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CidrAuthorizationContext"} - if v.Message == nil { - invalidParams.Add(smithy.NewErrParamRequired("Message")) - } - if v.Signature == nil { - invalidParams.Add(smithy.NewErrParamRequired("Signature")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCreateTransitGatewayConnectRequestOptions(v *types.CreateTransitGatewayConnectRequestOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayConnectRequestOptions"} - if len(v.Protocol) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Protocol")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCreditSpecificationRequest(v *types.CreditSpecificationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreditSpecificationRequest"} - if v.CpuCredits == nil { - invalidParams.Add(smithy.NewErrParamRequired("CpuCredits")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateDiskImage(v *types.DiskImage) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DiskImage"} - if v.Image != nil { - if err := validateDiskImageDetail(v.Image); err != nil { - invalidParams.AddNested("Image", err.(smithy.InvalidParamsError)) - } - } - if v.Volume != nil { - if err := validateVolumeDetail(v.Volume); err != nil { - invalidParams.AddNested("Volume", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateDiskImageDetail(v *types.DiskImageDetail) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DiskImageDetail"} - if v.Bytes == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bytes")) - } - if len(v.Format) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Format")) - } - if v.ImportManifestUrl == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImportManifestUrl")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateDiskImageList(v []types.DiskImage) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DiskImageList"} - for i := range v { - if err := validateDiskImage(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateElasticGpuSpecification(v *types.ElasticGpuSpecification) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ElasticGpuSpecification"} - if v.Type == nil { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateElasticGpuSpecificationList(v []types.ElasticGpuSpecification) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ElasticGpuSpecificationList"} - for i := range v { - if err := validateElasticGpuSpecification(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateElasticGpuSpecifications(v []types.ElasticGpuSpecification) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ElasticGpuSpecifications"} - for i := range v { - if err := validateElasticGpuSpecification(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateElasticInferenceAccelerator(v *types.ElasticInferenceAccelerator) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ElasticInferenceAccelerator"} - if v.Type == nil { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateElasticInferenceAccelerators(v []types.ElasticInferenceAccelerator) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ElasticInferenceAccelerators"} - for i := range v { - if err := validateElasticInferenceAccelerator(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateExportTaskS3LocationRequest(v *types.ExportTaskS3LocationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ExportTaskS3LocationRequest"} - if v.S3Bucket == nil { - invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateFastLaunchLaunchTemplateSpecificationRequest(v *types.FastLaunchLaunchTemplateSpecificationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "FastLaunchLaunchTemplateSpecificationRequest"} - if v.Version == nil { - invalidParams.Add(smithy.NewErrParamRequired("Version")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateFleetLaunchTemplateConfigListRequest(v []types.FleetLaunchTemplateConfigRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "FleetLaunchTemplateConfigListRequest"} - for i := range v { - if err := validateFleetLaunchTemplateConfigRequest(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateFleetLaunchTemplateConfigRequest(v *types.FleetLaunchTemplateConfigRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "FleetLaunchTemplateConfigRequest"} - if v.Overrides != nil { - if err := validateFleetLaunchTemplateOverridesListRequest(v.Overrides); err != nil { - invalidParams.AddNested("Overrides", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateFleetLaunchTemplateOverridesListRequest(v []types.FleetLaunchTemplateOverridesRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "FleetLaunchTemplateOverridesListRequest"} - for i := range v { - if err := validateFleetLaunchTemplateOverridesRequest(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateFleetLaunchTemplateOverridesRequest(v *types.FleetLaunchTemplateOverridesRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "FleetLaunchTemplateOverridesRequest"} - if v.InstanceRequirements != nil { - if err := validateInstanceRequirementsRequest(v.InstanceRequirements); err != nil { - invalidParams.AddNested("InstanceRequirements", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateInstanceCreditSpecificationListRequest(v []types.InstanceCreditSpecificationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InstanceCreditSpecificationListRequest"} - for i := range v { - if err := validateInstanceCreditSpecificationRequest(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateInstanceCreditSpecificationRequest(v *types.InstanceCreditSpecificationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InstanceCreditSpecificationRequest"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateInstanceRequirementsRequest(v *types.InstanceRequirementsRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InstanceRequirementsRequest"} - if v.VCpuCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("VCpuCount")) - } else if v.VCpuCount != nil { - if err := validateVCpuCountRangeRequest(v.VCpuCount); err != nil { - invalidParams.AddNested("VCpuCount", err.(smithy.InvalidParamsError)) - } - } - if v.MemoryMiB == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemoryMiB")) - } else if v.MemoryMiB != nil { - if err := validateMemoryMiBRequest(v.MemoryMiB); err != nil { - invalidParams.AddNested("MemoryMiB", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateInstanceRequirementsWithMetadataRequest(v *types.InstanceRequirementsWithMetadataRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InstanceRequirementsWithMetadataRequest"} - if v.InstanceRequirements != nil { - if err := validateInstanceRequirementsRequest(v.InstanceRequirements); err != nil { - invalidParams.AddNested("InstanceRequirements", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateInstanceSpecification(v *types.InstanceSpecification) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InstanceSpecification"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateIntegrateServices(v *types.IntegrateServices) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "IntegrateServices"} - if v.AthenaIntegrations != nil { - if err := validateAthenaIntegrationsSet(v.AthenaIntegrations); err != nil { - invalidParams.AddNested("AthenaIntegrations", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateLaunchTemplateElasticInferenceAccelerator(v *types.LaunchTemplateElasticInferenceAccelerator) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "LaunchTemplateElasticInferenceAccelerator"} - if v.Type == nil { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateLaunchTemplateElasticInferenceAcceleratorList(v []types.LaunchTemplateElasticInferenceAccelerator) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "LaunchTemplateElasticInferenceAcceleratorList"} - for i := range v { - if err := validateLaunchTemplateElasticInferenceAccelerator(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateMemoryMiBRequest(v *types.MemoryMiBRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "MemoryMiBRequest"} - if v.Min == nil { - invalidParams.Add(smithy.NewErrParamRequired("Min")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validatePurchaseRequest(v *types.PurchaseRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PurchaseRequest"} - if v.InstanceCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceCount")) - } - if v.PurchaseToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("PurchaseToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validatePurchaseRequestSet(v []types.PurchaseRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PurchaseRequestSet"} - for i := range v { - if err := validatePurchaseRequest(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateRemovePrefixListEntries(v []types.RemovePrefixListEntry) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RemovePrefixListEntries"} - for i := range v { - if err := validateRemovePrefixListEntry(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateRemovePrefixListEntry(v *types.RemovePrefixListEntry) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RemovePrefixListEntry"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateRequestLaunchTemplateData(v *types.RequestLaunchTemplateData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RequestLaunchTemplateData"} - if v.ElasticGpuSpecifications != nil { - if err := validateElasticGpuSpecificationList(v.ElasticGpuSpecifications); err != nil { - invalidParams.AddNested("ElasticGpuSpecifications", err.(smithy.InvalidParamsError)) - } - } - if v.ElasticInferenceAccelerators != nil { - if err := validateLaunchTemplateElasticInferenceAcceleratorList(v.ElasticInferenceAccelerators); err != nil { - invalidParams.AddNested("ElasticInferenceAccelerators", err.(smithy.InvalidParamsError)) - } - } - if v.CreditSpecification != nil { - if err := validateCreditSpecificationRequest(v.CreditSpecification); err != nil { - invalidParams.AddNested("CreditSpecification", err.(smithy.InvalidParamsError)) - } - } - if v.InstanceRequirements != nil { - if err := validateInstanceRequirementsRequest(v.InstanceRequirements); err != nil { - invalidParams.AddNested("InstanceRequirements", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateRequestSpotLaunchSpecification(v *types.RequestSpotLaunchSpecification) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RequestSpotLaunchSpecification"} - if v.Monitoring != nil { - if err := validateRunInstancesMonitoringEnabled(v.Monitoring); err != nil { - invalidParams.AddNested("Monitoring", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateRunInstancesMonitoringEnabled(v *types.RunInstancesMonitoringEnabled) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RunInstancesMonitoringEnabled"} - if v.Enabled == nil { - invalidParams.Add(smithy.NewErrParamRequired("Enabled")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateScheduledInstancesLaunchSpecification(v *types.ScheduledInstancesLaunchSpecification) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ScheduledInstancesLaunchSpecification"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateSecurityGroupRuleUpdate(v *types.SecurityGroupRuleUpdate) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SecurityGroupRuleUpdate"} - if v.SecurityGroupRuleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupRuleId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateSecurityGroupRuleUpdateList(v []types.SecurityGroupRuleUpdate) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SecurityGroupRuleUpdateList"} - for i := range v { - if err := validateSecurityGroupRuleUpdate(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateSlotDateTimeRangeRequest(v *types.SlotDateTimeRangeRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SlotDateTimeRangeRequest"} - if v.EarliestTime == nil { - invalidParams.Add(smithy.NewErrParamRequired("EarliestTime")) - } - if v.LatestTime == nil { - invalidParams.Add(smithy.NewErrParamRequired("LatestTime")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateSpotFleetRequestConfigData(v *types.SpotFleetRequestConfigData) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SpotFleetRequestConfigData"} - if v.IamFleetRole == nil { - invalidParams.Add(smithy.NewErrParamRequired("IamFleetRole")) - } - if v.TargetCapacity == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetCapacity")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTargetCapacitySpecificationRequest(v *types.TargetCapacitySpecificationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TargetCapacitySpecificationRequest"} - if v.TotalTargetCapacity == nil { - invalidParams.Add(smithy.NewErrParamRequired("TotalTargetCapacity")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTargetConfigurationRequest(v *types.TargetConfigurationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TargetConfigurationRequest"} - if v.OfferingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("OfferingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTargetConfigurationRequestSet(v []types.TargetConfigurationRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TargetConfigurationRequestSet"} - for i := range v { - if err := validateTargetConfigurationRequest(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVCpuCountRangeRequest(v *types.VCpuCountRangeRequest) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VCpuCountRangeRequest"} - if v.Min == nil { - invalidParams.Add(smithy.NewErrParamRequired("Min")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVerifiedAccessLogCloudWatchLogsDestinationOptions(v *types.VerifiedAccessLogCloudWatchLogsDestinationOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VerifiedAccessLogCloudWatchLogsDestinationOptions"} - if v.Enabled == nil { - invalidParams.Add(smithy.NewErrParamRequired("Enabled")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVerifiedAccessLogKinesisDataFirehoseDestinationOptions(v *types.VerifiedAccessLogKinesisDataFirehoseDestinationOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VerifiedAccessLogKinesisDataFirehoseDestinationOptions"} - if v.Enabled == nil { - invalidParams.Add(smithy.NewErrParamRequired("Enabled")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVerifiedAccessLogOptions(v *types.VerifiedAccessLogOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VerifiedAccessLogOptions"} - if v.S3 != nil { - if err := validateVerifiedAccessLogS3DestinationOptions(v.S3); err != nil { - invalidParams.AddNested("S3", err.(smithy.InvalidParamsError)) - } - } - if v.CloudWatchLogs != nil { - if err := validateVerifiedAccessLogCloudWatchLogsDestinationOptions(v.CloudWatchLogs); err != nil { - invalidParams.AddNested("CloudWatchLogs", err.(smithy.InvalidParamsError)) - } - } - if v.KinesisDataFirehose != nil { - if err := validateVerifiedAccessLogKinesisDataFirehoseDestinationOptions(v.KinesisDataFirehose); err != nil { - invalidParams.AddNested("KinesisDataFirehose", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVerifiedAccessLogS3DestinationOptions(v *types.VerifiedAccessLogS3DestinationOptions) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VerifiedAccessLogS3DestinationOptions"} - if v.Enabled == nil { - invalidParams.Add(smithy.NewErrParamRequired("Enabled")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVolumeDetail(v *types.VolumeDetail) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VolumeDetail"} - if v.Size == nil { - invalidParams.Add(smithy.NewErrParamRequired("Size")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptAddressTransferInput(v *AcceptAddressTransferInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptAddressTransferInput"} - if v.Address == nil { - invalidParams.Add(smithy.NewErrParamRequired("Address")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptReservedInstancesExchangeQuoteInput(v *AcceptReservedInstancesExchangeQuoteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptReservedInstancesExchangeQuoteInput"} - if v.ReservedInstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstanceIds")) - } - if v.TargetConfigurations != nil { - if err := validateTargetConfigurationRequestSet(v.TargetConfigurations); err != nil { - invalidParams.AddNested("TargetConfigurations", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptTransitGatewayPeeringAttachmentInput(v *AcceptTransitGatewayPeeringAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptTransitGatewayPeeringAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptTransitGatewayVpcAttachmentInput(v *AcceptTransitGatewayVpcAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptTransitGatewayVpcAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptVpcEndpointConnectionsInput(v *AcceptVpcEndpointConnectionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptVpcEndpointConnectionsInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if v.VpcEndpointIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcEndpointIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAcceptVpcPeeringConnectionInput(v *AcceptVpcPeeringConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AcceptVpcPeeringConnectionInput"} - if v.VpcPeeringConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcPeeringConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAdvertiseByoipCidrInput(v *AdvertiseByoipCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AdvertiseByoipCidrInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAllocateHostsInput(v *AllocateHostsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AllocateHostsInput"} - if v.AvailabilityZone == nil { - invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZone")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAllocateIpamPoolCidrInput(v *AllocateIpamPoolCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AllocateIpamPoolCidrInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpApplySecurityGroupsToClientVpnTargetNetworkInput(v *ApplySecurityGroupsToClientVpnTargetNetworkInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ApplySecurityGroupsToClientVpnTargetNetworkInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if v.SecurityGroupIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssignIpv6AddressesInput(v *AssignIpv6AddressesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssignIpv6AddressesInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssignPrivateIpAddressesInput(v *AssignPrivateIpAddressesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssignPrivateIpAddressesInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssignPrivateNatGatewayAddressInput(v *AssignPrivateNatGatewayAddressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssignPrivateNatGatewayAddressInput"} - if v.NatGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NatGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateClientVpnTargetNetworkInput(v *AssociateClientVpnTargetNetworkInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateClientVpnTargetNetworkInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateDhcpOptionsInput(v *AssociateDhcpOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateDhcpOptionsInput"} - if v.DhcpOptionsId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DhcpOptionsId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateEnclaveCertificateIamRoleInput(v *AssociateEnclaveCertificateIamRoleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateEnclaveCertificateIamRoleInput"} - if v.CertificateArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CertificateArn")) - } - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateIamInstanceProfileInput(v *AssociateIamInstanceProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateIamInstanceProfileInput"} - if v.IamInstanceProfile == nil { - invalidParams.Add(smithy.NewErrParamRequired("IamInstanceProfile")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateInstanceEventWindowInput(v *AssociateInstanceEventWindowInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateInstanceEventWindowInput"} - if v.InstanceEventWindowId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceEventWindowId")) - } - if v.AssociationTarget == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationTarget")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateIpamByoasnInput(v *AssociateIpamByoasnInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateIpamByoasnInput"} - if v.Asn == nil { - invalidParams.Add(smithy.NewErrParamRequired("Asn")) - } - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateIpamResourceDiscoveryInput(v *AssociateIpamResourceDiscoveryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateIpamResourceDiscoveryInput"} - if v.IpamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamId")) - } - if v.IpamResourceDiscoveryId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateNatGatewayAddressInput(v *AssociateNatGatewayAddressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateNatGatewayAddressInput"} - if v.NatGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NatGatewayId")) - } - if v.AllocationIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("AllocationIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateRouteTableInput(v *AssociateRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateRouteTableInput"} - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateSubnetCidrBlockInput(v *AssociateSubnetCidrBlockInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateSubnetCidrBlockInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateTransitGatewayMulticastDomainInput(v *AssociateTransitGatewayMulticastDomainInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateTransitGatewayMulticastDomainInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if v.SubnetIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateTransitGatewayPolicyTableInput(v *AssociateTransitGatewayPolicyTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateTransitGatewayPolicyTableInput"} - if v.TransitGatewayPolicyTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayPolicyTableId")) - } - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateTransitGatewayRouteTableInput(v *AssociateTransitGatewayRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateTransitGatewayRouteTableInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateTrunkInterfaceInput(v *AssociateTrunkInterfaceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateTrunkInterfaceInput"} - if v.BranchInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BranchInterfaceId")) - } - if v.TrunkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrunkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateVpcCidrBlockInput(v *AssociateVpcCidrBlockInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateVpcCidrBlockInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAttachClassicLinkVpcInput(v *AttachClassicLinkVpcInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttachClassicLinkVpcInput"} - if v.Groups == nil { - invalidParams.Add(smithy.NewErrParamRequired("Groups")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAttachInternetGatewayInput(v *AttachInternetGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttachInternetGatewayInput"} - if v.InternetGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InternetGatewayId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAttachNetworkInterfaceInput(v *AttachNetworkInterfaceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttachNetworkInterfaceInput"} - if v.DeviceIndex == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeviceIndex")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAttachVerifiedAccessTrustProviderInput(v *AttachVerifiedAccessTrustProviderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttachVerifiedAccessTrustProviderInput"} - if v.VerifiedAccessInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessInstanceId")) - } - if v.VerifiedAccessTrustProviderId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessTrustProviderId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAttachVolumeInput(v *AttachVolumeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttachVolumeInput"} - if v.Device == nil { - invalidParams.Add(smithy.NewErrParamRequired("Device")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAttachVpnGatewayInput(v *AttachVpnGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttachVpnGatewayInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if v.VpnGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAuthorizeClientVpnIngressInput(v *AuthorizeClientVpnIngressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AuthorizeClientVpnIngressInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.TargetNetworkCidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetNetworkCidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAuthorizeSecurityGroupEgressInput(v *AuthorizeSecurityGroupEgressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AuthorizeSecurityGroupEgressInput"} - if v.GroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBundleInstanceInput(v *BundleInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BundleInstanceInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.Storage == nil { - invalidParams.Add(smithy.NewErrParamRequired("Storage")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelBundleTaskInput(v *CancelBundleTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelBundleTaskInput"} - if v.BundleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BundleId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelCapacityReservationFleetsInput(v *CancelCapacityReservationFleetsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelCapacityReservationFleetsInput"} - if v.CapacityReservationFleetIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationFleetIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelCapacityReservationInput(v *CancelCapacityReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelCapacityReservationInput"} - if v.CapacityReservationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelConversionTaskInput(v *CancelConversionTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelConversionTaskInput"} - if v.ConversionTaskId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConversionTaskId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelExportTaskInput(v *CancelExportTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelExportTaskInput"} - if v.ExportTaskId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ExportTaskId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelImageLaunchPermissionInput(v *CancelImageLaunchPermissionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelImageLaunchPermissionInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelReservedInstancesListingInput(v *CancelReservedInstancesListingInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelReservedInstancesListingInput"} - if v.ReservedInstancesListingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesListingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelSpotFleetRequestsInput(v *CancelSpotFleetRequestsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelSpotFleetRequestsInput"} - if v.SpotFleetRequestIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SpotFleetRequestIds")) - } - if v.TerminateInstances == nil { - invalidParams.Add(smithy.NewErrParamRequired("TerminateInstances")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCancelSpotInstanceRequestsInput(v *CancelSpotInstanceRequestsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelSpotInstanceRequestsInput"} - if v.SpotInstanceRequestIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SpotInstanceRequestIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpConfirmProductInstanceInput(v *ConfirmProductInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ConfirmProductInstanceInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.ProductCode == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProductCode")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCopyFpgaImageInput(v *CopyFpgaImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CopyFpgaImageInput"} - if v.SourceFpgaImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceFpgaImageId")) - } - if v.SourceRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCopyImageInput(v *CopyImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CopyImageInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.SourceImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceImageId")) - } - if v.SourceRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCopySnapshotInput(v *CopySnapshotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CopySnapshotInput"} - if v.SourceRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceRegion")) - } - if v.SourceSnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceSnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCapacityReservationFleetInput(v *CreateCapacityReservationFleetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCapacityReservationFleetInput"} - if v.InstanceTypeSpecifications == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceTypeSpecifications")) - } - if v.TotalTargetCapacity == nil { - invalidParams.Add(smithy.NewErrParamRequired("TotalTargetCapacity")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCapacityReservationInput(v *CreateCapacityReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCapacityReservationInput"} - if v.InstanceType == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) - } - if len(v.InstancePlatform) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InstancePlatform")) - } - if v.InstanceCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceCount")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCarrierGatewayInput(v *CreateCarrierGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCarrierGatewayInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateClientVpnEndpointInput(v *CreateClientVpnEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateClientVpnEndpointInput"} - if v.ClientCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientCidrBlock")) - } - if v.ServerCertificateArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServerCertificateArn")) - } - if v.AuthenticationOptions == nil { - invalidParams.Add(smithy.NewErrParamRequired("AuthenticationOptions")) - } - if v.ConnectionLogOptions == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectionLogOptions")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateClientVpnRouteInput(v *CreateClientVpnRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateClientVpnRouteInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if v.TargetVpcSubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetVpcSubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCoipCidrInput(v *CreateCoipCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCoipCidrInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if v.CoipPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CoipPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCoipPoolInput(v *CreateCoipPoolInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCoipPoolInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCustomerGatewayInput(v *CreateCustomerGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCustomerGatewayInput"} - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateDefaultSubnetInput(v *CreateDefaultSubnetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateDefaultSubnetInput"} - if v.AvailabilityZone == nil { - invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZone")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateDhcpOptionsInput(v *CreateDhcpOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateDhcpOptionsInput"} - if v.DhcpConfigurations == nil { - invalidParams.Add(smithy.NewErrParamRequired("DhcpConfigurations")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateEgressOnlyInternetGatewayInput(v *CreateEgressOnlyInternetGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateEgressOnlyInternetGatewayInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateFleetInput(v *CreateFleetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateFleetInput"} - if v.LaunchTemplateConfigs == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchTemplateConfigs")) - } else if v.LaunchTemplateConfigs != nil { - if err := validateFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs); err != nil { - invalidParams.AddNested("LaunchTemplateConfigs", err.(smithy.InvalidParamsError)) - } - } - if v.TargetCapacitySpecification == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetCapacitySpecification")) - } else if v.TargetCapacitySpecification != nil { - if err := validateTargetCapacitySpecificationRequest(v.TargetCapacitySpecification); err != nil { - invalidParams.AddNested("TargetCapacitySpecification", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateFlowLogsInput(v *CreateFlowLogsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateFlowLogsInput"} - if v.ResourceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceIds")) - } - if len(v.ResourceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateFpgaImageInput(v *CreateFpgaImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateFpgaImageInput"} - if v.InputStorageLocation == nil { - invalidParams.Add(smithy.NewErrParamRequired("InputStorageLocation")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateImageInput(v *CreateImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateImageInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateInstanceConnectEndpointInput(v *CreateInstanceConnectEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateInstanceConnectEndpointInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateInstanceExportTaskInput(v *CreateInstanceExportTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateInstanceExportTaskInput"} - if v.ExportToS3Task == nil { - invalidParams.Add(smithy.NewErrParamRequired("ExportToS3Task")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if len(v.TargetEnvironment) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("TargetEnvironment")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateIpamPoolInput(v *CreateIpamPoolInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateIpamPoolInput"} - if v.IpamScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamScopeId")) - } - if len(v.AddressFamily) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("AddressFamily")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateIpamScopeInput(v *CreateIpamScopeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateIpamScopeInput"} - if v.IpamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateKeyPairInput(v *CreateKeyPairInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateKeyPairInput"} - if v.KeyName == nil { - invalidParams.Add(smithy.NewErrParamRequired("KeyName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLaunchTemplateInput(v *CreateLaunchTemplateInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLaunchTemplateInput"} - if v.LaunchTemplateName == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchTemplateName")) - } - if v.LaunchTemplateData == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchTemplateData")) - } else if v.LaunchTemplateData != nil { - if err := validateRequestLaunchTemplateData(v.LaunchTemplateData); err != nil { - invalidParams.AddNested("LaunchTemplateData", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLaunchTemplateVersionInput(v *CreateLaunchTemplateVersionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLaunchTemplateVersionInput"} - if v.LaunchTemplateData == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchTemplateData")) - } else if v.LaunchTemplateData != nil { - if err := validateRequestLaunchTemplateData(v.LaunchTemplateData); err != nil { - invalidParams.AddNested("LaunchTemplateData", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLocalGatewayRouteInput(v *CreateLocalGatewayRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLocalGatewayRouteInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLocalGatewayRouteTableInput(v *CreateLocalGatewayRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLocalGatewayRouteTableInput"} - if v.LocalGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(v *CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if v.LocalGatewayVirtualInterfaceGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayVirtualInterfaceGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateLocalGatewayRouteTableVpcAssociationInput(v *CreateLocalGatewayRouteTableVpcAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateLocalGatewayRouteTableVpcAssociationInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateManagedPrefixListInput(v *CreateManagedPrefixListInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateManagedPrefixListInput"} - if v.PrefixListName == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListName")) - } - if v.Entries != nil { - if err := validateAddPrefixListEntries(v.Entries); err != nil { - invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) - } - } - if v.MaxEntries == nil { - invalidParams.Add(smithy.NewErrParamRequired("MaxEntries")) - } - if v.AddressFamily == nil { - invalidParams.Add(smithy.NewErrParamRequired("AddressFamily")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNatGatewayInput(v *CreateNatGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNatGatewayInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNetworkAclEntryInput(v *CreateNetworkAclEntryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkAclEntryInput"} - if v.Egress == nil { - invalidParams.Add(smithy.NewErrParamRequired("Egress")) - } - if v.NetworkAclId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) - } - if v.Protocol == nil { - invalidParams.Add(smithy.NewErrParamRequired("Protocol")) - } - if len(v.RuleAction) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("RuleAction")) - } - if v.RuleNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNetworkAclInput(v *CreateNetworkAclInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkAclInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNetworkInsightsAccessScopeInput(v *CreateNetworkInsightsAccessScopeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkInsightsAccessScopeInput"} - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNetworkInsightsPathInput(v *CreateNetworkInsightsPathInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkInsightsPathInput"} - if v.Source == nil { - invalidParams.Add(smithy.NewErrParamRequired("Source")) - } - if len(v.Protocol) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Protocol")) - } - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNetworkInterfaceInput(v *CreateNetworkInterfaceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkInterfaceInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateNetworkInterfacePermissionInput(v *CreateNetworkInterfacePermissionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateNetworkInterfacePermissionInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if len(v.Permission) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Permission")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateReplaceRootVolumeTaskInput(v *CreateReplaceRootVolumeTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateReplaceRootVolumeTaskInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateReservedInstancesListingInput(v *CreateReservedInstancesListingInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateReservedInstancesListingInput"} - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) - } - if v.InstanceCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceCount")) - } - if v.PriceSchedules == nil { - invalidParams.Add(smithy.NewErrParamRequired("PriceSchedules")) - } - if v.ReservedInstancesId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateRestoreImageTaskInput(v *CreateRestoreImageTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRestoreImageTaskInput"} - if v.Bucket == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bucket")) - } - if v.ObjectKey == nil { - invalidParams.Add(smithy.NewErrParamRequired("ObjectKey")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateRouteInput(v *CreateRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRouteInput"} - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateRouteTableInput(v *CreateRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRouteTableInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSecurityGroupInput(v *CreateSecurityGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSecurityGroupInput"} - if v.Description == nil { - invalidParams.Add(smithy.NewErrParamRequired("Description")) - } - if v.GroupName == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSnapshotInput(v *CreateSnapshotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSnapshotInput"} - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSnapshotsInput(v *CreateSnapshotsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSnapshotsInput"} - if v.InstanceSpecification == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceSpecification")) - } else if v.InstanceSpecification != nil { - if err := validateInstanceSpecification(v.InstanceSpecification); err != nil { - invalidParams.AddNested("InstanceSpecification", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSpotDatafeedSubscriptionInput(v *CreateSpotDatafeedSubscriptionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSpotDatafeedSubscriptionInput"} - if v.Bucket == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bucket")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateStoreImageTaskInput(v *CreateStoreImageTaskInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateStoreImageTaskInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if v.Bucket == nil { - invalidParams.Add(smithy.NewErrParamRequired("Bucket")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSubnetCidrReservationInput(v *CreateSubnetCidrReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSubnetCidrReservationInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if len(v.ReservationType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ReservationType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSubnetInput(v *CreateSubnetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSubnetInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTagsInput(v *CreateTagsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTagsInput"} - if v.Resources == nil { - invalidParams.Add(smithy.NewErrParamRequired("Resources")) - } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTrafficMirrorFilterRuleInput(v *CreateTrafficMirrorFilterRuleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficMirrorFilterRuleInput"} - if v.TrafficMirrorFilterId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorFilterId")) - } - if len(v.TrafficDirection) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("TrafficDirection")) - } - if v.RuleNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) - } - if len(v.RuleAction) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("RuleAction")) - } - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if v.SourceCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceCidrBlock")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTrafficMirrorSessionInput(v *CreateTrafficMirrorSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficMirrorSessionInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if v.TrafficMirrorTargetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorTargetId")) - } - if v.TrafficMirrorFilterId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorFilterId")) - } - if v.SessionNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("SessionNumber")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayConnectInput(v *CreateTransitGatewayConnectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayConnectInput"} - if v.TransportTransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransportTransitGatewayAttachmentId")) - } - if v.Options == nil { - invalidParams.Add(smithy.NewErrParamRequired("Options")) - } else if v.Options != nil { - if err := validateCreateTransitGatewayConnectRequestOptions(v.Options); err != nil { - invalidParams.AddNested("Options", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayConnectPeerInput(v *CreateTransitGatewayConnectPeerInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayConnectPeerInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if v.PeerAddress == nil { - invalidParams.Add(smithy.NewErrParamRequired("PeerAddress")) - } - if v.InsideCidrBlocks == nil { - invalidParams.Add(smithy.NewErrParamRequired("InsideCidrBlocks")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayMulticastDomainInput(v *CreateTransitGatewayMulticastDomainInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayMulticastDomainInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayPeeringAttachmentInput(v *CreateTransitGatewayPeeringAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayPeeringAttachmentInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if v.PeerTransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PeerTransitGatewayId")) - } - if v.PeerAccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PeerAccountId")) - } - if v.PeerRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("PeerRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayPolicyTableInput(v *CreateTransitGatewayPolicyTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayPolicyTableInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayPrefixListReferenceInput(v *CreateTransitGatewayPrefixListReferenceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayPrefixListReferenceInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayRouteInput(v *CreateTransitGatewayRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayRouteInput"} - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayRouteTableAnnouncementInput(v *CreateTransitGatewayRouteTableAnnouncementInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayRouteTableAnnouncementInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.PeeringAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PeeringAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayRouteTableInput(v *CreateTransitGatewayRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayRouteTableInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTransitGatewayVpcAttachmentInput(v *CreateTransitGatewayVpcAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTransitGatewayVpcAttachmentInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if v.SubnetIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVerifiedAccessEndpointInput(v *CreateVerifiedAccessEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVerifiedAccessEndpointInput"} - if v.VerifiedAccessGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessGroupId")) - } - if len(v.EndpointType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("EndpointType")) - } - if len(v.AttachmentType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("AttachmentType")) - } - if v.DomainCertificateArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("DomainCertificateArn")) - } - if v.ApplicationDomain == nil { - invalidParams.Add(smithy.NewErrParamRequired("ApplicationDomain")) - } - if v.EndpointDomainPrefix == nil { - invalidParams.Add(smithy.NewErrParamRequired("EndpointDomainPrefix")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVerifiedAccessGroupInput(v *CreateVerifiedAccessGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVerifiedAccessGroupInput"} - if v.VerifiedAccessInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessInstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVerifiedAccessTrustProviderInput(v *CreateVerifiedAccessTrustProviderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVerifiedAccessTrustProviderInput"} - if len(v.TrustProviderType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("TrustProviderType")) - } - if v.PolicyReferenceName == nil { - invalidParams.Add(smithy.NewErrParamRequired("PolicyReferenceName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVolumeInput(v *CreateVolumeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVolumeInput"} - if v.AvailabilityZone == nil { - invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZone")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVpcEndpointConnectionNotificationInput(v *CreateVpcEndpointConnectionNotificationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVpcEndpointConnectionNotificationInput"} - if v.ConnectionNotificationArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectionNotificationArn")) - } - if v.ConnectionEvents == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectionEvents")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVpcEndpointInput(v *CreateVpcEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVpcEndpointInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if v.ServiceName == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVpcPeeringConnectionInput(v *CreateVpcPeeringConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVpcPeeringConnectionInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVpnConnectionInput(v *CreateVpnConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVpnConnectionInput"} - if v.CustomerGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CustomerGatewayId")) - } - if v.Type == nil { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVpnConnectionRouteInput(v *CreateVpnConnectionRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVpnConnectionRouteInput"} - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVpnGatewayInput(v *CreateVpnGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVpnGatewayInput"} - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteCarrierGatewayInput(v *DeleteCarrierGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteCarrierGatewayInput"} - if v.CarrierGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CarrierGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteClientVpnEndpointInput(v *DeleteClientVpnEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteClientVpnEndpointInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteClientVpnRouteInput(v *DeleteClientVpnRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteClientVpnRouteInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteCoipCidrInput(v *DeleteCoipCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteCoipCidrInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if v.CoipPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CoipPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteCoipPoolInput(v *DeleteCoipPoolInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteCoipPoolInput"} - if v.CoipPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CoipPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteCustomerGatewayInput(v *DeleteCustomerGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomerGatewayInput"} - if v.CustomerGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CustomerGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteDhcpOptionsInput(v *DeleteDhcpOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteDhcpOptionsInput"} - if v.DhcpOptionsId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DhcpOptionsId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteEgressOnlyInternetGatewayInput(v *DeleteEgressOnlyInternetGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteEgressOnlyInternetGatewayInput"} - if v.EgressOnlyInternetGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("EgressOnlyInternetGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteFleetsInput(v *DeleteFleetsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteFleetsInput"} - if v.FleetIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("FleetIds")) - } - if v.TerminateInstances == nil { - invalidParams.Add(smithy.NewErrParamRequired("TerminateInstances")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteFlowLogsInput(v *DeleteFlowLogsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteFlowLogsInput"} - if v.FlowLogIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("FlowLogIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteFpgaImageInput(v *DeleteFpgaImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteFpgaImageInput"} - if v.FpgaImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FpgaImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteInstanceConnectEndpointInput(v *DeleteInstanceConnectEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteInstanceConnectEndpointInput"} - if v.InstanceConnectEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceConnectEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteInstanceEventWindowInput(v *DeleteInstanceEventWindowInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteInstanceEventWindowInput"} - if v.InstanceEventWindowId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceEventWindowId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteInternetGatewayInput(v *DeleteInternetGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteInternetGatewayInput"} - if v.InternetGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InternetGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteIpamInput(v *DeleteIpamInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteIpamInput"} - if v.IpamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteIpamPoolInput(v *DeleteIpamPoolInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteIpamPoolInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteIpamResourceDiscoveryInput(v *DeleteIpamResourceDiscoveryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteIpamResourceDiscoveryInput"} - if v.IpamResourceDiscoveryId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteIpamScopeInput(v *DeleteIpamScopeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteIpamScopeInput"} - if v.IpamScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamScopeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLaunchTemplateVersionsInput(v *DeleteLaunchTemplateVersionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLaunchTemplateVersionsInput"} - if v.Versions == nil { - invalidParams.Add(smithy.NewErrParamRequired("Versions")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLocalGatewayRouteInput(v *DeleteLocalGatewayRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLocalGatewayRouteInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLocalGatewayRouteTableInput(v *DeleteLocalGatewayRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLocalGatewayRouteTableInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput(v *DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput"} - if v.LocalGatewayRouteTableVirtualInterfaceGroupAssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableVirtualInterfaceGroupAssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteLocalGatewayRouteTableVpcAssociationInput(v *DeleteLocalGatewayRouteTableVpcAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteLocalGatewayRouteTableVpcAssociationInput"} - if v.LocalGatewayRouteTableVpcAssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableVpcAssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteManagedPrefixListInput(v *DeleteManagedPrefixListInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteManagedPrefixListInput"} - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNatGatewayInput(v *DeleteNatGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNatGatewayInput"} - if v.NatGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NatGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkAclEntryInput(v *DeleteNetworkAclEntryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkAclEntryInput"} - if v.Egress == nil { - invalidParams.Add(smithy.NewErrParamRequired("Egress")) - } - if v.NetworkAclId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) - } - if v.RuleNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkAclInput(v *DeleteNetworkAclInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkAclInput"} - if v.NetworkAclId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkInsightsAccessScopeAnalysisInput(v *DeleteNetworkInsightsAccessScopeAnalysisInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInsightsAccessScopeAnalysisInput"} - if v.NetworkInsightsAccessScopeAnalysisId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsAccessScopeAnalysisId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkInsightsAccessScopeInput(v *DeleteNetworkInsightsAccessScopeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInsightsAccessScopeInput"} - if v.NetworkInsightsAccessScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsAccessScopeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkInsightsAnalysisInput(v *DeleteNetworkInsightsAnalysisInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInsightsAnalysisInput"} - if v.NetworkInsightsAnalysisId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsAnalysisId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkInsightsPathInput(v *DeleteNetworkInsightsPathInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInsightsPathInput"} - if v.NetworkInsightsPathId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsPathId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkInterfaceInput(v *DeleteNetworkInterfaceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInterfaceInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteNetworkInterfacePermissionInput(v *DeleteNetworkInterfacePermissionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteNetworkInterfacePermissionInput"} - if v.NetworkInterfacePermissionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfacePermissionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeletePlacementGroupInput(v *DeletePlacementGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeletePlacementGroupInput"} - if v.GroupName == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeletePublicIpv4PoolInput(v *DeletePublicIpv4PoolInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeletePublicIpv4PoolInput"} - if v.PoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteQueuedReservedInstancesInput(v *DeleteQueuedReservedInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteQueuedReservedInstancesInput"} - if v.ReservedInstancesIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteRouteInput(v *DeleteRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteRouteInput"} - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteRouteTableInput(v *DeleteRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteRouteTableInput"} - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteSnapshotInput(v *DeleteSnapshotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSnapshotInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteSubnetCidrReservationInput(v *DeleteSubnetCidrReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSubnetCidrReservationInput"} - if v.SubnetCidrReservationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetCidrReservationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteSubnetInput(v *DeleteSubnetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSubnetInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTagsInput(v *DeleteTagsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsInput"} - if v.Resources == nil { - invalidParams.Add(smithy.NewErrParamRequired("Resources")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTrafficMirrorFilterInput(v *DeleteTrafficMirrorFilterInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficMirrorFilterInput"} - if v.TrafficMirrorFilterId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorFilterId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTrafficMirrorFilterRuleInput(v *DeleteTrafficMirrorFilterRuleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficMirrorFilterRuleInput"} - if v.TrafficMirrorFilterRuleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorFilterRuleId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTrafficMirrorSessionInput(v *DeleteTrafficMirrorSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficMirrorSessionInput"} - if v.TrafficMirrorSessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorSessionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTrafficMirrorTargetInput(v *DeleteTrafficMirrorTargetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficMirrorTargetInput"} - if v.TrafficMirrorTargetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorTargetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayConnectInput(v *DeleteTransitGatewayConnectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayConnectInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayConnectPeerInput(v *DeleteTransitGatewayConnectPeerInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayConnectPeerInput"} - if v.TransitGatewayConnectPeerId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayConnectPeerId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayInput(v *DeleteTransitGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayMulticastDomainInput(v *DeleteTransitGatewayMulticastDomainInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayMulticastDomainInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayPeeringAttachmentInput(v *DeleteTransitGatewayPeeringAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayPeeringAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayPolicyTableInput(v *DeleteTransitGatewayPolicyTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayPolicyTableInput"} - if v.TransitGatewayPolicyTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayPolicyTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayPrefixListReferenceInput(v *DeleteTransitGatewayPrefixListReferenceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayPrefixListReferenceInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayRouteInput(v *DeleteTransitGatewayRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayRouteInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayRouteTableAnnouncementInput(v *DeleteTransitGatewayRouteTableAnnouncementInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayRouteTableAnnouncementInput"} - if v.TransitGatewayRouteTableAnnouncementId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableAnnouncementId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayRouteTableInput(v *DeleteTransitGatewayRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayRouteTableInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTransitGatewayVpcAttachmentInput(v *DeleteTransitGatewayVpcAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTransitGatewayVpcAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVerifiedAccessEndpointInput(v *DeleteVerifiedAccessEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVerifiedAccessEndpointInput"} - if v.VerifiedAccessEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVerifiedAccessGroupInput(v *DeleteVerifiedAccessGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVerifiedAccessGroupInput"} - if v.VerifiedAccessGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVerifiedAccessInstanceInput(v *DeleteVerifiedAccessInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVerifiedAccessInstanceInput"} - if v.VerifiedAccessInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessInstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVerifiedAccessTrustProviderInput(v *DeleteVerifiedAccessTrustProviderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVerifiedAccessTrustProviderInput"} - if v.VerifiedAccessTrustProviderId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessTrustProviderId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVolumeInput(v *DeleteVolumeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVolumeInput"} - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpcEndpointConnectionNotificationsInput(v *DeleteVpcEndpointConnectionNotificationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpcEndpointConnectionNotificationsInput"} - if v.ConnectionNotificationIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectionNotificationIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpcEndpointServiceConfigurationsInput(v *DeleteVpcEndpointServiceConfigurationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpcEndpointServiceConfigurationsInput"} - if v.ServiceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpcEndpointsInput(v *DeleteVpcEndpointsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpcEndpointsInput"} - if v.VpcEndpointIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcEndpointIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpcInput(v *DeleteVpcInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpcInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpcPeeringConnectionInput(v *DeleteVpcPeeringConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpcPeeringConnectionInput"} - if v.VpcPeeringConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcPeeringConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpnConnectionInput(v *DeleteVpnConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpnConnectionInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpnConnectionRouteInput(v *DeleteVpnConnectionRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpnConnectionRouteInput"} - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVpnGatewayInput(v *DeleteVpnGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVpnGatewayInput"} - if v.VpnGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeprovisionByoipCidrInput(v *DeprovisionByoipCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeprovisionByoipCidrInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeprovisionIpamByoasnInput(v *DeprovisionIpamByoasnInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeprovisionIpamByoasnInput"} - if v.IpamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamId")) - } - if v.Asn == nil { - invalidParams.Add(smithy.NewErrParamRequired("Asn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeprovisionIpamPoolCidrInput(v *DeprovisionIpamPoolCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeprovisionIpamPoolCidrInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeprovisionPublicIpv4PoolCidrInput(v *DeprovisionPublicIpv4PoolCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeprovisionPublicIpv4PoolCidrInput"} - if v.PoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PoolId")) - } - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeregisterImageInput(v *DeregisterImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeregisterImageInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeregisterInstanceEventNotificationAttributesInput(v *DeregisterInstanceEventNotificationAttributesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeregisterInstanceEventNotificationAttributesInput"} - if v.InstanceTagAttribute == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceTagAttribute")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeByoipCidrsInput(v *DescribeByoipCidrsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeByoipCidrsInput"} - if v.MaxResults == nil { - invalidParams.Add(smithy.NewErrParamRequired("MaxResults")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeCapacityBlockOfferingsInput(v *DescribeCapacityBlockOfferingsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeCapacityBlockOfferingsInput"} - if v.InstanceType == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceType")) - } - if v.InstanceCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceCount")) - } - if v.CapacityDurationHours == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityDurationHours")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeClientVpnAuthorizationRulesInput(v *DescribeClientVpnAuthorizationRulesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeClientVpnAuthorizationRulesInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeClientVpnConnectionsInput(v *DescribeClientVpnConnectionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeClientVpnConnectionsInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeClientVpnRoutesInput(v *DescribeClientVpnRoutesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeClientVpnRoutesInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeClientVpnTargetNetworksInput(v *DescribeClientVpnTargetNetworksInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeClientVpnTargetNetworksInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeFleetHistoryInput(v *DescribeFleetHistoryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeFleetHistoryInput"} - if v.FleetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FleetId")) - } - if v.StartTime == nil { - invalidParams.Add(smithy.NewErrParamRequired("StartTime")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeFleetInstancesInput(v *DescribeFleetInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeFleetInstancesInput"} - if v.FleetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FleetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeFpgaImageAttributeInput(v *DescribeFpgaImageAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeFpgaImageAttributeInput"} - if v.FpgaImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FpgaImageId")) - } - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeIdentityIdFormatInput(v *DescribeIdentityIdFormatInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeIdentityIdFormatInput"} - if v.PrincipalArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeImageAttributeInput(v *DescribeImageAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeImageAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeInstanceAttributeInput(v *DescribeInstanceAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeInstanceAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeNetworkInterfaceAttributeInput(v *DescribeNetworkInterfaceAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeNetworkInterfaceAttributeInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeScheduledInstanceAvailabilityInput(v *DescribeScheduledInstanceAvailabilityInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeScheduledInstanceAvailabilityInput"} - if v.FirstSlotStartTimeRange == nil { - invalidParams.Add(smithy.NewErrParamRequired("FirstSlotStartTimeRange")) - } else if v.FirstSlotStartTimeRange != nil { - if err := validateSlotDateTimeRangeRequest(v.FirstSlotStartTimeRange); err != nil { - invalidParams.AddNested("FirstSlotStartTimeRange", err.(smithy.InvalidParamsError)) - } - } - if v.Recurrence == nil { - invalidParams.Add(smithy.NewErrParamRequired("Recurrence")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeSecurityGroupReferencesInput(v *DescribeSecurityGroupReferencesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeSecurityGroupReferencesInput"} - if v.GroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeSnapshotAttributeInput(v *DescribeSnapshotAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeSnapshotAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeSpotFleetInstancesInput(v *DescribeSpotFleetInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeSpotFleetInstancesInput"} - if v.SpotFleetRequestId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SpotFleetRequestId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeSpotFleetRequestHistoryInput(v *DescribeSpotFleetRequestHistoryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeSpotFleetRequestHistoryInput"} - if v.SpotFleetRequestId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SpotFleetRequestId")) - } - if v.StartTime == nil { - invalidParams.Add(smithy.NewErrParamRequired("StartTime")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeStaleSecurityGroupsInput(v *DescribeStaleSecurityGroupsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeStaleSecurityGroupsInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeVolumeAttributeInput(v *DescribeVolumeAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeVolumeAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeVpcAttributeInput(v *DescribeVpcAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeVpcAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeVpcEndpointServicePermissionsInput(v *DescribeVpcEndpointServicePermissionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeVpcEndpointServicePermissionsInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDetachClassicLinkVpcInput(v *DetachClassicLinkVpcInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DetachClassicLinkVpcInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDetachInternetGatewayInput(v *DetachInternetGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DetachInternetGatewayInput"} - if v.InternetGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InternetGatewayId")) - } - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDetachNetworkInterfaceInput(v *DetachNetworkInterfaceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DetachNetworkInterfaceInput"} - if v.AttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDetachVerifiedAccessTrustProviderInput(v *DetachVerifiedAccessTrustProviderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DetachVerifiedAccessTrustProviderInput"} - if v.VerifiedAccessInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessInstanceId")) - } - if v.VerifiedAccessTrustProviderId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessTrustProviderId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDetachVolumeInput(v *DetachVolumeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DetachVolumeInput"} - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDetachVpnGatewayInput(v *DetachVpnGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DetachVpnGatewayInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if v.VpnGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableAddressTransferInput(v *DisableAddressTransferInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableAddressTransferInput"} - if v.AllocationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AllocationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableFastLaunchInput(v *DisableFastLaunchInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableFastLaunchInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableFastSnapshotRestoresInput(v *DisableFastSnapshotRestoresInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableFastSnapshotRestoresInput"} - if v.AvailabilityZones == nil { - invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZones")) - } - if v.SourceSnapshotIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceSnapshotIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableImageDeprecationInput(v *DisableImageDeprecationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableImageDeprecationInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableImageInput(v *DisableImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableImageInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableIpamOrganizationAdminAccountInput(v *DisableIpamOrganizationAdminAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableIpamOrganizationAdminAccountInput"} - if v.DelegatedAdminAccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DelegatedAdminAccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableTransitGatewayRouteTablePropagationInput(v *DisableTransitGatewayRouteTablePropagationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableTransitGatewayRouteTablePropagationInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableVgwRoutePropagationInput(v *DisableVgwRoutePropagationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableVgwRoutePropagationInput"} - if v.GatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GatewayId")) - } - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableVpcClassicLinkInput(v *DisableVpcClassicLinkInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableVpcClassicLinkInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateClientVpnTargetNetworkInput(v *DisassociateClientVpnTargetNetworkInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateClientVpnTargetNetworkInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateEnclaveCertificateIamRoleInput(v *DisassociateEnclaveCertificateIamRoleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateEnclaveCertificateIamRoleInput"} - if v.CertificateArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CertificateArn")) - } - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateIamInstanceProfileInput(v *DisassociateIamInstanceProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateIamInstanceProfileInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateInstanceEventWindowInput(v *DisassociateInstanceEventWindowInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateInstanceEventWindowInput"} - if v.InstanceEventWindowId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceEventWindowId")) - } - if v.AssociationTarget == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationTarget")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateIpamByoasnInput(v *DisassociateIpamByoasnInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateIpamByoasnInput"} - if v.Asn == nil { - invalidParams.Add(smithy.NewErrParamRequired("Asn")) - } - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateIpamResourceDiscoveryInput(v *DisassociateIpamResourceDiscoveryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateIpamResourceDiscoveryInput"} - if v.IpamResourceDiscoveryAssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryAssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateNatGatewayAddressInput(v *DisassociateNatGatewayAddressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateNatGatewayAddressInput"} - if v.NatGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NatGatewayId")) - } - if v.AssociationIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateRouteTableInput(v *DisassociateRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateRouteTableInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateSubnetCidrBlockInput(v *DisassociateSubnetCidrBlockInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateSubnetCidrBlockInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateTransitGatewayMulticastDomainInput(v *DisassociateTransitGatewayMulticastDomainInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateTransitGatewayMulticastDomainInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if v.SubnetIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateTransitGatewayPolicyTableInput(v *DisassociateTransitGatewayPolicyTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateTransitGatewayPolicyTableInput"} - if v.TransitGatewayPolicyTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayPolicyTableId")) - } - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateTransitGatewayRouteTableInput(v *DisassociateTransitGatewayRouteTableInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateTransitGatewayRouteTableInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateTrunkInterfaceInput(v *DisassociateTrunkInterfaceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateTrunkInterfaceInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateVpcCidrBlockInput(v *DisassociateVpcCidrBlockInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateVpcCidrBlockInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableAddressTransferInput(v *EnableAddressTransferInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableAddressTransferInput"} - if v.AllocationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AllocationId")) - } - if v.TransferAccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransferAccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableFastLaunchInput(v *EnableFastLaunchInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableFastLaunchInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if v.LaunchTemplate != nil { - if err := validateFastLaunchLaunchTemplateSpecificationRequest(v.LaunchTemplate); err != nil { - invalidParams.AddNested("LaunchTemplate", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableFastSnapshotRestoresInput(v *EnableFastSnapshotRestoresInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableFastSnapshotRestoresInput"} - if v.AvailabilityZones == nil { - invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZones")) - } - if v.SourceSnapshotIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceSnapshotIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableImageBlockPublicAccessInput(v *EnableImageBlockPublicAccessInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableImageBlockPublicAccessInput"} - if len(v.ImageBlockPublicAccessState) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ImageBlockPublicAccessState")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableImageDeprecationInput(v *EnableImageDeprecationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableImageDeprecationInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if v.DeprecateAt == nil { - invalidParams.Add(smithy.NewErrParamRequired("DeprecateAt")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableImageInput(v *EnableImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableImageInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableIpamOrganizationAdminAccountInput(v *EnableIpamOrganizationAdminAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableIpamOrganizationAdminAccountInput"} - if v.DelegatedAdminAccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DelegatedAdminAccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableSnapshotBlockPublicAccessInput(v *EnableSnapshotBlockPublicAccessInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableSnapshotBlockPublicAccessInput"} - if len(v.State) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("State")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableTransitGatewayRouteTablePropagationInput(v *EnableTransitGatewayRouteTablePropagationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableTransitGatewayRouteTablePropagationInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableVgwRoutePropagationInput(v *EnableVgwRoutePropagationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableVgwRoutePropagationInput"} - if v.GatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GatewayId")) - } - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableVolumeIOInput(v *EnableVolumeIOInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableVolumeIOInput"} - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableVpcClassicLinkInput(v *EnableVpcClassicLinkInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableVpcClassicLinkInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpExportClientVpnClientCertificateRevocationListInput(v *ExportClientVpnClientCertificateRevocationListInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ExportClientVpnClientCertificateRevocationListInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpExportClientVpnClientConfigurationInput(v *ExportClientVpnClientConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ExportClientVpnClientConfigurationInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpExportImageInput(v *ExportImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ExportImageInput"} - if len(v.DiskImageFormat) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("DiskImageFormat")) - } - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if v.S3ExportLocation == nil { - invalidParams.Add(smithy.NewErrParamRequired("S3ExportLocation")) - } else if v.S3ExportLocation != nil { - if err := validateExportTaskS3LocationRequest(v.S3ExportLocation); err != nil { - invalidParams.AddNested("S3ExportLocation", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpExportTransitGatewayRoutesInput(v *ExportTransitGatewayRoutesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ExportTransitGatewayRoutesInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.S3Bucket == nil { - invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAssociatedEnclaveCertificateIamRolesInput(v *GetAssociatedEnclaveCertificateIamRolesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAssociatedEnclaveCertificateIamRolesInput"} - if v.CertificateArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CertificateArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAssociatedIpv6PoolCidrsInput(v *GetAssociatedIpv6PoolCidrsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAssociatedIpv6PoolCidrsInput"} - if v.PoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetCapacityReservationUsageInput(v *GetCapacityReservationUsageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetCapacityReservationUsageInput"} - if v.CapacityReservationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetCoipPoolUsageInput(v *GetCoipPoolUsageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetCoipPoolUsageInput"} - if v.PoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetConsoleOutputInput(v *GetConsoleOutputInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetConsoleOutputInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetConsoleScreenshotInput(v *GetConsoleScreenshotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetConsoleScreenshotInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetDefaultCreditSpecificationInput(v *GetDefaultCreditSpecificationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetDefaultCreditSpecificationInput"} - if len(v.InstanceFamily) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InstanceFamily")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetFlowLogsIntegrationTemplateInput(v *GetFlowLogsIntegrationTemplateInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetFlowLogsIntegrationTemplateInput"} - if v.FlowLogId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FlowLogId")) - } - if v.ConfigDeliveryS3DestinationArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConfigDeliveryS3DestinationArn")) - } - if v.IntegrateServices == nil { - invalidParams.Add(smithy.NewErrParamRequired("IntegrateServices")) - } else if v.IntegrateServices != nil { - if err := validateIntegrateServices(v.IntegrateServices); err != nil { - invalidParams.AddNested("IntegrateServices", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetGroupsForCapacityReservationInput(v *GetGroupsForCapacityReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetGroupsForCapacityReservationInput"} - if v.CapacityReservationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetHostReservationPurchasePreviewInput(v *GetHostReservationPurchasePreviewInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetHostReservationPurchasePreviewInput"} - if v.HostIdSet == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostIdSet")) - } - if v.OfferingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("OfferingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetInstanceTypesFromInstanceRequirementsInput(v *GetInstanceTypesFromInstanceRequirementsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetInstanceTypesFromInstanceRequirementsInput"} - if v.ArchitectureTypes == nil { - invalidParams.Add(smithy.NewErrParamRequired("ArchitectureTypes")) - } - if v.VirtualizationTypes == nil { - invalidParams.Add(smithy.NewErrParamRequired("VirtualizationTypes")) - } - if v.InstanceRequirements == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceRequirements")) - } else if v.InstanceRequirements != nil { - if err := validateInstanceRequirementsRequest(v.InstanceRequirements); err != nil { - invalidParams.AddNested("InstanceRequirements", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetInstanceUefiDataInput(v *GetInstanceUefiDataInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetInstanceUefiDataInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamAddressHistoryInput(v *GetIpamAddressHistoryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamAddressHistoryInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if v.IpamScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamScopeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamDiscoveredAccountsInput(v *GetIpamDiscoveredAccountsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamDiscoveredAccountsInput"} - if v.IpamResourceDiscoveryId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryId")) - } - if v.DiscoveryRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("DiscoveryRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamDiscoveredPublicAddressesInput(v *GetIpamDiscoveredPublicAddressesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamDiscoveredPublicAddressesInput"} - if v.IpamResourceDiscoveryId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryId")) - } - if v.AddressRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("AddressRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamDiscoveredResourceCidrsInput(v *GetIpamDiscoveredResourceCidrsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamDiscoveredResourceCidrsInput"} - if v.IpamResourceDiscoveryId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryId")) - } - if v.ResourceRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamPoolAllocationsInput(v *GetIpamPoolAllocationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamPoolAllocationsInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamPoolCidrsInput(v *GetIpamPoolCidrsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamPoolCidrsInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetIpamResourceCidrsInput(v *GetIpamResourceCidrsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetIpamResourceCidrsInput"} - if v.IpamScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamScopeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetLaunchTemplateDataInput(v *GetLaunchTemplateDataInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetLaunchTemplateDataInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetManagedPrefixListAssociationsInput(v *GetManagedPrefixListAssociationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetManagedPrefixListAssociationsInput"} - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetManagedPrefixListEntriesInput(v *GetManagedPrefixListEntriesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetManagedPrefixListEntriesInput"} - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetNetworkInsightsAccessScopeAnalysisFindingsInput(v *GetNetworkInsightsAccessScopeAnalysisFindingsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetNetworkInsightsAccessScopeAnalysisFindingsInput"} - if v.NetworkInsightsAccessScopeAnalysisId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsAccessScopeAnalysisId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetNetworkInsightsAccessScopeContentInput(v *GetNetworkInsightsAccessScopeContentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetNetworkInsightsAccessScopeContentInput"} - if v.NetworkInsightsAccessScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsAccessScopeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetPasswordDataInput(v *GetPasswordDataInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetPasswordDataInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetReservedInstancesExchangeQuoteInput(v *GetReservedInstancesExchangeQuoteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetReservedInstancesExchangeQuoteInput"} - if v.ReservedInstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstanceIds")) - } - if v.TargetConfigurations != nil { - if err := validateTargetConfigurationRequestSet(v.TargetConfigurations); err != nil { - invalidParams.AddNested("TargetConfigurations", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSecurityGroupsForVpcInput(v *GetSecurityGroupsForVpcInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSecurityGroupsForVpcInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSpotPlacementScoresInput(v *GetSpotPlacementScoresInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSpotPlacementScoresInput"} - if v.TargetCapacity == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetCapacity")) - } - if v.InstanceRequirementsWithMetadata != nil { - if err := validateInstanceRequirementsWithMetadataRequest(v.InstanceRequirementsWithMetadata); err != nil { - invalidParams.AddNested("InstanceRequirementsWithMetadata", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSubnetCidrReservationsInput(v *GetSubnetCidrReservationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSubnetCidrReservationsInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayAttachmentPropagationsInput(v *GetTransitGatewayAttachmentPropagationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayAttachmentPropagationsInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayMulticastDomainAssociationsInput(v *GetTransitGatewayMulticastDomainAssociationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayMulticastDomainAssociationsInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayPolicyTableAssociationsInput(v *GetTransitGatewayPolicyTableAssociationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayPolicyTableAssociationsInput"} - if v.TransitGatewayPolicyTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayPolicyTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayPolicyTableEntriesInput(v *GetTransitGatewayPolicyTableEntriesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayPolicyTableEntriesInput"} - if v.TransitGatewayPolicyTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayPolicyTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayPrefixListReferencesInput(v *GetTransitGatewayPrefixListReferencesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayPrefixListReferencesInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayRouteTableAssociationsInput(v *GetTransitGatewayRouteTableAssociationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayRouteTableAssociationsInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTransitGatewayRouteTablePropagationsInput(v *GetTransitGatewayRouteTablePropagationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTransitGatewayRouteTablePropagationsInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVerifiedAccessEndpointPolicyInput(v *GetVerifiedAccessEndpointPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVerifiedAccessEndpointPolicyInput"} - if v.VerifiedAccessEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVerifiedAccessGroupPolicyInput(v *GetVerifiedAccessGroupPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVerifiedAccessGroupPolicyInput"} - if v.VerifiedAccessGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVpnConnectionDeviceSampleConfigurationInput(v *GetVpnConnectionDeviceSampleConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVpnConnectionDeviceSampleConfigurationInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if v.VpnConnectionDeviceTypeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionDeviceTypeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVpnTunnelReplacementStatusInput(v *GetVpnTunnelReplacementStatusInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVpnTunnelReplacementStatusInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if v.VpnTunnelOutsideIpAddress == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnTunnelOutsideIpAddress")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpImportClientVpnClientCertificateRevocationListInput(v *ImportClientVpnClientCertificateRevocationListInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ImportClientVpnClientCertificateRevocationListInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.CertificateRevocationList == nil { - invalidParams.Add(smithy.NewErrParamRequired("CertificateRevocationList")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpImportInstanceInput(v *ImportInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ImportInstanceInput"} - if v.DiskImages != nil { - if err := validateDiskImageList(v.DiskImages); err != nil { - invalidParams.AddNested("DiskImages", err.(smithy.InvalidParamsError)) - } - } - if len(v.Platform) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Platform")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpImportKeyPairInput(v *ImportKeyPairInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ImportKeyPairInput"} - if v.KeyName == nil { - invalidParams.Add(smithy.NewErrParamRequired("KeyName")) - } - if v.PublicKeyMaterial == nil { - invalidParams.Add(smithy.NewErrParamRequired("PublicKeyMaterial")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpImportVolumeInput(v *ImportVolumeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ImportVolumeInput"} - if v.AvailabilityZone == nil { - invalidParams.Add(smithy.NewErrParamRequired("AvailabilityZone")) - } - if v.Image == nil { - invalidParams.Add(smithy.NewErrParamRequired("Image")) - } else if v.Image != nil { - if err := validateDiskImageDetail(v.Image); err != nil { - invalidParams.AddNested("Image", err.(smithy.InvalidParamsError)) - } - } - if v.Volume == nil { - invalidParams.Add(smithy.NewErrParamRequired("Volume")) - } else if v.Volume != nil { - if err := validateVolumeDetail(v.Volume); err != nil { - invalidParams.AddNested("Volume", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpLockSnapshotInput(v *LockSnapshotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "LockSnapshotInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if len(v.LockMode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("LockMode")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyAddressAttributeInput(v *ModifyAddressAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyAddressAttributeInput"} - if v.AllocationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AllocationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyAvailabilityZoneGroupInput(v *ModifyAvailabilityZoneGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyAvailabilityZoneGroupInput"} - if v.GroupName == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupName")) - } - if len(v.OptInStatus) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("OptInStatus")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyCapacityReservationFleetInput(v *ModifyCapacityReservationFleetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyCapacityReservationFleetInput"} - if v.CapacityReservationFleetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationFleetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyCapacityReservationInput(v *ModifyCapacityReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyCapacityReservationInput"} - if v.CapacityReservationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyClientVpnEndpointInput(v *ModifyClientVpnEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyClientVpnEndpointInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyDefaultCreditSpecificationInput(v *ModifyDefaultCreditSpecificationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyDefaultCreditSpecificationInput"} - if len(v.InstanceFamily) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InstanceFamily")) - } - if v.CpuCredits == nil { - invalidParams.Add(smithy.NewErrParamRequired("CpuCredits")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyEbsDefaultKmsKeyIdInput(v *ModifyEbsDefaultKmsKeyIdInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyEbsDefaultKmsKeyIdInput"} - if v.KmsKeyId == nil { - invalidParams.Add(smithy.NewErrParamRequired("KmsKeyId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyFleetInput(v *ModifyFleetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyFleetInput"} - if v.LaunchTemplateConfigs != nil { - if err := validateFleetLaunchTemplateConfigListRequest(v.LaunchTemplateConfigs); err != nil { - invalidParams.AddNested("LaunchTemplateConfigs", err.(smithy.InvalidParamsError)) - } - } - if v.FleetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FleetId")) - } - if v.TargetCapacitySpecification != nil { - if err := validateTargetCapacitySpecificationRequest(v.TargetCapacitySpecification); err != nil { - invalidParams.AddNested("TargetCapacitySpecification", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyFpgaImageAttributeInput(v *ModifyFpgaImageAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyFpgaImageAttributeInput"} - if v.FpgaImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FpgaImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyHostsInput(v *ModifyHostsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyHostsInput"} - if v.HostIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIdentityIdFormatInput(v *ModifyIdentityIdFormatInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIdentityIdFormatInput"} - if v.PrincipalArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) - } - if v.Resource == nil { - invalidParams.Add(smithy.NewErrParamRequired("Resource")) - } - if v.UseLongIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("UseLongIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIdFormatInput(v *ModifyIdFormatInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIdFormatInput"} - if v.Resource == nil { - invalidParams.Add(smithy.NewErrParamRequired("Resource")) - } - if v.UseLongIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("UseLongIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyImageAttributeInput(v *ModifyImageAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyImageAttributeInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceAttributeInput(v *ModifyInstanceAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceAttributeInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceCapacityReservationAttributesInput(v *ModifyInstanceCapacityReservationAttributesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceCapacityReservationAttributesInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.CapacityReservationSpecification == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityReservationSpecification")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceCreditSpecificationInput(v *ModifyInstanceCreditSpecificationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceCreditSpecificationInput"} - if v.InstanceCreditSpecifications == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceCreditSpecifications")) - } else if v.InstanceCreditSpecifications != nil { - if err := validateInstanceCreditSpecificationListRequest(v.InstanceCreditSpecifications); err != nil { - invalidParams.AddNested("InstanceCreditSpecifications", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceEventStartTimeInput(v *ModifyInstanceEventStartTimeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceEventStartTimeInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if v.InstanceEventId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceEventId")) - } - if v.NotBefore == nil { - invalidParams.Add(smithy.NewErrParamRequired("NotBefore")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceEventWindowInput(v *ModifyInstanceEventWindowInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceEventWindowInput"} - if v.InstanceEventWindowId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceEventWindowId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceMaintenanceOptionsInput(v *ModifyInstanceMaintenanceOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceMaintenanceOptionsInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstanceMetadataOptionsInput(v *ModifyInstanceMetadataOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstanceMetadataOptionsInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyInstancePlacementInput(v *ModifyInstancePlacementInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyInstancePlacementInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIpamInput(v *ModifyIpamInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIpamInput"} - if v.IpamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIpamPoolInput(v *ModifyIpamPoolInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIpamPoolInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIpamResourceCidrInput(v *ModifyIpamResourceCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIpamResourceCidrInput"} - if v.ResourceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) - } - if v.ResourceCidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceCidr")) - } - if v.ResourceRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceRegion")) - } - if v.CurrentIpamScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CurrentIpamScopeId")) - } - if v.Monitored == nil { - invalidParams.Add(smithy.NewErrParamRequired("Monitored")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIpamResourceDiscoveryInput(v *ModifyIpamResourceDiscoveryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIpamResourceDiscoveryInput"} - if v.IpamResourceDiscoveryId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamResourceDiscoveryId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyIpamScopeInput(v *ModifyIpamScopeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyIpamScopeInput"} - if v.IpamScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamScopeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyLocalGatewayRouteInput(v *ModifyLocalGatewayRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyLocalGatewayRouteInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyManagedPrefixListInput(v *ModifyManagedPrefixListInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyManagedPrefixListInput"} - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if v.AddEntries != nil { - if err := validateAddPrefixListEntries(v.AddEntries); err != nil { - invalidParams.AddNested("AddEntries", err.(smithy.InvalidParamsError)) - } - } - if v.RemoveEntries != nil { - if err := validateRemovePrefixListEntries(v.RemoveEntries); err != nil { - invalidParams.AddNested("RemoveEntries", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyNetworkInterfaceAttributeInput(v *ModifyNetworkInterfaceAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyNetworkInterfaceAttributeInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyPrivateDnsNameOptionsInput(v *ModifyPrivateDnsNameOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyPrivateDnsNameOptionsInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyReservedInstancesInput(v *ModifyReservedInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyReservedInstancesInput"} - if v.ReservedInstancesIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesIds")) - } - if v.TargetConfigurations == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetConfigurations")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifySecurityGroupRulesInput(v *ModifySecurityGroupRulesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifySecurityGroupRulesInput"} - if v.GroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupId")) - } - if v.SecurityGroupRules == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupRules")) - } else if v.SecurityGroupRules != nil { - if err := validateSecurityGroupRuleUpdateList(v.SecurityGroupRules); err != nil { - invalidParams.AddNested("SecurityGroupRules", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifySnapshotAttributeInput(v *ModifySnapshotAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifySnapshotAttributeInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifySnapshotTierInput(v *ModifySnapshotTierInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifySnapshotTierInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifySpotFleetRequestInput(v *ModifySpotFleetRequestInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifySpotFleetRequestInput"} - if v.SpotFleetRequestId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SpotFleetRequestId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifySubnetAttributeInput(v *ModifySubnetAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifySubnetAttributeInput"} - if v.SubnetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyTrafficMirrorFilterNetworkServicesInput(v *ModifyTrafficMirrorFilterNetworkServicesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyTrafficMirrorFilterNetworkServicesInput"} - if v.TrafficMirrorFilterId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorFilterId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyTrafficMirrorFilterRuleInput(v *ModifyTrafficMirrorFilterRuleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyTrafficMirrorFilterRuleInput"} - if v.TrafficMirrorFilterRuleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorFilterRuleId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyTrafficMirrorSessionInput(v *ModifyTrafficMirrorSessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyTrafficMirrorSessionInput"} - if v.TrafficMirrorSessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficMirrorSessionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyTransitGatewayInput(v *ModifyTransitGatewayInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyTransitGatewayInput"} - if v.TransitGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyTransitGatewayPrefixListReferenceInput(v *ModifyTransitGatewayPrefixListReferenceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyTransitGatewayPrefixListReferenceInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyTransitGatewayVpcAttachmentInput(v *ModifyTransitGatewayVpcAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyTransitGatewayVpcAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessEndpointInput(v *ModifyVerifiedAccessEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessEndpointInput"} - if v.VerifiedAccessEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessEndpointPolicyInput(v *ModifyVerifiedAccessEndpointPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessEndpointPolicyInput"} - if v.VerifiedAccessEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessGroupInput(v *ModifyVerifiedAccessGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessGroupInput"} - if v.VerifiedAccessGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessGroupPolicyInput(v *ModifyVerifiedAccessGroupPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessGroupPolicyInput"} - if v.VerifiedAccessGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessInstanceInput(v *ModifyVerifiedAccessInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessInstanceInput"} - if v.VerifiedAccessInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessInstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessInstanceLoggingConfigurationInput(v *ModifyVerifiedAccessInstanceLoggingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessInstanceLoggingConfigurationInput"} - if v.VerifiedAccessInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessInstanceId")) - } - if v.AccessLogs == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccessLogs")) - } else if v.AccessLogs != nil { - if err := validateVerifiedAccessLogOptions(v.AccessLogs); err != nil { - invalidParams.AddNested("AccessLogs", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVerifiedAccessTrustProviderInput(v *ModifyVerifiedAccessTrustProviderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVerifiedAccessTrustProviderInput"} - if v.VerifiedAccessTrustProviderId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VerifiedAccessTrustProviderId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVolumeAttributeInput(v *ModifyVolumeAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVolumeAttributeInput"} - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVolumeInput(v *ModifyVolumeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVolumeInput"} - if v.VolumeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VolumeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcAttributeInput(v *ModifyVpcAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcAttributeInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcEndpointConnectionNotificationInput(v *ModifyVpcEndpointConnectionNotificationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcEndpointConnectionNotificationInput"} - if v.ConnectionNotificationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConnectionNotificationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcEndpointInput(v *ModifyVpcEndpointInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcEndpointInput"} - if v.VpcEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcEndpointServiceConfigurationInput(v *ModifyVpcEndpointServiceConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcEndpointServiceConfigurationInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcEndpointServicePayerResponsibilityInput(v *ModifyVpcEndpointServicePayerResponsibilityInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcEndpointServicePayerResponsibilityInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if len(v.PayerResponsibility) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("PayerResponsibility")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcEndpointServicePermissionsInput(v *ModifyVpcEndpointServicePermissionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcEndpointServicePermissionsInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcPeeringConnectionOptionsInput(v *ModifyVpcPeeringConnectionOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcPeeringConnectionOptionsInput"} - if v.VpcPeeringConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcPeeringConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpcTenancyInput(v *ModifyVpcTenancyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpcTenancyInput"} - if v.VpcId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcId")) - } - if len(v.InstanceTenancy) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InstanceTenancy")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpnConnectionInput(v *ModifyVpnConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpnConnectionInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpnConnectionOptionsInput(v *ModifyVpnConnectionOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpnConnectionOptionsInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpnTunnelCertificateInput(v *ModifyVpnTunnelCertificateInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpnTunnelCertificateInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if v.VpnTunnelOutsideIpAddress == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnTunnelOutsideIpAddress")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpModifyVpnTunnelOptionsInput(v *ModifyVpnTunnelOptionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ModifyVpnTunnelOptionsInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if v.VpnTunnelOutsideIpAddress == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnTunnelOutsideIpAddress")) - } - if v.TunnelOptions == nil { - invalidParams.Add(smithy.NewErrParamRequired("TunnelOptions")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpMonitorInstancesInput(v *MonitorInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "MonitorInstancesInput"} - if v.InstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpMoveAddressToVpcInput(v *MoveAddressToVpcInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "MoveAddressToVpcInput"} - if v.PublicIp == nil { - invalidParams.Add(smithy.NewErrParamRequired("PublicIp")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpMoveByoipCidrToIpamInput(v *MoveByoipCidrToIpamInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "MoveByoipCidrToIpamInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if v.IpamPoolOwner == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolOwner")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpProvisionByoipCidrInput(v *ProvisionByoipCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ProvisionByoipCidrInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if v.CidrAuthorizationContext != nil { - if err := validateCidrAuthorizationContext(v.CidrAuthorizationContext); err != nil { - invalidParams.AddNested("CidrAuthorizationContext", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpProvisionIpamByoasnInput(v *ProvisionIpamByoasnInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ProvisionIpamByoasnInput"} - if v.IpamId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamId")) - } - if v.Asn == nil { - invalidParams.Add(smithy.NewErrParamRequired("Asn")) - } - if v.AsnAuthorizationContext == nil { - invalidParams.Add(smithy.NewErrParamRequired("AsnAuthorizationContext")) - } else if v.AsnAuthorizationContext != nil { - if err := validateAsnAuthorizationContext(v.AsnAuthorizationContext); err != nil { - invalidParams.AddNested("AsnAuthorizationContext", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpProvisionIpamPoolCidrInput(v *ProvisionIpamPoolCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ProvisionIpamPoolCidrInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpProvisionPublicIpv4PoolCidrInput(v *ProvisionPublicIpv4PoolCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ProvisionPublicIpv4PoolCidrInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if v.PoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PoolId")) - } - if v.NetmaskLength == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetmaskLength")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPurchaseCapacityBlockInput(v *PurchaseCapacityBlockInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PurchaseCapacityBlockInput"} - if v.CapacityBlockOfferingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CapacityBlockOfferingId")) - } - if len(v.InstancePlatform) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("InstancePlatform")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPurchaseHostReservationInput(v *PurchaseHostReservationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PurchaseHostReservationInput"} - if v.HostIdSet == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostIdSet")) - } - if v.OfferingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("OfferingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPurchaseReservedInstancesOfferingInput(v *PurchaseReservedInstancesOfferingInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PurchaseReservedInstancesOfferingInput"} - if v.InstanceCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceCount")) - } - if v.ReservedInstancesOfferingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReservedInstancesOfferingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPurchaseScheduledInstancesInput(v *PurchaseScheduledInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PurchaseScheduledInstancesInput"} - if v.PurchaseRequests == nil { - invalidParams.Add(smithy.NewErrParamRequired("PurchaseRequests")) - } else if v.PurchaseRequests != nil { - if err := validatePurchaseRequestSet(v.PurchaseRequests); err != nil { - invalidParams.AddNested("PurchaseRequests", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRebootInstancesInput(v *RebootInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RebootInstancesInput"} - if v.InstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRegisterImageInput(v *RegisterImageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RegisterImageInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRegisterInstanceEventNotificationAttributesInput(v *RegisterInstanceEventNotificationAttributesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RegisterInstanceEventNotificationAttributesInput"} - if v.InstanceTagAttribute == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceTagAttribute")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRegisterTransitGatewayMulticastGroupMembersInput(v *RegisterTransitGatewayMulticastGroupMembersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RegisterTransitGatewayMulticastGroupMembersInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if v.NetworkInterfaceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRegisterTransitGatewayMulticastGroupSourcesInput(v *RegisterTransitGatewayMulticastGroupSourcesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RegisterTransitGatewayMulticastGroupSourcesInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if v.NetworkInterfaceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRejectTransitGatewayPeeringAttachmentInput(v *RejectTransitGatewayPeeringAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RejectTransitGatewayPeeringAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRejectTransitGatewayVpcAttachmentInput(v *RejectTransitGatewayVpcAttachmentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RejectTransitGatewayVpcAttachmentInput"} - if v.TransitGatewayAttachmentId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayAttachmentId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRejectVpcEndpointConnectionsInput(v *RejectVpcEndpointConnectionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RejectVpcEndpointConnectionsInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if v.VpcEndpointIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcEndpointIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRejectVpcPeeringConnectionInput(v *RejectVpcPeeringConnectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RejectVpcPeeringConnectionInput"} - if v.VpcPeeringConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpcPeeringConnectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReleaseHostsInput(v *ReleaseHostsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReleaseHostsInput"} - if v.HostIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReleaseIpamPoolAllocationInput(v *ReleaseIpamPoolAllocationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReleaseIpamPoolAllocationInput"} - if v.IpamPoolId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolId")) - } - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if v.IpamPoolAllocationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("IpamPoolAllocationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceIamInstanceProfileAssociationInput(v *ReplaceIamInstanceProfileAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceIamInstanceProfileAssociationInput"} - if v.IamInstanceProfile == nil { - invalidParams.Add(smithy.NewErrParamRequired("IamInstanceProfile")) - } - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceNetworkAclAssociationInput(v *ReplaceNetworkAclAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceNetworkAclAssociationInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if v.NetworkAclId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceNetworkAclEntryInput(v *ReplaceNetworkAclEntryInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceNetworkAclEntryInput"} - if v.Egress == nil { - invalidParams.Add(smithy.NewErrParamRequired("Egress")) - } - if v.NetworkAclId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkAclId")) - } - if v.Protocol == nil { - invalidParams.Add(smithy.NewErrParamRequired("Protocol")) - } - if len(v.RuleAction) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("RuleAction")) - } - if v.RuleNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("RuleNumber")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceRouteInput(v *ReplaceRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceRouteInput"} - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceRouteTableAssociationInput(v *ReplaceRouteTableAssociationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceRouteTableAssociationInput"} - if v.AssociationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AssociationId")) - } - if v.RouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceTransitGatewayRouteInput(v *ReplaceTransitGatewayRouteInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceTransitGatewayRouteInput"} - if v.DestinationCidrBlock == nil { - invalidParams.Add(smithy.NewErrParamRequired("DestinationCidrBlock")) - } - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplaceVpnTunnelInput(v *ReplaceVpnTunnelInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplaceVpnTunnelInput"} - if v.VpnConnectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnConnectionId")) - } - if v.VpnTunnelOutsideIpAddress == nil { - invalidParams.Add(smithy.NewErrParamRequired("VpnTunnelOutsideIpAddress")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReportInstanceStatusInput(v *ReportInstanceStatusInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReportInstanceStatusInput"} - if v.Instances == nil { - invalidParams.Add(smithy.NewErrParamRequired("Instances")) - } - if v.ReasonCodes == nil { - invalidParams.Add(smithy.NewErrParamRequired("ReasonCodes")) - } - if len(v.Status) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Status")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRequestSpotFleetInput(v *RequestSpotFleetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RequestSpotFleetInput"} - if v.SpotFleetRequestConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("SpotFleetRequestConfig")) - } else if v.SpotFleetRequestConfig != nil { - if err := validateSpotFleetRequestConfigData(v.SpotFleetRequestConfig); err != nil { - invalidParams.AddNested("SpotFleetRequestConfig", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRequestSpotInstancesInput(v *RequestSpotInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RequestSpotInstancesInput"} - if v.LaunchSpecification != nil { - if err := validateRequestSpotLaunchSpecification(v.LaunchSpecification); err != nil { - invalidParams.AddNested("LaunchSpecification", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpResetAddressAttributeInput(v *ResetAddressAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResetAddressAttributeInput"} - if v.AllocationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AllocationId")) - } - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpResetFpgaImageAttributeInput(v *ResetFpgaImageAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResetFpgaImageAttributeInput"} - if v.FpgaImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("FpgaImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpResetImageAttributeInput(v *ResetImageAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResetImageAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpResetInstanceAttributeInput(v *ResetInstanceAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResetInstanceAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpResetNetworkInterfaceAttributeInput(v *ResetNetworkInterfaceAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResetNetworkInterfaceAttributeInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpResetSnapshotAttributeInput(v *ResetSnapshotAttributeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResetSnapshotAttributeInput"} - if len(v.Attribute) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Attribute")) - } - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRestoreAddressToClassicInput(v *RestoreAddressToClassicInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RestoreAddressToClassicInput"} - if v.PublicIp == nil { - invalidParams.Add(smithy.NewErrParamRequired("PublicIp")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRestoreImageFromRecycleBinInput(v *RestoreImageFromRecycleBinInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RestoreImageFromRecycleBinInput"} - if v.ImageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ImageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRestoreManagedPrefixListVersionInput(v *RestoreManagedPrefixListVersionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RestoreManagedPrefixListVersionInput"} - if v.PrefixListId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrefixListId")) - } - if v.PreviousVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("PreviousVersion")) - } - if v.CurrentVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("CurrentVersion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRestoreSnapshotFromRecycleBinInput(v *RestoreSnapshotFromRecycleBinInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RestoreSnapshotFromRecycleBinInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRestoreSnapshotTierInput(v *RestoreSnapshotTierInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RestoreSnapshotTierInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRevokeClientVpnIngressInput(v *RevokeClientVpnIngressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RevokeClientVpnIngressInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if v.TargetNetworkCidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetNetworkCidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRevokeSecurityGroupEgressInput(v *RevokeSecurityGroupEgressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RevokeSecurityGroupEgressInput"} - if v.GroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRunInstancesInput(v *RunInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RunInstancesInput"} - if v.MaxCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("MaxCount")) - } - if v.MinCount == nil { - invalidParams.Add(smithy.NewErrParamRequired("MinCount")) - } - if v.Monitoring != nil { - if err := validateRunInstancesMonitoringEnabled(v.Monitoring); err != nil { - invalidParams.AddNested("Monitoring", err.(smithy.InvalidParamsError)) - } - } - if v.ElasticGpuSpecification != nil { - if err := validateElasticGpuSpecifications(v.ElasticGpuSpecification); err != nil { - invalidParams.AddNested("ElasticGpuSpecification", err.(smithy.InvalidParamsError)) - } - } - if v.ElasticInferenceAccelerators != nil { - if err := validateElasticInferenceAccelerators(v.ElasticInferenceAccelerators); err != nil { - invalidParams.AddNested("ElasticInferenceAccelerators", err.(smithy.InvalidParamsError)) - } - } - if v.CreditSpecification != nil { - if err := validateCreditSpecificationRequest(v.CreditSpecification); err != nil { - invalidParams.AddNested("CreditSpecification", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRunScheduledInstancesInput(v *RunScheduledInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RunScheduledInstancesInput"} - if v.LaunchSpecification == nil { - invalidParams.Add(smithy.NewErrParamRequired("LaunchSpecification")) - } else if v.LaunchSpecification != nil { - if err := validateScheduledInstancesLaunchSpecification(v.LaunchSpecification); err != nil { - invalidParams.AddNested("LaunchSpecification", err.(smithy.InvalidParamsError)) - } - } - if v.ScheduledInstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ScheduledInstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpSearchLocalGatewayRoutesInput(v *SearchLocalGatewayRoutesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SearchLocalGatewayRoutesInput"} - if v.LocalGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocalGatewayRouteTableId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpSearchTransitGatewayMulticastGroupsInput(v *SearchTransitGatewayMulticastGroupsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SearchTransitGatewayMulticastGroupsInput"} - if v.TransitGatewayMulticastDomainId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayMulticastDomainId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpSearchTransitGatewayRoutesInput(v *SearchTransitGatewayRoutesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SearchTransitGatewayRoutesInput"} - if v.TransitGatewayRouteTableId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransitGatewayRouteTableId")) - } - if v.Filters == nil { - invalidParams.Add(smithy.NewErrParamRequired("Filters")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpSendDiagnosticInterruptInput(v *SendDiagnosticInterruptInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SendDiagnosticInterruptInput"} - if v.InstanceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartInstancesInput(v *StartInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartInstancesInput"} - if v.InstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartNetworkInsightsAccessScopeAnalysisInput(v *StartNetworkInsightsAccessScopeAnalysisInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartNetworkInsightsAccessScopeAnalysisInput"} - if v.NetworkInsightsAccessScopeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsAccessScopeId")) - } - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartNetworkInsightsAnalysisInput(v *StartNetworkInsightsAnalysisInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartNetworkInsightsAnalysisInput"} - if v.NetworkInsightsPathId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInsightsPathId")) - } - if v.ClientToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartVpcEndpointServicePrivateDnsVerificationInput(v *StartVpcEndpointServicePrivateDnsVerificationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartVpcEndpointServicePrivateDnsVerificationInput"} - if v.ServiceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ServiceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStopInstancesInput(v *StopInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StopInstancesInput"} - if v.InstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTerminateClientVpnConnectionsInput(v *TerminateClientVpnConnectionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TerminateClientVpnConnectionsInput"} - if v.ClientVpnEndpointId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientVpnEndpointId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTerminateInstancesInput(v *TerminateInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TerminateInstancesInput"} - if v.InstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUnassignIpv6AddressesInput(v *UnassignIpv6AddressesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UnassignIpv6AddressesInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUnassignPrivateIpAddressesInput(v *UnassignPrivateIpAddressesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UnassignPrivateIpAddressesInput"} - if v.NetworkInterfaceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NetworkInterfaceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUnassignPrivateNatGatewayAddressInput(v *UnassignPrivateNatGatewayAddressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UnassignPrivateNatGatewayAddressInput"} - if v.NatGatewayId == nil { - invalidParams.Add(smithy.NewErrParamRequired("NatGatewayId")) - } - if v.PrivateIpAddresses == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrivateIpAddresses")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUnlockSnapshotInput(v *UnlockSnapshotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UnlockSnapshotInput"} - if v.SnapshotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SnapshotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUnmonitorInstancesInput(v *UnmonitorInstancesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UnmonitorInstancesInput"} - if v.InstanceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("InstanceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpWithdrawByoipCidrInput(v *WithdrawByoipCidrInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "WithdrawByoipCidrInput"} - if v.Cidr == nil { - invalidParams.Add(smithy.NewErrParamRequired("Cidr")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md deleted file mode 100644 index cac6f926e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ /dev/null @@ -1,132 +0,0 @@ -# v1.11.1 (2024-02-21) - -* No change notes available for this release. - -# v1.11.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. - -# v1.10.4 (2023-12-07) - -* No change notes available for this release. - -# v1.10.3 (2023-11-30) - -* No change notes available for this release. - -# v1.10.2 (2023-11-29) - -* No change notes available for this release. - -# v1.10.1 (2023-11-15) - -* No change notes available for this release. - -# v1.10.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). - -# v1.9.15 (2023-10-06) - -* No change notes available for this release. - -# v1.9.14 (2023-08-18) - -* No change notes available for this release. - -# v1.9.13 (2023-08-07) - -* No change notes available for this release. - -# v1.9.12 (2023-07-31) - -* No change notes available for this release. - -# v1.9.11 (2022-12-02) - -* No change notes available for this release. - -# v1.9.10 (2022-10-24) - -* No change notes available for this release. - -# v1.9.9 (2022-09-14) - -* No change notes available for this release. - -# v1.9.8 (2022-09-02) - -* No change notes available for this release. - -# v1.9.7 (2022-08-31) - -* No change notes available for this release. - -# v1.9.6 (2022-08-29) - -* No change notes available for this release. - -# v1.9.5 (2022-08-11) - -* No change notes available for this release. - -# v1.9.4 (2022-08-09) - -* No change notes available for this release. - -# v1.9.3 (2022-06-29) - -* No change notes available for this release. - -# v1.9.2 (2022-06-07) - -* No change notes available for this release. - -# v1.9.1 (2022-03-24) - -* No change notes available for this release. - -# v1.9.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.8.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.7.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.6.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.5.0 (2021-11-06) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.4.0 (2021-10-21) - -* **Feature**: Updated to latest version - -# v1.3.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.2.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. - -# v1.2.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version - -# v1.2.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.1.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go deleted file mode 100644 index 3f451fc9b..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go +++ /dev/null @@ -1,176 +0,0 @@ -package acceptencoding - -import ( - "compress/gzip" - "context" - "fmt" - "io" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const acceptEncodingHeaderKey = "Accept-Encoding" -const contentEncodingHeaderKey = "Content-Encoding" - -// AddAcceptEncodingGzipOptions provides the options for the -// AddAcceptEncodingGzip middleware setup. -type AddAcceptEncodingGzipOptions struct { - Enable bool -} - -// AddAcceptEncodingGzip explicitly adds handling for accept-encoding GZIP -// middleware to the operation stack. This allows checksums to be correctly -// computed without disabling GZIP support. -func AddAcceptEncodingGzip(stack *middleware.Stack, options AddAcceptEncodingGzipOptions) error { - if options.Enable { - if err := stack.Finalize.Add(&EnableGzip{}, middleware.Before); err != nil { - return err - } - if err := stack.Deserialize.Insert(&DecompressGzip{}, "OperationDeserializer", middleware.After); err != nil { - return err - } - return nil - } - - return stack.Finalize.Add(&DisableGzip{}, middleware.Before) -} - -// DisableGzip provides the middleware that will -// disable the underlying http client automatically enabling for gzip -// decompress content-encoding support. -type DisableGzip struct{} - -// ID returns the id for the middleware. -func (*DisableGzip) ID() string { - return "DisableAcceptEncodingGzip" -} - -// HandleFinalize implements the FinalizeMiddleware interface. -func (*DisableGzip) HandleFinalize( - ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - output middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return output, metadata, &smithy.SerializationError{ - Err: fmt.Errorf("unknown request type %T", input.Request), - } - } - - // Explicitly enable gzip support, this will prevent the http client from - // auto extracting the zipped content. - req.Header.Set(acceptEncodingHeaderKey, "identity") - - return next.HandleFinalize(ctx, input) -} - -// EnableGzip provides a middleware to enable support for -// gzip responses, with manual decompression. This prevents the underlying HTTP -// client from performing the gzip decompression automatically. -type EnableGzip struct{} - -// ID returns the id for the middleware. -func (*EnableGzip) ID() string { - return "AcceptEncodingGzip" -} - -// HandleFinalize implements the FinalizeMiddleware interface. -func (*EnableGzip) HandleFinalize( - ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - output middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return output, metadata, &smithy.SerializationError{ - Err: fmt.Errorf("unknown request type %T", input.Request), - } - } - - // Explicitly enable gzip support, this will prevent the http client from - // auto extracting the zipped content. - req.Header.Set(acceptEncodingHeaderKey, "gzip") - - return next.HandleFinalize(ctx, input) -} - -// DecompressGzip provides the middleware for decompressing a gzip -// response from the service. -type DecompressGzip struct{} - -// ID returns the id for the middleware. -func (*DecompressGzip) ID() string { - return "DecompressGzip" -} - -// HandleDeserialize implements the DeserializeMiddlware interface. -func (*DecompressGzip) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - output middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - output, metadata, err = next.HandleDeserialize(ctx, input) - if err != nil { - return output, metadata, err - } - - resp, ok := output.RawResponse.(*smithyhttp.Response) - if !ok { - return output, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("unknown response type %T", output.RawResponse), - } - } - if v := resp.Header.Get(contentEncodingHeaderKey); v != "gzip" { - return output, metadata, err - } - - // Clear content length since it will no longer be valid once the response - // body is decompressed. - resp.Header.Del("Content-Length") - resp.ContentLength = -1 - - resp.Body = wrapGzipReader(resp.Body) - - return output, metadata, err -} - -type gzipReader struct { - reader io.ReadCloser - gzip *gzip.Reader -} - -func wrapGzipReader(reader io.ReadCloser) *gzipReader { - return &gzipReader{ - reader: reader, - } -} - -// Read wraps the gzip reader around the underlying io.Reader to extract the -// response bytes on the fly. -func (g *gzipReader) Read(b []byte) (n int, err error) { - if g.gzip == nil { - g.gzip, err = gzip.NewReader(g.reader) - if err != nil { - g.gzip = nil // ensure uninitialized gzip value isn't used in close. - return 0, fmt.Errorf("failed to decompress gzip response, %w", err) - } - } - - return g.gzip.Read(b) -} - -func (g *gzipReader) Close() error { - if g.gzip == nil { - return nil - } - - if err := g.gzip.Close(); err != nil { - g.reader.Close() - return fmt.Errorf("failed to decompress gzip response, %w", err) - } - - return g.reader.Close() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go deleted file mode 100644 index 7056d9bf6..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Package acceptencoding provides customizations associated with Accept Encoding Header. - -# Accept encoding gzip - -The Go HTTP client automatically supports accept-encoding and content-encoding -gzip by default. This default behavior is not desired by the SDK, and prevents -validating the response body's checksum. To prevent this the SDK must manually -control usage of content-encoding gzip. - -To control content-encoding, the SDK must always set the `Accept-Encoding` -header to a value. This prevents the HTTP client from using gzip automatically. -When gzip is enabled on the API client, the SDK's customization will control -decompressing the gzip data in order to not break the checksum validation. When -gzip is disabled, the API client will disable gzip, preventing the HTTP -client's default behavior. - -An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using -the below middleware. The option if present can be used to enable auto decompressing -gzip by the SDK. -*/ -package acceptencoding diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go deleted file mode 100644 index c5ae0f873..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package acceptencoding - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md deleted file mode 100644 index 38b0de284..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ /dev/null @@ -1,285 +0,0 @@ -# v1.11.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.10 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.9 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.8 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.7 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.6 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.3 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.37 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.36 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.35 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.34 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.33 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.32 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.31 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.30 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.29 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.28 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.27 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.26 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.25 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.24 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.23 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.22 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.21 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.20 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.19 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.18 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.17 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.16 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-11-06) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt deleted file mode 100644 index d64569567..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go deleted file mode 100644 index cc919701a..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go +++ /dev/null @@ -1,48 +0,0 @@ -package presignedurl - -import ( - "context" - - "github.com/aws/smithy-go/middleware" -) - -// WithIsPresigning adds the isPresigning sentinel value to a context to signal -// that the middleware stack is using the presign flow. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func WithIsPresigning(ctx context.Context) context.Context { - return middleware.WithStackValue(ctx, isPresigningKey{}, true) -} - -// GetIsPresigning returns if the context contains the isPresigning sentinel -// value for presigning flows. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetIsPresigning(ctx context.Context) bool { - v, _ := middleware.GetStackValue(ctx, isPresigningKey{}).(bool) - return v -} - -type isPresigningKey struct{} - -// AddAsIsPresigingMiddleware adds a middleware to the head of the stack that -// will update the stack's context to be flagged as being invoked for the -// purpose of presigning. -func AddAsIsPresigingMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before) -} - -type asIsPresigningMiddleware struct{} - -func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" } - -func (asIsPresigningMiddleware) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - ctx = WithIsPresigning(ctx) - return next.HandleInitialize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go deleted file mode 100644 index 1b85375cf..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package presignedurl provides the customizations for API clients to fill in -// presigned URLs into input parameters. -package presignedurl diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go deleted file mode 100644 index 0af263c5e..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package presignedurl - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.11.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go deleted file mode 100644 index 1e2f5c812..000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go +++ /dev/null @@ -1,110 +0,0 @@ -package presignedurl - -import ( - "context" - "fmt" - - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - - "github.com/aws/smithy-go/middleware" -) - -// URLPresigner provides the interface to presign the input parameters in to a -// presigned URL. -type URLPresigner interface { - // PresignURL presigns a URL. - PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error) -} - -// ParameterAccessor provides an collection of accessor to for retrieving and -// setting the values needed to PresignedURL generation -type ParameterAccessor struct { - // GetPresignedURL accessor points to a function that retrieves a presigned url if present - GetPresignedURL func(interface{}) (string, bool, error) - - // GetSourceRegion accessor points to a function that retrieves source region for presigned url - GetSourceRegion func(interface{}) (string, bool, error) - - // CopyInput accessor points to a function that takes in an input, and returns a copy. - CopyInput func(interface{}) (interface{}, error) - - // SetDestinationRegion accessor points to a function that sets destination region on api input struct - SetDestinationRegion func(interface{}, string) error - - // SetPresignedURL accessor points to a function that sets presigned url on api input struct - SetPresignedURL func(interface{}, string) error -} - -// Options provides the set of options needed by the presigned URL middleware. -type Options struct { - // Accessor are the parameter accessors used by this middleware - Accessor ParameterAccessor - - // Presigner is the URLPresigner used by the middleware - Presigner URLPresigner -} - -// AddMiddleware adds the Presign URL middleware to the middleware stack. -func AddMiddleware(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&presign{options: opts}, middleware.Before) -} - -// RemoveMiddleware removes the Presign URL middleware from the stack. -func RemoveMiddleware(stack *middleware.Stack) error { - _, err := stack.Initialize.Remove((*presign)(nil).ID()) - return err -} - -type presign struct { - options Options -} - -func (m *presign) ID() string { return "Presign" } - -func (m *presign) HandleInitialize( - ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler, -) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - // If PresignedURL is already set ignore middleware. - if _, ok, err := m.options.Accessor.GetPresignedURL(input.Parameters); err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } else if ok { - return next.HandleInitialize(ctx, input) - } - - // If have source region is not set ignore middleware. - srcRegion, ok, err := m.options.Accessor.GetSourceRegion(input.Parameters) - if err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } else if !ok || len(srcRegion) == 0 { - return next.HandleInitialize(ctx, input) - } - - // Create a copy of the original input so the destination region value can - // be added. This ensures that value does not leak into the original - // request parameters. - paramCpy, err := m.options.Accessor.CopyInput(input.Parameters) - if err != nil { - return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err) - } - - // Destination region is the API client's configured region. - dstRegion := awsmiddleware.GetRegion(ctx) - if err = m.options.Accessor.SetDestinationRegion(paramCpy, dstRegion); err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } - - presignedReq, err := m.options.Presigner.PresignURL(ctx, srcRegion, paramCpy) - if err != nil { - return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err) - } - - // Update the original input with the presigned URL value. - if err = m.options.Accessor.SetPresignedURL(input.Parameters, presignedReq.URL); err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } - - return next.HandleInitialize(ctx, input) -} diff --git a/vendor/github.com/aws/smithy-go/.gitignore b/vendor/github.com/aws/smithy-go/.gitignore deleted file mode 100644 index 2518b3491..000000000 --- a/vendor/github.com/aws/smithy-go/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -# Eclipse -.classpath -.project -.settings/ - -# Intellij -.idea/ -*.iml -*.iws - -# Mac -.DS_Store - -# Maven -target/ -**/dependency-reduced-pom.xml - -# Gradle -/.gradle -build/ -*/out/ -*/*/out/ - -# VS Code -bin/ -.vscode/ - -# make -c.out diff --git a/vendor/github.com/aws/smithy-go/.travis.yml b/vendor/github.com/aws/smithy-go/.travis.yml deleted file mode 100644 index f8d1035cc..000000000 --- a/vendor/github.com/aws/smithy-go/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go -sudo: true -dist: bionic - -branches: - only: - - main - -os: - - linux - - osx - # Travis doesn't work with windows and Go tip - #- windows - -go: - - tip - -matrix: - allow_failures: - - go: tip - -before_install: - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi - - (cd /tmp/; go get golang.org/x/lint/golint) - -script: - - make go test -v ./...; - diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md deleted file mode 100644 index b8d6561a4..000000000 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ /dev/null @@ -1,229 +0,0 @@ -# Release (2024-02-21) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.20.1 - * **Bug Fix**: Remove runtime dependency on go-cmp. - -# Release (2024-02-13) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.20.0 - * **Feature**: Add codegen definition for sigv4a trait. - * **Feature**: Bump minimum Go version to 1.20 per our language support policy. - -# Release (2023-12-07) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.19.0 - * **Feature**: Support modeled request compression. - -# Release (2023-11-30) - -* No change notes available for this release. - -# Release (2023-11-29) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.18.0 - * **Feature**: Expose Options() method on generated service clients. - -# Release (2023-11-15) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.17.0 - * **Feature**: Support identity/auth components of client reference architecture. - -# Release (2023-10-31) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.16.0 - * **Feature**: **LANG**: Bump minimum go version to 1.19. - -# Release (2023-10-06) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.15.0 - * **Feature**: Add `http.WithHeaderComment` middleware. - -# Release (2023-08-18) - -* No change notes available for this release. - -# Release (2023-08-07) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.14.1 - * **Bug Fix**: Prevent duplicated error returns in EndpointResolverV2 default implementation. - -# Release (2023-07-31) - -## General Highlights -* **Feature**: Adds support for smithy-modeled endpoint resolution. - -# Release (2022-12-02) - -* No change notes available for this release. - -# Release (2022-10-24) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.13.4 - * **Bug Fix**: fixed document type checking for encoding nested types - -# Release (2022-09-14) - -* No change notes available for this release. - -# Release (v1.13.2) - -* No change notes available for this release. - -# Release (v1.13.1) - -* No change notes available for this release. - -# Release (v1.13.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.13.0 - * **Feature**: Adds support for the Smithy httpBearerAuth authentication trait to smithy-go. This allows the SDK to support the bearer authentication flow for API operations decorated with httpBearerAuth. An API client will need to be provided with its own bearer.TokenProvider implementation or use the bearer.StaticTokenProvider implementation. - -# Release (v1.12.1) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.12.1 - * **Bug Fix**: Fixes a bug where JSON object keys were not escaped. - -# Release (v1.12.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.12.0 - * **Feature**: `transport/http`: Add utility for setting context metadata when operation serializer automatically assigns content-type default value. - -# Release (v1.11.3) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.11.3 - * **Dependency Update**: Updates smithy-go unit test dependency go-cmp to 0.5.8. - -# Release (v1.11.2) - -* No change notes available for this release. - -# Release (v1.11.1) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.11.1 - * **Bug Fix**: Updates the smithy-go HTTP Request to correctly handle building the request to an http.Request. Related to [aws/aws-sdk-go-v2#1583](https://github.com/aws/aws-sdk-go-v2/issues/1583) - -# Release (v1.11.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.11.0 - * **Feature**: Updates deserialization of header list to supported quoted strings - -# Release (v1.10.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.10.0 - * **Feature**: Add `ptr.Duration`, `ptr.ToDuration`, `ptr.DurationSlice`, `ptr.ToDurationSlice`, `ptr.DurationMap`, and `ptr.ToDurationMap` functions for the `time.Duration` type. - -# Release (v1.9.1) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.9.1 - * **Documentation**: Fixes various typos in Go package documentation. - -# Release (v1.9.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.9.0 - * **Feature**: sync: OnceErr, can be used to concurrently record a signal when an error has occurred. - * **Bug Fix**: `transport/http`: CloseResponseBody and ErrorCloseResponseBody middleware have been updated to ensure that the body is fully drained before closing. - -# Release v1.8.1 - -### Smithy Go Module -* **Bug Fix**: Fixed an issue that would cause the HTTP Content-Length to be set to 0 if the stream body was not set. - * Fixes [aws/aws-sdk-go-v2#1418](https://github.com/aws/aws-sdk-go-v2/issues/1418) - -# Release v1.8.0 - -### Smithy Go Module - -* `time`: Add support for parsing additional DateTime timestamp format ([#324](https://github.com/aws/smithy-go/pull/324)) - * Adds support for parsing DateTime timestamp formatted time similar to RFC 3339, but without the `Z` character, nor UTC offset. - * Fixes [#1387](https://github.com/aws/aws-sdk-go-v2/issues/1387) - -# Release v1.7.0 - -### Smithy Go Module -* `ptr`: Handle error for deferred file close call ([#314](https://github.com/aws/smithy-go/pull/314)) - * Handle error for defer close call -* `middleware`: Add Clone to Metadata ([#318](https://github.com/aws/smithy-go/pull/318)) - * Adds a new Clone method to the middleware Metadata type. This provides a shallow clone of the entries in the Metadata. -* `document`: Add new package for document shape serialization support ([#310](https://github.com/aws/smithy-go/pull/310)) - -### Codegen -* Add Smithy Document Shape Support ([#310](https://github.com/aws/smithy-go/pull/310)) - * Adds support for Smithy Document shapes and supporting types for protocols to implement support - -# Release v1.6.0 (2021-07-15) - -### Smithy Go Module -* `encoding/httpbinding`: Support has been added for encoding `float32` and `float64` values that are `NaN`, `Infinity`, or `-Infinity`. ([#316](https://github.com/aws/smithy-go/pull/316)) - -### Codegen -* Adds support for handling `float32` and `float64` `NaN` values in HTTP Protocol Unit Tests. ([#316](https://github.com/aws/smithy-go/pull/316)) -* Adds support protocol generator implementations to override the error code string returned by `ErrorCode` methods on generated error types. ([#315](https://github.com/aws/smithy-go/pull/315)) - -# Release v1.5.0 (2021-06-25) - -### Smithy Go module -* `time`: Update time parsing to not be as strict for HTTPDate and DateTime ([#307](https://github.com/aws/smithy-go/pull/307)) - * Fixes [#302](https://github.com/aws/smithy-go/issues/302) by changing time to UTC before formatting so no local offset time is lost. - -### Codegen -* Adds support for integrating client members via plugins ([#301](https://github.com/aws/smithy-go/pull/301)) -* Fix serialization of enum types marked with payload trait ([#296](https://github.com/aws/smithy-go/pull/296)) -* Update generation of API client modules to include a manifest of files generated ([#283](https://github.com/aws/smithy-go/pull/283)) -* Update Group Java group ID for smithy-go generator ([#298](https://github.com/aws/smithy-go/pull/298)) -* Support the delegation of determining the errors that can occur for an operation ([#304](https://github.com/aws/smithy-go/pull/304)) -* Support for marking and documenting deprecated client config fields. ([#303](https://github.com/aws/smithy-go/pull/303)) - -# Release v1.4.0 (2021-05-06) - -### Smithy Go module -* `encoding/xml`: Fix escaping of Next Line and Line Start in XML Encoder ([#267](https://github.com/aws/smithy-go/pull/267)) - -### Codegen -* Add support for Smithy 1.7 ([#289](https://github.com/aws/smithy-go/pull/289)) -* Add support for httpQueryParams location -* Add support for model renaming conflict resolution with service closure - -# Release v1.3.1 (2021-04-08) - -### Smithy Go module -* `transport/http`: Loosen endpoint hostname validation to allow specifying port numbers. ([#279](https://github.com/aws/smithy-go/pull/279)) -* `io`: Fix RingBuffer panics due to out of bounds index. ([#282](https://github.com/aws/smithy-go/pull/282)) - -# Release v1.3.0 (2021-04-01) - -### Smithy Go module -* `transport/http`: Add utility to safely join string to url path, and url raw query. - -### Codegen -* Update HttpBindingProtocolGenerator to use http/transport JoinPath and JoinQuery utility. - -# Release v1.2.0 (2021-03-12) - -### Smithy Go module -* Fix support for parsing shortened year format in HTTP Date header. -* Fix GitHub APIDiff action workflow to get gorelease tool correctly. -* Fix codegen artifact unit test for Go 1.16 - -### Codegen -* Fix generating paginator nil parameter handling before usage. -* Fix Serialize unboxed members decorated as required. -* Add ability to define resolvers at both client construction and operation invocation. -* Support for extending paginators with custom runtime trait diff --git a/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md b/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md deleted file mode 100644 index 5b627cfa6..000000000 --- a/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md b/vendor/github.com/aws/smithy-go/CONTRIBUTING.md deleted file mode 100644 index c4b6a1c50..000000000 --- a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md +++ /dev/null @@ -1,59 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional -documentation, we greatly value feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests to ensure we have all the necessary -information to effectively respond to your bug report or contribution. - - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest features. - -When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already -reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: - -* A reproducible test case or series of steps -* The version of our code being used -* Any modifications you've made relevant to the bug -* Anything unusual about your environment or deployment - - -## Contributing via Pull Requests -Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: - -1. You are working against the latest source on the *main* branch. -2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request interface. -6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. - -GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - - -## Finding contributions to work on -Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. - - -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. - - -## Security issue notifications -If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. - - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. diff --git a/vendor/github.com/aws/smithy-go/LICENSE b/vendor/github.com/aws/smithy-go/LICENSE deleted file mode 100644 index 67db85882..000000000 --- a/vendor/github.com/aws/smithy-go/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile deleted file mode 100644 index e66fa8cac..000000000 --- a/vendor/github.com/aws/smithy-go/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -PRE_RELEASE_VERSION ?= - -RELEASE_MANIFEST_FILE ?= -RELEASE_CHGLOG_DESC_FILE ?= - -REPOTOOLS_VERSION ?= latest -REPOTOOLS_MODULE = github.com/awslabs/aws-go-multi-module-repository-tools -REPOTOOLS_CMD_CALCULATE_RELEASE = ${REPOTOOLS_MODULE}/cmd/calculaterelease@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS ?= -REPOTOOLS_CMD_UPDATE_REQUIRES = ${REPOTOOLS_MODULE}/cmd/updaterequires@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_UPDATE_MODULE_METADATA = ${REPOTOOLS_MODULE}/cmd/updatemodulemeta@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION} - -UNIT_TEST_TAGS= -BUILD_TAGS= - -ifneq ($(PRE_RELEASE_VERSION),) - REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION} -endif - -smithy-publish-local: - cd codegen && ./gradlew publishToMavenLocal - -smithy-build: - cd codegen && ./gradlew build - -smithy-clean: - cd codegen && ./gradlew clean - -################## -# Linting/Verify # -################## -.PHONY: verify vet cover - -verify: vet - -vet: - go vet ${BUILD_TAGS} --all ./... - -cover: - go test ${BUILD_TAGS} -coverprofile c.out ./... - @cover=`go tool cover -func c.out | grep '^total:' | awk '{ print $$3+0 }'`; \ - echo "total (statements): $$cover%"; - -################ -# Unit Testing # -################ -.PHONY: unit unit-race unit-test unit-race-test - -unit: verify - go vet ${BUILD_TAGS} --all ./... && \ - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} ./... - -unit-race: verify - go vet ${BUILD_TAGS} --all ./... && \ - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... - -unit-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} ./... - -unit-race-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... - -##################### -# Release Process # -##################### -.PHONY: preview-release pre-release-validation release - -preview-release: - go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS} - -pre-release-validation: - @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \ - echo "RELEASE_MANIFEST_FILE is required to specify the file to write the release manifest" && false; \ - fi - @if [[ -z "${RELEASE_CHGLOG_DESC_FILE}" ]]; then \ - echo "RELEASE_CHGLOG_DESC_FILE is required to specify the file to write the release notes" && false; \ - fi - -release: pre-release-validation - go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS} - go run ${REPOTOOLS_CMD_UPDATE_REQUIRES} -release ${RELEASE_MANIFEST_FILE} - go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA} -release ${RELEASE_MANIFEST_FILE} - go run ${REPOTOOLS_CMD_GENERATE_CHANGELOG} -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE} - go run ${REPOTOOLS_CMD_CHANGELOG} rm -all - go run ${REPOTOOLS_CMD_TAG_RELEASE} -release ${RELEASE_MANIFEST_FILE} - -module-version: - @go run ${REPOTOOLS_CMD_MODULE_VERSION} . - -############## -# Repo Tools # -############## -.PHONY: install-changelog - -install-changelog: - go install ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION} diff --git a/vendor/github.com/aws/smithy-go/NOTICE b/vendor/github.com/aws/smithy-go/NOTICE deleted file mode 100644 index 616fc5889..000000000 --- a/vendor/github.com/aws/smithy-go/NOTICE +++ /dev/null @@ -1 +0,0 @@ -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md deleted file mode 100644 index c374f6928..000000000 --- a/vendor/github.com/aws/smithy-go/README.md +++ /dev/null @@ -1,27 +0,0 @@ -## Smithy Go - -[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml) - -[Smithy](https://smithy.io/) code generators for Go. - -**WARNING: All interfaces are subject to change.** - -## Can I use this? - -In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java), -such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html), -in order to generate transport mechanisms and serialization/deserialization -code ("serde") accordingly. - -The code generator does not currently support any protocols out of the box, -therefore the useability of this project on its own is currently limited. -Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html) -exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are -tracking the movement of those out of the SDK into smithy-go in -[#458](https://github.com/aws/smithy-go/issues/458), but there's currently no -timeline for doing so. - -## License - -This project is licensed under the Apache-2.0 License. - diff --git a/vendor/github.com/aws/smithy-go/auth/auth.go b/vendor/github.com/aws/smithy-go/auth/auth.go deleted file mode 100644 index 5bdb70c9a..000000000 --- a/vendor/github.com/aws/smithy-go/auth/auth.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package auth defines protocol-agnostic authentication types for smithy -// clients. -package auth diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/docs.go b/vendor/github.com/aws/smithy-go/auth/bearer/docs.go deleted file mode 100644 index 1c9b9715c..000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/docs.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package bearer provides middleware and utilities for authenticating API -// operation calls with a Bearer Token. -package bearer diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go b/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go deleted file mode 100644 index 8c7d72099..000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go +++ /dev/null @@ -1,104 +0,0 @@ -package bearer - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Message is the middleware stack's request transport message value. -type Message interface{} - -// Signer provides an interface for implementations to decorate a request -// message with a bearer token. The signer is responsible for validating the -// message type is compatible with the signer. -type Signer interface { - SignWithBearerToken(context.Context, Token, Message) (Message, error) -} - -// AuthenticationMiddleware provides the Finalize middleware step for signing -// an request message with a bearer token. -type AuthenticationMiddleware struct { - signer Signer - tokenProvider TokenProvider -} - -// AddAuthenticationMiddleware helper adds the AuthenticationMiddleware to the -// middleware Stack in the Finalize step with the options provided. -func AddAuthenticationMiddleware(s *middleware.Stack, signer Signer, tokenProvider TokenProvider) error { - return s.Finalize.Add( - NewAuthenticationMiddleware(signer, tokenProvider), - middleware.After, - ) -} - -// NewAuthenticationMiddleware returns an initialized AuthenticationMiddleware. -func NewAuthenticationMiddleware(signer Signer, tokenProvider TokenProvider) *AuthenticationMiddleware { - return &AuthenticationMiddleware{ - signer: signer, - tokenProvider: tokenProvider, - } -} - -const authenticationMiddlewareID = "BearerTokenAuthentication" - -// ID returns the resolver identifier -func (m *AuthenticationMiddleware) ID() string { - return authenticationMiddlewareID -} - -// HandleFinalize implements the FinalizeMiddleware interface in order to -// update the request with bearer token authentication. -func (m *AuthenticationMiddleware) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - token, err := m.tokenProvider.RetrieveBearerToken(ctx) - if err != nil { - return out, metadata, fmt.Errorf("failed AuthenticationMiddleware wrap message, %w", err) - } - - signedMessage, err := m.signer.SignWithBearerToken(ctx, token, in.Request) - if err != nil { - return out, metadata, fmt.Errorf("failed AuthenticationMiddleware sign message, %w", err) - } - - in.Request = signedMessage - return next.HandleFinalize(ctx, in) -} - -// SignHTTPSMessage provides a bearer token authentication implementation that -// will sign the message with the provided bearer token. -// -// Will fail if the message is not a smithy-go HTTP request or the request is -// not HTTPS. -type SignHTTPSMessage struct{} - -// NewSignHTTPSMessage returns an initialized signer for HTTP messages. -func NewSignHTTPSMessage() *SignHTTPSMessage { - return &SignHTTPSMessage{} -} - -// SignWithBearerToken returns a copy of the HTTP request with the bearer token -// added via the "Authorization" header, per RFC 6750, https://datatracker.ietf.org/doc/html/rfc6750. -// -// Returns an error if the request's URL scheme is not HTTPS, or the request -// message is not an smithy-go HTTP Request pointer type. -func (SignHTTPSMessage) SignWithBearerToken(ctx context.Context, token Token, message Message) (Message, error) { - req, ok := message.(*smithyhttp.Request) - if !ok { - return nil, fmt.Errorf("expect smithy-go HTTP Request, got %T", message) - } - - if !req.IsHTTPS() { - return nil, fmt.Errorf("bearer token with HTTP request requires HTTPS") - } - - reqClone := req.Clone() - reqClone.Header.Set("Authorization", "Bearer "+token.Value) - - return reqClone, nil -} diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token.go b/vendor/github.com/aws/smithy-go/auth/bearer/token.go deleted file mode 100644 index be260d4c7..000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/token.go +++ /dev/null @@ -1,50 +0,0 @@ -package bearer - -import ( - "context" - "time" -) - -// Token provides a type wrapping a bearer token and expiration metadata. -type Token struct { - Value string - - CanExpire bool - Expires time.Time -} - -// Expired returns if the token's Expires time is before or equal to the time -// provided. If CanExpires is false, Expired will always return false. -func (t Token) Expired(now time.Time) bool { - if !t.CanExpire { - return false - } - now = now.Round(0) - return now.Equal(t.Expires) || now.After(t.Expires) -} - -// TokenProvider provides interface for retrieving bearer tokens. -type TokenProvider interface { - RetrieveBearerToken(context.Context) (Token, error) -} - -// TokenProviderFunc provides a helper utility to wrap a function as a type -// that implements the TokenProvider interface. -type TokenProviderFunc func(context.Context) (Token, error) - -// RetrieveBearerToken calls the wrapped function, returning the Token or -// error. -func (fn TokenProviderFunc) RetrieveBearerToken(ctx context.Context) (Token, error) { - return fn(ctx) -} - -// StaticTokenProvider provides a utility for wrapping a static bearer token -// value within an implementation of a token provider. -type StaticTokenProvider struct { - Token Token -} - -// RetrieveBearerToken returns the static token specified. -func (s StaticTokenProvider) RetrieveBearerToken(context.Context) (Token, error) { - return s.Token, nil -} diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go b/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go deleted file mode 100644 index 223ddf52b..000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go +++ /dev/null @@ -1,208 +0,0 @@ -package bearer - -import ( - "context" - "fmt" - "sync/atomic" - "time" - - smithycontext "github.com/aws/smithy-go/context" - "github.com/aws/smithy-go/internal/sync/singleflight" -) - -// package variable that can be override in unit tests. -var timeNow = time.Now - -// TokenCacheOptions provides a set of optional configuration options for the -// TokenCache TokenProvider. -type TokenCacheOptions struct { - // The duration before the token will expire when the credentials will be - // refreshed. If DisableAsyncRefresh is true, the RetrieveBearerToken calls - // will be blocking. - // - // Asynchronous refreshes are deduplicated, and only one will be in-flight - // at a time. If the token expires while an asynchronous refresh is in - // flight, the next call to RetrieveBearerToken will block on that refresh - // to return. - RefreshBeforeExpires time.Duration - - // The timeout the underlying TokenProvider's RetrieveBearerToken call must - // return within, or will be canceled. Defaults to 0, no timeout. - // - // If 0 timeout, its possible for the underlying tokenProvider's - // RetrieveBearerToken call to block forever. Preventing subsequent - // TokenCache attempts to refresh the token. - // - // If this timeout is reached all pending deduplicated calls to - // TokenCache RetrieveBearerToken will fail with an error. - RetrieveBearerTokenTimeout time.Duration - - // The minimum duration between asynchronous refresh attempts. If the next - // asynchronous recent refresh attempt was within the minimum delay - // duration, the call to retrieve will return the current cached token, if - // not expired. - // - // The asynchronous retrieve is deduplicated across multiple calls when - // RetrieveBearerToken is called. The asynchronous retrieve is not a - // periodic task. It is only performed when the token has not yet expired, - // and the current item is within the RefreshBeforeExpires window, and the - // TokenCache's RetrieveBearerToken method is called. - // - // If 0, (default) there will be no minimum delay between asynchronous - // refresh attempts. - // - // If DisableAsyncRefresh is true, this option is ignored. - AsyncRefreshMinimumDelay time.Duration - - // Sets if the TokenCache will attempt to refresh the token in the - // background asynchronously instead of blocking for credentials to be - // refreshed. If disabled token refresh will be blocking. - // - // The first call to RetrieveBearerToken will always be blocking, because - // there is no cached token. - DisableAsyncRefresh bool -} - -// TokenCache provides an utility to cache Bearer Authentication tokens from a -// wrapped TokenProvider. The TokenCache can be has options to configure the -// cache's early and asynchronous refresh of the token. -type TokenCache struct { - options TokenCacheOptions - provider TokenProvider - - cachedToken atomic.Value - lastRefreshAttemptTime atomic.Value - sfGroup singleflight.Group -} - -// NewTokenCache returns a initialized TokenCache that implements the -// TokenProvider interface. Wrapping the provider passed in. Also taking a set -// of optional functional option parameters to configure the token cache. -func NewTokenCache(provider TokenProvider, optFns ...func(*TokenCacheOptions)) *TokenCache { - var options TokenCacheOptions - for _, fn := range optFns { - fn(&options) - } - - return &TokenCache{ - options: options, - provider: provider, - } -} - -// RetrieveBearerToken returns the token if it could be obtained, or error if a -// valid token could not be retrieved. -// -// The passed in Context's cancel/deadline/timeout will impacting only this -// individual retrieve call and not any other already queued up calls. This -// means underlying provider's RetrieveBearerToken calls could block for ever, -// and not be canceled with the Context. Set RetrieveBearerTokenTimeout to -// provide a timeout, preventing the underlying TokenProvider blocking forever. -// -// By default, if the passed in Context is canceled, all of its values will be -// considered expired. The wrapped TokenProvider will not be able to lookup the -// values from the Context once it is expired. This is done to protect against -// expired values no longer being valid. To disable this behavior, use -// smithy-go's context.WithPreserveExpiredValues to add a value to the Context -// before calling RetrieveBearerToken to enable support for expired values. -// -// Without RetrieveBearerTokenTimeout there is the potential for a underlying -// Provider's RetrieveBearerToken call to sit forever. Blocking in subsequent -// attempts at refreshing the token. -func (p *TokenCache) RetrieveBearerToken(ctx context.Context) (Token, error) { - cachedToken, ok := p.getCachedToken() - if !ok || cachedToken.Expired(timeNow()) { - return p.refreshBearerToken(ctx) - } - - // Check if the token should be refreshed before it expires. - refreshToken := cachedToken.Expired(timeNow().Add(p.options.RefreshBeforeExpires)) - if !refreshToken { - return cachedToken, nil - } - - if p.options.DisableAsyncRefresh { - return p.refreshBearerToken(ctx) - } - - p.tryAsyncRefresh(ctx) - - return cachedToken, nil -} - -// tryAsyncRefresh attempts to asynchronously refresh the token returning the -// already cached token. If it AsyncRefreshMinimumDelay option is not zero, and -// the duration since the last refresh is less than that value, nothing will be -// done. -func (p *TokenCache) tryAsyncRefresh(ctx context.Context) { - if p.options.AsyncRefreshMinimumDelay != 0 { - var lastRefreshAttempt time.Time - if v := p.lastRefreshAttemptTime.Load(); v != nil { - lastRefreshAttempt = v.(time.Time) - } - - if timeNow().Before(lastRefreshAttempt.Add(p.options.AsyncRefreshMinimumDelay)) { - return - } - } - - // Ignore the returned channel so this won't be blocking, and limit the - // number of additional goroutines created. - p.sfGroup.DoChan("async-refresh", func() (interface{}, error) { - res, err := p.refreshBearerToken(ctx) - if p.options.AsyncRefreshMinimumDelay != 0 { - var refreshAttempt time.Time - if err != nil { - refreshAttempt = timeNow() - } - p.lastRefreshAttemptTime.Store(refreshAttempt) - } - - return res, err - }) -} - -func (p *TokenCache) refreshBearerToken(ctx context.Context) (Token, error) { - resCh := p.sfGroup.DoChan("refresh-token", func() (interface{}, error) { - ctx := smithycontext.WithSuppressCancel(ctx) - if v := p.options.RetrieveBearerTokenTimeout; v != 0 { - var cancel func() - ctx, cancel = context.WithTimeout(ctx, v) - defer cancel() - } - return p.singleRetrieve(ctx) - }) - - select { - case res := <-resCh: - return res.Val.(Token), res.Err - case <-ctx.Done(): - return Token{}, fmt.Errorf("retrieve bearer token canceled, %w", ctx.Err()) - } -} - -func (p *TokenCache) singleRetrieve(ctx context.Context) (interface{}, error) { - token, err := p.provider.RetrieveBearerToken(ctx) - if err != nil { - return Token{}, fmt.Errorf("failed to retrieve bearer token, %w", err) - } - - p.cachedToken.Store(&token) - return token, nil -} - -// getCachedToken returns the currently cached token and true if found. Returns -// false if no token is cached. -func (p *TokenCache) getCachedToken() (Token, bool) { - v := p.cachedToken.Load() - if v == nil { - return Token{}, false - } - - t := v.(*Token) - if t == nil || t.Value == "" { - return Token{}, false - } - - return *t, true -} diff --git a/vendor/github.com/aws/smithy-go/auth/identity.go b/vendor/github.com/aws/smithy-go/auth/identity.go deleted file mode 100644 index ba8cf70d4..000000000 --- a/vendor/github.com/aws/smithy-go/auth/identity.go +++ /dev/null @@ -1,47 +0,0 @@ -package auth - -import ( - "context" - "time" - - "github.com/aws/smithy-go" -) - -// Identity contains information that identifies who the user making the -// request is. -type Identity interface { - Expiration() time.Time -} - -// IdentityResolver defines the interface through which an Identity is -// retrieved. -type IdentityResolver interface { - GetIdentity(context.Context, smithy.Properties) (Identity, error) -} - -// IdentityResolverOptions defines the interface through which an entity can be -// queried to retrieve an IdentityResolver for a given auth scheme. -type IdentityResolverOptions interface { - GetIdentityResolver(schemeID string) IdentityResolver -} - -// AnonymousIdentity is a sentinel to indicate no identity. -type AnonymousIdentity struct{} - -var _ Identity = (*AnonymousIdentity)(nil) - -// Expiration returns the zero value for time, as anonymous identity never -// expires. -func (*AnonymousIdentity) Expiration() time.Time { - return time.Time{} -} - -// AnonymousIdentityResolver returns AnonymousIdentity. -type AnonymousIdentityResolver struct{} - -var _ IdentityResolver = (*AnonymousIdentityResolver)(nil) - -// GetIdentity returns AnonymousIdentity. -func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error) { - return &AnonymousIdentity{}, nil -} diff --git a/vendor/github.com/aws/smithy-go/auth/option.go b/vendor/github.com/aws/smithy-go/auth/option.go deleted file mode 100644 index d5dabff04..000000000 --- a/vendor/github.com/aws/smithy-go/auth/option.go +++ /dev/null @@ -1,25 +0,0 @@ -package auth - -import "github.com/aws/smithy-go" - -type ( - authOptionsKey struct{} -) - -// Option represents a possible authentication method for an operation. -type Option struct { - SchemeID string - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -// GetAuthOptions gets auth Options from Properties. -func GetAuthOptions(p *smithy.Properties) ([]*Option, bool) { - v, ok := p.Get(authOptionsKey{}).([]*Option) - return v, ok -} - -// SetAuthOptions sets auth Options on Properties. -func SetAuthOptions(p *smithy.Properties, options []*Option) { - p.Set(authOptionsKey{}, options) -} diff --git a/vendor/github.com/aws/smithy-go/auth/scheme_id.go b/vendor/github.com/aws/smithy-go/auth/scheme_id.go deleted file mode 100644 index fb6a57c64..000000000 --- a/vendor/github.com/aws/smithy-go/auth/scheme_id.go +++ /dev/null @@ -1,20 +0,0 @@ -package auth - -// Anonymous -const ( - SchemeIDAnonymous = "smithy.api#noAuth" -) - -// HTTP auth schemes -const ( - SchemeIDHTTPBasic = "smithy.api#httpBasicAuth" - SchemeIDHTTPDigest = "smithy.api#httpDigestAuth" - SchemeIDHTTPBearer = "smithy.api#httpBearerAuth" - SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth" -) - -// AWS auth schemes -const ( - SchemeIDSigV4 = "aws.auth#sigv4" - SchemeIDSigV4A = "aws.auth#sigv4a" -) diff --git a/vendor/github.com/aws/smithy-go/context/suppress_expired.go b/vendor/github.com/aws/smithy-go/context/suppress_expired.go deleted file mode 100644 index a39b84a27..000000000 --- a/vendor/github.com/aws/smithy-go/context/suppress_expired.go +++ /dev/null @@ -1,81 +0,0 @@ -package context - -import "context" - -// valueOnlyContext provides a utility to preserve only the values of a -// Context. Suppressing any cancellation or deadline on that context being -// propagated downstream of this value. -// -// If preserveExpiredValues is false (default), and the valueCtx is canceled, -// calls to lookup values with the Values method, will always return nil. Setting -// preserveExpiredValues to true, will allow the valueOnlyContext to lookup -// values in valueCtx even if valueCtx is canceled. -// -// Based on the Go standard libraries net/lookup.go onlyValuesCtx utility. -// https://github.com/golang/go/blob/da2773fe3e2f6106634673a38dc3a6eb875fe7d8/src/net/lookup.go -type valueOnlyContext struct { - context.Context - - preserveExpiredValues bool - valuesCtx context.Context -} - -var _ context.Context = (*valueOnlyContext)(nil) - -// Value looks up the key, returning its value. If configured to not preserve -// values of expired context, and the wrapping context is canceled, nil will be -// returned. -func (v *valueOnlyContext) Value(key interface{}) interface{} { - if !v.preserveExpiredValues { - select { - case <-v.valuesCtx.Done(): - return nil - default: - } - } - - return v.valuesCtx.Value(key) -} - -// WithSuppressCancel wraps the Context value, suppressing its deadline and -// cancellation events being propagated downstream to consumer of the returned -// context. -// -// By default the wrapped Context's Values are available downstream until the -// wrapped Context is canceled. Once the wrapped Context is canceled, Values -// method called on the context return will no longer lookup any key. As they -// are now considered expired. -// -// To override this behavior, use WithPreserveExpiredValues on the Context -// before it is wrapped by WithSuppressCancel. This will make the Context -// returned by WithSuppressCancel allow lookup of expired values. -func WithSuppressCancel(ctx context.Context) context.Context { - return &valueOnlyContext{ - Context: context.Background(), - valuesCtx: ctx, - - preserveExpiredValues: GetPreserveExpiredValues(ctx), - } -} - -type preserveExpiredValuesKey struct{} - -// WithPreserveExpiredValues adds a Value to the Context if expired values -// should be preserved, and looked up by a Context wrapped by -// WithSuppressCancel. -// -// WithPreserveExpiredValues must be added as a value to a Context, before that -// Context is wrapped by WithSuppressCancel -func WithPreserveExpiredValues(ctx context.Context, enable bool) context.Context { - return context.WithValue(ctx, preserveExpiredValuesKey{}, enable) -} - -// GetPreserveExpiredValues looks up, and returns the PreserveExpressValues -// value in the context. Returning true if enabled, false otherwise. -func GetPreserveExpiredValues(ctx context.Context) bool { - v := ctx.Value(preserveExpiredValuesKey{}) - if v != nil { - return v.(bool) - } - return false -} diff --git a/vendor/github.com/aws/smithy-go/doc.go b/vendor/github.com/aws/smithy-go/doc.go deleted file mode 100644 index 87b0c74b7..000000000 --- a/vendor/github.com/aws/smithy-go/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package smithy provides the core components for a Smithy SDK. -package smithy diff --git a/vendor/github.com/aws/smithy-go/document.go b/vendor/github.com/aws/smithy-go/document.go deleted file mode 100644 index dec498c57..000000000 --- a/vendor/github.com/aws/smithy-go/document.go +++ /dev/null @@ -1,10 +0,0 @@ -package smithy - -// Document provides access to loosely structured data in a document-like -// format. -// -// Deprecated: See the github.com/aws/smithy-go/document package. -type Document interface { - UnmarshalDocument(interface{}) error - GetValue() (interface{}, error) -} diff --git a/vendor/github.com/aws/smithy-go/document/doc.go b/vendor/github.com/aws/smithy-go/document/doc.go deleted file mode 100644 index 03055b7a1..000000000 --- a/vendor/github.com/aws/smithy-go/document/doc.go +++ /dev/null @@ -1,12 +0,0 @@ -// Package document provides interface definitions and error types for document types. -// -// A document is a protocol-agnostic type which supports a JSON-like data-model. You can use this type to send -// UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 -// strings to these values. -// -// API Clients expose document constructors in their respective client document packages which must be used to -// Marshal and Unmarshal Go types to and from their respective protocol representations. -// -// See the Marshaler and Unmarshaler type documentation for more details on how to Go types can be converted to and from -// document types. -package document diff --git a/vendor/github.com/aws/smithy-go/document/document.go b/vendor/github.com/aws/smithy-go/document/document.go deleted file mode 100644 index 8f852d95c..000000000 --- a/vendor/github.com/aws/smithy-go/document/document.go +++ /dev/null @@ -1,153 +0,0 @@ -package document - -import ( - "fmt" - "math/big" - "strconv" -) - -// Marshaler is an interface for a type that marshals a document to its protocol-specific byte representation and -// returns the resulting bytes. A non-nil error will be returned if an error is encountered during marshaling. -// -// Marshal supports basic scalars (int,uint,float,bool,string), big.Int, and big.Float, maps, slices, and structs. -// Anonymous nested types are flattened based on Go anonymous type visibility. -// -// When defining struct types. the `document` struct tag can be used to control how the value will be -// marshaled into the resulting protocol document. -// -// // Field is ignored -// Field int `document:"-"` -// -// // Field object of key "myName" -// Field int `document:"myName"` -// -// // Field object key of key "myName", and -// // Field is omitted if the field is a zero value for the type. -// Field int `document:"myName,omitempty"` -// -// // Field object key of "Field", and -// // Field is omitted if the field is a zero value for the type. -// Field int `document:",omitempty"` -// -// All struct fields, including anonymous fields, are marshaled unless the -// any of the following conditions are meet. -// -// - the field is not exported -// - document field tag is "-" -// - document field tag specifies "omitempty", and is a zero value. -// -// Pointer and interface values are encoded as the value pointed to or -// contained in the interface. A nil value encodes as a null -// value unless `omitempty` struct tag is provided. -// -// Channel, complex, and function values are not encoded and will be skipped -// when walking the value to be marshaled. -// -// time.Time is not supported and will cause the Marshaler to return an error. These values should be represented -// by your application as a string or numerical representation. -// -// Errors that occur when marshaling will stop the marshaler, and return the error. -// -// Marshal cannot represent cyclic data structures and will not handle them. -// Passing cyclic structures to Marshal will result in an infinite recursion. -type Marshaler interface { - MarshalSmithyDocument() ([]byte, error) -} - -// Unmarshaler is an interface for a type that unmarshals a document from its protocol-specific representation, and -// stores the result into the value pointed by v. If v is nil or not a pointer then InvalidUnmarshalError will be -// returned. -// -// Unmarshaler supports the same encodings produced by a document Marshaler. This includes support for the `document` -// struct field tag for controlling how struct fields are unmarshaled. -// -// Both generic interface{} and concrete types are valid unmarshal destination types. When unmarshaling a document -// into an empty interface the Unmarshaler will store one of these values: -// bool, for boolean values -// document.Number, for arbitrary-precision numbers (int64, float64, big.Int, big.Float) -// string, for string values -// []interface{}, for array values -// map[string]interface{}, for objects -// nil, for null values -// -// When unmarshaling, any error that occurs will halt the unmarshal and return the error. -type Unmarshaler interface { - UnmarshalSmithyDocument(v interface{}) error -} - -type noSerde interface { - noSmithyDocumentSerde() -} - -// NoSerde is a sentinel value to indicate that a given type should not be marshaled or unmarshaled -// into a protocol document. -type NoSerde struct{} - -func (n NoSerde) noSmithyDocumentSerde() {} - -var _ noSerde = (*NoSerde)(nil) - -// IsNoSerde returns whether the given type implements the no smithy document serde interface. -func IsNoSerde(x interface{}) bool { - _, ok := x.(noSerde) - return ok -} - -// Number is an arbitrary precision numerical value -type Number string - -// Int64 returns the number as a string. -func (n Number) String() string { - return string(n) -} - -// Int64 returns the number as an int64. -func (n Number) Int64() (int64, error) { - return n.intOfBitSize(64) -} - -func (n Number) intOfBitSize(bitSize int) (int64, error) { - return strconv.ParseInt(string(n), 10, bitSize) -} - -// Uint64 returns the number as a uint64. -func (n Number) Uint64() (uint64, error) { - return n.uintOfBitSize(64) -} - -func (n Number) uintOfBitSize(bitSize int) (uint64, error) { - return strconv.ParseUint(string(n), 10, bitSize) -} - -// Float32 returns the number parsed as a 32-bit float, returns a float64. -func (n Number) Float32() (float64, error) { - return n.floatOfBitSize(32) -} - -// Float64 returns the number as a float64. -func (n Number) Float64() (float64, error) { - return n.floatOfBitSize(64) -} - -// Float64 returns the number as a float64. -func (n Number) floatOfBitSize(bitSize int) (float64, error) { - return strconv.ParseFloat(string(n), bitSize) -} - -// BigFloat attempts to convert the number to a big.Float, returns an error if the operation fails. -func (n Number) BigFloat() (*big.Float, error) { - f, ok := (&big.Float{}).SetString(string(n)) - if !ok { - return nil, fmt.Errorf("failed to convert to big.Float") - } - return f, nil -} - -// BigInt attempts to convert the number to a big.Int, returns an error if the operation fails. -func (n Number) BigInt() (*big.Int, error) { - f, ok := (&big.Int{}).SetString(string(n), 10) - if !ok { - return nil, fmt.Errorf("failed to convert to big.Float") - } - return f, nil -} diff --git a/vendor/github.com/aws/smithy-go/document/errors.go b/vendor/github.com/aws/smithy-go/document/errors.go deleted file mode 100644 index 046a7a765..000000000 --- a/vendor/github.com/aws/smithy-go/document/errors.go +++ /dev/null @@ -1,75 +0,0 @@ -package document - -import ( - "fmt" - "reflect" -) - -// UnmarshalTypeError is an error type representing an error -// unmarshaling a Smithy document to a Go value type. This is different -// from UnmarshalError in that it does not wrap an underlying error type. -type UnmarshalTypeError struct { - Value string - Type reflect.Type -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *UnmarshalTypeError) Error() string { - return fmt.Sprintf("unmarshal failed, cannot unmarshal %s into Go value type %s", - e.Value, e.Type.String()) -} - -// An InvalidUnmarshalError is an error type representing an invalid type -// encountered while unmarshaling a Smithy document to a Go value type. -type InvalidUnmarshalError struct { - Type reflect.Type -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *InvalidUnmarshalError) Error() string { - var msg string - if e.Type == nil { - msg = "cannot unmarshal to nil value" - } else if e.Type.Kind() != reflect.Ptr { - msg = fmt.Sprintf("cannot unmarshal to non-pointer value, got %s", e.Type.String()) - } else { - msg = fmt.Sprintf("cannot unmarshal to nil value, %s", e.Type.String()) - } - - return fmt.Sprintf("unmarshal failed, %s", msg) -} - -// An UnmarshalError wraps an error that occurred while unmarshaling a -// Smithy document into a Go type. This is different from -// UnmarshalTypeError in that it wraps the underlying error that occurred. -type UnmarshalError struct { - Err error - Value string - Type reflect.Type -} - -// Unwrap returns the underlying unmarshaling error -func (e *UnmarshalError) Unwrap() error { - return e.Err -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *UnmarshalError) Error() string { - return fmt.Sprintf("unmarshal failed, cannot unmarshal %q into %s, %v", - e.Value, e.Type.String(), e.Err) -} - -// An InvalidMarshalError is an error type representing an error -// occurring when marshaling a Go value type. -type InvalidMarshalError struct { - Message string -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *InvalidMarshalError) Error() string { - return fmt.Sprintf("marshal failed, %s", e.Message) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/doc.go b/vendor/github.com/aws/smithy-go/encoding/doc.go deleted file mode 100644 index 792fdfa08..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package encoding provides utilities for encoding values for specific -// document encodings. - -package encoding diff --git a/vendor/github.com/aws/smithy-go/encoding/encoding.go b/vendor/github.com/aws/smithy-go/encoding/encoding.go deleted file mode 100644 index 2fdfb5225..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/encoding.go +++ /dev/null @@ -1,40 +0,0 @@ -package encoding - -import ( - "fmt" - "math" - "strconv" -) - -// EncodeFloat encodes a float value as per the stdlib encoder for json and xml protocol -// This encodes a float value into dst while attempting to conform to ES6 ToString for Numbers -// -// Based on encoding/json floatEncoder from the Go Standard Library -// https://golang.org/src/encoding/json/encode.go -func EncodeFloat(dst []byte, v float64, bits int) []byte { - if math.IsInf(v, 0) || math.IsNaN(v) { - panic(fmt.Sprintf("invalid float value: %s", strconv.FormatFloat(v, 'g', -1, bits))) - } - - abs := math.Abs(v) - fmt := byte('f') - - if abs != 0 { - if bits == 64 && (abs < 1e-6 || abs >= 1e21) || bits == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) { - fmt = 'e' - } - } - - dst = strconv.AppendFloat(dst, v, fmt, -1, bits) - - if fmt == 'e' { - // clean up e-09 to e-9 - n := len(dst) - if n >= 4 && dst[n-4] == 'e' && dst[n-3] == '-' && dst[n-2] == '0' { - dst[n-2] = dst[n-1] - dst = dst[:n-1] - } - } - - return dst -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go deleted file mode 100644 index 543e7cf03..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go +++ /dev/null @@ -1,123 +0,0 @@ -package httpbinding - -import ( - "fmt" - "net/http" - "net/url" - "strconv" - "strings" -) - -const ( - contentLengthHeader = "Content-Length" - floatNaN = "NaN" - floatInfinity = "Infinity" - floatNegInfinity = "-Infinity" -) - -// An Encoder provides encoding of REST URI path, query, and header components -// of an HTTP request. Can also encode a stream as the payload. -// -// Does not support SetFields. -type Encoder struct { - path, rawPath, pathBuffer []byte - - query url.Values - header http.Header -} - -// NewEncoder creates a new encoder from the passed in request. It assumes that -// raw path contains no valuable information at this point, so it passes in path -// as path and raw path for subsequent trans -func NewEncoder(path, query string, headers http.Header) (*Encoder, error) { - return NewEncoderWithRawPath(path, path, query, headers) -} - -// NewHTTPBindingEncoder creates a new encoder from the passed in request. All query and -// header values will be added on top of the request's existing values. Overwriting -// duplicate values. -func NewEncoderWithRawPath(path, rawPath, query string, headers http.Header) (*Encoder, error) { - parseQuery, err := url.ParseQuery(query) - if err != nil { - return nil, fmt.Errorf("failed to parse query string: %w", err) - } - - e := &Encoder{ - path: []byte(path), - rawPath: []byte(rawPath), - query: parseQuery, - header: headers.Clone(), - } - - return e, nil -} - -// Encode returns a REST protocol encoder for encoding HTTP bindings. -// -// Due net/http requiring `Content-Length` to be specified on the http.Request#ContentLength directly. Encode -// will look for whether the header is present, and if so will remove it and set the respective value on http.Request. -// -// Returns any error occurring during encoding. -func (e *Encoder) Encode(req *http.Request) (*http.Request, error) { - req.URL.Path, req.URL.RawPath = string(e.path), string(e.rawPath) - req.URL.RawQuery = e.query.Encode() - - // net/http ignores Content-Length header and requires it to be set on http.Request - if v := e.header.Get(contentLengthHeader); len(v) > 0 { - iv, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return nil, err - } - req.ContentLength = iv - e.header.Del(contentLengthHeader) - } - - req.Header = e.header - - return req, nil -} - -// AddHeader returns a HeaderValue for appending to the given header name -func (e *Encoder) AddHeader(key string) HeaderValue { - return newHeaderValue(e.header, key, true) -} - -// SetHeader returns a HeaderValue for setting the given header name -func (e *Encoder) SetHeader(key string) HeaderValue { - return newHeaderValue(e.header, key, false) -} - -// Headers returns a Header used for encoding headers with the given prefix -func (e *Encoder) Headers(prefix string) Headers { - return Headers{ - header: e.header, - prefix: strings.TrimSpace(prefix), - } -} - -// HasHeader returns if a header with the key specified exists with one or -// more value. -func (e Encoder) HasHeader(key string) bool { - return len(e.header[key]) != 0 -} - -// SetURI returns a URIValue used for setting the given path key -func (e *Encoder) SetURI(key string) URIValue { - return newURIValue(&e.path, &e.rawPath, &e.pathBuffer, key) -} - -// SetQuery returns a QueryValue used for setting the given query key -func (e *Encoder) SetQuery(key string) QueryValue { - return NewQueryValue(e.query, key, false) -} - -// AddQuery returns a QueryValue used for appending the given query key -func (e *Encoder) AddQuery(key string) QueryValue { - return NewQueryValue(e.query, key, true) -} - -// HasQuery returns if a query with the key specified exists with one or -// more values. -func (e *Encoder) HasQuery(key string) bool { - return len(e.query.Get(key)) != 0 -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go deleted file mode 100644 index f9256e175..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go +++ /dev/null @@ -1,122 +0,0 @@ -package httpbinding - -import ( - "encoding/base64" - "math" - "math/big" - "net/http" - "strconv" - "strings" -) - -// Headers is used to encode header keys using a provided prefix -type Headers struct { - header http.Header - prefix string -} - -// AddHeader returns a HeaderValue used to append values to prefix+key -func (h Headers) AddHeader(key string) HeaderValue { - return h.newHeaderValue(key, true) -} - -// SetHeader returns a HeaderValue used to set the value of prefix+key -func (h Headers) SetHeader(key string) HeaderValue { - return h.newHeaderValue(key, false) -} - -func (h Headers) newHeaderValue(key string, append bool) HeaderValue { - return newHeaderValue(h.header, h.prefix+strings.TrimSpace(key), append) -} - -// HeaderValue is used to encode values to an HTTP header -type HeaderValue struct { - header http.Header - key string - append bool -} - -func newHeaderValue(header http.Header, key string, append bool) HeaderValue { - return HeaderValue{header: header, key: strings.TrimSpace(key), append: append} -} - -func (h HeaderValue) modifyHeader(value string) { - if h.append { - h.header[h.key] = append(h.header[h.key], value) - } else { - h.header[h.key] = append(h.header[h.key][:0], value) - } -} - -// String encodes the value v as the header string value -func (h HeaderValue) String(v string) { - h.modifyHeader(v) -} - -// Byte encodes the value v as a query string value -func (h HeaderValue) Byte(v int8) { - h.Long(int64(v)) -} - -// Short encodes the value v as a query string value -func (h HeaderValue) Short(v int16) { - h.Long(int64(v)) -} - -// Integer encodes the value v as the header string value -func (h HeaderValue) Integer(v int32) { - h.Long(int64(v)) -} - -// Long encodes the value v as the header string value -func (h HeaderValue) Long(v int64) { - h.modifyHeader(strconv.FormatInt(v, 10)) -} - -// Boolean encodes the value v as a query string value -func (h HeaderValue) Boolean(v bool) { - h.modifyHeader(strconv.FormatBool(v)) -} - -// Float encodes the value v as a query string value -func (h HeaderValue) Float(v float32) { - h.float(float64(v), 32) -} - -// Double encodes the value v as a query string value -func (h HeaderValue) Double(v float64) { - h.float(v, 64) -} - -func (h HeaderValue) float(v float64, bitSize int) { - switch { - case math.IsNaN(v): - h.String(floatNaN) - case math.IsInf(v, 1): - h.String(floatInfinity) - case math.IsInf(v, -1): - h.String(floatNegInfinity) - default: - h.modifyHeader(strconv.FormatFloat(v, 'f', -1, bitSize)) - } -} - -// BigInteger encodes the value v as a query string value -func (h HeaderValue) BigInteger(v *big.Int) { - h.modifyHeader(v.String()) -} - -// BigDecimal encodes the value v as a query string value -func (h HeaderValue) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - h.Long(i) - return - } - h.modifyHeader(v.Text('e', -1)) -} - -// Blob encodes the value v as a base64 header string value -func (h HeaderValue) Blob(v []byte) { - encodeToString := base64.StdEncoding.EncodeToString(v) - h.modifyHeader(encodeToString) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go deleted file mode 100644 index e78926c9a..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go +++ /dev/null @@ -1,108 +0,0 @@ -package httpbinding - -import ( - "bytes" - "fmt" -) - -const ( - uriTokenStart = '{' - uriTokenStop = '}' - uriTokenSkip = '+' -) - -func bufCap(b []byte, n int) []byte { - if cap(b) < n { - return make([]byte, 0, n) - } - - return b[0:0] -} - -// replacePathElement replaces a single element in the path []byte. -// Escape is used to control whether the value will be escaped using Amazon path escape style. -func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) { - fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } - fieldBuf = append(fieldBuf, uriTokenStart) - fieldBuf = append(fieldBuf, key...) - - start := bytes.Index(path, fieldBuf) - end := start + len(fieldBuf) - if start < 0 || len(path[end:]) == 0 { - // TODO what to do about error? - return path, fieldBuf, fmt.Errorf("invalid path index, start=%d,end=%d. %s", start, end, path) - } - - encodeSep := true - if path[end] == uriTokenSkip { - // '+' token means do not escape slashes - encodeSep = false - end++ - } - - if escape { - val = EscapePath(val, encodeSep) - } - - if path[end] != uriTokenStop { - return path, fieldBuf, fmt.Errorf("invalid path element, does not contain token stop, %s", path) - } - end++ - - fieldBuf = bufCap(fieldBuf, len(val)) - fieldBuf = append(fieldBuf, val...) - - keyLen := end - start - valLen := len(fieldBuf) - - if keyLen == valLen { - copy(path[start:], fieldBuf) - return path, fieldBuf, nil - } - - newLen := len(path) + (valLen - keyLen) - if len(path) < newLen { - path = path[:cap(path)] - } - if cap(path) < newLen { - newURI := make([]byte, newLen) - copy(newURI, path) - path = newURI - } - - // shift - copy(path[start+valLen:], path[end:]) - path = path[:newLen] - copy(path[start:], fieldBuf) - - return path, fieldBuf, nil -} - -// EscapePath escapes part of a URL path in Amazon style. -func EscapePath(path string, encodeSep bool) string { - var buf bytes.Buffer - for i := 0; i < len(path); i++ { - c := path[i] - if noEscape[c] || (c == '/' && !encodeSep) { - buf.WriteByte(c) - } else { - fmt.Fprintf(&buf, "%%%02X", c) - } - } - return buf.String() -} - -var noEscape [256]bool - -func init() { - for i := 0; i < len(noEscape); i++ { - // AWS expects every character except these to be escaped - noEscape[i] = (i >= 'A' && i <= 'Z') || - (i >= 'a' && i <= 'z') || - (i >= '0' && i <= '9') || - i == '-' || - i == '.' || - i == '_' || - i == '~' - } -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go deleted file mode 100644 index c2e7d0a20..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go +++ /dev/null @@ -1,107 +0,0 @@ -package httpbinding - -import ( - "encoding/base64" - "math" - "math/big" - "net/url" - "strconv" -) - -// QueryValue is used to encode query key values -type QueryValue struct { - query url.Values - key string - append bool -} - -// NewQueryValue creates a new QueryValue which enables encoding -// a query value into the given url.Values. -func NewQueryValue(query url.Values, key string, append bool) QueryValue { - return QueryValue{ - query: query, - key: key, - append: append, - } -} - -func (qv QueryValue) updateKey(value string) { - if qv.append { - qv.query.Add(qv.key, value) - } else { - qv.query.Set(qv.key, value) - } -} - -// Blob encodes v as a base64 query string value -func (qv QueryValue) Blob(v []byte) { - encodeToString := base64.StdEncoding.EncodeToString(v) - qv.updateKey(encodeToString) -} - -// Boolean encodes v as a query string value -func (qv QueryValue) Boolean(v bool) { - qv.updateKey(strconv.FormatBool(v)) -} - -// String encodes v as a query string value -func (qv QueryValue) String(v string) { - qv.updateKey(v) -} - -// Byte encodes v as a query string value -func (qv QueryValue) Byte(v int8) { - qv.Long(int64(v)) -} - -// Short encodes v as a query string value -func (qv QueryValue) Short(v int16) { - qv.Long(int64(v)) -} - -// Integer encodes v as a query string value -func (qv QueryValue) Integer(v int32) { - qv.Long(int64(v)) -} - -// Long encodes v as a query string value -func (qv QueryValue) Long(v int64) { - qv.updateKey(strconv.FormatInt(v, 10)) -} - -// Float encodes v as a query string value -func (qv QueryValue) Float(v float32) { - qv.float(float64(v), 32) -} - -// Double encodes v as a query string value -func (qv QueryValue) Double(v float64) { - qv.float(v, 64) -} - -func (qv QueryValue) float(v float64, bitSize int) { - switch { - case math.IsNaN(v): - qv.String(floatNaN) - case math.IsInf(v, 1): - qv.String(floatInfinity) - case math.IsInf(v, -1): - qv.String(floatNegInfinity) - default: - qv.updateKey(strconv.FormatFloat(v, 'f', -1, bitSize)) - } -} - -// BigInteger encodes v as a query string value -func (qv QueryValue) BigInteger(v *big.Int) { - qv.updateKey(v.String()) -} - -// BigDecimal encodes v as a query string value -func (qv QueryValue) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - qv.Long(i) - return - } - qv.updateKey(v.Text('e', -1)) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go deleted file mode 100644 index f04e11984..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go +++ /dev/null @@ -1,111 +0,0 @@ -package httpbinding - -import ( - "math" - "math/big" - "strconv" - "strings" -) - -// URIValue is used to encode named URI parameters -type URIValue struct { - path, rawPath, buffer *[]byte - - key string -} - -func newURIValue(path *[]byte, rawPath *[]byte, buffer *[]byte, key string) URIValue { - return URIValue{path: path, rawPath: rawPath, buffer: buffer, key: key} -} - -func (u URIValue) modifyURI(value string) (err error) { - *u.path, *u.buffer, err = replacePathElement(*u.path, *u.buffer, u.key, value, false) - if err != nil { - return err - } - *u.rawPath, *u.buffer, err = replacePathElement(*u.rawPath, *u.buffer, u.key, value, true) - return err -} - -// Boolean encodes v as a URI string value -func (u URIValue) Boolean(v bool) error { - return u.modifyURI(strconv.FormatBool(v)) -} - -// String encodes v as a URI string value -func (u URIValue) String(v string) error { - return u.modifyURI(v) -} - -// Byte encodes v as a URI string value -func (u URIValue) Byte(v int8) error { - return u.Long(int64(v)) -} - -// Short encodes v as a URI string value -func (u URIValue) Short(v int16) error { - return u.Long(int64(v)) -} - -// Integer encodes v as a URI string value -func (u URIValue) Integer(v int32) error { - return u.Long(int64(v)) -} - -// Long encodes v as a URI string value -func (u URIValue) Long(v int64) error { - return u.modifyURI(strconv.FormatInt(v, 10)) -} - -// Float encodes v as a query string value -func (u URIValue) Float(v float32) error { - return u.float(float64(v), 32) -} - -// Double encodes v as a query string value -func (u URIValue) Double(v float64) error { - return u.float(v, 64) -} - -func (u URIValue) float(v float64, bitSize int) error { - switch { - case math.IsNaN(v): - return u.String(floatNaN) - case math.IsInf(v, 1): - return u.String(floatInfinity) - case math.IsInf(v, -1): - return u.String(floatNegInfinity) - default: - return u.modifyURI(strconv.FormatFloat(v, 'f', -1, bitSize)) - } -} - -// BigInteger encodes v as a query string value -func (u URIValue) BigInteger(v *big.Int) error { - return u.modifyURI(v.String()) -} - -// BigDecimal encodes v as a query string value -func (u URIValue) BigDecimal(v *big.Float) error { - if i, accuracy := v.Int64(); accuracy == big.Exact { - return u.Long(i) - } - return u.modifyURI(v.Text('e', -1)) -} - -// SplitURI parses a Smithy HTTP binding trait URI -func SplitURI(uri string) (path, query string) { - queryStart := strings.IndexRune(uri, '?') - if queryStart == -1 { - path = uri - return path, query - } - - path = uri[:queryStart] - if queryStart+1 >= len(uri) { - return path, query - } - query = uri[queryStart+1:] - - return path, query -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/array.go b/vendor/github.com/aws/smithy-go/encoding/xml/array.go deleted file mode 100644 index 508f3c997..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/array.go +++ /dev/null @@ -1,49 +0,0 @@ -package xml - -// arrayMemberWrapper is the default member wrapper tag name for XML Array type -var arrayMemberWrapper = StartElement{ - Name: Name{Local: "member"}, -} - -// Array represents the encoding of a XML array type -type Array struct { - w writer - scratch *[]byte - - // member start element is the array member wrapper start element - memberStartElement StartElement - - // isFlattened indicates if the array is a flattened array. - isFlattened bool -} - -// newArray returns an array encoder. -// It also takes in the member start element, array start element. -// It takes in a isFlattened bool, indicating that an array is flattened array. -// -// A wrapped array ["value1", "value2"] is represented as -// `value1value2`. - -// A flattened array `someList: ["value1", "value2"]` is represented as -// `value1value2`. -func newArray(w writer, scratch *[]byte, memberStartElement StartElement, arrayStartElement StartElement, isFlattened bool) *Array { - var memberWrapper = memberStartElement - if isFlattened { - memberWrapper = arrayStartElement - } - - return &Array{ - w: w, - scratch: scratch, - memberStartElement: memberWrapper, - isFlattened: isFlattened, - } -} - -// Member adds a new member to the XML array. -// It returns a Value encoder. -func (a *Array) Member() Value { - v := newValue(a.w, a.scratch, a.memberStartElement) - v.isFlattened = a.isFlattened - return v -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/constants.go b/vendor/github.com/aws/smithy-go/encoding/xml/constants.go deleted file mode 100644 index ccee90a63..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/constants.go +++ /dev/null @@ -1,10 +0,0 @@ -package xml - -const ( - leftAngleBracket = '<' - rightAngleBracket = '>' - forwardSlash = '/' - colon = ':' - equals = '=' - quote = '"' -) diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go b/vendor/github.com/aws/smithy-go/encoding/xml/doc.go deleted file mode 100644 index f9200093e..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Package xml holds the XMl encoder utility. This utility is written in accordance to our design to delegate to -shape serializer function in which a xml.Value will be passed around. - -Resources followed: https://smithy.io/2.0/spec/protocol-traits.html#xml-bindings - -Member Element - -Member element should be used to encode xml shapes into xml elements except for flattened xml shapes. Member element -write their own element start tag. These elements should always be closed. - -Flattened Element - -Flattened element should be used to encode shapes marked with flattened trait into xml elements. Flattened element -do not write a start tag, and thus should not be closed. - -Simple types encoding - -All simple type methods on value such as String(), Long() etc; auto close the associated member element. - -Array - -Array returns the collection encoder. It has two modes, wrapped and flattened encoding. - -Wrapped arrays have two methods Array() and ArrayWithCustomName() which facilitate array member wrapping. -By default, a wrapped array members are wrapped with `member` named start element. - - appletree - -Flattened arrays rely on Value being marked as flattened. -If a shape is marked as flattened, Array() will use the shape element name as wrapper for array elements. - - appletree - -Map - -Map is the map encoder. It has two modes, wrapped and flattened encoding. - -Wrapped map has Array() method, which facilitate map member wrapping. -By default, a wrapped map members are wrapped with `entry` named start element. - - appletreesnowice - -Flattened map rely on Value being marked as flattened. -If a shape is marked as flattened, Map() will use the shape element name as wrapper for map entry elements. - - appletreesnowice -*/ -package xml diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/element.go b/vendor/github.com/aws/smithy-go/encoding/xml/element.go deleted file mode 100644 index ae84e7999..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/element.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copied and modified from Go 1.14 stdlib's encoding/xml - -package xml - -// A Name represents an XML name (Local) annotated -// with a name space identifier (Space). -// In tokens returned by Decoder.Token, the Space identifier -// is given as a canonical URL, not the short prefix used -// in the document being parsed. -type Name struct { - Space, Local string -} - -// An Attr represents an attribute in an XML element (Name=Value). -type Attr struct { - Name Name - Value string -} - -/* -NewAttribute returns a pointer to an attribute. -It takes in a local name aka attribute name, and value -representing the attribute value. -*/ -func NewAttribute(local, value string) Attr { - return Attr{ - Name: Name{ - Local: local, - }, - Value: value, - } -} - -/* -NewNamespaceAttribute returns a pointer to an attribute. -It takes in a local name aka attribute name, and value -representing the attribute value. - -NewNamespaceAttribute appends `xmlns:` in front of namespace -prefix. - -For creating a name space attribute representing -`xmlns:prefix="http://example.com`, the breakdown would be: -local = "prefix" -value = "http://example.com" -*/ -func NewNamespaceAttribute(local, value string) Attr { - attr := NewAttribute(local, value) - - // default name space identifier - attr.Name.Space = "xmlns" - return attr -} - -// A StartElement represents an XML start element. -type StartElement struct { - Name Name - Attr []Attr -} - -// Copy creates a new copy of StartElement. -func (e StartElement) Copy() StartElement { - attrs := make([]Attr, len(e.Attr)) - copy(attrs, e.Attr) - e.Attr = attrs - return e -} - -// End returns the corresponding XML end element. -func (e StartElement) End() EndElement { - return EndElement{e.Name} -} - -// returns true if start element local name is empty -func (e StartElement) isZero() bool { - return len(e.Name.Local) == 0 -} - -// An EndElement represents an XML end element. -type EndElement struct { - Name Name -} - -// returns true if end element local name is empty -func (e EndElement) isZero() bool { - return len(e.Name.Local) == 0 -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go b/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go deleted file mode 100644 index 16fb3dddb..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go +++ /dev/null @@ -1,51 +0,0 @@ -package xml - -// writer interface used by the xml encoder to write an encoded xml -// document in a writer. -type writer interface { - - // Write takes in a byte slice and returns number of bytes written and error - Write(p []byte) (n int, err error) - - // WriteRune takes in a rune and returns number of bytes written and error - WriteRune(r rune) (n int, err error) - - // WriteString takes in a string and returns number of bytes written and error - WriteString(s string) (n int, err error) - - // String method returns a string - String() string - - // Bytes return a byte slice. - Bytes() []byte -} - -// Encoder is an XML encoder that supports construction of XML values -// using methods. The encoder takes in a writer and maintains a scratch buffer. -type Encoder struct { - w writer - scratch *[]byte -} - -// NewEncoder returns an XML encoder -func NewEncoder(w writer) *Encoder { - scratch := make([]byte, 64) - - return &Encoder{w: w, scratch: &scratch} -} - -// String returns the string output of the XML encoder -func (e Encoder) String() string { - return e.w.String() -} - -// Bytes returns the []byte slice of the XML encoder -func (e Encoder) Bytes() []byte { - return e.w.Bytes() -} - -// RootElement builds a root element encoding -// It writes it's start element tag. The value should be closed. -func (e Encoder) RootElement(element StartElement) Value { - return newValue(e.w, e.scratch, element) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go b/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go deleted file mode 100644 index f3db6ccca..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go +++ /dev/null @@ -1,51 +0,0 @@ -package xml - -import ( - "encoding/xml" - "fmt" - "io" -) - -// ErrorComponents represents the error response fields -// that will be deserialized from an xml error response body -type ErrorComponents struct { - Code string - Message string -} - -// GetErrorResponseComponents returns the error fields from an xml error response body -func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorComponents, error) { - if noErrorWrapping { - var errResponse noWrappedErrorResponse - if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err) - } - return ErrorComponents{ - Code: errResponse.Code, - Message: errResponse.Message, - }, nil - } - - var errResponse wrappedErrorResponse - if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err) - } - return ErrorComponents{ - Code: errResponse.Code, - Message: errResponse.Message, - }, nil -} - -// noWrappedErrorResponse represents the error response body with -// no internal ... -type wrappedErrorResponse struct { - Code string `xml:"Error>Code"` - Message string `xml:"Error>Message"` -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/escape.go b/vendor/github.com/aws/smithy-go/encoding/xml/escape.go deleted file mode 100644 index 1c5479af6..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/escape.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Copied and modified from Go 1.14 stdlib's encoding/xml - -package xml - -import ( - "unicode/utf8" -) - -// Copied from Go 1.14 stdlib's encoding/xml -var ( - escQuot = []byte(""") // shorter than """ - escApos = []byte("'") // shorter than "'" - escAmp = []byte("&") - escLT = []byte("<") - escGT = []byte(">") - escTab = []byte(" ") - escNL = []byte(" ") - escCR = []byte(" ") - escFFFD = []byte("\uFFFD") // Unicode replacement character - - // Additional Escapes - escNextLine = []byte("…") - escLS = []byte("
") -) - -// Decide whether the given rune is in the XML Character Range, per -// the Char production of https://www.xml.com/axml/testaxml.htm, -// Section 2.2 Characters. -func isInCharacterRange(r rune) (inrange bool) { - return r == 0x09 || - r == 0x0A || - r == 0x0D || - r >= 0x20 && r <= 0xD7FF || - r >= 0xE000 && r <= 0xFFFD || - r >= 0x10000 && r <= 0x10FFFF -} - -// TODO: When do we need to escape the string? -// Based on encoding/xml escapeString from the Go Standard Library. -// https://golang.org/src/encoding/xml/xml.go -func escapeString(e writer, s string) { - var esc []byte - last := 0 - for i := 0; i < len(s); { - r, width := utf8.DecodeRuneInString(s[i:]) - i += width - switch r { - case '"': - esc = escQuot - case '\'': - esc = escApos - case '&': - esc = escAmp - case '<': - esc = escLT - case '>': - esc = escGT - case '\t': - esc = escTab - case '\n': - esc = escNL - case '\r': - esc = escCR - case '\u0085': - // Not escaped by stdlib - esc = escNextLine - case '\u2028': - // Not escaped by stdlib - esc = escLS - default: - if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) { - esc = escFFFD - break - } - continue - } - e.WriteString(s[last : i-width]) - e.Write(esc) - last = i - } - e.WriteString(s[last:]) -} - -// escapeText writes to w the properly escaped XML equivalent -// of the plain text data s. If escapeNewline is true, newline -// characters will be escaped. -// -// Based on encoding/xml escapeText from the Go Standard Library. -// https://golang.org/src/encoding/xml/xml.go -func escapeText(e writer, s []byte) { - var esc []byte - last := 0 - for i := 0; i < len(s); { - r, width := utf8.DecodeRune(s[i:]) - i += width - switch r { - case '"': - esc = escQuot - case '\'': - esc = escApos - case '&': - esc = escAmp - case '<': - esc = escLT - case '>': - esc = escGT - case '\t': - esc = escTab - case '\n': - // This always escapes newline, which is different than stdlib's optional - // escape of new line. - esc = escNL - case '\r': - esc = escCR - case '\u0085': - // Not escaped by stdlib - esc = escNextLine - case '\u2028': - // Not escaped by stdlib - esc = escLS - default: - if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) { - esc = escFFFD - break - } - continue - } - e.Write(s[last : i-width]) - e.Write(esc) - last = i - } - e.Write(s[last:]) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/map.go b/vendor/github.com/aws/smithy-go/encoding/xml/map.go deleted file mode 100644 index e42858965..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/map.go +++ /dev/null @@ -1,53 +0,0 @@ -package xml - -// mapEntryWrapper is the default member wrapper start element for XML Map entry -var mapEntryWrapper = StartElement{ - Name: Name{Local: "entry"}, -} - -// Map represents the encoding of a XML map type -type Map struct { - w writer - scratch *[]byte - - // member start element is the map entry wrapper start element - memberStartElement StartElement - - // isFlattened returns true if the map is a flattened map - isFlattened bool -} - -// newMap returns a map encoder which sets the default map -// entry wrapper to `entry`. -// -// A map `someMap : {{key:"abc", value:"123"}}` is represented as -// `abc123`. -func newMap(w writer, scratch *[]byte) *Map { - return &Map{ - w: w, - scratch: scratch, - memberStartElement: mapEntryWrapper, - } -} - -// newFlattenedMap returns a map encoder which sets the map -// entry wrapper to the passed in memberWrapper`. -// -// A flattened map `someMap : {{key:"abc", value:"123"}}` is represented as -// `abc123`. -func newFlattenedMap(w writer, scratch *[]byte, memberWrapper StartElement) *Map { - return &Map{ - w: w, - scratch: scratch, - memberStartElement: memberWrapper, - isFlattened: true, - } -} - -// Entry returns a Value encoder with map's element. -// It writes the member wrapper start tag for each entry. -func (m *Map) Entry() Value { - v := newValue(m.w, m.scratch, m.memberStartElement) - v.isFlattened = m.isFlattened - return v -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/value.go b/vendor/github.com/aws/smithy-go/encoding/xml/value.go deleted file mode 100644 index 09434b2c0..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/value.go +++ /dev/null @@ -1,302 +0,0 @@ -package xml - -import ( - "encoding/base64" - "fmt" - "math/big" - "strconv" - - "github.com/aws/smithy-go/encoding" -) - -// Value represents an XML Value type -// XML Value types: Object, Array, Map, String, Number, Boolean. -type Value struct { - w writer - scratch *[]byte - - // xml start element is the associated start element for the Value - startElement StartElement - - // indicates if the Value represents a flattened shape - isFlattened bool -} - -// newFlattenedValue returns a Value encoder. newFlattenedValue does NOT write the start element tag -func newFlattenedValue(w writer, scratch *[]byte, startElement StartElement) Value { - return Value{ - w: w, - scratch: scratch, - startElement: startElement, - } -} - -// newValue writes the start element xml tag and returns a Value -func newValue(w writer, scratch *[]byte, startElement StartElement) Value { - writeStartElement(w, startElement) - return Value{w: w, scratch: scratch, startElement: startElement} -} - -// writeStartElement takes in a start element and writes it. -// It handles namespace, attributes in start element. -func writeStartElement(w writer, el StartElement) error { - if el.isZero() { - return fmt.Errorf("xml start element cannot be nil") - } - - w.WriteRune(leftAngleBracket) - - if len(el.Name.Space) != 0 { - escapeString(w, el.Name.Space) - w.WriteRune(colon) - } - escapeString(w, el.Name.Local) - for _, attr := range el.Attr { - w.WriteRune(' ') - writeAttribute(w, &attr) - } - - w.WriteRune(rightAngleBracket) - return nil -} - -// writeAttribute writes an attribute from a provided Attribute -// For a namespace attribute, the attr.Name.Space must be defined as "xmlns". -// https://www.w3.org/TR/REC-xml-names/#NT-DefaultAttName -func writeAttribute(w writer, attr *Attr) { - // if local, space both are not empty - if len(attr.Name.Space) != 0 && len(attr.Name.Local) != 0 { - escapeString(w, attr.Name.Space) - w.WriteRune(colon) - } - - // if prefix is empty, the default `xmlns` space should be used as prefix. - if len(attr.Name.Local) == 0 { - attr.Name.Local = attr.Name.Space - } - - escapeString(w, attr.Name.Local) - w.WriteRune(equals) - w.WriteRune(quote) - escapeString(w, attr.Value) - w.WriteRune(quote) -} - -// writeEndElement takes in a end element and writes it. -func writeEndElement(w writer, el EndElement) error { - if el.isZero() { - return fmt.Errorf("xml end element cannot be nil") - } - - w.WriteRune(leftAngleBracket) - w.WriteRune(forwardSlash) - - if len(el.Name.Space) != 0 { - escapeString(w, el.Name.Space) - w.WriteRune(colon) - } - escapeString(w, el.Name.Local) - w.WriteRune(rightAngleBracket) - - return nil -} - -// String encodes v as a XML string. -// It will auto close the parent xml element tag. -func (xv Value) String(v string) { - escapeString(xv.w, v) - xv.Close() -} - -// Byte encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Byte(v int8) { - xv.Long(int64(v)) -} - -// Short encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Short(v int16) { - xv.Long(int64(v)) -} - -// Integer encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Integer(v int32) { - xv.Long(int64(v)) -} - -// Long encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Long(v int64) { - *xv.scratch = strconv.AppendInt((*xv.scratch)[:0], v, 10) - xv.w.Write(*xv.scratch) - - xv.Close() -} - -// Float encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Float(v float32) { - xv.float(float64(v), 32) - xv.Close() -} - -// Double encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Double(v float64) { - xv.float(v, 64) - xv.Close() -} - -func (xv Value) float(v float64, bits int) { - *xv.scratch = encoding.EncodeFloat((*xv.scratch)[:0], v, bits) - xv.w.Write(*xv.scratch) -} - -// Boolean encodes v as a XML boolean. -// It will auto close the parent xml element tag. -func (xv Value) Boolean(v bool) { - *xv.scratch = strconv.AppendBool((*xv.scratch)[:0], v) - xv.w.Write(*xv.scratch) - - xv.Close() -} - -// Base64EncodeBytes writes v as a base64 value in XML string. -// It will auto close the parent xml element tag. -func (xv Value) Base64EncodeBytes(v []byte) { - encodeByteSlice(xv.w, (*xv.scratch)[:0], v) - xv.Close() -} - -// BigInteger encodes v big.Int as XML value. -// It will auto close the parent xml element tag. -func (xv Value) BigInteger(v *big.Int) { - xv.w.Write([]byte(v.Text(10))) - xv.Close() -} - -// BigDecimal encodes v big.Float as XML value. -// It will auto close the parent xml element tag. -func (xv Value) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - xv.Long(i) - return - } - - xv.w.Write([]byte(v.Text('e', -1))) - xv.Close() -} - -// Write writes v directly to the xml document -// if escapeXMLText is set to true, write will escape text. -// It will auto close the parent xml element tag. -func (xv Value) Write(v []byte, escapeXMLText bool) { - // escape and write xml text - if escapeXMLText { - escapeText(xv.w, v) - } else { - // write xml directly - xv.w.Write(v) - } - - xv.Close() -} - -// MemberElement does member element encoding. It returns a Value. -// Member Element method should be used for all shapes except flattened shapes. -// -// A call to MemberElement will write nested element tags directly using the -// provided start element. The value returned by MemberElement should be closed. -func (xv Value) MemberElement(element StartElement) Value { - return newValue(xv.w, xv.scratch, element) -} - -// FlattenedElement returns flattened element encoding. It returns a Value. -// This method should be used for flattened shapes. -// -// Unlike MemberElement, flattened element will NOT write element tags -// directly for the associated start element. -// -// The value returned by the FlattenedElement does not need to be closed. -func (xv Value) FlattenedElement(element StartElement) Value { - v := newFlattenedValue(xv.w, xv.scratch, element) - v.isFlattened = true - return v -} - -// Array returns an array encoder. By default, the members of array are -// wrapped with `` element tag. -// If value is marked as flattened, the start element is used to wrap the members instead of -// the `` element. -func (xv Value) Array() *Array { - return newArray(xv.w, xv.scratch, arrayMemberWrapper, xv.startElement, xv.isFlattened) -} - -/* -ArrayWithCustomName returns an array encoder. - -It takes named start element as an argument, the named start element will used to wrap xml array entries. -for eg, `entry1` -Here `customName` named start element will be wrapped on each array member. -*/ -func (xv Value) ArrayWithCustomName(element StartElement) *Array { - return newArray(xv.w, xv.scratch, element, xv.startElement, xv.isFlattened) -} - -/* -Map returns a map encoder. By default, the map entries are -wrapped with `` element tag. - -If value is marked as flattened, the start element is used to wrap the entry instead of -the `` element. -*/ -func (xv Value) Map() *Map { - // flattened map - if xv.isFlattened { - return newFlattenedMap(xv.w, xv.scratch, xv.startElement) - } - - // un-flattened map - return newMap(xv.w, xv.scratch) -} - -// encodeByteSlice is modified copy of json encoder's encodeByteSlice. -// It is used to base64 encode a byte slice. -func encodeByteSlice(w writer, scratch []byte, v []byte) { - if v == nil { - return - } - - encodedLen := base64.StdEncoding.EncodedLen(len(v)) - if encodedLen <= len(scratch) { - // If the encoded bytes fit in e.scratch, avoid an extra - // allocation and use the cheaper Encoding.Encode. - dst := scratch[:encodedLen] - base64.StdEncoding.Encode(dst, v) - w.Write(dst) - } else if encodedLen <= 1024 { - // The encoded bytes are short enough to allocate for, and - // Encoding.Encode is still cheaper. - dst := make([]byte, encodedLen) - base64.StdEncoding.Encode(dst, v) - w.Write(dst) - } else { - // The encoded bytes are too long to cheaply allocate, and - // Encoding.Encode is no longer noticeably cheaper. - enc := base64.NewEncoder(base64.StdEncoding, w) - enc.Write(v) - enc.Close() - } -} - -// IsFlattened returns true if value is for flattened shape. -func (xv Value) IsFlattened() bool { - return xv.isFlattened -} - -// Close closes the value. -func (xv Value) Close() { - writeEndElement(xv.w, xv.startElement.End()) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go b/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go deleted file mode 100644 index dc4eebdff..000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go +++ /dev/null @@ -1,154 +0,0 @@ -package xml - -import ( - "encoding/xml" - "fmt" - "strings" -) - -// NodeDecoder is a XML decoder wrapper that is responsible to decoding -// a single XML Node element and it's nested member elements. This wrapper decoder -// takes in the start element of the top level node being decoded. -type NodeDecoder struct { - Decoder *xml.Decoder - StartEl xml.StartElement -} - -// WrapNodeDecoder returns an initialized XMLNodeDecoder -func WrapNodeDecoder(decoder *xml.Decoder, startEl xml.StartElement) NodeDecoder { - return NodeDecoder{ - Decoder: decoder, - StartEl: startEl, - } -} - -// Token on a Node Decoder returns a xml StartElement. It returns a boolean that indicates the -// a token is the node decoder's end node token; and an error which indicates any error -// that occurred while retrieving the start element -func (d NodeDecoder) Token() (t xml.StartElement, done bool, err error) { - for { - token, e := d.Decoder.Token() - if e != nil { - return t, done, e - } - - // check if we reach end of the node being decoded - if el, ok := token.(xml.EndElement); ok { - return t, el == d.StartEl.End(), err - } - - if t, ok := token.(xml.StartElement); ok { - return restoreAttrNamespaces(t), false, err - } - - // skip token if it is a comment or preamble or empty space value due to indentation - // or if it's a value and is not expected - } -} - -// restoreAttrNamespaces update XML attributes to restore the short namespaces found within -// the raw XML document. -func restoreAttrNamespaces(node xml.StartElement) xml.StartElement { - if len(node.Attr) == 0 { - return node - } - - // Generate a mapping of XML namespace values to their short names. - ns := map[string]string{} - for _, a := range node.Attr { - if a.Name.Space == "xmlns" { - ns[a.Value] = a.Name.Local - break - } - } - - for i, a := range node.Attr { - if a.Name.Space == "xmlns" { - continue - } - // By default, xml.Decoder will fully resolve these namespaces. So if you had - // then by default the second attribute would have the `Name.Space` resolved to `baz`. But we need it to - // continue to resolve as `bar` so we can easily identify it later on. - if v, ok := ns[node.Attr[i].Name.Space]; ok { - node.Attr[i].Name.Space = v - } - } - return node -} - -// GetElement looks for the given tag name at the current level, and returns the element if found, and -// skipping over non-matching elements. Returns an error if the node is not found, or if an error occurs while walking -// the document. -func (d NodeDecoder) GetElement(name string) (t xml.StartElement, err error) { - for { - token, done, err := d.Token() - if err != nil { - return t, err - } - if done { - return t, fmt.Errorf("%s node not found", name) - } - switch { - case strings.EqualFold(name, token.Name.Local): - return token, nil - default: - err = d.Decoder.Skip() - if err != nil { - return t, err - } - } - } -} - -// Value provides an abstraction to retrieve char data value within an xml element. -// The method will return an error if it encounters a nested xml element instead of char data. -// This method should only be used to retrieve simple type or blob shape values as []byte. -func (d NodeDecoder) Value() (c []byte, err error) { - t, e := d.Decoder.Token() - if e != nil { - return c, e - } - - endElement := d.StartEl.End() - - switch ev := t.(type) { - case xml.CharData: - c = ev.Copy() - case xml.EndElement: // end tag or self-closing - if ev == endElement { - return []byte{}, err - } - return c, fmt.Errorf("expected value for %v element, got %T type %v instead", d.StartEl.Name.Local, t, t) - default: - return c, fmt.Errorf("expected value for %v element, got %T type %v instead", d.StartEl.Name.Local, t, t) - } - - t, e = d.Decoder.Token() - if e != nil { - return c, e - } - - if ev, ok := t.(xml.EndElement); ok { - if ev == endElement { - return c, err - } - } - - return c, fmt.Errorf("expected end element %v, got %T type %v instead", endElement, t, t) -} - -// FetchRootElement takes in a decoder and returns the first start element within the xml body. -// This function is useful in fetching the start element of an XML response and ignore the -// comments and preamble -func FetchRootElement(decoder *xml.Decoder) (startElement xml.StartElement, err error) { - for { - t, e := decoder.Token() - if e != nil { - return startElement, e - } - - if startElement, ok := t.(xml.StartElement); ok { - return startElement, err - } - } -} diff --git a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go b/vendor/github.com/aws/smithy-go/endpoints/endpoint.go deleted file mode 100644 index a93528397..000000000 --- a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go +++ /dev/null @@ -1,23 +0,0 @@ -package transport - -import ( - "net/http" - "net/url" - - "github.com/aws/smithy-go" -) - -// Endpoint is the endpoint object returned by Endpoint resolution V2 -type Endpoint struct { - // The complete URL minimally specfiying the scheme and host. - // May optionally specify the port and base path component. - URI url.URL - - // An optional set of headers to be sent using transport layer headers. - Headers http.Header - - // A grab-bag property map of endpoint attributes. The - // values present here are subject to change, or being add/removed at any - // time. - Properties smithy.Properties -} diff --git a/vendor/github.com/aws/smithy-go/errors.go b/vendor/github.com/aws/smithy-go/errors.go deleted file mode 100644 index d6948d020..000000000 --- a/vendor/github.com/aws/smithy-go/errors.go +++ /dev/null @@ -1,137 +0,0 @@ -package smithy - -import "fmt" - -// APIError provides the generic API and protocol agnostic error type all SDK -// generated exception types will implement. -type APIError interface { - error - - // ErrorCode returns the error code for the API exception. - ErrorCode() string - // ErrorMessage returns the error message for the API exception. - ErrorMessage() string - // ErrorFault returns the fault for the API exception. - ErrorFault() ErrorFault -} - -// GenericAPIError provides a generic concrete API error type that SDKs can use -// to deserialize error responses into. Should be used for unmodeled or untyped -// errors. -type GenericAPIError struct { - Code string - Message string - Fault ErrorFault -} - -// ErrorCode returns the error code for the API exception. -func (e *GenericAPIError) ErrorCode() string { return e.Code } - -// ErrorMessage returns the error message for the API exception. -func (e *GenericAPIError) ErrorMessage() string { return e.Message } - -// ErrorFault returns the fault for the API exception. -func (e *GenericAPIError) ErrorFault() ErrorFault { return e.Fault } - -func (e *GenericAPIError) Error() string { - return fmt.Sprintf("api error %s: %s", e.Code, e.Message) -} - -var _ APIError = (*GenericAPIError)(nil) - -// OperationError decorates an underlying error which occurred while invoking -// an operation with names of the operation and API. -type OperationError struct { - ServiceID string - OperationName string - Err error -} - -// Service returns the name of the API service the error occurred with. -func (e *OperationError) Service() string { return e.ServiceID } - -// Operation returns the name of the API operation the error occurred with. -func (e *OperationError) Operation() string { return e.OperationName } - -// Unwrap returns the nested error if any, or nil. -func (e *OperationError) Unwrap() error { return e.Err } - -func (e *OperationError) Error() string { - return fmt.Sprintf("operation error %s: %s, %v", e.ServiceID, e.OperationName, e.Err) -} - -// DeserializationError provides a wrapper for an error that occurs during -// deserialization. -type DeserializationError struct { - Err error // original error - Snapshot []byte -} - -// Error returns a formatted error for DeserializationError -func (e *DeserializationError) Error() string { - const msg = "deserialization failed" - if e.Err == nil { - return msg - } - return fmt.Sprintf("%s, %v", msg, e.Err) -} - -// Unwrap returns the underlying Error in DeserializationError -func (e *DeserializationError) Unwrap() error { return e.Err } - -// ErrorFault provides the type for a Smithy API error fault. -type ErrorFault int - -// ErrorFault enumeration values -const ( - FaultUnknown ErrorFault = iota - FaultServer - FaultClient -) - -func (f ErrorFault) String() string { - switch f { - case FaultServer: - return "server" - case FaultClient: - return "client" - default: - return "unknown" - } -} - -// SerializationError represents an error that occurred while attempting to serialize a request -type SerializationError struct { - Err error // original error -} - -// Error returns a formatted error for SerializationError -func (e *SerializationError) Error() string { - const msg = "serialization failed" - if e.Err == nil { - return msg - } - return fmt.Sprintf("%s: %v", msg, e.Err) -} - -// Unwrap returns the underlying Error in SerializationError -func (e *SerializationError) Unwrap() error { return e.Err } - -// CanceledError is the error that will be returned by an API request that was -// canceled. API operations given a Context may return this error when -// canceled. -type CanceledError struct { - Err error -} - -// CanceledError returns true to satisfy interfaces checking for canceled errors. -func (*CanceledError) CanceledError() bool { return true } - -// Unwrap returns the underlying error, if there was one. -func (e *CanceledError) Unwrap() error { - return e.Err -} - -func (e *CanceledError) Error() string { - return fmt.Sprintf("canceled, %v", e.Err) -} diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go deleted file mode 100644 index 341392e10..000000000 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package smithy - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.20.1" diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE deleted file mode 100644 index fe6a62006..000000000 --- a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go deleted file mode 100644 index 9c9d02b94..000000000 --- a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go +++ /dev/null @@ -1,8 +0,0 @@ -// Package singleflight provides a duplicate function call suppression -// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight -// package. The package is forked, because the package a part of the unstable -// and unversioned golang.org/x/sync module. -// -// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight - -package singleflight diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go deleted file mode 100644 index e8a1b17d5..000000000 --- a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package singleflight - -import ( - "bytes" - "errors" - "fmt" - "runtime" - "runtime/debug" - "sync" -) - -// errGoexit indicates the runtime.Goexit was called in -// the user given function. -var errGoexit = errors.New("runtime.Goexit was called") - -// A panicError is an arbitrary value recovered from a panic -// with the stack trace during the execution of given function. -type panicError struct { - value interface{} - stack []byte -} - -// Error implements error interface. -func (p *panicError) Error() string { - return fmt.Sprintf("%v\n\n%s", p.value, p.stack) -} - -func newPanicError(v interface{}) error { - stack := debug.Stack() - - // The first line of the stack trace is of the form "goroutine N [status]:" - // but by the time the panic reaches Do the goroutine may no longer exist - // and its status will have changed. Trim out the misleading line. - if line := bytes.IndexByte(stack[:], '\n'); line >= 0 { - stack = stack[line+1:] - } - return &panicError{value: v, stack: stack} -} - -// call is an in-flight or completed singleflight.Do call -type call struct { - wg sync.WaitGroup - - // These fields are written once before the WaitGroup is done - // and are only read after the WaitGroup is done. - val interface{} - err error - - // forgotten indicates whether Forget was called with this call's key - // while the call was still in flight. - forgotten bool - - // These fields are read and written with the singleflight - // mutex held before the WaitGroup is done, and are read but - // not written after the WaitGroup is done. - dups int - chans []chan<- Result -} - -// Group represents a class of work and forms a namespace in -// which units of work can be executed with duplicate suppression. -type Group struct { - mu sync.Mutex // protects m - m map[string]*call // lazily initialized -} - -// Result holds the results of Do, so they can be passed -// on a channel. -type Result struct { - Val interface{} - Err error - Shared bool -} - -// Do executes and returns the results of the given function, making -// sure that only one execution is in-flight for a given key at a -// time. If a duplicate comes in, the duplicate caller waits for the -// original to complete and receives the same results. -// The return value shared indicates whether v was given to multiple callers. -func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) { - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - g.mu.Unlock() - c.wg.Wait() - - if e, ok := c.err.(*panicError); ok { - panic(e) - } else if c.err == errGoexit { - runtime.Goexit() - } - return c.val, c.err, true - } - c := new(call) - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - g.doCall(c, key, fn) - return c.val, c.err, c.dups > 0 -} - -// DoChan is like Do but returns a channel that will receive the -// results when they are ready. -// -// The returned channel will not be closed. -func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result { - ch := make(chan Result, 1) - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - c.chans = append(c.chans, ch) - g.mu.Unlock() - return ch - } - c := &call{chans: []chan<- Result{ch}} - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - go g.doCall(c, key, fn) - - return ch -} - -// doCall handles the single call for a key. -func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) { - normalReturn := false - recovered := false - - // use double-defer to distinguish panic from runtime.Goexit, - // more details see https://golang.org/cl/134395 - defer func() { - // the given function invoked runtime.Goexit - if !normalReturn && !recovered { - c.err = errGoexit - } - - c.wg.Done() - g.mu.Lock() - defer g.mu.Unlock() - if !c.forgotten { - delete(g.m, key) - } - - if e, ok := c.err.(*panicError); ok { - // In order to prevent the waiting channels from being blocked forever, - // needs to ensure that this panic cannot be recovered. - if len(c.chans) > 0 { - go panic(e) - select {} // Keep this goroutine around so that it will appear in the crash dump. - } else { - panic(e) - } - } else if c.err == errGoexit { - // Already in the process of goexit, no need to call again - } else { - // Normal return - for _, ch := range c.chans { - ch <- Result{c.val, c.err, c.dups > 0} - } - } - }() - - func() { - defer func() { - if !normalReturn { - // Ideally, we would wait to take a stack trace until we've determined - // whether this is a panic or a runtime.Goexit. - // - // Unfortunately, the only way we can distinguish the two is to see - // whether the recover stopped the goroutine from terminating, and by - // the time we know that, the part of the stack trace relevant to the - // panic has been discarded. - if r := recover(); r != nil { - c.err = newPanicError(r) - } - } - }() - - c.val, c.err = fn() - normalReturn = true - }() - - if !normalReturn { - recovered = true - } -} - -// Forget tells the singleflight to forget about a key. Future calls -// to Do for this key will call the function rather than waiting for -// an earlier call to complete. -func (g *Group) Forget(key string) { - g.mu.Lock() - if c, ok := g.m[key]; ok { - c.forgotten = true - } - delete(g.m, key) - g.mu.Unlock() -} diff --git a/vendor/github.com/aws/smithy-go/io/byte.go b/vendor/github.com/aws/smithy-go/io/byte.go deleted file mode 100644 index f8417c15b..000000000 --- a/vendor/github.com/aws/smithy-go/io/byte.go +++ /dev/null @@ -1,12 +0,0 @@ -package io - -const ( - // Byte is 8 bits - Byte int64 = 1 - // KibiByte (KiB) is 1024 Bytes - KibiByte = Byte * 1024 - // MebiByte (MiB) is 1024 KiB - MebiByte = KibiByte * 1024 - // GibiByte (GiB) is 1024 MiB - GibiByte = MebiByte * 1024 -) diff --git a/vendor/github.com/aws/smithy-go/io/doc.go b/vendor/github.com/aws/smithy-go/io/doc.go deleted file mode 100644 index a6a33eaf5..000000000 --- a/vendor/github.com/aws/smithy-go/io/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package io provides utilities for Smithy generated API clients. -package io diff --git a/vendor/github.com/aws/smithy-go/io/reader.go b/vendor/github.com/aws/smithy-go/io/reader.go deleted file mode 100644 index 07063f296..000000000 --- a/vendor/github.com/aws/smithy-go/io/reader.go +++ /dev/null @@ -1,16 +0,0 @@ -package io - -import ( - "io" -) - -// ReadSeekNopCloser wraps an io.ReadSeeker with an additional Close method -// that does nothing. -type ReadSeekNopCloser struct { - io.ReadSeeker -} - -// Close does nothing. -func (ReadSeekNopCloser) Close() error { - return nil -} diff --git a/vendor/github.com/aws/smithy-go/io/ringbuffer.go b/vendor/github.com/aws/smithy-go/io/ringbuffer.go deleted file mode 100644 index 06b476add..000000000 --- a/vendor/github.com/aws/smithy-go/io/ringbuffer.go +++ /dev/null @@ -1,94 +0,0 @@ -package io - -import ( - "bytes" - "io" -) - -// RingBuffer struct satisfies io.ReadWrite interface. -// -// ReadBuffer is a revolving buffer data structure, which can be used to store snapshots of data in a -// revolving window. -type RingBuffer struct { - slice []byte - start int - end int - size int -} - -// NewRingBuffer method takes in a byte slice as an input and returns a RingBuffer. -func NewRingBuffer(slice []byte) *RingBuffer { - ringBuf := RingBuffer{ - slice: slice, - } - return &ringBuf -} - -// Write method inserts the elements in a byte slice, and returns the number of bytes written along with any error. -func (r *RingBuffer) Write(p []byte) (int, error) { - for _, b := range p { - // check if end points to invalid index, we need to circle back - if r.end == len(r.slice) { - r.end = 0 - } - // check if start points to invalid index, we need to circle back - if r.start == len(r.slice) { - r.start = 0 - } - // if ring buffer is filled, increment the start index - if r.size == len(r.slice) { - r.size-- - r.start++ - } - - r.slice[r.end] = b - r.end++ - r.size++ - } - return len(p), nil -} - -// Read copies the data on the ring buffer into the byte slice provided to the method. -// Returns the read count along with any error encountered while reading. -func (r *RingBuffer) Read(p []byte) (int, error) { - // readCount keeps track of the number of bytes read - var readCount int - for j := 0; j < len(p); j++ { - // if ring buffer is empty or completely read - // return EOF error. - if r.size == 0 { - return readCount, io.EOF - } - - if r.start == len(r.slice) { - r.start = 0 - } - - p[j] = r.slice[r.start] - readCount++ - // increment the start pointer for ring buffer - r.start++ - // decrement the size of ring buffer - r.size-- - } - return readCount, nil -} - -// Len returns the number of unread bytes in the buffer. -func (r *RingBuffer) Len() int { - return r.size -} - -// Bytes returns a copy of the RingBuffer's bytes. -func (r RingBuffer) Bytes() []byte { - var b bytes.Buffer - io.Copy(&b, &r) - return b.Bytes() -} - -// Reset resets the ring buffer. -func (r *RingBuffer) Reset() { - *r = RingBuffer{ - slice: r.slice, - } -} diff --git a/vendor/github.com/aws/smithy-go/local-mod-replace.sh b/vendor/github.com/aws/smithy-go/local-mod-replace.sh deleted file mode 100644 index 800bf3769..000000000 --- a/vendor/github.com/aws/smithy-go/local-mod-replace.sh +++ /dev/null @@ -1,39 +0,0 @@ -#1/usr/bin/env bash - -PROJECT_DIR="" -SMITHY_SOURCE_DIR=$(cd `dirname $0` && pwd) - -usage() { - echo "Usage: $0 [-s SMITHY_SOURCE_DIR] [-d PROJECT_DIR]" 1>&2 - exit 1 -} - -while getopts "hs:d:" options; do - case "${options}" in - s) - SMITHY_SOURCE_DIR=${OPTARG} - if [ "$SMITHY_SOURCE_DIR" == "" ]; then - echo "path to smithy-go source directory is required" || exit - usage - fi - ;; - d) - PROJECT_DIR=${OPTARG} - ;; - h) - usage - ;; - *) - usage - ;; - esac -done - -if [ "$PROJECT_DIR" != "" ]; then - cd $PROJECT_DIR || exit -fi - -go mod graph | awk '{print $1}' | cut -d '@' -f 1 | sort | uniq | grep "github.com/aws/smithy-go" | while read x; do - repPath=${x/github.com\/aws\/smithy-go/${SMITHY_SOURCE_DIR}} - echo -replace $x=$repPath -done | xargs go mod edit diff --git a/vendor/github.com/aws/smithy-go/logging/logger.go b/vendor/github.com/aws/smithy-go/logging/logger.go deleted file mode 100644 index 2071924bd..000000000 --- a/vendor/github.com/aws/smithy-go/logging/logger.go +++ /dev/null @@ -1,82 +0,0 @@ -package logging - -import ( - "context" - "io" - "log" -) - -// Classification is the type of the log entry's classification name. -type Classification string - -// Set of standard classifications that can be used by clients and middleware -const ( - Warn Classification = "WARN" - Debug Classification = "DEBUG" -) - -// Logger is an interface for logging entries at certain classifications. -type Logger interface { - // Logf is expected to support the standard fmt package "verbs". - Logf(classification Classification, format string, v ...interface{}) -} - -// LoggerFunc is a wrapper around a function to satisfy the Logger interface. -type LoggerFunc func(classification Classification, format string, v ...interface{}) - -// Logf delegates the logging request to the wrapped function. -func (f LoggerFunc) Logf(classification Classification, format string, v ...interface{}) { - f(classification, format, v...) -} - -// ContextLogger is an optional interface a Logger implementation may expose that provides -// the ability to create context aware log entries. -type ContextLogger interface { - WithContext(context.Context) Logger -} - -// WithContext will pass the provided context to logger if it implements the ContextLogger interface and return the resulting -// logger. Otherwise the logger will be returned as is. As a special case if a nil logger is provided, a Nop logger will -// be returned to the caller. -func WithContext(ctx context.Context, logger Logger) Logger { - if logger == nil { - return Nop{} - } - - cl, ok := logger.(ContextLogger) - if !ok { - return logger - } - - return cl.WithContext(ctx) -} - -// Nop is a Logger implementation that simply does not perform any logging. -type Nop struct{} - -// Logf simply returns without performing any action -func (n Nop) Logf(Classification, string, ...interface{}) { - return -} - -// StandardLogger is a Logger implementation that wraps the standard library logger, and delegates logging to it's -// Printf method. -type StandardLogger struct { - Logger *log.Logger -} - -// Logf logs the given classification and message to the underlying logger. -func (s StandardLogger) Logf(classification Classification, format string, v ...interface{}) { - if len(classification) != 0 { - format = string(classification) + " " + format - } - - s.Logger.Printf(format, v...) -} - -// NewStandardLogger returns a new StandardLogger -func NewStandardLogger(writer io.Writer) *StandardLogger { - return &StandardLogger{ - Logger: log.New(writer, "SDK ", log.LstdFlags), - } -} diff --git a/vendor/github.com/aws/smithy-go/middleware/doc.go b/vendor/github.com/aws/smithy-go/middleware/doc.go deleted file mode 100644 index 9858928a7..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/doc.go +++ /dev/null @@ -1,67 +0,0 @@ -// Package middleware provides transport agnostic middleware for decorating SDK -// handlers. -// -// The Smithy middleware stack provides ordered behavior to be invoked on an -// underlying handler. The stack is separated into steps that are invoked in a -// static order. A step is a collection of middleware that are injected into a -// ordered list defined by the user. The user may add, insert, swap, and remove a -// step's middleware. When the stack is invoked the step middleware become static, -// and their order cannot be modified. -// -// A stack and its step middleware are **not** safe to modify concurrently. -// -// A stack will use the ordered list of middleware to decorate a underlying -// handler. A handler could be something like an HTTP Client that round trips an -// API operation over HTTP. -// -// Smithy Middleware Stack -// -// A Stack is a collection of middleware that wrap a handler. The stack can be -// broken down into discreet steps. Each step may contain zero or more middleware -// specific to that stack's step. -// -// A Stack Step is a predefined set of middleware that are invoked in a static -// order by the Stack. These steps represent fixed points in the middleware stack -// for organizing specific behavior, such as serialize and build. A Stack Step is -// composed of zero or more middleware that are specific to that step. A step may -// define its own set of input/output parameters the generic input/output -// parameters are cast from. A step calls its middleware recursively, before -// calling the next step in the stack returning the result or error of the step -// middleware decorating the underlying handler. -// -// * Initialize: Prepares the input, and sets any default parameters as needed, -// (e.g. idempotency token, and presigned URLs). -// -// * Serialize: Serializes the prepared input into a data structure that can be -// consumed by the target transport's message, (e.g. REST-JSON serialization). -// -// * Build: Adds additional metadata to the serialized transport message, (e.g. -// HTTP's Content-Length header, or body checksum). Decorations and -// modifications to the message should be copied to all message attempts. -// -// * Finalize: Performs final preparations needed before sending the message. The -// message should already be complete by this stage, and is only alternated to -// meet the expectations of the recipient, (e.g. Retry and AWS SigV4 request -// signing). -// -// * Deserialize: Reacts to the handler's response returned by the recipient of -// the request message. Deserializes the response into a structured type or -// error above stacks can react to. -// -// Adding Middleware to a Stack Step -// -// Middleware can be added to a step front or back, or relative, by name, to an -// existing middleware in that stack. If a middleware does not have a name, a -// unique name will be generated at the middleware and be added to the step. -// -// // Create middleware stack -// stack := middleware.NewStack() -// -// // Add middleware to stack steps -// stack.Initialize.Add(paramValidationMiddleware, middleware.After) -// stack.Serialize.Add(marshalOperationFoo, middleware.After) -// stack.Deserialize.Add(unmarshalOperationFoo, middleware.After) -// -// // Invoke middleware on handler. -// resp, err := stack.HandleMiddleware(ctx, req.Input, clientHandler) -package middleware diff --git a/vendor/github.com/aws/smithy-go/middleware/logging.go b/vendor/github.com/aws/smithy-go/middleware/logging.go deleted file mode 100644 index c2f0dbb6b..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/logging.go +++ /dev/null @@ -1,46 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/aws/smithy-go/logging" -) - -// loggerKey is the context value key for which the logger is associated with. -type loggerKey struct{} - -// GetLogger takes a context to retrieve a Logger from. If no logger is present on the context a logging.Nop logger -// is returned. If the logger retrieved from context supports the ContextLogger interface, the context will be passed -// to the WithContext method and the resulting logger will be returned. Otherwise the stored logger is returned as is. -func GetLogger(ctx context.Context) logging.Logger { - logger, ok := ctx.Value(loggerKey{}).(logging.Logger) - if !ok || logger == nil { - return logging.Nop{} - } - - return logging.WithContext(ctx, logger) -} - -// SetLogger sets the provided logger value on the provided ctx. -func SetLogger(ctx context.Context, logger logging.Logger) context.Context { - return context.WithValue(ctx, loggerKey{}, logger) -} - -type setLogger struct { - Logger logging.Logger -} - -// AddSetLoggerMiddleware adds a middleware that will add the provided logger to the middleware context. -func AddSetLoggerMiddleware(stack *Stack, logger logging.Logger) error { - return stack.Initialize.Add(&setLogger{Logger: logger}, After) -} - -func (a *setLogger) ID() string { - return "SetLogger" -} - -func (a *setLogger) HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) ( - out InitializeOutput, metadata Metadata, err error, -) { - return next.HandleInitialize(SetLogger(ctx, a.Logger), in) -} diff --git a/vendor/github.com/aws/smithy-go/middleware/metadata.go b/vendor/github.com/aws/smithy-go/middleware/metadata.go deleted file mode 100644 index 7bb7dbcf5..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/metadata.go +++ /dev/null @@ -1,65 +0,0 @@ -package middleware - -// MetadataReader provides an interface for reading metadata from the -// underlying metadata container. -type MetadataReader interface { - Get(key interface{}) interface{} -} - -// Metadata provides storing and reading metadata values. Keys may be any -// comparable value type. Get and set will panic if key is not a comparable -// value type. -// -// Metadata uses lazy initialization, and Set method must be called as an -// addressable value, or pointer. Not doing so may cause key/value pair to not -// be set. -type Metadata struct { - values map[interface{}]interface{} -} - -// Get attempts to retrieve the value the key points to. Returns nil if the -// key was not found. -// -// Panics if key type is not comparable. -func (m Metadata) Get(key interface{}) interface{} { - return m.values[key] -} - -// Clone creates a shallow copy of Metadata entries, returning a new Metadata -// value with the original entries copied into it. -func (m Metadata) Clone() Metadata { - vs := make(map[interface{}]interface{}, len(m.values)) - for k, v := range m.values { - vs[k] = v - } - - return Metadata{ - values: vs, - } -} - -// Set stores the value pointed to by the key. If a value already exists at -// that key it will be replaced with the new value. -// -// Set method must be called as an addressable value, or pointer. If Set is not -// called as an addressable value or pointer, the key value pair being set may -// be lost. -// -// Panics if the key type is not comparable. -func (m *Metadata) Set(key, value interface{}) { - if m.values == nil { - m.values = map[interface{}]interface{}{} - } - m.values[key] = value -} - -// Has returns whether the key exists in the metadata. -// -// Panics if the key type is not comparable. -func (m Metadata) Has(key interface{}) bool { - if m.values == nil { - return false - } - _, ok := m.values[key] - return ok -} diff --git a/vendor/github.com/aws/smithy-go/middleware/middleware.go b/vendor/github.com/aws/smithy-go/middleware/middleware.go deleted file mode 100644 index 803b7c751..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/middleware.go +++ /dev/null @@ -1,71 +0,0 @@ -package middleware - -import ( - "context" -) - -// Handler provides the interface for performing the logic to obtain an output, -// or error for the given input. -type Handler interface { - // Handle performs logic to obtain an output for the given input. Handler - // should be decorated with middleware to perform input specific behavior. - Handle(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, - ) -} - -// HandlerFunc provides a wrapper around a function pointer to be used as a -// middleware handler. -type HandlerFunc func(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, -) - -// Handle invokes the underlying function, returning the result. -func (fn HandlerFunc) Handle(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, -) { - return fn(ctx, input) -} - -// Middleware provides the interface to call handlers in a chain. -type Middleware interface { - // ID provides a unique identifier for the middleware. - ID() string - - // Performs the middleware's handling of the input, returning the output, - // or error. The middleware can invoke the next Handler if handling should - // continue. - HandleMiddleware(ctx context.Context, input interface{}, next Handler) ( - output interface{}, metadata Metadata, err error, - ) -} - -// decoratedHandler wraps a middleware in order to to call the next handler in -// the chain. -type decoratedHandler struct { - // The next handler to be called. - Next Handler - - // The current middleware decorating the handler. - With Middleware -} - -// Handle implements the Handler interface to handle a operation invocation. -func (m decoratedHandler) Handle(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, -) { - return m.With.HandleMiddleware(ctx, input, m.Next) -} - -// DecorateHandler decorates a handler with a middleware. Wrapping the handler -// with the middleware. -func DecorateHandler(h Handler, with ...Middleware) Handler { - for i := len(with) - 1; i >= 0; i-- { - h = decoratedHandler{ - Next: h, - With: with[i], - } - } - - return h -} diff --git a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go deleted file mode 100644 index 4b195308c..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go +++ /dev/null @@ -1,268 +0,0 @@ -package middleware - -import "fmt" - -// RelativePosition provides specifying the relative position of a middleware -// in an ordered group. -type RelativePosition int - -// Relative position for middleware in steps. -const ( - After RelativePosition = iota - Before -) - -type ider interface { - ID() string -} - -// orderedIDs provides an ordered collection of items with relative ordering -// by name. -type orderedIDs struct { - order *relativeOrder - items map[string]ider -} - -const baseOrderedItems = 5 - -func newOrderedIDs() *orderedIDs { - return &orderedIDs{ - order: newRelativeOrder(), - items: make(map[string]ider, baseOrderedItems), - } -} - -// Add injects the item to the relative position of the item group. Returns an -// error if the item already exists. -func (g *orderedIDs) Add(m ider, pos RelativePosition) error { - id := m.ID() - if len(id) == 0 { - return fmt.Errorf("empty ID, ID must not be empty") - } - - if err := g.order.Add(pos, id); err != nil { - return err - } - - g.items[id] = m - return nil -} - -// Insert injects the item relative to an existing item id. Returns an error if -// the original item does not exist, or the item being added already exists. -func (g *orderedIDs) Insert(m ider, relativeTo string, pos RelativePosition) error { - if len(m.ID()) == 0 { - return fmt.Errorf("insert ID must not be empty") - } - if len(relativeTo) == 0 { - return fmt.Errorf("relative to ID must not be empty") - } - - if err := g.order.Insert(relativeTo, pos, m.ID()); err != nil { - return err - } - - g.items[m.ID()] = m - return nil -} - -// Get returns the ider identified by id. If ider is not present, returns false. -func (g *orderedIDs) Get(id string) (ider, bool) { - v, ok := g.items[id] - return v, ok -} - -// Swap removes the item by id, replacing it with the new item. Returns an error -// if the original item doesn't exist. -func (g *orderedIDs) Swap(id string, m ider) (ider, error) { - if len(id) == 0 { - return nil, fmt.Errorf("swap from ID must not be empty") - } - - iderID := m.ID() - if len(iderID) == 0 { - return nil, fmt.Errorf("swap to ID must not be empty") - } - - if err := g.order.Swap(id, iderID); err != nil { - return nil, err - } - - removed := g.items[id] - - delete(g.items, id) - g.items[iderID] = m - - return removed, nil -} - -// Remove removes the item by id. Returns an error if the item -// doesn't exist. -func (g *orderedIDs) Remove(id string) (ider, error) { - if len(id) == 0 { - return nil, fmt.Errorf("remove ID must not be empty") - } - - if err := g.order.Remove(id); err != nil { - return nil, err - } - - removed := g.items[id] - delete(g.items, id) - return removed, nil -} - -func (g *orderedIDs) List() []string { - items := g.order.List() - order := make([]string, len(items)) - copy(order, items) - return order -} - -// Clear removes all entries and slots. -func (g *orderedIDs) Clear() { - g.order.Clear() - g.items = map[string]ider{} -} - -// GetOrder returns the item in the order it should be invoked in. -func (g *orderedIDs) GetOrder() []interface{} { - order := g.order.List() - ordered := make([]interface{}, len(order)) - for i := 0; i < len(order); i++ { - ordered[i] = g.items[order[i]] - } - - return ordered -} - -// relativeOrder provides ordering of item -type relativeOrder struct { - order []string -} - -func newRelativeOrder() *relativeOrder { - return &relativeOrder{ - order: make([]string, 0, baseOrderedItems), - } -} - -// Add inserts an item into the order relative to the position provided. -func (s *relativeOrder) Add(pos RelativePosition, ids ...string) error { - if len(ids) == 0 { - return nil - } - - for _, id := range ids { - if _, ok := s.has(id); ok { - return fmt.Errorf("already exists, %v", id) - } - } - - switch pos { - case Before: - return s.insert(0, Before, ids...) - - case After: - s.order = append(s.order, ids...) - - default: - return fmt.Errorf("invalid position, %v", int(pos)) - } - - return nil -} - -// Insert injects an item before or after the relative item. Returns -// an error if the relative item does not exist. -func (s *relativeOrder) Insert(relativeTo string, pos RelativePosition, ids ...string) error { - if len(ids) == 0 { - return nil - } - - for _, id := range ids { - if _, ok := s.has(id); ok { - return fmt.Errorf("already exists, %v", id) - } - } - - i, ok := s.has(relativeTo) - if !ok { - return fmt.Errorf("not found, %v", relativeTo) - } - - return s.insert(i, pos, ids...) -} - -// Swap will replace the item id with the to item. Returns an -// error if the original item id does not exist. Allows swapping out an -// item for another item with the same id. -func (s *relativeOrder) Swap(id, to string) error { - i, ok := s.has(id) - if !ok { - return fmt.Errorf("not found, %v", id) - } - - if _, ok = s.has(to); ok && id != to { - return fmt.Errorf("already exists, %v", to) - } - - s.order[i] = to - return nil -} - -func (s *relativeOrder) Remove(id string) error { - i, ok := s.has(id) - if !ok { - return fmt.Errorf("not found, %v", id) - } - - s.order = append(s.order[:i], s.order[i+1:]...) - return nil -} - -func (s *relativeOrder) List() []string { - return s.order -} - -func (s *relativeOrder) Clear() { - s.order = s.order[0:0] -} - -func (s *relativeOrder) insert(i int, pos RelativePosition, ids ...string) error { - switch pos { - case Before: - n := len(ids) - var src []string - if n <= cap(s.order)-len(s.order) { - s.order = s.order[:len(s.order)+n] - src = s.order - } else { - src = s.order - s.order = make([]string, len(s.order)+n) - copy(s.order[:i], src[:i]) // only when allocating a new slice do we need to copy the front half - } - copy(s.order[i+n:], src[i:]) - copy(s.order[i:], ids) - case After: - if i == len(s.order)-1 || len(s.order) == 0 { - s.order = append(s.order, ids...) - } else { - s.order = append(s.order[:i+1], append(ids, s.order[i+1:]...)...) - } - - default: - return fmt.Errorf("invalid position, %v", int(pos)) - } - - return nil -} - -func (s *relativeOrder) has(id string) (i int, found bool) { - for i := 0; i < len(s.order); i++ { - if s.order[i] == id { - return i, true - } - } - return 0, false -} diff --git a/vendor/github.com/aws/smithy-go/middleware/stack.go b/vendor/github.com/aws/smithy-go/middleware/stack.go deleted file mode 100644 index 45ccb5b93..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/stack.go +++ /dev/null @@ -1,209 +0,0 @@ -package middleware - -import ( - "context" - "io" - "strings" -) - -// Stack provides protocol and transport agnostic set of middleware split into -// distinct steps. Steps have specific transitions between them, that are -// managed by the individual step. -// -// Steps are composed as middleware around the underlying handler in the -// following order: -// -// Initialize -> Serialize -> Build -> Finalize -> Deserialize -> Handler -// -// Any middleware within the chain may choose to stop and return an error or -// response. Since the middleware decorate the handler like a call stack, each -// middleware will receive the result of the next middleware in the chain. -// Middleware that does not need to react to an input, or result must forward -// along the input down the chain, or return the result back up the chain. -// -// Initialize <- Serialize -> Build -> Finalize <- Deserialize <- Handler -type Stack struct { - // Initialize prepares the input, and sets any default parameters as - // needed, (e.g. idempotency token, and presigned URLs). - // - // Takes Input Parameters, and returns result or error. - // - // Receives result or error from Serialize step. - Initialize *InitializeStep - - // Serialize serializes the prepared input into a data structure that can be consumed - // by the target transport's message, (e.g. REST-JSON serialization) - // - // Converts Input Parameters into a Request, and returns the result or error. - // - // Receives result or error from Build step. - Serialize *SerializeStep - - // Build adds additional metadata to the serialized transport message - // (e.g. HTTP's Content-Length header, or body checksum). Decorations and - // modifications to the message should be copied to all message attempts. - // - // Takes Request, and returns result or error. - // - // Receives result or error from Finalize step. - Build *BuildStep - - // Finalize performs final preparations needed before sending the message. The - // message should already be complete by this stage, and is only alternated - // to meet the expectations of the recipient (e.g. Retry and AWS SigV4 - // request signing) - // - // Takes Request, and returns result or error. - // - // Receives result or error from Deserialize step. - Finalize *FinalizeStep - - // Deserialize reacts to the handler's response returned by the recipient of the request - // message. Deserializes the response into a structured type or error above - // stacks can react to. - // - // Should only forward Request to underlying handler. - // - // Takes Request, and returns result or error. - // - // Receives raw response, or error from underlying handler. - Deserialize *DeserializeStep - - id string -} - -// NewStack returns an initialize empty stack. -func NewStack(id string, newRequestFn func() interface{}) *Stack { - return &Stack{ - id: id, - Initialize: NewInitializeStep(), - Serialize: NewSerializeStep(newRequestFn), - Build: NewBuildStep(), - Finalize: NewFinalizeStep(), - Deserialize: NewDeserializeStep(), - } -} - -// ID returns the unique ID for the stack as a middleware. -func (s *Stack) ID() string { return s.id } - -// HandleMiddleware invokes the middleware stack decorating the next handler. -// Each step of stack will be invoked in order before calling the next step. -// With the next handler call last. -// -// The input value must be the input parameters of the operation being -// performed. -// -// Will return the result of the operation, or error. -func (s *Stack) HandleMiddleware(ctx context.Context, input interface{}, next Handler) ( - output interface{}, metadata Metadata, err error, -) { - h := DecorateHandler(next, - s.Initialize, - s.Serialize, - s.Build, - s.Finalize, - s.Deserialize, - ) - - return h.Handle(ctx, input) -} - -// List returns a list of all middleware in the stack by step. -func (s *Stack) List() []string { - var l []string - l = append(l, s.id) - - l = append(l, s.Initialize.ID()) - l = append(l, s.Initialize.List()...) - - l = append(l, s.Serialize.ID()) - l = append(l, s.Serialize.List()...) - - l = append(l, s.Build.ID()) - l = append(l, s.Build.List()...) - - l = append(l, s.Finalize.ID()) - l = append(l, s.Finalize.List()...) - - l = append(l, s.Deserialize.ID()) - l = append(l, s.Deserialize.List()...) - - return l -} - -func (s *Stack) String() string { - var b strings.Builder - - w := &indentWriter{w: &b} - - w.WriteLine(s.id) - w.Push() - - writeStepItems(w, s.Initialize) - writeStepItems(w, s.Serialize) - writeStepItems(w, s.Build) - writeStepItems(w, s.Finalize) - writeStepItems(w, s.Deserialize) - - return b.String() -} - -type stackStepper interface { - ID() string - List() []string -} - -func writeStepItems(w *indentWriter, s stackStepper) { - type lister interface { - List() []string - } - - w.WriteLine(s.ID()) - w.Push() - - defer w.Pop() - - // ignore stack to prevent circular iterations - if _, ok := s.(*Stack); ok { - return - } - - for _, id := range s.List() { - w.WriteLine(id) - } -} - -type stringWriter interface { - io.Writer - WriteString(string) (int, error) - WriteRune(rune) (int, error) -} - -type indentWriter struct { - w stringWriter - depth int -} - -const indentDepth = "\t\t\t\t\t\t\t\t\t\t" - -func (w *indentWriter) Push() { - w.depth++ -} - -func (w *indentWriter) Pop() { - w.depth-- - if w.depth < 0 { - w.depth = 0 - } -} - -func (w *indentWriter) WriteLine(v string) { - w.w.WriteString(indentDepth[:w.depth]) - - v = strings.ReplaceAll(v, "\n", "\\n") - v = strings.ReplaceAll(v, "\r", "\\r") - - w.w.WriteString(v) - w.w.WriteRune('\n') -} diff --git a/vendor/github.com/aws/smithy-go/middleware/stack_values.go b/vendor/github.com/aws/smithy-go/middleware/stack_values.go deleted file mode 100644 index ef96009ba..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/stack_values.go +++ /dev/null @@ -1,100 +0,0 @@ -package middleware - -import ( - "context" - "reflect" - "strings" -) - -// WithStackValue adds a key value pair to the context that is intended to be -// scoped to a stack. Use ClearStackValues to get a new context with all stack -// values cleared. -func WithStackValue(ctx context.Context, key, value interface{}) context.Context { - md, _ := ctx.Value(stackValuesKey{}).(*stackValues) - - md = withStackValue(md, key, value) - return context.WithValue(ctx, stackValuesKey{}, md) -} - -// ClearStackValues returns a context without any stack values. -func ClearStackValues(ctx context.Context) context.Context { - return context.WithValue(ctx, stackValuesKey{}, nil) -} - -// GetStackValues returns the value pointed to by the key within the stack -// values, if it is present. -func GetStackValue(ctx context.Context, key interface{}) interface{} { - md, _ := ctx.Value(stackValuesKey{}).(*stackValues) - if md == nil { - return nil - } - - return md.Value(key) -} - -type stackValuesKey struct{} - -type stackValues struct { - key interface{} - value interface{} - parent *stackValues -} - -func withStackValue(parent *stackValues, key, value interface{}) *stackValues { - if key == nil { - panic("nil key") - } - if !reflect.TypeOf(key).Comparable() { - panic("key is not comparable") - } - return &stackValues{key: key, value: value, parent: parent} -} - -func (m *stackValues) Value(key interface{}) interface{} { - if key == m.key { - return m.value - } - - if m.parent == nil { - return nil - } - - return m.parent.Value(key) -} - -func (c *stackValues) String() string { - var str strings.Builder - - cc := c - for cc == nil { - str.WriteString("(" + - reflect.TypeOf(c.key).String() + - ": " + - stringify(cc.value) + - ")") - if cc.parent != nil { - str.WriteString(" -> ") - } - cc = cc.parent - } - str.WriteRune('}') - - return str.String() -} - -type stringer interface { - String() string -} - -// stringify tries a bit to stringify v, without using fmt, since we don't -// want context depending on the unicode tables. This is only used by -// *valueCtx.String(). -func stringify(v interface{}) string { - switch s := v.(type) { - case stringer: - return s.String() - case string: - return s - } - return "" -} diff --git a/vendor/github.com/aws/smithy-go/middleware/step_build.go b/vendor/github.com/aws/smithy-go/middleware/step_build.go deleted file mode 100644 index 7e1d94cae..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_build.go +++ /dev/null @@ -1,211 +0,0 @@ -package middleware - -import ( - "context" -) - -// BuildInput provides the input parameters for the BuildMiddleware to consume. -// BuildMiddleware may modify the Request value before forwarding the input -// along to the next BuildHandler. -type BuildInput struct { - Request interface{} -} - -// BuildOutput provides the result returned by the next BuildHandler. -type BuildOutput struct { - Result interface{} -} - -// BuildHandler provides the interface for the next handler the -// BuildMiddleware will call in the middleware chain. -type BuildHandler interface { - HandleBuild(ctx context.Context, in BuildInput) ( - out BuildOutput, metadata Metadata, err error, - ) -} - -// BuildMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next BuildHandler for further -// processing. -type BuildMiddleware interface { - // Unique ID for the middleware in theBuildStep. The step does not allow - // duplicate IDs. - ID() string - - // Invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) ( - out BuildOutput, metadata Metadata, err error, - ) -} - -// BuildMiddlewareFunc returns a BuildMiddleware with the unique ID provided, -// and the func to be invoked. -func BuildMiddlewareFunc(id string, fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error)) BuildMiddleware { - return buildMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type buildMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error) -} - -// ID returns the unique ID for the middleware. -func (s buildMiddlewareFunc) ID() string { return s.id } - -// HandleBuild invokes the middleware Fn. -func (s buildMiddlewareFunc) HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) ( - out BuildOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ BuildMiddleware = (buildMiddlewareFunc{}) - -// BuildStep provides the ordered grouping of BuildMiddleware to be invoked on -// a handler. -type BuildStep struct { - ids *orderedIDs -} - -// NewBuildStep returns a BuildStep ready to have middleware for -// initialization added to it. -func NewBuildStep() *BuildStep { - return &BuildStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*BuildStep)(nil) - -// ID returns the unique name of the step as a middleware. -func (s *BuildStep) ID() string { - return "Build stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *BuildStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h BuildHandler = buildWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedBuildHandler{ - Next: h, - With: order[i].(BuildMiddleware), - } - } - - sIn := BuildInput{ - Request: in, - } - - res, metadata, err := h.HandleBuild(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *BuildStep) Get(id string) (BuildMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(BuildMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *BuildStep) Add(m BuildMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware id. -// Returns an error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *BuildStep) Insert(m BuildMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or an error if the middleware to be removed -// doesn't exist. -func (s *BuildStep) Swap(id string, m BuildMiddleware) (BuildMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(BuildMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *BuildStep) Remove(id string) (BuildMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(BuildMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *BuildStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *BuildStep) Clear() { - s.ids.Clear() -} - -type buildWrapHandler struct { - Next Handler -} - -var _ BuildHandler = (*buildWrapHandler)(nil) - -// Implements BuildHandler, converts types and delegates to underlying -// generic handler. -func (w buildWrapHandler) HandleBuild(ctx context.Context, in BuildInput) ( - out BuildOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Request) - return BuildOutput{ - Result: res, - }, metadata, err -} - -type decoratedBuildHandler struct { - Next BuildHandler - With BuildMiddleware -} - -var _ BuildHandler = (*decoratedBuildHandler)(nil) - -func (h decoratedBuildHandler) HandleBuild(ctx context.Context, in BuildInput) ( - out BuildOutput, metadata Metadata, err error, -) { - return h.With.HandleBuild(ctx, in, h.Next) -} - -// BuildHandlerFunc provides a wrapper around a function to be used as a build middleware handler. -type BuildHandlerFunc func(context.Context, BuildInput) (BuildOutput, Metadata, error) - -// HandleBuild invokes the wrapped function with the provided arguments. -func (b BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) { - return b(ctx, in) -} - -var _ BuildHandler = BuildHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go deleted file mode 100644 index 448607215..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go +++ /dev/null @@ -1,217 +0,0 @@ -package middleware - -import ( - "context" -) - -// DeserializeInput provides the input parameters for the DeserializeInput to -// consume. DeserializeMiddleware should not modify the Request, and instead -// forward it along to the next DeserializeHandler. -type DeserializeInput struct { - Request interface{} -} - -// DeserializeOutput provides the result returned by the next -// DeserializeHandler. The DeserializeMiddleware should deserialize the -// RawResponse into a Result that can be consumed by middleware higher up in -// the stack. -type DeserializeOutput struct { - RawResponse interface{} - Result interface{} -} - -// DeserializeHandler provides the interface for the next handler the -// DeserializeMiddleware will call in the middleware chain. -type DeserializeHandler interface { - HandleDeserialize(ctx context.Context, in DeserializeInput) ( - out DeserializeOutput, metadata Metadata, err error, - ) -} - -// DeserializeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next DeserializeHandler for further -// processing. -type DeserializeMiddleware interface { - // ID returns a unique ID for the middleware in the DeserializeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleDeserialize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleDeserialize(ctx context.Context, in DeserializeInput, next DeserializeHandler) ( - out DeserializeOutput, metadata Metadata, err error, - ) -} - -// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID -// provided, and the func to be invoked. -func DeserializeMiddlewareFunc(id string, fn func(context.Context, DeserializeInput, DeserializeHandler) (DeserializeOutput, Metadata, error)) DeserializeMiddleware { - return deserializeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type deserializeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, DeserializeInput, DeserializeHandler) ( - DeserializeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s deserializeMiddlewareFunc) ID() string { return s.id } - -// HandleDeserialize invokes the middleware Fn. -func (s deserializeMiddlewareFunc) HandleDeserialize(ctx context.Context, in DeserializeInput, next DeserializeHandler) ( - out DeserializeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ DeserializeMiddleware = (deserializeMiddlewareFunc{}) - -// DeserializeStep provides the ordered grouping of DeserializeMiddleware to be -// invoked on a handler. -type DeserializeStep struct { - ids *orderedIDs -} - -// NewDeserializeStep returns a DeserializeStep ready to have middleware for -// initialization added to it. -func NewDeserializeStep() *DeserializeStep { - return &DeserializeStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*DeserializeStep)(nil) - -// ID returns the unique ID of the step as a middleware. -func (s *DeserializeStep) ID() string { - return "Deserialize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *DeserializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h DeserializeHandler = deserializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedDeserializeHandler{ - Next: h, - With: order[i].(DeserializeMiddleware), - } - } - - sIn := DeserializeInput{ - Request: in, - } - - res, metadata, err := h.HandleDeserialize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *DeserializeStep) Get(id string) (DeserializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(DeserializeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *DeserializeStep) Add(m DeserializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *DeserializeStep) Insert(m DeserializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *DeserializeStep) Swap(id string, m DeserializeMiddleware) (DeserializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(DeserializeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *DeserializeStep) Remove(id string) (DeserializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(DeserializeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *DeserializeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *DeserializeStep) Clear() { - s.ids.Clear() -} - -type deserializeWrapHandler struct { - Next Handler -} - -var _ DeserializeHandler = (*deserializeWrapHandler)(nil) - -// HandleDeserialize implements DeserializeHandler, converts types and delegates to underlying -// generic handler. -func (w deserializeWrapHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) ( - out DeserializeOutput, metadata Metadata, err error, -) { - resp, metadata, err := w.Next.Handle(ctx, in.Request) - return DeserializeOutput{ - RawResponse: resp, - }, metadata, err -} - -type decoratedDeserializeHandler struct { - Next DeserializeHandler - With DeserializeMiddleware -} - -var _ DeserializeHandler = (*decoratedDeserializeHandler)(nil) - -func (h decoratedDeserializeHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) ( - out DeserializeOutput, metadata Metadata, err error, -) { - return h.With.HandleDeserialize(ctx, in, h.Next) -} - -// DeserializeHandlerFunc provides a wrapper around a function to be used as a deserialize middleware handler. -type DeserializeHandlerFunc func(context.Context, DeserializeInput) (DeserializeOutput, Metadata, error) - -// HandleDeserialize invokes the wrapped function with the given arguments. -func (d DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) { - return d(ctx, in) -} - -var _ DeserializeHandler = DeserializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go deleted file mode 100644 index 065e3885d..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go +++ /dev/null @@ -1,211 +0,0 @@ -package middleware - -import "context" - -// FinalizeInput provides the input parameters for the FinalizeMiddleware to -// consume. FinalizeMiddleware may modify the Request value before forwarding -// the FinalizeInput along to the next next FinalizeHandler. -type FinalizeInput struct { - Request interface{} -} - -// FinalizeOutput provides the result returned by the next FinalizeHandler. -type FinalizeOutput struct { - Result interface{} -} - -// FinalizeHandler provides the interface for the next handler the -// FinalizeMiddleware will call in the middleware chain. -type FinalizeHandler interface { - HandleFinalize(ctx context.Context, in FinalizeInput) ( - out FinalizeOutput, metadata Metadata, err error, - ) -} - -// FinalizeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next FinalizeHandler for further -// processing. -type FinalizeMiddleware interface { - // ID returns a unique ID for the middleware in the FinalizeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleFinalize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleFinalize(ctx context.Context, in FinalizeInput, next FinalizeHandler) ( - out FinalizeOutput, metadata Metadata, err error, - ) -} - -// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID -// provided, and the func to be invoked. -func FinalizeMiddlewareFunc(id string, fn func(context.Context, FinalizeInput, FinalizeHandler) (FinalizeOutput, Metadata, error)) FinalizeMiddleware { - return finalizeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type finalizeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, FinalizeInput, FinalizeHandler) ( - FinalizeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s finalizeMiddlewareFunc) ID() string { return s.id } - -// HandleFinalize invokes the middleware Fn. -func (s finalizeMiddlewareFunc) HandleFinalize(ctx context.Context, in FinalizeInput, next FinalizeHandler) ( - out FinalizeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ FinalizeMiddleware = (finalizeMiddlewareFunc{}) - -// FinalizeStep provides the ordered grouping of FinalizeMiddleware to be -// invoked on a handler. -type FinalizeStep struct { - ids *orderedIDs -} - -// NewFinalizeStep returns a FinalizeStep ready to have middleware for -// initialization added to it. -func NewFinalizeStep() *FinalizeStep { - return &FinalizeStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*FinalizeStep)(nil) - -// ID returns the unique id of the step as a middleware. -func (s *FinalizeStep) ID() string { - return "Finalize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *FinalizeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h FinalizeHandler = finalizeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedFinalizeHandler{ - Next: h, - With: order[i].(FinalizeMiddleware), - } - } - - sIn := FinalizeInput{ - Request: in, - } - - res, metadata, err := h.HandleFinalize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *FinalizeStep) Get(id string) (FinalizeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(FinalizeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *FinalizeStep) Add(m FinalizeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *FinalizeStep) Insert(m FinalizeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *FinalizeStep) Swap(id string, m FinalizeMiddleware) (FinalizeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(FinalizeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *FinalizeStep) Remove(id string) (FinalizeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(FinalizeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *FinalizeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *FinalizeStep) Clear() { - s.ids.Clear() -} - -type finalizeWrapHandler struct { - Next Handler -} - -var _ FinalizeHandler = (*finalizeWrapHandler)(nil) - -// HandleFinalize implements FinalizeHandler, converts types and delegates to underlying -// generic handler. -func (w finalizeWrapHandler) HandleFinalize(ctx context.Context, in FinalizeInput) ( - out FinalizeOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Request) - return FinalizeOutput{ - Result: res, - }, metadata, err -} - -type decoratedFinalizeHandler struct { - Next FinalizeHandler - With FinalizeMiddleware -} - -var _ FinalizeHandler = (*decoratedFinalizeHandler)(nil) - -func (h decoratedFinalizeHandler) HandleFinalize(ctx context.Context, in FinalizeInput) ( - out FinalizeOutput, metadata Metadata, err error, -) { - return h.With.HandleFinalize(ctx, in, h.Next) -} - -// FinalizeHandlerFunc provides a wrapper around a function to be used as a finalize middleware handler. -type FinalizeHandlerFunc func(context.Context, FinalizeInput) (FinalizeOutput, Metadata, error) - -// HandleFinalize invokes the wrapped function with the given arguments. -func (f FinalizeHandlerFunc) HandleFinalize(ctx context.Context, in FinalizeInput) (FinalizeOutput, Metadata, error) { - return f(ctx, in) -} - -var _ FinalizeHandler = FinalizeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go deleted file mode 100644 index fe359144d..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go +++ /dev/null @@ -1,211 +0,0 @@ -package middleware - -import "context" - -// InitializeInput wraps the input parameters for the InitializeMiddlewares to -// consume. InitializeMiddleware may modify the parameter value before -// forwarding it along to the next InitializeHandler. -type InitializeInput struct { - Parameters interface{} -} - -// InitializeOutput provides the result returned by the next InitializeHandler. -type InitializeOutput struct { - Result interface{} -} - -// InitializeHandler provides the interface for the next handler the -// InitializeMiddleware will call in the middleware chain. -type InitializeHandler interface { - HandleInitialize(ctx context.Context, in InitializeInput) ( - out InitializeOutput, metadata Metadata, err error, - ) -} - -// InitializeMiddleware provides the interface for middleware specific to the -// initialize step. Delegates to the next InitializeHandler for further -// processing. -type InitializeMiddleware interface { - // ID returns a unique ID for the middleware in the InitializeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleInitialize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) ( - out InitializeOutput, metadata Metadata, err error, - ) -} - -// InitializeMiddlewareFunc returns a InitializeMiddleware with the unique ID provided, -// and the func to be invoked. -func InitializeMiddlewareFunc(id string, fn func(context.Context, InitializeInput, InitializeHandler) (InitializeOutput, Metadata, error)) InitializeMiddleware { - return initializeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type initializeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, InitializeInput, InitializeHandler) ( - InitializeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s initializeMiddlewareFunc) ID() string { return s.id } - -// HandleInitialize invokes the middleware Fn. -func (s initializeMiddlewareFunc) HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) ( - out InitializeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ InitializeMiddleware = (initializeMiddlewareFunc{}) - -// InitializeStep provides the ordered grouping of InitializeMiddleware to be -// invoked on a handler. -type InitializeStep struct { - ids *orderedIDs -} - -// NewInitializeStep returns an InitializeStep ready to have middleware for -// initialization added to it. -func NewInitializeStep() *InitializeStep { - return &InitializeStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*InitializeStep)(nil) - -// ID returns the unique ID of the step as a middleware. -func (s *InitializeStep) ID() string { - return "Initialize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *InitializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h InitializeHandler = initializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedInitializeHandler{ - Next: h, - With: order[i].(InitializeMiddleware), - } - } - - sIn := InitializeInput{ - Parameters: in, - } - - res, metadata, err := h.HandleInitialize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *InitializeStep) Get(id string) (InitializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(InitializeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *InitializeStep) Add(m InitializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *InitializeStep) Insert(m InitializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *InitializeStep) Swap(id string, m InitializeMiddleware) (InitializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(InitializeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *InitializeStep) Remove(id string) (InitializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(InitializeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *InitializeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *InitializeStep) Clear() { - s.ids.Clear() -} - -type initializeWrapHandler struct { - Next Handler -} - -var _ InitializeHandler = (*initializeWrapHandler)(nil) - -// HandleInitialize implements InitializeHandler, converts types and delegates to underlying -// generic handler. -func (w initializeWrapHandler) HandleInitialize(ctx context.Context, in InitializeInput) ( - out InitializeOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Parameters) - return InitializeOutput{ - Result: res, - }, metadata, err -} - -type decoratedInitializeHandler struct { - Next InitializeHandler - With InitializeMiddleware -} - -var _ InitializeHandler = (*decoratedInitializeHandler)(nil) - -func (h decoratedInitializeHandler) HandleInitialize(ctx context.Context, in InitializeInput) ( - out InitializeOutput, metadata Metadata, err error, -) { - return h.With.HandleInitialize(ctx, in, h.Next) -} - -// InitializeHandlerFunc provides a wrapper around a function to be used as an initialize middleware handler. -type InitializeHandlerFunc func(context.Context, InitializeInput) (InitializeOutput, Metadata, error) - -// HandleInitialize calls the wrapped function with the provided arguments. -func (i InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) { - return i(ctx, in) -} - -var _ InitializeHandler = InitializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go deleted file mode 100644 index 114bafced..000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go +++ /dev/null @@ -1,219 +0,0 @@ -package middleware - -import "context" - -// SerializeInput provides the input parameters for the SerializeMiddleware to -// consume. SerializeMiddleware may modify the Request value before forwarding -// SerializeInput along to the next SerializeHandler. The Parameters member -// should not be modified by SerializeMiddleware, InitializeMiddleware should -// be responsible for modifying the provided Parameter value. -type SerializeInput struct { - Parameters interface{} - Request interface{} -} - -// SerializeOutput provides the result returned by the next SerializeHandler. -type SerializeOutput struct { - Result interface{} -} - -// SerializeHandler provides the interface for the next handler the -// SerializeMiddleware will call in the middleware chain. -type SerializeHandler interface { - HandleSerialize(ctx context.Context, in SerializeInput) ( - out SerializeOutput, metadata Metadata, err error, - ) -} - -// SerializeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next SerializeHandler for further -// processing. -type SerializeMiddleware interface { - // ID returns a unique ID for the middleware in the SerializeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleSerialize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleSerialize(ctx context.Context, in SerializeInput, next SerializeHandler) ( - out SerializeOutput, metadata Metadata, err error, - ) -} - -// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID -// provided, and the func to be invoked. -func SerializeMiddlewareFunc(id string, fn func(context.Context, SerializeInput, SerializeHandler) (SerializeOutput, Metadata, error)) SerializeMiddleware { - return serializeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type serializeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, SerializeInput, SerializeHandler) ( - SerializeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s serializeMiddlewareFunc) ID() string { return s.id } - -// HandleSerialize invokes the middleware Fn. -func (s serializeMiddlewareFunc) HandleSerialize(ctx context.Context, in SerializeInput, next SerializeHandler) ( - out SerializeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ SerializeMiddleware = (serializeMiddlewareFunc{}) - -// SerializeStep provides the ordered grouping of SerializeMiddleware to be -// invoked on a handler. -type SerializeStep struct { - newRequest func() interface{} - ids *orderedIDs -} - -// NewSerializeStep returns a SerializeStep ready to have middleware for -// initialization added to it. The newRequest func parameter is used to -// initialize the transport specific request for the stack SerializeStep to -// serialize the input parameters into. -func NewSerializeStep(newRequest func() interface{}) *SerializeStep { - return &SerializeStep{ - ids: newOrderedIDs(), - newRequest: newRequest, - } -} - -var _ Middleware = (*SerializeStep)(nil) - -// ID returns the unique ID of the step as a middleware. -func (s *SerializeStep) ID() string { - return "Serialize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *SerializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h SerializeHandler = serializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedSerializeHandler{ - Next: h, - With: order[i].(SerializeMiddleware), - } - } - - sIn := SerializeInput{ - Parameters: in, - Request: s.newRequest(), - } - - res, metadata, err := h.HandleSerialize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *SerializeStep) Get(id string) (SerializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(SerializeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *SerializeStep) Add(m SerializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *SerializeStep) Insert(m SerializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *SerializeStep) Swap(id string, m SerializeMiddleware) (SerializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(SerializeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *SerializeStep) Remove(id string) (SerializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(SerializeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *SerializeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *SerializeStep) Clear() { - s.ids.Clear() -} - -type serializeWrapHandler struct { - Next Handler -} - -var _ SerializeHandler = (*serializeWrapHandler)(nil) - -// Implements SerializeHandler, converts types and delegates to underlying -// generic handler. -func (w serializeWrapHandler) HandleSerialize(ctx context.Context, in SerializeInput) ( - out SerializeOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Request) - return SerializeOutput{ - Result: res, - }, metadata, err -} - -type decoratedSerializeHandler struct { - Next SerializeHandler - With SerializeMiddleware -} - -var _ SerializeHandler = (*decoratedSerializeHandler)(nil) - -func (h decoratedSerializeHandler) HandleSerialize(ctx context.Context, in SerializeInput) ( - out SerializeOutput, metadata Metadata, err error, -) { - return h.With.HandleSerialize(ctx, in, h.Next) -} - -// SerializeHandlerFunc provides a wrapper around a function to be used as a serialize middleware handler. -type SerializeHandlerFunc func(context.Context, SerializeInput) (SerializeOutput, Metadata, error) - -// HandleSerialize calls the wrapped function with the provided arguments. -func (s SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) { - return s(ctx, in) -} - -var _ SerializeHandler = SerializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/modman.toml b/vendor/github.com/aws/smithy-go/modman.toml deleted file mode 100644 index 9d94b7cbd..000000000 --- a/vendor/github.com/aws/smithy-go/modman.toml +++ /dev/null @@ -1,10 +0,0 @@ -[dependencies] - "github.com/jmespath/go-jmespath" = "v0.4.0" - -[modules] - - [modules.codegen] - no_tag = true - - [modules."codegen/smithy-go-codegen/build/test-generated/go/internal/testmodule"] - no_tag = true diff --git a/vendor/github.com/aws/smithy-go/properties.go b/vendor/github.com/aws/smithy-go/properties.go deleted file mode 100644 index c9af66c0e..000000000 --- a/vendor/github.com/aws/smithy-go/properties.go +++ /dev/null @@ -1,62 +0,0 @@ -package smithy - -// PropertiesReader provides an interface for reading metadata from the -// underlying metadata container. -type PropertiesReader interface { - Get(key interface{}) interface{} -} - -// Properties provides storing and reading metadata values. Keys may be any -// comparable value type. Get and Set will panic if a key is not comparable. -// -// The zero value for a Properties instance is ready for reads/writes without -// any additional initialization. -type Properties struct { - values map[interface{}]interface{} -} - -// Get attempts to retrieve the value the key points to. Returns nil if the -// key was not found. -// -// Panics if key type is not comparable. -func (m *Properties) Get(key interface{}) interface{} { - m.lazyInit() - return m.values[key] -} - -// Set stores the value pointed to by the key. If a value already exists at -// that key it will be replaced with the new value. -// -// Panics if the key type is not comparable. -func (m *Properties) Set(key, value interface{}) { - m.lazyInit() - m.values[key] = value -} - -// Has returns whether the key exists in the metadata. -// -// Panics if the key type is not comparable. -func (m *Properties) Has(key interface{}) bool { - m.lazyInit() - _, ok := m.values[key] - return ok -} - -// SetAll accepts all of the given Properties into the receiver, overwriting -// any existing keys in the case of conflicts. -func (m *Properties) SetAll(other *Properties) { - if other.values == nil { - return - } - - m.lazyInit() - for k, v := range other.values { - m.values[k] = v - } -} - -func (m *Properties) lazyInit() { - if m.values == nil { - m.values = map[interface{}]interface{}{} - } -} diff --git a/vendor/github.com/aws/smithy-go/ptr/doc.go b/vendor/github.com/aws/smithy-go/ptr/doc.go deleted file mode 100644 index bc1f69961..000000000 --- a/vendor/github.com/aws/smithy-go/ptr/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// Package ptr provides utilities for converting scalar literal type values to and from pointers inline. -package ptr - -//go:generate go run -tags codegen generate.go -//go:generate gofmt -w -s . diff --git a/vendor/github.com/aws/smithy-go/ptr/from_ptr.go b/vendor/github.com/aws/smithy-go/ptr/from_ptr.go deleted file mode 100644 index a2845bb2c..000000000 --- a/vendor/github.com/aws/smithy-go/ptr/from_ptr.go +++ /dev/null @@ -1,601 +0,0 @@ -// Code generated by smithy-go/ptr/generate.go DO NOT EDIT. -package ptr - -import ( - "time" -) - -// ToBool returns bool value dereferenced if the passed -// in pointer was not nil. Returns a bool zero value if the -// pointer was nil. -func ToBool(p *bool) (v bool) { - if p == nil { - return v - } - - return *p -} - -// ToBoolSlice returns a slice of bool values, that are -// dereferenced if the passed in pointer was not nil. Returns a bool -// zero value if the pointer was nil. -func ToBoolSlice(vs []*bool) []bool { - ps := make([]bool, len(vs)) - for i, v := range vs { - ps[i] = ToBool(v) - } - - return ps -} - -// ToBoolMap returns a map of bool values, that are -// dereferenced if the passed in pointer was not nil. The bool -// zero value is used if the pointer was nil. -func ToBoolMap(vs map[string]*bool) map[string]bool { - ps := make(map[string]bool, len(vs)) - for k, v := range vs { - ps[k] = ToBool(v) - } - - return ps -} - -// ToByte returns byte value dereferenced if the passed -// in pointer was not nil. Returns a byte zero value if the -// pointer was nil. -func ToByte(p *byte) (v byte) { - if p == nil { - return v - } - - return *p -} - -// ToByteSlice returns a slice of byte values, that are -// dereferenced if the passed in pointer was not nil. Returns a byte -// zero value if the pointer was nil. -func ToByteSlice(vs []*byte) []byte { - ps := make([]byte, len(vs)) - for i, v := range vs { - ps[i] = ToByte(v) - } - - return ps -} - -// ToByteMap returns a map of byte values, that are -// dereferenced if the passed in pointer was not nil. The byte -// zero value is used if the pointer was nil. -func ToByteMap(vs map[string]*byte) map[string]byte { - ps := make(map[string]byte, len(vs)) - for k, v := range vs { - ps[k] = ToByte(v) - } - - return ps -} - -// ToString returns string value dereferenced if the passed -// in pointer was not nil. Returns a string zero value if the -// pointer was nil. -func ToString(p *string) (v string) { - if p == nil { - return v - } - - return *p -} - -// ToStringSlice returns a slice of string values, that are -// dereferenced if the passed in pointer was not nil. Returns a string -// zero value if the pointer was nil. -func ToStringSlice(vs []*string) []string { - ps := make([]string, len(vs)) - for i, v := range vs { - ps[i] = ToString(v) - } - - return ps -} - -// ToStringMap returns a map of string values, that are -// dereferenced if the passed in pointer was not nil. The string -// zero value is used if the pointer was nil. -func ToStringMap(vs map[string]*string) map[string]string { - ps := make(map[string]string, len(vs)) - for k, v := range vs { - ps[k] = ToString(v) - } - - return ps -} - -// ToInt returns int value dereferenced if the passed -// in pointer was not nil. Returns a int zero value if the -// pointer was nil. -func ToInt(p *int) (v int) { - if p == nil { - return v - } - - return *p -} - -// ToIntSlice returns a slice of int values, that are -// dereferenced if the passed in pointer was not nil. Returns a int -// zero value if the pointer was nil. -func ToIntSlice(vs []*int) []int { - ps := make([]int, len(vs)) - for i, v := range vs { - ps[i] = ToInt(v) - } - - return ps -} - -// ToIntMap returns a map of int values, that are -// dereferenced if the passed in pointer was not nil. The int -// zero value is used if the pointer was nil. -func ToIntMap(vs map[string]*int) map[string]int { - ps := make(map[string]int, len(vs)) - for k, v := range vs { - ps[k] = ToInt(v) - } - - return ps -} - -// ToInt8 returns int8 value dereferenced if the passed -// in pointer was not nil. Returns a int8 zero value if the -// pointer was nil. -func ToInt8(p *int8) (v int8) { - if p == nil { - return v - } - - return *p -} - -// ToInt8Slice returns a slice of int8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int8 -// zero value if the pointer was nil. -func ToInt8Slice(vs []*int8) []int8 { - ps := make([]int8, len(vs)) - for i, v := range vs { - ps[i] = ToInt8(v) - } - - return ps -} - -// ToInt8Map returns a map of int8 values, that are -// dereferenced if the passed in pointer was not nil. The int8 -// zero value is used if the pointer was nil. -func ToInt8Map(vs map[string]*int8) map[string]int8 { - ps := make(map[string]int8, len(vs)) - for k, v := range vs { - ps[k] = ToInt8(v) - } - - return ps -} - -// ToInt16 returns int16 value dereferenced if the passed -// in pointer was not nil. Returns a int16 zero value if the -// pointer was nil. -func ToInt16(p *int16) (v int16) { - if p == nil { - return v - } - - return *p -} - -// ToInt16Slice returns a slice of int16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int16 -// zero value if the pointer was nil. -func ToInt16Slice(vs []*int16) []int16 { - ps := make([]int16, len(vs)) - for i, v := range vs { - ps[i] = ToInt16(v) - } - - return ps -} - -// ToInt16Map returns a map of int16 values, that are -// dereferenced if the passed in pointer was not nil. The int16 -// zero value is used if the pointer was nil. -func ToInt16Map(vs map[string]*int16) map[string]int16 { - ps := make(map[string]int16, len(vs)) - for k, v := range vs { - ps[k] = ToInt16(v) - } - - return ps -} - -// ToInt32 returns int32 value dereferenced if the passed -// in pointer was not nil. Returns a int32 zero value if the -// pointer was nil. -func ToInt32(p *int32) (v int32) { - if p == nil { - return v - } - - return *p -} - -// ToInt32Slice returns a slice of int32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int32 -// zero value if the pointer was nil. -func ToInt32Slice(vs []*int32) []int32 { - ps := make([]int32, len(vs)) - for i, v := range vs { - ps[i] = ToInt32(v) - } - - return ps -} - -// ToInt32Map returns a map of int32 values, that are -// dereferenced if the passed in pointer was not nil. The int32 -// zero value is used if the pointer was nil. -func ToInt32Map(vs map[string]*int32) map[string]int32 { - ps := make(map[string]int32, len(vs)) - for k, v := range vs { - ps[k] = ToInt32(v) - } - - return ps -} - -// ToInt64 returns int64 value dereferenced if the passed -// in pointer was not nil. Returns a int64 zero value if the -// pointer was nil. -func ToInt64(p *int64) (v int64) { - if p == nil { - return v - } - - return *p -} - -// ToInt64Slice returns a slice of int64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int64 -// zero value if the pointer was nil. -func ToInt64Slice(vs []*int64) []int64 { - ps := make([]int64, len(vs)) - for i, v := range vs { - ps[i] = ToInt64(v) - } - - return ps -} - -// ToInt64Map returns a map of int64 values, that are -// dereferenced if the passed in pointer was not nil. The int64 -// zero value is used if the pointer was nil. -func ToInt64Map(vs map[string]*int64) map[string]int64 { - ps := make(map[string]int64, len(vs)) - for k, v := range vs { - ps[k] = ToInt64(v) - } - - return ps -} - -// ToUint returns uint value dereferenced if the passed -// in pointer was not nil. Returns a uint zero value if the -// pointer was nil. -func ToUint(p *uint) (v uint) { - if p == nil { - return v - } - - return *p -} - -// ToUintSlice returns a slice of uint values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint -// zero value if the pointer was nil. -func ToUintSlice(vs []*uint) []uint { - ps := make([]uint, len(vs)) - for i, v := range vs { - ps[i] = ToUint(v) - } - - return ps -} - -// ToUintMap returns a map of uint values, that are -// dereferenced if the passed in pointer was not nil. The uint -// zero value is used if the pointer was nil. -func ToUintMap(vs map[string]*uint) map[string]uint { - ps := make(map[string]uint, len(vs)) - for k, v := range vs { - ps[k] = ToUint(v) - } - - return ps -} - -// ToUint8 returns uint8 value dereferenced if the passed -// in pointer was not nil. Returns a uint8 zero value if the -// pointer was nil. -func ToUint8(p *uint8) (v uint8) { - if p == nil { - return v - } - - return *p -} - -// ToUint8Slice returns a slice of uint8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint8 -// zero value if the pointer was nil. -func ToUint8Slice(vs []*uint8) []uint8 { - ps := make([]uint8, len(vs)) - for i, v := range vs { - ps[i] = ToUint8(v) - } - - return ps -} - -// ToUint8Map returns a map of uint8 values, that are -// dereferenced if the passed in pointer was not nil. The uint8 -// zero value is used if the pointer was nil. -func ToUint8Map(vs map[string]*uint8) map[string]uint8 { - ps := make(map[string]uint8, len(vs)) - for k, v := range vs { - ps[k] = ToUint8(v) - } - - return ps -} - -// ToUint16 returns uint16 value dereferenced if the passed -// in pointer was not nil. Returns a uint16 zero value if the -// pointer was nil. -func ToUint16(p *uint16) (v uint16) { - if p == nil { - return v - } - - return *p -} - -// ToUint16Slice returns a slice of uint16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint16 -// zero value if the pointer was nil. -func ToUint16Slice(vs []*uint16) []uint16 { - ps := make([]uint16, len(vs)) - for i, v := range vs { - ps[i] = ToUint16(v) - } - - return ps -} - -// ToUint16Map returns a map of uint16 values, that are -// dereferenced if the passed in pointer was not nil. The uint16 -// zero value is used if the pointer was nil. -func ToUint16Map(vs map[string]*uint16) map[string]uint16 { - ps := make(map[string]uint16, len(vs)) - for k, v := range vs { - ps[k] = ToUint16(v) - } - - return ps -} - -// ToUint32 returns uint32 value dereferenced if the passed -// in pointer was not nil. Returns a uint32 zero value if the -// pointer was nil. -func ToUint32(p *uint32) (v uint32) { - if p == nil { - return v - } - - return *p -} - -// ToUint32Slice returns a slice of uint32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint32 -// zero value if the pointer was nil. -func ToUint32Slice(vs []*uint32) []uint32 { - ps := make([]uint32, len(vs)) - for i, v := range vs { - ps[i] = ToUint32(v) - } - - return ps -} - -// ToUint32Map returns a map of uint32 values, that are -// dereferenced if the passed in pointer was not nil. The uint32 -// zero value is used if the pointer was nil. -func ToUint32Map(vs map[string]*uint32) map[string]uint32 { - ps := make(map[string]uint32, len(vs)) - for k, v := range vs { - ps[k] = ToUint32(v) - } - - return ps -} - -// ToUint64 returns uint64 value dereferenced if the passed -// in pointer was not nil. Returns a uint64 zero value if the -// pointer was nil. -func ToUint64(p *uint64) (v uint64) { - if p == nil { - return v - } - - return *p -} - -// ToUint64Slice returns a slice of uint64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint64 -// zero value if the pointer was nil. -func ToUint64Slice(vs []*uint64) []uint64 { - ps := make([]uint64, len(vs)) - for i, v := range vs { - ps[i] = ToUint64(v) - } - - return ps -} - -// ToUint64Map returns a map of uint64 values, that are -// dereferenced if the passed in pointer was not nil. The uint64 -// zero value is used if the pointer was nil. -func ToUint64Map(vs map[string]*uint64) map[string]uint64 { - ps := make(map[string]uint64, len(vs)) - for k, v := range vs { - ps[k] = ToUint64(v) - } - - return ps -} - -// ToFloat32 returns float32 value dereferenced if the passed -// in pointer was not nil. Returns a float32 zero value if the -// pointer was nil. -func ToFloat32(p *float32) (v float32) { - if p == nil { - return v - } - - return *p -} - -// ToFloat32Slice returns a slice of float32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float32 -// zero value if the pointer was nil. -func ToFloat32Slice(vs []*float32) []float32 { - ps := make([]float32, len(vs)) - for i, v := range vs { - ps[i] = ToFloat32(v) - } - - return ps -} - -// ToFloat32Map returns a map of float32 values, that are -// dereferenced if the passed in pointer was not nil. The float32 -// zero value is used if the pointer was nil. -func ToFloat32Map(vs map[string]*float32) map[string]float32 { - ps := make(map[string]float32, len(vs)) - for k, v := range vs { - ps[k] = ToFloat32(v) - } - - return ps -} - -// ToFloat64 returns float64 value dereferenced if the passed -// in pointer was not nil. Returns a float64 zero value if the -// pointer was nil. -func ToFloat64(p *float64) (v float64) { - if p == nil { - return v - } - - return *p -} - -// ToFloat64Slice returns a slice of float64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float64 -// zero value if the pointer was nil. -func ToFloat64Slice(vs []*float64) []float64 { - ps := make([]float64, len(vs)) - for i, v := range vs { - ps[i] = ToFloat64(v) - } - - return ps -} - -// ToFloat64Map returns a map of float64 values, that are -// dereferenced if the passed in pointer was not nil. The float64 -// zero value is used if the pointer was nil. -func ToFloat64Map(vs map[string]*float64) map[string]float64 { - ps := make(map[string]float64, len(vs)) - for k, v := range vs { - ps[k] = ToFloat64(v) - } - - return ps -} - -// ToTime returns time.Time value dereferenced if the passed -// in pointer was not nil. Returns a time.Time zero value if the -// pointer was nil. -func ToTime(p *time.Time) (v time.Time) { - if p == nil { - return v - } - - return *p -} - -// ToTimeSlice returns a slice of time.Time values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Time -// zero value if the pointer was nil. -func ToTimeSlice(vs []*time.Time) []time.Time { - ps := make([]time.Time, len(vs)) - for i, v := range vs { - ps[i] = ToTime(v) - } - - return ps -} - -// ToTimeMap returns a map of time.Time values, that are -// dereferenced if the passed in pointer was not nil. The time.Time -// zero value is used if the pointer was nil. -func ToTimeMap(vs map[string]*time.Time) map[string]time.Time { - ps := make(map[string]time.Time, len(vs)) - for k, v := range vs { - ps[k] = ToTime(v) - } - - return ps -} - -// ToDuration returns time.Duration value dereferenced if the passed -// in pointer was not nil. Returns a time.Duration zero value if the -// pointer was nil. -func ToDuration(p *time.Duration) (v time.Duration) { - if p == nil { - return v - } - - return *p -} - -// ToDurationSlice returns a slice of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Duration -// zero value if the pointer was nil. -func ToDurationSlice(vs []*time.Duration) []time.Duration { - ps := make([]time.Duration, len(vs)) - for i, v := range vs { - ps[i] = ToDuration(v) - } - - return ps -} - -// ToDurationMap returns a map of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. The time.Duration -// zero value is used if the pointer was nil. -func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration { - ps := make(map[string]time.Duration, len(vs)) - for k, v := range vs { - ps[k] = ToDuration(v) - } - - return ps -} diff --git a/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go b/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go deleted file mode 100644 index 97f01011e..000000000 --- a/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go +++ /dev/null @@ -1,83 +0,0 @@ -//go:build codegen -// +build codegen - -package ptr - -import "strings" - -func GetScalars() Scalars { - return Scalars{ - {Type: "bool"}, - {Type: "byte"}, - {Type: "string"}, - {Type: "int"}, - {Type: "int8"}, - {Type: "int16"}, - {Type: "int32"}, - {Type: "int64"}, - {Type: "uint"}, - {Type: "uint8"}, - {Type: "uint16"}, - {Type: "uint32"}, - {Type: "uint64"}, - {Type: "float32"}, - {Type: "float64"}, - {Type: "Time", Import: &Import{Path: "time"}}, - {Type: "Duration", Import: &Import{Path: "time"}}, - } -} - -// Import provides the import path and optional alias -type Import struct { - Path string - Alias string -} - -// Package returns the Go package name for the import. Returns alias if set. -func (i Import) Package() string { - if v := i.Alias; len(v) != 0 { - return v - } - - if v := i.Path; len(v) != 0 { - parts := strings.Split(v, "/") - pkg := parts[len(parts)-1] - return pkg - } - - return "" -} - -// Scalar provides the definition of a type to generate pointer utilities for. -type Scalar struct { - Type string - Import *Import -} - -// Name returns the exported function name for the type. -func (t Scalar) Name() string { - return strings.Title(t.Type) -} - -// Symbol returns the scalar's Go symbol with path if needed. -func (t Scalar) Symbol() string { - if t.Import != nil { - return t.Import.Package() + "." + t.Type - } - return t.Type -} - -// Scalars is a list of scalars. -type Scalars []Scalar - -// Imports returns all imports for the scalars. -func (ts Scalars) Imports() []*Import { - imports := []*Import{} - for _, t := range ts { - if v := t.Import; v != nil { - imports = append(imports, v) - } - } - - return imports -} diff --git a/vendor/github.com/aws/smithy-go/ptr/to_ptr.go b/vendor/github.com/aws/smithy-go/ptr/to_ptr.go deleted file mode 100644 index 0bfbbecbd..000000000 --- a/vendor/github.com/aws/smithy-go/ptr/to_ptr.go +++ /dev/null @@ -1,499 +0,0 @@ -// Code generated by smithy-go/ptr/generate.go DO NOT EDIT. -package ptr - -import ( - "time" -) - -// Bool returns a pointer value for the bool value passed in. -func Bool(v bool) *bool { - return &v -} - -// BoolSlice returns a slice of bool pointers from the values -// passed in. -func BoolSlice(vs []bool) []*bool { - ps := make([]*bool, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// BoolMap returns a map of bool pointers from the values -// passed in. -func BoolMap(vs map[string]bool) map[string]*bool { - ps := make(map[string]*bool, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Byte returns a pointer value for the byte value passed in. -func Byte(v byte) *byte { - return &v -} - -// ByteSlice returns a slice of byte pointers from the values -// passed in. -func ByteSlice(vs []byte) []*byte { - ps := make([]*byte, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// ByteMap returns a map of byte pointers from the values -// passed in. -func ByteMap(vs map[string]byte) map[string]*byte { - ps := make(map[string]*byte, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// String returns a pointer value for the string value passed in. -func String(v string) *string { - return &v -} - -// StringSlice returns a slice of string pointers from the values -// passed in. -func StringSlice(vs []string) []*string { - ps := make([]*string, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// StringMap returns a map of string pointers from the values -// passed in. -func StringMap(vs map[string]string) map[string]*string { - ps := make(map[string]*string, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int returns a pointer value for the int value passed in. -func Int(v int) *int { - return &v -} - -// IntSlice returns a slice of int pointers from the values -// passed in. -func IntSlice(vs []int) []*int { - ps := make([]*int, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// IntMap returns a map of int pointers from the values -// passed in. -func IntMap(vs map[string]int) map[string]*int { - ps := make(map[string]*int, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int8 returns a pointer value for the int8 value passed in. -func Int8(v int8) *int8 { - return &v -} - -// Int8Slice returns a slice of int8 pointers from the values -// passed in. -func Int8Slice(vs []int8) []*int8 { - ps := make([]*int8, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int8Map returns a map of int8 pointers from the values -// passed in. -func Int8Map(vs map[string]int8) map[string]*int8 { - ps := make(map[string]*int8, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int16 returns a pointer value for the int16 value passed in. -func Int16(v int16) *int16 { - return &v -} - -// Int16Slice returns a slice of int16 pointers from the values -// passed in. -func Int16Slice(vs []int16) []*int16 { - ps := make([]*int16, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int16Map returns a map of int16 pointers from the values -// passed in. -func Int16Map(vs map[string]int16) map[string]*int16 { - ps := make(map[string]*int16, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int32 returns a pointer value for the int32 value passed in. -func Int32(v int32) *int32 { - return &v -} - -// Int32Slice returns a slice of int32 pointers from the values -// passed in. -func Int32Slice(vs []int32) []*int32 { - ps := make([]*int32, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int32Map returns a map of int32 pointers from the values -// passed in. -func Int32Map(vs map[string]int32) map[string]*int32 { - ps := make(map[string]*int32, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int64 returns a pointer value for the int64 value passed in. -func Int64(v int64) *int64 { - return &v -} - -// Int64Slice returns a slice of int64 pointers from the values -// passed in. -func Int64Slice(vs []int64) []*int64 { - ps := make([]*int64, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int64Map returns a map of int64 pointers from the values -// passed in. -func Int64Map(vs map[string]int64) map[string]*int64 { - ps := make(map[string]*int64, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint returns a pointer value for the uint value passed in. -func Uint(v uint) *uint { - return &v -} - -// UintSlice returns a slice of uint pointers from the values -// passed in. -func UintSlice(vs []uint) []*uint { - ps := make([]*uint, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// UintMap returns a map of uint pointers from the values -// passed in. -func UintMap(vs map[string]uint) map[string]*uint { - ps := make(map[string]*uint, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint8 returns a pointer value for the uint8 value passed in. -func Uint8(v uint8) *uint8 { - return &v -} - -// Uint8Slice returns a slice of uint8 pointers from the values -// passed in. -func Uint8Slice(vs []uint8) []*uint8 { - ps := make([]*uint8, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint8Map returns a map of uint8 pointers from the values -// passed in. -func Uint8Map(vs map[string]uint8) map[string]*uint8 { - ps := make(map[string]*uint8, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint16 returns a pointer value for the uint16 value passed in. -func Uint16(v uint16) *uint16 { - return &v -} - -// Uint16Slice returns a slice of uint16 pointers from the values -// passed in. -func Uint16Slice(vs []uint16) []*uint16 { - ps := make([]*uint16, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint16Map returns a map of uint16 pointers from the values -// passed in. -func Uint16Map(vs map[string]uint16) map[string]*uint16 { - ps := make(map[string]*uint16, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint32 returns a pointer value for the uint32 value passed in. -func Uint32(v uint32) *uint32 { - return &v -} - -// Uint32Slice returns a slice of uint32 pointers from the values -// passed in. -func Uint32Slice(vs []uint32) []*uint32 { - ps := make([]*uint32, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint32Map returns a map of uint32 pointers from the values -// passed in. -func Uint32Map(vs map[string]uint32) map[string]*uint32 { - ps := make(map[string]*uint32, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint64 returns a pointer value for the uint64 value passed in. -func Uint64(v uint64) *uint64 { - return &v -} - -// Uint64Slice returns a slice of uint64 pointers from the values -// passed in. -func Uint64Slice(vs []uint64) []*uint64 { - ps := make([]*uint64, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint64Map returns a map of uint64 pointers from the values -// passed in. -func Uint64Map(vs map[string]uint64) map[string]*uint64 { - ps := make(map[string]*uint64, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Float32 returns a pointer value for the float32 value passed in. -func Float32(v float32) *float32 { - return &v -} - -// Float32Slice returns a slice of float32 pointers from the values -// passed in. -func Float32Slice(vs []float32) []*float32 { - ps := make([]*float32, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Float32Map returns a map of float32 pointers from the values -// passed in. -func Float32Map(vs map[string]float32) map[string]*float32 { - ps := make(map[string]*float32, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Float64 returns a pointer value for the float64 value passed in. -func Float64(v float64) *float64 { - return &v -} - -// Float64Slice returns a slice of float64 pointers from the values -// passed in. -func Float64Slice(vs []float64) []*float64 { - ps := make([]*float64, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Float64Map returns a map of float64 pointers from the values -// passed in. -func Float64Map(vs map[string]float64) map[string]*float64 { - ps := make(map[string]*float64, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Time returns a pointer value for the time.Time value passed in. -func Time(v time.Time) *time.Time { - return &v -} - -// TimeSlice returns a slice of time.Time pointers from the values -// passed in. -func TimeSlice(vs []time.Time) []*time.Time { - ps := make([]*time.Time, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// TimeMap returns a map of time.Time pointers from the values -// passed in. -func TimeMap(vs map[string]time.Time) map[string]*time.Time { - ps := make(map[string]*time.Time, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Duration returns a pointer value for the time.Duration value passed in. -func Duration(v time.Duration) *time.Duration { - return &v -} - -// DurationSlice returns a slice of time.Duration pointers from the values -// passed in. -func DurationSlice(vs []time.Duration) []*time.Duration { - ps := make([]*time.Duration, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// DurationMap returns a map of time.Duration pointers from the values -// passed in. -func DurationMap(vs map[string]time.Duration) map[string]*time.Duration { - ps := make(map[string]*time.Duration, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} diff --git a/vendor/github.com/aws/smithy-go/rand/doc.go b/vendor/github.com/aws/smithy-go/rand/doc.go deleted file mode 100644 index f8b25d562..000000000 --- a/vendor/github.com/aws/smithy-go/rand/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package rand provides utilities for creating and working with random value -// generators. -package rand diff --git a/vendor/github.com/aws/smithy-go/rand/rand.go b/vendor/github.com/aws/smithy-go/rand/rand.go deleted file mode 100644 index 9c479f62b..000000000 --- a/vendor/github.com/aws/smithy-go/rand/rand.go +++ /dev/null @@ -1,31 +0,0 @@ -package rand - -import ( - "crypto/rand" - "fmt" - "io" - "math/big" -) - -func init() { - Reader = rand.Reader -} - -// Reader provides a random reader that can reset during testing. -var Reader io.Reader - -// Int63n returns a int64 between zero and value of max, read from an io.Reader source. -func Int63n(reader io.Reader, max int64) (int64, error) { - bi, err := rand.Int(reader, big.NewInt(max)) - if err != nil { - return 0, fmt.Errorf("failed to read random value, %w", err) - } - - return bi.Int64(), nil -} - -// CryptoRandInt63n returns a random int64 between zero and value of max -// obtained from the crypto rand source. -func CryptoRandInt63n(max int64) (int64, error) { - return Int63n(Reader, max) -} diff --git a/vendor/github.com/aws/smithy-go/rand/uuid.go b/vendor/github.com/aws/smithy-go/rand/uuid.go deleted file mode 100644 index dc81cbc68..000000000 --- a/vendor/github.com/aws/smithy-go/rand/uuid.go +++ /dev/null @@ -1,87 +0,0 @@ -package rand - -import ( - "encoding/hex" - "io" -) - -const dash byte = '-' - -// UUIDIdempotencyToken provides a utility to get idempotency tokens in the -// UUID format. -type UUIDIdempotencyToken struct { - uuid *UUID -} - -// NewUUIDIdempotencyToken returns a idempotency token provider returning -// tokens in the UUID random format using the reader provided. -func NewUUIDIdempotencyToken(r io.Reader) *UUIDIdempotencyToken { - return &UUIDIdempotencyToken{uuid: NewUUID(r)} -} - -// GetIdempotencyToken returns a random UUID value for Idempotency token. -func (u UUIDIdempotencyToken) GetIdempotencyToken() (string, error) { - return u.uuid.GetUUID() -} - -// UUID provides computing random UUID version 4 values from a random source -// reader. -type UUID struct { - randSrc io.Reader -} - -// NewUUID returns an initialized UUID value that can be used to retrieve -// random UUID version 4 values. -func NewUUID(r io.Reader) *UUID { - return &UUID{randSrc: r} -} - -// GetUUID returns a random UUID version 4 string representation sourced from the random reader the -// UUID was created with. Returns an error if unable to compute the UUID. -func (r *UUID) GetUUID() (string, error) { - var b [16]byte - if _, err := io.ReadFull(r.randSrc, b[:]); err != nil { - return "", err - } - r.makeUUIDv4(b[:]) - return format(b), nil -} - -// GetBytes returns a byte slice containing a random UUID version 4 sourced from the random reader the -// UUID was created with. Returns an error if unable to compute the UUID. -func (r *UUID) GetBytes() (u []byte, err error) { - u = make([]byte, 16) - if _, err = io.ReadFull(r.randSrc, u); err != nil { - return u, err - } - r.makeUUIDv4(u) - return u, nil -} - -func (r *UUID) makeUUIDv4(u []byte) { - // 13th character is "4" - u[6] = (u[6] & 0x0f) | 0x40 // Version 4 - // 17th character is "8", "9", "a", or "b" - u[8] = (u[8] & 0x3f) | 0x80 // Variant most significant bits are 10x where x can be either 1 or 0 -} - -// Format returns the canonical text representation of a UUID. -// This implementation is optimized to not use fmt. -// Example: 82e42f16-b6cc-4d5b-95f5-d403c4befd3d -func format(u [16]byte) string { - // https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29 - - var scratch [36]byte - - hex.Encode(scratch[:8], u[0:4]) - scratch[8] = dash - hex.Encode(scratch[9:13], u[4:6]) - scratch[13] = dash - hex.Encode(scratch[14:18], u[6:8]) - scratch[18] = dash - hex.Encode(scratch[19:23], u[8:10]) - scratch[23] = dash - hex.Encode(scratch[24:], u[10:]) - - return string(scratch[:]) -} diff --git a/vendor/github.com/aws/smithy-go/time/time.go b/vendor/github.com/aws/smithy-go/time/time.go deleted file mode 100644 index b552a09f8..000000000 --- a/vendor/github.com/aws/smithy-go/time/time.go +++ /dev/null @@ -1,134 +0,0 @@ -package time - -import ( - "context" - "fmt" - "math/big" - "strings" - "time" -) - -const ( - // dateTimeFormat is a IMF-fixdate formatted RFC3339 section 5.6 - dateTimeFormatInput = "2006-01-02T15:04:05.999999999Z" - dateTimeFormatInputNoZ = "2006-01-02T15:04:05.999999999" - dateTimeFormatOutput = "2006-01-02T15:04:05.999Z" - - // httpDateFormat is a date time defined by RFC 7231#section-7.1.1.1 - // IMF-fixdate with no UTC offset. - httpDateFormat = "Mon, 02 Jan 2006 15:04:05 GMT" - // Additional formats needed for compatibility. - httpDateFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT" - httpDateFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT" -) - -var millisecondFloat = big.NewFloat(1e3) - -// FormatDateTime formats value as a date-time, (RFC3339 section 5.6) -// -// Example: 1985-04-12T23:20:50.52Z -func FormatDateTime(value time.Time) string { - return value.UTC().Format(dateTimeFormatOutput) -} - -// ParseDateTime parses a string as a date-time, (RFC3339 section 5.6) -// -// Example: 1985-04-12T23:20:50.52Z -func ParseDateTime(value string) (time.Time, error) { - return tryParse(value, - dateTimeFormatInput, - dateTimeFormatInputNoZ, - time.RFC3339Nano, - time.RFC3339, - ) -} - -// FormatHTTPDate formats value as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate) -// -// Example: Tue, 29 Apr 2014 18:30:38 GMT -func FormatHTTPDate(value time.Time) string { - return value.UTC().Format(httpDateFormat) -} - -// ParseHTTPDate parses a string as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate) -// -// Example: Tue, 29 Apr 2014 18:30:38 GMT -func ParseHTTPDate(value string) (time.Time, error) { - return tryParse(value, - httpDateFormat, - httpDateFormatSingleDigitDay, - httpDateFormatSingleDigitDayTwoDigitYear, - time.RFC850, - time.ANSIC, - ) -} - -// FormatEpochSeconds returns value as a Unix time in seconds with with decimal precision -// -// Example: 1515531081.123 -func FormatEpochSeconds(value time.Time) float64 { - ms := value.UnixNano() / int64(time.Millisecond) - return float64(ms) / 1e3 -} - -// ParseEpochSeconds returns value as a Unix time in seconds with with decimal precision -// -// Example: 1515531081.123 -func ParseEpochSeconds(value float64) time.Time { - f := big.NewFloat(value) - f = f.Mul(f, millisecondFloat) - i, _ := f.Int64() - // Offset to `UTC` because time.Unix returns the time value based on system - // local setting. - return time.Unix(0, i*1e6).UTC() -} - -func tryParse(v string, formats ...string) (time.Time, error) { - var errs parseErrors - for _, f := range formats { - t, err := time.Parse(f, v) - if err != nil { - errs = append(errs, parseError{ - Format: f, - Err: err, - }) - continue - } - return t, nil - } - - return time.Time{}, fmt.Errorf("unable to parse time string, %w", errs) -} - -type parseErrors []parseError - -func (es parseErrors) Error() string { - var s strings.Builder - for _, e := range es { - fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err) - } - - return "parse errors:" + s.String() -} - -type parseError struct { - Format string - Err error -} - -// SleepWithContext will wait for the timer duration to expire, or until the context -// is canceled. Whichever happens first. If the context is canceled the -// Context's error will be returned. -func SleepWithContext(ctx context.Context, dur time.Duration) error { - t := time.NewTimer(dur) - defer t.Stop() - - select { - case <-t.C: - break - case <-ctx.Done(): - return ctx.Err() - } - - return nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/auth.go b/vendor/github.com/aws/smithy-go/transport/http/auth.go deleted file mode 100644 index 58e1ab5ef..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/auth.go +++ /dev/null @@ -1,21 +0,0 @@ -package http - -import ( - "context" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" -) - -// AuthScheme defines an HTTP authentication scheme. -type AuthScheme interface { - SchemeID() string - IdentityResolver(auth.IdentityResolverOptions) auth.IdentityResolver - Signer() Signer -} - -// Signer defines the interface through which HTTP requests are supplemented -// with an Identity. -type Signer interface { - SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go b/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go deleted file mode 100644 index d60cf2a60..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go +++ /dev/null @@ -1,45 +0,0 @@ -package http - -import ( - "context" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" -) - -// NewAnonymousScheme returns the anonymous HTTP auth scheme. -func NewAnonymousScheme() AuthScheme { - return &authScheme{ - schemeID: auth.SchemeIDAnonymous, - signer: &nopSigner{}, - } -} - -// authScheme is parameterized to generically implement the exported AuthScheme -// interface -type authScheme struct { - schemeID string - signer Signer -} - -var _ AuthScheme = (*authScheme)(nil) - -func (s *authScheme) SchemeID() string { - return s.schemeID -} - -func (s *authScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver { - return o.GetIdentityResolver(s.schemeID) -} - -func (s *authScheme) Signer() Signer { - return s.signer -} - -type nopSigner struct{} - -var _ Signer = (*nopSigner)(nil) - -func (*nopSigner) SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error { - return nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go b/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go deleted file mode 100644 index bc4ad6e79..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go +++ /dev/null @@ -1,70 +0,0 @@ -package http - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" -) - -const contentMD5Header = "Content-Md5" - -// contentMD5Checksum provides a middleware to compute and set -// content-md5 checksum for a http request -type contentMD5Checksum struct { -} - -// AddContentChecksumMiddleware adds checksum middleware to middleware's -// build step. -func AddContentChecksumMiddleware(stack *middleware.Stack) error { - // This middleware must be executed before request body is set. - return stack.Build.Add(&contentMD5Checksum{}, middleware.Before) -} - -// ID returns the identifier for the checksum middleware -func (m *contentMD5Checksum) ID() string { return "ContentChecksum" } - -// HandleBuild adds behavior to compute md5 checksum and add content-md5 header -// on http request -func (m *contentMD5Checksum) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - // if Content-MD5 header is already present, return - if v := req.Header.Get(contentMD5Header); len(v) != 0 { - return next.HandleBuild(ctx, in) - } - - // fetch the request stream. - stream := req.GetStream() - // compute checksum if payload is explicit - if stream != nil { - if !req.IsStreamSeekable() { - return out, metadata, fmt.Errorf( - "unseekable stream is not supported for computing md5 checksum") - } - - v, err := computeMD5Checksum(stream) - if err != nil { - return out, metadata, fmt.Errorf("error computing md5 checksum, %w", err) - } - - // reset the request stream - if err := req.RewindStream(); err != nil { - return out, metadata, fmt.Errorf( - "error rewinding request stream after computing md5 checksum, %w", err) - } - - // set the 'Content-MD5' header - req.Header.Set(contentMD5Header, string(v)) - } - - // set md5 header value - return next.HandleBuild(ctx, in) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/client.go b/vendor/github.com/aws/smithy-go/transport/http/client.go deleted file mode 100644 index e691c69bf..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/client.go +++ /dev/null @@ -1,120 +0,0 @@ -package http - -import ( - "context" - "fmt" - "net/http" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -// ClientDo provides the interface for custom HTTP client implementations. -type ClientDo interface { - Do(*http.Request) (*http.Response, error) -} - -// ClientDoFunc provides a helper to wrap a function as an HTTP client for -// round tripping requests. -type ClientDoFunc func(*http.Request) (*http.Response, error) - -// Do will invoke the underlying func, returning the result. -func (fn ClientDoFunc) Do(r *http.Request) (*http.Response, error) { - return fn(r) -} - -// ClientHandler wraps a client that implements the HTTP Do method. Standard -// implementation is http.Client. -type ClientHandler struct { - client ClientDo -} - -// NewClientHandler returns an initialized middleware handler for the client. -func NewClientHandler(client ClientDo) ClientHandler { - return ClientHandler{ - client: client, - } -} - -// Handle implements the middleware Handler interface, that will invoke the -// underlying HTTP client. Requires the input to be a Smithy *Request. Returns -// a smithy *Response, or error if the request failed. -func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( - out interface{}, metadata middleware.Metadata, err error, -) { - req, ok := input.(*Request) - if !ok { - return nil, metadata, fmt.Errorf("expect Smithy http.Request value as input, got unsupported type %T", input) - } - - builtRequest := req.Build(ctx) - if err := ValidateEndpointHost(builtRequest.Host); err != nil { - return nil, metadata, err - } - - resp, err := c.client.Do(builtRequest) - if resp == nil { - // Ensure a http response value is always present to prevent unexpected - // panics. - resp = &http.Response{ - Header: http.Header{}, - Body: http.NoBody, - } - } - if err != nil { - err = &RequestSendError{Err: err} - - // Override the error with a context canceled error, if that was canceled. - select { - case <-ctx.Done(): - err = &smithy.CanceledError{Err: ctx.Err()} - default: - } - } - - // HTTP RoundTripper *should* close the request body. But this may not happen in a timely manner. - // So instead Smithy *Request Build wraps the body to be sent in a safe closer that will clear the - // stream reference so that it can be safely reused. - if builtRequest.Body != nil { - _ = builtRequest.Body.Close() - } - - return &Response{Response: resp}, metadata, err -} - -// RequestSendError provides a generic request transport error. This error -// should wrap errors making HTTP client requests. -// -// The ClientHandler will wrap the HTTP client's error if the client request -// fails, and did not fail because of context canceled. -type RequestSendError struct { - Err error -} - -// ConnectionError returns that the error is related to not being able to send -// the request, or receive a response from the service. -func (e *RequestSendError) ConnectionError() bool { - return true -} - -// Unwrap returns the underlying error, if there was one. -func (e *RequestSendError) Unwrap() error { - return e.Err -} - -func (e *RequestSendError) Error() string { - return fmt.Sprintf("request send failed, %v", e.Err) -} - -// NopClient provides a client that ignores the request, and returns an empty -// successful HTTP response value. -type NopClient struct{} - -// Do ignores the request and returns a 200 status empty response. -func (NopClient) Do(r *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: 200, - Header: http.Header{}, - Body: http.NoBody, - }, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/doc.go b/vendor/github.com/aws/smithy-go/transport/http/doc.go deleted file mode 100644 index 07366ac85..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -/* -Package http provides the HTTP transport client and request/response types -needed to round trip API operation calls with an service. -*/ -package http diff --git a/vendor/github.com/aws/smithy-go/transport/http/headerlist.go b/vendor/github.com/aws/smithy-go/transport/http/headerlist.go deleted file mode 100644 index cbc9deb4d..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/headerlist.go +++ /dev/null @@ -1,163 +0,0 @@ -package http - -import ( - "fmt" - "strconv" - "strings" - "unicode" -) - -func splitHeaderListValues(vs []string, splitFn func(string) ([]string, error)) ([]string, error) { - values := make([]string, 0, len(vs)) - - for i := 0; i < len(vs); i++ { - parts, err := splitFn(vs[i]) - if err != nil { - return nil, err - } - values = append(values, parts...) - } - - return values, nil -} - -// SplitHeaderListValues attempts to split the elements of the slice by commas, -// and return a list of all values separated. Returns error if unable to -// separate the values. -func SplitHeaderListValues(vs []string) ([]string, error) { - return splitHeaderListValues(vs, quotedCommaSplit) -} - -func quotedCommaSplit(v string) (parts []string, err error) { - v = strings.TrimSpace(v) - - expectMore := true - for i := 0; i < len(v); i++ { - if unicode.IsSpace(rune(v[i])) { - continue - } - expectMore = false - - // leading space in part is ignored. - // Start of value must be non-space, or quote. - // - // - If quote, enter quoted mode, find next non-escaped quote to - // terminate the value. - // - Otherwise, find next comma to terminate value. - - remaining := v[i:] - - var value string - var valueLen int - if remaining[0] == '"' { - //------------------------------ - // Quoted value - //------------------------------ - var j int - var skipQuote bool - for j += 1; j < len(remaining); j++ { - if remaining[j] == '\\' || (remaining[j] != '\\' && skipQuote) { - skipQuote = !skipQuote - continue - } - if remaining[j] == '"' { - break - } - } - if j == len(remaining) || j == 1 { - return nil, fmt.Errorf("value %v missing closing double quote", - remaining) - } - valueLen = j + 1 - - tail := remaining[valueLen:] - var k int - for ; k < len(tail); k++ { - if !unicode.IsSpace(rune(tail[k])) && tail[k] != ',' { - return nil, fmt.Errorf("value %v has non-space trailing characters", - remaining) - } - if tail[k] == ',' { - expectMore = true - break - } - } - value = remaining[:valueLen] - value, err = strconv.Unquote(value) - if err != nil { - return nil, fmt.Errorf("failed to unquote value %v, %w", value, err) - } - - // Pad valueLen to include trailing space(s) so `i` is updated correctly. - valueLen += k - - } else { - //------------------------------ - // Unquoted value - //------------------------------ - - // Index of the next comma is the length of the value, or end of string. - valueLen = strings.Index(remaining, ",") - if valueLen != -1 { - expectMore = true - } else { - valueLen = len(remaining) - } - value = strings.TrimSpace(remaining[:valueLen]) - } - - i += valueLen - parts = append(parts, value) - - } - - if expectMore { - parts = append(parts, "") - } - - return parts, nil -} - -// SplitHTTPDateTimestampHeaderListValues attempts to split the HTTP-Date -// timestamp values in the slice by commas, and return a list of all values -// separated. The split is aware of the HTTP-Date timestamp format, and will skip -// comma within the timestamp value. Returns an error if unable to split the -// timestamp values. -func SplitHTTPDateTimestampHeaderListValues(vs []string) ([]string, error) { - return splitHeaderListValues(vs, splitHTTPDateHeaderValue) -} - -func splitHTTPDateHeaderValue(v string) ([]string, error) { - if n := strings.Count(v, ","); n <= 1 { - // Nothing to do if only contains a no, or single HTTPDate value - return []string{v}, nil - } else if n%2 == 0 { - return nil, fmt.Errorf("invalid timestamp HTTPDate header comma separations, %q", v) - } - - var parts []string - var i, j int - - var doSplit bool - for ; i < len(v); i++ { - if v[i] == ',' { - if doSplit { - doSplit = false - parts = append(parts, strings.TrimSpace(v[j:i])) - j = i + 1 - } else { - // Skip the first comma in the timestamp value since that - // separates the day from the rest of the timestamp. - // - // Tue, 17 Dec 2019 23:48:18 GMT - doSplit = true - } - } - } - // Add final part - if j < len(v) { - parts = append(parts, strings.TrimSpace(v[j:])) - } - - return parts, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/host.go b/vendor/github.com/aws/smithy-go/transport/http/host.go deleted file mode 100644 index 6b290fec0..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/host.go +++ /dev/null @@ -1,89 +0,0 @@ -package http - -import ( - "fmt" - "net" - "strconv" - "strings" -) - -// ValidateEndpointHost validates that the host string passed in is a valid RFC -// 3986 host. Returns error if the host is not valid. -func ValidateEndpointHost(host string) error { - var errors strings.Builder - var hostname string - var port string - var err error - - if strings.Contains(host, ":") { - hostname, port, err = net.SplitHostPort(host) - if err != nil { - errors.WriteString(fmt.Sprintf("\n endpoint %v, failed to parse, got ", host)) - errors.WriteString(err.Error()) - } - - if !ValidPortNumber(port) { - errors.WriteString(fmt.Sprintf("port number should be in range [0-65535], got %v", port)) - } - } else { - hostname = host - } - - labels := strings.Split(hostname, ".") - for i, label := range labels { - if i == len(labels)-1 && len(label) == 0 { - // Allow trailing dot for FQDN hosts. - continue - } - - if !ValidHostLabel(label) { - errors.WriteString("\nendpoint host domain labels must match \"[a-zA-Z0-9-]{1,63}\", but found: ") - errors.WriteString(label) - } - } - - if len(hostname) == 0 && len(port) != 0 { - errors.WriteString("\nendpoint host with port must not be empty") - } - - if len(hostname) > 255 { - errors.WriteString(fmt.Sprintf("\nendpoint host must be less than 255 characters, but was %d", len(hostname))) - } - - if len(errors.String()) > 0 { - return fmt.Errorf("invalid endpoint host%s", errors.String()) - } - return nil -} - -// ValidPortNumber returns whether the port is valid RFC 3986 port. -func ValidPortNumber(port string) bool { - i, err := strconv.Atoi(port) - if err != nil { - return false - } - - if i < 0 || i > 65535 { - return false - } - return true -} - -// ValidHostLabel returns whether the label is a valid RFC 3986 host abel. -func ValidHostLabel(label string) bool { - if l := len(label); l == 0 || l > 63 { - return false - } - for _, r := range label { - switch { - case r >= '0' && r <= '9': - case r >= 'A' && r <= 'Z': - case r >= 'a' && r <= 'z': - case r == '-': - default: - return false - } - } - - return true -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go b/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go deleted file mode 100644 index 941a8d6b5..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go +++ /dev/null @@ -1,75 +0,0 @@ -package io - -import ( - "io" - "sync" -) - -// NewSafeReadCloser returns a new safeReadCloser that wraps readCloser. -func NewSafeReadCloser(readCloser io.ReadCloser) io.ReadCloser { - sr := &safeReadCloser{ - readCloser: readCloser, - } - - if _, ok := readCloser.(io.WriterTo); ok { - return &safeWriteToReadCloser{safeReadCloser: sr} - } - - return sr -} - -// safeWriteToReadCloser wraps a safeReadCloser but exposes a WriteTo interface implementation. This will panic -// if the underlying io.ReadClose does not support WriteTo. Use NewSafeReadCloser to ensure the proper handling of this -// type. -type safeWriteToReadCloser struct { - *safeReadCloser -} - -// WriteTo implements the io.WriteTo interface. -func (r *safeWriteToReadCloser) WriteTo(w io.Writer) (int64, error) { - r.safeReadCloser.mtx.Lock() - defer r.safeReadCloser.mtx.Unlock() - - if r.safeReadCloser.closed { - return 0, io.EOF - } - - return r.safeReadCloser.readCloser.(io.WriterTo).WriteTo(w) -} - -// safeReadCloser wraps a io.ReadCloser and presents an io.ReadCloser interface. When Close is called on safeReadCloser -// the underlying Close method will be executed, and then the reference to the reader will be dropped. This type -// is meant to be used with the net/http library which will retain a reference to the request body for the lifetime -// of a goroutine connection. Wrapping in this manner will ensure that no data race conditions are falsely reported. -// This type is thread-safe. -type safeReadCloser struct { - readCloser io.ReadCloser - closed bool - mtx sync.Mutex -} - -// Read reads up to len(p) bytes into p from the underlying read. If the reader is closed io.EOF will be returned. -func (r *safeReadCloser) Read(p []byte) (n int, err error) { - r.mtx.Lock() - defer r.mtx.Unlock() - if r.closed { - return 0, io.EOF - } - - return r.readCloser.Read(p) -} - -// Close calls the underlying io.ReadCloser's Close method, removes the reference to the reader, and returns any error -// reported from Close. Subsequent calls to Close will always return a nil error. -func (r *safeReadCloser) Close() error { - r.mtx.Lock() - defer r.mtx.Unlock() - if r.closed { - return nil - } - - r.closed = true - rc := r.readCloser - r.readCloser = nil - return rc.Close() -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go b/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go deleted file mode 100644 index 5d6a4b23a..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go +++ /dev/null @@ -1,25 +0,0 @@ -package http - -import ( - "crypto/md5" - "encoding/base64" - "fmt" - "io" -) - -// computeMD5Checksum computes base64 md5 checksum of an io.Reader's contents. -// Returns the byte slice of md5 checksum and an error. -func computeMD5Checksum(r io.Reader) ([]byte, error) { - h := md5.New() - // copy errors may be assumed to be from the body. - _, err := io.Copy(h, r) - if err != nil { - return nil, fmt.Errorf("failed to read body: %w", err) - } - - // encode the md5 checksum in base64. - sum := h.Sum(nil) - sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum))) - base64.StdEncoding.Encode(sum64, sum) - return sum64, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go deleted file mode 100644 index 1d3b218a1..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go +++ /dev/null @@ -1,79 +0,0 @@ -package http - -import ( - "context" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - "io" - "io/ioutil" -) - -// AddErrorCloseResponseBodyMiddleware adds the middleware to automatically -// close the response body of an operation request if the request response -// failed. -func AddErrorCloseResponseBodyMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&errorCloseResponseBodyMiddleware{}, "OperationDeserializer", middleware.Before) -} - -type errorCloseResponseBodyMiddleware struct{} - -func (*errorCloseResponseBodyMiddleware) ID() string { - return "ErrorCloseResponseBody" -} - -func (m *errorCloseResponseBodyMiddleware) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - output middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err := next.HandleDeserialize(ctx, input) - if err != nil { - if resp, ok := out.RawResponse.(*Response); ok && resp != nil && resp.Body != nil { - // Consume the full body to prevent TCP connection resets on some platforms - _, _ = io.Copy(ioutil.Discard, resp.Body) - // Do not validate that the response closes successfully. - resp.Body.Close() - } - } - - return out, metadata, err -} - -// AddCloseResponseBodyMiddleware adds the middleware to automatically close -// the response body of an operation request, after the response had been -// deserialized. -func AddCloseResponseBodyMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&closeResponseBody{}, "OperationDeserializer", middleware.Before) -} - -type closeResponseBody struct{} - -func (*closeResponseBody) ID() string { - return "CloseResponseBody" -} - -func (m *closeResponseBody) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - output middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err := next.HandleDeserialize(ctx, input) - if err != nil { - return out, metadata, err - } - - if resp, ok := out.RawResponse.(*Response); ok { - // Consume the full body to prevent TCP connection resets on some platforms - _, copyErr := io.Copy(ioutil.Discard, resp.Body) - if copyErr != nil { - middleware.GetLogger(ctx).Logf(logging.Warn, "failed to discard remaining HTTP response body, this may affect connection reuse") - } - - closeErr := resp.Body.Close() - if closeErr != nil { - middleware.GetLogger(ctx).Logf(logging.Warn, "failed to close HTTP response body, this may affect connection reuse") - } - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go deleted file mode 100644 index 9969389bb..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go +++ /dev/null @@ -1,84 +0,0 @@ -package http - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" -) - -// ComputeContentLength provides a middleware to set the content-length -// header for the length of a serialize request body. -type ComputeContentLength struct { -} - -// AddComputeContentLengthMiddleware adds ComputeContentLength to the middleware -// stack's Build step. -func AddComputeContentLengthMiddleware(stack *middleware.Stack) error { - return stack.Build.Add(&ComputeContentLength{}, middleware.After) -} - -// ID returns the identifier for the ComputeContentLength. -func (m *ComputeContentLength) ID() string { return "ComputeContentLength" } - -// HandleBuild adds the length of the serialized request to the HTTP header -// if the length can be determined. -func (m *ComputeContentLength) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - // do nothing if request content-length was set to 0 or above. - if req.ContentLength >= 0 { - return next.HandleBuild(ctx, in) - } - - // attempt to compute stream length - if n, ok, err := req.StreamLength(); err != nil { - return out, metadata, fmt.Errorf( - "failed getting length of request stream, %w", err) - } else if ok { - req.ContentLength = n - } - - return next.HandleBuild(ctx, in) -} - -// validateContentLength provides a middleware to validate the content-length -// is valid (greater than zero), for the serialized request payload. -type validateContentLength struct{} - -// ValidateContentLengthHeader adds middleware that validates request content-length -// is set to value greater than zero. -func ValidateContentLengthHeader(stack *middleware.Stack) error { - return stack.Build.Add(&validateContentLength{}, middleware.After) -} - -// ID returns the identifier for the ComputeContentLength. -func (m *validateContentLength) ID() string { return "ValidateContentLength" } - -// HandleBuild adds the length of the serialized request to the HTTP header -// if the length can be determined. -func (m *validateContentLength) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - // if request content-length was set to less than 0, return an error - if req.ContentLength < 0 { - return out, metadata, fmt.Errorf( - "content length for payload is required and must be at least 0") - } - - return next.HandleBuild(ctx, in) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go deleted file mode 100644 index 855c22720..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go +++ /dev/null @@ -1,81 +0,0 @@ -package http - -import ( - "context" - "fmt" - "net/http" - - "github.com/aws/smithy-go/middleware" -) - -// WithHeaderComment instruments a middleware stack to append an HTTP field -// comment to the given header as specified in RFC 9110 -// (https://www.rfc-editor.org/rfc/rfc9110#name-comments). -// -// The header is case-insensitive. If the provided header exists when the -// middleware runs, the content will be inserted as-is enclosed in parentheses. -// -// Note that per the HTTP specification, comments are only allowed in fields -// containing "comment" as part of their field value definition, but this API -// will NOT verify whether the provided header is one of them. -// -// WithHeaderComment MAY be applied more than once to a middleware stack and/or -// more than once per header. -func WithHeaderComment(header, content string) func(*middleware.Stack) error { - return func(s *middleware.Stack) error { - m, err := getOrAddHeaderComment(s) - if err != nil { - return fmt.Errorf("get or add header comment: %v", err) - } - - m.values.Add(header, content) - return nil - } -} - -type headerCommentMiddleware struct { - values http.Header // hijack case-insensitive access APIs -} - -func (*headerCommentMiddleware) ID() string { - return "headerComment" -} - -func (m *headerCommentMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - r, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - for h, contents := range m.values { - for _, c := range contents { - if existing := r.Header.Get(h); existing != "" { - r.Header.Set(h, fmt.Sprintf("%s (%s)", existing, c)) - } - } - } - - return next.HandleBuild(ctx, in) -} - -func getOrAddHeaderComment(s *middleware.Stack) (*headerCommentMiddleware, error) { - id := (*headerCommentMiddleware)(nil).ID() - m, ok := s.Build.Get(id) - if !ok { - m := &headerCommentMiddleware{values: http.Header{}} - if err := s.Build.Add(m, middleware.After); err != nil { - return nil, fmt.Errorf("add build: %v", err) - } - - return m, nil - } - - hc, ok := m.(*headerCommentMiddleware) - if !ok { - return nil, fmt.Errorf("existing middleware w/ id %s is not *headerCommentMiddleware", id) - } - - return hc, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go deleted file mode 100644 index eac32b4ba..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go +++ /dev/null @@ -1,167 +0,0 @@ -package http - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" -) - -type isContentTypeAutoSet struct{} - -// SetIsContentTypeDefaultValue returns a Context specifying if the request's -// content-type header was set to a default value. -func SetIsContentTypeDefaultValue(ctx context.Context, isDefault bool) context.Context { - return context.WithValue(ctx, isContentTypeAutoSet{}, isDefault) -} - -// GetIsContentTypeDefaultValue returns if the content-type HTTP header on the -// request is a default value that was auto assigned by an operation -// serializer. Allows middleware post serialization to know if the content-type -// was auto set to a default value or not. -// -// Also returns false if the Context value was never updated to include if -// content-type was set to a default value. -func GetIsContentTypeDefaultValue(ctx context.Context) bool { - v, _ := ctx.Value(isContentTypeAutoSet{}).(bool) - return v -} - -// AddNoPayloadDefaultContentTypeRemover Adds the DefaultContentTypeRemover -// middleware to the stack after the operation serializer. This middleware will -// remove the content-type header from the request if it was set as a default -// value, and no request payload is present. -// -// Returns error if unable to add the middleware. -func AddNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) { - err = stack.Serialize.Insert(removeDefaultContentType{}, - "OperationSerializer", middleware.After) - if err != nil { - return fmt.Errorf("failed to add %s serialize middleware, %w", - removeDefaultContentType{}.ID(), err) - } - - return nil -} - -// RemoveNoPayloadDefaultContentTypeRemover removes the -// DefaultContentTypeRemover middleware from the stack. Returns an error if -// unable to remove the middleware. -func RemoveNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) { - _, err = stack.Serialize.Remove(removeDefaultContentType{}.ID()) - if err != nil { - return fmt.Errorf("failed to remove %s serialize middleware, %w", - removeDefaultContentType{}.ID(), err) - - } - return nil -} - -// removeDefaultContentType provides after serialization middleware that will -// remove the content-type header from an HTTP request if the header was set as -// a default value by the operation serializer, and there is no request payload. -type removeDefaultContentType struct{} - -// ID returns the middleware ID -func (removeDefaultContentType) ID() string { return "RemoveDefaultContentType" } - -// HandleSerialize implements the serialization middleware. -func (removeDefaultContentType) HandleSerialize( - ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, meta middleware.Metadata, err error, -) { - req, ok := input.Request.(*Request) - if !ok { - return out, meta, fmt.Errorf( - "unexpected request type %T for removeDefaultContentType middleware", - input.Request) - } - - if GetIsContentTypeDefaultValue(ctx) && req.GetStream() == nil { - req.Header.Del("Content-Type") - input.Request = req - } - - return next.HandleSerialize(ctx, input) -} - -type headerValue struct { - header string - value string - append bool -} - -type headerValueHelper struct { - headerValues []headerValue -} - -func (h *headerValueHelper) addHeaderValue(value headerValue) { - h.headerValues = append(h.headerValues, value) -} - -func (h *headerValueHelper) ID() string { - return "HTTPHeaderHelper" -} - -func (h *headerValueHelper) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (out middleware.BuildOutput, metadata middleware.Metadata, err error) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - for _, value := range h.headerValues { - if value.append { - req.Header.Add(value.header, value.value) - } else { - req.Header.Set(value.header, value.value) - } - } - - return next.HandleBuild(ctx, in) -} - -func getOrAddHeaderValueHelper(stack *middleware.Stack) (*headerValueHelper, error) { - id := (*headerValueHelper)(nil).ID() - m, ok := stack.Build.Get(id) - if !ok { - m = &headerValueHelper{} - err := stack.Build.Add(m, middleware.After) - if err != nil { - return nil, err - } - } - - requestUserAgent, ok := m.(*headerValueHelper) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", m, id) - } - - return requestUserAgent, nil -} - -// AddHeaderValue returns a stack mutator that adds the header value pair to header. -// Appends to any existing values if present. -func AddHeaderValue(header string, value string) func(stack *middleware.Stack) error { - return func(stack *middleware.Stack) error { - helper, err := getOrAddHeaderValueHelper(stack) - if err != nil { - return err - } - helper.addHeaderValue(headerValue{header: header, value: value, append: true}) - return nil - } -} - -// SetHeaderValue returns a stack mutator that adds the header value pair to header. -// Replaces any existing values if present. -func SetHeaderValue(header string, value string) func(stack *middleware.Stack) error { - return func(stack *middleware.Stack) error { - helper, err := getOrAddHeaderValueHelper(stack) - if err != nil { - return err - } - helper.addHeaderValue(headerValue{header: header, value: value, append: false}) - return nil - } -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go deleted file mode 100644 index d5909b0a2..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go +++ /dev/null @@ -1,75 +0,0 @@ -package http - -import ( - "context" - "fmt" - "net/http/httputil" - - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// RequestResponseLogger is a deserialize middleware that will log the request and response HTTP messages and optionally -// their respective bodies. Will not perform any logging if none of the options are set. -type RequestResponseLogger struct { - LogRequest bool - LogRequestWithBody bool - - LogResponse bool - LogResponseWithBody bool -} - -// ID is the middleware identifier. -func (r *RequestResponseLogger) ID() string { - return "RequestResponseLogger" -} - -// HandleDeserialize will log the request and response HTTP messages if configured accordingly. -func (r *RequestResponseLogger) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - logger := middleware.GetLogger(ctx) - - if r.LogRequest || r.LogRequestWithBody { - smithyRequest, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in) - } - - rc := smithyRequest.Build(ctx) - reqBytes, err := httputil.DumpRequestOut(rc, r.LogRequestWithBody) - if err != nil { - return out, metadata, err - } - - logger.Logf(logging.Debug, "Request\n%v", string(reqBytes)) - - if r.LogRequestWithBody { - smithyRequest, err = smithyRequest.SetStream(rc.Body) - if err != nil { - return out, metadata, err - } - in.Request = smithyRequest - } - } - - out, metadata, err = next.HandleDeserialize(ctx, in) - - if (err == nil) && (r.LogResponse || r.LogResponseWithBody) { - smithyResponse, ok := out.RawResponse.(*Response) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", out.RawResponse) - } - - respBytes, err := httputil.DumpResponse(smithyResponse.Response, r.LogResponseWithBody) - if err != nil { - return out, metadata, fmt.Errorf("failed to dump response %w", err) - } - - logger.Logf(logging.Debug, "Response\n%v", string(respBytes)) - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go deleted file mode 100644 index d6079b259..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go +++ /dev/null @@ -1,51 +0,0 @@ -package http - -import ( - "context" - - "github.com/aws/smithy-go/middleware" -) - -type ( - hostnameImmutableKey struct{} - hostPrefixDisableKey struct{} -) - -// GetHostnameImmutable retrieves whether the endpoint hostname should be considered -// immutable or not. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func GetHostnameImmutable(ctx context.Context) (v bool) { - v, _ = middleware.GetStackValue(ctx, hostnameImmutableKey{}).(bool) - return v -} - -// SetHostnameImmutable sets or modifies whether the request's endpoint hostname -// should be considered immutable or not. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func SetHostnameImmutable(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, hostnameImmutableKey{}, value) -} - -// IsEndpointHostPrefixDisabled retrieves whether the hostname prefixing is -// disabled. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func IsEndpointHostPrefixDisabled(ctx context.Context) (v bool) { - v, _ = middleware.GetStackValue(ctx, hostPrefixDisableKey{}).(bool) - return v -} - -// DisableEndpointHostPrefix sets or modifies whether the request's endpoint host -// prefixing should be disabled. If value is true, endpoint host prefixing -// will be disabled. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func DisableEndpointHostPrefix(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, hostPrefixDisableKey{}, value) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go deleted file mode 100644 index 326cb8a6c..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go +++ /dev/null @@ -1,79 +0,0 @@ -package http - -import ( - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - "strings" -) - -// MinimumProtocolError is an error type indicating that the established connection did not meet the expected minimum -// HTTP protocol version. -type MinimumProtocolError struct { - proto string - expectedProtoMajor int - expectedProtoMinor int -} - -// Error returns the error message. -func (m *MinimumProtocolError) Error() string { - return fmt.Sprintf("operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s", - m.expectedProtoMajor, m.expectedProtoMinor, m.proto) -} - -// RequireMinimumProtocol is a deserialization middleware that asserts that the established HTTP connection -// meets the minimum major ad minor version. -type RequireMinimumProtocol struct { - ProtoMajor int - ProtoMinor int -} - -// AddRequireMinimumProtocol adds the RequireMinimumProtocol middleware to the stack using the provided minimum -// protocol major and minor version. -func AddRequireMinimumProtocol(stack *middleware.Stack, major, minor int) error { - return stack.Deserialize.Insert(&RequireMinimumProtocol{ - ProtoMajor: major, - ProtoMinor: minor, - }, "OperationDeserializer", middleware.Before) -} - -// ID returns the middleware identifier string. -func (r *RequireMinimumProtocol) ID() string { - return "RequireMinimumProtocol" -} - -// HandleDeserialize asserts that the established connection is a HTTP connection with the minimum major and minor -// protocol version. -func (r *RequireMinimumProtocol) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*Response) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) - } - - if !strings.HasPrefix(response.Proto, "HTTP") { - return out, metadata, &MinimumProtocolError{ - proto: response.Proto, - expectedProtoMajor: r.ProtoMajor, - expectedProtoMinor: r.ProtoMinor, - } - } - - if response.ProtoMajor < r.ProtoMajor || response.ProtoMinor < r.ProtoMinor { - return out, metadata, &MinimumProtocolError{ - proto: response.Proto, - expectedProtoMajor: r.ProtoMajor, - expectedProtoMinor: r.ProtoMinor, - } - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/properties.go b/vendor/github.com/aws/smithy-go/transport/http/properties.go deleted file mode 100644 index c65aa3932..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/properties.go +++ /dev/null @@ -1,80 +0,0 @@ -package http - -import smithy "github.com/aws/smithy-go" - -type ( - sigV4SigningNameKey struct{} - sigV4SigningRegionKey struct{} - - sigV4ASigningNameKey struct{} - sigV4ASigningRegionsKey struct{} - - isUnsignedPayloadKey struct{} - disableDoubleEncodingKey struct{} -) - -// GetSigV4SigningName gets the signing name from Properties. -func GetSigV4SigningName(p *smithy.Properties) (string, bool) { - v, ok := p.Get(sigV4SigningNameKey{}).(string) - return v, ok -} - -// SetSigV4SigningName sets the signing name on Properties. -func SetSigV4SigningName(p *smithy.Properties, name string) { - p.Set(sigV4SigningNameKey{}, name) -} - -// GetSigV4SigningRegion gets the signing region from Properties. -func GetSigV4SigningRegion(p *smithy.Properties) (string, bool) { - v, ok := p.Get(sigV4SigningRegionKey{}).(string) - return v, ok -} - -// SetSigV4SigningRegion sets the signing region on Properties. -func SetSigV4SigningRegion(p *smithy.Properties, region string) { - p.Set(sigV4SigningRegionKey{}, region) -} - -// GetSigV4ASigningName gets the v4a signing name from Properties. -func GetSigV4ASigningName(p *smithy.Properties) (string, bool) { - v, ok := p.Get(sigV4ASigningNameKey{}).(string) - return v, ok -} - -// SetSigV4ASigningName sets the signing name on Properties. -func SetSigV4ASigningName(p *smithy.Properties, name string) { - p.Set(sigV4ASigningNameKey{}, name) -} - -// GetSigV4ASigningRegion gets the v4a signing region set from Properties. -func GetSigV4ASigningRegions(p *smithy.Properties) ([]string, bool) { - v, ok := p.Get(sigV4ASigningRegionsKey{}).([]string) - return v, ok -} - -// SetSigV4ASigningRegions sets the v4a signing region set on Properties. -func SetSigV4ASigningRegions(p *smithy.Properties, regions []string) { - p.Set(sigV4ASigningRegionsKey{}, regions) -} - -// GetIsUnsignedPayload gets whether the payload is unsigned from Properties. -func GetIsUnsignedPayload(p *smithy.Properties) (bool, bool) { - v, ok := p.Get(isUnsignedPayloadKey{}).(bool) - return v, ok -} - -// SetIsUnsignedPayload sets whether the payload is unsigned on Properties. -func SetIsUnsignedPayload(p *smithy.Properties, isUnsignedPayload bool) { - p.Set(isUnsignedPayloadKey{}, isUnsignedPayload) -} - -// GetDisableDoubleEncoding gets whether the payload is unsigned from Properties. -func GetDisableDoubleEncoding(p *smithy.Properties) (bool, bool) { - v, ok := p.Get(disableDoubleEncodingKey{}).(bool) - return v, ok -} - -// SetDisableDoubleEncoding sets whether the payload is unsigned on Properties. -func SetDisableDoubleEncoding(p *smithy.Properties, disableDoubleEncoding bool) { - p.Set(disableDoubleEncodingKey{}, disableDoubleEncoding) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/request.go b/vendor/github.com/aws/smithy-go/transport/http/request.go deleted file mode 100644 index 7177d6f95..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/request.go +++ /dev/null @@ -1,189 +0,0 @@ -package http - -import ( - "context" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "strings" - - iointernal "github.com/aws/smithy-go/transport/http/internal/io" -) - -// Request provides the HTTP specific request structure for HTTP specific -// middleware steps to use to serialize input, and send an operation's request. -type Request struct { - *http.Request - stream io.Reader - isStreamSeekable bool - streamStartPos int64 -} - -// NewStackRequest returns an initialized request ready to be populated with the -// HTTP request details. Returns empty interface so the function can be used as -// a parameter to the Smithy middleware Stack constructor. -func NewStackRequest() interface{} { - return &Request{ - Request: &http.Request{ - URL: &url.URL{}, - Header: http.Header{}, - ContentLength: -1, // default to unknown length - }, - } -} - -// IsHTTPS returns if the request is HTTPS. Returns false if no endpoint URL is set. -func (r *Request) IsHTTPS() bool { - if r.URL == nil { - return false - } - return strings.EqualFold(r.URL.Scheme, "https") -} - -// Clone returns a deep copy of the Request for the new context. A reference to -// the Stream is copied, but the underlying stream is not copied. -func (r *Request) Clone() *Request { - rc := *r - rc.Request = rc.Request.Clone(context.TODO()) - return &rc -} - -// StreamLength returns the number of bytes of the serialized stream attached -// to the request and ok set. If the length cannot be determined, an error will -// be returned. -func (r *Request) StreamLength() (size int64, ok bool, err error) { - return streamLength(r.stream, r.isStreamSeekable, r.streamStartPos) -} - -func streamLength(stream io.Reader, seekable bool, startPos int64) (size int64, ok bool, err error) { - if stream == nil { - return 0, true, nil - } - - if l, ok := stream.(interface{ Len() int }); ok { - return int64(l.Len()), true, nil - } - - if !seekable { - return 0, false, nil - } - - s := stream.(io.Seeker) - endOffset, err := s.Seek(0, io.SeekEnd) - if err != nil { - return 0, false, err - } - - // The reason to seek to streamStartPos instead of 0 is to ensure that the - // SDK only sends the stream from the starting position the user's - // application provided it to the SDK at. For example application opens a - // file, and wants to skip the first N bytes uploading the rest. The - // application would move the file's offset N bytes, then hand it off to - // the SDK to send the remaining. The SDK should respect that initial offset. - _, err = s.Seek(startPos, io.SeekStart) - if err != nil { - return 0, false, err - } - - return endOffset - startPos, true, nil -} - -// RewindStream will rewind the io.Reader to the relative start position if it -// is an io.Seeker. -func (r *Request) RewindStream() error { - // If there is no stream there is nothing to rewind. - if r.stream == nil { - return nil - } - - if !r.isStreamSeekable { - return fmt.Errorf("request stream is not seekable") - } - _, err := r.stream.(io.Seeker).Seek(r.streamStartPos, io.SeekStart) - return err -} - -// GetStream returns the request stream io.Reader if a stream is set. If no -// stream is present nil will be returned. -func (r *Request) GetStream() io.Reader { - return r.stream -} - -// IsStreamSeekable returns whether the stream is seekable. -func (r *Request) IsStreamSeekable() bool { - return r.isStreamSeekable -} - -// SetStream returns a clone of the request with the stream set to the provided -// reader. May return an error if the provided reader is seekable but returns -// an error. -func (r *Request) SetStream(reader io.Reader) (rc *Request, err error) { - rc = r.Clone() - - if reader == http.NoBody { - reader = nil - } - - var isStreamSeekable bool - var streamStartPos int64 - switch v := reader.(type) { - case io.Seeker: - n, err := v.Seek(0, io.SeekCurrent) - if err != nil { - return r, err - } - isStreamSeekable = true - streamStartPos = n - default: - // If the stream length can be determined, and is determined to be empty, - // use a nil stream to prevent confusion between empty vs not-empty - // streams. - length, ok, err := streamLength(reader, false, 0) - if err != nil { - return nil, err - } else if ok && length == 0 { - reader = nil - } - } - - rc.stream = reader - rc.isStreamSeekable = isStreamSeekable - rc.streamStartPos = streamStartPos - - return rc, err -} - -// Build returns a build standard HTTP request value from the Smithy request. -// The request's stream is wrapped in a safe container that allows it to be -// reused for subsequent attempts. -func (r *Request) Build(ctx context.Context) *http.Request { - req := r.Request.Clone(ctx) - - if r.stream == nil && req.ContentLength == -1 { - req.ContentLength = 0 - } - - switch stream := r.stream.(type) { - case *io.PipeReader: - req.Body = ioutil.NopCloser(stream) - req.ContentLength = -1 - default: - // HTTP Client Request must only have a non-nil body if the - // ContentLength is explicitly unknown (-1) or non-zero. The HTTP - // Client will interpret a non-nil body and ContentLength 0 as - // "unknown". This is unwanted behavior. - if req.ContentLength != 0 && r.stream != nil { - req.Body = iointernal.NewSafeReadCloser(ioutil.NopCloser(stream)) - } - } - - return req -} - -// RequestCloner is a function that can take an input request type and clone the request -// for use in a subsequent retry attempt. -func RequestCloner(v interface{}) interface{} { - return v.(*Request).Clone() -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/response.go b/vendor/github.com/aws/smithy-go/transport/http/response.go deleted file mode 100644 index 0c13bfcc8..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/response.go +++ /dev/null @@ -1,34 +0,0 @@ -package http - -import ( - "fmt" - "net/http" -) - -// Response provides the HTTP specific response structure for HTTP specific -// middleware steps to use to deserialize the response from an operation call. -type Response struct { - *http.Response -} - -// ResponseError provides the HTTP centric error type wrapping the underlying -// error with the HTTP response value. -type ResponseError struct { - Response *Response - Err error -} - -// HTTPStatusCode returns the HTTP response status code received from the service. -func (e *ResponseError) HTTPStatusCode() int { return e.Response.StatusCode } - -// HTTPResponse returns the HTTP response received from the service. -func (e *ResponseError) HTTPResponse() *Response { return e.Response } - -// Unwrap returns the nested error if any, or nil. -func (e *ResponseError) Unwrap() error { return e.Err } - -func (e *ResponseError) Error() string { - return fmt.Sprintf( - "http response error StatusCode: %d, %v", - e.Response.StatusCode, e.Err) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/time.go b/vendor/github.com/aws/smithy-go/transport/http/time.go deleted file mode 100644 index 607b196a8..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/time.go +++ /dev/null @@ -1,13 +0,0 @@ -package http - -import ( - "time" - - smithytime "github.com/aws/smithy-go/time" -) - -// ParseTime parses a time string like the HTTP Date header. This uses a more -// relaxed rule set for date parsing compared to the standard library. -func ParseTime(text string) (t time.Time, err error) { - return smithytime.ParseHTTPDate(text) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/url.go b/vendor/github.com/aws/smithy-go/transport/http/url.go deleted file mode 100644 index 60a5fc100..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/url.go +++ /dev/null @@ -1,44 +0,0 @@ -package http - -import "strings" - -// JoinPath returns an absolute URL path composed of the two paths provided. -// Enforces that the returned path begins with '/'. If added path is empty the -// returned path suffix will match the first parameter suffix. -func JoinPath(a, b string) string { - if len(a) == 0 { - a = "/" - } else if a[0] != '/' { - a = "/" + a - } - - if len(b) != 0 && b[0] == '/' { - b = b[1:] - } - - if len(b) != 0 && len(a) > 1 && a[len(a)-1] != '/' { - a = a + "/" - } - - return a + b -} - -// JoinRawQuery returns an absolute raw query expression. Any duplicate '&' -// will be collapsed to single separator between values. -func JoinRawQuery(a, b string) string { - a = strings.TrimFunc(a, isAmpersand) - b = strings.TrimFunc(b, isAmpersand) - - if len(a) == 0 { - return b - } - if len(b) == 0 { - return a - } - - return a + "&" + b -} - -func isAmpersand(v rune) bool { - return v == '&' -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/user_agent.go b/vendor/github.com/aws/smithy-go/transport/http/user_agent.go deleted file mode 100644 index 71a7e0d8a..000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/user_agent.go +++ /dev/null @@ -1,37 +0,0 @@ -package http - -import ( - "strings" -) - -// UserAgentBuilder is a builder for a HTTP User-Agent string. -type UserAgentBuilder struct { - sb strings.Builder -} - -// NewUserAgentBuilder returns a new UserAgentBuilder. -func NewUserAgentBuilder() *UserAgentBuilder { - return &UserAgentBuilder{sb: strings.Builder{}} -} - -// AddKey adds the named component/product to the agent string -func (u *UserAgentBuilder) AddKey(key string) { - u.appendTo(key) -} - -// AddKeyValue adds the named key to the agent string with the given value. -func (u *UserAgentBuilder) AddKeyValue(key, value string) { - u.appendTo(key + "/" + value) -} - -// Build returns the constructed User-Agent string. May be called multiple times. -func (u *UserAgentBuilder) Build() string { - return u.sb.String() -} - -func (u *UserAgentBuilder) appendTo(value string) { - if u.sb.Len() > 0 { - u.sb.WriteRune(' ') - } - u.sb.WriteString(value) -} diff --git a/vendor/github.com/aws/smithy-go/validation.go b/vendor/github.com/aws/smithy-go/validation.go deleted file mode 100644 index b5eedc1f9..000000000 --- a/vendor/github.com/aws/smithy-go/validation.go +++ /dev/null @@ -1,140 +0,0 @@ -package smithy - -import ( - "bytes" - "fmt" - "strings" -) - -// An InvalidParamsError provides wrapping of invalid parameter errors found when -// validating API operation input parameters. -type InvalidParamsError struct { - // Context is the base context of the invalid parameter group. - Context string - errs []InvalidParamError -} - -// Add adds a new invalid parameter error to the collection of invalid -// parameters. The context of the invalid parameter will be updated to reflect -// this collection. -func (e *InvalidParamsError) Add(err InvalidParamError) { - err.SetContext(e.Context) - e.errs = append(e.errs, err) -} - -// AddNested adds the invalid parameter errors from another InvalidParamsError -// value into this collection. The nested errors will have their nested context -// updated and base context to reflect the merging. -// -// Use for nested validations errors. -func (e *InvalidParamsError) AddNested(nestedCtx string, nested InvalidParamsError) { - for _, err := range nested.errs { - err.SetContext(e.Context) - err.AddNestedContext(nestedCtx) - e.errs = append(e.errs, err) - } -} - -// Len returns the number of invalid parameter errors -func (e *InvalidParamsError) Len() int { - return len(e.errs) -} - -// Error returns the string formatted form of the invalid parameters. -func (e InvalidParamsError) Error() string { - w := &bytes.Buffer{} - fmt.Fprintf(w, "%d validation error(s) found.\n", len(e.errs)) - - for _, err := range e.errs { - fmt.Fprintf(w, "- %s\n", err.Error()) - } - - return w.String() -} - -// Errs returns a slice of the invalid parameters -func (e InvalidParamsError) Errs() []error { - errs := make([]error, len(e.errs)) - for i := 0; i < len(errs); i++ { - errs[i] = e.errs[i] - } - - return errs -} - -// An InvalidParamError represents an invalid parameter error type. -type InvalidParamError interface { - error - - // Field name the error occurred on. - Field() string - - // SetContext updates the context of the error. - SetContext(string) - - // AddNestedContext updates the error's context to include a nested level. - AddNestedContext(string) -} - -type invalidParamError struct { - context string - nestedContext string - field string - reason string -} - -// Error returns the string version of the invalid parameter error. -func (e invalidParamError) Error() string { - return fmt.Sprintf("%s, %s.", e.reason, e.Field()) -} - -// Field Returns the field and context the error occurred. -func (e invalidParamError) Field() string { - sb := &strings.Builder{} - sb.WriteString(e.context) - if sb.Len() > 0 { - if len(e.nestedContext) == 0 || (len(e.nestedContext) > 0 && e.nestedContext[:1] != "[") { - sb.WriteRune('.') - } - } - if len(e.nestedContext) > 0 { - sb.WriteString(e.nestedContext) - sb.WriteRune('.') - } - sb.WriteString(e.field) - return sb.String() -} - -// SetContext updates the base context of the error. -func (e *invalidParamError) SetContext(ctx string) { - e.context = ctx -} - -// AddNestedContext prepends a context to the field's path. -func (e *invalidParamError) AddNestedContext(ctx string) { - if len(e.nestedContext) == 0 { - e.nestedContext = ctx - return - } - // Check if our nested context is an index into a slice or map - if e.nestedContext[:1] != "[" { - e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext) - return - } - e.nestedContext = ctx + e.nestedContext -} - -// An ParamRequiredError represents an required parameter error. -type ParamRequiredError struct { - invalidParamError -} - -// NewErrParamRequired creates a new required parameter error. -func NewErrParamRequired(field string) *ParamRequiredError { - return &ParamRequiredError{ - invalidParamError{ - field: field, - reason: fmt.Sprintf("missing required field"), - }, - } -} diff --git a/vendor/github.com/aws/smithy-go/waiter/logger.go b/vendor/github.com/aws/smithy-go/waiter/logger.go deleted file mode 100644 index 8d70a03ff..000000000 --- a/vendor/github.com/aws/smithy-go/waiter/logger.go +++ /dev/null @@ -1,36 +0,0 @@ -package waiter - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// Logger is the Logger middleware used by the waiter to log an attempt -type Logger struct { - // Attempt is the current attempt to be logged - Attempt int64 -} - -// ID representing the Logger middleware -func (*Logger) ID() string { - return "WaiterLogger" -} - -// HandleInitialize performs handling of request in initialize stack step -func (m *Logger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - logger := middleware.GetLogger(ctx) - - logger.Logf(logging.Debug, fmt.Sprintf("attempting waiter request, attempt count: %d", m.Attempt)) - - return next.HandleInitialize(ctx, in) -} - -// AddLogger is a helper util to add waiter logger after `SetLogger` middleware in -func (m Logger) AddLogger(stack *middleware.Stack) error { - return stack.Initialize.Insert(&m, "SetLogger", middleware.After) -} diff --git a/vendor/github.com/aws/smithy-go/waiter/waiter.go b/vendor/github.com/aws/smithy-go/waiter/waiter.go deleted file mode 100644 index 03e46e2ee..000000000 --- a/vendor/github.com/aws/smithy-go/waiter/waiter.go +++ /dev/null @@ -1,66 +0,0 @@ -package waiter - -import ( - "fmt" - "math" - "time" - - "github.com/aws/smithy-go/rand" -) - -// ComputeDelay computes delay between waiter attempts. The function takes in a current attempt count, -// minimum delay, maximum delay, and remaining wait time for waiter as input. The inputs minDelay and maxDelay -// must always be greater than 0, along with minDelay lesser than or equal to maxDelay. -// -// Returns the computed delay and if next attempt count is possible within the given input time constraints. -// Note that the zeroth attempt results in no delay. -func ComputeDelay(attempt int64, minDelay, maxDelay, remainingTime time.Duration) (delay time.Duration, err error) { - // zeroth attempt, no delay - if attempt <= 0 { - return 0, nil - } - - // remainingTime is zero or less, no delay - if remainingTime <= 0 { - return 0, nil - } - - // validate min delay is greater than 0 - if minDelay == 0 { - return 0, fmt.Errorf("minDelay must be greater than zero when computing Delay") - } - - // validate max delay is greater than 0 - if maxDelay == 0 { - return 0, fmt.Errorf("maxDelay must be greater than zero when computing Delay") - } - - // Get attempt ceiling to prevent integer overflow. - attemptCeiling := (math.Log(float64(maxDelay/minDelay)) / math.Log(2)) + 1 - - if attempt > int64(attemptCeiling) { - delay = maxDelay - } else { - // Compute exponential delay based on attempt. - ri := 1 << uint64(attempt-1) - // compute delay - delay = minDelay * time.Duration(ri) - } - - if delay != minDelay { - // randomize to get jitter between min delay and delay value - d, err := rand.CryptoRandInt63n(int64(delay - minDelay)) - if err != nil { - return 0, fmt.Errorf("error computing retry jitter, %w", err) - } - - delay = time.Duration(d) + minDelay - } - - // check if this is the last attempt possible and compute delay accordingly - if remainingTime-delay <= minDelay { - delay = remainingTime - minDelay - } - - return delay, nil -} diff --git a/vendor/github.com/emicklei/go-restful/v3/CHANGES.md b/vendor/github.com/emicklei/go-restful/v3/CHANGES.md index 5edd5a7ca..92b78048e 100644 --- a/vendor/github.com/emicklei/go-restful/v3/CHANGES.md +++ b/vendor/github.com/emicklei/go-restful/v3/CHANGES.md @@ -1,6 +1,24 @@ # Change history of go-restful -## [v3.11.0] - 2023-08-19 + +## [v3.12.1] - 2024-05-28 + +- fix misroute when dealing multiple webservice with regex (#549) (thanks Haitao Chen) + +## [v3.12.0] - 2024-03-11 + +- add Flush method #529 (#538) +- fix: Improper handling of empty POST requests (#543) + +## [v3.11.3] - 2024-01-09 + +- better not have 2 tags on one commit + +## [v3.11.1, v3.11.2] - 2024-01-09 + +- fix by restoring custom JSON handler functions (Mike Beaumont #540) + +## [v3.12.0] - 2023-08-19 - restored behavior as <= v3.9.0 with option to change path strategy using TrimRightSlashEnabled. diff --git a/vendor/github.com/emicklei/go-restful/v3/README.md b/vendor/github.com/emicklei/go-restful/v3/README.md index e3e30080e..7234604e4 100644 --- a/vendor/github.com/emicklei/go-restful/v3/README.md +++ b/vendor/github.com/emicklei/go-restful/v3/README.md @@ -2,7 +2,6 @@ go-restful ========== package for building REST-style Web Services using Google Go -[![Build Status](https://travis-ci.org/emicklei/go-restful.png)](https://travis-ci.org/emicklei/go-restful) [![Go Report Card](https://goreportcard.com/badge/github.com/emicklei/go-restful)](https://goreportcard.com/report/github.com/emicklei/go-restful) [![GoDoc](https://godoc.org/github.com/emicklei/go-restful?status.svg)](https://pkg.go.dev/github.com/emicklei/go-restful) [![codecov](https://codecov.io/gh/emicklei/go-restful/branch/master/graph/badge.svg)](https://codecov.io/gh/emicklei/go-restful) @@ -95,8 +94,7 @@ There are several hooks to customize the behavior of the go-restful package. - Trace logging - Compression - Encoders for other serializers -- Use [jsoniter](https://github.com/json-iterator/go) by building this package using a build tag, e.g. `go build -tags=jsoniter .` -- Use the package variable `TrimRightSlashEnabled` (default true) to control the behavior of matching routes that end with a slash `/` +- Use the package variable `TrimRightSlashEnabled` (default true) to control the behavior of matching routes that end with a slash `/` ## Resources diff --git a/vendor/github.com/emicklei/go-restful/v3/compress.go b/vendor/github.com/emicklei/go-restful/v3/compress.go index 1ff239f99..80adf55fd 100644 --- a/vendor/github.com/emicklei/go-restful/v3/compress.go +++ b/vendor/github.com/emicklei/go-restful/v3/compress.go @@ -49,6 +49,16 @@ func (c *CompressingResponseWriter) CloseNotify() <-chan bool { return c.writer.(http.CloseNotifier).CloseNotify() } +// Flush is part of http.Flusher interface. Noop if the underlying writer doesn't support it. +func (c *CompressingResponseWriter) Flush() { + flusher, ok := c.writer.(http.Flusher) + if !ok { + // writer doesn't support http.Flusher interface + return + } + flusher.Flush() +} + // Close the underlying compressor func (c *CompressingResponseWriter) Close() error { if c.isCompressorClosed() { diff --git a/vendor/github.com/emicklei/go-restful/v3/curly.go b/vendor/github.com/emicklei/go-restful/v3/curly.go index ba1fc5d5f..6fd2bcd5a 100644 --- a/vendor/github.com/emicklei/go-restful/v3/curly.go +++ b/vendor/github.com/emicklei/go-restful/v3/curly.go @@ -46,10 +46,10 @@ func (c CurlyRouter) SelectRoute( // selectRoutes return a collection of Route from a WebService that matches the path tokens from the request. func (c CurlyRouter) selectRoutes(ws *WebService, requestTokens []string) sortableCurlyRoutes { candidates := make(sortableCurlyRoutes, 0, 8) - for _, each := range ws.routes { - matches, paramCount, staticCount := c.matchesRouteByPathTokens(each.pathParts, requestTokens, each.hasCustomVerb) + for _, eachRoute := range ws.routes { + matches, paramCount, staticCount := c.matchesRouteByPathTokens(eachRoute.pathParts, requestTokens, eachRoute.hasCustomVerb) if matches { - candidates.add(curlyRoute{each, paramCount, staticCount}) // TODO make sure Routes() return pointers? + candidates.add(curlyRoute{eachRoute, paramCount, staticCount}) // TODO make sure Routes() return pointers? } } sort.Sort(candidates) @@ -72,7 +72,7 @@ func (c CurlyRouter) matchesRouteByPathTokens(routeTokens, requestTokens []strin return false, 0, 0 } requestToken := requestTokens[i] - if routeHasCustomVerb && hasCustomVerb(routeToken){ + if routeHasCustomVerb && hasCustomVerb(routeToken) { if !isMatchCustomVerb(routeToken, requestToken) { return false, 0, 0 } @@ -129,44 +129,52 @@ func (c CurlyRouter) detectRoute(candidateRoutes sortableCurlyRoutes, httpReques // detectWebService returns the best matching webService given the list of path tokens. // see also computeWebserviceScore func (c CurlyRouter) detectWebService(requestTokens []string, webServices []*WebService) *WebService { - var best *WebService + var bestWs *WebService score := -1 - for _, each := range webServices { - matches, eachScore := c.computeWebserviceScore(requestTokens, each.pathExpr.tokens) + for _, eachWS := range webServices { + matches, eachScore := c.computeWebserviceScore(requestTokens, eachWS.pathExpr.tokens) if matches && (eachScore > score) { - best = each + bestWs = eachWS score = eachScore } } - return best + return bestWs } // computeWebserviceScore returns whether tokens match and // the weighted score of the longest matching consecutive tokens from the beginning. -func (c CurlyRouter) computeWebserviceScore(requestTokens []string, tokens []string) (bool, int) { - if len(tokens) > len(requestTokens) { +func (c CurlyRouter) computeWebserviceScore(requestTokens []string, routeTokens []string) (bool, int) { + if len(routeTokens) > len(requestTokens) { return false, 0 } score := 0 - for i := 0; i < len(tokens); i++ { - each := requestTokens[i] - other := tokens[i] - if len(each) == 0 && len(other) == 0 { + for i := 0; i < len(routeTokens); i++ { + eachRequestToken := requestTokens[i] + eachRouteToken := routeTokens[i] + if len(eachRequestToken) == 0 && len(eachRouteToken) == 0 { score++ continue } - if len(other) > 0 && strings.HasPrefix(other, "{") { + if len(eachRouteToken) > 0 && strings.HasPrefix(eachRouteToken, "{") { // no empty match - if len(each) == 0 { + if len(eachRequestToken) == 0 { return false, score } - score += 1 + score++ + + if colon := strings.Index(eachRouteToken, ":"); colon != -1 { + // match by regex + matchesToken, _ := c.regularMatchesPathToken(eachRouteToken, colon, eachRequestToken) + if matchesToken { + score++ // extra score for regex match + } + } } else { // not a parameter - if each != other { + if eachRequestToken != eachRouteToken { return false, score } - score += (len(tokens) - i) * 10 //fuzzy + score += (len(routeTokens) - i) * 10 //fuzzy } } return true, score diff --git a/vendor/github.com/emicklei/go-restful/v3/entity_accessors.go b/vendor/github.com/emicklei/go-restful/v3/entity_accessors.go index 66dfc824f..9808752ac 100644 --- a/vendor/github.com/emicklei/go-restful/v3/entity_accessors.go +++ b/vendor/github.com/emicklei/go-restful/v3/entity_accessors.go @@ -5,11 +5,18 @@ package restful // that can be found in the LICENSE file. import ( + "encoding/json" "encoding/xml" "strings" "sync" ) +var ( + MarshalIndent = json.MarshalIndent + NewDecoder = json.NewDecoder + NewEncoder = json.NewEncoder +) + // EntityReaderWriter can read and write values using an encoding such as JSON,XML. type EntityReaderWriter interface { // Read a serialized version of the value from the request. diff --git a/vendor/github.com/emicklei/go-restful/v3/json.go b/vendor/github.com/emicklei/go-restful/v3/json.go deleted file mode 100644 index 871165166..000000000 --- a/vendor/github.com/emicklei/go-restful/v3/json.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build !jsoniter - -package restful - -import "encoding/json" - -var ( - MarshalIndent = json.MarshalIndent - NewDecoder = json.NewDecoder - NewEncoder = json.NewEncoder -) diff --git a/vendor/github.com/emicklei/go-restful/v3/jsoniter.go b/vendor/github.com/emicklei/go-restful/v3/jsoniter.go deleted file mode 100644 index 11b8f8ae7..000000000 --- a/vendor/github.com/emicklei/go-restful/v3/jsoniter.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build jsoniter - -package restful - -import "github.com/json-iterator/go" - -var ( - json = jsoniter.ConfigCompatibleWithStandardLibrary - MarshalIndent = json.MarshalIndent - NewDecoder = json.NewDecoder - NewEncoder = json.NewEncoder -) diff --git a/vendor/github.com/emicklei/go-restful/v3/jsr311.go b/vendor/github.com/emicklei/go-restful/v3/jsr311.go index 07a0c91e9..a9b3faaa8 100644 --- a/vendor/github.com/emicklei/go-restful/v3/jsr311.go +++ b/vendor/github.com/emicklei/go-restful/v3/jsr311.go @@ -155,7 +155,7 @@ func (r RouterJSR311) detectRoute(routes []Route, httpRequest *http.Request) (*R method, length := httpRequest.Method, httpRequest.Header.Get("Content-Length") if (method == http.MethodPost || method == http.MethodPut || - method == http.MethodPatch) && length == "" { + method == http.MethodPatch) && (length == "" || length == "0") { return nil, NewError( http.StatusUnsupportedMediaType, fmt.Sprintf("415: Unsupported Media Type\n\nAvailable representations: %s", strings.Join(available, ", ")), diff --git a/vendor/github.com/go-logr/logr/slogr/slogr.go b/vendor/github.com/go-logr/logr/slogr/slogr.go deleted file mode 100644 index 36432c56f..000000000 --- a/vendor/github.com/go-logr/logr/slogr/slogr.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build go1.21 -// +build go1.21 - -/* -Copyright 2023 The logr Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package slogr enables usage of a slog.Handler with logr.Logger as front-end -// API and of a logr.LogSink through the slog.Handler and thus slog.Logger -// APIs. -// -// See the README in the top-level [./logr] package for a discussion of -// interoperability. -// -// Deprecated: use the main logr package instead. -package slogr - -import ( - "log/slog" - - "github.com/go-logr/logr" -) - -// NewLogr returns a logr.Logger which writes to the slog.Handler. -// -// Deprecated: use [logr.FromSlogHandler] instead. -func NewLogr(handler slog.Handler) logr.Logger { - return logr.FromSlogHandler(handler) -} - -// NewSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger. -// -// Deprecated: use [logr.ToSlogHandler] instead. -func NewSlogHandler(logger logr.Logger) slog.Handler { - return logr.ToSlogHandler(logger) -} - -// ToSlogHandler returns a slog.Handler which writes to the same sink as the logr.Logger. -// -// Deprecated: use [logr.ToSlogHandler] instead. -func ToSlogHandler(logger logr.Logger) slog.Handler { - return logr.ToSlogHandler(logger) -} - -// SlogSink is an optional interface that a LogSink can implement to support -// logging through the slog.Logger or slog.Handler APIs better. -// -// Deprecated: use [logr.SlogSink] instead. -type SlogSink = logr.SlogSink diff --git a/vendor/github.com/go-openapi/jsonpointer/.golangci.yml b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml new file mode 100644 index 000000000..22f8d21cc --- /dev/null +++ b/vendor/github.com/go-openapi/jsonpointer/.golangci.yml @@ -0,0 +1,61 @@ +linters-settings: + govet: + check-shadowing: true + golint: + min-confidence: 0 + gocyclo: + min-complexity: 45 + maligned: + suggest-new: true + dupl: + threshold: 200 + goconst: + min-len: 2 + min-occurrences: 3 + +linters: + enable-all: true + disable: + - maligned + - unparam + - lll + - gochecknoinits + - gochecknoglobals + - funlen + - godox + - gocognit + - whitespace + - wsl + - wrapcheck + - testpackage + - nlreturn + - gomnd + - exhaustivestruct + - goerr113 + - errorlint + - nestif + - godot + - gofumpt + - paralleltest + - tparallel + - thelper + - ifshort + - exhaustruct + - varnamelen + - gci + - depguard + - errchkjson + - inamedparam + - nonamedreturns + - musttag + - ireturn + - forcetypeassert + - cyclop + # deprecated linters + - deadcode + - interfacer + - scopelint + - varcheck + - structcheck + - golint + - nosnakecase diff --git a/vendor/github.com/go-openapi/jsonpointer/README.md b/vendor/github.com/go-openapi/jsonpointer/README.md index 813788aff..0108f1d57 100644 --- a/vendor/github.com/go-openapi/jsonpointer/README.md +++ b/vendor/github.com/go-openapi/jsonpointer/README.md @@ -1,6 +1,10 @@ -# gojsonpointer [![Build Status](https://travis-ci.org/go-openapi/jsonpointer.svg?branch=master)](https://travis-ci.org/go-openapi/jsonpointer) [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# gojsonpointer [![Build Status](https://github.com/go-openapi/jsonpointer/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonpointer/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonpointer/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonpointer) + +[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonpointer.svg)](https://pkg.go.dev/github.com/go-openapi/jsonpointer) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonpointer)](https://goreportcard.com/report/github.com/go-openapi/jsonpointer) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonpointer/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonpointer?status.svg)](http://godoc.org/github.com/go-openapi/jsonpointer) An implementation of JSON Pointer - Go language ## Status diff --git a/vendor/github.com/go-openapi/jsonpointer/pointer.go b/vendor/github.com/go-openapi/jsonpointer/pointer.go index 7df9853de..d970c7cf4 100644 --- a/vendor/github.com/go-openapi/jsonpointer/pointer.go +++ b/vendor/github.com/go-openapi/jsonpointer/pointer.go @@ -26,6 +26,7 @@ package jsonpointer import ( + "encoding/json" "errors" "fmt" "reflect" @@ -40,6 +41,7 @@ const ( pointerSeparator = `/` invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator + notFound = `Can't find the pointer in the document` ) var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem() @@ -48,13 +50,13 @@ var jsonSetableType = reflect.TypeOf(new(JSONSetable)).Elem() // JSONPointable is an interface for structs to implement when they need to customize the // json pointer process type JSONPointable interface { - JSONLookup(string) (interface{}, error) + JSONLookup(string) (any, error) } // JSONSetable is an interface for structs to implement when they need to customize the // json pointer process type JSONSetable interface { - JSONSet(string, interface{}) error + JSONSet(string, any) error } // New creates a new json pointer for the given string @@ -81,9 +83,7 @@ func (p *Pointer) parse(jsonPointerString string) error { err = errors.New(invalidStart) } else { referenceTokens := strings.Split(jsonPointerString, pointerSeparator) - for _, referenceToken := range referenceTokens[1:] { - p.referenceTokens = append(p.referenceTokens, referenceToken) - } + p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...) } } @@ -91,38 +91,58 @@ func (p *Pointer) parse(jsonPointerString string) error { } // Get uses the pointer to retrieve a value from a JSON document -func (p *Pointer) Get(document interface{}) (interface{}, reflect.Kind, error) { +func (p *Pointer) Get(document any) (any, reflect.Kind, error) { return p.get(document, swag.DefaultJSONNameProvider) } // Set uses the pointer to set a value from a JSON document -func (p *Pointer) Set(document interface{}, value interface{}) (interface{}, error) { +func (p *Pointer) Set(document any, value any) (any, error) { return document, p.set(document, value, swag.DefaultJSONNameProvider) } // GetForToken gets a value for a json pointer token 1 level deep -func GetForToken(document interface{}, decodedToken string) (interface{}, reflect.Kind, error) { +func GetForToken(document any, decodedToken string) (any, reflect.Kind, error) { return getSingleImpl(document, decodedToken, swag.DefaultJSONNameProvider) } // SetForToken gets a value for a json pointer token 1 level deep -func SetForToken(document interface{}, decodedToken string, value interface{}) (interface{}, error) { +func SetForToken(document any, decodedToken string, value any) (any, error) { return document, setSingleImpl(document, value, decodedToken, swag.DefaultJSONNameProvider) } -func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { +func isNil(input any) bool { + if input == nil { + return true + } + + kind := reflect.TypeOf(input).Kind() + switch kind { //nolint:exhaustive + case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: + return reflect.ValueOf(input).IsNil() + default: + return false + } +} + +func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { rValue := reflect.Indirect(reflect.ValueOf(node)) kind := rValue.Kind() + if isNil(node) { + return nil, kind, fmt.Errorf("nil value has not field %q", decodedToken) + } - if rValue.Type().Implements(jsonPointableType) { - r, err := node.(JSONPointable).JSONLookup(decodedToken) + switch typed := node.(type) { + case JSONPointable: + r, err := typed.JSONLookup(decodedToken) if err != nil { return nil, kind, err } return r, kind, nil + case *any: // case of a pointer to interface, that is not resolved by reflect.Indirect + return getSingleImpl(*typed, decodedToken, nameProvider) } - switch kind { + switch kind { //nolint:exhaustive case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { @@ -159,7 +179,7 @@ func getSingleImpl(node interface{}, decodedToken string, nameProvider *swag.Nam } -func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *swag.NameProvider) error { +func setSingleImpl(node, data any, decodedToken string, nameProvider *swag.NameProvider) error { rValue := reflect.Indirect(reflect.ValueOf(node)) if ns, ok := node.(JSONSetable); ok { // pointer impl @@ -170,7 +190,7 @@ func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *sw return node.(JSONSetable).JSONSet(decodedToken, data) } - switch rValue.Kind() { + switch rValue.Kind() { //nolint:exhaustive case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { @@ -210,7 +230,7 @@ func setSingleImpl(node, data interface{}, decodedToken string, nameProvider *sw } -func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interface{}, reflect.Kind, error) { +func (p *Pointer) get(node any, nameProvider *swag.NameProvider) (any, reflect.Kind, error) { if nameProvider == nil { nameProvider = swag.DefaultJSONNameProvider @@ -231,8 +251,7 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf if err != nil { return nil, knd, err } - node, kind = r, knd - + node = r } rValue := reflect.ValueOf(node) @@ -241,11 +260,11 @@ func (p *Pointer) get(node interface{}, nameProvider *swag.NameProvider) (interf return node, kind, nil } -func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) error { +func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error { knd := reflect.ValueOf(node).Kind() if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array { - return fmt.Errorf("only structs, pointers, maps and slices are supported for setting values") + return errors.New("only structs, pointers, maps and slices are supported for setting values") } if nameProvider == nil { @@ -284,7 +303,7 @@ func (p *Pointer) set(node, data interface{}, nameProvider *swag.NameProvider) e continue } - switch kind { + switch kind { //nolint:exhaustive case reflect.Struct: nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken) if !ok { @@ -363,6 +382,128 @@ func (p *Pointer) String() string { return pointerString } +func (p *Pointer) Offset(document string) (int64, error) { + dec := json.NewDecoder(strings.NewReader(document)) + var offset int64 + for _, ttk := range p.DecodedTokens() { + tk, err := dec.Token() + if err != nil { + return 0, err + } + switch tk := tk.(type) { + case json.Delim: + switch tk { + case '{': + offset, err = offsetSingleObject(dec, ttk) + if err != nil { + return 0, err + } + case '[': + offset, err = offsetSingleArray(dec, ttk) + if err != nil { + return 0, err + } + default: + return 0, fmt.Errorf("invalid token %#v", tk) + } + default: + return 0, fmt.Errorf("invalid token %#v", tk) + } + } + return offset, nil +} + +func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) { + for dec.More() { + offset := dec.InputOffset() + tk, err := dec.Token() + if err != nil { + return 0, err + } + switch tk := tk.(type) { + case json.Delim: + switch tk { + case '{': + if err = drainSingle(dec); err != nil { + return 0, err + } + case '[': + if err = drainSingle(dec); err != nil { + return 0, err + } + } + case string: + if tk == decodedToken { + return offset, nil + } + default: + return 0, fmt.Errorf("invalid token %#v", tk) + } + } + return 0, fmt.Errorf("token reference %q not found", decodedToken) +} + +func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) { + idx, err := strconv.Atoi(decodedToken) + if err != nil { + return 0, fmt.Errorf("token reference %q is not a number: %v", decodedToken, err) + } + var i int + for i = 0; i < idx && dec.More(); i++ { + tk, err := dec.Token() + if err != nil { + return 0, err + } + + if delim, isDelim := tk.(json.Delim); isDelim { + switch delim { + case '{': + if err = drainSingle(dec); err != nil { + return 0, err + } + case '[': + if err = drainSingle(dec); err != nil { + return 0, err + } + } + } + } + + if !dec.More() { + return 0, fmt.Errorf("token reference %q not found", decodedToken) + } + return dec.InputOffset(), nil +} + +// drainSingle drains a single level of object or array. +// The decoder has to guarantee the beginning delim (i.e. '{' or '[') has been consumed. +func drainSingle(dec *json.Decoder) error { + for dec.More() { + tk, err := dec.Token() + if err != nil { + return err + } + if delim, isDelim := tk.(json.Delim); isDelim { + switch delim { + case '{': + if err = drainSingle(dec); err != nil { + return err + } + case '[': + if err = drainSingle(dec); err != nil { + return err + } + } + } + } + + // Consumes the ending delim + if _, err := dec.Token(); err != nil { + return err + } + return nil +} + // Specific JSON pointer encoding here // ~0 => ~ // ~1 => / @@ -377,14 +518,14 @@ const ( // Unescape unescapes a json pointer reference token string to the original representation func Unescape(token string) string { - step1 := strings.Replace(token, encRefTok1, decRefTok1, -1) - step2 := strings.Replace(step1, encRefTok0, decRefTok0, -1) + step1 := strings.ReplaceAll(token, encRefTok1, decRefTok1) + step2 := strings.ReplaceAll(step1, encRefTok0, decRefTok0) return step2 } // Escape escapes a pointer reference token string func Escape(token string) string { - step1 := strings.Replace(token, decRefTok0, encRefTok0, -1) - step2 := strings.Replace(step1, decRefTok1, encRefTok1, -1) + step1 := strings.ReplaceAll(token, decRefTok0, encRefTok0) + step2 := strings.ReplaceAll(step1, decRefTok1, encRefTok1) return step2 } diff --git a/vendor/github.com/go-openapi/jsonreference/.golangci.yml b/vendor/github.com/go-openapi/jsonreference/.golangci.yml index 013fc1943..22f8d21cc 100644 --- a/vendor/github.com/go-openapi/jsonreference/.golangci.yml +++ b/vendor/github.com/go-openapi/jsonreference/.golangci.yml @@ -1,50 +1,61 @@ linters-settings: govet: check-shadowing: true + golint: + min-confidence: 0 gocyclo: - min-complexity: 30 + min-complexity: 45 maligned: suggest-new: true dupl: - threshold: 100 + threshold: 200 goconst: min-len: 2 - min-occurrences: 4 - paralleltest: - ignore-missing: true + min-occurrences: 3 + linters: enable-all: true disable: - maligned + - unparam - lll + - gochecknoinits - gochecknoglobals + - funlen - godox - gocognit - whitespace - wsl - - funlen - - gochecknoglobals - - gochecknoinits - - scopelint - wrapcheck - - exhaustivestruct - - exhaustive - - nlreturn - testpackage - - gci - - gofumpt - - goerr113 + - nlreturn - gomnd - - tparallel + - exhaustivestruct + - goerr113 + - errorlint - nestif - godot - - errorlint - - varcheck - - interfacer - - deadcode - - golint + - gofumpt + - paralleltest + - tparallel + - thelper - ifshort + - exhaustruct + - varnamelen + - gci + - depguard + - errchkjson + - inamedparam + - nonamedreturns + - musttag + - ireturn + - forcetypeassert + - cyclop + # deprecated linters + - deadcode + - interfacer + - scopelint + - varcheck - structcheck + - golint - nosnakecase - - varnamelen - - exhaustruct diff --git a/vendor/github.com/go-openapi/jsonreference/README.md b/vendor/github.com/go-openapi/jsonreference/README.md index b94753aa5..c7fc2049c 100644 --- a/vendor/github.com/go-openapi/jsonreference/README.md +++ b/vendor/github.com/go-openapi/jsonreference/README.md @@ -1,15 +1,19 @@ -# gojsonreference [![Build Status](https://travis-ci.org/go-openapi/jsonreference.svg?branch=master)](https://travis-ci.org/go-openapi/jsonreference) [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# gojsonreference [![Build Status](https://github.com/go-openapi/jsonreference/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/jsonreference/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/jsonreference/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/jsonreference) + +[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/jsonreference.svg)](https://pkg.go.dev/github.com/go-openapi/jsonreference) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/jsonreference)](https://goreportcard.com/report/github.com/go-openapi/jsonreference) -[![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/jsonreference/master/LICENSE) [![GoDoc](https://godoc.org/github.com/go-openapi/jsonreference?status.svg)](http://godoc.org/github.com/go-openapi/jsonreference) An implementation of JSON Reference - Go language ## Status Feature complete. Stable API ## Dependencies -https://github.com/go-openapi/jsonpointer +* https://github.com/go-openapi/jsonpointer ## References -http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 -http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 +* http://tools.ietf.org/html/draft-ietf-appsawg-json-pointer-07 +* http://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03 diff --git a/vendor/github.com/go-openapi/swag/.gitignore b/vendor/github.com/go-openapi/swag/.gitignore index d69b53acc..c4b1b64f0 100644 --- a/vendor/github.com/go-openapi/swag/.gitignore +++ b/vendor/github.com/go-openapi/swag/.gitignore @@ -2,3 +2,4 @@ secrets.yml vendor Godeps .idea +*.out diff --git a/vendor/github.com/go-openapi/swag/.golangci.yml b/vendor/github.com/go-openapi/swag/.golangci.yml index bf503e400..80e2be004 100644 --- a/vendor/github.com/go-openapi/swag/.golangci.yml +++ b/vendor/github.com/go-openapi/swag/.golangci.yml @@ -4,14 +4,14 @@ linters-settings: golint: min-confidence: 0 gocyclo: - min-complexity: 25 + min-complexity: 45 maligned: suggest-new: true dupl: - threshold: 100 + threshold: 200 goconst: min-len: 3 - min-occurrences: 2 + min-occurrences: 3 linters: enable-all: true @@ -20,35 +20,41 @@ linters: - lll - gochecknoinits - gochecknoglobals - - nlreturn - - testpackage + - funlen + - godox + - gocognit + - whitespace + - wsl - wrapcheck + - testpackage + - nlreturn - gomnd - - exhaustive - exhaustivestruct - goerr113 - - wsl - - whitespace - - gofumpt - - godot + - errorlint - nestif - - godox - - funlen - - gci - - gocognit + - godot + - gofumpt - paralleltest + - tparallel - thelper - ifshort - - gomoddirectives - - cyclop - - forcetypeassert - - ireturn - - tagliatelle - - varnamelen - - goimports - - tenv - - golint - exhaustruct - - nilnil + - varnamelen + - gci + - depguard + - errchkjson + - inamedparam - nonamedreturns + - musttag + - ireturn + - forcetypeassert + - cyclop + # deprecated linters + - deadcode + - interfacer + - scopelint + - varcheck + - structcheck + - golint - nosnakecase diff --git a/vendor/github.com/go-openapi/swag/BENCHMARK.md b/vendor/github.com/go-openapi/swag/BENCHMARK.md new file mode 100644 index 000000000..e7f28ed6b --- /dev/null +++ b/vendor/github.com/go-openapi/swag/BENCHMARK.md @@ -0,0 +1,52 @@ +# Benchmarks + +## Name mangling utilities + +```bash +go test -bench XXX -run XXX -benchtime 30s +``` + +### Benchmarks at b3e7a5386f996177e4808f11acb2aa93a0f660df + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 862623 44101 ns/op 10450 B/op 732 allocs/op +BenchmarkToXXXName/ToVarName-4 853656 40728 ns/op 10468 B/op 734 allocs/op +BenchmarkToXXXName/ToFileName-4 1268312 27813 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToCommandName-4 1276322 27903 ns/op 9785 B/op 617 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 895334 40354 ns/op 10472 B/op 731 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 882441 40678 ns/op 10566 B/op 749 allocs/op +``` + +### Benchmarks after PR #79 + +~ x10 performance improvement and ~ /100 memory allocations. + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz +BenchmarkToXXXName/ToGoName-4 9595830 3991 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-4 9194276 3984 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-4 17002711 2123 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-4 16772926 2111 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-4 9788331 3749 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-4 9188260 3941 ns/op 104 B/op 6 allocs/op +``` + +``` +goos: linux +goarch: amd64 +pkg: github.com/go-openapi/swag +cpu: AMD Ryzen 7 5800X 8-Core Processor +BenchmarkToXXXName/ToGoName-16 18527378 1972 ns/op 42 B/op 5 allocs/op +BenchmarkToXXXName/ToVarName-16 15552692 2093 ns/op 62 B/op 7 allocs/op +BenchmarkToXXXName/ToFileName-16 32161176 1117 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToCommandName-16 32256634 1137 ns/op 147 B/op 7 allocs/op +BenchmarkToXXXName/ToHumanNameLower-16 18599661 1946 ns/op 92 B/op 6 allocs/op +BenchmarkToXXXName/ToHumanNameTitle-16 17581353 2054 ns/op 105 B/op 6 allocs/op +``` diff --git a/vendor/github.com/go-openapi/swag/README.md b/vendor/github.com/go-openapi/swag/README.md index 217f6fa50..a72922299 100644 --- a/vendor/github.com/go-openapi/swag/README.md +++ b/vendor/github.com/go-openapi/swag/README.md @@ -1,7 +1,8 @@ -# Swag [![Build Status](https://travis-ci.org/go-openapi/swag.svg?branch=master)](https://travis-ci.org/go-openapi/swag) [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) [![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) +# Swag [![Build Status](https://github.com/go-openapi/swag/actions/workflows/go-test.yml/badge.svg)](https://github.com/go-openapi/swag/actions?query=workflow%3A"go+test") [![codecov](https://codecov.io/gh/go-openapi/swag/branch/master/graph/badge.svg)](https://codecov.io/gh/go-openapi/swag) +[![Slack Status](https://slackin.goswagger.io/badge.svg)](https://slackin.goswagger.io) [![license](http://img.shields.io/badge/license-Apache%20v2-orange.svg)](https://raw.githubusercontent.com/go-openapi/swag/master/LICENSE) -[![GoDoc](https://godoc.org/github.com/go-openapi/swag?status.svg)](http://godoc.org/github.com/go-openapi/swag) +[![Go Reference](https://pkg.go.dev/badge/github.com/go-openapi/swag.svg)](https://pkg.go.dev/github.com/go-openapi/swag) [![Go Report Card](https://goreportcard.com/badge/github.com/go-openapi/swag)](https://goreportcard.com/report/github.com/go-openapi/swag) Contains a bunch of helper functions for go-openapi and go-swagger projects. @@ -18,4 +19,5 @@ You may also use it standalone for your projects. This repo has only few dependencies outside of the standard library: -* YAML utilities depend on gopkg.in/yaml.v2 +* YAML utilities depend on `gopkg.in/yaml.v3` +* `github.com/mailru/easyjson v0.7.7` diff --git a/vendor/github.com/go-openapi/swag/initialism_index.go b/vendor/github.com/go-openapi/swag/initialism_index.go new file mode 100644 index 000000000..20a359bb6 --- /dev/null +++ b/vendor/github.com/go-openapi/swag/initialism_index.go @@ -0,0 +1,202 @@ +// Copyright 2015 go-swagger maintainers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package swag + +import ( + "sort" + "strings" + "sync" +) + +var ( + // commonInitialisms are common acronyms that are kept as whole uppercased words. + commonInitialisms *indexOfInitialisms + + // initialisms is a slice of sorted initialisms + initialisms []string + + // a copy of initialisms pre-baked as []rune + initialismsRunes [][]rune + initialismsUpperCased [][]rune + + isInitialism func(string) bool + + maxAllocMatches int +) + +func init() { + // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 + configuredInitialisms := map[string]bool{ + "ACL": true, + "API": true, + "ASCII": true, + "CPU": true, + "CSS": true, + "DNS": true, + "EOF": true, + "GUID": true, + "HTML": true, + "HTTPS": true, + "HTTP": true, + "ID": true, + "IP": true, + "IPv4": true, + "IPv6": true, + "JSON": true, + "LHS": true, + "OAI": true, + "QPS": true, + "RAM": true, + "RHS": true, + "RPC": true, + "SLA": true, + "SMTP": true, + "SQL": true, + "SSH": true, + "TCP": true, + "TLS": true, + "TTL": true, + "UDP": true, + "UI": true, + "UID": true, + "UUID": true, + "URI": true, + "URL": true, + "UTF8": true, + "VM": true, + "XML": true, + "XMPP": true, + "XSRF": true, + "XSS": true, + } + + // a thread-safe index of initialisms + commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) + maxAllocMatches = maxAllocHeuristic(initialismsRunes) + + // a test function + isInitialism = commonInitialisms.isInitialism +} + +func asRunes(in []string) [][]rune { + out := make([][]rune, len(in)) + for i, initialism := range in { + out[i] = []rune(initialism) + } + + return out +} + +func asUpperCased(in []string) [][]rune { + out := make([][]rune, len(in)) + + for i, initialism := range in { + out[i] = []rune(upper(trim(initialism))) + } + + return out +} + +func maxAllocHeuristic(in [][]rune) int { + heuristic := make(map[rune]int) + for _, initialism := range in { + heuristic[initialism[0]]++ + } + + var maxAlloc int + for _, val := range heuristic { + if val > maxAlloc { + maxAlloc = val + } + } + + return maxAlloc +} + +// AddInitialisms add additional initialisms +func AddInitialisms(words ...string) { + for _, word := range words { + // commonInitialisms[upper(word)] = true + commonInitialisms.add(upper(word)) + } + // sort again + initialisms = commonInitialisms.sorted() + initialismsRunes = asRunes(initialisms) + initialismsUpperCased = asUpperCased(initialisms) +} + +// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. +// Since go1.9, this may be implemented with sync.Map. +type indexOfInitialisms struct { + sortMutex *sync.Mutex + index *sync.Map +} + +func newIndexOfInitialisms() *indexOfInitialisms { + return &indexOfInitialisms{ + sortMutex: new(sync.Mutex), + index: new(sync.Map), + } +} + +func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { + m.sortMutex.Lock() + defer m.sortMutex.Unlock() + for k, v := range initial { + m.index.Store(k, v) + } + return m +} + +func (m *indexOfInitialisms) isInitialism(key string) bool { + _, ok := m.index.Load(key) + return ok +} + +func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { + m.index.Store(key, true) + return m +} + +func (m *indexOfInitialisms) sorted() (result []string) { + m.sortMutex.Lock() + defer m.sortMutex.Unlock() + m.index.Range(func(key, _ interface{}) bool { + k := key.(string) + result = append(result, k) + return true + }) + sort.Sort(sort.Reverse(byInitialism(result))) + return +} + +type byInitialism []string + +func (s byInitialism) Len() int { + return len(s) +} +func (s byInitialism) Swap(i, j int) { + s[i], s[j] = s[j], s[i] +} +func (s byInitialism) Less(i, j int) bool { + if len(s[i]) != len(s[j]) { + return len(s[i]) < len(s[j]) + } + + return strings.Compare(s[i], s[j]) > 0 +} diff --git a/vendor/github.com/go-openapi/swag/loading.go b/vendor/github.com/go-openapi/swag/loading.go index 00038c377..783442fdd 100644 --- a/vendor/github.com/go-openapi/swag/loading.go +++ b/vendor/github.com/go-openapi/swag/loading.go @@ -21,6 +21,7 @@ import ( "net/http" "net/url" "os" + "path" "path/filepath" "runtime" "strings" @@ -40,43 +41,97 @@ var LoadHTTPBasicAuthPassword = "" var LoadHTTPCustomHeaders = map[string]string{} // LoadFromFileOrHTTP loads the bytes from a file or a remote http server based on the path passed in -func LoadFromFileOrHTTP(path string) ([]byte, error) { - return LoadStrategy(path, os.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(path) +func LoadFromFileOrHTTP(pth string) ([]byte, error) { + return LoadStrategy(pth, os.ReadFile, loadHTTPBytes(LoadHTTPTimeout))(pth) } // LoadFromFileOrHTTPWithTimeout loads the bytes from a file or a remote http server based on the path passed in // timeout arg allows for per request overriding of the request timeout -func LoadFromFileOrHTTPWithTimeout(path string, timeout time.Duration) ([]byte, error) { - return LoadStrategy(path, os.ReadFile, loadHTTPBytes(timeout))(path) +func LoadFromFileOrHTTPWithTimeout(pth string, timeout time.Duration) ([]byte, error) { + return LoadStrategy(pth, os.ReadFile, loadHTTPBytes(timeout))(pth) } -// LoadStrategy returns a loader function for a given path or uri -func LoadStrategy(path string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) { - if strings.HasPrefix(path, "http") { +// LoadStrategy returns a loader function for a given path or URI. +// +// The load strategy returns the remote load for any path starting with `http`. +// So this works for any URI with a scheme `http` or `https`. +// +// The fallback strategy is to call the local loader. +// +// The local loader takes a local file system path (absolute or relative) as argument, +// or alternatively a `file://...` URI, **without host** (see also below for windows). +// +// There are a few liberalities, initially intended to be tolerant regarding the URI syntax, +// especially on windows. +// +// Before the local loader is called, the given path is transformed: +// - percent-encoded characters are unescaped +// - simple paths (e.g. `./folder/file`) are passed as-is +// - on windows, occurrences of `/` are replaced by `\`, so providing a relative path such a `folder/file` works too. +// +// For paths provided as URIs with the "file" scheme, please note that: +// - `file://` is simply stripped. +// This means that the host part of the URI is not parsed at all. +// For example, `file:///folder/file" becomes "/folder/file`, +// but `file://localhost/folder/file` becomes `localhost/folder/file` on unix systems. +// Similarly, `file://./folder/file` yields `./folder/file`. +// - on windows, `file://...` can take a host so as to specify an UNC share location. +// +// Reminder about windows-specifics: +// - `file://host/folder/file` becomes an UNC path like `\\host\folder\file` (no port specification is supported) +// - `file:///c:/folder/file` becomes `C:\folder\file` +// - `file://c:/folder/file` is tolerated (without leading `/`) and becomes `c:\folder\file` +func LoadStrategy(pth string, local, remote func(string) ([]byte, error)) func(string) ([]byte, error) { + if strings.HasPrefix(pth, "http") { return remote } - return func(pth string) ([]byte, error) { - upth, err := pathUnescape(pth) + + return func(p string) ([]byte, error) { + upth, err := url.PathUnescape(p) if err != nil { return nil, err } - if strings.HasPrefix(pth, `file://`) { - if runtime.GOOS == "windows" { - // support for canonical file URIs on windows. - // Zero tolerance here for dodgy URIs. - u, _ := url.Parse(upth) - if u.Host != "" { - // assume UNC name (volume share) - // file://host/share/folder\... ==> \\host\share\path\folder - // NOTE: UNC port not yet supported - upth = strings.Join([]string{`\`, u.Host, u.Path}, `\`) - } else { - // file:///c:/folder/... ==> just remove the leading slash - upth = strings.TrimPrefix(upth, `file:///`) - } - } else { - upth = strings.TrimPrefix(upth, `file://`) + if !strings.HasPrefix(p, `file://`) { + // regular file path provided: just normalize slashes + return local(filepath.FromSlash(upth)) + } + + if runtime.GOOS != "windows" { + // crude processing: this leaves full URIs with a host with a (mostly) unexpected result + upth = strings.TrimPrefix(upth, `file://`) + + return local(filepath.FromSlash(upth)) + } + + // windows-only pre-processing of file://... URIs + + // support for canonical file URIs on windows. + u, err := url.Parse(filepath.ToSlash(upth)) + if err != nil { + return nil, err + } + + if u.Host != "" { + // assume UNC name (volume share) + // NOTE: UNC port not yet supported + + // when the "host" segment is a drive letter: + // file://C:/folder/... => C:\folder + upth = path.Clean(strings.Join([]string{u.Host, u.Path}, `/`)) + if !strings.HasSuffix(u.Host, ":") && u.Host[0] != '.' { + // tolerance: if we have a leading dot, this can't be a host + // file://host/share/folder\... ==> \\host\share\path\folder + upth = "//" + upth + } + } else { + // no host, let's figure out if this is a drive letter + upth = strings.TrimPrefix(upth, `file://`) + first, _, _ := strings.Cut(strings.TrimPrefix(u.Path, "/"), "/") + if strings.HasSuffix(first, ":") { + // drive letter in the first segment: + // file:///c:/folder/... ==> strip the leading slash + upth = strings.TrimPrefix(upth, `/`) } } diff --git a/vendor/github.com/go-openapi/swag/name_lexem.go b/vendor/github.com/go-openapi/swag/name_lexem.go index aa7f6a9bb..8bb64ac32 100644 --- a/vendor/github.com/go-openapi/swag/name_lexem.go +++ b/vendor/github.com/go-openapi/swag/name_lexem.go @@ -14,74 +14,80 @@ package swag -import "unicode" +import ( + "unicode" + "unicode/utf8" +) type ( - nameLexem interface { - GetUnsafeGoName() string - GetOriginal() string - IsInitialism() bool - } + lexemKind uint8 - initialismNameLexem struct { + nameLexem struct { original string matchedInitialism string + kind lexemKind } +) - casualNameLexem struct { - original string - } +const ( + lexemKindCasualName lexemKind = iota + lexemKindInitialismName ) -func newInitialismNameLexem(original, matchedInitialism string) *initialismNameLexem { - return &initialismNameLexem{ +func newInitialismNameLexem(original, matchedInitialism string) nameLexem { + return nameLexem{ + kind: lexemKindInitialismName, original: original, matchedInitialism: matchedInitialism, } } -func newCasualNameLexem(original string) *casualNameLexem { - return &casualNameLexem{ +func newCasualNameLexem(original string) nameLexem { + return nameLexem{ + kind: lexemKindCasualName, original: original, } } -func (l *initialismNameLexem) GetUnsafeGoName() string { - return l.matchedInitialism -} +func (l nameLexem) GetUnsafeGoName() string { + if l.kind == lexemKindInitialismName { + return l.matchedInitialism + } + + var ( + first rune + rest string + ) -func (l *casualNameLexem) GetUnsafeGoName() string { - var first rune - var rest string for i, orig := range l.original { if i == 0 { first = orig continue } + if i > 0 { rest = l.original[i:] break } } + if len(l.original) > 1 { - return string(unicode.ToUpper(first)) + lower(rest) + b := poolOfBuffers.BorrowBuffer(utf8.UTFMax + len(rest)) + defer func() { + poolOfBuffers.RedeemBuffer(b) + }() + b.WriteRune(unicode.ToUpper(first)) + b.WriteString(lower(rest)) + return b.String() } return l.original } -func (l *initialismNameLexem) GetOriginal() string { +func (l nameLexem) GetOriginal() string { return l.original } -func (l *casualNameLexem) GetOriginal() string { - return l.original -} - -func (l *initialismNameLexem) IsInitialism() bool { - return true -} - -func (l *casualNameLexem) IsInitialism() bool { - return false +func (l nameLexem) IsInitialism() bool { + return l.kind == lexemKindInitialismName } diff --git a/vendor/github.com/go-openapi/swag/post_go18.go b/vendor/github.com/go-openapi/swag/post_go18.go deleted file mode 100644 index f5228b82c..000000000 --- a/vendor/github.com/go-openapi/swag/post_go18.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build go1.8 -// +build go1.8 - -package swag - -import "net/url" - -func pathUnescape(path string) (string, error) { - return url.PathUnescape(path) -} diff --git a/vendor/github.com/go-openapi/swag/post_go19.go b/vendor/github.com/go-openapi/swag/post_go19.go deleted file mode 100644 index 7c7da9c08..000000000 --- a/vendor/github.com/go-openapi/swag/post_go19.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build go1.9 -// +build go1.9 - -package swag - -import ( - "sort" - "sync" -) - -// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. -// Since go1.9, this may be implemented with sync.Map. -type indexOfInitialisms struct { - sortMutex *sync.Mutex - index *sync.Map -} - -func newIndexOfInitialisms() *indexOfInitialisms { - return &indexOfInitialisms{ - sortMutex: new(sync.Mutex), - index: new(sync.Map), - } -} - -func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { - m.sortMutex.Lock() - defer m.sortMutex.Unlock() - for k, v := range initial { - m.index.Store(k, v) - } - return m -} - -func (m *indexOfInitialisms) isInitialism(key string) bool { - _, ok := m.index.Load(key) - return ok -} - -func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { - m.index.Store(key, true) - return m -} - -func (m *indexOfInitialisms) sorted() (result []string) { - m.sortMutex.Lock() - defer m.sortMutex.Unlock() - m.index.Range(func(key, value interface{}) bool { - k := key.(string) - result = append(result, k) - return true - }) - sort.Sort(sort.Reverse(byInitialism(result))) - return -} diff --git a/vendor/github.com/go-openapi/swag/pre_go18.go b/vendor/github.com/go-openapi/swag/pre_go18.go deleted file mode 100644 index 2757d9b95..000000000 --- a/vendor/github.com/go-openapi/swag/pre_go18.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !go1.8 -// +build !go1.8 - -package swag - -import "net/url" - -func pathUnescape(path string) (string, error) { - return url.QueryUnescape(path) -} diff --git a/vendor/github.com/go-openapi/swag/pre_go19.go b/vendor/github.com/go-openapi/swag/pre_go19.go deleted file mode 100644 index 0565db377..000000000 --- a/vendor/github.com/go-openapi/swag/pre_go19.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright 2015 go-swagger maintainers -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build !go1.9 -// +build !go1.9 - -package swag - -import ( - "sort" - "sync" -) - -// indexOfInitialisms is a thread-safe implementation of the sorted index of initialisms. -// Before go1.9, this may be implemented with a mutex on the map. -type indexOfInitialisms struct { - getMutex *sync.Mutex - index map[string]bool -} - -func newIndexOfInitialisms() *indexOfInitialisms { - return &indexOfInitialisms{ - getMutex: new(sync.Mutex), - index: make(map[string]bool, 50), - } -} - -func (m *indexOfInitialisms) load(initial map[string]bool) *indexOfInitialisms { - m.getMutex.Lock() - defer m.getMutex.Unlock() - for k, v := range initial { - m.index[k] = v - } - return m -} - -func (m *indexOfInitialisms) isInitialism(key string) bool { - m.getMutex.Lock() - defer m.getMutex.Unlock() - _, ok := m.index[key] - return ok -} - -func (m *indexOfInitialisms) add(key string) *indexOfInitialisms { - m.getMutex.Lock() - defer m.getMutex.Unlock() - m.index[key] = true - return m -} - -func (m *indexOfInitialisms) sorted() (result []string) { - m.getMutex.Lock() - defer m.getMutex.Unlock() - for k := range m.index { - result = append(result, k) - } - sort.Sort(sort.Reverse(byInitialism(result))) - return -} diff --git a/vendor/github.com/go-openapi/swag/split.go b/vendor/github.com/go-openapi/swag/split.go index a1825fb7d..274727a86 100644 --- a/vendor/github.com/go-openapi/swag/split.go +++ b/vendor/github.com/go-openapi/swag/split.go @@ -15,124 +15,269 @@ package swag import ( + "bytes" + "sync" "unicode" + "unicode/utf8" ) -var nameReplaceTable = map[rune]string{ - '@': "At ", - '&': "And ", - '|': "Pipe ", - '$': "Dollar ", - '!': "Bang ", - '-': "", - '_': "", -} - type ( splitter struct { - postSplitInitialismCheck bool initialisms []string + initialismsRunes [][]rune + initialismsUpperCased [][]rune // initialisms cached in their trimmed, upper-cased version + postSplitInitialismCheck bool + } + + splitterOption func(*splitter) + + initialismMatch struct { + body []rune + start, end int + complete bool + } + initialismMatches []initialismMatch +) + +type ( + // memory pools of temporary objects. + // + // These are used to recycle temporarily allocated objects + // and relieve the GC from undue pressure. + + matchesPool struct { + *sync.Pool } - splitterOption func(*splitter) *splitter + buffersPool struct { + *sync.Pool + } + + lexemsPool struct { + *sync.Pool + } + + splittersPool struct { + *sync.Pool + } ) -// split calls the splitter; splitter provides more control and post options +var ( + // poolOfMatches holds temporary slices for recycling during the initialism match process + poolOfMatches = matchesPool{ + Pool: &sync.Pool{ + New: func() any { + s := make(initialismMatches, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfBuffers = buffersPool{ + Pool: &sync.Pool{ + New: func() any { + return new(bytes.Buffer) + }, + }, + } + + poolOfLexems = lexemsPool{ + Pool: &sync.Pool{ + New: func() any { + s := make([]nameLexem, 0, maxAllocMatches) + + return &s + }, + }, + } + + poolOfSplitters = splittersPool{ + Pool: &sync.Pool{ + New: func() any { + s := newSplitter() + + return &s + }, + }, + } +) + +// nameReplaceTable finds a word representation for special characters. +func nameReplaceTable(r rune) (string, bool) { + switch r { + case '@': + return "At ", true + case '&': + return "And ", true + case '|': + return "Pipe ", true + case '$': + return "Dollar ", true + case '!': + return "Bang ", true + case '-': + return "", true + case '_': + return "", true + default: + return "", false + } +} + +// split calls the splitter. +// +// Use newSplitter for more control and options func split(str string) []string { - lexems := newSplitter().split(str) - result := make([]string, 0, len(lexems)) + s := poolOfSplitters.BorrowSplitter() + lexems := s.split(str) + result := make([]string, 0, len(*lexems)) - for _, lexem := range lexems { + for _, lexem := range *lexems { result = append(result, lexem.GetOriginal()) } + poolOfLexems.RedeemLexems(lexems) + poolOfSplitters.RedeemSplitter(s) return result } -func (s *splitter) split(str string) []nameLexem { - return s.toNameLexems(str) -} - -func newSplitter(options ...splitterOption) *splitter { - splitter := &splitter{ +func newSplitter(options ...splitterOption) splitter { + s := splitter{ postSplitInitialismCheck: false, initialisms: initialisms, + initialismsRunes: initialismsRunes, + initialismsUpperCased: initialismsUpperCased, } for _, option := range options { - splitter = option(splitter) + option(&s) } - return splitter + return s } // withPostSplitInitialismCheck allows to catch initialisms after main split process -func withPostSplitInitialismCheck(s *splitter) *splitter { +func withPostSplitInitialismCheck(s *splitter) { s.postSplitInitialismCheck = true +} + +func (p matchesPool) BorrowMatches() *initialismMatches { + s := p.Get().(*initialismMatches) + *s = (*s)[:0] // reset slice, keep allocated capacity + return s } -type ( - initialismMatch struct { - start, end int - body []rune - complete bool +func (p buffersPool) BorrowBuffer(size int) *bytes.Buffer { + s := p.Get().(*bytes.Buffer) + s.Reset() + + if s.Cap() < size { + s.Grow(size) } - initialismMatches []*initialismMatch -) -func (s *splitter) toNameLexems(name string) []nameLexem { + return s +} + +func (p lexemsPool) BorrowLexems() *[]nameLexem { + s := p.Get().(*[]nameLexem) + *s = (*s)[:0] // reset slice, keep allocated capacity + + return s +} + +func (p splittersPool) BorrowSplitter(options ...splitterOption) *splitter { + s := p.Get().(*splitter) + s.postSplitInitialismCheck = false // reset options + for _, apply := range options { + apply(s) + } + + return s +} + +func (p matchesPool) RedeemMatches(s *initialismMatches) { + p.Put(s) +} + +func (p buffersPool) RedeemBuffer(s *bytes.Buffer) { + p.Put(s) +} + +func (p lexemsPool) RedeemLexems(s *[]nameLexem) { + p.Put(s) +} + +func (p splittersPool) RedeemSplitter(s *splitter) { + p.Put(s) +} + +func (m initialismMatch) isZero() bool { + return m.start == 0 && m.end == 0 +} + +func (s splitter) split(name string) *[]nameLexem { nameRunes := []rune(name) matches := s.gatherInitialismMatches(nameRunes) + if matches == nil { + return poolOfLexems.BorrowLexems() + } + return s.mapMatchesToNameLexems(nameRunes, matches) } -func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { - matches := make(initialismMatches, 0) +func (s splitter) gatherInitialismMatches(nameRunes []rune) *initialismMatches { + var matches *initialismMatches for currentRunePosition, currentRune := range nameRunes { - newMatches := make(initialismMatches, 0, len(matches)) + // recycle these allocations as we loop over runes + // with such recycling, only 2 slices should be allocated per call + // instead of o(n). + newMatches := poolOfMatches.BorrowMatches() // check current initialism matches - for _, match := range matches { - if keepCompleteMatch := match.complete; keepCompleteMatch { - newMatches = append(newMatches, match) - continue - } + if matches != nil { // skip first iteration + for _, match := range *matches { + if keepCompleteMatch := match.complete; keepCompleteMatch { + *newMatches = append(*newMatches, match) + continue + } - // drop failed match - currentMatchRune := match.body[currentRunePosition-match.start] - if !s.initialismRuneEqual(currentMatchRune, currentRune) { - continue - } + // drop failed match + currentMatchRune := match.body[currentRunePosition-match.start] + if currentMatchRune != currentRune { + continue + } - // try to complete ongoing match - if currentRunePosition-match.start == len(match.body)-1 { - // we are close; the next step is to check the symbol ahead - // if it is a small letter, then it is not the end of match - // but beginning of the next word - - if currentRunePosition < len(nameRunes)-1 { - nextRune := nameRunes[currentRunePosition+1] - if newWord := unicode.IsLower(nextRune); newWord { - // oh ok, it was the start of a new word - continue + // try to complete ongoing match + if currentRunePosition-match.start == len(match.body)-1 { + // we are close; the next step is to check the symbol ahead + // if it is a small letter, then it is not the end of match + // but beginning of the next word + + if currentRunePosition < len(nameRunes)-1 { + nextRune := nameRunes[currentRunePosition+1] + if newWord := unicode.IsLower(nextRune); newWord { + // oh ok, it was the start of a new word + continue + } } + + match.complete = true + match.end = currentRunePosition } - match.complete = true - match.end = currentRunePosition + *newMatches = append(*newMatches, match) } - - newMatches = append(newMatches, match) } // check for new initialism matches - for _, initialism := range s.initialisms { - initialismRunes := []rune(initialism) - if s.initialismRuneEqual(initialismRunes[0], currentRune) { - newMatches = append(newMatches, &initialismMatch{ + for i := range s.initialisms { + initialismRunes := s.initialismsRunes[i] + if initialismRunes[0] == currentRune { + *newMatches = append(*newMatches, initialismMatch{ start: currentRunePosition, body: initialismRunes, complete: false, @@ -140,24 +285,28 @@ func (s *splitter) gatherInitialismMatches(nameRunes []rune) initialismMatches { } } + if matches != nil { + poolOfMatches.RedeemMatches(matches) + } matches = newMatches } + // up to the caller to redeem this last slice return matches } -func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMatches) []nameLexem { - nameLexems := make([]nameLexem, 0) +func (s splitter) mapMatchesToNameLexems(nameRunes []rune, matches *initialismMatches) *[]nameLexem { + nameLexems := poolOfLexems.BorrowLexems() - var lastAcceptedMatch *initialismMatch - for _, match := range matches { + var lastAcceptedMatch initialismMatch + for _, match := range *matches { if !match.complete { continue } - if firstMatch := lastAcceptedMatch == nil; firstMatch { - nameLexems = append(nameLexems, s.breakCasualString(nameRunes[:match.start])...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + if firstMatch := lastAcceptedMatch.isZero(); firstMatch { + s.appendBrokenDownCasualString(nameLexems, nameRunes[:match.start]) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match @@ -169,63 +318,66 @@ func (s *splitter) mapMatchesToNameLexems(nameRunes []rune, matches initialismMa } middle := nameRunes[lastAcceptedMatch.end+1 : match.start] - nameLexems = append(nameLexems, s.breakCasualString(middle)...) - nameLexems = append(nameLexems, s.breakInitialism(string(match.body))) + s.appendBrokenDownCasualString(nameLexems, middle) + *nameLexems = append(*nameLexems, s.breakInitialism(string(match.body))) lastAcceptedMatch = match } // we have not found any accepted matches - if lastAcceptedMatch == nil { - return s.breakCasualString(nameRunes) - } - - if lastAcceptedMatch.end+1 != len(nameRunes) { + if lastAcceptedMatch.isZero() { + *nameLexems = (*nameLexems)[:0] + s.appendBrokenDownCasualString(nameLexems, nameRunes) + } else if lastAcceptedMatch.end+1 != len(nameRunes) { rest := nameRunes[lastAcceptedMatch.end+1:] - nameLexems = append(nameLexems, s.breakCasualString(rest)...) + s.appendBrokenDownCasualString(nameLexems, rest) } - return nameLexems -} + poolOfMatches.RedeemMatches(matches) -func (s *splitter) initialismRuneEqual(a, b rune) bool { - return a == b + return nameLexems } -func (s *splitter) breakInitialism(original string) nameLexem { +func (s splitter) breakInitialism(original string) nameLexem { return newInitialismNameLexem(original, original) } -func (s *splitter) breakCasualString(str []rune) []nameLexem { - segments := make([]nameLexem, 0) - currentSegment := "" +func (s splitter) appendBrokenDownCasualString(segments *[]nameLexem, str []rune) { + currentSegment := poolOfBuffers.BorrowBuffer(len(str)) // unlike strings.Builder, bytes.Buffer initial storage can reused + defer func() { + poolOfBuffers.RedeemBuffer(currentSegment) + }() addCasualNameLexem := func(original string) { - segments = append(segments, newCasualNameLexem(original)) + *segments = append(*segments, newCasualNameLexem(original)) } addInitialismNameLexem := func(original, match string) { - segments = append(segments, newInitialismNameLexem(original, match)) + *segments = append(*segments, newInitialismNameLexem(original, match)) } - addNameLexem := func(original string) { - if s.postSplitInitialismCheck { - for _, initialism := range s.initialisms { - if upper(initialism) == upper(original) { - addInitialismNameLexem(original, initialism) + var addNameLexem func(string) + if s.postSplitInitialismCheck { + addNameLexem = func(original string) { + for i := range s.initialisms { + if isEqualFoldIgnoreSpace(s.initialismsUpperCased[i], original) { + addInitialismNameLexem(original, s.initialisms[i]) + return } } - } - addCasualNameLexem(original) + addCasualNameLexem(original) + } + } else { + addNameLexem = addCasualNameLexem } - for _, rn := range string(str) { - if replace, found := nameReplaceTable[rn]; found { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + for _, rn := range str { + if replace, found := nameReplaceTable(rn); found { + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } if replace != "" { @@ -236,27 +388,121 @@ func (s *splitter) breakCasualString(str []rune) []nameLexem { } if !unicode.In(rn, unicode.L, unicode.M, unicode.N, unicode.Pc) { - if currentSegment != "" { - addNameLexem(currentSegment) - currentSegment = "" + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) + currentSegment.Reset() } continue } if unicode.IsUpper(rn) { - if currentSegment != "" { - addNameLexem(currentSegment) + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } - currentSegment = "" + currentSegment.Reset() } - currentSegment += string(rn) + currentSegment.WriteRune(rn) + } + + if currentSegment.Len() > 0 { + addNameLexem(currentSegment.String()) } +} + +// isEqualFoldIgnoreSpace is the same as strings.EqualFold, but +// it ignores leading and trailing blank spaces in the compared +// string. +// +// base is assumed to be composed of upper-cased runes, and be already +// trimmed. +// +// This code is heavily inspired from strings.EqualFold. +func isEqualFoldIgnoreSpace(base []rune, str string) bool { + var i, baseIndex int + // equivalent to b := []byte(str), but without data copy + b := hackStringBytes(str) + + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + break + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + break + } + i += size + } + + if i >= len(b) { + return len(base) == 0 + } + + for _, baseRune := range base { + if i >= len(b) { + break + } + + if c := b[i]; c < utf8.RuneSelf { + // single byte rune case (ASCII) + if baseRune >= utf8.RuneSelf { + return false + } + + baseChar := byte(baseRune) + if c != baseChar && + !('a' <= c && c <= 'z' && c-'a'+'A' == baseChar) { + return false + } + + baseIndex++ + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if unicode.ToUpper(r) != baseRune { + return false + } + baseIndex++ + i += size + } + + if baseIndex != len(base) { + return false + } + + // all passed: now we should only have blanks + for i < len(b) { + if c := b[i]; c < utf8.RuneSelf { + // fast path for ASCII + if c != ' ' && c != '\t' { + return false + } + i++ + + continue + } + + // unicode case + r, size := utf8.DecodeRune(b[i:]) + if !unicode.IsSpace(r) { + return false + } - if currentSegment != "" { - addNameLexem(currentSegment) + i += size } - return segments + return true } diff --git a/vendor/github.com/go-openapi/swag/string_bytes.go b/vendor/github.com/go-openapi/swag/string_bytes.go new file mode 100644 index 000000000..90745d5ca --- /dev/null +++ b/vendor/github.com/go-openapi/swag/string_bytes.go @@ -0,0 +1,8 @@ +package swag + +import "unsafe" + +// hackStringBytes returns the (unsafe) underlying bytes slice of a string. +func hackStringBytes(str string) []byte { + return unsafe.Slice(unsafe.StringData(str), len(str)) +} diff --git a/vendor/github.com/go-openapi/swag/util.go b/vendor/github.com/go-openapi/swag/util.go index f78ab684a..5051401c4 100644 --- a/vendor/github.com/go-openapi/swag/util.go +++ b/vendor/github.com/go-openapi/swag/util.go @@ -18,76 +18,25 @@ import ( "reflect" "strings" "unicode" + "unicode/utf8" ) -// commonInitialisms are common acronyms that are kept as whole uppercased words. -var commonInitialisms *indexOfInitialisms - -// initialisms is a slice of sorted initialisms -var initialisms []string - -var isInitialism func(string) bool - // GoNamePrefixFunc sets an optional rule to prefix go names // which do not start with a letter. // +// The prefix function is assumed to return a string that starts with an upper case letter. +// // e.g. to help convert "123" into "{prefix}123" // // The default is to prefix with "X" var GoNamePrefixFunc func(string) string -func init() { - // Taken from https://github.com/golang/lint/blob/3390df4df2787994aea98de825b964ac7944b817/lint.go#L732-L769 - var configuredInitialisms = map[string]bool{ - "ACL": true, - "API": true, - "ASCII": true, - "CPU": true, - "CSS": true, - "DNS": true, - "EOF": true, - "GUID": true, - "HTML": true, - "HTTPS": true, - "HTTP": true, - "ID": true, - "IP": true, - "IPv4": true, - "IPv6": true, - "JSON": true, - "LHS": true, - "OAI": true, - "QPS": true, - "RAM": true, - "RHS": true, - "RPC": true, - "SLA": true, - "SMTP": true, - "SQL": true, - "SSH": true, - "TCP": true, - "TLS": true, - "TTL": true, - "UDP": true, - "UI": true, - "UID": true, - "UUID": true, - "URI": true, - "URL": true, - "UTF8": true, - "VM": true, - "XML": true, - "XMPP": true, - "XSRF": true, - "XSS": true, +func prefixFunc(name, in string) string { + if GoNamePrefixFunc == nil { + return "X" + in } - // a thread-safe index of initialisms - commonInitialisms = newIndexOfInitialisms().load(configuredInitialisms) - initialisms = commonInitialisms.sorted() - - // a test function - isInitialism = commonInitialisms.isInitialism + return GoNamePrefixFunc(name) + in } const ( @@ -156,25 +105,9 @@ func SplitByFormat(data, format string) []string { return result } -type byInitialism []string - -func (s byInitialism) Len() int { - return len(s) -} -func (s byInitialism) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} -func (s byInitialism) Less(i, j int) bool { - if len(s[i]) != len(s[j]) { - return len(s[i]) < len(s[j]) - } - - return strings.Compare(s[i], s[j]) > 0 -} - // Removes leading whitespaces func trim(str string) string { - return strings.Trim(str, " ") + return strings.TrimSpace(str) } // Shortcut to strings.ToUpper() @@ -188,15 +121,20 @@ func lower(str string) string { } // Camelize an uppercased word -func Camelize(word string) (camelized string) { +func Camelize(word string) string { + camelized := poolOfBuffers.BorrowBuffer(len(word)) + defer func() { + poolOfBuffers.RedeemBuffer(camelized) + }() + for pos, ru := range []rune(word) { if pos > 0 { - camelized += string(unicode.ToLower(ru)) + camelized.WriteRune(unicode.ToLower(ru)) } else { - camelized += string(unicode.ToUpper(ru)) + camelized.WriteRune(unicode.ToUpper(ru)) } } - return + return camelized.String() } // ToFileName lowercases and underscores a go type name @@ -224,33 +162,40 @@ func ToCommandName(name string) string { // ToHumanNameLower represents a code name as a human series of words func ToHumanNameLower(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) - out := make([]string, 0, len(in)) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) + out := make([]string, 0, len(*in)) - for _, w := range in { + for _, w := range *in { if !w.IsInitialism() { out = append(out, lower(w.GetOriginal())) } else { - out = append(out, w.GetOriginal()) + out = append(out, trim(w.GetOriginal())) } } + poolOfLexems.RedeemLexems(in) return strings.Join(out, " ") } // ToHumanNameTitle represents a code name as a human series of words with the first letters titleized func ToHumanNameTitle(name string) string { - in := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + in := s.split(name) + poolOfSplitters.RedeemSplitter(s) - out := make([]string, 0, len(in)) - for _, w := range in { - original := w.GetOriginal() + out := make([]string, 0, len(*in)) + for _, w := range *in { + original := trim(w.GetOriginal()) if !w.IsInitialism() { out = append(out, Camelize(original)) } else { out = append(out, original) } } + poolOfLexems.RedeemLexems(in) + return strings.Join(out, " ") } @@ -264,7 +209,7 @@ func ToJSONName(name string) string { out = append(out, lower(w)) continue } - out = append(out, Camelize(w)) + out = append(out, Camelize(trim(w))) } return strings.Join(out, "") } @@ -283,35 +228,70 @@ func ToVarName(name string) string { // ToGoName translates a swagger name which can be underscored or camel cased to a name that golint likes func ToGoName(name string) string { - lexems := newSplitter(withPostSplitInitialismCheck).split(name) + s := poolOfSplitters.BorrowSplitter(withPostSplitInitialismCheck) + lexems := s.split(name) + poolOfSplitters.RedeemSplitter(s) + defer func() { + poolOfLexems.RedeemLexems(lexems) + }() + lexemes := *lexems + + if len(lexemes) == 0 { + return "" + } + + result := poolOfBuffers.BorrowBuffer(len(name)) + defer func() { + poolOfBuffers.RedeemBuffer(result) + }() - result := "" - for _, lexem := range lexems { + // check if not starting with a letter, upper case + firstPart := lexemes[0].GetUnsafeGoName() + if lexemes[0].IsInitialism() { + firstPart = upper(firstPart) + } + + if c := firstPart[0]; c < utf8.RuneSelf { + // ASCII + switch { + case 'A' <= c && c <= 'Z': + result.WriteString(firstPart) + case 'a' <= c && c <= 'z': + result.WriteByte(c - 'a' + 'A') + result.WriteString(firstPart[1:]) + default: + result.WriteString(prefixFunc(name, firstPart)) + // NOTE: no longer check if prefixFunc returns a string that starts with uppercase: + // assume this is always the case + } + } else { + // unicode + firstRune, _ := utf8.DecodeRuneInString(firstPart) + switch { + case !unicode.IsLetter(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + case !unicode.IsUpper(firstRune): + result.WriteString(prefixFunc(name, firstPart)) + /* + result.WriteRune(unicode.ToUpper(firstRune)) + result.WriteString(firstPart[offset:]) + */ + default: + result.WriteString(firstPart) + } + } + + for _, lexem := range lexemes[1:] { goName := lexem.GetUnsafeGoName() // to support old behavior if lexem.IsInitialism() { goName = upper(goName) } - result += goName + result.WriteString(goName) } - if len(result) > 0 { - // Only prefix with X when the first character isn't an ascii letter - first := []rune(result)[0] - if !unicode.IsLetter(first) || (first > unicode.MaxASCII && !unicode.IsUpper(first)) { - if GoNamePrefixFunc == nil { - return "X" + result - } - result = GoNamePrefixFunc(name) + result - } - first = []rune(result)[0] - if unicode.IsLetter(first) && !unicode.IsUpper(first) { - result = string(append([]rune{unicode.ToUpper(first)}, []rune(result)[1:]...)) - } - } - - return result + return result.String() } // ContainsStrings searches a slice of strings for a case-sensitive match @@ -341,13 +321,22 @@ type zeroable interface { // IsZero returns true when the value passed into the function is a zero value. // This allows for safer checking of interface values. func IsZero(data interface{}) bool { + v := reflect.ValueOf(data) + // check for nil data + switch v.Kind() { //nolint:exhaustive + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + if v.IsNil() { + return true + } + } + // check for things that have an IsZero method instead if vv, ok := data.(zeroable); ok { return vv.IsZero() } + // continue with slightly more complex reflection - v := reflect.ValueOf(data) - switch v.Kind() { + switch v.Kind() { //nolint:exhaustive case reflect.String: return v.Len() == 0 case reflect.Bool: @@ -358,24 +347,13 @@ func IsZero(data interface{}) bool { return v.Uint() == 0 case reflect.Float32, reflect.Float64: return v.Float() == 0 - case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: - return v.IsNil() case reflect.Struct, reflect.Array: return reflect.DeepEqual(data, reflect.Zero(v.Type()).Interface()) case reflect.Invalid: return true + default: + return false } - return false -} - -// AddInitialisms add additional initialisms -func AddInitialisms(words ...string) { - for _, word := range words { - // commonInitialisms[upper(word)] = true - commonInitialisms.add(upper(word)) - } - // sort again - initialisms = commonInitialisms.sorted() } // CommandLineOptionsGroup represents a group of user-defined command line options diff --git a/vendor/github.com/go-openapi/swag/yaml.go b/vendor/github.com/go-openapi/swag/yaml.go index f09ee609f..f59e02593 100644 --- a/vendor/github.com/go-openapi/swag/yaml.go +++ b/vendor/github.com/go-openapi/swag/yaml.go @@ -16,8 +16,11 @@ package swag import ( "encoding/json" + "errors" "fmt" "path/filepath" + "reflect" + "sort" "strconv" "github.com/mailru/easyjson/jlexer" @@ -48,7 +51,7 @@ func BytesToYAMLDoc(data []byte) (interface{}, error) { return nil, err } if document.Kind != yaml.DocumentNode || len(document.Content) != 1 || document.Content[0].Kind != yaml.MappingNode { - return nil, fmt.Errorf("only YAML documents that are objects are supported") + return nil, errors.New("only YAML documents that are objects are supported") } return &document, nil } @@ -147,7 +150,7 @@ func yamlScalar(node *yaml.Node) (interface{}, error) { case yamlTimestamp: return node.Value, nil case yamlNull: - return nil, nil + return nil, nil //nolint:nilnil default: return nil, fmt.Errorf("YAML tag %q is not supported", node.LongTag()) } @@ -245,7 +248,27 @@ func (s JSONMapSlice) MarshalYAML() (interface{}, error) { return yaml.Marshal(&n) } +func isNil(input interface{}) bool { + if input == nil { + return true + } + kind := reflect.TypeOf(input).Kind() + switch kind { //nolint:exhaustive + case reflect.Ptr, reflect.Map, reflect.Slice, reflect.Chan: + return reflect.ValueOf(input).IsNil() + default: + return false + } +} + func json2yaml(item interface{}) (*yaml.Node, error) { + if isNil(item) { + return &yaml.Node{ + Kind: yaml.ScalarNode, + Value: "null", + }, nil + } + switch val := item.(type) { case JSONMapSlice: var n yaml.Node @@ -265,7 +288,14 @@ func json2yaml(item interface{}) (*yaml.Node, error) { case map[string]interface{}: var n yaml.Node n.Kind = yaml.MappingNode - for k, v := range val { + keys := make([]string, 0, len(val)) + for k := range val { + keys = append(keys, k) + } + sort.Strings(keys) + + for _, k := range keys { + v := val[k] childNode, err := json2yaml(v) if err != nil { return nil, err @@ -318,8 +348,9 @@ func json2yaml(item interface{}) (*yaml.Node, error) { Tag: yamlBoolScalar, Value: strconv.FormatBool(val), }, nil + default: + return nil, fmt.Errorf("unhandled type: %T", val) } - return nil, nil } // JSONMapItem represents the value of a key in a JSON object held by JSONMapSlice diff --git a/vendor/github.com/jmespath/go-jmespath/.gitignore b/vendor/github.com/jmespath/go-jmespath/.gitignore deleted file mode 100644 index 5091fb073..000000000 --- a/vendor/github.com/jmespath/go-jmespath/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/jpgo -jmespath-fuzz.zip -cpu.out -go-jmespath.test diff --git a/vendor/github.com/jmespath/go-jmespath/.travis.yml b/vendor/github.com/jmespath/go-jmespath/.travis.yml deleted file mode 100644 index c56f37c0c..000000000 --- a/vendor/github.com/jmespath/go-jmespath/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go - -sudo: false - -go: - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - 1.15.x - - tip - -allow_failures: - - go: tip - -script: make build - -matrix: - include: - - language: go - go: 1.15.x - script: make test diff --git a/vendor/github.com/jmespath/go-jmespath/Makefile b/vendor/github.com/jmespath/go-jmespath/Makefile deleted file mode 100644 index fb38ec276..000000000 --- a/vendor/github.com/jmespath/go-jmespath/Makefile +++ /dev/null @@ -1,51 +0,0 @@ - -CMD = jpgo - -SRC_PKGS=./ ./cmd/... ./fuzz/... - -help: - @echo "Please use \`make ' where is one of" - @echo " test to run all the tests" - @echo " build to build the library and jp executable" - @echo " generate to run codegen" - - -generate: - go generate ${SRC_PKGS} - -build: - rm -f $(CMD) - go build ${SRC_PKGS} - rm -f cmd/$(CMD)/$(CMD) && cd cmd/$(CMD)/ && go build ./... - mv cmd/$(CMD)/$(CMD) . - -test: test-internal-testify - echo "making tests ${SRC_PKGS}" - go test -v ${SRC_PKGS} - -check: - go vet ${SRC_PKGS} - @echo "golint ${SRC_PKGS}" - @lint=`golint ${SRC_PKGS}`; \ - lint=`echo "$$lint" | grep -v "astnodetype_string.go" | grep -v "toktype_string.go"`; \ - echo "$$lint"; \ - if [ "$$lint" != "" ]; then exit 1; fi - -htmlc: - go test -coverprofile="/tmp/jpcov" && go tool cover -html="/tmp/jpcov" && unlink /tmp/jpcov - -buildfuzz: - go-fuzz-build github.com/jmespath/go-jmespath/fuzz - -fuzz: buildfuzz - go-fuzz -bin=./jmespath-fuzz.zip -workdir=fuzz/testdata - -bench: - go test -bench . -cpuprofile cpu.out - -pprof-cpu: - go tool pprof ./go-jmespath.test ./cpu.out - -test-internal-testify: - cd internal/testify && go test ./... - diff --git a/vendor/github.com/jmespath/go-jmespath/README.md b/vendor/github.com/jmespath/go-jmespath/README.md deleted file mode 100644 index 110ad7999..000000000 --- a/vendor/github.com/jmespath/go-jmespath/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# go-jmespath - A JMESPath implementation in Go - -[![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) - - - -go-jmespath is a GO implementation of JMESPath, -which is a query language for JSON. It will take a JSON -document and transform it into another JSON document -through a JMESPath expression. - -Using go-jmespath is really easy. There's a single function -you use, `jmespath.search`: - - -```go -> import "github.com/jmespath/go-jmespath" -> -> var jsondata = []byte(`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.Search("foo.bar.baz[2]", data) -result = 2 -``` - -In the example we gave the ``search`` function input data of -`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}` as well as the JMESPath -expression `foo.bar.baz[2]`, and the `search` function evaluated -the expression against the input data to produce the result ``2``. - -The JMESPath language can do a lot more than select an element -from a list. Here are a few more examples: - -```go -> var jsondata = []byte(`{"foo": {"bar": {"baz": [0, 1, 2, 3, 4]}}}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.search("foo.bar", data) -result = { "baz": [ 0, 1, 2, 3, 4 ] } - - -> var jsondata = []byte(`{"foo": [{"first": "a", "last": "b"}, - {"first": "c", "last": "d"}]}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.search({"foo[*].first", data) -result [ 'a', 'c' ] - - -> var jsondata = []byte(`{"foo": [{"age": 20}, {"age": 25}, - {"age": 30}, {"age": 35}, - {"age": 40}]}`) // your data -> var data interface{} -> err := json.Unmarshal(jsondata, &data) -> result, err := jmespath.search("foo[?age > `30`]") -result = [ { age: 35 }, { age: 40 } ] -``` - -You can also pre-compile your query. This is usefull if -you are going to run multiple searches with it: - -```go - > var jsondata = []byte(`{"foo": "bar"}`) - > var data interface{} - > err := json.Unmarshal(jsondata, &data) - > precompiled, err := Compile("foo") - > if err != nil{ - > // ... handle the error - > } - > result, err := precompiled.Search(data) - result = "bar" -``` - -## More Resources - -The example above only show a small amount of what -a JMESPath expression can do. If you want to take a -tour of the language, the *best* place to go is the -[JMESPath Tutorial](http://jmespath.org/tutorial.html). - -One of the best things about JMESPath is that it is -implemented in many different programming languages including -python, ruby, php, lua, etc. To see a complete list of libraries, -check out the [JMESPath libraries page](http://jmespath.org/libraries.html). - -And finally, the full JMESPath specification can be found -on the [JMESPath site](http://jmespath.org/specification.html). diff --git a/vendor/github.com/jmespath/go-jmespath/api.go b/vendor/github.com/jmespath/go-jmespath/api.go deleted file mode 100644 index 010efe9bf..000000000 --- a/vendor/github.com/jmespath/go-jmespath/api.go +++ /dev/null @@ -1,49 +0,0 @@ -package jmespath - -import "strconv" - -// JMESPath is the representation of a compiled JMES path query. A JMESPath is -// safe for concurrent use by multiple goroutines. -type JMESPath struct { - ast ASTNode - intr *treeInterpreter -} - -// Compile parses a JMESPath expression and returns, if successful, a JMESPath -// object that can be used to match against data. -func Compile(expression string) (*JMESPath, error) { - parser := NewParser() - ast, err := parser.Parse(expression) - if err != nil { - return nil, err - } - jmespath := &JMESPath{ast: ast, intr: newInterpreter()} - return jmespath, nil -} - -// MustCompile is like Compile but panics if the expression cannot be parsed. -// It simplifies safe initialization of global variables holding compiled -// JMESPaths. -func MustCompile(expression string) *JMESPath { - jmespath, err := Compile(expression) - if err != nil { - panic(`jmespath: Compile(` + strconv.Quote(expression) + `): ` + err.Error()) - } - return jmespath -} - -// Search evaluates a JMESPath expression against input data and returns the result. -func (jp *JMESPath) Search(data interface{}) (interface{}, error) { - return jp.intr.Execute(jp.ast, data) -} - -// Search evaluates a JMESPath expression against input data and returns the result. -func Search(expression string, data interface{}) (interface{}, error) { - intr := newInterpreter() - parser := NewParser() - ast, err := parser.Parse(expression) - if err != nil { - return nil, err - } - return intr.Execute(ast, data) -} diff --git a/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go b/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go deleted file mode 100644 index 1cd2d239c..000000000 --- a/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// generated by stringer -type astNodeType; DO NOT EDIT - -package jmespath - -import "fmt" - -const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" - -var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} - -func (i astNodeType) String() string { - if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { - return fmt.Sprintf("astNodeType(%d)", i) - } - return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] -} diff --git a/vendor/github.com/jmespath/go-jmespath/functions.go b/vendor/github.com/jmespath/go-jmespath/functions.go deleted file mode 100644 index 9b7cd89b4..000000000 --- a/vendor/github.com/jmespath/go-jmespath/functions.go +++ /dev/null @@ -1,842 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "reflect" - "sort" - "strconv" - "strings" - "unicode/utf8" -) - -type jpFunction func(arguments []interface{}) (interface{}, error) - -type jpType string - -const ( - jpUnknown jpType = "unknown" - jpNumber jpType = "number" - jpString jpType = "string" - jpArray jpType = "array" - jpObject jpType = "object" - jpArrayNumber jpType = "array[number]" - jpArrayString jpType = "array[string]" - jpExpref jpType = "expref" - jpAny jpType = "any" -) - -type functionEntry struct { - name string - arguments []argSpec - handler jpFunction - hasExpRef bool -} - -type argSpec struct { - types []jpType - variadic bool -} - -type byExprString struct { - intr *treeInterpreter - node ASTNode - items []interface{} - hasError bool -} - -func (a *byExprString) Len() int { - return len(a.items) -} -func (a *byExprString) Swap(i, j int) { - a.items[i], a.items[j] = a.items[j], a.items[i] -} -func (a *byExprString) Less(i, j int) bool { - first, err := a.intr.Execute(a.node, a.items[i]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - ith, ok := first.(string) - if !ok { - a.hasError = true - return true - } - second, err := a.intr.Execute(a.node, a.items[j]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - jth, ok := second.(string) - if !ok { - a.hasError = true - return true - } - return ith < jth -} - -type byExprFloat struct { - intr *treeInterpreter - node ASTNode - items []interface{} - hasError bool -} - -func (a *byExprFloat) Len() int { - return len(a.items) -} -func (a *byExprFloat) Swap(i, j int) { - a.items[i], a.items[j] = a.items[j], a.items[i] -} -func (a *byExprFloat) Less(i, j int) bool { - first, err := a.intr.Execute(a.node, a.items[i]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - ith, ok := first.(float64) - if !ok { - a.hasError = true - return true - } - second, err := a.intr.Execute(a.node, a.items[j]) - if err != nil { - a.hasError = true - // Return a dummy value. - return true - } - jth, ok := second.(float64) - if !ok { - a.hasError = true - return true - } - return ith < jth -} - -type functionCaller struct { - functionTable map[string]functionEntry -} - -func newFunctionCaller() *functionCaller { - caller := &functionCaller{} - caller.functionTable = map[string]functionEntry{ - "length": { - name: "length", - arguments: []argSpec{ - {types: []jpType{jpString, jpArray, jpObject}}, - }, - handler: jpfLength, - }, - "starts_with": { - name: "starts_with", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpString}}, - }, - handler: jpfStartsWith, - }, - "abs": { - name: "abs", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfAbs, - }, - "avg": { - name: "avg", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber}}, - }, - handler: jpfAvg, - }, - "ceil": { - name: "ceil", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfCeil, - }, - "contains": { - name: "contains", - arguments: []argSpec{ - {types: []jpType{jpArray, jpString}}, - {types: []jpType{jpAny}}, - }, - handler: jpfContains, - }, - "ends_with": { - name: "ends_with", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpString}}, - }, - handler: jpfEndsWith, - }, - "floor": { - name: "floor", - arguments: []argSpec{ - {types: []jpType{jpNumber}}, - }, - handler: jpfFloor, - }, - "map": { - name: "amp", - arguments: []argSpec{ - {types: []jpType{jpExpref}}, - {types: []jpType{jpArray}}, - }, - handler: jpfMap, - hasExpRef: true, - }, - "max": { - name: "max", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber, jpArrayString}}, - }, - handler: jpfMax, - }, - "merge": { - name: "merge", - arguments: []argSpec{ - {types: []jpType{jpObject}, variadic: true}, - }, - handler: jpfMerge, - }, - "max_by": { - name: "max_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfMaxBy, - hasExpRef: true, - }, - "sum": { - name: "sum", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber}}, - }, - handler: jpfSum, - }, - "min": { - name: "min", - arguments: []argSpec{ - {types: []jpType{jpArrayNumber, jpArrayString}}, - }, - handler: jpfMin, - }, - "min_by": { - name: "min_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfMinBy, - hasExpRef: true, - }, - "type": { - name: "type", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfType, - }, - "keys": { - name: "keys", - arguments: []argSpec{ - {types: []jpType{jpObject}}, - }, - handler: jpfKeys, - }, - "values": { - name: "values", - arguments: []argSpec{ - {types: []jpType{jpObject}}, - }, - handler: jpfValues, - }, - "sort": { - name: "sort", - arguments: []argSpec{ - {types: []jpType{jpArrayString, jpArrayNumber}}, - }, - handler: jpfSort, - }, - "sort_by": { - name: "sort_by", - arguments: []argSpec{ - {types: []jpType{jpArray}}, - {types: []jpType{jpExpref}}, - }, - handler: jpfSortBy, - hasExpRef: true, - }, - "join": { - name: "join", - arguments: []argSpec{ - {types: []jpType{jpString}}, - {types: []jpType{jpArrayString}}, - }, - handler: jpfJoin, - }, - "reverse": { - name: "reverse", - arguments: []argSpec{ - {types: []jpType{jpArray, jpString}}, - }, - handler: jpfReverse, - }, - "to_array": { - name: "to_array", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToArray, - }, - "to_string": { - name: "to_string", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToString, - }, - "to_number": { - name: "to_number", - arguments: []argSpec{ - {types: []jpType{jpAny}}, - }, - handler: jpfToNumber, - }, - "not_null": { - name: "not_null", - arguments: []argSpec{ - {types: []jpType{jpAny}, variadic: true}, - }, - handler: jpfNotNull, - }, - } - return caller -} - -func (e *functionEntry) resolveArgs(arguments []interface{}) ([]interface{}, error) { - if len(e.arguments) == 0 { - return arguments, nil - } - if !e.arguments[len(e.arguments)-1].variadic { - if len(e.arguments) != len(arguments) { - return nil, errors.New("incorrect number of args") - } - for i, spec := range e.arguments { - userArg := arguments[i] - err := spec.typeCheck(userArg) - if err != nil { - return nil, err - } - } - return arguments, nil - } - if len(arguments) < len(e.arguments) { - return nil, errors.New("Invalid arity.") - } - return arguments, nil -} - -func (a *argSpec) typeCheck(arg interface{}) error { - for _, t := range a.types { - switch t { - case jpNumber: - if _, ok := arg.(float64); ok { - return nil - } - case jpString: - if _, ok := arg.(string); ok { - return nil - } - case jpArray: - if isSliceType(arg) { - return nil - } - case jpObject: - if _, ok := arg.(map[string]interface{}); ok { - return nil - } - case jpArrayNumber: - if _, ok := toArrayNum(arg); ok { - return nil - } - case jpArrayString: - if _, ok := toArrayStr(arg); ok { - return nil - } - case jpAny: - return nil - case jpExpref: - if _, ok := arg.(expRef); ok { - return nil - } - } - } - return fmt.Errorf("Invalid type for: %v, expected: %#v", arg, a.types) -} - -func (f *functionCaller) CallFunction(name string, arguments []interface{}, intr *treeInterpreter) (interface{}, error) { - entry, ok := f.functionTable[name] - if !ok { - return nil, errors.New("unknown function: " + name) - } - resolvedArgs, err := entry.resolveArgs(arguments) - if err != nil { - return nil, err - } - if entry.hasExpRef { - var extra []interface{} - extra = append(extra, intr) - resolvedArgs = append(extra, resolvedArgs...) - } - return entry.handler(resolvedArgs) -} - -func jpfAbs(arguments []interface{}) (interface{}, error) { - num := arguments[0].(float64) - return math.Abs(num), nil -} - -func jpfLength(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if c, ok := arg.(string); ok { - return float64(utf8.RuneCountInString(c)), nil - } else if isSliceType(arg) { - v := reflect.ValueOf(arg) - return float64(v.Len()), nil - } else if c, ok := arg.(map[string]interface{}); ok { - return float64(len(c)), nil - } - return nil, errors.New("could not compute length()") -} - -func jpfStartsWith(arguments []interface{}) (interface{}, error) { - search := arguments[0].(string) - prefix := arguments[1].(string) - return strings.HasPrefix(search, prefix), nil -} - -func jpfAvg(arguments []interface{}) (interface{}, error) { - // We've already type checked the value so we can safely use - // type assertions. - args := arguments[0].([]interface{}) - length := float64(len(args)) - numerator := 0.0 - for _, n := range args { - numerator += n.(float64) - } - return numerator / length, nil -} -func jpfCeil(arguments []interface{}) (interface{}, error) { - val := arguments[0].(float64) - return math.Ceil(val), nil -} -func jpfContains(arguments []interface{}) (interface{}, error) { - search := arguments[0] - el := arguments[1] - if searchStr, ok := search.(string); ok { - if elStr, ok := el.(string); ok { - return strings.Index(searchStr, elStr) != -1, nil - } - return false, nil - } - // Otherwise this is a generic contains for []interface{} - general := search.([]interface{}) - for _, item := range general { - if item == el { - return true, nil - } - } - return false, nil -} -func jpfEndsWith(arguments []interface{}) (interface{}, error) { - search := arguments[0].(string) - suffix := arguments[1].(string) - return strings.HasSuffix(search, suffix), nil -} -func jpfFloor(arguments []interface{}) (interface{}, error) { - val := arguments[0].(float64) - return math.Floor(val), nil -} -func jpfMap(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - exp := arguments[1].(expRef) - node := exp.ref - arr := arguments[2].([]interface{}) - mapped := make([]interface{}, 0, len(arr)) - for _, value := range arr { - current, err := intr.Execute(node, value) - if err != nil { - return nil, err - } - mapped = append(mapped, current) - } - return mapped, nil -} -func jpfMax(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item > best { - best = item - } - } - return best, nil - } - // Otherwise we're dealing with a max() of strings. - items, _ := toArrayStr(arguments[0]) - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item > best { - best = item - } - } - return best, nil -} -func jpfMerge(arguments []interface{}) (interface{}, error) { - final := make(map[string]interface{}) - for _, m := range arguments { - mapped := m.(map[string]interface{}) - for key, value := range mapped { - final[key] = value - } - } - return final, nil -} -func jpfMaxBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return nil, nil - } else if len(arr) == 1 { - return arr[0], nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - switch t := start.(type) { - case float64: - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(float64) - if !ok { - return nil, errors.New("invalid type, must be number") - } - if current > bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - case string: - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(string) - if !ok { - return nil, errors.New("invalid type, must be string") - } - if current > bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - default: - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfSum(arguments []interface{}) (interface{}, error) { - items, _ := toArrayNum(arguments[0]) - sum := 0.0 - for _, item := range items { - sum += item - } - return sum, nil -} - -func jpfMin(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item < best { - best = item - } - } - return best, nil - } - items, _ := toArrayStr(arguments[0]) - if len(items) == 0 { - return nil, nil - } - if len(items) == 1 { - return items[0], nil - } - best := items[0] - for _, item := range items[1:] { - if item < best { - best = item - } - } - return best, nil -} - -func jpfMinBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return nil, nil - } else if len(arr) == 1 { - return arr[0], nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - if t, ok := start.(float64); ok { - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(float64) - if !ok { - return nil, errors.New("invalid type, must be number") - } - if current < bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - } else if t, ok := start.(string); ok { - bestVal := t - bestItem := arr[0] - for _, item := range arr[1:] { - result, err := intr.Execute(node, item) - if err != nil { - return nil, err - } - current, ok := result.(string) - if !ok { - return nil, errors.New("invalid type, must be string") - } - if current < bestVal { - bestVal = current - bestItem = item - } - } - return bestItem, nil - } else { - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfType(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if _, ok := arg.(float64); ok { - return "number", nil - } - if _, ok := arg.(string); ok { - return "string", nil - } - if _, ok := arg.([]interface{}); ok { - return "array", nil - } - if _, ok := arg.(map[string]interface{}); ok { - return "object", nil - } - if arg == nil { - return "null", nil - } - if arg == true || arg == false { - return "boolean", nil - } - return nil, errors.New("unknown type") -} -func jpfKeys(arguments []interface{}) (interface{}, error) { - arg := arguments[0].(map[string]interface{}) - collected := make([]interface{}, 0, len(arg)) - for key := range arg { - collected = append(collected, key) - } - return collected, nil -} -func jpfValues(arguments []interface{}) (interface{}, error) { - arg := arguments[0].(map[string]interface{}) - collected := make([]interface{}, 0, len(arg)) - for _, value := range arg { - collected = append(collected, value) - } - return collected, nil -} -func jpfSort(arguments []interface{}) (interface{}, error) { - if items, ok := toArrayNum(arguments[0]); ok { - d := sort.Float64Slice(items) - sort.Stable(d) - final := make([]interface{}, len(d)) - for i, val := range d { - final[i] = val - } - return final, nil - } - // Otherwise we're dealing with sort()'ing strings. - items, _ := toArrayStr(arguments[0]) - d := sort.StringSlice(items) - sort.Stable(d) - final := make([]interface{}, len(d)) - for i, val := range d { - final[i] = val - } - return final, nil -} -func jpfSortBy(arguments []interface{}) (interface{}, error) { - intr := arguments[0].(*treeInterpreter) - arr := arguments[1].([]interface{}) - exp := arguments[2].(expRef) - node := exp.ref - if len(arr) == 0 { - return arr, nil - } else if len(arr) == 1 { - return arr, nil - } - start, err := intr.Execute(node, arr[0]) - if err != nil { - return nil, err - } - if _, ok := start.(float64); ok { - sortable := &byExprFloat{intr, node, arr, false} - sort.Stable(sortable) - if sortable.hasError { - return nil, errors.New("error in sort_by comparison") - } - return arr, nil - } else if _, ok := start.(string); ok { - sortable := &byExprString{intr, node, arr, false} - sort.Stable(sortable) - if sortable.hasError { - return nil, errors.New("error in sort_by comparison") - } - return arr, nil - } else { - return nil, errors.New("invalid type, must be number of string") - } -} -func jpfJoin(arguments []interface{}) (interface{}, error) { - sep := arguments[0].(string) - // We can't just do arguments[1].([]string), we have to - // manually convert each item to a string. - arrayStr := []string{} - for _, item := range arguments[1].([]interface{}) { - arrayStr = append(arrayStr, item.(string)) - } - return strings.Join(arrayStr, sep), nil -} -func jpfReverse(arguments []interface{}) (interface{}, error) { - if s, ok := arguments[0].(string); ok { - r := []rune(s) - for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 { - r[i], r[j] = r[j], r[i] - } - return string(r), nil - } - items := arguments[0].([]interface{}) - length := len(items) - reversed := make([]interface{}, length) - for i, item := range items { - reversed[length-(i+1)] = item - } - return reversed, nil -} -func jpfToArray(arguments []interface{}) (interface{}, error) { - if _, ok := arguments[0].([]interface{}); ok { - return arguments[0], nil - } - return arguments[:1:1], nil -} -func jpfToString(arguments []interface{}) (interface{}, error) { - if v, ok := arguments[0].(string); ok { - return v, nil - } - result, err := json.Marshal(arguments[0]) - if err != nil { - return nil, err - } - return string(result), nil -} -func jpfToNumber(arguments []interface{}) (interface{}, error) { - arg := arguments[0] - if v, ok := arg.(float64); ok { - return v, nil - } - if v, ok := arg.(string); ok { - conv, err := strconv.ParseFloat(v, 64) - if err != nil { - return nil, nil - } - return conv, nil - } - if _, ok := arg.([]interface{}); ok { - return nil, nil - } - if _, ok := arg.(map[string]interface{}); ok { - return nil, nil - } - if arg == nil { - return nil, nil - } - if arg == true || arg == false { - return nil, nil - } - return nil, errors.New("unknown type") -} -func jpfNotNull(arguments []interface{}) (interface{}, error) { - for _, arg := range arguments { - if arg != nil { - return arg, nil - } - } - return nil, nil -} diff --git a/vendor/github.com/jmespath/go-jmespath/interpreter.go b/vendor/github.com/jmespath/go-jmespath/interpreter.go deleted file mode 100644 index 13c74604c..000000000 --- a/vendor/github.com/jmespath/go-jmespath/interpreter.go +++ /dev/null @@ -1,418 +0,0 @@ -package jmespath - -import ( - "errors" - "reflect" - "unicode" - "unicode/utf8" -) - -/* This is a tree based interpreter. It walks the AST and directly - interprets the AST to search through a JSON document. -*/ - -type treeInterpreter struct { - fCall *functionCaller -} - -func newInterpreter() *treeInterpreter { - interpreter := treeInterpreter{} - interpreter.fCall = newFunctionCaller() - return &interpreter -} - -type expRef struct { - ref ASTNode -} - -// Execute takes an ASTNode and input data and interprets the AST directly. -// It will produce the result of applying the JMESPath expression associated -// with the ASTNode to the input data "value". -func (intr *treeInterpreter) Execute(node ASTNode, value interface{}) (interface{}, error) { - switch node.nodeType { - case ASTComparator: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - right, err := intr.Execute(node.children[1], value) - if err != nil { - return nil, err - } - switch node.value { - case tEQ: - return objsEqual(left, right), nil - case tNE: - return !objsEqual(left, right), nil - } - leftNum, ok := left.(float64) - if !ok { - return nil, nil - } - rightNum, ok := right.(float64) - if !ok { - return nil, nil - } - switch node.value { - case tGT: - return leftNum > rightNum, nil - case tGTE: - return leftNum >= rightNum, nil - case tLT: - return leftNum < rightNum, nil - case tLTE: - return leftNum <= rightNum, nil - } - case ASTExpRef: - return expRef{ref: node.children[0]}, nil - case ASTFunctionExpression: - resolvedArgs := []interface{}{} - for _, arg := range node.children { - current, err := intr.Execute(arg, value) - if err != nil { - return nil, err - } - resolvedArgs = append(resolvedArgs, current) - } - return intr.fCall.CallFunction(node.value.(string), resolvedArgs, intr) - case ASTField: - if m, ok := value.(map[string]interface{}); ok { - key := node.value.(string) - return m[key], nil - } - return intr.fieldFromStruct(node.value.(string), value) - case ASTFilterProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - sliceType, ok := left.([]interface{}) - if !ok { - if isSliceType(left) { - return intr.filterProjectionWithReflection(node, left) - } - return nil, nil - } - compareNode := node.children[2] - collected := []interface{}{} - for _, element := range sliceType { - result, err := intr.Execute(compareNode, element) - if err != nil { - return nil, err - } - if !isFalse(result) { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - } - return collected, nil - case ASTFlatten: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - sliceType, ok := left.([]interface{}) - if !ok { - // If we can't type convert to []interface{}, there's - // a chance this could still work via reflection if we're - // dealing with user provided types. - if isSliceType(left) { - return intr.flattenWithReflection(left) - } - return nil, nil - } - flattened := []interface{}{} - for _, element := range sliceType { - if elementSlice, ok := element.([]interface{}); ok { - flattened = append(flattened, elementSlice...) - } else if isSliceType(element) { - reflectFlat := []interface{}{} - v := reflect.ValueOf(element) - for i := 0; i < v.Len(); i++ { - reflectFlat = append(reflectFlat, v.Index(i).Interface()) - } - flattened = append(flattened, reflectFlat...) - } else { - flattened = append(flattened, element) - } - } - return flattened, nil - case ASTIdentity, ASTCurrentNode: - return value, nil - case ASTIndex: - if sliceType, ok := value.([]interface{}); ok { - index := node.value.(int) - if index < 0 { - index += len(sliceType) - } - if index < len(sliceType) && index >= 0 { - return sliceType[index], nil - } - return nil, nil - } - // Otherwise try via reflection. - rv := reflect.ValueOf(value) - if rv.Kind() == reflect.Slice { - index := node.value.(int) - if index < 0 { - index += rv.Len() - } - if index < rv.Len() && index >= 0 { - v := rv.Index(index) - return v.Interface(), nil - } - } - return nil, nil - case ASTKeyValPair: - return intr.Execute(node.children[0], value) - case ASTLiteral: - return node.value, nil - case ASTMultiSelectHash: - if value == nil { - return nil, nil - } - collected := make(map[string]interface{}) - for _, child := range node.children { - current, err := intr.Execute(child, value) - if err != nil { - return nil, err - } - key := child.value.(string) - collected[key] = current - } - return collected, nil - case ASTMultiSelectList: - if value == nil { - return nil, nil - } - collected := []interface{}{} - for _, child := range node.children { - current, err := intr.Execute(child, value) - if err != nil { - return nil, err - } - collected = append(collected, current) - } - return collected, nil - case ASTOrExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - matched, err = intr.Execute(node.children[1], value) - if err != nil { - return nil, err - } - } - return matched, nil - case ASTAndExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - return matched, nil - } - return intr.Execute(node.children[1], value) - case ASTNotExpression: - matched, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - if isFalse(matched) { - return true, nil - } - return false, nil - case ASTPipe: - result := value - var err error - for _, child := range node.children { - result, err = intr.Execute(child, result) - if err != nil { - return nil, err - } - } - return result, nil - case ASTProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - sliceType, ok := left.([]interface{}) - if !ok { - if isSliceType(left) { - return intr.projectWithReflection(node, left) - } - return nil, nil - } - collected := []interface{}{} - var current interface{} - for _, element := range sliceType { - current, err = intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - return collected, nil - case ASTSubexpression, ASTIndexExpression: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, err - } - return intr.Execute(node.children[1], left) - case ASTSlice: - sliceType, ok := value.([]interface{}) - if !ok { - if isSliceType(value) { - return intr.sliceWithReflection(node, value) - } - return nil, nil - } - parts := node.value.([]*int) - sliceParams := make([]sliceParam, 3) - for i, part := range parts { - if part != nil { - sliceParams[i].Specified = true - sliceParams[i].N = *part - } - } - return slice(sliceType, sliceParams) - case ASTValueProjection: - left, err := intr.Execute(node.children[0], value) - if err != nil { - return nil, nil - } - mapType, ok := left.(map[string]interface{}) - if !ok { - return nil, nil - } - values := make([]interface{}, len(mapType)) - for _, value := range mapType { - values = append(values, value) - } - collected := []interface{}{} - for _, element := range values { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - return collected, nil - } - return nil, errors.New("Unknown AST node: " + node.nodeType.String()) -} - -func (intr *treeInterpreter) fieldFromStruct(key string, value interface{}) (interface{}, error) { - rv := reflect.ValueOf(value) - first, n := utf8.DecodeRuneInString(key) - fieldName := string(unicode.ToUpper(first)) + key[n:] - if rv.Kind() == reflect.Struct { - v := rv.FieldByName(fieldName) - if !v.IsValid() { - return nil, nil - } - return v.Interface(), nil - } else if rv.Kind() == reflect.Ptr { - // Handle multiple levels of indirection? - if rv.IsNil() { - return nil, nil - } - rv = rv.Elem() - v := rv.FieldByName(fieldName) - if !v.IsValid() { - return nil, nil - } - return v.Interface(), nil - } - return nil, nil -} - -func (intr *treeInterpreter) flattenWithReflection(value interface{}) (interface{}, error) { - v := reflect.ValueOf(value) - flattened := []interface{}{} - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - if reflect.TypeOf(element).Kind() == reflect.Slice { - // Then insert the contents of the element - // slice into the flattened slice, - // i.e flattened = append(flattened, mySlice...) - elementV := reflect.ValueOf(element) - for j := 0; j < elementV.Len(); j++ { - flattened = append( - flattened, elementV.Index(j).Interface()) - } - } else { - flattened = append(flattened, element) - } - } - return flattened, nil -} - -func (intr *treeInterpreter) sliceWithReflection(node ASTNode, value interface{}) (interface{}, error) { - v := reflect.ValueOf(value) - parts := node.value.([]*int) - sliceParams := make([]sliceParam, 3) - for i, part := range parts { - if part != nil { - sliceParams[i].Specified = true - sliceParams[i].N = *part - } - } - final := []interface{}{} - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - final = append(final, element) - } - return slice(final, sliceParams) -} - -func (intr *treeInterpreter) filterProjectionWithReflection(node ASTNode, value interface{}) (interface{}, error) { - compareNode := node.children[2] - collected := []interface{}{} - v := reflect.ValueOf(value) - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - result, err := intr.Execute(compareNode, element) - if err != nil { - return nil, err - } - if !isFalse(result) { - current, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if current != nil { - collected = append(collected, current) - } - } - } - return collected, nil -} - -func (intr *treeInterpreter) projectWithReflection(node ASTNode, value interface{}) (interface{}, error) { - collected := []interface{}{} - v := reflect.ValueOf(value) - for i := 0; i < v.Len(); i++ { - element := v.Index(i).Interface() - result, err := intr.Execute(node.children[1], element) - if err != nil { - return nil, err - } - if result != nil { - collected = append(collected, result) - } - } - return collected, nil -} diff --git a/vendor/github.com/jmespath/go-jmespath/lexer.go b/vendor/github.com/jmespath/go-jmespath/lexer.go deleted file mode 100644 index 817900c8f..000000000 --- a/vendor/github.com/jmespath/go-jmespath/lexer.go +++ /dev/null @@ -1,420 +0,0 @@ -package jmespath - -import ( - "bytes" - "encoding/json" - "fmt" - "strconv" - "strings" - "unicode/utf8" -) - -type token struct { - tokenType tokType - value string - position int - length int -} - -type tokType int - -const eof = -1 - -// Lexer contains information about the expression being tokenized. -type Lexer struct { - expression string // The expression provided by the user. - currentPos int // The current position in the string. - lastWidth int // The width of the current rune. This - buf bytes.Buffer // Internal buffer used for building up values. -} - -// SyntaxError is the main error used whenever a lexing or parsing error occurs. -type SyntaxError struct { - msg string // Error message displayed to user - Expression string // Expression that generated a SyntaxError - Offset int // The location in the string where the error occurred -} - -func (e SyntaxError) Error() string { - // In the future, it would be good to underline the specific - // location where the error occurred. - return "SyntaxError: " + e.msg -} - -// HighlightLocation will show where the syntax error occurred. -// It will place a "^" character on a line below the expression -// at the point where the syntax error occurred. -func (e SyntaxError) HighlightLocation() string { - return e.Expression + "\n" + strings.Repeat(" ", e.Offset) + "^" -} - -//go:generate stringer -type=tokType -const ( - tUnknown tokType = iota - tStar - tDot - tFilter - tFlatten - tLparen - tRparen - tLbracket - tRbracket - tLbrace - tRbrace - tOr - tPipe - tNumber - tUnquotedIdentifier - tQuotedIdentifier - tComma - tColon - tLT - tLTE - tGT - tGTE - tEQ - tNE - tJSONLiteral - tStringLiteral - tCurrent - tExpref - tAnd - tNot - tEOF -) - -var basicTokens = map[rune]tokType{ - '.': tDot, - '*': tStar, - ',': tComma, - ':': tColon, - '{': tLbrace, - '}': tRbrace, - ']': tRbracket, // tLbracket not included because it could be "[]" - '(': tLparen, - ')': tRparen, - '@': tCurrent, -} - -// Bit mask for [a-zA-Z_] shifted down 64 bits to fit in a single uint64. -// When using this bitmask just be sure to shift the rune down 64 bits -// before checking against identifierStartBits. -const identifierStartBits uint64 = 576460745995190270 - -// Bit mask for [a-zA-Z0-9], 128 bits -> 2 uint64s. -var identifierTrailingBits = [2]uint64{287948901175001088, 576460745995190270} - -var whiteSpace = map[rune]bool{ - ' ': true, '\t': true, '\n': true, '\r': true, -} - -func (t token) String() string { - return fmt.Sprintf("Token{%+v, %s, %d, %d}", - t.tokenType, t.value, t.position, t.length) -} - -// NewLexer creates a new JMESPath lexer. -func NewLexer() *Lexer { - lexer := Lexer{} - return &lexer -} - -func (lexer *Lexer) next() rune { - if lexer.currentPos >= len(lexer.expression) { - lexer.lastWidth = 0 - return eof - } - r, w := utf8.DecodeRuneInString(lexer.expression[lexer.currentPos:]) - lexer.lastWidth = w - lexer.currentPos += w - return r -} - -func (lexer *Lexer) back() { - lexer.currentPos -= lexer.lastWidth -} - -func (lexer *Lexer) peek() rune { - t := lexer.next() - lexer.back() - return t -} - -// tokenize takes an expression and returns corresponding tokens. -func (lexer *Lexer) tokenize(expression string) ([]token, error) { - var tokens []token - lexer.expression = expression - lexer.currentPos = 0 - lexer.lastWidth = 0 -loop: - for { - r := lexer.next() - if identifierStartBits&(1<<(uint64(r)-64)) > 0 { - t := lexer.consumeUnquotedIdentifier() - tokens = append(tokens, t) - } else if val, ok := basicTokens[r]; ok { - // Basic single char token. - t := token{ - tokenType: val, - value: string(r), - position: lexer.currentPos - lexer.lastWidth, - length: 1, - } - tokens = append(tokens, t) - } else if r == '-' || (r >= '0' && r <= '9') { - t := lexer.consumeNumber() - tokens = append(tokens, t) - } else if r == '[' { - t := lexer.consumeLBracket() - tokens = append(tokens, t) - } else if r == '"' { - t, err := lexer.consumeQuotedIdentifier() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '\'' { - t, err := lexer.consumeRawStringLiteral() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '`' { - t, err := lexer.consumeLiteral() - if err != nil { - return tokens, err - } - tokens = append(tokens, t) - } else if r == '|' { - t := lexer.matchOrElse(r, '|', tOr, tPipe) - tokens = append(tokens, t) - } else if r == '<' { - t := lexer.matchOrElse(r, '=', tLTE, tLT) - tokens = append(tokens, t) - } else if r == '>' { - t := lexer.matchOrElse(r, '=', tGTE, tGT) - tokens = append(tokens, t) - } else if r == '!' { - t := lexer.matchOrElse(r, '=', tNE, tNot) - tokens = append(tokens, t) - } else if r == '=' { - t := lexer.matchOrElse(r, '=', tEQ, tUnknown) - tokens = append(tokens, t) - } else if r == '&' { - t := lexer.matchOrElse(r, '&', tAnd, tExpref) - tokens = append(tokens, t) - } else if r == eof { - break loop - } else if _, ok := whiteSpace[r]; ok { - // Ignore whitespace - } else { - return tokens, lexer.syntaxError(fmt.Sprintf("Unknown char: %s", strconv.QuoteRuneToASCII(r))) - } - } - tokens = append(tokens, token{tEOF, "", len(lexer.expression), 0}) - return tokens, nil -} - -// Consume characters until the ending rune "r" is reached. -// If the end of the expression is reached before seeing the -// terminating rune "r", then an error is returned. -// If no error occurs then the matching substring is returned. -// The returned string will not include the ending rune. -func (lexer *Lexer) consumeUntil(end rune) (string, error) { - start := lexer.currentPos - current := lexer.next() - for current != end && current != eof { - if current == '\\' && lexer.peek() != eof { - lexer.next() - } - current = lexer.next() - } - if lexer.lastWidth == 0 { - // Then we hit an EOF so we never reached the closing - // delimiter. - return "", SyntaxError{ - msg: "Unclosed delimiter: " + string(end), - Expression: lexer.expression, - Offset: len(lexer.expression), - } - } - return lexer.expression[start : lexer.currentPos-lexer.lastWidth], nil -} - -func (lexer *Lexer) consumeLiteral() (token, error) { - start := lexer.currentPos - value, err := lexer.consumeUntil('`') - if err != nil { - return token{}, err - } - value = strings.Replace(value, "\\`", "`", -1) - return token{ - tokenType: tJSONLiteral, - value: value, - position: start, - length: len(value), - }, nil -} - -func (lexer *Lexer) consumeRawStringLiteral() (token, error) { - start := lexer.currentPos - currentIndex := start - current := lexer.next() - for current != '\'' && lexer.peek() != eof { - if current == '\\' && lexer.peek() == '\'' { - chunk := lexer.expression[currentIndex : lexer.currentPos-1] - lexer.buf.WriteString(chunk) - lexer.buf.WriteString("'") - lexer.next() - currentIndex = lexer.currentPos - } - current = lexer.next() - } - if lexer.lastWidth == 0 { - // Then we hit an EOF so we never reached the closing - // delimiter. - return token{}, SyntaxError{ - msg: "Unclosed delimiter: '", - Expression: lexer.expression, - Offset: len(lexer.expression), - } - } - if currentIndex < lexer.currentPos { - lexer.buf.WriteString(lexer.expression[currentIndex : lexer.currentPos-1]) - } - value := lexer.buf.String() - // Reset the buffer so it can reused again. - lexer.buf.Reset() - return token{ - tokenType: tStringLiteral, - value: value, - position: start, - length: len(value), - }, nil -} - -func (lexer *Lexer) syntaxError(msg string) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: lexer.expression, - Offset: lexer.currentPos - 1, - } -} - -// Checks for a two char token, otherwise matches a single character -// token. This is used whenever a two char token overlaps a single -// char token, e.g. "||" -> tPipe, "|" -> tOr. -func (lexer *Lexer) matchOrElse(first rune, second rune, matchedType tokType, singleCharType tokType) token { - start := lexer.currentPos - lexer.lastWidth - nextRune := lexer.next() - var t token - if nextRune == second { - t = token{ - tokenType: matchedType, - value: string(first) + string(second), - position: start, - length: 2, - } - } else { - lexer.back() - t = token{ - tokenType: singleCharType, - value: string(first), - position: start, - length: 1, - } - } - return t -} - -func (lexer *Lexer) consumeLBracket() token { - // There's three options here: - // 1. A filter expression "[?" - // 2. A flatten operator "[]" - // 3. A bare rbracket "[" - start := lexer.currentPos - lexer.lastWidth - nextRune := lexer.next() - var t token - if nextRune == '?' { - t = token{ - tokenType: tFilter, - value: "[?", - position: start, - length: 2, - } - } else if nextRune == ']' { - t = token{ - tokenType: tFlatten, - value: "[]", - position: start, - length: 2, - } - } else { - t = token{ - tokenType: tLbracket, - value: "[", - position: start, - length: 1, - } - lexer.back() - } - return t -} - -func (lexer *Lexer) consumeQuotedIdentifier() (token, error) { - start := lexer.currentPos - value, err := lexer.consumeUntil('"') - if err != nil { - return token{}, err - } - var decoded string - asJSON := []byte("\"" + value + "\"") - if err := json.Unmarshal([]byte(asJSON), &decoded); err != nil { - return token{}, err - } - return token{ - tokenType: tQuotedIdentifier, - value: decoded, - position: start - 1, - length: len(decoded), - }, nil -} - -func (lexer *Lexer) consumeUnquotedIdentifier() token { - // Consume runes until we reach the end of an unquoted - // identifier. - start := lexer.currentPos - lexer.lastWidth - for { - r := lexer.next() - if r < 0 || r > 128 || identifierTrailingBits[uint64(r)/64]&(1<<(uint64(r)%64)) == 0 { - lexer.back() - break - } - } - value := lexer.expression[start:lexer.currentPos] - return token{ - tokenType: tUnquotedIdentifier, - value: value, - position: start, - length: lexer.currentPos - start, - } -} - -func (lexer *Lexer) consumeNumber() token { - // Consume runes until we reach something that's not a number. - start := lexer.currentPos - lexer.lastWidth - for { - r := lexer.next() - if r < '0' || r > '9' { - lexer.back() - break - } - } - value := lexer.expression[start:lexer.currentPos] - return token{ - tokenType: tNumber, - value: value, - position: start, - length: lexer.currentPos - start, - } -} diff --git a/vendor/github.com/jmespath/go-jmespath/parser.go b/vendor/github.com/jmespath/go-jmespath/parser.go deleted file mode 100644 index 4abc303ab..000000000 --- a/vendor/github.com/jmespath/go-jmespath/parser.go +++ /dev/null @@ -1,603 +0,0 @@ -package jmespath - -import ( - "encoding/json" - "fmt" - "strconv" - "strings" -) - -type astNodeType int - -//go:generate stringer -type astNodeType -const ( - ASTEmpty astNodeType = iota - ASTComparator - ASTCurrentNode - ASTExpRef - ASTFunctionExpression - ASTField - ASTFilterProjection - ASTFlatten - ASTIdentity - ASTIndex - ASTIndexExpression - ASTKeyValPair - ASTLiteral - ASTMultiSelectHash - ASTMultiSelectList - ASTOrExpression - ASTAndExpression - ASTNotExpression - ASTPipe - ASTProjection - ASTSubexpression - ASTSlice - ASTValueProjection -) - -// ASTNode represents the abstract syntax tree of a JMESPath expression. -type ASTNode struct { - nodeType astNodeType - value interface{} - children []ASTNode -} - -func (node ASTNode) String() string { - return node.PrettyPrint(0) -} - -// PrettyPrint will pretty print the parsed AST. -// The AST is an implementation detail and this pretty print -// function is provided as a convenience method to help with -// debugging. You should not rely on its output as the internal -// structure of the AST may change at any time. -func (node ASTNode) PrettyPrint(indent int) string { - spaces := strings.Repeat(" ", indent) - output := fmt.Sprintf("%s%s {\n", spaces, node.nodeType) - nextIndent := indent + 2 - if node.value != nil { - if converted, ok := node.value.(fmt.Stringer); ok { - // Account for things like comparator nodes - // that are enums with a String() method. - output += fmt.Sprintf("%svalue: %s\n", strings.Repeat(" ", nextIndent), converted.String()) - } else { - output += fmt.Sprintf("%svalue: %#v\n", strings.Repeat(" ", nextIndent), node.value) - } - } - lastIndex := len(node.children) - if lastIndex > 0 { - output += fmt.Sprintf("%schildren: {\n", strings.Repeat(" ", nextIndent)) - childIndent := nextIndent + 2 - for _, elem := range node.children { - output += elem.PrettyPrint(childIndent) - } - } - output += fmt.Sprintf("%s}\n", spaces) - return output -} - -var bindingPowers = map[tokType]int{ - tEOF: 0, - tUnquotedIdentifier: 0, - tQuotedIdentifier: 0, - tRbracket: 0, - tRparen: 0, - tComma: 0, - tRbrace: 0, - tNumber: 0, - tCurrent: 0, - tExpref: 0, - tColon: 0, - tPipe: 1, - tOr: 2, - tAnd: 3, - tEQ: 5, - tLT: 5, - tLTE: 5, - tGT: 5, - tGTE: 5, - tNE: 5, - tFlatten: 9, - tStar: 20, - tFilter: 21, - tDot: 40, - tNot: 45, - tLbrace: 50, - tLbracket: 55, - tLparen: 60, -} - -// Parser holds state about the current expression being parsed. -type Parser struct { - expression string - tokens []token - index int -} - -// NewParser creates a new JMESPath parser. -func NewParser() *Parser { - p := Parser{} - return &p -} - -// Parse will compile a JMESPath expression. -func (p *Parser) Parse(expression string) (ASTNode, error) { - lexer := NewLexer() - p.expression = expression - p.index = 0 - tokens, err := lexer.tokenize(expression) - if err != nil { - return ASTNode{}, err - } - p.tokens = tokens - parsed, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if p.current() != tEOF { - return ASTNode{}, p.syntaxError(fmt.Sprintf( - "Unexpected token at the end of the expression: %s", p.current())) - } - return parsed, nil -} - -func (p *Parser) parseExpression(bindingPower int) (ASTNode, error) { - var err error - leftToken := p.lookaheadToken(0) - p.advance() - leftNode, err := p.nud(leftToken) - if err != nil { - return ASTNode{}, err - } - currentToken := p.current() - for bindingPower < bindingPowers[currentToken] { - p.advance() - leftNode, err = p.led(currentToken, leftNode) - if err != nil { - return ASTNode{}, err - } - currentToken = p.current() - } - return leftNode, nil -} - -func (p *Parser) parseIndexExpression() (ASTNode, error) { - if p.lookahead(0) == tColon || p.lookahead(1) == tColon { - return p.parseSliceExpression() - } - indexStr := p.lookaheadToken(0).value - parsedInt, err := strconv.Atoi(indexStr) - if err != nil { - return ASTNode{}, err - } - indexNode := ASTNode{nodeType: ASTIndex, value: parsedInt} - p.advance() - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - return indexNode, nil -} - -func (p *Parser) parseSliceExpression() (ASTNode, error) { - parts := []*int{nil, nil, nil} - index := 0 - current := p.current() - for current != tRbracket && index < 3 { - if current == tColon { - index++ - p.advance() - } else if current == tNumber { - parsedInt, err := strconv.Atoi(p.lookaheadToken(0).value) - if err != nil { - return ASTNode{}, err - } - parts[index] = &parsedInt - p.advance() - } else { - return ASTNode{}, p.syntaxError( - "Expected tColon or tNumber" + ", received: " + p.current().String()) - } - current = p.current() - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTSlice, - value: parts, - }, nil -} - -func (p *Parser) match(tokenType tokType) error { - if p.current() == tokenType { - p.advance() - return nil - } - return p.syntaxError("Expected " + tokenType.String() + ", received: " + p.current().String()) -} - -func (p *Parser) led(tokenType tokType, node ASTNode) (ASTNode, error) { - switch tokenType { - case tDot: - if p.current() != tStar { - right, err := p.parseDotRHS(bindingPowers[tDot]) - return ASTNode{ - nodeType: ASTSubexpression, - children: []ASTNode{node, right}, - }, err - } - p.advance() - right, err := p.parseProjectionRHS(bindingPowers[tDot]) - return ASTNode{ - nodeType: ASTValueProjection, - children: []ASTNode{node, right}, - }, err - case tPipe: - right, err := p.parseExpression(bindingPowers[tPipe]) - return ASTNode{nodeType: ASTPipe, children: []ASTNode{node, right}}, err - case tOr: - right, err := p.parseExpression(bindingPowers[tOr]) - return ASTNode{nodeType: ASTOrExpression, children: []ASTNode{node, right}}, err - case tAnd: - right, err := p.parseExpression(bindingPowers[tAnd]) - return ASTNode{nodeType: ASTAndExpression, children: []ASTNode{node, right}}, err - case tLparen: - name := node.value - var args []ASTNode - for p.current() != tRparen { - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if p.current() == tComma { - if err := p.match(tComma); err != nil { - return ASTNode{}, err - } - } - args = append(args, expression) - } - if err := p.match(tRparen); err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTFunctionExpression, - value: name, - children: args, - }, nil - case tFilter: - return p.parseFilter(node) - case tFlatten: - left := ASTNode{nodeType: ASTFlatten, children: []ASTNode{node}} - right, err := p.parseProjectionRHS(bindingPowers[tFlatten]) - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{left, right}, - }, err - case tEQ, tNE, tGT, tGTE, tLT, tLTE: - right, err := p.parseExpression(bindingPowers[tokenType]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTComparator, - value: tokenType, - children: []ASTNode{node, right}, - }, nil - case tLbracket: - tokenType := p.current() - var right ASTNode - var err error - if tokenType == tNumber || tokenType == tColon { - right, err = p.parseIndexExpression() - if err != nil { - return ASTNode{}, err - } - return p.projectIfSlice(node, right) - } - // Otherwise this is a projection. - if err := p.match(tStar); err != nil { - return ASTNode{}, err - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - right, err = p.parseProjectionRHS(bindingPowers[tStar]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{node, right}, - }, nil - } - return ASTNode{}, p.syntaxError("Unexpected token: " + tokenType.String()) -} - -func (p *Parser) nud(token token) (ASTNode, error) { - switch token.tokenType { - case tJSONLiteral: - var parsed interface{} - err := json.Unmarshal([]byte(token.value), &parsed) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTLiteral, value: parsed}, nil - case tStringLiteral: - return ASTNode{nodeType: ASTLiteral, value: token.value}, nil - case tUnquotedIdentifier: - return ASTNode{ - nodeType: ASTField, - value: token.value, - }, nil - case tQuotedIdentifier: - node := ASTNode{nodeType: ASTField, value: token.value} - if p.current() == tLparen { - return ASTNode{}, p.syntaxErrorToken("Can't have quoted identifier as function name.", token) - } - return node, nil - case tStar: - left := ASTNode{nodeType: ASTIdentity} - var right ASTNode - var err error - if p.current() == tRbracket { - right = ASTNode{nodeType: ASTIdentity} - } else { - right, err = p.parseProjectionRHS(bindingPowers[tStar]) - } - return ASTNode{nodeType: ASTValueProjection, children: []ASTNode{left, right}}, err - case tFilter: - return p.parseFilter(ASTNode{nodeType: ASTIdentity}) - case tLbrace: - return p.parseMultiSelectHash() - case tFlatten: - left := ASTNode{ - nodeType: ASTFlatten, - children: []ASTNode{{nodeType: ASTIdentity}}, - } - right, err := p.parseProjectionRHS(bindingPowers[tFlatten]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTProjection, children: []ASTNode{left, right}}, nil - case tLbracket: - tokenType := p.current() - //var right ASTNode - if tokenType == tNumber || tokenType == tColon { - right, err := p.parseIndexExpression() - if err != nil { - return ASTNode{}, nil - } - return p.projectIfSlice(ASTNode{nodeType: ASTIdentity}, right) - } else if tokenType == tStar && p.lookahead(1) == tRbracket { - p.advance() - p.advance() - right, err := p.parseProjectionRHS(bindingPowers[tStar]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{{nodeType: ASTIdentity}, right}, - }, nil - } else { - return p.parseMultiSelectList() - } - case tCurrent: - return ASTNode{nodeType: ASTCurrentNode}, nil - case tExpref: - expression, err := p.parseExpression(bindingPowers[tExpref]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTExpRef, children: []ASTNode{expression}}, nil - case tNot: - expression, err := p.parseExpression(bindingPowers[tNot]) - if err != nil { - return ASTNode{}, err - } - return ASTNode{nodeType: ASTNotExpression, children: []ASTNode{expression}}, nil - case tLparen: - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if err := p.match(tRparen); err != nil { - return ASTNode{}, err - } - return expression, nil - case tEOF: - return ASTNode{}, p.syntaxErrorToken("Incomplete expression", token) - } - - return ASTNode{}, p.syntaxErrorToken("Invalid token: "+token.tokenType.String(), token) -} - -func (p *Parser) parseMultiSelectList() (ASTNode, error) { - var expressions []ASTNode - for { - expression, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - expressions = append(expressions, expression) - if p.current() == tRbracket { - break - } - err = p.match(tComma) - if err != nil { - return ASTNode{}, err - } - } - err := p.match(tRbracket) - if err != nil { - return ASTNode{}, err - } - return ASTNode{ - nodeType: ASTMultiSelectList, - children: expressions, - }, nil -} - -func (p *Parser) parseMultiSelectHash() (ASTNode, error) { - var children []ASTNode - for { - keyToken := p.lookaheadToken(0) - if err := p.match(tUnquotedIdentifier); err != nil { - if err := p.match(tQuotedIdentifier); err != nil { - return ASTNode{}, p.syntaxError("Expected tQuotedIdentifier or tUnquotedIdentifier") - } - } - keyName := keyToken.value - err := p.match(tColon) - if err != nil { - return ASTNode{}, err - } - value, err := p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - node := ASTNode{ - nodeType: ASTKeyValPair, - value: keyName, - children: []ASTNode{value}, - } - children = append(children, node) - if p.current() == tComma { - err := p.match(tComma) - if err != nil { - return ASTNode{}, nil - } - } else if p.current() == tRbrace { - err := p.match(tRbrace) - if err != nil { - return ASTNode{}, nil - } - break - } - } - return ASTNode{ - nodeType: ASTMultiSelectHash, - children: children, - }, nil -} - -func (p *Parser) projectIfSlice(left ASTNode, right ASTNode) (ASTNode, error) { - indexExpr := ASTNode{ - nodeType: ASTIndexExpression, - children: []ASTNode{left, right}, - } - if right.nodeType == ASTSlice { - right, err := p.parseProjectionRHS(bindingPowers[tStar]) - return ASTNode{ - nodeType: ASTProjection, - children: []ASTNode{indexExpr, right}, - }, err - } - return indexExpr, nil -} -func (p *Parser) parseFilter(node ASTNode) (ASTNode, error) { - var right, condition ASTNode - var err error - condition, err = p.parseExpression(0) - if err != nil { - return ASTNode{}, err - } - if err := p.match(tRbracket); err != nil { - return ASTNode{}, err - } - if p.current() == tFlatten { - right = ASTNode{nodeType: ASTIdentity} - } else { - right, err = p.parseProjectionRHS(bindingPowers[tFilter]) - if err != nil { - return ASTNode{}, err - } - } - - return ASTNode{ - nodeType: ASTFilterProjection, - children: []ASTNode{node, right, condition}, - }, nil -} - -func (p *Parser) parseDotRHS(bindingPower int) (ASTNode, error) { - lookahead := p.current() - if tokensOneOf([]tokType{tQuotedIdentifier, tUnquotedIdentifier, tStar}, lookahead) { - return p.parseExpression(bindingPower) - } else if lookahead == tLbracket { - if err := p.match(tLbracket); err != nil { - return ASTNode{}, err - } - return p.parseMultiSelectList() - } else if lookahead == tLbrace { - if err := p.match(tLbrace); err != nil { - return ASTNode{}, err - } - return p.parseMultiSelectHash() - } - return ASTNode{}, p.syntaxError("Expected identifier, lbracket, or lbrace") -} - -func (p *Parser) parseProjectionRHS(bindingPower int) (ASTNode, error) { - current := p.current() - if bindingPowers[current] < 10 { - return ASTNode{nodeType: ASTIdentity}, nil - } else if current == tLbracket { - return p.parseExpression(bindingPower) - } else if current == tFilter { - return p.parseExpression(bindingPower) - } else if current == tDot { - err := p.match(tDot) - if err != nil { - return ASTNode{}, err - } - return p.parseDotRHS(bindingPower) - } else { - return ASTNode{}, p.syntaxError("Error") - } -} - -func (p *Parser) lookahead(number int) tokType { - return p.lookaheadToken(number).tokenType -} - -func (p *Parser) current() tokType { - return p.lookahead(0) -} - -func (p *Parser) lookaheadToken(number int) token { - return p.tokens[p.index+number] -} - -func (p *Parser) advance() { - p.index++ -} - -func tokensOneOf(elements []tokType, token tokType) bool { - for _, elem := range elements { - if elem == token { - return true - } - } - return false -} - -func (p *Parser) syntaxError(msg string) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: p.expression, - Offset: p.lookaheadToken(0).position, - } -} - -// Create a SyntaxError based on the provided token. -// This differs from syntaxError() which creates a SyntaxError -// based on the current lookahead token. -func (p *Parser) syntaxErrorToken(msg string, t token) SyntaxError { - return SyntaxError{ - msg: msg, - Expression: p.expression, - Offset: t.position, - } -} diff --git a/vendor/github.com/jmespath/go-jmespath/toktype_string.go b/vendor/github.com/jmespath/go-jmespath/toktype_string.go deleted file mode 100644 index dae79cbdf..000000000 --- a/vendor/github.com/jmespath/go-jmespath/toktype_string.go +++ /dev/null @@ -1,16 +0,0 @@ -// generated by stringer -type=tokType; DO NOT EDIT - -package jmespath - -import "fmt" - -const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" - -var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} - -func (i tokType) String() string { - if i < 0 || i >= tokType(len(_tokType_index)-1) { - return fmt.Sprintf("tokType(%d)", i) - } - return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] -} diff --git a/vendor/github.com/jmespath/go-jmespath/util.go b/vendor/github.com/jmespath/go-jmespath/util.go deleted file mode 100644 index ddc1b7d7d..000000000 --- a/vendor/github.com/jmespath/go-jmespath/util.go +++ /dev/null @@ -1,185 +0,0 @@ -package jmespath - -import ( - "errors" - "reflect" -) - -// IsFalse determines if an object is false based on the JMESPath spec. -// JMESPath defines false values to be any of: -// - An empty string array, or hash. -// - The boolean value false. -// - nil -func isFalse(value interface{}) bool { - switch v := value.(type) { - case bool: - return !v - case []interface{}: - return len(v) == 0 - case map[string]interface{}: - return len(v) == 0 - case string: - return len(v) == 0 - case nil: - return true - } - // Try the reflection cases before returning false. - rv := reflect.ValueOf(value) - switch rv.Kind() { - case reflect.Struct: - // A struct type will never be false, even if - // all of its values are the zero type. - return false - case reflect.Slice, reflect.Map: - return rv.Len() == 0 - case reflect.Ptr: - if rv.IsNil() { - return true - } - // If it's a pointer type, we'll try to deref the pointer - // and evaluate the pointer value for isFalse. - element := rv.Elem() - return isFalse(element.Interface()) - } - return false -} - -// ObjsEqual is a generic object equality check. -// It will take two arbitrary objects and recursively determine -// if they are equal. -func objsEqual(left interface{}, right interface{}) bool { - return reflect.DeepEqual(left, right) -} - -// SliceParam refers to a single part of a slice. -// A slice consists of a start, a stop, and a step, similar to -// python slices. -type sliceParam struct { - N int - Specified bool -} - -// Slice supports [start:stop:step] style slicing that's supported in JMESPath. -func slice(slice []interface{}, parts []sliceParam) ([]interface{}, error) { - computed, err := computeSliceParams(len(slice), parts) - if err != nil { - return nil, err - } - start, stop, step := computed[0], computed[1], computed[2] - result := []interface{}{} - if step > 0 { - for i := start; i < stop; i += step { - result = append(result, slice[i]) - } - } else { - for i := start; i > stop; i += step { - result = append(result, slice[i]) - } - } - return result, nil -} - -func computeSliceParams(length int, parts []sliceParam) ([]int, error) { - var start, stop, step int - if !parts[2].Specified { - step = 1 - } else if parts[2].N == 0 { - return nil, errors.New("Invalid slice, step cannot be 0") - } else { - step = parts[2].N - } - var stepValueNegative bool - if step < 0 { - stepValueNegative = true - } else { - stepValueNegative = false - } - - if !parts[0].Specified { - if stepValueNegative { - start = length - 1 - } else { - start = 0 - } - } else { - start = capSlice(length, parts[0].N, step) - } - - if !parts[1].Specified { - if stepValueNegative { - stop = -1 - } else { - stop = length - } - } else { - stop = capSlice(length, parts[1].N, step) - } - return []int{start, stop, step}, nil -} - -func capSlice(length int, actual int, step int) int { - if actual < 0 { - actual += length - if actual < 0 { - if step < 0 { - actual = -1 - } else { - actual = 0 - } - } - } else if actual >= length { - if step < 0 { - actual = length - 1 - } else { - actual = length - } - } - return actual -} - -// ToArrayNum converts an empty interface type to a slice of float64. -// If any element in the array cannot be converted, then nil is returned -// along with a second value of false. -func toArrayNum(data interface{}) ([]float64, bool) { - // Is there a better way to do this with reflect? - if d, ok := data.([]interface{}); ok { - result := make([]float64, len(d)) - for i, el := range d { - item, ok := el.(float64) - if !ok { - return nil, false - } - result[i] = item - } - return result, true - } - return nil, false -} - -// ToArrayStr converts an empty interface type to a slice of strings. -// If any element in the array cannot be converted, then nil is returned -// along with a second value of false. If the input data could be entirely -// converted, then the converted data, along with a second value of true, -// will be returned. -func toArrayStr(data interface{}) ([]string, bool) { - // Is there a better way to do this with reflect? - if d, ok := data.([]interface{}); ok { - result := make([]string, len(d)) - for i, el := range d { - item, ok := el.(string) - if !ok { - return nil, false - } - result[i] = item - } - return result, true - } - return nil, false -} - -func isSliceType(v interface{}) bool { - if v == nil { - return false - } - return reflect.TypeOf(v).Kind() == reflect.Slice -} diff --git a/vendor/github.com/klauspost/compress/zstd/dict.go b/vendor/github.com/klauspost/compress/zstd/dict.go index 8d5567fe6..b7b83164b 100644 --- a/vendor/github.com/klauspost/compress/zstd/dict.go +++ b/vendor/github.com/klauspost/compress/zstd/dict.go @@ -273,6 +273,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { enc.Encode(&block, b) addValues(&remain, block.literals) litTotal += len(block.literals) + if len(block.sequences) == 0 { + continue + } seqs += len(block.sequences) block.genCodes() addHist(&ll, block.coders.llEnc.Histogram()) @@ -286,6 +289,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { if offset == 0 { continue } + if int(offset) >= len(o.History) { + continue + } if offset > 3 { newOffsets[offset-3]++ } else { @@ -336,6 +342,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { if seqs/nUsed < 512 { // Use 512 as minimum. nUsed = seqs / 512 + if nUsed == 0 { + nUsed = 1 + } } copyHist := func(dst *fseEncoder, src *[256]int) ([]byte, error) { hist := dst.Histogram() @@ -358,6 +367,28 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { fakeLength += v hist[i] = uint32(v) } + + // Ensure we aren't trying to represent RLE. + if maxCount == fakeLength { + for i := range hist { + if uint8(i) == maxSym { + fakeLength++ + maxSym++ + hist[i+1] = 1 + if maxSym > 1 { + break + } + } + if hist[0] == 0 { + fakeLength++ + hist[i] = 1 + if maxSym > 1 { + break + } + } + } + } + dst.HistogramFinished(maxSym, maxCount) dst.reUsed = false dst.useRLE = false diff --git a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s index 17901e080..ae7d4d329 100644 --- a/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s +++ b/vendor/github.com/klauspost/compress/zstd/internal/xxhash/xxhash_arm64.s @@ -162,12 +162,12 @@ finalize: MOVD h, ret+24(FP) RET -// func writeBlocks(d *Digest, b []byte) int +// func writeBlocks(s *Digest, b []byte) int TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40 LDP ·primes+0(SB), (prime1, prime2) // Load state. Assume v[1-4] are stored contiguously. - MOVD d+0(FP), digest + MOVD s+0(FP), digest LDP 0(digest), (v1, v2) LDP 16(digest), (v3, v4) diff --git a/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s b/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s index 9a7655c0f..0782b86e3 100644 --- a/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s +++ b/vendor/github.com/klauspost/compress/zstd/matchlen_amd64.s @@ -5,7 +5,6 @@ #include "textflag.h" // func matchLen(a []byte, b []byte) int -// Requires: BMI TEXT ·matchLen(SB), NOSPLIT, $0-56 MOVQ a_base+0(FP), AX MOVQ b_base+24(FP), CX @@ -17,17 +16,16 @@ TEXT ·matchLen(SB), NOSPLIT, $0-56 JB matchlen_match4_standalone matchlen_loopback_standalone: - MOVQ (AX)(SI*1), BX - XORQ (CX)(SI*1), BX - TESTQ BX, BX - JZ matchlen_loop_standalone + MOVQ (AX)(SI*1), BX + XORQ (CX)(SI*1), BX + JZ matchlen_loop_standalone #ifdef GOAMD64_v3 TZCNTQ BX, BX #else BSFQ BX, BX #endif - SARQ $0x03, BX + SHRL $0x03, BX LEAL (SI)(BX*1), SI JMP gen_match_len_end diff --git a/vendor/github.com/mostynb/go-grpc-compression/internal/zstd/zstd.go b/vendor/github.com/mostynb/go-grpc-compression/internal/zstd/zstd.go new file mode 100644 index 000000000..66e509113 --- /dev/null +++ b/vendor/github.com/mostynb/go-grpc-compression/internal/zstd/zstd.go @@ -0,0 +1,146 @@ +// Copyright 2020 Mostyn Bramley-Moore. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package zstd is a wrapper for using github.com/klauspost/compress/zstd +// with gRPC. +package zstd + +import ( + "bytes" + "errors" + "io" + "runtime" + "sync" + + "github.com/klauspost/compress/zstd" + "google.golang.org/grpc/encoding" +) + +const Name = "zstd" + +var encoderOptions = []zstd.EOption{ + // The default zstd window size is 8MB, which is much larger than the + // typical RPC message and wastes a bunch of memory. + zstd.WithWindowSize(512 * 1024), +} + +var decoderOptions = []zstd.DOption{ + // If the decoder concurrency level is not 1, we would need to call + // Close() to avoid leaking resources when the object is released + // from compressor.decoderPool. + zstd.WithDecoderConcurrency(1), +} + +// We will set a finalizer on these objects, so when the go-grpc code is +// finished with them, they will be added back to compressor.decoderPool. +type decoderWrapper struct { + *zstd.Decoder +} + +type compressor struct { + encoder *zstd.Encoder + decoderPool sync.Pool // To hold *zstd.Decoder's. +} + +func PretendInit(clobbering bool) { + if !clobbering && encoding.GetCompressor(Name) != nil { + return + } + + enc, _ := zstd.NewWriter(nil, encoderOptions...) + c := &compressor{ + encoder: enc, + } + encoding.RegisterCompressor(c) +} + +var ErrNotInUse = errors.New("SetLevel ineffective because another zstd compressor has been registered") + +// SetLevel updates the registered compressor to use a particular compression +// level. NOTE: this function must only be called from an init function, and +// is not threadsafe. +func SetLevel(level zstd.EncoderLevel) error { + c, ok := encoding.GetCompressor(Name).(*compressor) + if !ok { + return ErrNotInUse + } + + enc, err := zstd.NewWriter(nil, zstd.WithEncoderLevel(level)) + if err != nil { + return err + } + + c.encoder = enc + return nil +} + +func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) { + return &zstdWriteCloser{ + enc: c.encoder, + writer: w, + }, nil +} + +type zstdWriteCloser struct { + enc *zstd.Encoder + writer io.Writer // Compressed data will be written here. + buf bytes.Buffer // Buffer uncompressed data here, compress on Close. +} + +func (z *zstdWriteCloser) Write(p []byte) (int, error) { + return z.buf.Write(p) +} + +func (z *zstdWriteCloser) Close() error { + compressed := z.enc.EncodeAll(z.buf.Bytes(), nil) + _, err := io.Copy(z.writer, bytes.NewReader(compressed)) + return err +} + +func (c *compressor) Decompress(r io.Reader) (io.Reader, error) { + var err error + var found bool + var decoder *zstd.Decoder + + // Note: avoid the use of zstd.Decoder.DecodeAll here, since + // malicious payloads could DoS us with a decompression bomb. + + decoder, found = c.decoderPool.Get().(*zstd.Decoder) + if !found { + decoder, err = zstd.NewReader(r, decoderOptions...) + if err != nil { + return nil, err + } + } else { + err = decoder.Reset(r) + if err != nil { + c.decoderPool.Put(decoder) + return nil, err + } + } + + wrapper := &decoderWrapper{Decoder: decoder} + runtime.SetFinalizer(wrapper, func(dw *decoderWrapper) { + err := dw.Reset(nil) + if err == nil { + c.decoderPool.Put(dw.Decoder) + } + }) + + return wrapper, nil +} + +func (c *compressor) Name() string { + return Name +} diff --git a/vendor/github.com/mostynb/go-grpc-compression/nonclobbering/zstd/zstd.go b/vendor/github.com/mostynb/go-grpc-compression/nonclobbering/zstd/zstd.go new file mode 100644 index 000000000..18b94d93f --- /dev/null +++ b/vendor/github.com/mostynb/go-grpc-compression/nonclobbering/zstd/zstd.go @@ -0,0 +1,52 @@ +// Copyright 2023 Mostyn Bramley-Moore. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package github.com/mostynb/go-grpc-compression/nonclobbering/zstd is a +// wrapper for using github.com/klauspost/compress/zstd with gRPC. +// +// If you import this package, it will only register itself as the encoder +// for the "zstd" compressor if no other compressors have already been +// registered with that name. +// +// If you do want to override previously registered "zstd" compressors, +// then you should instead import +// github.com/mostynb/go-grpc-compression/zstd +package zstd + +import ( + internalzstd "github.com/mostynb/go-grpc-compression/internal/zstd" + + "github.com/klauspost/compress/zstd" +) + +const Name = internalzstd.Name + +func init() { + clobbering := false + internalzstd.PretendInit(clobbering) +} + +var ErrNotInUse = internalzstd.ErrNotInUse + +// SetLevel updates the registered compressor to use a particular compression +// level. Returns ErrNotInUse if this module isn't registered (because it has +// been overridden by another encoder with the same name), or any error +// returned by zstd.NewWriter(nil, zstd.WithEncoderLevel(level). +// +// NOTE: this function is not threadsafe and must only be called from an init +// function or from the main goroutine before any other goroutines have been +// created. +func SetLevel(level zstd.EncoderLevel) error { + return internalzstd.SetLevel(level) +} diff --git a/vendor/go.opentelemetry.io/collector/component/component.go b/vendor/go.opentelemetry.io/collector/component/component.go index 794fc9235..f5f68b572 100644 --- a/vendor/go.opentelemetry.io/collector/component/component.go +++ b/vendor/go.opentelemetry.io/collector/component/component.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Package component outlines the abstraction of components within the OpenTelemetry Collector. It provides details on the component +// Package component outlines the abstraction of components within the OpenTelemetry Collector. It provides details on the component // lifecycle as well as defining the interface that components must fulfill. package component // import "go.opentelemetry.io/collector/component" @@ -11,12 +11,12 @@ import ( ) var ( - // ErrDataTypeIsNotSupported can be returned by receiver, exporter or processor factory funcs that create the - // Component if the particular telemetry data type is not supported by the receiver, exporter or processor. + // ErrDataTypeIsNotSupported can be returned by receiver, exporter, processor or connector factory funcs that create the + // Component if the particular telemetry data type is not supported by the receiver, exporter, processor or connector factory. ErrDataTypeIsNotSupported = errors.New("telemetry type is not supported") ) -// Component is either a receiver, exporter, processor, or an extension. +// Component is either a receiver, exporter, processor, connector, or an extension. // // A component's lifecycle has the following phases: // @@ -174,7 +174,7 @@ type Factory interface { // CreateDefaultConfig creates the default configuration for the Component. // This method can be called multiple times depending on the pipeline - // configuration and should not cause side-effects that prevent the creation + // configuration and should not cause side effects that prevent the creation // of multiple instances of the Component. // The object returned by this method needs to pass the checks implemented by // 'componenttest.CheckConfigStruct'. It is recommended to have these checks in the diff --git a/vendor/go.opentelemetry.io/collector/component/config.go b/vendor/go.opentelemetry.io/collector/component/config.go index b53ff872f..b961d1fdb 100644 --- a/vendor/go.opentelemetry.io/collector/component/config.go +++ b/vendor/go.opentelemetry.io/collector/component/config.go @@ -9,8 +9,6 @@ import ( "regexp" "go.uber.org/multierr" - - "go.opentelemetry.io/collector/confmap" ) // Config defines the configuration for a component.Component. @@ -26,12 +24,6 @@ type Config any // for an interface type Foo is to use a *Foo value. var configValidatorType = reflect.TypeOf((*ConfigValidator)(nil)).Elem() -// UnmarshalConfig helper function to UnmarshalConfig a Config. -// Deprecated: [v0.101.0] Use conf.Unmarshal(&intoCfg) -func UnmarshalConfig(conf *confmap.Conf, intoCfg Config) error { - return conf.Unmarshal(intoCfg) -} - // ConfigValidator defines an optional interface for configurations to implement to do validation. type ConfigValidator interface { // Validate the configuration and returns an error if invalid. @@ -91,7 +83,7 @@ func callValidateIfPossible(v reflect.Value) error { } // If the pointer type implements ConfigValidator call Validate on the pointer to the current value. - if reflect.PtrTo(v.Type()).Implements(configValidatorType) { + if reflect.PointerTo(v.Type()).Implements(configValidatorType) { // If not addressable, then create a new *V pointer and set the value to current v. if !v.CanAddr() { pv := reflect.New(reflect.PtrTo(v.Type()).Elem()) diff --git a/vendor/go.opentelemetry.io/collector/component/host.go b/vendor/go.opentelemetry.io/collector/component/host.go index 50472a6d8..4c98ee70f 100644 --- a/vendor/go.opentelemetry.io/collector/component/host.go +++ b/vendor/go.opentelemetry.io/collector/component/host.go @@ -20,7 +20,7 @@ type Host interface { GetFactory(kind Kind, componentType Type) Factory // GetExtensions returns the map of extensions. Only enabled and created extensions will be returned. - // Typically is used to find an extension by type or by full config name. Both cases + // Typically, it is used to find an extension by type or by full config name. Both cases // can be done by iterating the returned map. There are typically very few extensions, // so there are no performance implications due to iteration. // diff --git a/vendor/go.opentelemetry.io/collector/component/telemetry.go b/vendor/go.opentelemetry.io/collector/component/telemetry.go index 17ca3dcab..6f8f0ec84 100644 --- a/vendor/go.opentelemetry.io/collector/component/telemetry.go +++ b/vendor/go.opentelemetry.io/collector/component/telemetry.go @@ -15,8 +15,8 @@ import ( // TelemetrySettings provides components with APIs to report telemetry. // // Note: there is a service version of this struct, servicetelemetry.TelemetrySettings, that mirrors -// this struct with the exception of ReportStatus. When adding or removing anything from -// this struct consider whether or not the same should be done for the service version. +// this struct except ReportStatus. When adding or removing anything from +// this struct consider whether the same should be done for the service version. type TelemetrySettings struct { // Logger that the factory can use during creation and can pass to the created // component to be used later as well. @@ -37,6 +37,7 @@ type TelemetrySettings struct { // ReportStatus allows a component to report runtime changes in status. The service // will automatically report status for a component during startup and shutdown. Components can - // use this method to report status after start and before shutdown. + // use this method to report status after start and before shutdown. For more details about + // component status reporting see: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-status.md ReportStatus func(*StatusEvent) } diff --git a/vendor/go.opentelemetry.io/collector/config/configauth/configauth.go b/vendor/go.opentelemetry.io/collector/config/configauth/configauth.go index aa7002c27..dc275f705 100644 --- a/vendor/go.opentelemetry.io/collector/config/configauth/configauth.go +++ b/vendor/go.opentelemetry.io/collector/config/configauth/configauth.go @@ -7,6 +7,7 @@ package configauth // import "go.opentelemetry.io/collector/config/configauth" import ( + "context" "errors" "fmt" @@ -33,7 +34,15 @@ func NewDefaultAuthentication() *Authentication { // GetServerAuthenticator attempts to select the appropriate auth.Server from the list of extensions, // based on the requested extension name. If an authenticator is not found, an error is returned. +// +// Deprecated: [v0.103.0] Use GetServerAuthenticatorContext instead. func (a Authentication) GetServerAuthenticator(extensions map[component.ID]component.Component) (auth.Server, error) { + return a.GetServerAuthenticatorContext(context.Background(), extensions) +} + +// GetServerAuthenticatorContext attempts to select the appropriate auth.Server from the list of extensions, +// based on the requested extension name. If an authenticator is not found, an error is returned. +func (a Authentication) GetServerAuthenticatorContext(_ context.Context, extensions map[component.ID]component.Component) (auth.Server, error) { if ext, found := extensions[a.AuthenticatorID]; found { if server, ok := ext.(auth.Server); ok { return server, nil @@ -44,10 +53,15 @@ func (a Authentication) GetServerAuthenticator(extensions map[component.ID]compo return nil, fmt.Errorf("failed to resolve authenticator %q: %w", a.AuthenticatorID, errAuthenticatorNotFound) } -// GetClientAuthenticator attempts to select the appropriate auth.Client from the list of extensions, +// Deprecated: [v0.103.0] Use GetClientAuthenticatorContext instead. +func (a Authentication) GetClientAuthenticator(extensions map[component.ID]component.Component) (auth.Client, error) { + return a.GetClientAuthenticatorContext(context.Background(), extensions) +} + +// GetClientAuthenticatorContext attempts to select the appropriate auth.Client from the list of extensions, // based on the component id of the extension. If an authenticator is not found, an error is returned. // This should be only used by HTTP clients. -func (a Authentication) GetClientAuthenticator(extensions map[component.ID]component.Component) (auth.Client, error) { +func (a Authentication) GetClientAuthenticatorContext(_ context.Context, extensions map[component.ID]component.Component) (auth.Client, error) { if ext, found := extensions[a.AuthenticatorID]; found { if client, ok := ext.(auth.Client); ok { return client, nil diff --git a/vendor/go.opentelemetry.io/collector/config/configgrpc/configgrpc.go b/vendor/go.opentelemetry.io/collector/config/configgrpc/configgrpc.go index b57a19946..87e7b83d7 100644 --- a/vendor/go.opentelemetry.io/collector/config/configgrpc/configgrpc.go +++ b/vendor/go.opentelemetry.io/collector/config/configgrpc/configgrpc.go @@ -12,6 +12,7 @@ import ( "time" "github.com/mostynb/go-grpc-compression/nonclobbering/snappy" + "github.com/mostynb/go-grpc-compression/nonclobbering/zstd" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "go.opentelemetry.io/otel" "google.golang.org/grpc" @@ -27,7 +28,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configauth" "go.opentelemetry.io/collector/config/configcompression" - grpcInternal "go.opentelemetry.io/collector/config/configgrpc/internal" "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configtelemetry" @@ -218,8 +218,8 @@ func (gcs *ClientConfig) isSchemeHTTPS() bool { // a non-blocking dial (the function won't wait for connections to be // established, and connecting happens in the background). To make it a blocking // dial, use grpc.WithBlock() dial option. -func (gcs *ClientConfig) ToClientConn(_ context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error) { - opts, err := gcs.toDialOptions(host, settings) +func (gcs *ClientConfig) ToClientConn(ctx context.Context, host component.Host, settings component.TelemetrySettings, extraOpts ...grpc.DialOption) (*grpc.ClientConn, error) { + opts, err := gcs.toDialOptions(ctx, host, settings) if err != nil { return nil, err } @@ -227,7 +227,7 @@ func (gcs *ClientConfig) ToClientConn(_ context.Context, host component.Host, se return grpc.NewClient(gcs.sanitizedEndpoint(), opts...) } -func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) { +func (gcs *ClientConfig) toDialOptions(ctx context.Context, host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) { var opts []grpc.DialOption if gcs.Compression.IsCompressed() { cp, err := getGRPCCompressionName(gcs.Compression) @@ -237,7 +237,7 @@ func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.T opts = append(opts, grpc.WithDefaultCallOptions(grpc.UseCompressor(cp))) } - tlsCfg, err := gcs.TLSSetting.LoadTLSConfig(context.Background()) + tlsCfg, err := gcs.TLSSetting.LoadTLSConfig(ctx) if err != nil { return nil, err } @@ -271,7 +271,7 @@ func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.T return nil, errors.New("no extensions configuration available") } - grpcAuthenticator, cerr := gcs.Auth.GetClientAuthenticator(host.GetExtensions()) + grpcAuthenticator, cerr := gcs.Auth.GetClientAuthenticatorContext(ctx, host.GetExtensions()) if cerr != nil { return nil, cerr } @@ -387,7 +387,7 @@ func (gss *ServerConfig) toServerOption(host component.Host, settings component. var sInterceptors []grpc.StreamServerInterceptor if gss.Auth != nil { - authenticator, err := gss.Auth.GetServerAuthenticator(host.GetExtensions()) + authenticator, err := gss.Auth.GetServerAuthenticatorContext(context.Background(), host.GetExtensions()) if err != nil { return nil, err } @@ -426,7 +426,7 @@ func getGRPCCompressionName(compressionType configcompression.Type) (string, err case configcompression.TypeSnappy: return snappy.Name, nil case configcompression.TypeZstd: - return grpcInternal.ZstdName, nil + return zstd.Name, nil default: return "", fmt.Errorf("unsupported compression type %q", compressionType) } diff --git a/vendor/go.opentelemetry.io/collector/config/configgrpc/internal/zstd.go b/vendor/go.opentelemetry.io/collector/config/configgrpc/internal/zstd.go deleted file mode 100644 index 0718b7353..000000000 --- a/vendor/go.opentelemetry.io/collector/config/configgrpc/internal/zstd.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright The OpenTelemetry Authors -// Copyright 2017 gRPC authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/config/configgrpc/internal" - -import ( - "errors" - "io" - "sync" - - "github.com/klauspost/compress/zstd" - "google.golang.org/grpc/encoding" -) - -const ZstdName = "zstd" - -func init() { - encoding.RegisterCompressor(NewZstdCodec()) -} - -type writer struct { - *zstd.Encoder - pool *sync.Pool -} - -func NewZstdCodec() encoding.Compressor { - c := &compressor{} - c.poolCompressor.New = func() any { - zw, _ := zstd.NewWriter(nil, zstd.WithEncoderConcurrency(1), zstd.WithWindowSize(512*1024)) - return &writer{Encoder: zw, pool: &c.poolCompressor} - } - return c -} - -func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) { - z := c.poolCompressor.Get().(*writer) - z.Encoder.Reset(w) - return z, nil -} - -func (z *writer) Close() error { - defer z.pool.Put(z) - return z.Encoder.Close() -} - -type reader struct { - *zstd.Decoder - pool *sync.Pool -} - -func (c *compressor) Decompress(r io.Reader) (io.Reader, error) { - z, inPool := c.poolDecompressor.Get().(*reader) - if !inPool { - newZ, err := zstd.NewReader(r) - if err != nil { - return nil, err - } - return &reader{Decoder: newZ, pool: &c.poolDecompressor}, nil - } - if err := z.Reset(r); err != nil { - c.poolDecompressor.Put(z) - return nil, err - } - return z, nil -} - -func (z *reader) Read(p []byte) (n int, err error) { - n, err = z.Decoder.Read(p) - if errors.Is(err, io.EOF) { - z.pool.Put(z) - } - return n, err -} - -func (c *compressor) Name() string { - return ZstdName -} - -type compressor struct { - poolCompressor sync.Pool - poolDecompressor sync.Pool -} diff --git a/vendor/go.opentelemetry.io/collector/config/confighttp/README.md b/vendor/go.opentelemetry.io/collector/config/confighttp/README.md index a0227c240..2a6b0e7fd 100644 --- a/vendor/go.opentelemetry.io/collector/config/confighttp/README.md +++ b/vendor/go.opentelemetry.io/collector/config/confighttp/README.md @@ -34,6 +34,8 @@ README](../configtls/README.md). - [`disable_keep_alives`](https://golang.org/pkg/net/http/#Transport) - [`http2_read_idle_timeout`](https://pkg.go.dev/golang.org/x/net/http2#Transport) - [`http2_ping_timeout`](https://pkg.go.dev/golang.org/x/net/http2#Transport) +- [`cookies`](https://pkg.go.dev/net/http#CookieJar) + - [`enabled`] if enabled, the client will store cookies from server responses and reuse them in subsequent requests. Example: @@ -51,6 +53,8 @@ exporter: test1: "value1" "test 2": "value 2" compression: zstd + cookies: + enabled: true ``` ## Server Configuration @@ -75,6 +79,7 @@ will not be enabled. not set, browsers use a default of 5 seconds. - `endpoint`: Valid value syntax available [here](https://github.com/grpc/grpc/blob/master/doc/naming.md) - `max_request_body_size`: configures the maximum allowed body size in bytes for a single request. Default: `0` (no restriction) +- `compression_algorithms`: configures the list of compression algorithms the server can accept. Default: ["", "gzip", "zstd", "zlib", "snappy", "deflate"] - [`tls`](../configtls/README.md) - [`auth`](../configauth/README.md) @@ -98,6 +103,7 @@ receivers: - Example-Header max_age: 7200 endpoint: 0.0.0.0:55690 + compression_algorithms: ["", "gzip"] processors: attributes: actions: diff --git a/vendor/go.opentelemetry.io/collector/config/confighttp/compression.go b/vendor/go.opentelemetry.io/collector/config/confighttp/compression.go index a700bec84..4498fefe8 100644 --- a/vendor/go.opentelemetry.io/collector/config/confighttp/compression.go +++ b/vendor/go.opentelemetry.io/collector/config/confighttp/compression.go @@ -25,6 +25,53 @@ type compressRoundTripper struct { compressor *compressor } +var availableDecoders = map[string]func(body io.ReadCloser) (io.ReadCloser, error){ + "": func(io.ReadCloser) (io.ReadCloser, error) { + // Not a compressed payload. Nothing to do. + return nil, nil + }, + "gzip": func(body io.ReadCloser) (io.ReadCloser, error) { + gr, err := gzip.NewReader(body) + if err != nil { + return nil, err + } + return gr, nil + }, + "zstd": func(body io.ReadCloser) (io.ReadCloser, error) { + zr, err := zstd.NewReader( + body, + // Concurrency 1 disables async decoding. We don't need async decoding, it is pointless + // for our use-case (a server accepting decoding http requests). + // Disabling async improves performance (I benchmarked it previously when working + // on https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/23257). + zstd.WithDecoderConcurrency(1), + ) + if err != nil { + return nil, err + } + return zr.IOReadCloser(), nil + }, + "zlib": func(body io.ReadCloser) (io.ReadCloser, error) { + zr, err := zlib.NewReader(body) + if err != nil { + return nil, err + } + return zr, nil + }, + "snappy": func(body io.ReadCloser) (io.ReadCloser, error) { + sr := snappy.NewReader(body) + sb := new(bytes.Buffer) + _, err := io.Copy(sb, sr) + if err != nil { + return nil, err + } + if err = body.Close(); err != nil { + return nil, err + } + return io.NopCloser(sb), nil + }, +} + func newCompressRoundTripper(rt http.RoundTripper, compressionType configcompression.Type) (*compressRoundTripper, error) { encoder, err := newCompressor(compressionType) if err != nil { @@ -77,64 +124,27 @@ type decompressor struct { // by identifying the compression format in the "Content-Encoding" header and re-writing // request body so that the handlers further in the chain can work on decompressed data. // It supports gzip and deflate/zlib compression. -func httpContentDecompressor(h http.Handler, maxRequestBodySize int64, eh func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int), decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error)) http.Handler { +func httpContentDecompressor(h http.Handler, maxRequestBodySize int64, eh func(w http.ResponseWriter, r *http.Request, errorMsg string, statusCode int), enableDecoders []string, decoders map[string]func(body io.ReadCloser) (io.ReadCloser, error)) http.Handler { errHandler := defaultErrorHandler if eh != nil { errHandler = eh } + enabled := map[string]func(body io.ReadCloser) (io.ReadCloser, error){} + for _, dec := range enableDecoders { + enabled[dec] = availableDecoders[dec] + + if dec == "deflate" { + enabled["deflate"] = availableDecoders["zlib"] + } + } + d := &decompressor{ maxRequestBodySize: maxRequestBodySize, errHandler: errHandler, base: h, - decoders: map[string]func(body io.ReadCloser) (io.ReadCloser, error){ - "": func(io.ReadCloser) (io.ReadCloser, error) { - // Not a compressed payload. Nothing to do. - return nil, nil - }, - "gzip": func(body io.ReadCloser) (io.ReadCloser, error) { - gr, err := gzip.NewReader(body) - if err != nil { - return nil, err - } - return gr, nil - }, - "zstd": func(body io.ReadCloser) (io.ReadCloser, error) { - zr, err := zstd.NewReader( - body, - // Concurrency 1 disables async decoding. We don't need async decoding, it is pointless - // for our use-case (a server accepting decoding http requests). - // Disabling async improves performance (I benchmarked it previously when working - // on https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/23257). - zstd.WithDecoderConcurrency(1), - ) - if err != nil { - return nil, err - } - return zr.IOReadCloser(), nil - }, - "zlib": func(body io.ReadCloser) (io.ReadCloser, error) { - zr, err := zlib.NewReader(body) - if err != nil { - return nil, err - } - return zr, nil - }, - "snappy": func(body io.ReadCloser) (io.ReadCloser, error) { - sr := snappy.NewReader(body) - sb := new(bytes.Buffer) - _, err := io.Copy(sb, sr) - if err != nil { - return nil, err - } - if err = body.Close(); err != nil { - return nil, err - } - return io.NopCloser(sb), nil - }, - }, + decoders: enabled, } - d.decoders["deflate"] = d.decoders["zlib"] for key, dec := range decoders { d.decoders[key] = dec diff --git a/vendor/go.opentelemetry.io/collector/config/confighttp/confighttp.go b/vendor/go.opentelemetry.io/collector/config/confighttp/confighttp.go index 71b2f17ee..fa6ff7953 100644 --- a/vendor/go.opentelemetry.io/collector/config/confighttp/confighttp.go +++ b/vendor/go.opentelemetry.io/collector/config/confighttp/confighttp.go @@ -11,6 +11,7 @@ import ( "io" "net" "net/http" + "net/http/cookiejar" "net/url" "time" @@ -18,6 +19,7 @@ import ( "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "go.opentelemetry.io/otel" "golang.org/x/net/http2" + "golang.org/x/net/publicsuffix" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configauth" @@ -31,6 +33,7 @@ import ( const headerContentEncoding = "Content-Encoding" const defaultMaxRequestBodySize = 20 * 1024 * 1024 // 20MiB +var defaultCompressionAlgorithms = []string{"", "gzip", "zstd", "zlib", "snappy", "deflate"} // ClientConfig defines settings for creating an HTTP client. type ClientConfig struct { @@ -58,7 +61,10 @@ type ClientConfig struct { Headers map[string]configopaque.String `mapstructure:"headers"` // Custom Round Tripper to allow for individual components to intercept HTTP requests - CustomRoundTripper func(next http.RoundTripper) (http.RoundTripper, error) + // + // Deprecated: [v0.103.0] Set (*http.Client).Transport on the *http.Client returned from ToClient + // to configure this. + CustomRoundTripper func(next http.RoundTripper) (http.RoundTripper, error) `mapstructure:"-"` // Auth configuration for outgoing HTTP calls. Auth *configauth.Authentication `mapstructure:"auth"` @@ -100,6 +106,14 @@ type ClientConfig struct { // HTTP2PingTimeout if there's no response to the ping within the configured value, the connection will be closed. // If not set or set to 0, it defaults to 15s. HTTP2PingTimeout time.Duration `mapstructure:"http2_ping_timeout"` + // Cookies configures the cookie management of the HTTP client. + Cookies *CookiesConfig `mapstructure:"cookies"` +} + +// CookiesConfig defines the configuration of the HTTP client regarding cookies served by the server. +type CookiesConfig struct { + // Enabled if true, cookies from HTTP responses will be reused in further HTTP requests with the same server. + Enabled bool `mapstructure:"enabled"` } // NewDefaultClientConfig returns ClientConfig type object with @@ -181,7 +195,7 @@ func (hcs *ClientConfig) ToClient(ctx context.Context, host component.Host, sett return nil, errors.New("extensions configuration not found") } - httpCustomAuthRoundTripper, aerr := hcs.Auth.GetClientAuthenticator(ext) + httpCustomAuthRoundTripper, aerr := hcs.Auth.GetClientAuthenticatorContext(ctx, ext) if aerr != nil { return nil, aerr } @@ -228,9 +242,18 @@ func (hcs *ClientConfig) ToClient(ctx context.Context, host component.Host, sett } } + var jar http.CookieJar + if hcs.Cookies != nil && hcs.Cookies.Enabled { + jar, err = cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List}) + if err != nil { + return nil, err + } + } + return &http.Client{ Transport: clientTransport, Timeout: hcs.Timeout, + Jar: jar, }, nil } @@ -280,6 +303,9 @@ type ServerConfig struct { // Additional headers attached to each HTTP response sent to the client. // Header values are opaque since they may be sensitive. ResponseHeaders map[string]configopaque.String `mapstructure:"response_headers"` + + // CompressionAlgorithms configures the list of compression algorithms the server can accept. Default: ["", "gzip", "zstd", "zlib", "snappy", "deflate"] + CompressionAlgorithms []string `mapstructure:"compression_algorithms"` } // ToListener creates a net.Listener. @@ -345,14 +371,18 @@ func (hss *ServerConfig) ToServer(_ context.Context, host component.Host, settin hss.MaxRequestBodySize = defaultMaxRequestBodySize } - handler = httpContentDecompressor(handler, hss.MaxRequestBodySize, serverOpts.errHandler, serverOpts.decoders) + if hss.CompressionAlgorithms == nil { + hss.CompressionAlgorithms = defaultCompressionAlgorithms + } + + handler = httpContentDecompressor(handler, hss.MaxRequestBodySize, serverOpts.errHandler, hss.CompressionAlgorithms, serverOpts.decoders) if hss.MaxRequestBodySize > 0 { handler = maxRequestBodySizeInterceptor(handler, hss.MaxRequestBodySize) } if hss.Auth != nil { - server, err := hss.Auth.GetServerAuthenticator(host.GetExtensions()) + server, err := hss.Auth.GetServerAuthenticatorContext(context.Background(), host.GetExtensions()) if err != nil { return nil, err } diff --git a/vendor/go.opentelemetry.io/collector/config/configtls/README.md b/vendor/go.opentelemetry.io/collector/config/configtls/README.md index aecfc284b..cdc8d3166 100644 --- a/vendor/go.opentelemetry.io/collector/config/configtls/README.md +++ b/vendor/go.opentelemetry.io/collector/config/configtls/README.md @@ -122,6 +122,7 @@ Beyond TLS configuration, the following setting can optionally be configured client certificate. (optional) This sets the ClientCAs and ClientAuth to RequireAndVerifyClientCert in the TLSConfig. Please refer to https://godoc.org/crypto/tls#Config for more information. +- `client_ca_file_reload` (default = false): Reload the ClientCAs file when it is modified. Example: diff --git a/vendor/go.opentelemetry.io/collector/confmap/README.md b/vendor/go.opentelemetry.io/collector/confmap/README.md index 42dcf548d..bfa24c8bc 100644 --- a/vendor/go.opentelemetry.io/collector/confmap/README.md +++ b/vendor/go.opentelemetry.io/collector/confmap/README.md @@ -102,3 +102,60 @@ configuration retrieved via the `Provider` used to retrieve the “initial” co ``` The `Resolver` does that by passing an `onChange` func to each `Provider.Retrieve` call and capturing all watch events. + +## Troubleshooting + +### Null Maps + +Due to how our underlying merge library, [koanf](https://github.com/knadh/koanf), behaves, configuration resolution +will treat configuration such as + +```yaml +processors: +``` + +as null, which is a valid value. As a result if you have configuration `A`: + +```yaml +receivers: + nop: + +processors: + nop: + +exporters: + nop: + +extensions: + nop: + +service: + extensions: [nop] + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [nop] +``` + +and configuration `B`: + +```yaml +processors: +``` + +and do `./otelcorecol --config A.yaml --config B.yaml` + +The result will be an error: + +``` +Error: invalid configuration: service::pipelines::traces: references processor "nop" which is not configured +2024/06/10 14:37:14 collector server run finished with error: invalid configuration: service::pipelines::traces: references processor "nop" which is not configured +``` + +This happens because configuration `B` sets `processors` to null, removing the `nop` processor defined in configuration `A`, +so the `nop` processor referenced in configuration `A`'s pipeline no longer exists. + +This situation can be remedied 2 ways: +1. Use `{}` when you want to represent an empty map, such as `processors: {}` instead of `processors:`. +2. Omit configuration like `processors:` from your configuration. diff --git a/vendor/go.opentelemetry.io/collector/confmap/confmap.go b/vendor/go.opentelemetry.io/collector/confmap/confmap.go index 8a32216a2..f24d12de1 100644 --- a/vendor/go.opentelemetry.io/collector/confmap/confmap.go +++ b/vendor/go.opentelemetry.io/collector/confmap/confmap.go @@ -16,6 +16,7 @@ import ( "github.com/knadh/koanf/providers/confmap" "github.com/knadh/koanf/v2" + "go.opentelemetry.io/collector/confmap/internal" encoder "go.opentelemetry.io/collector/confmap/internal/mapstructure" ) @@ -156,7 +157,7 @@ func decodeConfig(m *Conf, result any, errorUnused bool, skipTopLevelUnmarshaler ErrorUnused: errorUnused, Result: result, TagName: "mapstructure", - WeaklyTypedInput: true, + WeaklyTypedInput: !internal.StrictlyTypedInputGate.IsEnabled(), MatchName: caseSensitiveMatchName, DecodeHook: mapstructure.ComposeDecodeHookFunc( expandNilStructPointersHookFunc(), @@ -191,6 +192,7 @@ func decodeConfig(m *Conf, result any, errorUnused bool, skipTopLevelUnmarshaler func encoderConfig(rawVal any) *encoder.EncoderConfig { return &encoder.EncoderConfig{ EncodeHook: mapstructure.ComposeDecodeHookFunc( + encoder.YamlMarshalerHookFunc(), encoder.TextMarshalerHookFunc(), marshalerHookFunc(rawVal), ), diff --git a/vendor/go.opentelemetry.io/collector/confmap/expand.go b/vendor/go.opentelemetry.io/collector/confmap/expand.go index 768395f76..efc4bb959 100644 --- a/vendor/go.opentelemetry.io/collector/confmap/expand.go +++ b/vendor/go.opentelemetry.io/collector/confmap/expand.go @@ -11,6 +11,8 @@ import ( "regexp" "strconv" "strings" + + "go.opentelemetry.io/collector/confmap/internal" ) // schemePattern defines the regexp pattern for scheme names. @@ -111,22 +113,42 @@ func (mr *Resolver) findAndExpandURI(ctx context.Context, input string) (any, bo if uri == input { // If the value is a single URI, then the return value can be anything. // This is the case `foo: ${file:some_extra_config.yml}`. - return mr.expandURI(ctx, input) + ret, err := mr.expandURI(ctx, input) + if err != nil { + return input, false, err + } + + expanded, err := ret.AsRaw() + if err != nil { + return input, false, err + } + return expanded, true, err } - expanded, changed, err := mr.expandURI(ctx, uri) + expanded, err := mr.expandURI(ctx, uri) if err != nil { return input, false, err } - repl, err := toString(expanded) + + var repl string + if internal.StrictlyTypedInputGate.IsEnabled() { + repl, err = expanded.AsString() + } else { + repl, err = toString(expanded) + } if err != nil { return input, false, fmt.Errorf("expanding %v: %w", uri, err) } - return strings.ReplaceAll(input, uri, repl), changed, err + return strings.ReplaceAll(input, uri, repl), true, err } // toString attempts to convert input to a string. -func toString(input any) (string, error) { +func toString(ret *Retrieved) (string, error) { // This list must be kept in sync with checkRawConfType. + input, err := ret.AsRaw() + if err != nil { + return "", err + } + val := reflect.ValueOf(input) switch val.Kind() { case reflect.String: @@ -142,7 +164,7 @@ func toString(input any) (string, error) { } } -func (mr *Resolver) expandURI(ctx context.Context, input string) (any, bool, error) { +func (mr *Resolver) expandURI(ctx context.Context, input string) (*Retrieved, error) { // strip ${ and } uri := input[2 : len(input)-1] @@ -152,19 +174,18 @@ func (mr *Resolver) expandURI(ctx context.Context, input string) (any, bool, err lURI, err := newLocation(uri) if err != nil { - return nil, false, err + return nil, err } if strings.Contains(lURI.opaqueValue, "$") { - return nil, false, fmt.Errorf("the uri %q contains unsupported characters ('$')", lURI.asString()) + return nil, fmt.Errorf("the uri %q contains unsupported characters ('$')", lURI.asString()) } ret, err := mr.retrieveValue(ctx, lURI) if err != nil { - return nil, false, err + return nil, err } mr.closers = append(mr.closers, ret.Close) - val, err := ret.AsRaw() - return val, true, err + return ret, nil } type location struct { diff --git a/vendor/go.opentelemetry.io/collector/confmap/internal/featuregate.go b/vendor/go.opentelemetry.io/collector/confmap/internal/featuregate.go new file mode 100644 index 000000000..6e9b9ea87 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/confmap/internal/featuregate.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/confmap/internal" + +import "go.opentelemetry.io/collector/featuregate" + +const StrictlyTypedInputID = "confmap.strictlyTypedInput" + +var StrictlyTypedInputGate = featuregate.GlobalRegistry().MustRegister(StrictlyTypedInputID, + featuregate.StageAlpha, + featuregate.WithRegisterFromVersion("v0.103.0"), + featuregate.WithRegisterDescription("Makes type casting rules during configuration unmarshaling stricter. See https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/env-vars.md for more details."), +) diff --git a/vendor/go.opentelemetry.io/collector/confmap/internal/mapstructure/encoder.go b/vendor/go.opentelemetry.io/collector/confmap/internal/mapstructure/encoder.go index d0e222e08..994ad038f 100644 --- a/vendor/go.opentelemetry.io/collector/confmap/internal/mapstructure/encoder.go +++ b/vendor/go.opentelemetry.io/collector/confmap/internal/mapstructure/encoder.go @@ -11,6 +11,7 @@ import ( "strings" "github.com/go-viper/mapstructure/v2" + "gopkg.in/yaml.v3" ) const ( @@ -228,3 +229,35 @@ func TextMarshalerHookFunc() mapstructure.DecodeHookFuncValue { return string(out), nil } } + +// YamlMarshalerHookFunc returns a DecodeHookFuncValue that checks for structs +// that have yaml tags but no mapstructure tags. If found, it will convert the struct +// to map[string]any using the yaml package, which respects the yaml tags. Ultimately, +// this allows mapstructure to later marshal the map[string]any in a generic way. +func YamlMarshalerHookFunc() mapstructure.DecodeHookFuncValue { + return func(from reflect.Value, _ reflect.Value) (any, error) { + if from.Kind() == reflect.Struct { + for i := 0; i < from.NumField(); i++ { + if _, ok := from.Type().Field(i).Tag.Lookup("mapstructure"); ok { + // The struct has at least one mapstructure tag so don't do anything. + return from.Interface(), nil + } + + if _, ok := from.Type().Field(i).Tag.Lookup("yaml"); ok { + // The struct has at least one yaml tag, so convert it to map[string]any using yaml. + yamlBytes, err := yaml.Marshal(from.Interface()) + if err != nil { + return nil, err + } + var m map[string]any + err = yaml.Unmarshal(yamlBytes, &m) + if err != nil { + return nil, err + } + return m, nil + } + } + } + return from.Interface(), nil + } +} diff --git a/vendor/go.opentelemetry.io/collector/confmap/provider.go b/vendor/go.opentelemetry.io/collector/confmap/provider.go index 192577ed4..f774cca38 100644 --- a/vendor/go.opentelemetry.io/collector/confmap/provider.go +++ b/vendor/go.opentelemetry.io/collector/confmap/provider.go @@ -8,6 +8,7 @@ import ( "fmt" "go.uber.org/zap" + "gopkg.in/yaml.v3" ) // ProviderSettings are the settings to initialize a Provider. @@ -99,10 +100,15 @@ type ChangeEvent struct { type Retrieved struct { rawConf any closeFunc CloseFunc + + stringRepresentation string + isSetString bool } type retrievedSettings struct { - closeFunc CloseFunc + stringRepresentation string + isSetString bool + closeFunc CloseFunc } // RetrievedOption options to customize Retrieved values. @@ -116,6 +122,32 @@ func WithRetrievedClose(closeFunc CloseFunc) RetrievedOption { } } +func withStringRepresentation(stringRepresentation string) RetrievedOption { + return func(settings *retrievedSettings) { + settings.stringRepresentation = stringRepresentation + settings.isSetString = true + } +} + +// NewRetrievedFromYAML returns a new Retrieved instance that contains the deserialized data from the yaml bytes. +// * yamlBytes the yaml bytes that will be deserialized. +// * opts specifies options associated with this Retrieved value, such as CloseFunc. +func NewRetrievedFromYAML(yamlBytes []byte, opts ...RetrievedOption) (*Retrieved, error) { + var rawConf any + if err := yaml.Unmarshal(yamlBytes, &rawConf); err != nil { + return nil, err + } + + switch v := rawConf.(type) { + case string: + opts = append(opts, withStringRepresentation(v)) + case int, int32, int64, float32, float64, bool: + opts = append(opts, withStringRepresentation(string(yamlBytes))) + } + + return NewRetrieved(rawConf, opts...) +} + // NewRetrieved returns a new Retrieved instance that contains the data from the raw deserialized config. // The rawConf can be one of the following types: // - Primitives: int, int32, int64, float32, float64, bool, string; @@ -129,7 +161,12 @@ func NewRetrieved(rawConf any, opts ...RetrievedOption) (*Retrieved, error) { for _, opt := range opts { opt(&set) } - return &Retrieved{rawConf: rawConf, closeFunc: set.closeFunc}, nil + return &Retrieved{ + rawConf: rawConf, + closeFunc: set.closeFunc, + stringRepresentation: set.stringRepresentation, + isSetString: set.isSetString, + }, nil } // AsConf returns the retrieved configuration parsed as a Conf. @@ -152,6 +189,20 @@ func (r *Retrieved) AsRaw() (any, error) { return r.rawConf, nil } +// AsString returns the retrieved configuration as a string. +// If the retrieved configuration is not convertible to a string unambiguously, an error is returned. +// If the retrieved configuration is a string, the string is returned. +// This method is used to resolve ${} references in inline position. +func (r *Retrieved) AsString() (string, error) { + if !r.isSetString { + if str, ok := r.rawConf.(string); ok { + return str, nil + } + return "", fmt.Errorf("retrieved value does not have unambiguous string representation: %v", r.rawConf) + } + return r.stringRepresentation, nil +} + // Close and release any watchers that Provider.Retrieve may have created. // // Should block until all resources are closed, and guarantee that `onChange` is not diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporter.go b/vendor/go.opentelemetry.io/collector/exporter/exporter.go index 818fa3eca..d78e952dd 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporter.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporter.go @@ -31,8 +31,13 @@ type Logs interface { consumer.Logs } -// CreateSettings configures exporter creators. -type CreateSettings struct { +// CreateSettings configures Exporter creators. +// +// Deprecated: [v0.103.0] Use exporter.Settings instead. +type CreateSettings = Settings + +// Settings configures exporter creators. +type Settings struct { // ID returns the ID of the component that will be created. ID component.ID @@ -52,7 +57,7 @@ type Factory interface { // CreateTracesExporter creates a TracesExporter based on this config. // If the exporter type does not support tracing or if the config is not valid, // an error will be returned instead. - CreateTracesExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Traces, error) + CreateTracesExporter(ctx context.Context, set Settings, cfg component.Config) (Traces, error) // TracesExporterStability gets the stability level of the TracesExporter. TracesExporterStability() component.StabilityLevel @@ -60,7 +65,7 @@ type Factory interface { // CreateMetricsExporter creates a MetricsExporter based on this config. // If the exporter type does not support metrics or if the config is not valid, // an error will be returned instead. - CreateMetricsExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Metrics, error) + CreateMetricsExporter(ctx context.Context, set Settings, cfg component.Config) (Metrics, error) // MetricsExporterStability gets the stability level of the MetricsExporter. MetricsExporterStability() component.StabilityLevel @@ -68,7 +73,7 @@ type Factory interface { // CreateLogsExporter creates a LogsExporter based on the config. // If the exporter type does not support logs or if the config is not valid, // an error will be returned instead. - CreateLogsExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Logs, error) + CreateLogsExporter(ctx context.Context, set Settings, cfg component.Config) (Logs, error) // LogsExporterStability gets the stability level of the LogsExporter. LogsExporterStability() component.StabilityLevel @@ -92,10 +97,10 @@ func (f factoryOptionFunc) applyExporterFactoryOption(o *factory) { } // CreateTracesFunc is the equivalent of Factory.CreateTraces. -type CreateTracesFunc func(context.Context, CreateSettings, component.Config) (Traces, error) +type CreateTracesFunc func(context.Context, Settings, component.Config) (Traces, error) // CreateTracesExporter implements ExporterFactory.CreateTracesExporter(). -func (f CreateTracesFunc) CreateTracesExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Traces, error) { +func (f CreateTracesFunc) CreateTracesExporter(ctx context.Context, set Settings, cfg component.Config) (Traces, error) { if f == nil { return nil, component.ErrDataTypeIsNotSupported } @@ -103,10 +108,10 @@ func (f CreateTracesFunc) CreateTracesExporter(ctx context.Context, set CreateSe } // CreateMetricsFunc is the equivalent of Factory.CreateMetrics. -type CreateMetricsFunc func(context.Context, CreateSettings, component.Config) (Metrics, error) +type CreateMetricsFunc func(context.Context, Settings, component.Config) (Metrics, error) // CreateMetricsExporter implements ExporterFactory.CreateMetricsExporter(). -func (f CreateMetricsFunc) CreateMetricsExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Metrics, error) { +func (f CreateMetricsFunc) CreateMetricsExporter(ctx context.Context, set Settings, cfg component.Config) (Metrics, error) { if f == nil { return nil, component.ErrDataTypeIsNotSupported } @@ -114,10 +119,10 @@ func (f CreateMetricsFunc) CreateMetricsExporter(ctx context.Context, set Create } // CreateLogsFunc is the equivalent of Factory.CreateLogs. -type CreateLogsFunc func(context.Context, CreateSettings, component.Config) (Logs, error) +type CreateLogsFunc func(context.Context, Settings, component.Config) (Logs, error) // CreateLogsExporter implements Factory.CreateLogsExporter(). -func (f CreateLogsFunc) CreateLogsExporter(ctx context.Context, set CreateSettings, cfg component.Config) (Logs, error) { +func (f CreateLogsFunc) CreateLogsExporter(ctx context.Context, set Settings, cfg component.Config) (Logs, error) { if f == nil { return nil, component.ErrDataTypeIsNotSupported } @@ -214,7 +219,7 @@ func NewBuilder(cfgs map[component.ID]component.Config, factories map[component. } // CreateTraces creates a Traces exporter based on the settings and config. -func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings) (Traces, error) { +func (b *Builder) CreateTraces(ctx context.Context, set Settings) (Traces, error) { cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("exporter %q is not configured", set.ID) @@ -230,7 +235,7 @@ func (b *Builder) CreateTraces(ctx context.Context, set CreateSettings) (Traces, } // CreateMetrics creates a Metrics exporter based on the settings and config. -func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings) (Metrics, error) { +func (b *Builder) CreateMetrics(ctx context.Context, set Settings) (Metrics, error) { cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("exporter %q is not configured", set.ID) @@ -246,7 +251,7 @@ func (b *Builder) CreateMetrics(ctx context.Context, set CreateSettings) (Metric } // CreateLogs creates a Logs exporter based on the settings and config. -func (b *Builder) CreateLogs(ctx context.Context, set CreateSettings) (Logs, error) { +func (b *Builder) CreateLogs(ctx context.Context, set Settings) (Logs, error) { cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("exporter %q is not configured", set.ID) diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/batch_sender.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/batch_sender.go index 086c9724a..4d9635195 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/batch_sender.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/batch_sender.go @@ -30,13 +30,12 @@ type batchSender struct { // concurrencyLimit is the maximum number of goroutines that can be blocked by the batcher. // If this number is reached and all the goroutines are busy, the batch will be sent right away. // Populated from the number of queue consumers if queue is enabled. - concurrencyLimit uint64 - activeRequests atomic.Uint64 - - resetTimerCh chan struct{} + concurrencyLimit int64 + activeRequests atomic.Int64 mu sync.Mutex activeBatch *batch + lastFlushed time.Time logger *zap.Logger @@ -46,7 +45,7 @@ type batchSender struct { } // newBatchSender returns a new batch consumer component. -func newBatchSender(cfg exporterbatcher.Config, set exporter.CreateSettings, +func newBatchSender(cfg exporterbatcher.Config, set exporter.Settings, mf exporterbatcher.BatchMergeFunc[Request], msf exporterbatcher.BatchMergeSplitFunc[Request]) *batchSender { bs := &batchSender{ activeBatch: newEmptyBatch(), @@ -54,15 +53,15 @@ func newBatchSender(cfg exporterbatcher.Config, set exporter.CreateSettings, logger: set.Logger, mergeFunc: mf, mergeSplitFunc: msf, - shutdownCh: make(chan struct{}), + shutdownCh: nil, shutdownCompleteCh: make(chan struct{}), stopped: &atomic.Bool{}, - resetTimerCh: make(chan struct{}), } return bs } func (bs *batchSender) Start(_ context.Context, _ component.Host) error { + bs.shutdownCh = make(chan struct{}) timer := time.NewTimer(bs.cfg.FlushTimeout) go func() { for { @@ -84,16 +83,17 @@ func (bs *batchSender) Start(_ context.Context, _ component.Host) error { return case <-timer.C: bs.mu.Lock() + nextFlush := bs.cfg.FlushTimeout if bs.activeBatch.request != nil { - bs.exportActiveBatch() + sinceLastFlush := time.Since(bs.lastFlushed) + if sinceLastFlush >= bs.cfg.FlushTimeout { + bs.exportActiveBatch() + } else { + nextFlush = bs.cfg.FlushTimeout - sinceLastFlush + } } bs.mu.Unlock() - timer.Reset(bs.cfg.FlushTimeout) - case <-bs.resetTimerCh: - if !timer.Stop() { - <-timer.C - } - timer.Reset(bs.cfg.FlushTimeout) + timer.Reset(nextFlush) } } }() @@ -106,6 +106,10 @@ type batch struct { request Request done chan struct{} err error + + // requestsBlocked is the number of requests blocked in this batch + // that can be immediately released from activeRequests when batch sending completes. + requestsBlocked int64 } func newEmptyBatch() *batch { @@ -119,18 +123,14 @@ func newEmptyBatch() *batch { // Caller must hold the lock. func (bs *batchSender) exportActiveBatch() { go func(b *batch) { - b.err = b.request.Export(b.ctx) + b.err = bs.nextSender.send(b.ctx, b.request) close(b.done) + bs.activeRequests.Add(-b.requestsBlocked) }(bs.activeBatch) + bs.lastFlushed = time.Now() bs.activeBatch = newEmptyBatch() } -func (bs *batchSender) resetTimer() { - if !bs.stopped.Load() { - bs.resetTimerCh <- struct{}{} - } -} - // isActiveBatchReady returns true if the active batch is ready to be exported. // The batch is ready if it has reached the minimum size or the concurrency limit is reached. // Caller must hold the lock. @@ -154,20 +154,25 @@ func (bs *batchSender) send(ctx context.Context, req Request) error { // sendMergeSplitBatch sends the request to the batch which may be split into multiple requests. func (bs *batchSender) sendMergeSplitBatch(ctx context.Context, req Request) error { bs.mu.Lock() - bs.activeRequests.Add(1) - defer bs.activeRequests.Add(^uint64(0)) reqs, err := bs.mergeSplitFunc(ctx, bs.cfg.MaxSizeConfig, bs.activeBatch.request, req) if err != nil || len(reqs) == 0 { bs.mu.Unlock() return err } + + bs.activeRequests.Add(1) + if len(reqs) == 1 { + bs.activeBatch.requestsBlocked++ + } else { + // if there was a split, we want to make sure that bs.activeRequests is released once all of the parts are sent instead of using batch.requestsBlocked + defer bs.activeRequests.Add(-1) + } if len(reqs) == 1 || bs.activeBatch.request != nil { bs.updateActiveBatch(ctx, reqs[0]) batch := bs.activeBatch if bs.isActiveBatchReady() || len(reqs) > 1 { bs.exportActiveBatch() - bs.resetTimer() } bs.mu.Unlock() <-batch.done @@ -182,7 +187,7 @@ func (bs *batchSender) sendMergeSplitBatch(ctx context.Context, req Request) err // Intentionally do not put the last request in the active batch to not block it. // TODO: Consider including the partial request in the error to avoid double publishing. for _, r := range reqs { - if err := r.Export(ctx); err != nil { + if err := bs.nextSender.send(ctx, r); err != nil { return err } } @@ -192,8 +197,6 @@ func (bs *batchSender) sendMergeSplitBatch(ctx context.Context, req Request) err // sendMergeBatch sends the request to the batch and waits for the batch to be exported. func (bs *batchSender) sendMergeBatch(ctx context.Context, req Request) error { bs.mu.Lock() - bs.activeRequests.Add(1) - defer bs.activeRequests.Add(^uint64(0)) if bs.activeBatch.request != nil { var err error @@ -203,11 +206,13 @@ func (bs *batchSender) sendMergeBatch(ctx context.Context, req Request) error { return err } } + + bs.activeRequests.Add(1) bs.updateActiveBatch(ctx, req) batch := bs.activeBatch + batch.requestsBlocked++ if bs.isActiveBatchReady() { bs.exportActiveBatch() - bs.resetTimer() } bs.mu.Unlock() <-batch.done @@ -227,7 +232,9 @@ func (bs *batchSender) updateActiveBatch(ctx context.Context, req Request) { func (bs *batchSender) Shutdown(context.Context) error { bs.stopped.Store(true) - close(bs.shutdownCh) - <-bs.shutdownCompleteCh + if bs.shutdownCh != nil { + close(bs.shutdownCh) + <-bs.shutdownCompleteCh + } return nil } diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go index aa84e9019..4016c14e7 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/common.go @@ -110,7 +110,7 @@ func WithQueue(config QueueSettings) Option { NumConsumers: config.NumConsumers, QueueSize: config.QueueSize, }) - o.queueSender = newQueueSender(q, o.set, config.NumConsumers, o.exportFailureMessage) + o.queueSender = newQueueSender(q, o.set, config.NumConsumers, o.exportFailureMessage, o.obsrep.telemetryBuilder) return nil } } @@ -132,7 +132,7 @@ func WithRequestQueue(cfg exporterqueue.Config, queueFactory exporterqueue.Facto DataType: o.signal, ExporterSettings: o.set, } - o.queueSender = newQueueSender(queueFactory(context.Background(), set, cfg), o.set, cfg.NumConsumers, o.exportFailureMessage) + o.queueSender = newQueueSender(queueFactory(context.Background(), set, cfg), o.set, cfg.NumConsumers, o.exportFailureMessage, o.obsrep.telemetryBuilder) return nil } } @@ -231,7 +231,7 @@ type baseExporter struct { marshaler exporterqueue.Marshaler[Request] unmarshaler exporterqueue.Unmarshaler[Request] - set exporter.CreateSettings + set exporter.Settings obsrep *ObsReport // Message for the user to be added with an export failure message. @@ -249,7 +249,7 @@ type baseExporter struct { consumerOptions []consumer.Option } -func newBaseExporter(set exporter.CreateSettings, signal component.DataType, osf obsrepSenderFactory, options ...Option) (*baseExporter, error) { +func newBaseExporter(set exporter.Settings, signal component.DataType, osf obsrepSenderFactory, options ...Option) (*baseExporter, error) { obsReport, err := NewObsReport(ObsReportSettings{ExporterID: set.ID, ExporterCreateSettings: set}) if err != nil { return nil, err @@ -280,7 +280,7 @@ func newBaseExporter(set exporter.CreateSettings, signal component.DataType, osf if bs, ok := be.batchSender.(*batchSender); ok { // If queue sender is enabled assign to the batch sender the same number of workers. if qs, ok := be.queueSender.(*queueSender); ok { - bs.concurrencyLimit = uint64(qs.numConsumers) + bs.concurrencyLimit = int64(qs.numConsumers) } // Batcher sender mutates the data. be.consumerOptions = append(be.consumerOptions, consumer.WithCapabilities(consumer.Capabilities{MutatesData: true})) diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/documentation.md b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/documentation.md index ac974e01d..df11c1af8 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/documentation.md +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/documentation.md @@ -30,6 +30,22 @@ Number of spans failed to be added to the sending queue. | ---- | ----------- | ---------- | --------- | | 1 | Sum | Int | true | +### exporter_queue_capacity + +Fixed capacity of the retry queue (in batches) + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| 1 | Gauge | Int | + +### exporter_queue_size + +Current size of the retry queue (in batches) + +| Unit | Metric Type | Value Type | +| ---- | ----------- | ---------- | +| 1 | Gauge | Int | + ### exporter_send_failed_log_records Number of log records in failed attempts to send to destination. diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata/generated_telemetry.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata/generated_telemetry.go index 481cc2b27..438380988 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata/generated_telemetry.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata/generated_telemetry.go @@ -3,8 +3,10 @@ package metadata import ( + "context" "errors" + "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" @@ -24,9 +26,12 @@ func Tracer(settings component.TelemetrySettings) trace.Tracer { // TelemetryBuilder provides an interface for components to report telemetry // as defined in metadata and user config. type TelemetryBuilder struct { + meter metric.Meter ExporterEnqueueFailedLogRecords metric.Int64Counter ExporterEnqueueFailedMetricPoints metric.Int64Counter ExporterEnqueueFailedSpans metric.Int64Counter + ExporterQueueCapacity metric.Int64ObservableGauge + ExporterQueueSize metric.Int64ObservableGauge ExporterSendFailedLogRecords metric.Int64Counter ExporterSendFailedMetricPoints metric.Int64Counter ExporterSendFailedSpans metric.Int64Counter @@ -34,6 +39,7 @@ type TelemetryBuilder struct { ExporterSentMetricPoints metric.Int64Counter ExporterSentSpans metric.Int64Counter level configtelemetry.Level + attributeSet attribute.Set } // telemetryBuilderOption applies changes to default builder. @@ -46,6 +52,43 @@ func WithLevel(lvl configtelemetry.Level) telemetryBuilderOption { } } +// WithAttributeSet applies a set of attributes for asynchronous instruments. +func WithAttributeSet(set attribute.Set) telemetryBuilderOption { + return func(builder *TelemetryBuilder) { + builder.attributeSet = set + } +} + +// InitExporterQueueCapacity configures the ExporterQueueCapacity metric. +func (builder *TelemetryBuilder) InitExporterQueueCapacity(cb func() int64) error { + var err error + builder.ExporterQueueCapacity, err = builder.meter.Int64ObservableGauge( + "exporter_queue_capacity", + metric.WithDescription("Fixed capacity of the retry queue (in batches)"), + metric.WithUnit("1"), + metric.WithInt64Callback(func(_ context.Context, o metric.Int64Observer) error { + o.Observe(cb(), metric.WithAttributeSet(builder.attributeSet)) + return nil + }), + ) + return err +} + +// InitExporterQueueSize configures the ExporterQueueSize metric. +func (builder *TelemetryBuilder) InitExporterQueueSize(cb func() int64) error { + var err error + builder.ExporterQueueSize, err = builder.meter.Int64ObservableGauge( + "exporter_queue_size", + metric.WithDescription("Current size of the retry queue (in batches)"), + metric.WithUnit("1"), + metric.WithInt64Callback(func(_ context.Context, o metric.Int64Observer) error { + o.Observe(cb(), metric.WithAttributeSet(builder.attributeSet)) + return nil + }), + ) + return err +} + // NewTelemetryBuilder provides a struct with methods to update all internal telemetry // for a component func NewTelemetryBuilder(settings component.TelemetrySettings, options ...telemetryBuilderOption) (*TelemetryBuilder, error) { @@ -53,64 +96,61 @@ func NewTelemetryBuilder(settings component.TelemetrySettings, options ...teleme for _, op := range options { op(&builder) } - var ( - err, errs error - meter metric.Meter - ) + var err, errs error if builder.level >= configtelemetry.LevelBasic { - meter = Meter(settings) + builder.meter = Meter(settings) } else { - meter = noop.Meter{} + builder.meter = noop.Meter{} } - builder.ExporterEnqueueFailedLogRecords, err = meter.Int64Counter( + builder.ExporterEnqueueFailedLogRecords, err = builder.meter.Int64Counter( "exporter_enqueue_failed_log_records", metric.WithDescription("Number of log records failed to be added to the sending queue."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterEnqueueFailedMetricPoints, err = meter.Int64Counter( + builder.ExporterEnqueueFailedMetricPoints, err = builder.meter.Int64Counter( "exporter_enqueue_failed_metric_points", metric.WithDescription("Number of metric points failed to be added to the sending queue."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterEnqueueFailedSpans, err = meter.Int64Counter( + builder.ExporterEnqueueFailedSpans, err = builder.meter.Int64Counter( "exporter_enqueue_failed_spans", metric.WithDescription("Number of spans failed to be added to the sending queue."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterSendFailedLogRecords, err = meter.Int64Counter( + builder.ExporterSendFailedLogRecords, err = builder.meter.Int64Counter( "exporter_send_failed_log_records", metric.WithDescription("Number of log records in failed attempts to send to destination."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterSendFailedMetricPoints, err = meter.Int64Counter( + builder.ExporterSendFailedMetricPoints, err = builder.meter.Int64Counter( "exporter_send_failed_metric_points", metric.WithDescription("Number of metric points in failed attempts to send to destination."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterSendFailedSpans, err = meter.Int64Counter( + builder.ExporterSendFailedSpans, err = builder.meter.Int64Counter( "exporter_send_failed_spans", metric.WithDescription("Number of spans in failed attempts to send to destination."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterSentLogRecords, err = meter.Int64Counter( + builder.ExporterSentLogRecords, err = builder.meter.Int64Counter( "exporter_sent_log_records", metric.WithDescription("Number of log record successfully sent to destination."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterSentMetricPoints, err = meter.Int64Counter( + builder.ExporterSentMetricPoints, err = builder.meter.Int64Counter( "exporter_sent_metric_points", metric.WithDescription("Number of metric points successfully sent to destination."), metric.WithUnit("1"), ) errs = errors.Join(errs, err) - builder.ExporterSentSpans, err = meter.Int64Counter( + builder.ExporterSentSpans, err = builder.meter.Int64Counter( "exporter_sent_spans", metric.WithDescription("Number of spans successfully sent to destination."), metric.WithUnit("1"), diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/logs.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/logs.go index 2706ec7fe..c8505f5b9 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/logs.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/logs.go @@ -71,7 +71,7 @@ type logsExporter struct { // NewLogsExporter creates an exporter.Logs that records observability metrics and wraps every request with a Span. func NewLogsExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, pusher consumer.ConsumeLogsFunc, options ...Option, @@ -106,7 +106,7 @@ func requestFromLogs(pusher consumer.ConsumeLogsFunc) RequestFromLogsFunc { // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewLogsRequestExporter( _ context.Context, - set exporter.CreateSettings, + set exporter.Settings, converter RequestFromLogsFunc, options ...Option, ) (exporter.Logs, error) { diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metadata.yaml b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metadata.yaml index 26b06a375..0703902f6 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metadata.yaml +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metadata.yaml @@ -80,3 +80,21 @@ telemetry: sum: value_type: int monotonic: true + + exporter_queue_size: + enabled: true + description: Current size of the retry queue (in batches) + unit: 1 + optional: true + gauge: + value_type: int + async: true + + exporter_queue_capacity: + enabled: true + description: Fixed capacity of the retry queue (in batches) + unit: 1 + optional: true + gauge: + value_type: int + async: true diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metrics.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metrics.go index 83db18229..683dc576f 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metrics.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/metrics.go @@ -71,7 +71,7 @@ type metricsExporter struct { // NewMetricsExporter creates an exporter.Metrics that records observability metrics and wraps every request with a Span. func NewMetricsExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, pusher consumer.ConsumeMetricsFunc, options ...Option, @@ -106,7 +106,7 @@ func requestFromMetrics(pusher consumer.ConsumeMetricsFunc) RequestFromMetricsFu // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewMetricsRequestExporter( _ context.Context, - set exporter.CreateSettings, + set exporter.Settings, converter RequestFromMetricsFunc, options ...Option, ) (exporter.Metrics, error) { diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/obsexporter.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/obsexporter.go index e3a78c34b..1e4d1179f 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/obsexporter.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/obsexporter.go @@ -10,7 +10,6 @@ import ( "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" - "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" @@ -24,7 +23,6 @@ type ObsReport struct { level configtelemetry.Level spanNamePrefix string tracer trace.Tracer - logger *zap.Logger otelAttrs []attribute.KeyValue telemetryBuilder *metadata.TelemetryBuilder @@ -33,7 +31,7 @@ type ObsReport struct { // ObsReportSettings are settings for creating an ObsReport. type ObsReportSettings struct { ExporterID component.ID - ExporterCreateSettings exporter.CreateSettings + ExporterCreateSettings exporter.Settings } // NewObsReport creates a new Exporter. @@ -42,7 +40,9 @@ func NewObsReport(cfg ObsReportSettings) (*ObsReport, error) { } func newExporter(cfg ObsReportSettings) (*ObsReport, error) { - telemetryBuilder, err := metadata.NewTelemetryBuilder(cfg.ExporterCreateSettings.TelemetrySettings) + telemetryBuilder, err := metadata.NewTelemetryBuilder(cfg.ExporterCreateSettings.TelemetrySettings, + metadata.WithAttributeSet(attribute.NewSet(attribute.String(obsmetrics.ExporterKey, cfg.ExporterID.String()))), + ) if err != nil { return nil, err } @@ -51,7 +51,6 @@ func newExporter(cfg ObsReportSettings) (*ObsReport, error) { level: cfg.ExporterCreateSettings.TelemetrySettings.MetricsLevel, spanNamePrefix: obsmetrics.ExporterPrefix + cfg.ExporterID.String(), tracer: cfg.ExporterCreateSettings.TracerProvider.Tracer(cfg.ExporterID.String()), - logger: cfg.ExporterCreateSettings.Logger, otelAttrs: []attribute.KeyValue{ attribute.String(obsmetrics.ExporterKey, cfg.ExporterID.String()), @@ -70,7 +69,7 @@ func (or *ObsReport) StartTracesOp(ctx context.Context) context.Context { // EndTracesOp completes the export operation that was started with StartTracesOp. func (or *ObsReport) EndTracesOp(ctx context.Context, numSpans int, err error) { numSent, numFailedToSend := toNumItems(numSpans, err) - or.recordMetrics(noCancellationContext{Context: ctx}, component.DataTypeTraces, numSent, numFailedToSend) + or.recordMetrics(context.WithoutCancel(ctx), component.DataTypeTraces, numSent, numFailedToSend) endSpan(ctx, err, numSent, numFailedToSend, obsmetrics.SentSpansKey, obsmetrics.FailedToSendSpansKey) } @@ -85,7 +84,7 @@ func (or *ObsReport) StartMetricsOp(ctx context.Context) context.Context { // StartMetricsOp. func (or *ObsReport) EndMetricsOp(ctx context.Context, numMetricPoints int, err error) { numSent, numFailedToSend := toNumItems(numMetricPoints, err) - or.recordMetrics(noCancellationContext{Context: ctx}, component.DataTypeMetrics, numSent, numFailedToSend) + or.recordMetrics(context.WithoutCancel(ctx), component.DataTypeMetrics, numSent, numFailedToSend) endSpan(ctx, err, numSent, numFailedToSend, obsmetrics.SentMetricPointsKey, obsmetrics.FailedToSendMetricPointsKey) } @@ -99,7 +98,7 @@ func (or *ObsReport) StartLogsOp(ctx context.Context) context.Context { // EndLogsOp completes the export operation that was started with StartLogsOp. func (or *ObsReport) EndLogsOp(ctx context.Context, numLogRecords int, err error) { numSent, numFailedToSend := toNumItems(numLogRecords, err) - or.recordMetrics(noCancellationContext{Context: ctx}, component.DataTypeLogs, numSent, numFailedToSend) + or.recordMetrics(context.WithoutCancel(ctx), component.DataTypeLogs, numSent, numFailedToSend) endSpan(ctx, err, numSent, numFailedToSend, obsmetrics.SentLogRecordsKey, obsmetrics.FailedToSendLogRecordsKey) } diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go index 3e539d7f9..f7817128b 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/queue_sender.go @@ -6,16 +6,15 @@ package exporterhelper // import "go.opentelemetry.io/collector/exporter/exporte import ( "context" "errors" - "time" "go.opentelemetry.io/otel/attribute" - otelmetric "go.opentelemetry.io/otel/metric" "go.opentelemetry.io/otel/trace" "go.uber.org/multierr" "go.uber.org/zap" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata" "go.opentelemetry.io/collector/exporter/exporterqueue" "go.opentelemetry.io/collector/exporter/internal/queue" "go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics" @@ -23,10 +22,6 @@ import ( const defaultQueueSize = 1000 -var ( - scopeName = "go.opentelemetry.io/collector/exporterhelper" -) - // QueueSettings defines configuration for queueing batches before sending to the consumerSender. type QueueSettings struct { // Enabled indicates whether to not enqueue batches before sending to the consumerSender. @@ -73,27 +68,21 @@ func (qCfg *QueueSettings) Validate() error { type queueSender struct { baseRequestSender - fullName string queue exporterqueue.Queue[Request] numConsumers int traceAttribute attribute.KeyValue - logger *zap.Logger - meter otelmetric.Meter consumers *queue.Consumers[Request] - metricCapacity otelmetric.Int64ObservableGauge - metricSize otelmetric.Int64ObservableGauge + telemetryBuilder *metadata.TelemetryBuilder } -func newQueueSender(q exporterqueue.Queue[Request], set exporter.CreateSettings, numConsumers int, - exportFailureMessage string) *queueSender { +func newQueueSender(q exporterqueue.Queue[Request], set exporter.Settings, numConsumers int, + exportFailureMessage string, telemetryBuilder *metadata.TelemetryBuilder) *queueSender { qs := &queueSender{ - fullName: set.ID.String(), - queue: q, - numConsumers: numConsumers, - traceAttribute: attribute.String(obsmetrics.ExporterKey, set.ID.String()), - logger: set.TelemetrySettings.Logger, - meter: set.TelemetrySettings.MeterProvider.Meter(scopeName), + queue: q, + numConsumers: numConsumers, + traceAttribute: attribute.String(obsmetrics.ExporterKey, set.ID.String()), + telemetryBuilder: telemetryBuilder, } consumeFunc := func(ctx context.Context, req Request) error { err := qs.nextSender.send(ctx, req) @@ -113,32 +102,10 @@ func (qs *queueSender) Start(ctx context.Context, host component.Host) error { return err } - var err, errs error - - attrs := otelmetric.WithAttributeSet(attribute.NewSet(attribute.String(obsmetrics.ExporterKey, qs.fullName))) - - qs.metricSize, err = qs.meter.Int64ObservableGauge( - obsmetrics.ExporterKey+"/queue_size", - otelmetric.WithDescription("Current size of the retry queue (in batches)"), - otelmetric.WithUnit("1"), - otelmetric.WithInt64Callback(func(_ context.Context, o otelmetric.Int64Observer) error { - o.Observe(int64(qs.queue.Size()), attrs) - return nil - }), + return multierr.Append( + qs.telemetryBuilder.InitExporterQueueSize(func() int64 { return int64(qs.queue.Size()) }), + qs.telemetryBuilder.InitExporterQueueCapacity(func() int64 { return int64(qs.queue.Capacity()) }), ) - errs = multierr.Append(errs, err) - - qs.metricCapacity, err = qs.meter.Int64ObservableGauge( - obsmetrics.ExporterKey+"/queue_capacity", - otelmetric.WithDescription("Fixed capacity of the retry queue (in batches)"), - otelmetric.WithUnit("1"), - otelmetric.WithInt64Callback(func(_ context.Context, o otelmetric.Int64Observer) error { - o.Observe(int64(qs.queue.Capacity()), attrs) - return nil - })) - - errs = multierr.Append(errs, err) - return errs } // Shutdown is invoked during service shutdown. @@ -152,7 +119,7 @@ func (qs *queueSender) Shutdown(ctx context.Context) error { func (qs *queueSender) send(ctx context.Context, req Request) error { // Prevent cancellation and deadline to propagate to the context stored in the queue. // The grpc/http based receivers will cancel the request context after this function returns. - c := noCancellationContext{Context: ctx} + c := context.WithoutCancel(ctx) span := trace.SpanFromContext(c) if err := qs.queue.Offer(c, req); err != nil { @@ -163,19 +130,3 @@ func (qs *queueSender) send(ctx context.Context, req Request) error { span.AddEvent("Enqueued item.", trace.WithAttributes(qs.traceAttribute)) return nil } - -type noCancellationContext struct { - context.Context -} - -func (noCancellationContext) Deadline() (deadline time.Time, ok bool) { - return -} - -func (noCancellationContext) Done() <-chan struct{} { - return nil -} - -func (noCancellationContext) Err() error { - return nil -} diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go index 6e8a36f9e..03b1dba80 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/retry_sender.go @@ -51,7 +51,7 @@ type retrySender struct { logger *zap.Logger } -func newRetrySender(config configretry.BackOffConfig, set exporter.CreateSettings) *retrySender { +func newRetrySender(config configretry.BackOffConfig, set exporter.Settings) *retrySender { return &retrySender{ traceAttribute: attribute.String(obsmetrics.ExporterKey, set.ID.String()), cfg: config, diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/traces.go b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/traces.go index 6f5f39f3d..e510bae3d 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/traces.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterhelper/traces.go @@ -71,7 +71,7 @@ type traceExporter struct { // NewTracesExporter creates an exporter.Traces that records observability metrics and wraps every request with a Span. func NewTracesExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, pusher consumer.ConsumeTracesFunc, options ...Option, @@ -106,7 +106,7 @@ func requestFromTraces(pusher consumer.ConsumeTracesFunc) RequestFromTracesFunc // until https://github.com/open-telemetry/opentelemetry-collector/issues/8122 is resolved. func NewTracesRequestExporter( _ context.Context, - set exporter.CreateSettings, + set exporter.Settings, converter RequestFromTracesFunc, options ...Option, ) (exporter.Traces, error) { diff --git a/vendor/go.opentelemetry.io/collector/exporter/exporterqueue/queue.go b/vendor/go.opentelemetry.io/collector/exporter/exporterqueue/queue.go index 5b568851b..f47196ba1 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/exporterqueue/queue.go +++ b/vendor/go.opentelemetry.io/collector/exporter/exporterqueue/queue.go @@ -25,7 +25,7 @@ type Queue[T any] queue.Queue[T] // Settings defines settings for creating a queue. type Settings struct { DataType component.DataType - ExporterSettings exporter.CreateSettings + ExporterSettings exporter.Settings } // Marshaler is a function that can marshal a request into bytes. diff --git a/vendor/go.opentelemetry.io/collector/exporter/internal/queue/persistent_queue.go b/vendor/go.opentelemetry.io/collector/exporter/internal/queue/persistent_queue.go index 07b0d1fb6..7dd646c6e 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/internal/queue/persistent_queue.go +++ b/vendor/go.opentelemetry.io/collector/exporter/internal/queue/persistent_queue.go @@ -89,7 +89,7 @@ type PersistentQueueSettings[T any] struct { StorageID component.ID Marshaler func(req T) ([]byte, error) Unmarshaler func([]byte) (T, error) - ExporterSettings exporter.CreateSettings + ExporterSettings exporter.Settings } // NewPersistentQueue creates a new queue backed by file storage; name and signal must be a unique combination that identifies the queue storage diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/README.md b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/README.md index 8926a1436..b4a5c7b05 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/README.md +++ b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/README.md @@ -5,13 +5,14 @@ | ------------- |-----------| | Stability | [beta]: logs | | | [stable]: traces, metrics | -| Distributions | [core], [contrib] | +| Distributions | [core], [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fotlp%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fotlp) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fotlp%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fotlp) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [stable]: https://github.com/open-telemetry/opentelemetry-collector#stable [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s Export data via gRPC using [OTLP]( diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/config.go b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/config.go index 62956f293..f1d5b668e 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/config.go +++ b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/config.go @@ -7,6 +7,7 @@ import ( "errors" "fmt" "net" + "regexp" "strconv" "strings" @@ -49,8 +50,9 @@ func (c *Config) sanitizedEndpoint() string { return strings.TrimPrefix(c.Endpoint, "http://") case strings.HasPrefix(c.Endpoint, "https://"): return strings.TrimPrefix(c.Endpoint, "https://") - case strings.HasPrefix(c.Endpoint, "dns:///"): - return strings.TrimPrefix(c.Endpoint, "dns:///") + case strings.HasPrefix(c.Endpoint, "dns://"): + r := regexp.MustCompile("^dns://[/]?") + return r.ReplaceAllString(c.Endpoint, "") default: return c.Endpoint } diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/factory.go b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/factory.go index 8a72aab8c..c06a6c605 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/factory.go +++ b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/factory.go @@ -45,7 +45,7 @@ func createDefaultConfig() component.Config { func createTracesExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, ) (exporter.Traces, error) { oce := newExporter(cfg, set) @@ -62,7 +62,7 @@ func createTracesExporter( func createMetricsExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, ) (exporter.Metrics, error) { oce := newExporter(cfg, set) @@ -80,7 +80,7 @@ func createMetricsExporter( func createLogsExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, ) (exporter.Logs, error) { oce := newExporter(cfg, set) diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/metadata.yaml b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/metadata.yaml index f24e40e1f..0d517c861 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/metadata.yaml +++ b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/metadata.yaml @@ -5,7 +5,7 @@ status: stability: stable: [traces, metrics] beta: [logs] - distributions: [core, contrib] + distributions: [core, contrib, k8s] tests: config: diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/otlp.go b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/otlp.go index 21864d772..b8d6dee2a 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/otlp.go +++ b/vendor/go.opentelemetry.io/collector/exporter/otlpexporter/otlp.go @@ -46,7 +46,7 @@ type baseExporter struct { userAgent string } -func newExporter(cfg component.Config, set exporter.CreateSettings) *baseExporter { +func newExporter(cfg component.Config, set exporter.Settings) *baseExporter { oCfg := cfg.(*Config) userAgent := fmt.Sprintf("%s/%s (%s/%s)", @@ -151,8 +151,7 @@ func processError(err error) error { return nil } - // Now, this is this a real error. - + // Now, this is a real error. retryInfo := getRetryInfo(st) if !shouldRetry(st.Code(), retryInfo) { @@ -168,7 +167,6 @@ func processError(err error) error { } // Need to retry. - return err } diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/README.md b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/README.md index fb15c0dab..c41aef98f 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/README.md +++ b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/README.md @@ -5,13 +5,14 @@ | ------------- |-----------| | Stability | [beta]: logs | | | [stable]: traces, metrics | -| Distributions | [core], [contrib] | +| Distributions | [core], [contrib], [k8s] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aexporter%2Fotlphttp%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aexporter%2Fotlphttp) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aexporter%2Fotlphttp%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aexporter%2Fotlphttp) | [beta]: https://github.com/open-telemetry/opentelemetry-collector#beta [stable]: https://github.com/open-telemetry/opentelemetry-collector#stable [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[k8s]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-k8s Export traces and/or metrics via HTTP using [OTLP]( diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/factory.go b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/factory.go index 9ebcc01fb..96f7ed3c9 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/factory.go +++ b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/factory.go @@ -69,7 +69,7 @@ func composeSignalURL(oCfg *Config, signalOverrideURL string, signalName string) func createTracesExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, ) (exporter.Traces, error) { oce, err := newExporter(cfg, set) @@ -95,7 +95,7 @@ func createTracesExporter( func createMetricsExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, ) (exporter.Metrics, error) { oce, err := newExporter(cfg, set) @@ -121,7 +121,7 @@ func createMetricsExporter( func createLogsExporter( ctx context.Context, - set exporter.CreateSettings, + set exporter.Settings, cfg component.Config, ) (exporter.Logs, error) { oce, err := newExporter(cfg, set) diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/metadata.yaml b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/metadata.yaml index 5e1c41d32..c5dddcf25 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/metadata.yaml +++ b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/metadata.yaml @@ -5,7 +5,7 @@ status: stability: stable: [traces, metrics] beta: [logs] - distributions: [core, contrib] + distributions: [core, contrib, k8s] tests: config: diff --git a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/otlp.go b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/otlp.go index ea02be512..5c88b53c8 100644 --- a/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/otlp.go +++ b/vendor/go.opentelemetry.io/collector/exporter/otlphttpexporter/otlp.go @@ -54,7 +54,7 @@ const ( ) // Create new exporter. -func newExporter(cfg component.Config, set exporter.CreateSettings) (*baseExporter, error) { +func newExporter(cfg component.Config, set exporter.Settings) (*baseExporter, error) { oCfg := cfg.(*Config) if oCfg.Endpoint != "" { diff --git a/vendor/go.opentelemetry.io/collector/extension/extension.go b/vendor/go.opentelemetry.io/collector/extension/extension.go index 292358b33..8ee61a422 100644 --- a/vendor/go.opentelemetry.io/collector/extension/extension.go +++ b/vendor/go.opentelemetry.io/collector/extension/extension.go @@ -63,7 +63,12 @@ type StatusWatcher interface { } // CreateSettings is passed to Factory.Create(...) function. -type CreateSettings struct { +// +// Deprecated: [v0.103.0] Use extension.Settings instead. +type CreateSettings = Settings + +// Settings is passed to Factory.Create(...) function. +type Settings struct { // ID returns the ID of the component that will be created. ID component.ID @@ -74,10 +79,10 @@ type CreateSettings struct { } // CreateFunc is the equivalent of Factory.Create(...) function. -type CreateFunc func(context.Context, CreateSettings, component.Config) (Extension, error) +type CreateFunc func(context.Context, Settings, component.Config) (Extension, error) // CreateExtension implements Factory.Create. -func (f CreateFunc) CreateExtension(ctx context.Context, set CreateSettings, cfg component.Config) (Extension, error) { +func (f CreateFunc) CreateExtension(ctx context.Context, set Settings, cfg component.Config) (Extension, error) { return f(ctx, set, cfg) } @@ -85,7 +90,7 @@ type Factory interface { component.Factory // CreateExtension creates an extension based on the given config. - CreateExtension(ctx context.Context, set CreateSettings, cfg component.Config) (Extension, error) + CreateExtension(ctx context.Context, set Settings, cfg component.Config) (Extension, error) // ExtensionStability gets the stability level of the Extension. ExtensionStability() component.StabilityLevel @@ -149,7 +154,7 @@ func NewBuilder(cfgs map[component.ID]component.Config, factories map[component. } // Create creates an extension based on the settings and configs available. -func (b *Builder) Create(ctx context.Context, set CreateSettings) (Extension, error) { +func (b *Builder) Create(ctx context.Context, set Settings) (Extension, error) { cfg, existsCfg := b.cfgs[set.ID] if !existsCfg { return nil, fmt.Errorf("extension %q is not configured", set.ID) diff --git a/vendor/go.opentelemetry.io/collector/internal/localhostgate/featuregate.go b/vendor/go.opentelemetry.io/collector/internal/localhostgate/featuregate.go index 78c196229..7c8ee7aeb 100644 --- a/vendor/go.opentelemetry.io/collector/internal/localhostgate/featuregate.go +++ b/vendor/go.opentelemetry.io/collector/internal/localhostgate/featuregate.go @@ -23,7 +23,7 @@ const UseLocalHostAsDefaultHostID = "component.UseLocalHostAsDefaultHost" var UseLocalHostAsDefaultHostfeatureGate = mustRegisterOrLoad( featuregate.GlobalRegistry(), UseLocalHostAsDefaultHostID, - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("controls whether server-like receivers and extensions such as the OTLP receiver use localhost as the default host for their endpoints"), ) @@ -60,8 +60,8 @@ func EndpointForPort(port int) string { // LogAboutUseLocalHostAsDefault logs about the upcoming change from 0.0.0.0 to localhost on server-like components. func LogAboutUseLocalHostAsDefault(logger *zap.Logger) { if !UseLocalHostAsDefaultHostfeatureGate.IsEnabled() { - logger.Warn( - "The default endpoints for all servers in components will change to use localhost instead of 0.0.0.0 in a future version. Use the feature gate to preview the new default.", + logger.Info( + "The default endpoints for all servers in components have changed to use localhost instead of 0.0.0.0. Use the feature gate to temporarily revert to the previous default.", zap.String("feature gate ID", UseLocalHostAsDefaultHostID), ) } diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go new file mode 100644 index 000000000..f998cd3f8 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental/profiles_service.pb.go @@ -0,0 +1,845 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto + +package v1experimental + +import ( + context "context" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + + v1experimental "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ExportProfilesServiceRequest struct { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain one + // element. Intermediary nodes (such as OpenTelemetry Collector) that receive + // data from multiple origins typically batch the data before forwarding further and + // in that case this array will contain multiple elements. + ResourceProfiles []*v1experimental.ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` +} + +func (m *ExportProfilesServiceRequest) Reset() { *m = ExportProfilesServiceRequest{} } +func (m *ExportProfilesServiceRequest) String() string { return proto.CompactTextString(m) } +func (*ExportProfilesServiceRequest) ProtoMessage() {} +func (*ExportProfilesServiceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3d903b74e05b443d, []int{0} +} +func (m *ExportProfilesServiceRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportProfilesServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportProfilesServiceRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportProfilesServiceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportProfilesServiceRequest.Merge(m, src) +} +func (m *ExportProfilesServiceRequest) XXX_Size() int { + return m.Size() +} +func (m *ExportProfilesServiceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ExportProfilesServiceRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportProfilesServiceRequest proto.InternalMessageInfo + +func (m *ExportProfilesServiceRequest) GetResourceProfiles() []*v1experimental.ResourceProfiles { + if m != nil { + return m.ResourceProfiles + } + return nil +} + +type ExportProfilesServiceResponse struct { + // The details of a partially successful export request. + // + // If the request is only partially accepted + // (i.e. when the server accepts only parts of the data and rejects the rest) + // the server MUST initialize the `partial_success` field and MUST + // set the `rejected_` with the number of items it rejected. + // + // Servers MAY also make use of the `partial_success` field to convey + // warnings/suggestions to senders even when the request was fully accepted. + // In such cases, the `rejected_` MUST have a value of `0` and + // the `error_message` MUST be non-empty. + // + // A `partial_success` message with an empty value (rejected_ = 0 and + // `error_message` = "") is equivalent to it not being set/present. Senders + // SHOULD interpret it the same way as in the full success case. + PartialSuccess ExportProfilesPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` +} + +func (m *ExportProfilesServiceResponse) Reset() { *m = ExportProfilesServiceResponse{} } +func (m *ExportProfilesServiceResponse) String() string { return proto.CompactTextString(m) } +func (*ExportProfilesServiceResponse) ProtoMessage() {} +func (*ExportProfilesServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3d903b74e05b443d, []int{1} +} +func (m *ExportProfilesServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportProfilesServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportProfilesServiceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportProfilesServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportProfilesServiceResponse.Merge(m, src) +} +func (m *ExportProfilesServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *ExportProfilesServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ExportProfilesServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportProfilesServiceResponse proto.InternalMessageInfo + +func (m *ExportProfilesServiceResponse) GetPartialSuccess() ExportProfilesPartialSuccess { + if m != nil { + return m.PartialSuccess + } + return ExportProfilesPartialSuccess{} +} + +type ExportProfilesPartialSuccess struct { + // The number of rejected profiles. + // + // A `rejected_` field holding a `0` value indicates that the + // request was fully accepted. + RejectedProfiles int64 `protobuf:"varint,1,opt,name=rejected_profiles,json=rejectedProfiles,proto3" json:"rejected_profiles,omitempty"` + // A developer-facing human-readable message in English. It should be used + // either to explain why the server rejected parts of the data during a partial + // success or to convey warnings/suggestions during a full success. The message + // should offer guidance on how users can address such issues. + // + // error_message is an optional field. An error_message with an empty value + // is equivalent to it not being set. + ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` +} + +func (m *ExportProfilesPartialSuccess) Reset() { *m = ExportProfilesPartialSuccess{} } +func (m *ExportProfilesPartialSuccess) String() string { return proto.CompactTextString(m) } +func (*ExportProfilesPartialSuccess) ProtoMessage() {} +func (*ExportProfilesPartialSuccess) Descriptor() ([]byte, []int) { + return fileDescriptor_3d903b74e05b443d, []int{2} +} +func (m *ExportProfilesPartialSuccess) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExportProfilesPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExportProfilesPartialSuccess.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExportProfilesPartialSuccess) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExportProfilesPartialSuccess.Merge(m, src) +} +func (m *ExportProfilesPartialSuccess) XXX_Size() int { + return m.Size() +} +func (m *ExportProfilesPartialSuccess) XXX_DiscardUnknown() { + xxx_messageInfo_ExportProfilesPartialSuccess.DiscardUnknown(m) +} + +var xxx_messageInfo_ExportProfilesPartialSuccess proto.InternalMessageInfo + +func (m *ExportProfilesPartialSuccess) GetRejectedProfiles() int64 { + if m != nil { + return m.RejectedProfiles + } + return 0 +} + +func (m *ExportProfilesPartialSuccess) GetErrorMessage() string { + if m != nil { + return m.ErrorMessage + } + return "" +} + +func init() { + proto.RegisterType((*ExportProfilesServiceRequest)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesServiceRequest") + proto.RegisterType((*ExportProfilesServiceResponse)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesServiceResponse") + proto.RegisterType((*ExportProfilesPartialSuccess)(nil), "opentelemetry.proto.collector.profiles.v1experimental.ExportProfilesPartialSuccess") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto", fileDescriptor_3d903b74e05b443d) +} + +var fileDescriptor_3d903b74e05b443d = []byte{ + // 437 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x3f, 0xcb, 0xd3, 0x40, + 0x18, 0xcf, 0xf5, 0x95, 0x17, 0xbc, 0xaa, 0xd5, 0xd0, 0xa1, 0x14, 0x8d, 0x25, 0x2e, 0x01, 0xe1, + 0x42, 0x2b, 0x05, 0x11, 0x5c, 0x2a, 0xdd, 0x14, 0x43, 0x5a, 0x1c, 0x44, 0x08, 0x31, 0x7d, 0x0c, + 0x29, 0x69, 0xee, 0xbc, 0xbb, 0x96, 0xba, 0x89, 0xa3, 0x93, 0x1f, 0xc2, 0xc9, 0xdd, 0xef, 0x50, + 0xb7, 0x8e, 0x4e, 0x22, 0xed, 0x17, 0x79, 0x49, 0xae, 0x09, 0x4d, 0x68, 0x29, 0x94, 0x6e, 0x77, + 0xbf, 0xe3, 0xf7, 0xe7, 0xf9, 0x1d, 0x0f, 0x7e, 0x4d, 0x19, 0x24, 0x12, 0x62, 0x98, 0x81, 0xe4, + 0x5f, 0x6c, 0xc6, 0xa9, 0xa4, 0x76, 0x40, 0xe3, 0x18, 0x02, 0x49, 0x79, 0x7a, 0xff, 0x14, 0xc5, + 0x20, 0xec, 0x45, 0x17, 0x96, 0x0c, 0x78, 0x34, 0x83, 0x44, 0xfa, 0x71, 0x81, 0x7b, 0x02, 0xf8, + 0x22, 0x0a, 0x80, 0x64, 0x44, 0xbd, 0x5f, 0x52, 0x53, 0x20, 0x29, 0xd4, 0x48, 0xce, 0x22, 0x65, + 0xb5, 0x76, 0x33, 0xa4, 0x21, 0x55, 0xd6, 0xe9, 0x49, 0xf1, 0xda, 0x2f, 0x0e, 0x45, 0x3b, 0x15, + 0x48, 0x71, 0xcd, 0xef, 0x08, 0x3f, 0x1c, 0x2e, 0x19, 0xe5, 0xd2, 0xd9, 0x3d, 0x8c, 0x54, 0x50, + 0x17, 0x3e, 0xcf, 0x41, 0x48, 0x7d, 0x8a, 0x1f, 0x70, 0x10, 0x74, 0xce, 0x03, 0xf0, 0x72, 0x6e, + 0x0b, 0x75, 0xae, 0xac, 0x7a, 0xef, 0x25, 0x39, 0x34, 0xc5, 0x91, 0xec, 0xc4, 0xdd, 0xa9, 0xe4, + 0x3e, 0xee, 0x7d, 0x5e, 0x41, 0xcc, 0x9f, 0x08, 0x3f, 0x3a, 0x12, 0x46, 0x30, 0x9a, 0x08, 0xd0, + 0xbf, 0x21, 0xdc, 0x60, 0x3e, 0x97, 0x91, 0x1f, 0x7b, 0x62, 0x1e, 0x04, 0x20, 0xd2, 0x30, 0xc8, + 0xaa, 0xf7, 0x46, 0xe4, 0xac, 0x4a, 0x49, 0xd9, 0xcf, 0x51, 0xda, 0x23, 0x25, 0x3d, 0xb8, 0xb5, + 0xfa, 0xf7, 0x58, 0x73, 0xef, 0xb1, 0x12, 0x6a, 0xb2, 0x6a, 0x65, 0x65, 0x96, 0xfe, 0x34, 0xad, + 0x6c, 0x0a, 0x81, 0x84, 0xc9, 0x7e, 0x65, 0xc8, 0xba, 0x4a, 0x67, 0x56, 0x0f, 0x39, 0x55, 0x7f, + 0x82, 0xef, 0x02, 0xe7, 0x94, 0x7b, 0x33, 0x10, 0xc2, 0x0f, 0xa1, 0x55, 0xeb, 0x20, 0xeb, 0xb6, + 0x7b, 0x27, 0x03, 0xdf, 0x28, 0xac, 0xf7, 0x07, 0xe1, 0x46, 0xa5, 0x12, 0xfd, 0x37, 0xc2, 0xd7, + 0x2a, 0x86, 0x7e, 0x99, 0xd9, 0xcb, 0x1f, 0xdf, 0x1e, 0x5f, 0x56, 0x54, 0x7d, 0xa0, 0xa9, 0x0d, + 0xbe, 0xd6, 0x56, 0x1b, 0x03, 0xad, 0x37, 0x06, 0xfa, 0xbf, 0x31, 0xd0, 0x8f, 0xad, 0xa1, 0xad, + 0xb7, 0x86, 0xf6, 0x77, 0x6b, 0x68, 0xf8, 0x79, 0x44, 0xcf, 0x33, 0x1d, 0x34, 0x2b, 0x7e, 0x4e, + 0xca, 0x73, 0xd0, 0xfb, 0x0f, 0x61, 0x55, 0x31, 0x2a, 0x6d, 0xed, 0xc4, 0x97, 0xbe, 0x1d, 0x25, + 0x12, 0x78, 0xe2, 0xc7, 0x76, 0x76, 0xcb, 0x2c, 0x43, 0x48, 0x4e, 0x2f, 0xf7, 0xaf, 0x5a, 0xff, + 0x2d, 0x83, 0x64, 0x5c, 0x68, 0x67, 0xae, 0xe4, 0x55, 0x91, 0x36, 0x0f, 0x45, 0xde, 0x75, 0x87, + 0x7b, 0xbc, 0x8f, 0xd7, 0x99, 0xc7, 0xb3, 0x9b, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x3d, 0x57, + 0xb0, 0x54, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ProfilesServiceClient is the client API for ProfilesService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ProfilesServiceClient interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) +} + +type profilesServiceClient struct { + cc *grpc.ClientConn +} + +func NewProfilesServiceClient(cc *grpc.ClientConn) ProfilesServiceClient { + return &profilesServiceClient{cc} +} + +func (c *profilesServiceClient) Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) { + out := new(ExportProfilesServiceResponse) + err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ProfilesServiceServer is the server API for ProfilesService service. +type ProfilesServiceServer interface { + // For performance reasons, it is recommended to keep this RPC + // alive for the entire life of the application. + Export(context.Context, *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) +} + +// UnimplementedProfilesServiceServer can be embedded to have forward compatible implementations. +type UnimplementedProfilesServiceServer struct { +} + +func (*UnimplementedProfilesServiceServer) Export(ctx context.Context, req *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") +} + +func RegisterProfilesServiceServer(s *grpc.Server, srv ProfilesServiceServer) { + s.RegisterService(&_ProfilesService_serviceDesc, srv) +} + +func _ProfilesService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ExportProfilesServiceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ProfilesServiceServer).Export(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/opentelemetry.proto.collector.profiles.v1experimental.ProfilesService/Export", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ProfilesServiceServer).Export(ctx, req.(*ExportProfilesServiceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ProfilesService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "opentelemetry.proto.collector.profiles.v1experimental.ProfilesService", + HandlerType: (*ProfilesServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Export", + Handler: _ProfilesService_Export_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "opentelemetry/proto/collector/profiles/v1experimental/profiles_service.proto", +} + +func (m *ExportProfilesServiceRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportProfilesServiceRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportProfilesServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfilesService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ExportProfilesServiceResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportProfilesServiceResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportProfilesServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfilesService(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ExportProfilesPartialSuccess) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExportProfilesPartialSuccess) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExportProfilesPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ErrorMessage) > 0 { + i -= len(m.ErrorMessage) + copy(dAtA[i:], m.ErrorMessage) + i = encodeVarintProfilesService(dAtA, i, uint64(len(m.ErrorMessage))) + i-- + dAtA[i] = 0x12 + } + if m.RejectedProfiles != 0 { + i = encodeVarintProfilesService(dAtA, i, uint64(m.RejectedProfiles)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintProfilesService(dAtA []byte, offset int, v uint64) int { + offset -= sovProfilesService(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ExportProfilesServiceRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for _, e := range m.ResourceProfiles { + l = e.Size() + n += 1 + l + sovProfilesService(uint64(l)) + } + } + return n +} + +func (m *ExportProfilesServiceResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.PartialSuccess.Size() + n += 1 + l + sovProfilesService(uint64(l)) + return n +} + +func (m *ExportProfilesPartialSuccess) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.RejectedProfiles != 0 { + n += 1 + sovProfilesService(uint64(m.RejectedProfiles)) + } + l = len(m.ErrorMessage) + if l > 0 { + n += 1 + l + sovProfilesService(uint64(l)) + } + return n +} + +func sovProfilesService(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProfilesService(x uint64) (n int) { + return sovProfilesService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ExportProfilesServiceRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportProfilesServiceRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportProfilesServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfilesService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfilesService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceProfiles = append(m.ResourceProfiles, &v1experimental.ResourceProfiles{}) + if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfilesService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfilesService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportProfilesServiceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportProfilesServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportProfilesServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfilesService + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfilesService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfilesService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfilesService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExportProfilesPartialSuccess) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExportProfilesPartialSuccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExportProfilesPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RejectedProfiles", wireType) + } + m.RejectedProfiles = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.RejectedProfiles |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfilesService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfilesService + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfilesService + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorMessage = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfilesService(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfilesService + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProfilesService(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfilesService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfilesService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfilesService + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProfilesService + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProfilesService + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProfilesService + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProfilesService = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProfilesService = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProfilesService = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go new file mode 100644 index 000000000..64c91b322 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/pprofextended.pb.go @@ -0,0 +1,4919 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: opentelemetry/proto/profiles/v1experimental/pprofextended.proto + +package v1experimental + +import ( + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + + go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" + v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Specifies the method of aggregating metric values, either DELTA (change since last report) +// or CUMULATIVE (total since a fixed start time). +type AggregationTemporality int32 + +const ( + // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. + AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 + //* DELTA is an AggregationTemporality for a profiler which reports + //changes since last report time. Successive metrics contain aggregation of + //values from continuous and non-overlapping intervals. + // + //The values for a DELTA metric are based only on the time interval + //associated with one measurement cycle. There is no dependency on + //previous measurements like is the case for CUMULATIVE metrics. + // + //For example, consider a system measuring the number of requests that + //it receives and reports the sum of these requests every second as a + //DELTA metric: + // + //1. The system starts receiving at time=t_0. + //2. A request is received, the system measures 1 request. + //3. A request is received, the system measures 1 request. + //4. A request is received, the system measures 1 request. + //5. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0 to + //t_0+1 with a value of 3. + //6. A request is received, the system measures 1 request. + //7. A request is received, the system measures 1 request. + //8. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0+1 to + //t_0+2 with a value of 2. + AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 + //* CUMULATIVE is an AggregationTemporality for a profiler which + //reports changes since a fixed start time. This means that current values + //of a CUMULATIVE metric depend on all previous measurements since the + //start time. Because of this, the sender is required to retain this state + //in some form. If this state is lost or invalidated, the CUMULATIVE metric + //values MUST be reset and a new fixed start time following the last + //reported measurement time sent MUST be used. + // + //For example, consider a system measuring the number of requests that + //it receives and reports the sum of these requests every second as a + //CUMULATIVE metric: + // + //1. The system starts receiving at time=t_0. + //2. A request is received, the system measures 1 request. + //3. A request is received, the system measures 1 request. + //4. A request is received, the system measures 1 request. + //5. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0 to + //t_0+1 with a value of 3. + //6. A request is received, the system measures 1 request. + //7. A request is received, the system measures 1 request. + //8. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_0 to + //t_0+2 with a value of 5. + //9. The system experiences a fault and loses state. + //10. The system recovers and resumes receiving at time=t_1. + //11. A request is received, the system measures 1 request. + //12. The 1 second collection cycle ends. A metric is exported for the + //number of requests received over the interval of time t_1 to + //t_0+1 with a value of 1. + // + //Note: Even though, when reporting changes since last report time, using + //CUMULATIVE is valid, it is not recommended. + AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 +) + +var AggregationTemporality_name = map[int32]string{ + 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", + 1: "AGGREGATION_TEMPORALITY_DELTA", + 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", +} + +var AggregationTemporality_value = map[string]int32{ + "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, + "AGGREGATION_TEMPORALITY_DELTA": 1, + "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, +} + +func (x AggregationTemporality) String() string { + return proto.EnumName(AggregationTemporality_name, int32(x)) +} + +func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{0} +} + +// Indicates the semantics of the build_id field. +type BuildIdKind int32 + +const ( + // Linker-generated build ID, stored in the ELF binary notes. + BuildIdKind_BUILD_ID_LINKER BuildIdKind = 0 + // Build ID based on the content hash of the binary. Currently no particular + // hashing approach is standardized, so a given producer needs to define it + // themselves and thus unlike BUILD_ID_LINKER this kind of hash is producer-specific. + // We may choose to provide a standardized stable hash recommendation later. + BuildIdKind_BUILD_ID_BINARY_HASH BuildIdKind = 1 +) + +var BuildIdKind_name = map[int32]string{ + 0: "BUILD_ID_LINKER", + 1: "BUILD_ID_BINARY_HASH", +} + +var BuildIdKind_value = map[string]int32{ + "BUILD_ID_LINKER": 0, + "BUILD_ID_BINARY_HASH": 1, +} + +func (x BuildIdKind) String() string { + return proto.EnumName(BuildIdKind_name, int32(x)) +} + +func (BuildIdKind) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{1} +} + +// Represents a complete profile, including sample types, samples, +// mappings to binaries, locations, functions, string table, and additional metadata. +type Profile struct { + // A description of the samples associated with each Sample.value. + // For a cpu profile this might be: + // [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]] + // For a heap profile, this might be: + // [["allocations","count"], ["space","bytes"]], + // If one of the values represents the number of events represented + // by the sample, by convention it should be at index 0 and use + // sample_type.unit == "count". + SampleType []ValueType `protobuf:"bytes,1,rep,name=sample_type,json=sampleType,proto3" json:"sample_type"` + // The set of samples recorded in this profile. + Sample []Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample"` + // Mapping from address ranges to the image/binary/library mapped + // into that address range. mapping[0] will be the main binary. + Mapping []Mapping `protobuf:"bytes,3,rep,name=mapping,proto3" json:"mapping"` + // Locations referenced by samples via location_indices. + Location []Location `protobuf:"bytes,4,rep,name=location,proto3" json:"location"` + // Array of locations referenced by samples. + LocationIndices []int64 `protobuf:"varint,15,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` + // Functions referenced by locations. + Function []Function `protobuf:"bytes,5,rep,name=function,proto3" json:"function"` + // Lookup table for attributes. + AttributeTable []v1.KeyValue `protobuf:"bytes,16,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` + // Represents a mapping between Attribute Keys and Units. + AttributeUnits []AttributeUnit `protobuf:"bytes,17,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units"` + // Lookup table for links. + LinkTable []Link `protobuf:"bytes,18,rep,name=link_table,json=linkTable,proto3" json:"link_table"` + // A common table for strings referenced by various messages. + // string_table[0] must always be "". + StringTable []string `protobuf:"bytes,6,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` + // frames with Function.function_name fully matching the following + // regexp will be dropped from the samples, along with their successors. + DropFrames int64 `protobuf:"varint,7,opt,name=drop_frames,json=dropFrames,proto3" json:"drop_frames,omitempty"` + // frames with Function.function_name fully matching the following + // regexp will be kept, even if it matches drop_frames. + KeepFrames int64 `protobuf:"varint,8,opt,name=keep_frames,json=keepFrames,proto3" json:"keep_frames,omitempty"` + // Time of collection (UTC) represented as nanoseconds past the epoch. + TimeNanos int64 `protobuf:"varint,9,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` + // Duration of the profile, if a duration makes sense. + DurationNanos int64 `protobuf:"varint,10,opt,name=duration_nanos,json=durationNanos,proto3" json:"duration_nanos,omitempty"` + // The kind of events between sampled occurrences. + // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] + PeriodType ValueType `protobuf:"bytes,11,opt,name=period_type,json=periodType,proto3" json:"period_type"` + // The number of events between sampled occurrences. + Period int64 `protobuf:"varint,12,opt,name=period,proto3" json:"period,omitempty"` + // Free-form text associated with the profile. The text is displayed as is + // to the user by the tools that read profiles (e.g. by pprof). This field + // should not be used to store any machine-readable information, it is only + // for human-friendly content. The profile must stay functional if this field + // is cleaned. + Comment []int64 `protobuf:"varint,13,rep,packed,name=comment,proto3" json:"comment,omitempty"` + // Index into the string table of the type of the preferred sample + // value. If unset, clients should default to the last sample value. + DefaultSampleType int64 `protobuf:"varint,14,opt,name=default_sample_type,json=defaultSampleType,proto3" json:"default_sample_type,omitempty"` +} + +func (m *Profile) Reset() { *m = Profile{} } +func (m *Profile) String() string { return proto.CompactTextString(m) } +func (*Profile) ProtoMessage() {} +func (*Profile) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{0} +} +func (m *Profile) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Profile.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Profile) XXX_Merge(src proto.Message) { + xxx_messageInfo_Profile.Merge(m, src) +} +func (m *Profile) XXX_Size() int { + return m.Size() +} +func (m *Profile) XXX_DiscardUnknown() { + xxx_messageInfo_Profile.DiscardUnknown(m) +} + +var xxx_messageInfo_Profile proto.InternalMessageInfo + +func (m *Profile) GetSampleType() []ValueType { + if m != nil { + return m.SampleType + } + return nil +} + +func (m *Profile) GetSample() []Sample { + if m != nil { + return m.Sample + } + return nil +} + +func (m *Profile) GetMapping() []Mapping { + if m != nil { + return m.Mapping + } + return nil +} + +func (m *Profile) GetLocation() []Location { + if m != nil { + return m.Location + } + return nil +} + +func (m *Profile) GetLocationIndices() []int64 { + if m != nil { + return m.LocationIndices + } + return nil +} + +func (m *Profile) GetFunction() []Function { + if m != nil { + return m.Function + } + return nil +} + +func (m *Profile) GetAttributeTable() []v1.KeyValue { + if m != nil { + return m.AttributeTable + } + return nil +} + +func (m *Profile) GetAttributeUnits() []AttributeUnit { + if m != nil { + return m.AttributeUnits + } + return nil +} + +func (m *Profile) GetLinkTable() []Link { + if m != nil { + return m.LinkTable + } + return nil +} + +func (m *Profile) GetStringTable() []string { + if m != nil { + return m.StringTable + } + return nil +} + +func (m *Profile) GetDropFrames() int64 { + if m != nil { + return m.DropFrames + } + return 0 +} + +func (m *Profile) GetKeepFrames() int64 { + if m != nil { + return m.KeepFrames + } + return 0 +} + +func (m *Profile) GetTimeNanos() int64 { + if m != nil { + return m.TimeNanos + } + return 0 +} + +func (m *Profile) GetDurationNanos() int64 { + if m != nil { + return m.DurationNanos + } + return 0 +} + +func (m *Profile) GetPeriodType() ValueType { + if m != nil { + return m.PeriodType + } + return ValueType{} +} + +func (m *Profile) GetPeriod() int64 { + if m != nil { + return m.Period + } + return 0 +} + +func (m *Profile) GetComment() []int64 { + if m != nil { + return m.Comment + } + return nil +} + +func (m *Profile) GetDefaultSampleType() int64 { + if m != nil { + return m.DefaultSampleType + } + return 0 +} + +// Represents a mapping between Attribute Keys and Units. +type AttributeUnit struct { + // Index into string table. + AttributeKey int64 `protobuf:"varint,1,opt,name=attribute_key,json=attributeKey,proto3" json:"attribute_key,omitempty"` + // Index into string table. + Unit int64 `protobuf:"varint,2,opt,name=unit,proto3" json:"unit,omitempty"` +} + +func (m *AttributeUnit) Reset() { *m = AttributeUnit{} } +func (m *AttributeUnit) String() string { return proto.CompactTextString(m) } +func (*AttributeUnit) ProtoMessage() {} +func (*AttributeUnit) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{1} +} +func (m *AttributeUnit) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AttributeUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AttributeUnit.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AttributeUnit) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttributeUnit.Merge(m, src) +} +func (m *AttributeUnit) XXX_Size() int { + return m.Size() +} +func (m *AttributeUnit) XXX_DiscardUnknown() { + xxx_messageInfo_AttributeUnit.DiscardUnknown(m) +} + +var xxx_messageInfo_AttributeUnit proto.InternalMessageInfo + +func (m *AttributeUnit) GetAttributeKey() int64 { + if m != nil { + return m.AttributeKey + } + return 0 +} + +func (m *AttributeUnit) GetUnit() int64 { + if m != nil { + return m.Unit + } + return 0 +} + +// A pointer from a profile Sample to a trace Span. +// Connects a profile sample to a trace span, identified by unique trace and span IDs. +type Link struct { + // A unique identifier of a trace that this linked span is part of. The ID is a + // 16-byte array. + TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` + // A unique identifier for the linked span. The ID is an 8-byte array. + SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` +} + +func (m *Link) Reset() { *m = Link{} } +func (m *Link) String() string { return proto.CompactTextString(m) } +func (*Link) ProtoMessage() {} +func (*Link) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{2} +} +func (m *Link) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Link.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Link) XXX_Merge(src proto.Message) { + xxx_messageInfo_Link.Merge(m, src) +} +func (m *Link) XXX_Size() int { + return m.Size() +} +func (m *Link) XXX_DiscardUnknown() { + xxx_messageInfo_Link.DiscardUnknown(m) +} + +var xxx_messageInfo_Link proto.InternalMessageInfo + +// ValueType describes the type and units of a value, with an optional aggregation temporality. +type ValueType struct { + Type int64 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"` + Unit int64 `protobuf:"varint,2,opt,name=unit,proto3" json:"unit,omitempty"` + AggregationTemporality AggregationTemporality `protobuf:"varint,3,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.profiles.v1experimental.AggregationTemporality" json:"aggregation_temporality,omitempty"` +} + +func (m *ValueType) Reset() { *m = ValueType{} } +func (m *ValueType) String() string { return proto.CompactTextString(m) } +func (*ValueType) ProtoMessage() {} +func (*ValueType) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{3} +} +func (m *ValueType) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValueType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValueType.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValueType) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValueType.Merge(m, src) +} +func (m *ValueType) XXX_Size() int { + return m.Size() +} +func (m *ValueType) XXX_DiscardUnknown() { + xxx_messageInfo_ValueType.DiscardUnknown(m) +} + +var xxx_messageInfo_ValueType proto.InternalMessageInfo + +func (m *ValueType) GetType() int64 { + if m != nil { + return m.Type + } + return 0 +} + +func (m *ValueType) GetUnit() int64 { + if m != nil { + return m.Unit + } + return 0 +} + +func (m *ValueType) GetAggregationTemporality() AggregationTemporality { + if m != nil { + return m.AggregationTemporality + } + return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED +} + +// Each Sample records values encountered in some program +// context. The program context is typically a stack trace, perhaps +// augmented with auxiliary information like the thread-id, some +// indicator of a higher level request being handled etc. +type Sample struct { + // The indices recorded here correspond to locations in Profile.location. + // The leaf is at location_index[0]. [deprecated, superseded by locations_start_index / locations_length] + LocationIndex []uint64 `protobuf:"varint,1,rep,packed,name=location_index,json=locationIndex,proto3" json:"location_index,omitempty"` + // locations_start_index along with locations_length refers to to a slice of locations in Profile.location. + // Supersedes location_index. + LocationsStartIndex uint64 `protobuf:"varint,7,opt,name=locations_start_index,json=locationsStartIndex,proto3" json:"locations_start_index,omitempty"` + // locations_length along with locations_start_index refers to a slice of locations in Profile.location. + // Supersedes location_index. + LocationsLength uint64 `protobuf:"varint,8,opt,name=locations_length,json=locationsLength,proto3" json:"locations_length,omitempty"` + // A 128bit id that uniquely identifies this stacktrace, globally. Index into string table. [optional] + StacktraceIdIndex uint32 `protobuf:"varint,9,opt,name=stacktrace_id_index,json=stacktraceIdIndex,proto3" json:"stacktrace_id_index,omitempty"` + // The type and unit of each value is defined by the corresponding + // entry in Profile.sample_type. All samples must have the same + // number of values, the same as the length of Profile.sample_type. + // When aggregating multiple samples into a single sample, the + // result has a list of values that is the element-wise sum of the + // lists of the originals. + Value []int64 `protobuf:"varint,2,rep,packed,name=value,proto3" json:"value,omitempty"` + // label includes additional context for this sample. It can include + // things like a thread id, allocation size, etc. + // + // NOTE: While possible, having multiple values for the same label key is + // strongly discouraged and should never be used. Most tools (e.g. pprof) do + // not have good (or any) support for multi-value labels. And an even more + // discouraged case is having a string label and a numeric label of the same + // name on a sample. Again, possible to express, but should not be used. + // [deprecated, superseded by attributes] + Label []Label `protobuf:"bytes,3,rep,name=label,proto3" json:"label"` + // References to attributes in Profile.attribute_table. [optional] + Attributes []uint64 `protobuf:"varint,10,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + // Reference to link in Profile.link_table. [optional] + Link uint64 `protobuf:"varint,12,opt,name=link,proto3" json:"link,omitempty"` + // Timestamps associated with Sample represented in nanoseconds. These timestamps are expected + // to fall within the Profile's time range. [optional] + TimestampsUnixNano []uint64 `protobuf:"varint,13,rep,packed,name=timestamps_unix_nano,json=timestampsUnixNano,proto3" json:"timestamps_unix_nano,omitempty"` +} + +func (m *Sample) Reset() { *m = Sample{} } +func (m *Sample) String() string { return proto.CompactTextString(m) } +func (*Sample) ProtoMessage() {} +func (*Sample) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{4} +} +func (m *Sample) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Sample.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Sample) XXX_Merge(src proto.Message) { + xxx_messageInfo_Sample.Merge(m, src) +} +func (m *Sample) XXX_Size() int { + return m.Size() +} +func (m *Sample) XXX_DiscardUnknown() { + xxx_messageInfo_Sample.DiscardUnknown(m) +} + +var xxx_messageInfo_Sample proto.InternalMessageInfo + +func (m *Sample) GetLocationIndex() []uint64 { + if m != nil { + return m.LocationIndex + } + return nil +} + +func (m *Sample) GetLocationsStartIndex() uint64 { + if m != nil { + return m.LocationsStartIndex + } + return 0 +} + +func (m *Sample) GetLocationsLength() uint64 { + if m != nil { + return m.LocationsLength + } + return 0 +} + +func (m *Sample) GetStacktraceIdIndex() uint32 { + if m != nil { + return m.StacktraceIdIndex + } + return 0 +} + +func (m *Sample) GetValue() []int64 { + if m != nil { + return m.Value + } + return nil +} + +func (m *Sample) GetLabel() []Label { + if m != nil { + return m.Label + } + return nil +} + +func (m *Sample) GetAttributes() []uint64 { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Sample) GetLink() uint64 { + if m != nil { + return m.Link + } + return 0 +} + +func (m *Sample) GetTimestampsUnixNano() []uint64 { + if m != nil { + return m.TimestampsUnixNano + } + return nil +} + +// Provides additional context for a sample, +// such as thread ID or allocation size, with optional units. [deprecated] +type Label struct { + Key int64 `protobuf:"varint,1,opt,name=key,proto3" json:"key,omitempty"` + // At most one of the following must be present + Str int64 `protobuf:"varint,2,opt,name=str,proto3" json:"str,omitempty"` + Num int64 `protobuf:"varint,3,opt,name=num,proto3" json:"num,omitempty"` + // Should only be present when num is present. + // Specifies the units of num. + // Use arbitrary string (for example, "requests") as a custom count unit. + // If no unit is specified, consumer may apply heuristic to deduce the unit. + // Consumers may also interpret units like "bytes" and "kilobytes" as memory + // units and units like "seconds" and "nanoseconds" as time units, + // and apply appropriate unit conversions to these. + NumUnit int64 `protobuf:"varint,4,opt,name=num_unit,json=numUnit,proto3" json:"num_unit,omitempty"` +} + +func (m *Label) Reset() { *m = Label{} } +func (m *Label) String() string { return proto.CompactTextString(m) } +func (*Label) ProtoMessage() {} +func (*Label) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{5} +} +func (m *Label) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Label) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Label.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Label) XXX_Merge(src proto.Message) { + xxx_messageInfo_Label.Merge(m, src) +} +func (m *Label) XXX_Size() int { + return m.Size() +} +func (m *Label) XXX_DiscardUnknown() { + xxx_messageInfo_Label.DiscardUnknown(m) +} + +var xxx_messageInfo_Label proto.InternalMessageInfo + +func (m *Label) GetKey() int64 { + if m != nil { + return m.Key + } + return 0 +} + +func (m *Label) GetStr() int64 { + if m != nil { + return m.Str + } + return 0 +} + +func (m *Label) GetNum() int64 { + if m != nil { + return m.Num + } + return 0 +} + +func (m *Label) GetNumUnit() int64 { + if m != nil { + return m.NumUnit + } + return 0 +} + +// Describes the mapping of a binary in memory, including its address range, +// file offset, and metadata like build ID +type Mapping struct { + // Unique nonzero id for the mapping. [deprecated] + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Address at which the binary (or DLL) is loaded into memory. + MemoryStart uint64 `protobuf:"varint,2,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"` + // The limit of the address range occupied by this mapping. + MemoryLimit uint64 `protobuf:"varint,3,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` + // Offset in the binary that corresponds to the first mapped address. + FileOffset uint64 `protobuf:"varint,4,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"` + // The object this entry is loaded from. This can be a filename on + // disk for the main binary and shared libraries, or virtual + // abstractions like "[vdso]". + Filename int64 `protobuf:"varint,5,opt,name=filename,proto3" json:"filename,omitempty"` + // A string that uniquely identifies a particular program version + // with high probability. E.g., for binaries generated by GNU tools, + // it could be the contents of the .note.gnu.build-id field. + BuildId int64 `protobuf:"varint,6,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"` + // Specifies the kind of build id. See BuildIdKind enum for more details [optional] + BuildIdKind BuildIdKind `protobuf:"varint,11,opt,name=build_id_kind,json=buildIdKind,proto3,enum=opentelemetry.proto.profiles.v1experimental.BuildIdKind" json:"build_id_kind,omitempty"` + // References to attributes in Profile.attribute_table. [optional] + Attributes []uint64 `protobuf:"varint,12,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` + // The following fields indicate the resolution of symbolic info. + HasFunctions bool `protobuf:"varint,7,opt,name=has_functions,json=hasFunctions,proto3" json:"has_functions,omitempty"` + HasFilenames bool `protobuf:"varint,8,opt,name=has_filenames,json=hasFilenames,proto3" json:"has_filenames,omitempty"` + HasLineNumbers bool `protobuf:"varint,9,opt,name=has_line_numbers,json=hasLineNumbers,proto3" json:"has_line_numbers,omitempty"` + HasInlineFrames bool `protobuf:"varint,10,opt,name=has_inline_frames,json=hasInlineFrames,proto3" json:"has_inline_frames,omitempty"` +} + +func (m *Mapping) Reset() { *m = Mapping{} } +func (m *Mapping) String() string { return proto.CompactTextString(m) } +func (*Mapping) ProtoMessage() {} +func (*Mapping) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{6} +} +func (m *Mapping) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Mapping.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Mapping) XXX_Merge(src proto.Message) { + xxx_messageInfo_Mapping.Merge(m, src) +} +func (m *Mapping) XXX_Size() int { + return m.Size() +} +func (m *Mapping) XXX_DiscardUnknown() { + xxx_messageInfo_Mapping.DiscardUnknown(m) +} + +var xxx_messageInfo_Mapping proto.InternalMessageInfo + +func (m *Mapping) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Mapping) GetMemoryStart() uint64 { + if m != nil { + return m.MemoryStart + } + return 0 +} + +func (m *Mapping) GetMemoryLimit() uint64 { + if m != nil { + return m.MemoryLimit + } + return 0 +} + +func (m *Mapping) GetFileOffset() uint64 { + if m != nil { + return m.FileOffset + } + return 0 +} + +func (m *Mapping) GetFilename() int64 { + if m != nil { + return m.Filename + } + return 0 +} + +func (m *Mapping) GetBuildId() int64 { + if m != nil { + return m.BuildId + } + return 0 +} + +func (m *Mapping) GetBuildIdKind() BuildIdKind { + if m != nil { + return m.BuildIdKind + } + return BuildIdKind_BUILD_ID_LINKER +} + +func (m *Mapping) GetAttributes() []uint64 { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Mapping) GetHasFunctions() bool { + if m != nil { + return m.HasFunctions + } + return false +} + +func (m *Mapping) GetHasFilenames() bool { + if m != nil { + return m.HasFilenames + } + return false +} + +func (m *Mapping) GetHasLineNumbers() bool { + if m != nil { + return m.HasLineNumbers + } + return false +} + +func (m *Mapping) GetHasInlineFrames() bool { + if m != nil { + return m.HasInlineFrames + } + return false +} + +// Describes function and line table debug information. +type Location struct { + // Unique nonzero id for the location. A profile could use + // instruction addresses or any integer sequence as ids. [deprecated] + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // The index of the corresponding profile.Mapping for this location. + // It can be unset if the mapping is unknown or not applicable for + // this profile type. + MappingIndex uint64 `protobuf:"varint,2,opt,name=mapping_index,json=mappingIndex,proto3" json:"mapping_index,omitempty"` + // The instruction address for this location, if available. It + // should be within [Mapping.memory_start...Mapping.memory_limit] + // for the corresponding mapping. A non-leaf address may be in the + // middle of a call instruction. It is up to display tools to find + // the beginning of the instruction if necessary. + Address uint64 `protobuf:"varint,3,opt,name=address,proto3" json:"address,omitempty"` + // Multiple line indicates this location has inlined functions, + // where the last entry represents the caller into which the + // preceding entries were inlined. + // + // E.g., if memcpy() is inlined into printf: + // line[0].function_name == "memcpy" + // line[1].function_name == "printf" + Line []Line `protobuf:"bytes,4,rep,name=line,proto3" json:"line"` + // Provides an indication that multiple symbols map to this location's + // address, for example due to identical code folding by the linker. In that + // case the line information above represents one of the multiple + // symbols. This field must be recomputed when the symbolization state of the + // profile changes. + IsFolded bool `protobuf:"varint,5,opt,name=is_folded,json=isFolded,proto3" json:"is_folded,omitempty"` + // Type of frame (e.g. kernel, native, python, hotspot, php). Index into string table. + TypeIndex uint32 `protobuf:"varint,6,opt,name=type_index,json=typeIndex,proto3" json:"type_index,omitempty"` + // References to attributes in Profile.attribute_table. [optional] + Attributes []uint64 `protobuf:"varint,7,rep,packed,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (m *Location) Reset() { *m = Location{} } +func (m *Location) String() string { return proto.CompactTextString(m) } +func (*Location) ProtoMessage() {} +func (*Location) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{7} +} +func (m *Location) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Location.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Location) XXX_Merge(src proto.Message) { + xxx_messageInfo_Location.Merge(m, src) +} +func (m *Location) XXX_Size() int { + return m.Size() +} +func (m *Location) XXX_DiscardUnknown() { + xxx_messageInfo_Location.DiscardUnknown(m) +} + +var xxx_messageInfo_Location proto.InternalMessageInfo + +func (m *Location) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Location) GetMappingIndex() uint64 { + if m != nil { + return m.MappingIndex + } + return 0 +} + +func (m *Location) GetAddress() uint64 { + if m != nil { + return m.Address + } + return 0 +} + +func (m *Location) GetLine() []Line { + if m != nil { + return m.Line + } + return nil +} + +func (m *Location) GetIsFolded() bool { + if m != nil { + return m.IsFolded + } + return false +} + +func (m *Location) GetTypeIndex() uint32 { + if m != nil { + return m.TypeIndex + } + return 0 +} + +func (m *Location) GetAttributes() []uint64 { + if m != nil { + return m.Attributes + } + return nil +} + +// Details a specific line in a source code, linked to a function. +type Line struct { + // The index of the corresponding profile.Function for this line. + FunctionIndex uint64 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"` + // Line number in source code. + Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` + // Column number in source code. + Column int64 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` +} + +func (m *Line) Reset() { *m = Line{} } +func (m *Line) String() string { return proto.CompactTextString(m) } +func (*Line) ProtoMessage() {} +func (*Line) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{8} +} +func (m *Line) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Line) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Line.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Line) XXX_Merge(src proto.Message) { + xxx_messageInfo_Line.Merge(m, src) +} +func (m *Line) XXX_Size() int { + return m.Size() +} +func (m *Line) XXX_DiscardUnknown() { + xxx_messageInfo_Line.DiscardUnknown(m) +} + +var xxx_messageInfo_Line proto.InternalMessageInfo + +func (m *Line) GetFunctionIndex() uint64 { + if m != nil { + return m.FunctionIndex + } + return 0 +} + +func (m *Line) GetLine() int64 { + if m != nil { + return m.Line + } + return 0 +} + +func (m *Line) GetColumn() int64 { + if m != nil { + return m.Column + } + return 0 +} + +// Describes a function, including its human-readable name, system name, +// source file, and starting line number in the source. +type Function struct { + // Unique nonzero id for the function. [deprecated] + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // Name of the function, in human-readable form if available. + Name int64 `protobuf:"varint,2,opt,name=name,proto3" json:"name,omitempty"` + // Name of the function, as identified by the system. + // For instance, it can be a C++ mangled name. + SystemName int64 `protobuf:"varint,3,opt,name=system_name,json=systemName,proto3" json:"system_name,omitempty"` + // Source file containing the function. + Filename int64 `protobuf:"varint,4,opt,name=filename,proto3" json:"filename,omitempty"` + // Line number in source file. + StartLine int64 `protobuf:"varint,5,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` +} + +func (m *Function) Reset() { *m = Function{} } +func (m *Function) String() string { return proto.CompactTextString(m) } +func (*Function) ProtoMessage() {} +func (*Function) Descriptor() ([]byte, []int) { + return fileDescriptor_05f9ce3fdbeb046f, []int{9} +} +func (m *Function) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Function) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Function.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Function) XXX_Merge(src proto.Message) { + xxx_messageInfo_Function.Merge(m, src) +} +func (m *Function) XXX_Size() int { + return m.Size() +} +func (m *Function) XXX_DiscardUnknown() { + xxx_messageInfo_Function.DiscardUnknown(m) +} + +var xxx_messageInfo_Function proto.InternalMessageInfo + +func (m *Function) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *Function) GetName() int64 { + if m != nil { + return m.Name + } + return 0 +} + +func (m *Function) GetSystemName() int64 { + if m != nil { + return m.SystemName + } + return 0 +} + +func (m *Function) GetFilename() int64 { + if m != nil { + return m.Filename + } + return 0 +} + +func (m *Function) GetStartLine() int64 { + if m != nil { + return m.StartLine + } + return 0 +} + +func init() { + proto.RegisterEnum("opentelemetry.proto.profiles.v1experimental.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) + proto.RegisterEnum("opentelemetry.proto.profiles.v1experimental.BuildIdKind", BuildIdKind_name, BuildIdKind_value) + proto.RegisterType((*Profile)(nil), "opentelemetry.proto.profiles.v1experimental.Profile") + proto.RegisterType((*AttributeUnit)(nil), "opentelemetry.proto.profiles.v1experimental.AttributeUnit") + proto.RegisterType((*Link)(nil), "opentelemetry.proto.profiles.v1experimental.Link") + proto.RegisterType((*ValueType)(nil), "opentelemetry.proto.profiles.v1experimental.ValueType") + proto.RegisterType((*Sample)(nil), "opentelemetry.proto.profiles.v1experimental.Sample") + proto.RegisterType((*Label)(nil), "opentelemetry.proto.profiles.v1experimental.Label") + proto.RegisterType((*Mapping)(nil), "opentelemetry.proto.profiles.v1experimental.Mapping") + proto.RegisterType((*Location)(nil), "opentelemetry.proto.profiles.v1experimental.Location") + proto.RegisterType((*Line)(nil), "opentelemetry.proto.profiles.v1experimental.Line") + proto.RegisterType((*Function)(nil), "opentelemetry.proto.profiles.v1experimental.Function") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/profiles/v1experimental/pprofextended.proto", fileDescriptor_05f9ce3fdbeb046f) +} + +var fileDescriptor_05f9ce3fdbeb046f = []byte{ + // 1483 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x57, 0xcd, 0x4f, 0x1b, 0x47, + 0x1b, 0xc7, 0x1f, 0xf8, 0xe3, 0x31, 0x06, 0x33, 0xe1, 0xe5, 0xdd, 0x37, 0xaf, 0x02, 0xc4, 0xa8, + 0x0d, 0x25, 0x92, 0x29, 0xa4, 0xad, 0xd2, 0xaa, 0x52, 0x6b, 0x82, 0x49, 0x56, 0x38, 0x86, 0x2e, + 0x86, 0x96, 0x2a, 0xd1, 0x6a, 0xf1, 0x0e, 0x66, 0xc4, 0xee, 0xec, 0x6a, 0x77, 0x8c, 0xb0, 0xd4, + 0x53, 0x8f, 0x51, 0x0f, 0x3d, 0xf7, 0x4f, 0xe8, 0xad, 0x7f, 0x41, 0xaf, 0x39, 0xe6, 0x52, 0xa9, + 0xea, 0x21, 0xaa, 0x92, 0xbf, 0xa1, 0xf7, 0x6a, 0x9e, 0x99, 0xb5, 0xcd, 0x47, 0x0e, 0x6e, 0x2f, + 0x68, 0x9e, 0xdf, 0xfc, 0xe6, 0x37, 0xcf, 0xec, 0xf3, 0x65, 0xe0, 0x8b, 0x20, 0xa4, 0x5c, 0x50, + 0x8f, 0xfa, 0x54, 0x44, 0xfd, 0xb5, 0x30, 0x0a, 0x44, 0x20, 0xff, 0x9e, 0x30, 0x8f, 0xc6, 0x6b, + 0xe7, 0xeb, 0xf4, 0x22, 0xa4, 0x11, 0xf3, 0x29, 0x17, 0x8e, 0xb7, 0x16, 0xca, 0x0d, 0x7a, 0x21, + 0x28, 0x77, 0xa9, 0x5b, 0x43, 0x2e, 0xb9, 0x7f, 0x49, 0x40, 0x81, 0xb5, 0x44, 0xa0, 0x76, 0x59, + 0xe0, 0xf6, 0x5c, 0x37, 0xe8, 0x06, 0xea, 0x0e, 0xb9, 0x52, 0xec, 0xdb, 0xab, 0x37, 0xf9, 0xd0, + 0x09, 0x7c, 0x3f, 0xe0, 0x6b, 0xe7, 0xeb, 0x7a, 0xa5, 0xb8, 0xd5, 0xbf, 0x0a, 0x90, 0xdf, 0x53, + 0xea, 0xe4, 0x39, 0x94, 0x62, 0xc7, 0x0f, 0x3d, 0x6a, 0x8b, 0x7e, 0x48, 0x8d, 0xd4, 0x52, 0x66, + 0xa5, 0xb4, 0xf1, 0x49, 0x6d, 0x0c, 0x87, 0x6a, 0x87, 0x8e, 0xd7, 0xa3, 0xed, 0x7e, 0x48, 0x37, + 0xb3, 0x2f, 0x5f, 0x2f, 0x4e, 0x58, 0xa0, 0x04, 0x25, 0x42, 0xbe, 0x82, 0x9c, 0xb2, 0x8c, 0x34, + 0x2a, 0x3f, 0x18, 0x4b, 0x79, 0x1f, 0x8f, 0x6a, 0x59, 0x2d, 0x44, 0xda, 0x90, 0xf7, 0x9d, 0x30, + 0x64, 0xbc, 0x6b, 0x64, 0x50, 0xf3, 0xa3, 0xb1, 0x34, 0x9f, 0xaa, 0xb3, 0x5a, 0x34, 0x91, 0x22, + 0x5f, 0x43, 0xc1, 0x0b, 0x3a, 0x8e, 0x60, 0x01, 0x37, 0xb2, 0x28, 0xfb, 0xf1, 0x58, 0xb2, 0x4d, + 0x7d, 0x58, 0xeb, 0x0e, 0xc4, 0xc8, 0x07, 0x50, 0x49, 0xd6, 0x36, 0xe3, 0x2e, 0xeb, 0xd0, 0xd8, + 0x98, 0x59, 0xca, 0xac, 0x64, 0xac, 0x99, 0x04, 0x37, 0x15, 0x2c, 0x7d, 0x38, 0xe9, 0xf1, 0x0e, + 0xfa, 0x30, 0xf9, 0x0f, 0x7c, 0xd8, 0xd6, 0x87, 0x13, 0x1f, 0x12, 0x31, 0x72, 0x08, 0x33, 0x8e, + 0x10, 0x11, 0x3b, 0xee, 0x09, 0x6a, 0x0b, 0xe7, 0xd8, 0xa3, 0x46, 0x05, 0xf5, 0xef, 0xdd, 0xa8, + 0xaf, 0x93, 0xe5, 0x7c, 0xbd, 0xb6, 0x43, 0xfb, 0x18, 0x5d, 0xad, 0x38, 0x3d, 0x50, 0x69, 0x4b, + 0x11, 0xc2, 0x46, 0x75, 0x7b, 0x9c, 0x89, 0xd8, 0x98, 0x45, 0xdd, 0xcf, 0xc6, 0xf2, 0xbb, 0x9e, + 0x68, 0x1c, 0x70, 0x26, 0xae, 0x5d, 0x25, 0xc1, 0x98, 0x1c, 0x02, 0x78, 0x8c, 0x9f, 0x69, 0xef, + 0x09, 0xde, 0xb2, 0x3e, 0x5e, 0x84, 0x18, 0x3f, 0xd3, 0xe2, 0x45, 0x29, 0xa5, 0x9e, 0x70, 0x17, + 0xa6, 0x62, 0x11, 0x31, 0xde, 0xd5, 0xca, 0xb9, 0xa5, 0xcc, 0x4a, 0xd1, 0x2a, 0x29, 0x4c, 0x51, + 0x16, 0xa1, 0xe4, 0x46, 0x41, 0x68, 0x9f, 0x44, 0x8e, 0x4f, 0x63, 0x23, 0xbf, 0x94, 0x5a, 0xc9, + 0x58, 0x20, 0xa1, 0x6d, 0x44, 0x24, 0xe1, 0x8c, 0xd2, 0x01, 0xa1, 0xa0, 0x08, 0x12, 0xd2, 0x84, + 0x3b, 0x00, 0x82, 0xf9, 0xd4, 0xe6, 0x0e, 0x0f, 0x62, 0xa3, 0x88, 0xfb, 0x45, 0x89, 0xb4, 0x24, + 0x40, 0xde, 0x83, 0x69, 0xb7, 0x17, 0xa9, 0x14, 0x51, 0x14, 0x40, 0x4a, 0x39, 0x41, 0x15, 0xed, + 0x39, 0x94, 0xe4, 0x73, 0x02, 0x57, 0x95, 0x6a, 0x69, 0x29, 0xf5, 0xef, 0x4b, 0x55, 0x09, 0x62, + 0xa9, 0xce, 0x43, 0x4e, 0x59, 0xc6, 0x14, 0xde, 0xae, 0x2d, 0x62, 0x40, 0x5e, 0x26, 0x04, 0xe5, + 0xc2, 0x28, 0x63, 0xde, 0x26, 0x26, 0xa9, 0xc1, 0x2d, 0x97, 0x9e, 0x38, 0x3d, 0x4f, 0xd8, 0xa3, + 0x3d, 0x64, 0x1a, 0x8f, 0xcf, 0xea, 0xad, 0xfd, 0x41, 0x33, 0xa8, 0x3e, 0x81, 0xf2, 0xa5, 0x50, + 0x93, 0x65, 0x28, 0x0f, 0xf3, 0xe7, 0x8c, 0xf6, 0x8d, 0x14, 0x1e, 0x9d, 0x1a, 0x80, 0x3b, 0xb4, + 0x4f, 0x08, 0x64, 0x65, 0x6a, 0x19, 0x69, 0xdc, 0xc3, 0x75, 0xf5, 0xd7, 0x14, 0x64, 0x65, 0x3c, + 0xc9, 0x33, 0x28, 0x88, 0xc8, 0xe9, 0x50, 0x9b, 0xb9, 0x78, 0x78, 0x6a, 0xb3, 0x2e, 0x1f, 0xf6, + 0xc7, 0xeb, 0xc5, 0x4f, 0xbb, 0xc1, 0x95, 0x4f, 0xc3, 0x64, 0x43, 0xf4, 0x3c, 0xda, 0x11, 0x41, + 0xb4, 0x16, 0xba, 0x8e, 0x70, 0xd6, 0x18, 0x17, 0x34, 0xe2, 0x8e, 0xb7, 0x26, 0xad, 0x5a, 0x5b, + 0x2a, 0x99, 0x5b, 0x56, 0x1e, 0x25, 0x4d, 0x97, 0x1c, 0x41, 0x3e, 0x0e, 0x1d, 0x2e, 0xc5, 0xd3, + 0x28, 0xfe, 0xa5, 0x16, 0x7f, 0x38, 0xbe, 0xf8, 0x7e, 0xe8, 0x70, 0x73, 0xcb, 0xca, 0x49, 0x41, + 0xd3, 0xad, 0xfe, 0x92, 0x82, 0xe2, 0x20, 0x1a, 0xf2, 0x8d, 0xba, 0xfd, 0xe2, 0x1b, 0x85, 0xc6, + 0xae, 0xbe, 0x9b, 0x7c, 0x07, 0xff, 0x75, 0xba, 0xdd, 0x88, 0x76, 0x55, 0xb2, 0x08, 0xea, 0x87, + 0x41, 0xe4, 0x78, 0x4c, 0xf4, 0x8d, 0xcc, 0x52, 0x6a, 0x65, 0x7a, 0xe3, 0xd1, 0x78, 0x85, 0x37, + 0xd4, 0x6a, 0x0f, 0xa5, 0xac, 0x79, 0xe7, 0x46, 0xbc, 0xfa, 0x22, 0x03, 0x39, 0x15, 0x4e, 0x99, + 0xb2, 0xa3, 0x5d, 0x8d, 0x5e, 0xe0, 0xe4, 0xc8, 0x5a, 0xe5, 0x91, 0x9e, 0x46, 0x2f, 0xc8, 0x06, + 0xfc, 0x27, 0x01, 0x62, 0x3b, 0x16, 0x4e, 0x24, 0x34, 0x5b, 0x16, 0x51, 0xd6, 0xba, 0x35, 0xd8, + 0xdc, 0x97, 0x7b, 0xea, 0xcc, 0x48, 0xc3, 0x8c, 0x6d, 0x8f, 0xf2, 0xae, 0x38, 0xc5, 0x92, 0xca, + 0x0e, 0x1b, 0x66, 0xdc, 0x44, 0x58, 0x26, 0x60, 0x2c, 0x9c, 0xce, 0x59, 0x92, 0x02, 0x5a, 0x5c, + 0x16, 0x58, 0xd9, 0x9a, 0x1d, 0x6e, 0x99, 0xae, 0x92, 0x9e, 0x83, 0xc9, 0x73, 0xf9, 0xcd, 0x71, + 0x18, 0x65, 0x2c, 0x65, 0x90, 0x16, 0x4c, 0x7a, 0xce, 0x31, 0xf5, 0xf4, 0x38, 0xd9, 0x18, 0xaf, + 0xab, 0xc8, 0x93, 0xba, 0x9a, 0x94, 0x0c, 0x59, 0x00, 0x18, 0x24, 0xb0, 0x2c, 0x65, 0xf9, 0x5d, + 0x46, 0x10, 0x19, 0x58, 0xd9, 0x7f, 0xb0, 0xcc, 0xb2, 0x16, 0xae, 0xc9, 0x87, 0x30, 0x27, 0xfb, + 0x41, 0x2c, 0x1c, 0x3f, 0x8c, 0x65, 0x2b, 0xbd, 0xc0, 0x4e, 0x80, 0x15, 0x97, 0xb5, 0xc8, 0x70, + 0xef, 0x80, 0xb3, 0x0b, 0xd9, 0x0e, 0xaa, 0xdf, 0xc0, 0x24, 0xde, 0x4d, 0x2a, 0x90, 0x19, 0x96, + 0x8e, 0x5c, 0x4a, 0x24, 0x16, 0x91, 0x4e, 0x1c, 0xb9, 0x94, 0x08, 0xef, 0xf9, 0x98, 0x23, 0x19, + 0x4b, 0x2e, 0xc9, 0xff, 0xa0, 0xc0, 0x7b, 0x3e, 0x36, 0x6d, 0x23, 0x8b, 0x70, 0x9e, 0xf7, 0x7c, + 0x59, 0x95, 0xd5, 0xdf, 0x32, 0x90, 0xd7, 0x53, 0x92, 0x4c, 0x43, 0x5a, 0x57, 0x56, 0xd6, 0x4a, + 0x33, 0x57, 0xb6, 0x4b, 0x9f, 0xfa, 0x41, 0xd4, 0x57, 0xd1, 0xc4, 0x3b, 0xb2, 0x56, 0x49, 0x61, + 0x18, 0xc4, 0x11, 0x8a, 0xc7, 0x7c, 0x26, 0xf0, 0xd2, 0x01, 0xa5, 0x29, 0x21, 0xd9, 0x30, 0xe5, + 0xc7, 0xb4, 0x83, 0x93, 0x93, 0x98, 0xaa, 0xfb, 0xb3, 0x16, 0x48, 0x68, 0x17, 0x11, 0x72, 0x1b, + 0x0a, 0xd2, 0xe2, 0x8e, 0x4f, 0x8d, 0x49, 0xf4, 0x6e, 0x60, 0x4b, 0xcf, 0x8f, 0x7b, 0xcc, 0x73, + 0x65, 0x55, 0xe6, 0x94, 0xe7, 0x68, 0x9b, 0x2e, 0x79, 0x06, 0xe5, 0x64, 0xcb, 0x3e, 0x63, 0xdc, + 0xc5, 0x1e, 0x39, 0xbd, 0xf1, 0x70, 0xac, 0x88, 0x6e, 0x2a, 0xb1, 0x1d, 0xc6, 0x5d, 0xab, 0x74, + 0x3c, 0x34, 0xae, 0xc4, 0x75, 0xea, 0x5a, 0x5c, 0x97, 0xa1, 0x7c, 0xea, 0xc4, 0x76, 0x32, 0x75, + 0xd5, 0xa4, 0x28, 0x58, 0x53, 0xa7, 0x4e, 0x9c, 0x4c, 0xe6, 0x21, 0x49, 0xbf, 0x46, 0x4d, 0x0b, + 0x4d, 0x4a, 0x30, 0xb2, 0x02, 0x15, 0x49, 0xf2, 0x18, 0xa7, 0x36, 0xef, 0xf9, 0xc7, 0x34, 0x52, + 0x53, 0xa3, 0x60, 0x4d, 0x9f, 0x3a, 0x71, 0x93, 0x71, 0xda, 0x52, 0x28, 0x59, 0x85, 0x59, 0xc9, + 0x64, 0x1c, 0xb9, 0x7a, 0x00, 0x01, 0x52, 0x67, 0x4e, 0x9d, 0xd8, 0x44, 0x5c, 0x4d, 0xa1, 0xea, + 0xf7, 0x69, 0x28, 0x24, 0x3f, 0x53, 0xae, 0x05, 0x76, 0x19, 0xca, 0xfa, 0xa7, 0x90, 0x2e, 0x22, + 0x15, 0xd9, 0x29, 0x0d, 0xaa, 0xfa, 0x31, 0x20, 0xef, 0xb8, 0x6e, 0x44, 0xe3, 0x58, 0x47, 0x35, + 0x31, 0xc9, 0x0e, 0xe6, 0x34, 0xd5, 0x3f, 0x9d, 0xc6, 0x1e, 0xcc, 0xc9, 0x3c, 0x42, 0x11, 0xf2, + 0x7f, 0x28, 0xb2, 0xd8, 0x3e, 0x09, 0x3c, 0x97, 0xba, 0x18, 0xfe, 0x82, 0x55, 0x60, 0xf1, 0x36, + 0xda, 0x38, 0x4b, 0xfb, 0x21, 0xd5, 0x5e, 0xe6, 0xb0, 0xd4, 0x8b, 0x12, 0x51, 0x2e, 0x5e, 0x0e, + 0x52, 0xfe, 0x6a, 0x90, 0xaa, 0x47, 0x38, 0x38, 0xb0, 0x81, 0x25, 0x81, 0x1a, 0x34, 0x30, 0xf9, + 0xa2, 0x72, 0x82, 0x2a, 0x39, 0xa2, 0xdf, 0xa5, 0x9b, 0x30, 0xba, 0x37, 0x0f, 0xb9, 0x4e, 0xe0, + 0xf5, 0x7c, 0xae, 0xeb, 0x49, 0x5b, 0xd5, 0x17, 0x29, 0x28, 0x24, 0x81, 0xbe, 0xf6, 0x7d, 0x09, + 0x64, 0x31, 0x9b, 0xb5, 0x10, 0x66, 0xf2, 0x22, 0x94, 0xe2, 0x7e, 0x2c, 0xa8, 0x6f, 0xe3, 0x96, + 0x52, 0x03, 0x05, 0xb5, 0x24, 0x61, 0xb4, 0x0c, 0xb2, 0x57, 0xca, 0xe0, 0x0e, 0x80, 0x6a, 0xa8, + 0xe8, 0x9f, 0x2a, 0x92, 0x22, 0x22, 0xf2, 0x7d, 0xab, 0x3f, 0xa4, 0x60, 0xfe, 0xe6, 0xf6, 0x4e, + 0xee, 0xc1, 0x72, 0xfd, 0xf1, 0x63, 0xab, 0xf1, 0xb8, 0xde, 0x36, 0x77, 0x5b, 0x76, 0xbb, 0xf1, + 0x74, 0x6f, 0xd7, 0xaa, 0x37, 0xcd, 0xf6, 0x91, 0x7d, 0xd0, 0xda, 0xdf, 0x6b, 0x3c, 0x32, 0xb7, + 0xcd, 0xc6, 0x56, 0x65, 0x82, 0xdc, 0x85, 0x3b, 0xef, 0x22, 0x6e, 0x35, 0x9a, 0xed, 0x7a, 0x25, + 0x45, 0xde, 0x87, 0xea, 0xbb, 0x28, 0x8f, 0x0e, 0x9e, 0x1e, 0x34, 0xeb, 0x6d, 0xf3, 0xb0, 0x51, + 0x49, 0xaf, 0x7e, 0x0e, 0xa5, 0x91, 0xba, 0x22, 0xb7, 0x60, 0x66, 0xf3, 0xc0, 0x6c, 0x6e, 0xd9, + 0xe6, 0x96, 0xdd, 0x34, 0x5b, 0x3b, 0x0d, 0xab, 0x32, 0x41, 0x0c, 0x98, 0x1b, 0x80, 0x9b, 0x66, + 0xab, 0x6e, 0x1d, 0xd9, 0x4f, 0xea, 0xfb, 0x4f, 0x2a, 0xa9, 0xcd, 0x9f, 0x52, 0x2f, 0xdf, 0x2c, + 0xa4, 0x5e, 0xbd, 0x59, 0x48, 0xfd, 0xf9, 0x66, 0x21, 0xf5, 0xe3, 0xdb, 0x85, 0x89, 0x57, 0x6f, + 0x17, 0x26, 0x7e, 0x7f, 0xbb, 0x30, 0xf1, 0xad, 0x35, 0xf6, 0x24, 0x56, 0xff, 0x1b, 0x75, 0x29, + 0x7f, 0xd7, 0xbf, 0x68, 0x3f, 0xa7, 0xef, 0xef, 0x86, 0x94, 0xb7, 0x07, 0x8a, 0x7b, 0x98, 0xbe, + 0x7b, 0x49, 0xfa, 0x1e, 0xae, 0x37, 0x46, 0xd8, 0xc7, 0x39, 0xd4, 0x7b, 0xf0, 0x77, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xef, 0x03, 0x47, 0x6d, 0x06, 0x0e, 0x00, 0x00, +} + +func (m *Profile) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Profile) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.LinkTable) > 0 { + for iNdEx := len(m.LinkTable) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LinkTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x92 + } + } + if len(m.AttributeUnits) > 0 { + for iNdEx := len(m.AttributeUnits) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + } + if len(m.AttributeTable) > 0 { + for iNdEx := len(m.AttributeTable) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AttributeTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + } + if len(m.LocationIndices) > 0 { + dAtA2 := make([]byte, len(m.LocationIndices)*10) + var j1 int + for _, num1 := range m.LocationIndices { + num := uint64(num1) + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintPprofextended(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x7a + } + if m.DefaultSampleType != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.DefaultSampleType)) + i-- + dAtA[i] = 0x70 + } + if len(m.Comment) > 0 { + dAtA4 := make([]byte, len(m.Comment)*10) + var j3 int + for _, num1 := range m.Comment { + num := uint64(num1) + for num >= 1<<7 { + dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j3++ + } + dAtA4[j3] = uint8(num) + j3++ + } + i -= j3 + copy(dAtA[i:], dAtA4[:j3]) + i = encodeVarintPprofextended(dAtA, i, uint64(j3)) + i-- + dAtA[i] = 0x6a + } + if m.Period != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Period)) + i-- + dAtA[i] = 0x60 + } + { + size, err := m.PeriodType.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + if m.DurationNanos != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.DurationNanos)) + i-- + dAtA[i] = 0x50 + } + if m.TimeNanos != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.TimeNanos)) + i-- + dAtA[i] = 0x48 + } + if m.KeepFrames != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.KeepFrames)) + i-- + dAtA[i] = 0x40 + } + if m.DropFrames != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.DropFrames)) + i-- + dAtA[i] = 0x38 + } + if len(m.StringTable) > 0 { + for iNdEx := len(m.StringTable) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.StringTable[iNdEx]) + copy(dAtA[i:], m.StringTable[iNdEx]) + i = encodeVarintPprofextended(dAtA, i, uint64(len(m.StringTable[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.Function) > 0 { + for iNdEx := len(m.Function) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Function[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Location) > 0 { + for iNdEx := len(m.Location) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Location[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Mapping) > 0 { + for iNdEx := len(m.Mapping) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mapping[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Sample) > 0 { + for iNdEx := len(m.Sample) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Sample[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.SampleType) > 0 { + for iNdEx := len(m.SampleType) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.SampleType[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AttributeUnit) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AttributeUnit) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AttributeUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Unit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Unit)) + i-- + dAtA[i] = 0x10 + } + if m.AttributeKey != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.AttributeKey)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Link) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Link) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size := m.SpanId.Size() + i -= size + if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + { + size := m.TraceId.Size() + i -= size + if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ValueType) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValueType) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValueType) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AggregationTemporality != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.AggregationTemporality)) + i-- + dAtA[i] = 0x18 + } + if m.Unit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Unit)) + i-- + dAtA[i] = 0x10 + } + if m.Type != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Sample) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Sample) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TimestampsUnixNano) > 0 { + dAtA7 := make([]byte, len(m.TimestampsUnixNano)*10) + var j6 int + for _, num := range m.TimestampsUnixNano { + for num >= 1<<7 { + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j6++ + } + dAtA7[j6] = uint8(num) + j6++ + } + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintPprofextended(dAtA, i, uint64(j6)) + i-- + dAtA[i] = 0x6a + } + if m.Link != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Link)) + i-- + dAtA[i] = 0x60 + } + if len(m.Attributes) > 0 { + dAtA9 := make([]byte, len(m.Attributes)*10) + var j8 int + for _, num := range m.Attributes { + for num >= 1<<7 { + dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j8++ + } + dAtA9[j8] = uint8(num) + j8++ + } + i -= j8 + copy(dAtA[i:], dAtA9[:j8]) + i = encodeVarintPprofextended(dAtA, i, uint64(j8)) + i-- + dAtA[i] = 0x52 + } + if m.StacktraceIdIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.StacktraceIdIndex)) + i-- + dAtA[i] = 0x48 + } + if m.LocationsLength != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.LocationsLength)) + i-- + dAtA[i] = 0x40 + } + if m.LocationsStartIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.LocationsStartIndex)) + i-- + dAtA[i] = 0x38 + } + if len(m.Label) > 0 { + for iNdEx := len(m.Label) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Label[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Value) > 0 { + dAtA11 := make([]byte, len(m.Value)*10) + var j10 int + for _, num1 := range m.Value { + num := uint64(num1) + for num >= 1<<7 { + dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j10++ + } + dAtA11[j10] = uint8(num) + j10++ + } + i -= j10 + copy(dAtA[i:], dAtA11[:j10]) + i = encodeVarintPprofextended(dAtA, i, uint64(j10)) + i-- + dAtA[i] = 0x12 + } + if len(m.LocationIndex) > 0 { + dAtA13 := make([]byte, len(m.LocationIndex)*10) + var j12 int + for _, num := range m.LocationIndex { + for num >= 1<<7 { + dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j12++ + } + dAtA13[j12] = uint8(num) + j12++ + } + i -= j12 + copy(dAtA[i:], dAtA13[:j12]) + i = encodeVarintPprofextended(dAtA, i, uint64(j12)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Label) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Label) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Label) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumUnit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.NumUnit)) + i-- + dAtA[i] = 0x20 + } + if m.Num != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Num)) + i-- + dAtA[i] = 0x18 + } + if m.Str != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Str)) + i-- + dAtA[i] = 0x10 + } + if m.Key != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Key)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Mapping) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + dAtA15 := make([]byte, len(m.Attributes)*10) + var j14 int + for _, num := range m.Attributes { + for num >= 1<<7 { + dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j14++ + } + dAtA15[j14] = uint8(num) + j14++ + } + i -= j14 + copy(dAtA[i:], dAtA15[:j14]) + i = encodeVarintPprofextended(dAtA, i, uint64(j14)) + i-- + dAtA[i] = 0x62 + } + if m.BuildIdKind != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.BuildIdKind)) + i-- + dAtA[i] = 0x58 + } + if m.HasInlineFrames { + i-- + if m.HasInlineFrames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.HasLineNumbers { + i-- + if m.HasLineNumbers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.HasFilenames { + i-- + if m.HasFilenames { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.HasFunctions { + i-- + if m.HasFunctions { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.BuildId != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.BuildId)) + i-- + dAtA[i] = 0x30 + } + if m.Filename != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Filename)) + i-- + dAtA[i] = 0x28 + } + if m.FileOffset != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.FileOffset)) + i-- + dAtA[i] = 0x20 + } + if m.MemoryLimit != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.MemoryLimit)) + i-- + dAtA[i] = 0x18 + } + if m.MemoryStart != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.MemoryStart)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Location) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Location) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + dAtA17 := make([]byte, len(m.Attributes)*10) + var j16 int + for _, num := range m.Attributes { + for num >= 1<<7 { + dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j16++ + } + dAtA17[j16] = uint8(num) + j16++ + } + i -= j16 + copy(dAtA[i:], dAtA17[:j16]) + i = encodeVarintPprofextended(dAtA, i, uint64(j16)) + i-- + dAtA[i] = 0x3a + } + if m.TypeIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.TypeIndex)) + i-- + dAtA[i] = 0x30 + } + if m.IsFolded { + i-- + if m.IsFolded { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x28 + } + if len(m.Line) > 0 { + for iNdEx := len(m.Line) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Line[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPprofextended(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.Address != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Address)) + i-- + dAtA[i] = 0x18 + } + if m.MappingIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.MappingIndex)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Line) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Line) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Line) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Column != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Column)) + i-- + dAtA[i] = 0x18 + } + if m.Line != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Line)) + i-- + dAtA[i] = 0x10 + } + if m.FunctionIndex != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.FunctionIndex)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Function) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Function) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Function) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.StartLine != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.StartLine)) + i-- + dAtA[i] = 0x28 + } + if m.Filename != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Filename)) + i-- + dAtA[i] = 0x20 + } + if m.SystemName != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.SystemName)) + i-- + dAtA[i] = 0x18 + } + if m.Name != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Name)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintPprofextended(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintPprofextended(dAtA []byte, offset int, v uint64) int { + offset -= sovPprofextended(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Profile) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.SampleType) > 0 { + for _, e := range m.SampleType { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Sample) > 0 { + for _, e := range m.Sample { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Mapping) > 0 { + for _, e := range m.Mapping { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Location) > 0 { + for _, e := range m.Location { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.Function) > 0 { + for _, e := range m.Function { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if len(m.StringTable) > 0 { + for _, s := range m.StringTable { + l = len(s) + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if m.DropFrames != 0 { + n += 1 + sovPprofextended(uint64(m.DropFrames)) + } + if m.KeepFrames != 0 { + n += 1 + sovPprofextended(uint64(m.KeepFrames)) + } + if m.TimeNanos != 0 { + n += 1 + sovPprofextended(uint64(m.TimeNanos)) + } + if m.DurationNanos != 0 { + n += 1 + sovPprofextended(uint64(m.DurationNanos)) + } + l = m.PeriodType.Size() + n += 1 + l + sovPprofextended(uint64(l)) + if m.Period != 0 { + n += 1 + sovPprofextended(uint64(m.Period)) + } + if len(m.Comment) > 0 { + l = 0 + for _, e := range m.Comment { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if m.DefaultSampleType != 0 { + n += 1 + sovPprofextended(uint64(m.DefaultSampleType)) + } + if len(m.LocationIndices) > 0 { + l = 0 + for _, e := range m.LocationIndices { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if len(m.AttributeTable) > 0 { + for _, e := range m.AttributeTable { + l = e.Size() + n += 2 + l + sovPprofextended(uint64(l)) + } + } + if len(m.AttributeUnits) > 0 { + for _, e := range m.AttributeUnits { + l = e.Size() + n += 2 + l + sovPprofextended(uint64(l)) + } + } + if len(m.LinkTable) > 0 { + for _, e := range m.LinkTable { + l = e.Size() + n += 2 + l + sovPprofextended(uint64(l)) + } + } + return n +} + +func (m *AttributeUnit) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AttributeKey != 0 { + n += 1 + sovPprofextended(uint64(m.AttributeKey)) + } + if m.Unit != 0 { + n += 1 + sovPprofextended(uint64(m.Unit)) + } + return n +} + +func (m *Link) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.TraceId.Size() + n += 1 + l + sovPprofextended(uint64(l)) + l = m.SpanId.Size() + n += 1 + l + sovPprofextended(uint64(l)) + return n +} + +func (m *ValueType) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Type != 0 { + n += 1 + sovPprofextended(uint64(m.Type)) + } + if m.Unit != 0 { + n += 1 + sovPprofextended(uint64(m.Unit)) + } + if m.AggregationTemporality != 0 { + n += 1 + sovPprofextended(uint64(m.AggregationTemporality)) + } + return n +} + +func (m *Sample) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.LocationIndex) > 0 { + l = 0 + for _, e := range m.LocationIndex { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if len(m.Value) > 0 { + l = 0 + for _, e := range m.Value { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if len(m.Label) > 0 { + for _, e := range m.Label { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if m.LocationsStartIndex != 0 { + n += 1 + sovPprofextended(uint64(m.LocationsStartIndex)) + } + if m.LocationsLength != 0 { + n += 1 + sovPprofextended(uint64(m.LocationsLength)) + } + if m.StacktraceIdIndex != 0 { + n += 1 + sovPprofextended(uint64(m.StacktraceIdIndex)) + } + if len(m.Attributes) > 0 { + l = 0 + for _, e := range m.Attributes { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + if m.Link != 0 { + n += 1 + sovPprofextended(uint64(m.Link)) + } + if len(m.TimestampsUnixNano) > 0 { + l = 0 + for _, e := range m.TimestampsUnixNano { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + return n +} + +func (m *Label) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Key != 0 { + n += 1 + sovPprofextended(uint64(m.Key)) + } + if m.Str != 0 { + n += 1 + sovPprofextended(uint64(m.Str)) + } + if m.Num != 0 { + n += 1 + sovPprofextended(uint64(m.Num)) + } + if m.NumUnit != 0 { + n += 1 + sovPprofextended(uint64(m.NumUnit)) + } + return n +} + +func (m *Mapping) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPprofextended(uint64(m.Id)) + } + if m.MemoryStart != 0 { + n += 1 + sovPprofextended(uint64(m.MemoryStart)) + } + if m.MemoryLimit != 0 { + n += 1 + sovPprofextended(uint64(m.MemoryLimit)) + } + if m.FileOffset != 0 { + n += 1 + sovPprofextended(uint64(m.FileOffset)) + } + if m.Filename != 0 { + n += 1 + sovPprofextended(uint64(m.Filename)) + } + if m.BuildId != 0 { + n += 1 + sovPprofextended(uint64(m.BuildId)) + } + if m.HasFunctions { + n += 2 + } + if m.HasFilenames { + n += 2 + } + if m.HasLineNumbers { + n += 2 + } + if m.HasInlineFrames { + n += 2 + } + if m.BuildIdKind != 0 { + n += 1 + sovPprofextended(uint64(m.BuildIdKind)) + } + if len(m.Attributes) > 0 { + l = 0 + for _, e := range m.Attributes { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + return n +} + +func (m *Location) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPprofextended(uint64(m.Id)) + } + if m.MappingIndex != 0 { + n += 1 + sovPprofextended(uint64(m.MappingIndex)) + } + if m.Address != 0 { + n += 1 + sovPprofextended(uint64(m.Address)) + } + if len(m.Line) > 0 { + for _, e := range m.Line { + l = e.Size() + n += 1 + l + sovPprofextended(uint64(l)) + } + } + if m.IsFolded { + n += 2 + } + if m.TypeIndex != 0 { + n += 1 + sovPprofextended(uint64(m.TypeIndex)) + } + if len(m.Attributes) > 0 { + l = 0 + for _, e := range m.Attributes { + l += sovPprofextended(uint64(e)) + } + n += 1 + sovPprofextended(uint64(l)) + l + } + return n +} + +func (m *Line) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FunctionIndex != 0 { + n += 1 + sovPprofextended(uint64(m.FunctionIndex)) + } + if m.Line != 0 { + n += 1 + sovPprofextended(uint64(m.Line)) + } + if m.Column != 0 { + n += 1 + sovPprofextended(uint64(m.Column)) + } + return n +} + +func (m *Function) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovPprofextended(uint64(m.Id)) + } + if m.Name != 0 { + n += 1 + sovPprofextended(uint64(m.Name)) + } + if m.SystemName != 0 { + n += 1 + sovPprofextended(uint64(m.SystemName)) + } + if m.Filename != 0 { + n += 1 + sovPprofextended(uint64(m.Filename)) + } + if m.StartLine != 0 { + n += 1 + sovPprofextended(uint64(m.StartLine)) + } + return n +} + +func sovPprofextended(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPprofextended(x uint64) (n int) { + return sovPprofextended(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Profile) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Profile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SampleType = append(m.SampleType, ValueType{}) + if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sample = append(m.Sample, Sample{}) + if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mapping", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mapping = append(m.Mapping, Mapping{}) + if err := m.Mapping[len(m.Mapping)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Location = append(m.Location, Location{}) + if err := m.Location[len(m.Location)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Function", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Function = append(m.Function, Function{}) + if err := m.Function[len(m.Function)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DropFrames", wireType) + } + m.DropFrames = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DropFrames |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeepFrames", wireType) + } + m.KeepFrames = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeepFrames |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeNanos", wireType) + } + m.TimeNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeNanos |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) + } + m.DurationNanos = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DurationNanos |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.PeriodType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) + } + m.Period = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Period |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Comment = append(m.Comment, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Comment) == 0 { + m.Comment = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Comment = append(m.Comment, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Comment", wireType) + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleType", wireType) + } + m.DefaultSampleType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DefaultSampleType |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndices = append(m.LocationIndices, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.LocationIndices) == 0 { + m.LocationIndices = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndices = append(m.LocationIndices, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) + } + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeTable = append(m.AttributeTable, v1.KeyValue{}) + if err := m.AttributeTable[len(m.AttributeTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeUnits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttributeUnits = append(m.AttributeUnits, AttributeUnit{}) + if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LinkTable = append(m.LinkTable, Link{}) + if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AttributeUnit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttributeUnit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttributeUnit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AttributeKey", wireType) + } + m.AttributeKey = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AttributeKey |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + m.Unit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Unit |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Link) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Link: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValueType) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValueType: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValueType: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) + } + m.Unit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Unit |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) + } + m.AggregationTemporality = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Sample) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Sample: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndex = append(m.LocationIndex, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.LocationIndex) == 0 { + m.LocationIndex = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.LocationIndex = append(m.LocationIndex, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field LocationIndex", wireType) + } + case 2: + if wireType == 0 { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = append(m.Value, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Value) == 0 { + m.Value = make([]int64, 0, elementCount) + } + for iNdEx < postIndex { + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = append(m.Value, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = append(m.Label, Label{}) + if err := m.Label[len(m.Label)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationsStartIndex", wireType) + } + m.LocationsStartIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocationsStartIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LocationsLength", wireType) + } + m.LocationsLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LocationsLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StacktraceIdIndex", wireType) + } + m.StacktraceIdIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StacktraceIdIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Attributes) == 0 { + m.Attributes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Link", wireType) + } + m.Link = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Link |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 13: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.TimestampsUnixNano) == 0 { + m.TimestampsUnixNano = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Label) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Label: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + m.Key = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Key |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Str", wireType) + } + m.Str = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Str |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Num", wireType) + } + m.Num = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Num |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumUnit", wireType) + } + m.NumUnit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumUnit |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Mapping) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) + } + m.MemoryStart = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryStart |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) + } + m.MemoryLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MemoryLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) + } + m.FileOffset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileOffset |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + } + m.Filename = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Filename |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildId", wireType) + } + m.BuildId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuildId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasFunctions", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasFunctions = bool(v != 0) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasFilenames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasFilenames = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasLineNumbers", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasLineNumbers = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HasInlineFrames", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.HasInlineFrames = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildIdKind", wireType) + } + m.BuildIdKind = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BuildIdKind |= BuildIdKind(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Attributes) == 0 { + m.Attributes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Location) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Location: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MappingIndex", wireType) + } + m.MappingIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MappingIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + m.Address = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Address |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Line = append(m.Line, Line{}) + if err := m.Line[len(m.Line)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsFolded", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsFolded = bool(v != 0) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TypeIndex", wireType) + } + m.TypeIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TypeIndex |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthPprofextended + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthPprofextended + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.Attributes) == 0 { + m.Attributes = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Attributes = append(m.Attributes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Line) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Line: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Line: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FunctionIndex", wireType) + } + m.FunctionIndex = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FunctionIndex |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) + } + m.Line = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Line |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) + } + m.Column = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Column |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Function) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Function: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Function: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + m.Name = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Name |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SystemName", wireType) + } + m.SystemName = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SystemName |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Filename", wireType) + } + m.Filename = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Filename |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) + } + m.StartLine = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPprofextended + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartLine |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipPprofextended(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPprofextended + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPprofextended(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPprofextended + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPprofextended + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPprofextended + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPprofextended + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPprofextended + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPprofextended + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPprofextended = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPprofextended = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPprofextended = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go new file mode 100644 index 000000000..6e4662c24 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental/profiles.pb.go @@ -0,0 +1,1482 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: opentelemetry/proto/profiles/v1experimental/profiles.proto + +package v1experimental + +import ( + encoding_binary "encoding/binary" + fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + + v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" + v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ProfilesData represents the profiles data that can be stored in persistent storage, +// OR can be embedded by other protocols that transfer OTLP profiles data but do not +// implement the OTLP protocol. +// +// The main difference between this message and collector protocol is that +// in this message there will not be any "control" or "metadata" specific to +// OTLP protocol. +// +// When new fields are added into this message, the OTLP request MUST be updated +// as well. +type ProfilesData struct { + // An array of ResourceProfiles. + // For data coming from a single resource this array will typically contain + // one element. Intermediary nodes that receive data from multiple origins + // typically batch the data before forwarding further and in that case this + // array will contain multiple elements. + ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` +} + +func (m *ProfilesData) Reset() { *m = ProfilesData{} } +func (m *ProfilesData) String() string { return proto.CompactTextString(m) } +func (*ProfilesData) ProtoMessage() {} +func (*ProfilesData) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{0} +} +func (m *ProfilesData) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProfilesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProfilesData.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProfilesData) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProfilesData.Merge(m, src) +} +func (m *ProfilesData) XXX_Size() int { + return m.Size() +} +func (m *ProfilesData) XXX_DiscardUnknown() { + xxx_messageInfo_ProfilesData.DiscardUnknown(m) +} + +var xxx_messageInfo_ProfilesData proto.InternalMessageInfo + +func (m *ProfilesData) GetResourceProfiles() []*ResourceProfiles { + if m != nil { + return m.ResourceProfiles + } + return nil +} + +// A collection of ScopeProfiles from a Resource. +type ResourceProfiles struct { + // The resource for the profiles in this message. + // If this field is not set then no resource info is known. + Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` + // A list of ScopeProfiles that originate from a resource. + ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the resource data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url + // This schema_url applies to the data in the "resource" field. It does not apply + // to the data in the "scope_profiles" field which have their own schema_url field. + SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` +} + +func (m *ResourceProfiles) Reset() { *m = ResourceProfiles{} } +func (m *ResourceProfiles) String() string { return proto.CompactTextString(m) } +func (*ResourceProfiles) ProtoMessage() {} +func (*ResourceProfiles) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{1} +} +func (m *ResourceProfiles) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ResourceProfiles.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResourceProfiles) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResourceProfiles.Merge(m, src) +} +func (m *ResourceProfiles) XXX_Size() int { + return m.Size() +} +func (m *ResourceProfiles) XXX_DiscardUnknown() { + xxx_messageInfo_ResourceProfiles.DiscardUnknown(m) +} + +var xxx_messageInfo_ResourceProfiles proto.InternalMessageInfo + +func (m *ResourceProfiles) GetResource() v1.Resource { + if m != nil { + return m.Resource + } + return v1.Resource{} +} + +func (m *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles { + if m != nil { + return m.ScopeProfiles + } + return nil +} + +func (m *ResourceProfiles) GetSchemaUrl() string { + if m != nil { + return m.SchemaUrl + } + return "" +} + +// A collection of ProfileContainers produced by an InstrumentationScope. +type ScopeProfiles struct { + // The instrumentation scope information for the profiles in this message. + // Semantically when InstrumentationScope isn't set, it is equivalent with + // an empty instrumentation scope name (unknown). + Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` + // A list of ProfileContainers that originate from an instrumentation scope. + Profiles []*ProfileContainer `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"` + // The Schema URL, if known. This is the identifier of the Schema that the metric data + // is recorded in. To learn more about Schema URL see + // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url + // This schema_url applies to all profiles in the "profiles" field. + SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` +} + +func (m *ScopeProfiles) Reset() { *m = ScopeProfiles{} } +func (m *ScopeProfiles) String() string { return proto.CompactTextString(m) } +func (*ScopeProfiles) ProtoMessage() {} +func (*ScopeProfiles) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{2} +} +func (m *ScopeProfiles) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ScopeProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ScopeProfiles.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ScopeProfiles) XXX_Merge(src proto.Message) { + xxx_messageInfo_ScopeProfiles.Merge(m, src) +} +func (m *ScopeProfiles) XXX_Size() int { + return m.Size() +} +func (m *ScopeProfiles) XXX_DiscardUnknown() { + xxx_messageInfo_ScopeProfiles.DiscardUnknown(m) +} + +var xxx_messageInfo_ScopeProfiles proto.InternalMessageInfo + +func (m *ScopeProfiles) GetScope() v11.InstrumentationScope { + if m != nil { + return m.Scope + } + return v11.InstrumentationScope{} +} + +func (m *ScopeProfiles) GetProfiles() []*ProfileContainer { + if m != nil { + return m.Profiles + } + return nil +} + +func (m *ScopeProfiles) GetSchemaUrl() string { + if m != nil { + return m.SchemaUrl + } + return "" +} + +// A ProfileContainer represents a single profile. It wraps pprof profile with OpenTelemetry specific metadata. +type ProfileContainer struct { + // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with + // all zeroes is considered invalid. + // + // This field is required. + ProfileId []byte `protobuf:"bytes,1,opt,name=profile_id,json=profileId,proto3" json:"profile_id,omitempty"` + // start_time_unix_nano is the start time of the profile. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` + // end_time_unix_nano is the end time of the profile. + // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. + // + // This field is semantically required and it is expected that end_time >= start_time. + EndTimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` + // attributes is a collection of key/value pairs. Note, global attributes + // like server name can be set using the resource API. Examples of attributes: + // + // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" + // "/http/server_latency": 300 + // "abc.com/myattribute": true + // "abc.com/score": 10.239 + // + // The OpenTelemetry API specification further restricts the allowed value types: + // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute + // Attribute keys MUST be unique (it is not allowed to have more than one + // attribute with the same key). + Attributes []v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes"` + // dropped_attributes_count is the number of attributes that were discarded. Attributes + // can be discarded because their keys are too long or because there are too many + // attributes. If this value is 0, then no attributes were dropped. + DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` + // Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] + OriginalPayloadFormat string `protobuf:"bytes,6,opt,name=original_payload_format,json=originalPayloadFormat,proto3" json:"original_payload_format,omitempty"` + // Original payload can be stored in this field. This can be useful for users who want to get the original payload. + // Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. + // Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. + // If the original payload is in pprof format, it SHOULD not be included in this field. + // The field is optional, however if it is present `profile` MUST be present and contain the same profiling information. + OriginalPayload []byte `protobuf:"bytes,7,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"` + // This is a reference to a pprof profile. Required, even when original_payload is present. + Profile Profile `protobuf:"bytes,8,opt,name=profile,proto3" json:"profile"` +} + +func (m *ProfileContainer) Reset() { *m = ProfileContainer{} } +func (m *ProfileContainer) String() string { return proto.CompactTextString(m) } +func (*ProfileContainer) ProtoMessage() {} +func (*ProfileContainer) Descriptor() ([]byte, []int) { + return fileDescriptor_394731f2296acea3, []int{3} +} +func (m *ProfileContainer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProfileContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProfileContainer.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProfileContainer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProfileContainer.Merge(m, src) +} +func (m *ProfileContainer) XXX_Size() int { + return m.Size() +} +func (m *ProfileContainer) XXX_DiscardUnknown() { + xxx_messageInfo_ProfileContainer.DiscardUnknown(m) +} + +var xxx_messageInfo_ProfileContainer proto.InternalMessageInfo + +func (m *ProfileContainer) GetProfileId() []byte { + if m != nil { + return m.ProfileId + } + return nil +} + +func (m *ProfileContainer) GetStartTimeUnixNano() uint64 { + if m != nil { + return m.StartTimeUnixNano + } + return 0 +} + +func (m *ProfileContainer) GetEndTimeUnixNano() uint64 { + if m != nil { + return m.EndTimeUnixNano + } + return 0 +} + +func (m *ProfileContainer) GetAttributes() []v11.KeyValue { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *ProfileContainer) GetDroppedAttributesCount() uint32 { + if m != nil { + return m.DroppedAttributesCount + } + return 0 +} + +func (m *ProfileContainer) GetOriginalPayloadFormat() string { + if m != nil { + return m.OriginalPayloadFormat + } + return "" +} + +func (m *ProfileContainer) GetOriginalPayload() []byte { + if m != nil { + return m.OriginalPayload + } + return nil +} + +func (m *ProfileContainer) GetProfile() Profile { + if m != nil { + return m.Profile + } + return Profile{} +} + +func init() { + proto.RegisterType((*ProfilesData)(nil), "opentelemetry.proto.profiles.v1experimental.ProfilesData") + proto.RegisterType((*ResourceProfiles)(nil), "opentelemetry.proto.profiles.v1experimental.ResourceProfiles") + proto.RegisterType((*ScopeProfiles)(nil), "opentelemetry.proto.profiles.v1experimental.ScopeProfiles") + proto.RegisterType((*ProfileContainer)(nil), "opentelemetry.proto.profiles.v1experimental.ProfileContainer") +} + +func init() { + proto.RegisterFile("opentelemetry/proto/profiles/v1experimental/profiles.proto", fileDescriptor_394731f2296acea3) +} + +var fileDescriptor_394731f2296acea3 = []byte{ + // 652 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x51, 0x6b, 0xdb, 0x3a, + 0x14, 0xc7, 0xe3, 0xa6, 0x4d, 0x52, 0xb5, 0xb9, 0x4d, 0x45, 0xef, 0xbd, 0xa6, 0x70, 0x73, 0x43, + 0x5e, 0x96, 0xae, 0x60, 0x93, 0x76, 0x8c, 0x51, 0x18, 0x63, 0xed, 0x36, 0xe8, 0xca, 0xd6, 0xe0, + 0xb5, 0x85, 0xed, 0xc5, 0xa8, 0xf1, 0x69, 0xa6, 0x61, 0x4b, 0x46, 0x96, 0x43, 0xba, 0x4f, 0xb1, + 0xcf, 0xb1, 0x4f, 0xd2, 0xc7, 0xee, 0x6d, 0x6c, 0x30, 0x46, 0xfb, 0xb2, 0x7e, 0x8b, 0x61, 0x59, + 0xf6, 0x12, 0x93, 0x51, 0xb2, 0x17, 0x23, 0x9f, 0xf3, 0x3f, 0xbf, 0xa3, 0xff, 0x91, 0x10, 0xda, + 0xe1, 0x21, 0x30, 0x09, 0x3e, 0x04, 0x20, 0xc5, 0xb9, 0x1d, 0x0a, 0x2e, 0x79, 0xf2, 0x3d, 0xa3, + 0x3e, 0x44, 0xf6, 0xb0, 0x0b, 0xa3, 0x10, 0x04, 0x0d, 0x80, 0x49, 0xe2, 0xe7, 0x71, 0x4b, 0xc9, + 0xf0, 0xe6, 0x44, 0x6d, 0x1a, 0xb4, 0x72, 0xcd, 0x64, 0xed, 0xfa, 0xda, 0x80, 0x0f, 0x78, 0x8a, + 0x4f, 0x56, 0xa9, 0x7a, 0xfd, 0xee, 0xb4, 0xf6, 0x7d, 0x1e, 0x04, 0x9c, 0xd9, 0xc3, 0xae, 0x5e, + 0x69, 0xad, 0x35, 0x4d, 0x2b, 0x20, 0xe2, 0xb1, 0xe8, 0x43, 0xa2, 0xce, 0xd6, 0x5a, 0xff, 0x68, + 0x26, 0x6b, 0x49, 0x02, 0x46, 0x12, 0x98, 0x07, 0x5e, 0x0a, 0x68, 0xbf, 0x47, 0xcb, 0x3d, 0x2d, + 0x7f, 0x42, 0x24, 0xc1, 0xef, 0xd0, 0x6a, 0xd6, 0xc2, 0xcd, 0x38, 0xa6, 0xd1, 0x2a, 0x77, 0x96, + 0xb6, 0x1e, 0x5a, 0x33, 0xcc, 0xc2, 0x72, 0x34, 0x25, 0xa3, 0x3b, 0x0d, 0x51, 0x88, 0xb4, 0x6f, + 0x0c, 0xd4, 0x28, 0xca, 0xf0, 0x01, 0xaa, 0x65, 0x42, 0xd3, 0x68, 0x19, 0x9d, 0xa5, 0xad, 0x8d, + 0xa9, 0x7d, 0xf3, 0x41, 0x0c, 0xbb, 0x79, 0xaf, 0xdd, 0xf9, 0x8b, 0x6f, 0xff, 0x97, 0x9c, 0x1c, + 0x80, 0x09, 0xfa, 0x2b, 0xea, 0xf3, 0x70, 0xcc, 0xca, 0x9c, 0xb2, 0xb2, 0x33, 0x93, 0x95, 0x57, + 0x09, 0x22, 0xf7, 0x51, 0x8f, 0xc6, 0x7f, 0xf1, 0x7f, 0x08, 0x45, 0xfd, 0xb7, 0x10, 0x10, 0x37, + 0x16, 0xbe, 0x59, 0x6e, 0x19, 0x9d, 0x45, 0x67, 0x31, 0x8d, 0x1c, 0x0b, 0xff, 0x79, 0xa5, 0xf6, + 0xa3, 0xda, 0xb8, 0xa9, 0xb6, 0xbf, 0x18, 0xa8, 0x3e, 0xc1, 0xc1, 0x87, 0x68, 0x41, 0x91, 0xb4, + 0xcb, 0xed, 0xa9, 0x5b, 0xd2, 0x97, 0x63, 0xd8, 0xb5, 0xf6, 0x59, 0x24, 0x45, 0xac, 0x76, 0x24, + 0x29, 0x67, 0x8a, 0xa5, 0xfd, 0xa6, 0x1c, 0xfc, 0x1a, 0xd5, 0x0a, 0x36, 0x67, 0x3b, 0x31, 0xbd, + 0xb3, 0x3d, 0xce, 0x24, 0xa1, 0x0c, 0x84, 0x93, 0xe3, 0x6e, 0x31, 0xd9, 0xfe, 0x54, 0x46, 0x8d, + 0x62, 0x75, 0x52, 0xa3, 0xeb, 0x5d, 0xea, 0x29, 0x93, 0xcb, 0xce, 0xa2, 0x8e, 0xec, 0x7b, 0xd8, + 0x46, 0x6b, 0x91, 0x24, 0x42, 0xba, 0x92, 0x06, 0xe0, 0xc6, 0x8c, 0x8e, 0x5c, 0x46, 0x18, 0x37, + 0xe7, 0x5a, 0x46, 0xa7, 0xe2, 0xac, 0xaa, 0xdc, 0x11, 0x0d, 0xe0, 0x98, 0xd1, 0xd1, 0x4b, 0xc2, + 0x38, 0xde, 0x44, 0x18, 0x98, 0x57, 0x94, 0x97, 0x95, 0x7c, 0x05, 0x98, 0x37, 0x21, 0x7e, 0x81, + 0x10, 0x91, 0x52, 0xd0, 0xd3, 0x58, 0x42, 0x64, 0xce, 0xab, 0x69, 0xdc, 0xb9, 0x65, 0xc2, 0x07, + 0x70, 0x7e, 0x42, 0xfc, 0x38, 0x9b, 0xea, 0x18, 0x00, 0x3f, 0x40, 0xa6, 0x27, 0x78, 0x18, 0x82, + 0xe7, 0xfe, 0x8a, 0xba, 0x7d, 0x1e, 0x33, 0x69, 0x2e, 0xb4, 0x8c, 0x4e, 0xdd, 0xf9, 0x47, 0xe7, + 0x1f, 0xe7, 0xe9, 0xbd, 0x24, 0x8b, 0xef, 0xa3, 0x7f, 0xb9, 0xa0, 0x03, 0xca, 0x88, 0xef, 0x86, + 0xe4, 0xdc, 0xe7, 0xc4, 0x73, 0xcf, 0xb8, 0x08, 0x88, 0x34, 0x2b, 0x6a, 0x8c, 0x7f, 0x67, 0xe9, + 0x5e, 0x9a, 0x7d, 0xa6, 0x92, 0x78, 0x03, 0x35, 0x8a, 0x75, 0x66, 0x55, 0xcd, 0x70, 0xa5, 0x50, + 0x80, 0x8f, 0x50, 0x55, 0x8f, 0xd5, 0xac, 0xa9, 0xab, 0x74, 0xef, 0x4f, 0x8e, 0x5d, 0xbb, 0xce, + 0x50, 0xbb, 0x5f, 0x8d, 0x8b, 0xab, 0xa6, 0x71, 0x79, 0xd5, 0x34, 0xbe, 0x5f, 0x35, 0x8d, 0x0f, + 0xd7, 0xcd, 0xd2, 0xe5, 0x75, 0xb3, 0xf4, 0xf9, 0xba, 0x59, 0x42, 0x16, 0xe5, 0xb3, 0x74, 0xd8, + 0xad, 0x67, 0x77, 0xbe, 0x97, 0xc8, 0x7a, 0xc6, 0x1b, 0x67, 0x50, 0x04, 0xd0, 0xe4, 0x45, 0xf4, + 0x7d, 0xe8, 0x4b, 0x2e, 0xec, 0xd0, 0x23, 0x92, 0xd8, 0x94, 0x49, 0x10, 0x8c, 0xf8, 0xb6, 0xfa, + 0x53, 0x1d, 0x06, 0xc0, 0x7e, 0xf7, 0xb8, 0x7d, 0x9c, 0xdb, 0x3c, 0x0c, 0x81, 0x1d, 0xe5, 0x44, + 0xd5, 0x2b, 0x33, 0x17, 0x59, 0x27, 0xdd, 0xa7, 0x63, 0xea, 0xd3, 0x8a, 0xe2, 0x6d, 0xff, 0x0c, + 0x00, 0x00, 0xff, 0xff, 0xe1, 0x89, 0x49, 0xa4, 0x1b, 0x06, 0x00, 0x00, +} + +func (m *ProfilesData) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProfilesData) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProfilesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *ResourceProfiles) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceProfiles) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.ScopeProfiles) > 0 { + for iNdEx := len(m.ScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ScopeProfiles) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ScopeProfiles) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ScopeProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SchemaUrl) > 0 { + i -= len(m.SchemaUrl) + copy(dAtA[i:], m.SchemaUrl) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) + i-- + dAtA[i] = 0x1a + } + if len(m.Profiles) > 0 { + for iNdEx := len(m.Profiles) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Profiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *ProfileContainer) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProfileContainer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProfileContainer) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Profile.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + if len(m.OriginalPayload) > 0 { + i -= len(m.OriginalPayload) + copy(dAtA[i:], m.OriginalPayload) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayload))) + i-- + dAtA[i] = 0x3a + } + if len(m.OriginalPayloadFormat) > 0 { + i -= len(m.OriginalPayloadFormat) + copy(dAtA[i:], m.OriginalPayloadFormat) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayloadFormat))) + i-- + dAtA[i] = 0x32 + } + if m.DroppedAttributesCount != 0 { + i = encodeVarintProfiles(dAtA, i, uint64(m.DroppedAttributesCount)) + i-- + dAtA[i] = 0x28 + } + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProfiles(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.EndTimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) + i-- + dAtA[i] = 0x19 + } + if m.StartTimeUnixNano != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) + i-- + dAtA[i] = 0x11 + } + if len(m.ProfileId) > 0 { + i -= len(m.ProfileId) + copy(dAtA[i:], m.ProfileId) + i = encodeVarintProfiles(dAtA, i, uint64(len(m.ProfileId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProfiles(dAtA []byte, offset int, v uint64) int { + offset -= sovProfiles(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ProfilesData) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ResourceProfiles) > 0 { + for _, e := range m.ResourceProfiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + return n +} + +func (m *ResourceProfiles) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Resource.Size() + n += 1 + l + sovProfiles(uint64(l)) + if len(m.ScopeProfiles) > 0 { + for _, e := range m.ScopeProfiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + return n +} + +func (m *ScopeProfiles) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Scope.Size() + n += 1 + l + sovProfiles(uint64(l)) + if len(m.Profiles) > 0 { + for _, e := range m.Profiles { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + l = len(m.SchemaUrl) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + return n +} + +func (m *ProfileContainer) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ProfileId) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + if m.StartTimeUnixNano != 0 { + n += 9 + } + if m.EndTimeUnixNano != 0 { + n += 9 + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovProfiles(uint64(l)) + } + } + if m.DroppedAttributesCount != 0 { + n += 1 + sovProfiles(uint64(m.DroppedAttributesCount)) + } + l = len(m.OriginalPayloadFormat) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + l = len(m.OriginalPayload) + if l > 0 { + n += 1 + l + sovProfiles(uint64(l)) + } + l = m.Profile.Size() + n += 1 + l + sovProfiles(uint64(l)) + return n +} + +func sovProfiles(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProfiles(x uint64) (n int) { + return sovProfiles(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ProfilesData) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProfilesData: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProfilesData: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceProfiles = append(m.ResourceProfiles, &ResourceProfiles{}) + if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceProfiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceProfiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceProfiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScopeProfiles = append(m.ScopeProfiles, &ScopeProfiles{}) + if err := m.ScopeProfiles[len(m.ScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ScopeProfiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ScopeProfiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ScopeProfiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Profiles = append(m.Profiles, &ProfileContainer{}) + if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SchemaUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProfileContainer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProfileContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProfileContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProfileId = append(m.ProfileId[:0], dAtA[iNdEx:postIndex]...) + if m.ProfileId == nil { + m.ProfileId = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) + } + m.StartTimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) + } + m.EndTimeUnixNano = 0 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, v11.KeyValue{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) + } + m.DroppedAttributesCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DroppedAttributesCount |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginalPayloadFormat = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginalPayload = append(m.OriginalPayload[:0], dAtA[iNdEx:postIndex]...) + if m.OriginalPayload == nil { + m.OriginalPayload = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProfiles + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProfiles + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProfiles + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Profile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProfiles(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProfiles + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProfiles(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfiles + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfiles + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProfiles + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProfiles + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProfiles + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProfiles + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProfiles = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProfiles = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProfiles = fmt.Errorf("proto: unexpected end of group") +) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go new file mode 100644 index 000000000..564c89458 --- /dev/null +++ b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go @@ -0,0 +1,46 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package internal // import "go.opentelemetry.io/collector/pdata/internal" + +import ( + otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental" + otlpprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental" +) + +type Profiles struct { + orig *otlpcollectorprofile.ExportProfilesServiceRequest + state *State +} + +func GetOrigProfiles(ms Profiles) *otlpcollectorprofile.ExportProfilesServiceRequest { + return ms.orig +} + +func GetProfilesState(ms Profiles) *State { + return ms.state +} + +func SetProfilesState(ms Profiles, state State) { + *ms.state = state +} + +func NewProfiles(orig *otlpcollectorprofile.ExportProfilesServiceRequest, state *State) Profiles { + return Profiles{orig: orig, state: state} +} + +// ProfilesToProto internal helper to convert Profiles to protobuf representation. +func ProfilesToProto(l Profiles) otlpprofile.ProfilesData { + return otlpprofile.ProfilesData{ + ResourceProfiles: l.orig.ResourceProfiles, + } +} + +// ProfilesFromProto internal helper to convert protobuf representation to Profiles. +// This function set exclusive state assuming that it's called only once per Profiles. +func ProfilesFromProto(orig otlpprofile.ProfilesData) Profiles { + state := StateMutable + return NewProfiles(&otlpcollectorprofile.ExportProfilesServiceRequest{ + ResourceProfiles: orig.ResourceProfiles, + }, &state) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt b/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/LICENSE similarity index 99% rename from vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt rename to vendor/go.opentelemetry.io/contrib/detectors/aws/eks/LICENSE index d64569567..261eeb9e9 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt +++ b/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ diff --git a/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/detector.go b/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/detector.go new file mode 100644 index 000000000..0ef484b26 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/detector.go @@ -0,0 +1,191 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package eks // import "go.opentelemetry.io/contrib/detectors/aws/eks" + +import ( + "context" + "fmt" + "os" + "regexp" + "strings" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/resource" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" +) + +const ( + k8sTokenPath = "/var/run/secrets/kubernetes.io/serviceaccount/token" //nolint:gosec // False positive G101: Potential hardcoded credentials. The detector only check if the token exists. + k8sCertPath = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" + authConfigmapNS = "kube-system" + authConfigmapName = "aws-auth" + cwConfigmapNS = "amazon-cloudwatch" + cwConfigmapName = "cluster-info" + defaultCgroupPath = "/proc/self/cgroup" + containerIDLength = 64 +) + +// detectorUtils is used for testing the resourceDetector by abstracting functions that rely on external systems. +type detectorUtils interface { + fileExists(filename string) bool + getConfigMap(ctx context.Context, namespace string, name string) (map[string]string, error) + getContainerID() (string, error) +} + +// This struct will implement the detectorUtils interface. +type eksDetectorUtils struct { + clientset *kubernetes.Clientset +} + +// resourceDetector for detecting resources running on Amazon EKS. +type resourceDetector struct { + utils detectorUtils + err error +} + +// Compile time assertion that resourceDetector implements the resource.Detector interface. +var _ resource.Detector = (*resourceDetector)(nil) + +// Compile time assertion that eksDetectorUtils implements the detectorUtils interface. +var _ detectorUtils = (*eksDetectorUtils)(nil) + +// NewResourceDetector returns a resource detector that will detect AWS EKS resources. +func NewResourceDetector() resource.Detector { + utils, err := newK8sDetectorUtils() + return &resourceDetector{utils: utils, err: err} +} + +// Detect returns a Resource describing the Amazon EKS environment being run in. +func (detector *resourceDetector) Detect(ctx context.Context) (*resource.Resource, error) { + if detector.err != nil { + return nil, detector.err + } + + isEks, err := isEKS(ctx, detector.utils) + if err != nil { + return nil, err + } + + // Return empty resource object if not running in EKS + if !isEks { + return resource.Empty(), nil + } + + // Create variable to hold resource attributes + attributes := []attribute.KeyValue{ + semconv.CloudProviderAWS, + semconv.CloudPlatformAWSEKS, + } + + // Get clusterName and append to attributes + clusterName, err := getClusterName(ctx, detector.utils) + if err != nil { + return nil, err + } + if clusterName != "" { + attributes = append(attributes, semconv.K8SClusterName(clusterName)) + } + + // Get containerID and append to attributes + containerID, err := detector.utils.getContainerID() + if err != nil { + return nil, err + } + if containerID != "" { + attributes = append(attributes, semconv.ContainerID(containerID)) + } + + // Return new resource object with clusterName and containerID as attributes + return resource.NewWithAttributes(semconv.SchemaURL, attributes...), nil +} + +// isEKS checks if the current environment is running in EKS. +func isEKS(ctx context.Context, utils detectorUtils) (bool, error) { + if !isK8s(utils) { + return false, nil + } + + // Make HTTP GET request + awsAuth, err := utils.getConfigMap(ctx, authConfigmapNS, authConfigmapName) + if err != nil { + return false, fmt.Errorf("isEks() error retrieving auth configmap: %w", err) + } + + return awsAuth != nil, nil +} + +// newK8sDetectorUtils creates the Kubernetes clientset. +func newK8sDetectorUtils() (*eksDetectorUtils, error) { + // Get cluster configuration + confs, err := rest.InClusterConfig() + if err != nil { + return nil, fmt.Errorf("failed to create config: %w", err) + } + + // Create clientset using generated configuration + clientset, err := kubernetes.NewForConfig(confs) + if err != nil { + return nil, fmt.Errorf("failed to create clientset for Kubernetes client") + } + + return &eksDetectorUtils{clientset: clientset}, nil +} + +// isK8s checks if the current environment is running in a Kubernetes environment. +func isK8s(utils detectorUtils) bool { + return utils.fileExists(k8sTokenPath) && utils.fileExists(k8sCertPath) +} + +// fileExists checks if a file with a given filename exists. +func (eksUtils eksDetectorUtils) fileExists(filename string) bool { + info, err := os.Stat(filename) + return err == nil && !info.IsDir() +} + +// getConfigMap retrieves the configuration map from the k8s API. +func (eksUtils eksDetectorUtils) getConfigMap(ctx context.Context, namespace string, name string) (map[string]string, error) { + cm, err := eksUtils.clientset.CoreV1().ConfigMaps(namespace).Get(ctx, name, metav1.GetOptions{}) + if err != nil { + return nil, fmt.Errorf("failed to retrieve ConfigMap %s/%s: %w", namespace, name, err) + } + + return cm.Data, nil +} + +// getClusterName retrieves the clusterName resource attribute. +func getClusterName(ctx context.Context, utils detectorUtils) (string, error) { + resp, err := utils.getConfigMap(ctx, cwConfigmapNS, cwConfigmapName) + if err != nil { + return "", fmt.Errorf("getClusterName() error: %w", err) + } + + return resp["cluster.name"], nil +} + +// getContainerID returns the containerID if currently running within a container. +func (eksUtils eksDetectorUtils) getContainerID() (string, error) { + fileData, err := os.ReadFile(defaultCgroupPath) + if err != nil { + return "", fmt.Errorf("getContainerID() error: cannot read file with path %s: %w", defaultCgroupPath, err) + } + + // is this going to stop working with 1.20 when Docker is deprecated? + r, err := regexp.Compile(`^.*/docker/(.+)$`) + if err != nil { + return "", err + } + + // Retrieve containerID from file + splitData := strings.Split(strings.TrimSpace(string(fileData)), "\n") + for _, str := range splitData { + if r.MatchString(str) { + return str[len(str)-containerIDLength:], nil + } + } + return "", fmt.Errorf("getContainerID() error: cannot read containerID from file %s", defaultCgroupPath) +} diff --git a/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/version.go b/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/version.go new file mode 100644 index 000000000..78d2ba7a4 --- /dev/null +++ b/vendor/go.opentelemetry.io/contrib/detectors/aws/eks/version.go @@ -0,0 +1,17 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package eks // import "go.opentelemetry.io/contrib/detectors/aws/eks" + +// Version is the current release version of the EKS resource detector. +func Version() string { + return "1.28.0" + // This string is updated by the pre_release.sh script during release +} + +// SemVersion is the semantic version to be supplied to tracer/meter creation. +// +// Deprecated: Use [Version] instead. +func SemVersion() string { + return Version() +} diff --git a/vendor/go.opentelemetry.io/otel/.codespellignore b/vendor/go.opentelemetry.io/otel/.codespellignore index 120b63a9c..6bf3abc41 100644 --- a/vendor/go.opentelemetry.io/otel/.codespellignore +++ b/vendor/go.opentelemetry.io/otel/.codespellignore @@ -5,3 +5,5 @@ collison consequentially ans nam +valu +thirdparty diff --git a/vendor/go.opentelemetry.io/otel/.codespellrc b/vendor/go.opentelemetry.io/otel/.codespellrc index 4afbb1fb3..e2cb3ea94 100644 --- a/vendor/go.opentelemetry.io/otel/.codespellrc +++ b/vendor/go.opentelemetry.io/otel/.codespellrc @@ -5,6 +5,6 @@ check-filenames = check-hidden = ignore-words = .codespellignore interactive = 1 -skip = .git,go.mod,go.sum,semconv,venv,.tools +skip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools uri-ignore-words-list = * write = diff --git a/vendor/go.opentelemetry.io/otel/.gitmodules b/vendor/go.opentelemetry.io/otel/.gitmodules deleted file mode 100644 index 38a1f5698..000000000 --- a/vendor/go.opentelemetry.io/otel/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "opentelemetry-proto"] - path = exporters/otlp/internal/opentelemetry-proto - url = https://github.com/open-telemetry/opentelemetry-proto diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml index a62511f38..6d9c8b649 100644 --- a/vendor/go.opentelemetry.io/otel/.golangci.yml +++ b/vendor/go.opentelemetry.io/otel/.golangci.yml @@ -11,6 +11,7 @@ linters: enable: - depguard - errcheck + - errorlint - godot - gofumpt - goimports @@ -21,8 +22,11 @@ linters: - misspell - revive - staticcheck + - tenv - typecheck + - unconvert - unused + - unparam issues: # Maximum issues count per one linter. @@ -124,6 +128,8 @@ linters-settings: - "**/example/**/*.go" - "**/trace/*.go" - "**/trace/**/*.go" + - "**/log/*.go" + - "**/log/**/*.go" deny: - pkg: "go.opentelemetry.io/otel/internal$" desc: Do not use cross-module internal packages. diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md index ebfffb58d..466c7531d 100644 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ b/vendor/go.opentelemetry.io/otel/CHANGELOG.md @@ -10,6 +10,48 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Add a `Remove` method to metric instruments. +## [1.28.0/0.50.0/0.4.0] 2024-07-02 + +### Added + +- The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`. + This method is used to check if an `Instrument` instance is a zero-value. (#5431) +- Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. (#5468) +- The `go.opentelemetry.io/otel/semconv/v1.26.0` package. + The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. (#5476) +- The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. (#5499) +- The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. (#5530) + +### Changed + +- `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. (#5457) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. (#5490) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. (#5490) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#5490) + - The exporter no longer exports the deprecated "otel.library.name" or "otel.library.version" attributes. +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. (#5490) +- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. (#5490) +- `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. (#5493) +- Use non-generic functions in the `Start` method of `"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory allocation. (#5497) +- `service.instance.id` is populated for a `Resource` created with `"go.opentelemetry.io/otel/sdk/resource".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. (#5520) +- Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. (#5545) + +### Fixed + +- Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. (#5376) +- Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) +- Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) +- Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. (#5434) +- Document instrument name requirements in `go.opentelemetry.io/otel/metric`. (#5435) +- Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456) +- Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5464) +- Fix panic in baggage creation when a member contains `0x80` char in key or value. (#5494) +- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5508) +- Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. (#5514) +- Fix stale timestamps reported by the last-value aggregation. (#5517) +- Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. (#5521) +- Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. (#5549) + ## [1.27.0/0.49.0/0.3.0] 2024-05-21 ### Added @@ -252,7 +294,7 @@ See our [versioning policy](VERSIONING.md) for more information about these stab ## [1.20.0/0.43.0] 2023-11-10 -This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementors need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this. +This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementers need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this. ### Added @@ -284,15 +326,15 @@ This release brings a breaking change for custom trace API implementations. Some - `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583) - The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type. This extends the `TracerProvider` interface and is is a breaking change for any existing implementation. - Implementors need to update their implementations based on what they want the default behavior of the interface to be. + Implementers need to update their implementations based on what they want the default behavior of the interface to be. See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) - The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type. This extends the `Tracer` interface and is is a breaking change for any existing implementation. - Implementors need to update their implementations based on what they want the default behavior of the interface to be. + Implementers need to update their implementations based on what they want the default behavior of the interface to be. See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) - The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type. This extends the `Span` interface and is is a breaking change for any existing implementation. - Implementors need to update their implementations based on what they want the default behavior of the interface to be. + Implementers need to update their implementations based on what they want the default behavior of the interface to be. See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) - `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) @@ -928,7 +970,7 @@ The next release will require at least [Go 1.19]. - Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340) - `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436) - Re-enabled Attribute Filters in the Metric SDK. (#3396) -- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggragation. (#3408) +- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggregation. (#3408) - Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) - Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) - Prevent duplicate Prometheus description, unit, and type. (#3469) @@ -1973,7 +2015,7 @@ with major version 0. - `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369) - Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369) - Unify endpoint API that related to OTel exporter. (#1401) -- Optimize metric histogram aggregator to re-use its slice of buckets. (#1435) +- Optimize metric histogram aggregator to reuse its slice of buckets. (#1435) - Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430) - Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434) - `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432) @@ -2963,7 +3005,8 @@ It contains api and sdk for trace and meter. - CircleCI build CI manifest files. - CODEOWNERS file to track owners of this project. -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.27.0...HEAD +[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.28.0...HEAD +[1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0 [1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0 [1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0 [1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0 diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS index 88f4c7d0e..202554933 100644 --- a/vendor/go.opentelemetry.io/otel/CODEOWNERS +++ b/vendor/go.opentelemetry.io/otel/CODEOWNERS @@ -12,6 +12,6 @@ # https://help.github.com/en/articles/about-code-owners # -* @MrAlias @evantorrie @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu +* @MrAlias @XSAM @dashpole @MadVikingGod @pellared @hanyuancheung @dmathieu -CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole +CODEOWNERS @MrAlias @MadVikingGod @pellared @dashpole @XSAM @dmathieu diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md index 2176ce526..b86572f58 100644 --- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md +++ b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md @@ -628,16 +628,15 @@ should be canceled. ### Approvers -- [Evan Torrie](https://github.com/evantorrie), Verizon Media -- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics - [Chester Cheung](https://github.com/hanyuancheung), Tencent -- [Damien Mathieu](https://github.com/dmathieu), Elastic ### Maintainers -- [David Ashpole](https://github.com/dashpole), Google - [Aaron Clawson](https://github.com/MadVikingGod), LightStep +- [Damien Mathieu](https://github.com/dmathieu), Elastic +- [David Ashpole](https://github.com/dashpole), Google - [Robert Pająk](https://github.com/pellared), Splunk +- [Sam Xie](https://github.com/XSAM), Cisco/AppDynamics - [Tyler Yahn](https://github.com/MrAlias), Splunk ### Emeritus @@ -646,6 +645,7 @@ should be canceled. - [Gustavo Silva Paiva](https://github.com/paivagustavo), LightStep - [Josh MacDonald](https://github.com/jmacd), LightStep - [Anthony Mirabella](https://github.com/Aneurysm9), AWS +- [Evan Torrie](https://github.com/evantorrie), Yahoo ### Become an Approver or a Maintainer diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile index a9845a88f..f33619f76 100644 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ b/vendor/go.opentelemetry.io/otel/Makefile @@ -14,8 +14,8 @@ TIMEOUT = 60 .DEFAULT_GOAL := precommit .PHONY: precommit ci -precommit: generate license-check misspell go-mod-tidy golangci-lint-fix verify-readmes test-default -ci: generate license-check lint vanity-import-check verify-readmes build test-default check-clean-work-tree test-coverage +precommit: generate license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default +ci: generate license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage # Tools @@ -264,10 +264,7 @@ SEMCONVPKG ?= "semconv/" semconv-generate: $(SEMCONVGEN) $(SEMCONVKIT) [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 ) [ "$(OTEL_SEMCONV_REPO)" ] || ( echo "OTEL_SEMCONV_REPO unset: missing path to opentelemetry semantic-conventions repo"; exit 1 ) - $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=span -p conventionType=trace -f trace.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=attribute_group -p conventionType=trace -f attribute_group.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" - $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=event -p conventionType=event -f event.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" - $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=resource -p conventionType=resource -f resource.go -t "$(SEMCONVPKG)/template.j2" -s "$(TAG)" $(SEMCONVGEN) -i "$(OTEL_SEMCONV_REPO)/model/." --only=metric -f metric.go -t "$(SEMCONVPKG)/metric_template.j2" -s "$(TAG)" $(SEMCONVKIT) -output "$(SEMCONVPKG)/$(TAG)" -tag "$(TAG)" @@ -280,16 +277,20 @@ gorelease/%:| $(GORELEASE) && $(GORELEASE) \ || echo "" +.PHONY: verify-mods +verify-mods: $(MULTIMOD) + $(MULTIMOD) verify + .PHONY: prerelease -prerelease: $(MULTIMOD) +prerelease: verify-mods @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) - $(MULTIMOD) verify && $(MULTIMOD) prerelease -m ${MODSET} + $(MULTIMOD) prerelease -m ${MODSET} COMMIT ?= "HEAD" .PHONY: add-tags -add-tags: $(MULTIMOD) +add-tags: verify-mods @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) - $(MULTIMOD) verify && $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} + $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} .PHONY: lint-markdown lint-markdown: diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go index f98c54a3c..c40c896cc 100644 --- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go +++ b/vendor/go.opentelemetry.io/otel/baggage/baggage.go @@ -302,7 +302,7 @@ func parseMember(member string) (Member, error) { // Decode a percent-encoded value. value, err := url.PathUnescape(val) if err != nil { - return newInvalidMember(), fmt.Errorf("%w: %v", errInvalidValue, err) + return newInvalidMember(), fmt.Errorf("%w: %w", errInvalidValue, err) } return Member{key: key, value: value, properties: props, hasData: true}, nil } @@ -735,7 +735,7 @@ func validateKey(s string) bool { } func validateKeyChar(c int32) bool { - return c >= 0 && c <= int32(utf8.RuneSelf) && safeKeyCharset[c] + return c >= 0 && c < int32(utf8.RuneSelf) && safeKeyCharset[c] } func validateValue(s string) bool { @@ -850,7 +850,7 @@ var safeValueCharset = [utf8.RuneSelf]bool{ } func validateValueChar(c int32) bool { - return c >= 0 && c <= int32(utf8.RuneSelf) && safeValueCharset[c] + return c >= 0 && c < int32(utf8.RuneSelf) && safeValueCharset[c] } // valueEscape escapes the string so it can be safely placed inside a baggage value, diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go index 462dc8a7a..98afc0b1e 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/exporter.go @@ -79,7 +79,7 @@ func (e *Exporter) Export(ctx context.Context, rm *metricdata.ResourceMetrics) e return fmt.Errorf("failed to upload metrics: %w", upErr) } // Merge the two errors. - return fmt.Errorf("failed to upload incomplete metrics (%s): %w", err, upErr) + return fmt.Errorf("failed to upload incomplete metrics (%w): %w", err, upErr) } return err } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go index b552333db..cc3a77055 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry/retry.go @@ -112,7 +112,7 @@ func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc { } if ctxErr := waitFunc(ctx, delay); ctxErr != nil { - return fmt.Errorf("%w: %s", ctxErr, err) + return fmt.Errorf("%w: %w", ctxErr, err) } } } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go index fb009ba21..d31652b4d 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/error.go @@ -58,7 +58,7 @@ func (e *multiErr) append(err error) { // Do not use errors.As here, this should only be flattened one layer. If // there is a *multiErr several steps down the chain, all the errors above // it will be discarded if errors.As is used instead. - switch other := err.(type) { + switch other := err.(type) { //nolint:errorlint case *multiErr: // Flatten err errors into e. e.errs = append(e.errs, other.errs...) diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go index 669e25e8e..975e3b7aa 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform/metricdata.go @@ -79,7 +79,7 @@ func metric(m metricdata.Metrics) (*mpb.Metric, error) { out := &mpb.Metric{ Name: m.Name, Description: m.Description, - Unit: string(m.Unit), + Unit: m.Unit, } switch a := m.Data.(type) { case metricdata.Gauge[int64]: diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go index 99a5e9f04..a731860f5 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/version.go @@ -5,5 +5,5 @@ package otlpmetricgrpc // import "go.opentelemetry.io/otel/exporters/otlp/otlpme // Version is the current release version of the OpenTelemetry OTLP over gRPC metrics exporter in use. func Version() string { - return "1.27.0" + return "1.28.0" } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go index eeb39339d..205594b7f 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/client.go @@ -294,7 +294,10 @@ func evaluate(err error) (bool, time.Duration) { return false, 0 } - rErr, ok := err.(retryableError) + // Do not use errors.As here, this should only be flattened one layer. If + // there are several chained errors, all the errors above it will be + // discarded if errors.As is used instead. + rErr, ok := err.(retryableError) //nolint:errorlint if !ok { return false, 0 } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go index 442d80961..701deb6d3 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/exporter.go @@ -79,7 +79,7 @@ func (e *Exporter) Export(ctx context.Context, rm *metricdata.ResourceMetrics) e return fmt.Errorf("failed to upload metrics: %w", upErr) } // Merge the two errors. - return fmt.Errorf("failed to upload incomplete metrics (%s): %w", err, upErr) + return fmt.Errorf("failed to upload incomplete metrics (%w): %w", err, upErr) } return err } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go index ea4cff080..a9a08ffe6 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry/retry.go @@ -112,7 +112,7 @@ func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc { } if ctxErr := waitFunc(ctx, delay); ctxErr != nil { - return fmt.Errorf("%w: %s", ctxErr, err) + return fmt.Errorf("%w: %w", ctxErr, err) } } } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go index 60d0d1f72..bb6d21f0b 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/error.go @@ -58,7 +58,7 @@ func (e *multiErr) append(err error) { // Do not use errors.As here, this should only be flattened one layer. If // there is a *multiErr several steps down the chain, all the errors above // it will be discarded if errors.As is used instead. - switch other := err.(type) { + switch other := err.(type) { //nolint:errorlint case *multiErr: // Flatten err errors into e. e.errs = append(e.errs, other.errs...) diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go index 04c2ce757..0a1a65c44 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform/metricdata.go @@ -79,7 +79,7 @@ func metric(m metricdata.Metrics) (*mpb.Metric, error) { out := &mpb.Metric{ Name: m.Name, Description: m.Description, - Unit: string(m.Unit), + Unit: m.Unit, } switch a := m.Data.(type) { case metricdata.Gauge[int64]: diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go index 605513705..88e84ca89 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/version.go @@ -5,5 +5,5 @@ package otlpmetrichttp // import "go.opentelemetry.io/otel/exporters/otlp/otlpme // Version is the current release version of the OpenTelemetry OTLP over HTTP/protobuf metrics exporter in use. func Version() string { - return "1.27.0" + return "1.28.0" } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go index 4f2113ae2..1c5450ab6 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry/retry.go @@ -112,7 +112,7 @@ func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc { } if ctxErr := waitFunc(ctx, delay); ctxErr != nil { - return fmt.Errorf("%w: %s", ctxErr, err) + return fmt.Errorf("%w: %w", ctxErr, err) } } } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go index bbad0e6d0..00ab1f20c 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/options.go @@ -59,8 +59,9 @@ func WithInsecure() Option { // // If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT // environment variable is set, and this option is not passed, that variable -// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT -// will take precedence. +// value will be used. If both environment variables are set, +// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence. If an environment +// variable is set, and this option is passed, this option will take precedence. // // If both this option and WithEndpointURL are used, the last used option will // take precedence. @@ -79,8 +80,9 @@ func WithEndpoint(endpoint string) Option { // // If the OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT // environment variable is set, and this option is not passed, that variable -// value will be used. If both are set, OTEL_EXPORTER_OTLP_TRACES_ENDPOINT -// will take precedence. +// value will be used. If both environment variables are set, +// OTEL_EXPORTER_OTLP_TRACES_ENDPOINT will take precedence. If an environment +// variable is set, and this option is passed, this option will take precedence. // // If both this option and WithEndpoint are used, the last used option will // take precedence. diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go index 1c487a096..1e59ff239 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/client.go @@ -316,7 +316,10 @@ func evaluate(err error) (bool, time.Duration) { return false, 0 } - rErr, ok := err.(retryableError) + // Do not use errors.As here, this should only be flattened one layer. If + // there are several chained errors, all the errors above it will be + // discarded if errors.As is used instead. + rErr, ok := err.(retryableError) //nolint:errorlint if !ok { return false, 0 } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go index e3e647783..86c4819f4 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry/retry.go @@ -112,7 +112,7 @@ func (c Config) RequestFunc(evaluate EvaluateFunc) RequestFunc { } if ctxErr := waitFunc(ctx, delay); ctxErr != nil { - return fmt.Errorf("%w: %s", ctxErr, err) + return fmt.Errorf("%w: %w", ctxErr, err) } } } diff --git a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go index fc7190d94..14ad8c33b 100644 --- a/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go +++ b/vendor/go.opentelemetry.io/otel/exporters/otlp/otlptrace/version.go @@ -5,5 +5,5 @@ package otlptrace // import "go.opentelemetry.io/otel/exporters/otlp/otlptrace" // Version is the current release version of the OpenTelemetry OTLP trace exporter in use. func Version() string { - return "1.27.0" + return "1.28.0" } diff --git a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go index f32766e57..822d84794 100644 --- a/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go +++ b/vendor/go.opentelemetry.io/otel/internal/attribute/attribute.go @@ -14,33 +14,33 @@ import ( // BoolSliceValue converts a bool slice into an array with same elements as slice. func BoolSliceValue(v []bool) interface{} { var zero bool - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))) - copy(cp.Elem().Slice(0, len(v)).Interface().([]bool), v) - return cp.Elem().Interface() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() } // Int64SliceValue converts an int64 slice into an array with same elements as slice. func Int64SliceValue(v []int64) interface{} { var zero int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))) - copy(cp.Elem().Slice(0, len(v)).Interface().([]int64), v) - return cp.Elem().Interface() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() } // Float64SliceValue converts a float64 slice into an array with same elements as slice. func Float64SliceValue(v []float64) interface{} { var zero float64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))) - copy(cp.Elem().Slice(0, len(v)).Interface().([]float64), v) - return cp.Elem().Interface() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() } // StringSliceValue converts a string slice into an array with same elements as slice. func StringSliceValue(v []string) interface{} { var zero string - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))) - copy(cp.Elem().Slice(0, len(v)).Interface().([]string), v) - return cp.Elem().Interface() + cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() + reflect.Copy(cp, reflect.ValueOf(v)) + return cp.Interface() } // AsBoolSlice converts a bool array into a slice into with same elements as array. diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go index 590fa7385..cfd1df9bf 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/meter.go @@ -65,6 +65,7 @@ func (p *meterProvider) Meter(name string, opts ...metric.MeterOption) metric.Me key := il{ name: name, version: c.InstrumentationVersion(), + schema: c.SchemaURL(), } if p.meters == nil { diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go index 596f716f4..e31f442b4 100644 --- a/vendor/go.opentelemetry.io/otel/internal/global/trace.go +++ b/vendor/go.opentelemetry.io/otel/internal/global/trace.go @@ -86,6 +86,7 @@ func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T key := il{ name: name, version: c.InstrumentationVersion(), + schema: c.SchemaURL(), } if p.tracers == nil { @@ -101,10 +102,7 @@ func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.T return t } -type il struct { - name string - version string -} +type il struct{ name, version, schema string } // tracer is a placeholder for a trace.Tracer. // diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go index 075234b33..f153745b0 100644 --- a/vendor/go.opentelemetry.io/otel/metric/doc.go +++ b/vendor/go.opentelemetry.io/otel/metric/doc.go @@ -57,6 +57,23 @@ asynchronous measurement, a Gauge ([Int64ObservableGauge] and See the [OpenTelemetry documentation] for more information about instruments and their intended use. +# Instrument Name + +OpenTelemetry defines an [instrument name syntax] that restricts what +instrument names are allowed. + +Instrument names should ... + + - Not be empty. + - Have an alphabetic character as their first letter. + - Have any letter after the first be an alphanumeric character, ‘_’, ‘.’, + ‘-’, or ‘/’. + - Have a maximum length of 255 letters. + +To ensure compatibility with observability platforms, all instruments created +need to conform to this syntax. Not all implementations of the API will validate +these names, it is the callers responsibility to ensure compliance. + # Measurements Measurements are made by recording values and information about the values with @@ -153,6 +170,7 @@ It is strongly recommended that authors only embed That implementation is the only one OpenTelemetry authors can guarantee will fully implement all the API interfaces when a user updates their API. +[instrument name syntax]: https://opentelemetry.io/docs/specs/otel/metrics/api/#instrument-name-syntax [OpenTelemetry documentation]: https://opentelemetry.io/docs/concepts/signals/metrics/ [GetMeterProvider]: https://pkg.go.dev/go.opentelemetry.io/otel#GetMeterProvider */ diff --git a/vendor/go.opentelemetry.io/otel/metric/meter.go b/vendor/go.opentelemetry.io/otel/metric/meter.go index 460b3f9b0..6a7991e01 100644 --- a/vendor/go.opentelemetry.io/otel/metric/meter.go +++ b/vendor/go.opentelemetry.io/otel/metric/meter.go @@ -47,20 +47,36 @@ type Meter interface { // Int64Counter returns a new Int64Counter instrument identified by name // and configured with options. The instrument is used to synchronously // record increasing int64 measurements during a computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64Counter(name string, options ...Int64CounterOption) (Int64Counter, error) // Int64UpDownCounter returns a new Int64UpDownCounter instrument // identified by name and configured with options. The instrument is used // to synchronously record int64 measurements during a computational // operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64UpDownCounter(name string, options ...Int64UpDownCounterOption) (Int64UpDownCounter, error) // Int64Histogram returns a new Int64Histogram instrument identified by // name and configured with options. The instrument is used to // synchronously record the distribution of int64 measurements during a // computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error) // Int64Gauge returns a new Int64Gauge instrument identified by name and // configured with options. The instrument is used to synchronously record // instantaneous int64 measurements during a computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error) // Int64ObservableCounter returns a new Int64ObservableCounter identified // by name and configured with options. The instrument is used to @@ -71,6 +87,10 @@ type Meter interface { // the WithInt64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64ObservableCounter(name string, options ...Int64ObservableCounterOption) (Int64ObservableCounter, error) // Int64ObservableUpDownCounter returns a new Int64ObservableUpDownCounter // instrument identified by name and configured with options. The @@ -81,6 +101,10 @@ type Meter interface { // the WithInt64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64ObservableUpDownCounter(name string, options ...Int64ObservableUpDownCounterOption) (Int64ObservableUpDownCounter, error) // Int64ObservableGauge returns a new Int64ObservableGauge instrument // identified by name and configured with options. The instrument is used @@ -91,26 +115,46 @@ type Meter interface { // the WithInt64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Int64ObservableGauge(name string, options ...Int64ObservableGaugeOption) (Int64ObservableGauge, error) // Float64Counter returns a new Float64Counter instrument identified by // name and configured with options. The instrument is used to // synchronously record increasing float64 measurements during a // computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64Counter(name string, options ...Float64CounterOption) (Float64Counter, error) // Float64UpDownCounter returns a new Float64UpDownCounter instrument // identified by name and configured with options. The instrument is used // to synchronously record float64 measurements during a computational // operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64UpDownCounter(name string, options ...Float64UpDownCounterOption) (Float64UpDownCounter, error) // Float64Histogram returns a new Float64Histogram instrument identified by // name and configured with options. The instrument is used to // synchronously record the distribution of float64 measurements during a // computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error) // Float64Gauge returns a new Float64Gauge instrument identified by name and // configured with options. The instrument is used to synchronously record // instantaneous float64 measurements during a computational operation. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error) // Float64ObservableCounter returns a new Float64ObservableCounter // instrument identified by name and configured with options. The @@ -121,6 +165,10 @@ type Meter interface { // the WithFloat64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64ObservableCounter(name string, options ...Float64ObservableCounterOption) (Float64ObservableCounter, error) // Float64ObservableUpDownCounter returns a new // Float64ObservableUpDownCounter instrument identified by name and @@ -131,6 +179,10 @@ type Meter interface { // the WithFloat64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64ObservableUpDownCounter(name string, options ...Float64ObservableUpDownCounterOption) (Float64ObservableUpDownCounter, error) // Float64ObservableGauge returns a new Float64ObservableGauge instrument // identified by name and configured with options. The instrument is used @@ -141,6 +193,10 @@ type Meter interface { // the WithFloat64Callback option to register the callback here, or use the // RegisterCallback method of this Meter to register one later. See the // Measurements section of the package documentation for more information. + // + // The name needs to conform to the OpenTelemetry instrument name syntax. + // See the Instrument Name section of the package documentation for more + // information. Float64ObservableGauge(name string, options ...Float64ObservableGaugeOption) (Float64ObservableGauge, error) // RegisterCallback registers f to be called during the collection of a diff --git a/vendor/go.opentelemetry.io/otel/requirements.txt b/vendor/go.opentelemetry.io/otel/requirements.txt index e0a43e138..ab09daf9d 100644 --- a/vendor/go.opentelemetry.io/otel/requirements.txt +++ b/vendor/go.opentelemetry.io/otel/requirements.txt @@ -1 +1 @@ -codespell==2.2.6 +codespell==2.3.0 diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/gen.go b/vendor/go.opentelemetry.io/otel/sdk/internal/gen.go deleted file mode 100644 index 1fc19d3fe..000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/gen.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/otel/sdk/internal" - -//go:generate gotmpl --body=../../internal/shared/matchers/expectation.go.tmpl "--data={}" --out=matchers/expectation.go -//go:generate gotmpl --body=../../internal/shared/matchers/expecter.go.tmpl "--data={}" --out=matchers/expecter.go -//go:generate gotmpl --body=../../internal/shared/matchers/temporal_matcher.go.tmpl "--data={}" --out=matchers/temporal_matcher.go - -//go:generate gotmpl --body=../../internal/shared/internaltest/alignment.go.tmpl "--data={}" --out=internaltest/alignment.go -//go:generate gotmpl --body=../../internal/shared/internaltest/env.go.tmpl "--data={}" --out=internaltest/env.go -//go:generate gotmpl --body=../../internal/shared/internaltest/env_test.go.tmpl "--data={}" --out=internaltest/env_test.go -//go:generate gotmpl --body=../../internal/shared/internaltest/errors.go.tmpl "--data={}" --out=internaltest/errors.go -//go:generate gotmpl --body=../../internal/shared/internaltest/harness.go.tmpl "--data={\"matchersImportPath\": \"go.opentelemetry.io/otel/sdk/internal/matchers\"}" --out=internaltest/harness.go -//go:generate gotmpl --body=../../internal/shared/internaltest/text_map_carrier.go.tmpl "--data={}" --out=internaltest/text_map_carrier.go -//go:generate gotmpl --body=../../internal/shared/internaltest/text_map_carrier_test.go.tmpl "--data={}" --out=internaltest/text_map_carrier_test.go -//go:generate gotmpl --body=../../internal/shared/internaltest/text_map_propagator.go.tmpl "--data={}" --out=internaltest/text_map_propagator.go -//go:generate gotmpl --body=../../internal/shared/internaltest/text_map_propagator_test.go.tmpl "--data={}" --out=internaltest/text_map_propagator_test.go diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/internal.go b/vendor/go.opentelemetry.io/otel/sdk/internal/internal.go deleted file mode 100644 index a990092f9..000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/internal.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/otel/sdk/internal" - -import "time" - -// MonotonicEndTime returns the end time at present -// but offset from start, monotonically. -// -// The monotonic clock is used in subtractions hence -// the duration since start added back to start gives -// end as a monotonic time. -// See https://golang.org/pkg/time/#hdr-Monotonic_Clocks -func MonotonicEndTime(start time.Time) time.Time { - return start.Add(time.Since(start)) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md b/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md new file mode 100644 index 000000000..fab61647c --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md @@ -0,0 +1,46 @@ +# Experimental Features + +The SDK contains features that have not yet stabilized in the OpenTelemetry specification. +These features are added to the OpenTelemetry Go SDK prior to stabilization in the specification so that users can start experimenting with them and provide feedback. + +These feature may change in backwards incompatible ways as feedback is applied. +See the [Compatibility and Stability](#compatibility-and-stability) section for more information. + +## Features + +- [Resource](#resource) + +### Resource + +[OpenTelemetry resource semantic conventions] include many attribute definitions that are defined as experimental. +To have experimental semantic conventions be added by [resource detectors] set the `OTEL_GO_X_RESOURCE` environment variable. +The value set must be the case-insensitive string of `"true"` to enable the feature. +All other values are ignored. + + + +[OpenTelemetry resource semantic conventions]: https://opentelemetry.io/docs/specs/semconv/resource/ +[resource detectors]: https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Detector + +#### Examples + +Enable experimental resource semantic conventions. + +```console +export OTEL_GO_X_RESOURCE=true +``` + +Disable experimental resource semantic conventions. + +```console +unset OTEL_GO_X_RESOURCE +``` + +## Compatibility and Stability + +Experimental features do not fall within the scope of the OpenTelemetry Go versioning and stability [policy](../../../VERSIONING.md). +These features may be removed or modified in successive version releases, including patch versions. + +When an experimental feature is promoted to a stable feature, a migration path will be included in the changelog entry of the release. +There is no guarantee that any environment variable feature flags that enabled the experimental feature will be supported by the stable version. +If they are supported, they may be accompanied with a deprecation notice stating a timeline for the removal of that support. diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go new file mode 100644 index 000000000..68d296cbe --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go @@ -0,0 +1,66 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package x contains support for OTel SDK experimental features. +// +// This package should only be used for features defined in the specification. +// It should not be used for experiments or new project ideas. +package x // import "go.opentelemetry.io/otel/sdk/internal/x" + +import ( + "os" + "strings" +) + +// Resource is an experimental feature flag that defines if resource detectors +// should be included experimental semantic conventions. +// +// To enable this feature set the OTEL_GO_X_RESOURCE environment variable +// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" +// will also enable this). +var Resource = newFeature("RESOURCE", func(v string) (string, bool) { + if strings.ToLower(v) == "true" { + return v, true + } + return "", false +}) + +// Feature is an experimental feature control flag. It provides a uniform way +// to interact with these feature flags and parse their values. +type Feature[T any] struct { + key string + parse func(v string) (T, bool) +} + +func newFeature[T any](suffix string, parse func(string) (T, bool)) Feature[T] { + const envKeyRoot = "OTEL_GO_X_" + return Feature[T]{ + key: envKeyRoot + suffix, + parse: parse, + } +} + +// Key returns the environment variable key that needs to be set to enable the +// feature. +func (f Feature[T]) Key() string { return f.key } + +// Lookup returns the user configured value for the feature and true if the +// user has enabled the feature. Otherwise, if the feature is not enabled, a +// zero-value and false are returned. +func (f Feature[T]) Lookup() (v T, ok bool) { + // https://github.com/open-telemetry/opentelemetry-specification/blob/62effed618589a0bec416a87e559c0a9d96289bb/specification/configuration/sdk-environment-variables.md#parsing-empty-value + // + // > The SDK MUST interpret an empty value of an environment variable the + // > same way as when the variable is unset. + vRaw := os.Getenv(f.key) + if vRaw == "" { + return v, ok + } + return f.parse(vRaw) +} + +// Enabled returns if the feature is enabled. +func (f Feature[T]) Enabled() bool { + _, ok := f.Lookup() + return ok +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/config.go b/vendor/go.opentelemetry.io/otel/sdk/metric/config.go index 9a41f94e9..bbe7bf671 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/config.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/config.go @@ -122,7 +122,7 @@ func WithReader(r Reader) Option { }) } -// WithView associates views a MeterProvider. +// WithView associates views with a MeterProvider. // // Views are appended to existing ones in a MeterProvider if this option is // used multiple times. diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go index c774a4684..82619da78 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/exemplar.go @@ -19,67 +19,63 @@ import ( // Note: This will only return non-nil values when the experimental exemplar // feature is enabled and the OTEL_METRICS_EXEMPLAR_FILTER environment variable // is not set to always_off. -func reservoirFunc(agg Aggregation) func() exemplar.Reservoir { +func reservoirFunc[N int64 | float64](agg Aggregation) func() exemplar.FilteredReservoir[N] { if !x.Exemplars.Enabled() { return nil } - - // https://github.com/open-telemetry/opentelemetry-specification/blob/d4b241f451674e8f611bb589477680341006ad2b/specification/metrics/sdk.md#exemplar-defaults - resF := func() func() exemplar.Reservoir { - // Explicit bucket histogram aggregation with more than 1 bucket will - // use AlignedHistogramBucketExemplarReservoir. - a, ok := agg.(AggregationExplicitBucketHistogram) - if ok && len(a.Boundaries) > 0 { - cp := slices.Clone(a.Boundaries) - return func() exemplar.Reservoir { - bounds := cp - return exemplar.Histogram(bounds) - } - } - - var n int - if a, ok := agg.(AggregationBase2ExponentialHistogram); ok { - // Base2 Exponential Histogram Aggregation SHOULD use a - // SimpleFixedSizeExemplarReservoir with a reservoir equal to the - // smaller of the maximum number of buckets configured on the - // aggregation or twenty (e.g. min(20, max_buckets)). - n = int(a.MaxSize) - if n > 20 { - n = 20 - } - } else { - // https://github.com/open-telemetry/opentelemetry-specification/blob/e94af89e3d0c01de30127a0f423e912f6cda7bed/specification/metrics/sdk.md#simplefixedsizeexemplarreservoir - // This Exemplar reservoir MAY take a configuration parameter for - // the size of the reservoir. If no size configuration is - // provided, the default size MAY be the number of possible - // concurrent threads (e.g. number of CPUs) to help reduce - // contention. Otherwise, a default size of 1 SHOULD be used. - n = runtime.NumCPU() - if n < 1 { - // Should never be the case, but be defensive. - n = 1 - } - } - - return func() exemplar.Reservoir { - return exemplar.FixedSize(n) - } - } - // https://github.com/open-telemetry/opentelemetry-specification/blob/d4b241f451674e8f611bb589477680341006ad2b/specification/configuration/sdk-environment-variables.md#exemplar const filterEnvKey = "OTEL_METRICS_EXEMPLAR_FILTER" + var filter exemplar.Filter + switch os.Getenv(filterEnvKey) { case "always_on": - return resF() + filter = exemplar.AlwaysOnFilter case "always_off": return exemplar.Drop case "trace_based": fallthrough default: - newR := resF() - return func() exemplar.Reservoir { - return exemplar.SampledFilter(newR()) + filter = exemplar.SampledFilter + } + + // https://github.com/open-telemetry/opentelemetry-specification/blob/d4b241f451674e8f611bb589477680341006ad2b/specification/metrics/sdk.md#exemplar-defaults + // Explicit bucket histogram aggregation with more than 1 bucket will + // use AlignedHistogramBucketExemplarReservoir. + a, ok := agg.(AggregationExplicitBucketHistogram) + if ok && len(a.Boundaries) > 0 { + cp := slices.Clone(a.Boundaries) + return func() exemplar.FilteredReservoir[N] { + bounds := cp + return exemplar.NewFilteredReservoir[N](filter, exemplar.Histogram(bounds)) } } + + var n int + if a, ok := agg.(AggregationBase2ExponentialHistogram); ok { + // Base2 Exponential Histogram Aggregation SHOULD use a + // SimpleFixedSizeExemplarReservoir with a reservoir equal to the + // smaller of the maximum number of buckets configured on the + // aggregation or twenty (e.g. min(20, max_buckets)). + n = int(a.MaxSize) + if n > 20 { + n = 20 + } + } else { + // https://github.com/open-telemetry/opentelemetry-specification/blob/e94af89e3d0c01de30127a0f423e912f6cda7bed/specification/metrics/sdk.md#simplefixedsizeexemplarreservoir + // This Exemplar reservoir MAY take a configuration parameter for + // the size of the reservoir. If no size configuration is + // provided, the default size MAY be the number of possible + // concurrent threads (e.g. number of CPUs) to help reduce + // contention. Otherwise, a default size of 1 SHOULD be used. + n = runtime.NumCPU() + if n < 1 { + // Should never be the case, but be defensive. + n = 1 + } + } + + return func() exemplar.FilteredReservoir[N] { + return exemplar.NewFilteredReservoir[N](filter, exemplar.FixedSize(n)) + } } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go b/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go index 64b68df80..776a63bb7 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/instrument.go @@ -18,10 +18,7 @@ import ( "go.opentelemetry.io/otel/sdk/metric/internal/aggregate" ) -var ( - zeroInstrumentKind InstrumentKind - zeroScope instrumentation.Scope -) +var zeroScope instrumentation.Scope // InstrumentKind is the identifier of a group of instruments that all // performing the same function. @@ -77,11 +74,11 @@ type Instrument struct { nonComparable // nolint: unused } -// empty returns if all fields of i are their zero-value. -func (i Instrument) empty() bool { +// IsEmpty returns if all Instrument fields are their zero-value. +func (i Instrument) IsEmpty() bool { return i.Name == "" && i.Description == "" && - i.Kind == zeroInstrumentKind && + i.Kind == instrumentKindUndefined && i.Unit == "" && i.Scope == zeroScope } @@ -112,7 +109,7 @@ func (i Instrument) matchesDescription(other Instrument) bool { // matchesKind returns true if the Kind of i is its zero-value or it equals the // Kind of other, otherwise false. func (i Instrument) matchesKind(other Instrument) bool { - return i.Kind == zeroInstrumentKind || i.Kind == other.Kind + return i.Kind == instrumentKindUndefined || i.Kind == other.Kind } // matchesUnit returns true if the Unit of i is its zero-value or it equals the diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go index 67ffc3b08..5ab129397 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/aggregate.go @@ -42,7 +42,7 @@ type Builder[N int64 | float64] struct { // // If this is not provided a default factory function that returns an // exemplar.Drop reservoir will be used. - ReservoirFunc func() exemplar.Reservoir + ReservoirFunc func() exemplar.FilteredReservoir[N] // AggregationLimit is the cardinality limit of measurement attributes. Any // measurement for new attributes once the limit has been reached will be // aggregated into a single aggregate for the "otel.metric.overflow" @@ -53,7 +53,7 @@ type Builder[N int64 | float64] struct { AggregationLimit int } -func (b Builder[N]) resFunc() func() exemplar.Reservoir { +func (b Builder[N]) resFunc() func() exemplar.FilteredReservoir[N] { if b.ReservoirFunc != nil { return b.ReservoirFunc } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go index 425aeef4b..b41b8a3bd 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/exponential_histogram.go @@ -31,7 +31,7 @@ const ( // expoHistogramDataPoint is a single data point in an exponential histogram. type expoHistogramDataPoint[N int64 | float64] struct { attrs attribute.Set - res exemplar.Reservoir + res exemplar.FilteredReservoir[N] count uint64 min N @@ -282,7 +282,7 @@ func (b *expoBuckets) downscale(delta int) { // newExponentialHistogram returns an Aggregator that summarizes a set of // measurements as an exponential histogram. Each histogram is scoped by attributes // and the aggregation cycle the measurements were made in. -func newExponentialHistogram[N int64 | float64](maxSize, maxScale int32, noMinMax, noSum bool, limit int, r func() exemplar.Reservoir) *expoHistogram[N] { +func newExponentialHistogram[N int64 | float64](maxSize, maxScale int32, noMinMax, noSum bool, limit int, r func() exemplar.FilteredReservoir[N]) *expoHistogram[N] { return &expoHistogram[N]{ noSum: noSum, noMinMax: noMinMax, @@ -306,7 +306,7 @@ type expoHistogram[N int64 | float64] struct { maxSize int maxScale int - newRes func() exemplar.Reservoir + newRes func() exemplar.FilteredReservoir[N] limit limiter[*expoHistogramDataPoint[N]] values map[attribute.Distinct]*expoHistogramDataPoint[N] stale map[attribute.Distinct]*expoHistogramDataPoint[N] @@ -321,8 +321,6 @@ func (e *expoHistogram[N]) measure(ctx context.Context, value N, fltrAttr attrib return } - t := now() - e.valuesMu.Lock() defer e.valuesMu.Unlock() @@ -335,7 +333,7 @@ func (e *expoHistogram[N]) measure(ctx context.Context, value N, fltrAttr attrib e.values[attr.Equivalent()] = v } v.record(value) - v.res.Offer(ctx, t, exemplar.NewValue(value), droppedAttr) + v.res.Offer(ctx, value, droppedAttr) } func (e *expoHistogram[N]) remove(ctx context.Context, fltrAttr attribute.Set) { diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go index 8d9161d7d..3a7f3a836 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/histogram.go @@ -17,7 +17,7 @@ import ( type buckets[N int64 | float64] struct { attrs attribute.Set - res exemplar.Reservoir + res exemplar.FilteredReservoir[N] counts []uint64 count uint64 @@ -48,14 +48,14 @@ type histValues[N int64 | float64] struct { noSum bool bounds []float64 - newRes func() exemplar.Reservoir + newRes func() exemplar.FilteredReservoir[N] limit limiter[*buckets[N]] values map[attribute.Distinct]*buckets[N] stale map[attribute.Distinct]*buckets[N] valuesMu sync.Mutex } -func newHistValues[N int64 | float64](bounds []float64, noSum bool, limit int, r func() exemplar.Reservoir) *histValues[N] { +func newHistValues[N int64 | float64](bounds []float64, noSum bool, limit int, r func() exemplar.FilteredReservoir[N]) *histValues[N] { // The responsibility of keeping all buckets correctly associated with the // passed boundaries is ultimately this type's responsibility. Make a copy // here so we can always guarantee this. Or, in the case of failure, have @@ -82,8 +82,6 @@ func (s *histValues[N]) measure(ctx context.Context, value N, fltrAttr attribute // (s.bounds[len(s.bounds)-1], +∞). idx := sort.SearchFloat64s(s.bounds, float64(value)) - t := now() - s.valuesMu.Lock() defer s.valuesMu.Unlock() @@ -108,7 +106,7 @@ func (s *histValues[N]) measure(ctx context.Context, value N, fltrAttr attribute if !s.noSum { b.sum(value) } - b.res.Offer(ctx, t, exemplar.NewValue(value), droppedAttr) + b.res.Offer(ctx, value, droppedAttr) } func (s *histValues[N]) remove(ctx context.Context, fltrAttr attribute.Set) { @@ -125,7 +123,7 @@ func (s *histValues[N]) remove(ctx context.Context, fltrAttr attribute.Set) { // newHistogram returns an Aggregator that summarizes a set of measurements as // an histogram. -func newHistogram[N int64 | float64](boundaries []float64, noMinMax, noSum bool, limit int, r func() exemplar.Reservoir) *histogram[N] { +func newHistogram[N int64 | float64](boundaries []float64, noMinMax, noSum bool, limit int, r func() exemplar.FilteredReservoir[N]) *histogram[N] { return &histogram[N]{ histValues: newHistValues[N](boundaries, noSum, limit, r), noMinMax: noMinMax, diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go index a823061d6..7ee667f00 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/lastvalue.go @@ -15,13 +15,12 @@ import ( // datapoint is timestamped measurement data. type datapoint[N int64 | float64] struct { - attrs attribute.Set - timestamp time.Time - value N - res exemplar.Reservoir + attrs attribute.Set + value N + res exemplar.FilteredReservoir[N] } -func newLastValue[N int64 | float64](limit int, r func() exemplar.Reservoir) *lastValue[N] { +func newLastValue[N int64 | float64](limit int, r func() exemplar.FilteredReservoir[N]) *lastValue[N] { return &lastValue[N]{ newRes: r, limit: newLimiter[datapoint[N]](limit), @@ -35,7 +34,7 @@ func newLastValue[N int64 | float64](limit int, r func() exemplar.Reservoir) *la type lastValue[N int64 | float64] struct { sync.Mutex - newRes func() exemplar.Reservoir + newRes func() exemplar.FilteredReservoir[N] limit limiter[datapoint[N]] values map[attribute.Distinct]datapoint[N] stale map[attribute.Distinct]datapoint[N] @@ -43,8 +42,6 @@ type lastValue[N int64 | float64] struct { } func (s *lastValue[N]) measure(ctx context.Context, value N, fltrAttr attribute.Set, droppedAttr []attribute.KeyValue) { - t := now() - s.Lock() defer s.Unlock() @@ -55,9 +52,8 @@ func (s *lastValue[N]) measure(ctx context.Context, value N, fltrAttr attribute. } d.attrs = attr - d.timestamp = t d.value = value - d.res.Offer(ctx, t, exemplar.NewValue(value), droppedAttr) + d.res.Offer(ctx, value, droppedAttr) s.values[attr.Equivalent()] = d } @@ -75,6 +71,7 @@ func (s *lastValue[N]) remove(ctx context.Context, fltrAttr attribute.Set) { } func (s *lastValue[N]) delta(dest *metricdata.Aggregation) int { + t := now() // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of // the DataPoints is missed (better luck next time). gData, _ := (*dest).(metricdata.Gauge[N]) @@ -82,12 +79,12 @@ func (s *lastValue[N]) delta(dest *metricdata.Aggregation) int { s.Lock() defer s.Unlock() - n := s.copyDpts(&gData.DataPoints) + n := s.copyDpts(&gData.DataPoints, t) // Do not report stale values. clear(s.values) clear(s.stale) // Update start time for delta temporality. - s.start = now() + s.start = t *dest = gData @@ -95,6 +92,7 @@ func (s *lastValue[N]) delta(dest *metricdata.Aggregation) int { } func (s *lastValue[N]) cumulative(dest *metricdata.Aggregation) int { + t := now() // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of // the DataPoints is missed (better luck next time). gData, _ := (*dest).(metricdata.Gauge[N]) @@ -102,7 +100,7 @@ func (s *lastValue[N]) cumulative(dest *metricdata.Aggregation) int { s.Lock() defer s.Unlock() - n := s.copyDptsWithStale(&gData.DataPoints) + n := s.copyDptsWithStale(&gData.DataPoints, t) // TODO (#3006): This will use an unbounded amount of memory if there // are unbounded number of attribute sets being aggregated. Attribute // sets that become "stale" need to be forgotten so this will not @@ -118,7 +116,7 @@ func (s *lastValue[N]) cumulative(dest *metricdata.Aggregation) int { // copyDpts copies the datapoints held by s into dest. The number of datapoints // copied is returned. -func (s *lastValue[N]) copyDpts(dest *[]metricdata.DataPoint[N]) int { +func (s *lastValue[N]) copyDpts(dest *[]metricdata.DataPoint[N], t time.Time) int { n := len(s.values) *dest = reset(*dest, n, n) @@ -127,7 +125,7 @@ func (s *lastValue[N]) copyDpts(dest *[]metricdata.DataPoint[N]) int { for _, v := range s.values { (*dest)[i].Attributes = v.attrs (*dest)[i].StartTime = s.start - (*dest)[i].Time = v.timestamp + (*dest)[i].Time = t (*dest)[i].Value = v.value collectExemplars(&(*dest)[i].Exemplars, v.res.Collect) i++ @@ -136,7 +134,7 @@ func (s *lastValue[N]) copyDpts(dest *[]metricdata.DataPoint[N]) int { return n } -func (s *lastValue[N]) copyDptsWithStale(dest *[]metricdata.DataPoint[N]) int { +func (s *lastValue[N]) copyDptsWithStale(dest *[]metricdata.DataPoint[N], t time.Time) int { n := len(s.values) + len(s.stale) *dest = reset(*dest, n, n) @@ -145,7 +143,7 @@ func (s *lastValue[N]) copyDptsWithStale(dest *[]metricdata.DataPoint[N]) int { for _, v := range s.values { (*dest)[i].Attributes = v.attrs (*dest)[i].StartTime = s.start - (*dest)[i].Time = v.timestamp + (*dest)[i].Time = t (*dest)[i].Value = v.value collectExemplars(&(*dest)[i].Exemplars, v.res.Collect) i++ @@ -154,7 +152,7 @@ func (s *lastValue[N]) copyDptsWithStale(dest *[]metricdata.DataPoint[N]) int { for _, v := range s.stale { (*dest)[i].Attributes = v.attrs (*dest)[i].StartTime = s.start - (*dest)[i].Time = v.timestamp + (*dest)[i].Time = t (*dest)[i].NoRecordedValue = true i++ } @@ -164,7 +162,7 @@ func (s *lastValue[N]) copyDptsWithStale(dest *[]metricdata.DataPoint[N]) int { // newPrecomputedLastValue returns an aggregator that summarizes a set of // observations as the last one made. -func newPrecomputedLastValue[N int64 | float64](limit int, r func() exemplar.Reservoir) *precomputedLastValue[N] { +func newPrecomputedLastValue[N int64 | float64](limit int, r func() exemplar.FilteredReservoir[N]) *precomputedLastValue[N] { return &precomputedLastValue[N]{lastValue: newLastValue[N](limit, r)} } @@ -174,6 +172,7 @@ type precomputedLastValue[N int64 | float64] struct { } func (s *precomputedLastValue[N]) delta(dest *metricdata.Aggregation) int { + t := now() // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of // the DataPoints is missed (better luck next time). gData, _ := (*dest).(metricdata.Gauge[N]) @@ -181,12 +180,12 @@ func (s *precomputedLastValue[N]) delta(dest *metricdata.Aggregation) int { s.Lock() defer s.Unlock() - n := s.copyDpts(&gData.DataPoints) + n := s.copyDpts(&gData.DataPoints, t) // Do not report stale values. clear(s.values) clear(s.stale) // Update start time for delta temporality. - s.start = now() + s.start = t *dest = gData @@ -194,6 +193,7 @@ func (s *precomputedLastValue[N]) delta(dest *metricdata.Aggregation) int { } func (s *precomputedLastValue[N]) cumulative(dest *metricdata.Aggregation) int { + t := now() // Ignore if dest is not a metricdata.Gauge. The chance for memory reuse of // the DataPoints is missed (better luck next time). gData, _ := (*dest).(metricdata.Gauge[N]) @@ -201,7 +201,7 @@ func (s *precomputedLastValue[N]) cumulative(dest *metricdata.Aggregation) int { s.Lock() defer s.Unlock() - n := s.copyDptsWithStale(&gData.DataPoints) + n := s.copyDptsWithStale(&gData.DataPoints, t) // Do not report stale values. clear(s.values) clear(s.stale) diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go index 938fdb185..e6bfcdd31 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate/sum.go @@ -15,20 +15,20 @@ import ( type sumValue[N int64 | float64] struct { n N - res exemplar.Reservoir + res exemplar.FilteredReservoir[N] attrs attribute.Set } // valueMap is the storage for sums. type valueMap[N int64 | float64] struct { sync.Mutex - newRes func() exemplar.Reservoir + newRes func() exemplar.FilteredReservoir[N] limit limiter[sumValue[N]] values map[attribute.Distinct]sumValue[N] stale map[attribute.Distinct]sumValue[N] } -func newValueMap[N int64 | float64](limit int, r func() exemplar.Reservoir) *valueMap[N] { +func newValueMap[N int64 | float64](limit int, r func() exemplar.FilteredReservoir[N]) *valueMap[N] { return &valueMap[N]{ newRes: r, limit: newLimiter[sumValue[N]](limit), @@ -38,8 +38,6 @@ func newValueMap[N int64 | float64](limit int, r func() exemplar.Reservoir) *val } func (s *valueMap[N]) measure(ctx context.Context, value N, fltrAttr attribute.Set, droppedAttr []attribute.KeyValue) { - t := now() - s.Lock() defer s.Unlock() @@ -51,7 +49,7 @@ func (s *valueMap[N]) measure(ctx context.Context, value N, fltrAttr attribute.S v.attrs = attr v.n += value - v.res.Offer(ctx, t, exemplar.NewValue(value), droppedAttr) + v.res.Offer(ctx, value, droppedAttr) s.values[attr.Equivalent()] = v } @@ -71,7 +69,7 @@ func (s *valueMap[N]) remove(ctx context.Context, fltrAttr attribute.Set) { // newSum returns an aggregator that summarizes a set of measurements as their // arithmetic sum. Each sum is scoped by attributes and the aggregation cycle // the measurements were made in. -func newSum[N int64 | float64](monotonic bool, limit int, r func() exemplar.Reservoir) *sum[N] { +func newSum[N int64 | float64](monotonic bool, limit int, r func() exemplar.FilteredReservoir[N]) *sum[N] { return &sum[N]{ valueMap: newValueMap[N](limit, r), monotonic: monotonic, @@ -172,7 +170,7 @@ func (s *sum[N]) cumulative(dest *metricdata.Aggregation) int { // newPrecomputedSum returns an aggregator that summarizes a set of // observatrions as their arithmetic sum. Each sum is scoped by attributes and // the aggregation cycle the measurements were made in. -func newPrecomputedSum[N int64 | float64](monotonic bool, limit int, r func() exemplar.Reservoir) *precomputedSum[N] { +func newPrecomputedSum[N int64 | float64](monotonic bool, limit int, r func() exemplar.FilteredReservoir[N]) *precomputedSum[N] { return &precomputedSum[N]{ valueMap: newValueMap[N](limit, r), monotonic: monotonic, diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/drop.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/drop.go index bf21e45df..5a0f39ae1 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/drop.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/drop.go @@ -5,20 +5,19 @@ package exemplar // import "go.opentelemetry.io/otel/sdk/metric/internal/exempla import ( "context" - "time" "go.opentelemetry.io/otel/attribute" ) -// Drop returns a [Reservoir] that drops all measurements it is offered. -func Drop() Reservoir { return &dropRes{} } +// Drop returns a [FilteredReservoir] that drops all measurements it is offered. +func Drop[N int64 | float64]() FilteredReservoir[N] { return &dropRes[N]{} } -type dropRes struct{} +type dropRes[N int64 | float64] struct{} // Offer does nothing, all measurements offered will be dropped. -func (r *dropRes) Offer(context.Context, time.Time, Value, []attribute.KeyValue) {} +func (r *dropRes[N]) Offer(context.Context, N, []attribute.KeyValue) {} // Collect resets dest. No exemplars will ever be returned. -func (r *dropRes) Collect(dest *[]Exemplar) { +func (r *dropRes[N]) Collect(dest *[]Exemplar) { *dest = (*dest)[:0] } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filter.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filter.go index d96aacc28..152a069a0 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filter.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filter.go @@ -5,25 +5,25 @@ package exemplar // import "go.opentelemetry.io/otel/sdk/metric/internal/exempla import ( "context" - "time" - "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/trace" ) -// SampledFilter returns a [Reservoir] wrapping r that will only offer measurements -// to r if the passed context associated with the measurement contains a sampled -// [go.opentelemetry.io/otel/trace.SpanContext]. -func SampledFilter(r Reservoir) Reservoir { - return filtered{Reservoir: r} -} +// Filter determines if a measurement should be offered. +// +// The passed ctx needs to contain any baggage or span that were active +// when the measurement was made. This information may be used by the +// Reservoir in making a sampling decision. +type Filter func(context.Context) bool -type filtered struct { - Reservoir +// SampledFilter is a [Filter] that will only offer measurements +// if the passed context associated with the measurement contains a sampled +// [go.opentelemetry.io/otel/trace.SpanContext]. +func SampledFilter(ctx context.Context) bool { + return trace.SpanContextFromContext(ctx).IsSampled() } -func (f filtered) Offer(ctx context.Context, t time.Time, n Value, a []attribute.KeyValue) { - if trace.SpanContextFromContext(ctx).IsSampled() { - f.Reservoir.Offer(ctx, t, n, a) - } +// AlwaysOnFilter is a [Filter] that always offers measurements. +func AlwaysOnFilter(ctx context.Context) bool { + return true } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filtered_reservoir.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filtered_reservoir.go new file mode 100644 index 000000000..9fedfa4be --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/filtered_reservoir.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package exemplar // import "go.opentelemetry.io/otel/sdk/metric/internal/exemplar" + +import ( + "context" + "time" + + "go.opentelemetry.io/otel/attribute" +) + +// FilteredReservoir wraps a [Reservoir] with a filter. +type FilteredReservoir[N int64 | float64] interface { + // Offer accepts the parameters associated with a measurement. The + // parameters will be stored as an exemplar if the filter decides to + // sample the measurement. + // + // The passed ctx needs to contain any baggage or span that were active + // when the measurement was made. This information may be used by the + // Reservoir in making a sampling decision. + Offer(ctx context.Context, val N, attr []attribute.KeyValue) + // Collect returns all the held exemplars in the reservoir. + Collect(dest *[]Exemplar) +} + +// filteredReservoir handles the pre-sampled exemplar of measurements made. +type filteredReservoir[N int64 | float64] struct { + filter Filter + reservoir Reservoir +} + +// NewFilteredReservoir creates a [FilteredReservoir] which only offers values +// that are allowed by the filter. +func NewFilteredReservoir[N int64 | float64](f Filter, r Reservoir) FilteredReservoir[N] { + return &filteredReservoir[N]{ + filter: f, + reservoir: r, + } +} + +func (f *filteredReservoir[N]) Offer(ctx context.Context, val N, attr []attribute.KeyValue) { + if f.filter(ctx) { + // only record the current time if we are sampling this measurment. + f.reservoir.Offer(ctx, time.Now(), NewValue(val), attr) + } +} + +func (f *filteredReservoir[N]) Collect(dest *[]Exemplar) { f.reservoir.Collect(dest) } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/rand.go b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/rand.go index 6753e1166..199a2608f 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/rand.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/internal/exemplar/rand.go @@ -7,16 +7,21 @@ import ( "context" "math" "math/rand" + "sync" "time" "go.opentelemetry.io/otel/attribute" ) -// rng is used to make sampling decisions. -// -// Do not use crypto/rand. There is no reason for the decrease in performance -// given this is not a security sensitive decision. -var rng = rand.New(rand.NewSource(time.Now().UnixNano())) +var ( + // rng is used to make sampling decisions. + // + // Do not use crypto/rand. There is no reason for the decrease in performance + // given this is not a security sensitive decision. + rng = rand.New(rand.NewSource(time.Now().UnixNano())) + // Ensure concurrent safe accecess to rng and its underlying source. + rngMu sync.Mutex +) // random returns, as a float64, a uniform pseudo-random number in the open // interval (0.0,1.0). @@ -38,6 +43,9 @@ func random() float64 { // // There are likely many other methods to explore here as well. + rngMu.Lock() + defer rngMu.Unlock() + f := rng.Float64() for f == 0 { f = rng.Float64() diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go b/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go index 9cdd9384c..67ee1b11a 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/periodic_reader.go @@ -334,7 +334,7 @@ func (r *PeriodicReader) Shutdown(ctx context.Context) error { } sErr := r.exporter.Shutdown(ctx) - if err == nil || err == ErrReaderShutdown { + if err == nil || errors.Is(err, ErrReaderShutdown) { err = sErr } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go b/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go index b188eabae..20d2d82f0 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/pipeline.go @@ -356,7 +356,7 @@ func (i *inserter[N]) cachedAggregator(scope instrumentation.Scope, kind Instrum cv := i.aggregators.Lookup(normID, func() aggVal[N] { b := aggregate.Builder[N]{ Temporality: i.pipeline.reader.temporality(kind), - ReservoirFunc: reservoirFunc(stream.Aggregation), + ReservoirFunc: reservoirFunc[N](stream.Aggregation), } b.Filter = stream.AttributeFilter // A value less than or equal to zero will disable the aggregation diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/version.go b/vendor/go.opentelemetry.io/otel/sdk/metric/version.go index 43f85cfbc..dade0a19a 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/version.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/version.go @@ -5,5 +5,5 @@ package metric // import "go.opentelemetry.io/otel/sdk/metric" // version is the current release version of the metric SDK in use. func version() string { - return "1.27.0" + return "1.28.0" } diff --git a/vendor/go.opentelemetry.io/otel/sdk/metric/view.go b/vendor/go.opentelemetry.io/otel/sdk/metric/view.go index 11e334319..cd08c6732 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/metric/view.go +++ b/vendor/go.opentelemetry.io/otel/sdk/metric/view.go @@ -43,7 +43,7 @@ type View func(Instrument) (Stream, bool) // of the default. If you need to zero out an Stream field returned from a // View, create a View directly. func NewView(criteria Instrument, mask Stream) View { - if criteria.empty() { + if criteria.IsEmpty() { global.Error( errEmptyView, "dropping view", "mask", mask, diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go index 50d2df5eb..6ac1cdbf7 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go @@ -9,9 +9,11 @@ import ( "os" "path/filepath" + "github.com/google/uuid" + "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/sdk" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) type ( @@ -36,6 +38,8 @@ type ( } defaultServiceNameDetector struct{} + + defaultServiceInstanceIDDetector struct{} ) var ( @@ -43,6 +47,7 @@ var ( _ Detector = host{} _ Detector = stringDetector{} _ Detector = defaultServiceNameDetector{} + _ Detector = defaultServiceInstanceIDDetector{} ) // Detect returns a *Resource that describes the OpenTelemetry SDK used. @@ -95,3 +100,19 @@ func (defaultServiceNameDetector) Detect(ctx context.Context) (*Resource, error) }, ).Detect(ctx) } + +// Detect implements Detector. +func (defaultServiceInstanceIDDetector) Detect(ctx context.Context) (*Resource, error) { + return StringDetector( + semconv.SchemaURL, + semconv.ServiceInstanceIDKey, + func() (string, error) { + version4Uuid, err := uuid.NewRandom() + if err != nil { + return "", err + } + + return version4Uuid.String(), nil + }, + ).Detect(ctx) +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go index 7525ee75f..5ecd859a5 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go @@ -11,7 +11,7 @@ import ( "os" "regexp" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) type containerIDProvider func() (string, error) diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go index 0d5a355ab..813f05624 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) const ( diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go index 3c1aa6285..2d0f65498 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go @@ -8,7 +8,7 @@ import ( "errors" "strings" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) type hostIDProvider func() (string, error) diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go index ff78020fa..8a48ab4fa 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go @@ -8,7 +8,7 @@ import ( "strings" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) type osDescriptionProvider func() (string, error) diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go index e4e1df8c9..085fe68fd 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go @@ -11,7 +11,7 @@ import ( "path/filepath" "runtime" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" ) type ( diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go index 9f1af3a23..ad4b50df4 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go +++ b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go @@ -11,6 +11,7 @@ import ( "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/sdk/internal/x" ) // Resource describes an entity about which identifying information @@ -218,11 +219,17 @@ func Empty() *Resource { func Default() *Resource { defaultResourceOnce.Do(func() { var err error - defaultResource, err = Detect( - context.Background(), + defaultDetectors := []Detector{ defaultServiceNameDetector{}, fromEnv{}, telemetrySDK{}, + } + if x.Resource.Enabled() { + defaultDetectors = append([]Detector{defaultServiceInstanceIDDetector{}}, defaultDetectors...) + } + defaultResource, err = Detect( + context.Background(), + defaultDetectors..., ) if err != nil { otel.Handle(err) diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go index 8a89fffdb..1d399a75d 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go @@ -381,7 +381,7 @@ func (bsp *batchSpanProcessor) enqueueBlockOnQueueFull(ctx context.Context, sd R } } -func (bsp *batchSpanProcessor) enqueueDrop(ctx context.Context, sd ReadOnlySpan) bool { +func (bsp *batchSpanProcessor) enqueueDrop(_ context.Context, sd ReadOnlySpan) bool { if !sd.SpanContext().IsSampled() { return false } diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go index 69eb2fdfc..821c83faa 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go @@ -3,23 +3,43 @@ package trace // import "go.opentelemetry.io/otel/sdk/trace" +import ( + "slices" + "sync" + + "go.opentelemetry.io/otel/internal/global" +) + // evictedQueue is a FIFO queue with a configurable capacity. -type evictedQueue struct { - queue []interface{} +type evictedQueue[T any] struct { + queue []T capacity int droppedCount int + logDropped func() } -func newEvictedQueue(capacity int) evictedQueue { +func newEvictedQueueEvent(capacity int) evictedQueue[Event] { // Do not pre-allocate queue, do this lazily. - return evictedQueue{capacity: capacity} + return evictedQueue[Event]{ + capacity: capacity, + logDropped: sync.OnceFunc(func() { global.Warn("limit reached: dropping trace trace.Event") }), + } +} + +func newEvictedQueueLink(capacity int) evictedQueue[Link] { + // Do not pre-allocate queue, do this lazily. + return evictedQueue[Link]{ + capacity: capacity, + logDropped: sync.OnceFunc(func() { global.Warn("limit reached: dropping trace trace.Link") }), + } } // add adds value to the evictedQueue eq. If eq is at capacity, the oldest // queued value will be discarded and the drop count incremented. -func (eq *evictedQueue) add(value interface{}) { +func (eq *evictedQueue[T]) add(value T) { if eq.capacity == 0 { eq.droppedCount++ + eq.logDropped() return } @@ -28,6 +48,12 @@ func (eq *evictedQueue) add(value interface{}) { copy(eq.queue[:eq.capacity-1], eq.queue[1:]) eq.queue = eq.queue[:eq.capacity-1] eq.droppedCount++ + eq.logDropped() } eq.queue = append(eq.queue, value) } + +// copy returns a copy of the evictedQueue. +func (eq *evictedQueue[T]) copy() []T { + return slices.Clone(eq.queue) +} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go index f9633d8c5..925bcf993 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go @@ -41,7 +41,12 @@ func (gen *randomIDGenerator) NewSpanID(ctx context.Context, traceID trace.Trace gen.Lock() defer gen.Unlock() sid := trace.SpanID{} - _, _ = gen.randSource.Read(sid[:]) + for { + _, _ = gen.randSource.Read(sid[:]) + if sid.IsValid() { + break + } + } return sid } @@ -51,9 +56,19 @@ func (gen *randomIDGenerator) NewIDs(ctx context.Context) (trace.TraceID, trace. gen.Lock() defer gen.Unlock() tid := trace.TraceID{} - _, _ = gen.randSource.Read(tid[:]) sid := trace.SpanID{} - _, _ = gen.randSource.Read(sid[:]) + for { + _, _ = gen.randSource.Read(tid[:]) + if tid.IsValid() { + break + } + } + for { + _, _ = gen.randSource.Read(sid[:]) + if sid.IsValid() { + break + } + } return tid, sid } diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go index dec237ca7..14c2e5beb 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go @@ -291,7 +291,7 @@ func (p *TracerProvider) Shutdown(ctx context.Context) error { retErr = err } else { // Poor man's list of errors - retErr = fmt.Errorf("%v; %v", retErr, err) + retErr = fmt.Errorf("%w; %w", retErr, err) } } } diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go index f0221eaa8..ac90f1a26 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go @@ -17,10 +17,10 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" + "go.opentelemetry.io/otel/internal/global" "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/internal" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.25.0" + semconv "go.opentelemetry.io/otel/semconv/v1.26.0" "go.opentelemetry.io/otel/trace" "go.opentelemetry.io/otel/trace/embedded" ) @@ -137,12 +137,13 @@ type recordingSpan struct { // ReadOnlySpan exported when the span ends. attributes []attribute.KeyValue droppedAttributes int + logDropAttrsOnce sync.Once // events are stored in FIFO queue capped by configured limit. - events evictedQueue + events evictedQueue[Event] // links are stored in FIFO queue capped by configured limit. - links evictedQueue + links evictedQueue[Link] // executionTracerTaskEnd ends the execution tracer span. executionTracerTaskEnd func() @@ -219,7 +220,7 @@ func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) { limit := s.tracer.provider.spanLimits.AttributeCountLimit if limit == 0 { // No attributes allowed. - s.droppedAttributes += len(attributes) + s.addDroppedAttr(len(attributes)) return } @@ -236,7 +237,7 @@ func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) { for _, a := range attributes { if !a.Valid() { // Drop all invalid attributes. - s.droppedAttributes++ + s.addDroppedAttr(1) continue } a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a) @@ -244,6 +245,22 @@ func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) { } } +// Declared as a var so tests can override. +var logDropAttrs = func() { + global.Warn("limit reached: dropping trace Span attributes") +} + +// addDroppedAttr adds incr to the count of dropped attributes. +// +// The first, and only the first, time this method is called a warning will be +// logged. +// +// This method assumes s.mu.Lock is held by the caller. +func (s *recordingSpan) addDroppedAttr(incr int) { + s.droppedAttributes += incr + s.logDropAttrsOnce.Do(logDropAttrs) +} + // addOverCapAttrs adds the attributes attrs to the span s while // de-duplicating the attributes of s and attrs and dropping attributes that // exceed the limit. @@ -273,7 +290,7 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) { for _, a := range attrs { if !a.Valid() { // Drop all invalid attributes. - s.droppedAttributes++ + s.addDroppedAttr(1) continue } @@ -286,7 +303,7 @@ func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) { if len(s.attributes) >= limit { // Do not just drop all of the remaining attributes, make sure // updates are checked and performed. - s.droppedAttributes++ + s.addDroppedAttr(1) } else { a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a) s.attributes = append(s.attributes, a) @@ -367,7 +384,7 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) { // Store the end time as soon as possible to avoid artificially increasing // the span's duration in case some operation below takes a while. - et := internal.MonotonicEndTime(s.startTime) + et := monotonicEndTime(s.startTime) // Do relative expensive check now that we have an end time and see if we // need to do any more processing. @@ -418,6 +435,16 @@ func (s *recordingSpan) End(options ...trace.SpanEndOption) { } } +// monotonicEndTime returns the end time at present but offset from start, +// monotonically. +// +// The monotonic clock is used in subtractions hence the duration since start +// added back to start gives end as a monotonic time. See +// https://golang.org/pkg/time/#hdr-Monotonic_Clocks +func monotonicEndTime(start time.Time) time.Time { + return start.Add(time.Since(start)) +} + // RecordError will record err as a span event for this span. An additional call to // SetStatus is required if the Status of the Span should be set to Error, this method // does not change the Span status. If this span is not being recorded or err is nil @@ -585,7 +612,7 @@ func (s *recordingSpan) Links() []Link { if len(s.links.queue) == 0 { return []Link{} } - return s.interfaceArrayToLinksArray() + return s.links.copy() } // Events returns the events of this span. @@ -595,7 +622,7 @@ func (s *recordingSpan) Events() []Event { if len(s.events.queue) == 0 { return []Event{} } - return s.interfaceArrayToEventArray() + return s.events.copy() } // Status returns the status of this span. @@ -717,32 +744,16 @@ func (s *recordingSpan) snapshot() ReadOnlySpan { } sd.droppedAttributeCount = s.droppedAttributes if len(s.events.queue) > 0 { - sd.events = s.interfaceArrayToEventArray() + sd.events = s.events.copy() sd.droppedEventCount = s.events.droppedCount } if len(s.links.queue) > 0 { - sd.links = s.interfaceArrayToLinksArray() + sd.links = s.links.copy() sd.droppedLinkCount = s.links.droppedCount } return &sd } -func (s *recordingSpan) interfaceArrayToLinksArray() []Link { - linkArr := make([]Link, 0) - for _, value := range s.links.queue { - linkArr = append(linkArr, value.(Link)) - } - return linkArr -} - -func (s *recordingSpan) interfaceArrayToEventArray() []Event { - eventArr := make([]Event, 0) - for _, value := range s.events.queue { - eventArr = append(eventArr, value.(Event)) - } - return eventArr -} - func (s *recordingSpan) addChild() { if !s.IsRecording() { return diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go index 3668b1387..43419d3b5 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go +++ b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go @@ -132,8 +132,8 @@ func (tr *tracer) newRecordingSpan(psc, sc trace.SpanContext, name string, sr Sa spanKind: trace.ValidateSpanKind(config.SpanKind()), name: name, startTime: startTime, - events: newEvictedQueue(tr.provider.spanLimits.EventCountLimit), - links: newEvictedQueue(tr.provider.spanLimits.LinkCountLimit), + events: newEvictedQueueEvent(tr.provider.spanLimits.EventCountLimit), + links: newEvictedQueueLink(tr.provider.spanLimits.LinkCountLimit), tracer: tr, } diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go index f0d8fc51a..33d065a7c 100644 --- a/vendor/go.opentelemetry.io/otel/sdk/version.go +++ b/vendor/go.opentelemetry.io/otel/sdk/version.go @@ -5,5 +5,5 @@ package sdk // import "go.opentelemetry.io/otel/sdk" // Version is the current release version of the OpenTelemetry SDK in use. func Version() string { - return "1.27.0" + return "1.28.0" } diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md new file mode 100644 index 000000000..2de1fc3c6 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md @@ -0,0 +1,3 @@ +# Semconv v1.26.0 + +[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.26.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.26.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go new file mode 100644 index 000000000..d8dc822b2 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go @@ -0,0 +1,8996 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" + +import "go.opentelemetry.io/otel/attribute" + +// The Android platform on which the Android application is running. +const ( + // AndroidOSAPILevelKey is the attribute Key conforming to the + // "android.os.api_level" semantic conventions. It represents the uniquely + // identifies the framework API revision offered by a version + // (`os.version`) of the android operating system. More information can be + // found + // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '33', '32' + AndroidOSAPILevelKey = attribute.Key("android.os.api_level") +) + +// AndroidOSAPILevel returns an attribute KeyValue conforming to the +// "android.os.api_level" semantic conventions. It represents the uniquely +// identifies the framework API revision offered by a version (`os.version`) of +// the android operating system. More information can be found +// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). +func AndroidOSAPILevel(val string) attribute.KeyValue { + return AndroidOSAPILevelKey.String(val) +} + +// ASP.NET Core attributes +const ( + // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the + // "aspnetcore.rate_limiting.result" semantic conventions. It represents + // the rate-limiting result, shows whether the lease was acquired or + // contains a rejection reason + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + // Examples: 'acquired', 'request_canceled' + AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result") + + // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to + // the "aspnetcore.diagnostics.handler.type" semantic conventions. It + // represents the full type name of the + // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) + // implementation that handled the exception. + // + // Type: string + // RequirementLevel: ConditionallyRequired (if and only if the exception + // was handled by this handler.) + // Stability: stable + // Examples: 'Contoso.MyHandler' + AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type") + + // AspnetcoreDiagnosticsExceptionResultKey is the attribute Key conforming + // to the "aspnetcore.diagnostics.exception.result" semantic conventions. + // It represents the aSP.NET Core exception middleware handling result + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'handled', 'unhandled' + AspnetcoreDiagnosticsExceptionResultKey = attribute.Key("aspnetcore.diagnostics.exception.result") + + // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the + // "aspnetcore.rate_limiting.policy" semantic conventions. It represents + // the rate limiting policy name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'fixed', 'sliding', 'token' + AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy") + + // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the + // "aspnetcore.request.is_unhandled" semantic conventions. It represents + // the flag indicating if request was handled by the application pipeline. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Examples: True + AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled") + + // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the + // "aspnetcore.routing.is_fallback" semantic conventions. It represents a + // value that indicates whether the matched route is a fallback route. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Examples: True + AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback") + + // AspnetcoreRoutingMatchStatusKey is the attribute Key conforming to the + // "aspnetcore.routing.match_status" semantic conventions. It represents + // the match result - success or failure + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'success', 'failure' + AspnetcoreRoutingMatchStatusKey = attribute.Key("aspnetcore.routing.match_status") +) + +var ( + // Lease was acquired + AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired") + // Lease request was rejected by the endpoint limiter + AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter") + // Lease request was rejected by the global limiter + AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter") + // Lease request was canceled + AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled") +) + +var ( + // Exception was handled by the exception handling middleware + AspnetcoreDiagnosticsExceptionResultHandled = AspnetcoreDiagnosticsExceptionResultKey.String("handled") + // Exception was not handled by the exception handling middleware + AspnetcoreDiagnosticsExceptionResultUnhandled = AspnetcoreDiagnosticsExceptionResultKey.String("unhandled") + // Exception handling was skipped because the response had started + AspnetcoreDiagnosticsExceptionResultSkipped = AspnetcoreDiagnosticsExceptionResultKey.String("skipped") + // Exception handling didn't run because the request was aborted + AspnetcoreDiagnosticsExceptionResultAborted = AspnetcoreDiagnosticsExceptionResultKey.String("aborted") +) + +var ( + // Match succeeded + AspnetcoreRoutingMatchStatusSuccess = AspnetcoreRoutingMatchStatusKey.String("success") + // Match failed + AspnetcoreRoutingMatchStatusFailure = AspnetcoreRoutingMatchStatusKey.String("failure") +) + +// AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming +// to the "aspnetcore.diagnostics.handler.type" semantic conventions. It +// represents the full type name of the +// [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) +// implementation that handled the exception. +func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue { + return AspnetcoreDiagnosticsHandlerTypeKey.String(val) +} + +// AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to +// the "aspnetcore.rate_limiting.policy" semantic conventions. It represents +// the rate limiting policy name. +func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue { + return AspnetcoreRateLimitingPolicyKey.String(val) +} + +// AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to +// the "aspnetcore.request.is_unhandled" semantic conventions. It represents +// the flag indicating if request was handled by the application pipeline. +func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue { + return AspnetcoreRequestIsUnhandledKey.Bool(val) +} + +// AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to +// the "aspnetcore.routing.is_fallback" semantic conventions. It represents a +// value that indicates whether the matched route is a fallback route. +func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue { + return AspnetcoreRoutingIsFallbackKey.Bool(val) +} + +// Generic attributes for AWS services. +const ( + // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" + // semantic conventions. It represents the AWS request ID as returned in + // the response headers `x-amz-request-id` or `x-amz-requestid`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' + AWSRequestIDKey = attribute.Key("aws.request_id") +) + +// AWSRequestID returns an attribute KeyValue conforming to the +// "aws.request_id" semantic conventions. It represents the AWS request ID as +// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. +func AWSRequestID(val string) attribute.KeyValue { + return AWSRequestIDKey.String(val) +} + +// Attributes for AWS DynamoDB. +const ( + // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to + // the "aws.dynamodb.attribute_definitions" semantic conventions. It + // represents the JSON-serialized value of each item in the + // `AttributeDefinitions` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' + AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") + + // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the + // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the + // value of the `AttributesToGet` request parameter. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'lives', 'id' + AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") + + // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the + // "aws.dynamodb.consistent_read" semantic conventions. It represents the + // value of the `ConsistentRead` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") + + // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the + // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the + // JSON-serialized value of each item in the `ConsumedCapacity` response + // field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { + // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": + // { "CapacityUnits": number, "ReadCapacityUnits": number, + // "WriteCapacityUnits": number }, "TableName": "string", + // "WriteCapacityUnits": number }' + AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") + + // AWSDynamoDBCountKey is the attribute Key conforming to the + // "aws.dynamodb.count" semantic conventions. It represents the value of + // the `Count` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") + + // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the + // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents + // the value of the `ExclusiveStartTableName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Users', 'CatsTable' + AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") + + // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key + // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic + // conventions. It represents the JSON-serialized value of each item in the + // `GlobalSecondaryIndexUpdates` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, + // "ProvisionedThroughput": { "ReadCapacityUnits": number, + // "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") + + // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `GlobalSecondaryIndexes` request field + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": + // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ + // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { + // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' + AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") + + // AWSDynamoDBIndexNameKey is the attribute Key conforming to the + // "aws.dynamodb.index_name" semantic conventions. It represents the value + // of the `IndexName` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'name_to_group' + AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") + + // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to + // the "aws.dynamodb.item_collection_metrics" semantic conventions. It + // represents the JSON-serialized value of the `ItemCollectionMetrics` + // response field. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": + // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { + // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], + // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, + // "SizeEstimateRangeGB": [ number ] } ] }' + AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") + + // AWSDynamoDBLimitKey is the attribute Key conforming to the + // "aws.dynamodb.limit" semantic conventions. It represents the value of + // the `Limit` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") + + // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to + // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It + // represents the JSON-serialized value of each item of the + // `LocalSecondaryIndexes` request field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '{ "IndexARN": "string", "IndexName": "string", + // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { + // "AttributeName": "string", "KeyType": "string" } ], "Projection": { + // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' + AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") + + // AWSDynamoDBProjectionKey is the attribute Key conforming to the + // "aws.dynamodb.projection" semantic conventions. It represents the value + // of the `ProjectionExpression` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Title', 'Title, Price, Color', 'Title, Description, + // RelatedItems, ProductReviews' + AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") + + // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to + // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It + // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` + // request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") + + // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming + // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. + // It represents the value of the + // `ProvisionedThroughput.WriteCapacityUnits` request parameter. + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1.0, 2.0 + AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") + + // AWSDynamoDBScanForwardKey is the attribute Key conforming to the + // "aws.dynamodb.scan_forward" semantic conventions. It represents the + // value of the `ScanIndexForward` request parameter. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") + + // AWSDynamoDBScannedCountKey is the attribute Key conforming to the + // "aws.dynamodb.scanned_count" semantic conventions. It represents the + // value of the `ScannedCount` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 50 + AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") + + // AWSDynamoDBSegmentKey is the attribute Key conforming to the + // "aws.dynamodb.segment" semantic conventions. It represents the value of + // the `Segment` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") + + // AWSDynamoDBSelectKey is the attribute Key conforming to the + // "aws.dynamodb.select" semantic conventions. It represents the value of + // the `Select` request parameter. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ALL_ATTRIBUTES', 'COUNT' + AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") + + // AWSDynamoDBTableCountKey is the attribute Key conforming to the + // "aws.dynamodb.table_count" semantic conventions. It represents the + // number of items in the `TableNames` response parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 20 + AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") + + // AWSDynamoDBTableNamesKey is the attribute Key conforming to the + // "aws.dynamodb.table_names" semantic conventions. It represents the keys + // in the `RequestItems` object field. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Users', 'Cats' + AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") + + // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the + // "aws.dynamodb.total_segments" semantic conventions. It represents the + // value of the `TotalSegments` request parameter. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 100 + AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") +) + +// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming +// to the "aws.dynamodb.attribute_definitions" semantic conventions. It +// represents the JSON-serialized value of each item in the +// `AttributeDefinitions` request field. +func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) +} + +// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to +// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the +// value of the `AttributesToGet` request parameter. +func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { + return AWSDynamoDBAttributesToGetKey.StringSlice(val) +} + +// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the +// "aws.dynamodb.consistent_read" semantic conventions. It represents the value +// of the `ConsistentRead` request parameter. +func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { + return AWSDynamoDBConsistentReadKey.Bool(val) +} + +// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to +// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the +// JSON-serialized value of each item in the `ConsumedCapacity` response field. +func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { + return AWSDynamoDBConsumedCapacityKey.StringSlice(val) +} + +// AWSDynamoDBCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.count" semantic conventions. It represents the value of the +// `Count` response parameter. +func AWSDynamoDBCount(val int) attribute.KeyValue { + return AWSDynamoDBCountKey.Int(val) +} + +// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming +// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It +// represents the value of the `ExclusiveStartTableName` request parameter. +func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { + return AWSDynamoDBExclusiveStartTableKey.String(val) +} + +// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic +// conventions. It represents the JSON-serialized value of each item in the +// `GlobalSecondaryIndexUpdates` request field. +func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) +} + +// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue +// conforming to the "aws.dynamodb.global_secondary_indexes" semantic +// conventions. It represents the JSON-serialized value of each item of the +// `GlobalSecondaryIndexes` request field +func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) +} + +// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the +// "aws.dynamodb.index_name" semantic conventions. It represents the value of +// the `IndexName` request parameter. +func AWSDynamoDBIndexName(val string) attribute.KeyValue { + return AWSDynamoDBIndexNameKey.String(val) +} + +// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming +// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It +// represents the JSON-serialized value of the `ItemCollectionMetrics` response +// field. +func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { + return AWSDynamoDBItemCollectionMetricsKey.String(val) +} + +// AWSDynamoDBLimit returns an attribute KeyValue conforming to the +// "aws.dynamodb.limit" semantic conventions. It represents the value of the +// `Limit` request parameter. +func AWSDynamoDBLimit(val int) attribute.KeyValue { + return AWSDynamoDBLimitKey.Int(val) +} + +// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming +// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It +// represents the JSON-serialized value of each item of the +// `LocalSecondaryIndexes` request field. +func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { + return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) +} + +// AWSDynamoDBProjection returns an attribute KeyValue conforming to the +// "aws.dynamodb.projection" semantic conventions. It represents the value of +// the `ProjectionExpression` request parameter. +func AWSDynamoDBProjection(val string) attribute.KeyValue { + return AWSDynamoDBProjectionKey.String(val) +} + +// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.ReadCapacityUnits` request parameter. +func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) +} + +// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue +// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic +// conventions. It represents the value of the +// `ProvisionedThroughput.WriteCapacityUnits` request parameter. +func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { + return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) +} + +// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the +// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of +// the `ScanIndexForward` request parameter. +func AWSDynamoDBScanForward(val bool) attribute.KeyValue { + return AWSDynamoDBScanForwardKey.Bool(val) +} + +// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.scanned_count" semantic conventions. It represents the value +// of the `ScannedCount` response parameter. +func AWSDynamoDBScannedCount(val int) attribute.KeyValue { + return AWSDynamoDBScannedCountKey.Int(val) +} + +// AWSDynamoDBSegment returns an attribute KeyValue conforming to the +// "aws.dynamodb.segment" semantic conventions. It represents the value of the +// `Segment` request parameter. +func AWSDynamoDBSegment(val int) attribute.KeyValue { + return AWSDynamoDBSegmentKey.Int(val) +} + +// AWSDynamoDBSelect returns an attribute KeyValue conforming to the +// "aws.dynamodb.select" semantic conventions. It represents the value of the +// `Select` request parameter. +func AWSDynamoDBSelect(val string) attribute.KeyValue { + return AWSDynamoDBSelectKey.String(val) +} + +// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_count" semantic conventions. It represents the number of +// items in the `TableNames` response parameter. +func AWSDynamoDBTableCount(val int) attribute.KeyValue { + return AWSDynamoDBTableCountKey.Int(val) +} + +// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the +// "aws.dynamodb.table_names" semantic conventions. It represents the keys in +// the `RequestItems` object field. +func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { + return AWSDynamoDBTableNamesKey.StringSlice(val) +} + +// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the +// "aws.dynamodb.total_segments" semantic conventions. It represents the value +// of the `TotalSegments` request parameter. +func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { + return AWSDynamoDBTotalSegmentsKey.Int(val) +} + +// Attributes for AWS Elastic Container Service (ECS). +const ( + // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id" + // semantic conventions. It represents the ID of a running ECS task. The ID + // MUST be extracted from `task.arn`. + // + // Type: string + // RequirementLevel: ConditionallyRequired (If and only if `task.arn` is + // populated.) + // Stability: experimental + // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b', + // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' + AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id") + + // AWSECSClusterARNKey is the attribute Key conforming to the + // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an + // [ECS + // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") + + // AWSECSContainerARNKey is the attribute Key conforming to the + // "aws.ecs.container.arn" semantic conventions. It represents the Amazon + // Resource Name (ARN) of an [ECS container + // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' + AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") + + // AWSECSLaunchtypeKey is the attribute Key conforming to the + // "aws.ecs.launchtype" semantic conventions. It represents the [launch + // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) + // for an ECS task. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") + + // AWSECSTaskARNKey is the attribute Key conforming to the + // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a + // running [ECS + // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', + // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' + AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") + + // AWSECSTaskFamilyKey is the attribute Key conforming to the + // "aws.ecs.task.family" semantic conventions. It represents the family + // name of the [ECS task + // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) + // used to create the ECS task. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-family' + AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") + + // AWSECSTaskRevisionKey is the attribute Key conforming to the + // "aws.ecs.task.revision" semantic conventions. It represents the revision + // for the task definition used to create the ECS task. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '8', '26' + AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") +) + +var ( + // ec2 + AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") + // fargate + AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") +) + +// AWSECSTaskID returns an attribute KeyValue conforming to the +// "aws.ecs.task.id" semantic conventions. It represents the ID of a running +// ECS task. The ID MUST be extracted from `task.arn`. +func AWSECSTaskID(val string) attribute.KeyValue { + return AWSECSTaskIDKey.String(val) +} + +// AWSECSClusterARN returns an attribute KeyValue conforming to the +// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS +// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). +func AWSECSClusterARN(val string) attribute.KeyValue { + return AWSECSClusterARNKey.String(val) +} + +// AWSECSContainerARN returns an attribute KeyValue conforming to the +// "aws.ecs.container.arn" semantic conventions. It represents the Amazon +// Resource Name (ARN) of an [ECS container +// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). +func AWSECSContainerARN(val string) attribute.KeyValue { + return AWSECSContainerARNKey.String(val) +} + +// AWSECSTaskARN returns an attribute KeyValue conforming to the +// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running +// [ECS +// task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). +func AWSECSTaskARN(val string) attribute.KeyValue { + return AWSECSTaskARNKey.String(val) +} + +// AWSECSTaskFamily returns an attribute KeyValue conforming to the +// "aws.ecs.task.family" semantic conventions. It represents the family name of +// the [ECS task +// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) +// used to create the ECS task. +func AWSECSTaskFamily(val string) attribute.KeyValue { + return AWSECSTaskFamilyKey.String(val) +} + +// AWSECSTaskRevision returns an attribute KeyValue conforming to the +// "aws.ecs.task.revision" semantic conventions. It represents the revision for +// the task definition used to create the ECS task. +func AWSECSTaskRevision(val string) attribute.KeyValue { + return AWSECSTaskRevisionKey.String(val) +} + +// Attributes for AWS Elastic Kubernetes Service (EKS). +const ( + // AWSEKSClusterARNKey is the attribute Key conforming to the + // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an + // EKS cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' + AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") +) + +// AWSEKSClusterARN returns an attribute KeyValue conforming to the +// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS +// cluster. +func AWSEKSClusterARN(val string) attribute.KeyValue { + return AWSEKSClusterARNKey.String(val) +} + +// Attributes for AWS Logs. +const ( + // AWSLogGroupARNsKey is the attribute Key conforming to the + // "aws.log.group.arns" semantic conventions. It represents the Amazon + // Resource Name(s) (ARN) of the AWS log group(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' + // Note: See the [log group ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") + + // AWSLogGroupNamesKey is the attribute Key conforming to the + // "aws.log.group.names" semantic conventions. It represents the name(s) of + // the AWS log group(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/aws/lambda/my-function', 'opentelemetry-service' + // Note: Multiple log groups must be supported for cases like + // multi-container applications, where a single application has sidecar + // containers, and each write to their own log group. + AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") + + // AWSLogStreamARNsKey is the attribute Key conforming to the + // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of + // the AWS log stream(s). + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + // Note: See the [log stream ARN format + // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). + // One log group can contain several log streams, so these ARNs necessarily + // identify both a log group and a log stream. + AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") + + // AWSLogStreamNamesKey is the attribute Key conforming to the + // "aws.log.stream.names" semantic conventions. It represents the name(s) + // of the AWS log stream(s) an application is writing to. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' + AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") +) + +// AWSLogGroupARNs returns an attribute KeyValue conforming to the +// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource +// Name(s) (ARN) of the AWS log group(s). +func AWSLogGroupARNs(val ...string) attribute.KeyValue { + return AWSLogGroupARNsKey.StringSlice(val) +} + +// AWSLogGroupNames returns an attribute KeyValue conforming to the +// "aws.log.group.names" semantic conventions. It represents the name(s) of the +// AWS log group(s) an application is writing to. +func AWSLogGroupNames(val ...string) attribute.KeyValue { + return AWSLogGroupNamesKey.StringSlice(val) +} + +// AWSLogStreamARNs returns an attribute KeyValue conforming to the +// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the +// AWS log stream(s). +func AWSLogStreamARNs(val ...string) attribute.KeyValue { + return AWSLogStreamARNsKey.StringSlice(val) +} + +// AWSLogStreamNames returns an attribute KeyValue conforming to the +// "aws.log.stream.names" semantic conventions. It represents the name(s) of +// the AWS log stream(s) an application is writing to. +func AWSLogStreamNames(val ...string) attribute.KeyValue { + return AWSLogStreamNamesKey.StringSlice(val) +} + +// Attributes for AWS Lambda. +const ( + // AWSLambdaInvokedARNKey is the attribute Key conforming to the + // "aws.lambda.invoked_arn" semantic conventions. It represents the full + // invoked ARN as provided on the `Context` passed to the function + // (`Lambda-Runtime-Invoked-Function-ARN` header on the + // `/runtime/invocation/next` applicable). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' + // Note: This may be different from `cloud.resource_id` if an alias is + // involved. + AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") +) + +// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the +// "aws.lambda.invoked_arn" semantic conventions. It represents the full +// invoked ARN as provided on the `Context` passed to the function +// (`Lambda-Runtime-Invoked-Function-ARN` header on the +// `/runtime/invocation/next` applicable). +func AWSLambdaInvokedARN(val string) attribute.KeyValue { + return AWSLambdaInvokedARNKey.String(val) +} + +// Attributes for AWS S3. +const ( + // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" + // semantic conventions. It represents the S3 bucket name the request + // refers to. Corresponds to the `--bucket` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'some-bucket-name' + // Note: The `bucket` attribute is applicable to all S3 operations that + // reference a bucket, i.e. that require the bucket name as a mandatory + // parameter. + // This applies to almost all S3 operations except `list-buckets`. + AWSS3BucketKey = attribute.Key("aws.s3.bucket") + + // AWSS3CopySourceKey is the attribute Key conforming to the + // "aws.s3.copy_source" semantic conventions. It represents the source + // object (in the form `bucket`/`key`) for the copy operation. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The `copy_source` attribute applies to S3 copy operations and + // corresponds to the `--copy-source` parameter + // of the [copy-object operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") + + // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" + // semantic conventions. It represents the delete request container that + // specifies the objects to be deleted. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' + // Note: The `delete` attribute is only applicable to the + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // operation. + // The `delete` attribute corresponds to the `--delete` parameter of the + // [delete-objects operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). + AWSS3DeleteKey = attribute.Key("aws.s3.delete") + + // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic + // conventions. It represents the S3 object key the request refers to. + // Corresponds to the `--key` parameter of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // operations. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'someFile.yml' + // Note: The `key` attribute is applicable to all object-related S3 + // operations, i.e. that require the object key as a mandatory parameter. + // This applies in particular to the following operations: + // + // - + // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) + // - + // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) + // - + // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) + // - + // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) + // - + // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) + // - + // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) + // - + // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3KeyKey = attribute.Key("aws.s3.key") + + // AWSS3PartNumberKey is the attribute Key conforming to the + // "aws.s3.part_number" semantic conventions. It represents the part number + // of the part being uploaded in a multipart-upload operation. This is a + // positive integer between 1 and 10,000. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3456 + // Note: The `part_number` attribute is only applicable to the + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // and + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + // operations. + // The `part_number` attribute corresponds to the `--part-number` parameter + // of the + // [upload-part operation within the S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). + AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") + + // AWSS3UploadIDKey is the attribute Key conforming to the + // "aws.s3.upload_id" semantic conventions. It represents the upload ID + // that identifies the multipart upload. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' + // Note: The `upload_id` attribute applies to S3 multipart-upload + // operations and corresponds to the `--upload-id` parameter + // of the [S3 + // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) + // multipart operations. + // This applies in particular to the following operations: + // + // - + // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) + // - + // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) + // - + // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) + // - + // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) + // - + // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) + AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") +) + +// AWSS3Bucket returns an attribute KeyValue conforming to the +// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the +// request refers to. Corresponds to the `--bucket` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Bucket(val string) attribute.KeyValue { + return AWSS3BucketKey.String(val) +} + +// AWSS3CopySource returns an attribute KeyValue conforming to the +// "aws.s3.copy_source" semantic conventions. It represents the source object +// (in the form `bucket`/`key`) for the copy operation. +func AWSS3CopySource(val string) attribute.KeyValue { + return AWSS3CopySourceKey.String(val) +} + +// AWSS3Delete returns an attribute KeyValue conforming to the +// "aws.s3.delete" semantic conventions. It represents the delete request +// container that specifies the objects to be deleted. +func AWSS3Delete(val string) attribute.KeyValue { + return AWSS3DeleteKey.String(val) +} + +// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" +// semantic conventions. It represents the S3 object key the request refers to. +// Corresponds to the `--key` parameter of the [S3 +// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) +// operations. +func AWSS3Key(val string) attribute.KeyValue { + return AWSS3KeyKey.String(val) +} + +// AWSS3PartNumber returns an attribute KeyValue conforming to the +// "aws.s3.part_number" semantic conventions. It represents the part number of +// the part being uploaded in a multipart-upload operation. This is a positive +// integer between 1 and 10,000. +func AWSS3PartNumber(val int) attribute.KeyValue { + return AWSS3PartNumberKey.Int(val) +} + +// AWSS3UploadID returns an attribute KeyValue conforming to the +// "aws.s3.upload_id" semantic conventions. It represents the upload ID that +// identifies the multipart upload. +func AWSS3UploadID(val string) attribute.KeyValue { + return AWSS3UploadIDKey.String(val) +} + +// The web browser attributes +const ( + // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" + // semantic conventions. It represents the array of brand name and version + // separated by a space + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.brands`). + BrowserBrandsKey = attribute.Key("browser.brands") + + // BrowserLanguageKey is the attribute Key conforming to the + // "browser.language" semantic conventions. It represents the preferred + // language of the user using the browser + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'en', 'en-US', 'fr', 'fr-FR' + // Note: This value is intended to be taken from the Navigator API + // `navigator.language`. + BrowserLanguageKey = attribute.Key("browser.language") + + // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" + // semantic conventions. It represents a boolean that is true if the + // browser is running on a mobile device + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.mobile`). If unavailable, this attribute + // SHOULD be left unset. + BrowserMobileKey = attribute.Key("browser.mobile") + + // BrowserPlatformKey is the attribute Key conforming to the + // "browser.platform" semantic conventions. It represents the platform on + // which the browser is running + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Windows', 'macOS', 'Android' + // Note: This value is intended to be taken from the [UA client hints + // API](https://wicg.github.io/ua-client-hints/#interface) + // (`navigator.userAgentData.platform`). If unavailable, the legacy + // `navigator.platform` API SHOULD NOT be used instead and this attribute + // SHOULD be left unset in order for the values to be consistent. + // The list of possible values is defined in the [W3C User-Agent Client + // Hints + // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). + // Note that some (but not all) of these values can overlap with values in + // the [`os.type` and `os.name` attributes](./os.md). However, for + // consistency, the values in the `browser.platform` attribute should + // capture the exact value that the user agent provides. + BrowserPlatformKey = attribute.Key("browser.platform") +) + +// BrowserBrands returns an attribute KeyValue conforming to the +// "browser.brands" semantic conventions. It represents the array of brand name +// and version separated by a space +func BrowserBrands(val ...string) attribute.KeyValue { + return BrowserBrandsKey.StringSlice(val) +} + +// BrowserLanguage returns an attribute KeyValue conforming to the +// "browser.language" semantic conventions. It represents the preferred +// language of the user using the browser +func BrowserLanguage(val string) attribute.KeyValue { + return BrowserLanguageKey.String(val) +} + +// BrowserMobile returns an attribute KeyValue conforming to the +// "browser.mobile" semantic conventions. It represents a boolean that is true +// if the browser is running on a mobile device +func BrowserMobile(val bool) attribute.KeyValue { + return BrowserMobileKey.Bool(val) +} + +// BrowserPlatform returns an attribute KeyValue conforming to the +// "browser.platform" semantic conventions. It represents the platform on which +// the browser is running +func BrowserPlatform(val string) attribute.KeyValue { + return BrowserPlatformKey.String(val) +} + +// These attributes may be used to describe the client in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API doesn't expose a clear +// notion of client and server). This also covers UDP network interactions +// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. +const ( + // ClientAddressKey is the attribute Key conforming to the "client.address" + // semantic conventions. It represents the client address - domain name if + // available without reverse DNS lookup; otherwise, IP address or Unix + // domain socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the server side, and when communicating through + // an intermediary, `client.address` SHOULD represent the client address + // behind any intermediaries, for example proxies, if it's available. + ClientAddressKey = attribute.Key("client.address") + + // ClientPortKey is the attribute Key conforming to the "client.port" + // semantic conventions. It represents the client port number. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + // Note: When observed from the server side, and when communicating through + // an intermediary, `client.port` SHOULD represent the client port behind + // any intermediaries, for example proxies, if it's available. + ClientPortKey = attribute.Key("client.port") +) + +// ClientAddress returns an attribute KeyValue conforming to the +// "client.address" semantic conventions. It represents the client address - +// domain name if available without reverse DNS lookup; otherwise, IP address +// or Unix domain socket name. +func ClientAddress(val string) attribute.KeyValue { + return ClientAddressKey.String(val) +} + +// ClientPort returns an attribute KeyValue conforming to the "client.port" +// semantic conventions. It represents the client port number. +func ClientPort(val int) attribute.KeyValue { + return ClientPortKey.Int(val) +} + +// A cloud environment (e.g. GCP, Azure, AWS). +const ( + // CloudAccountIDKey is the attribute Key conforming to the + // "cloud.account.id" semantic conventions. It represents the cloud account + // ID the resource is assigned to. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '111111111111', 'opentelemetry' + CloudAccountIDKey = attribute.Key("cloud.account.id") + + // CloudAvailabilityZoneKey is the attribute Key conforming to the + // "cloud.availability_zone" semantic conventions. It represents the cloud + // regions often have multiple, isolated locations known as zones to + // increase availability. Availability zone represents the zone where the + // resource is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'us-east-1c' + // Note: Availability zones are called "zones" on Alibaba Cloud and Google + // Cloud. + CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") + + // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" + // semantic conventions. It represents the cloud platform in use. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The prefix of the service SHOULD match the one specified in + // `cloud.provider`. + CloudPlatformKey = attribute.Key("cloud.platform") + + // CloudProviderKey is the attribute Key conforming to the "cloud.provider" + // semantic conventions. It represents the name of the cloud provider. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + CloudProviderKey = attribute.Key("cloud.provider") + + // CloudRegionKey is the attribute Key conforming to the "cloud.region" + // semantic conventions. It represents the geographical region the resource + // is running. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'us-central1', 'us-east-1' + // Note: Refer to your provider's docs to see the available regions, for + // example [Alibaba Cloud + // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS + // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), + // [Azure + // regions](https://azure.microsoft.com/global-infrastructure/geographies/), + // [Google Cloud regions](https://cloud.google.com/about/locations), or + // [Tencent Cloud + // regions](https://www.tencentcloud.com/document/product/213/6091). + CloudRegionKey = attribute.Key("cloud.region") + + // CloudResourceIDKey is the attribute Key conforming to the + // "cloud.resource_id" semantic conventions. It represents the cloud + // provider-specific native identifier of the monitored cloud resource + // (e.g. an + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // on AWS, a [fully qualified resource + // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) + // on Azure, a [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // on GCP) + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', + // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', + // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' + // Note: On some cloud providers, it may not be possible to determine the + // full ID at startup, + // so it may be necessary to set `cloud.resource_id` as a span attribute + // instead. + // + // The exact value to use for `cloud.resource_id` depends on the cloud + // provider. + // The following well-known definitions MUST be used if you set this + // attribute and they apply: + // + // * **AWS Lambda:** The function + // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). + // Take care not to use the "invoked ARN" directly but replace any + // [alias + // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) + // with the resolved function version, as the same runtime instance may + // be invokable with + // multiple different aliases. + // * **GCP:** The [URI of the + // resource](https://cloud.google.com/iam/docs/full-resource-names) + // * **Azure:** The [Fully Qualified Resource + // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) + // of the invoked function, + // *not* the function app, having the form + // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider. + CloudResourceIDKey = attribute.Key("cloud.resource_id") +) + +var ( + // Alibaba Cloud Elastic Compute Service + CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") + // Alibaba Cloud Function Compute + CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") + // Red Hat OpenShift on Alibaba Cloud + CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") + // AWS Elastic Compute Cloud + CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") + // AWS Elastic Container Service + CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") + // AWS Elastic Kubernetes Service + CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") + // AWS Lambda + CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") + // AWS Elastic Beanstalk + CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") + // AWS App Runner + CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") + // Red Hat OpenShift on AWS (ROSA) + CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") + // Azure Virtual Machines + CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") + // Azure Container Apps + CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps") + // Azure Container Instances + CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") + // Azure Kubernetes Service + CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") + // Azure Functions + CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") + // Azure App Service + CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") + // Azure Red Hat OpenShift + CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") + // Google Bare Metal Solution (BMS) + CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") + // Google Cloud Compute Engine (GCE) + CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") + // Google Cloud Run + CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") + // Google Cloud Kubernetes Engine (GKE) + CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") + // Google Cloud Functions (GCF) + CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") + // Google Cloud App Engine (GAE) + CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") + // Red Hat OpenShift on Google Cloud + CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") + // Red Hat OpenShift on IBM Cloud + CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") + // Tencent Cloud Cloud Virtual Machine (CVM) + CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") + // Tencent Cloud Elastic Kubernetes Service (EKS) + CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") + // Tencent Cloud Serverless Cloud Function (SCF) + CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") +) + +var ( + // Alibaba Cloud + CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") + // Amazon Web Services + CloudProviderAWS = CloudProviderKey.String("aws") + // Microsoft Azure + CloudProviderAzure = CloudProviderKey.String("azure") + // Google Cloud Platform + CloudProviderGCP = CloudProviderKey.String("gcp") + // Heroku Platform as a Service + CloudProviderHeroku = CloudProviderKey.String("heroku") + // IBM Cloud + CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") + // Tencent Cloud + CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") +) + +// CloudAccountID returns an attribute KeyValue conforming to the +// "cloud.account.id" semantic conventions. It represents the cloud account ID +// the resource is assigned to. +func CloudAccountID(val string) attribute.KeyValue { + return CloudAccountIDKey.String(val) +} + +// CloudAvailabilityZone returns an attribute KeyValue conforming to the +// "cloud.availability_zone" semantic conventions. It represents the cloud +// regions often have multiple, isolated locations known as zones to increase +// availability. Availability zone represents the zone where the resource is +// running. +func CloudAvailabilityZone(val string) attribute.KeyValue { + return CloudAvailabilityZoneKey.String(val) +} + +// CloudRegion returns an attribute KeyValue conforming to the +// "cloud.region" semantic conventions. It represents the geographical region +// the resource is running. +func CloudRegion(val string) attribute.KeyValue { + return CloudRegionKey.String(val) +} + +// CloudResourceID returns an attribute KeyValue conforming to the +// "cloud.resource_id" semantic conventions. It represents the cloud +// provider-specific native identifier of the monitored cloud resource (e.g. an +// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) +// on AWS, a [fully qualified resource +// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on +// Azure, a [full resource +// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) +// on GCP) +func CloudResourceID(val string) attribute.KeyValue { + return CloudResourceIDKey.String(val) +} + +// Attributes for CloudEvents. +const ( + // CloudeventsEventIDKey is the attribute Key conforming to the + // "cloudevents.event_id" semantic conventions. It represents the + // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) + // uniquely identifies the event. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' + CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") + + // CloudeventsEventSourceKey is the attribute Key conforming to the + // "cloudevents.event_source" semantic conventions. It represents the + // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) + // identifies the context in which an event happened. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'https://github.com/cloudevents', + // '/cloudevents/spec/pull/123', 'my-service' + CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") + + // CloudeventsEventSpecVersionKey is the attribute Key conforming to the + // "cloudevents.event_spec_version" semantic conventions. It represents the + // [version of the CloudEvents + // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) + // which the event uses. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.0' + CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") + + // CloudeventsEventSubjectKey is the attribute Key conforming to the + // "cloudevents.event_subject" semantic conventions. It represents the + // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) + // of the event in the context of the event producer (identified by + // source). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'mynewfile.jpg' + CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") + + // CloudeventsEventTypeKey is the attribute Key conforming to the + // "cloudevents.event_type" semantic conventions. It represents the + // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) + // contains a value describing the type of event related to the originating + // occurrence. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'com.github.pull_request.opened', + // 'com.example.object.deleted.v2' + CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") +) + +// CloudeventsEventID returns an attribute KeyValue conforming to the +// "cloudevents.event_id" semantic conventions. It represents the +// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) +// uniquely identifies the event. +func CloudeventsEventID(val string) attribute.KeyValue { + return CloudeventsEventIDKey.String(val) +} + +// CloudeventsEventSource returns an attribute KeyValue conforming to the +// "cloudevents.event_source" semantic conventions. It represents the +// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) +// identifies the context in which an event happened. +func CloudeventsEventSource(val string) attribute.KeyValue { + return CloudeventsEventSourceKey.String(val) +} + +// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to +// the "cloudevents.event_spec_version" semantic conventions. It represents the +// [version of the CloudEvents +// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) +// which the event uses. +func CloudeventsEventSpecVersion(val string) attribute.KeyValue { + return CloudeventsEventSpecVersionKey.String(val) +} + +// CloudeventsEventSubject returns an attribute KeyValue conforming to the +// "cloudevents.event_subject" semantic conventions. It represents the +// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) +// of the event in the context of the event producer (identified by source). +func CloudeventsEventSubject(val string) attribute.KeyValue { + return CloudeventsEventSubjectKey.String(val) +} + +// CloudeventsEventType returns an attribute KeyValue conforming to the +// "cloudevents.event_type" semantic conventions. It represents the +// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) +// contains a value describing the type of event related to the originating +// occurrence. +func CloudeventsEventType(val string) attribute.KeyValue { + return CloudeventsEventTypeKey.String(val) +} + +// These attributes allow to report this unit of code and therefore to provide +// more context about the span. +const ( + // CodeColumnKey is the attribute Key conforming to the "code.column" + // semantic conventions. It represents the column number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 16 + CodeColumnKey = attribute.Key("code.column") + + // CodeFilepathKey is the attribute Key conforming to the "code.filepath" + // semantic conventions. It represents the source code file name that + // identifies the code unit as uniquely as possible (preferably an absolute + // file path). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/usr/local/MyApplication/content_root/app/index.php' + CodeFilepathKey = attribute.Key("code.filepath") + + // CodeFunctionKey is the attribute Key conforming to the "code.function" + // semantic conventions. It represents the method or function name, or + // equivalent (usually rightmost part of the code unit's name). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'serveRequest' + CodeFunctionKey = attribute.Key("code.function") + + // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" + // semantic conventions. It represents the line number in `code.filepath` + // best representing the operation. It SHOULD point within the code unit + // named in `code.function`. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 42 + CodeLineNumberKey = attribute.Key("code.lineno") + + // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" + // semantic conventions. It represents the "namespace" within which + // `code.function` is defined. Usually the qualified class or module name, + // such that `code.namespace` + some separator + `code.function` form a + // unique identifier for the code unit. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'com.example.MyHTTPService' + CodeNamespaceKey = attribute.Key("code.namespace") + + // CodeStacktraceKey is the attribute Key conforming to the + // "code.stacktrace" semantic conventions. It represents a stacktrace as a + // string in the natural representation for the language runtime. The + // representation is to be determined and documented by each language SIG. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'at + // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + CodeStacktraceKey = attribute.Key("code.stacktrace") +) + +// CodeColumn returns an attribute KeyValue conforming to the "code.column" +// semantic conventions. It represents the column number in `code.filepath` +// best representing the operation. It SHOULD point within the code unit named +// in `code.function`. +func CodeColumn(val int) attribute.KeyValue { + return CodeColumnKey.Int(val) +} + +// CodeFilepath returns an attribute KeyValue conforming to the +// "code.filepath" semantic conventions. It represents the source code file +// name that identifies the code unit as uniquely as possible (preferably an +// absolute file path). +func CodeFilepath(val string) attribute.KeyValue { + return CodeFilepathKey.String(val) +} + +// CodeFunction returns an attribute KeyValue conforming to the +// "code.function" semantic conventions. It represents the method or function +// name, or equivalent (usually rightmost part of the code unit's name). +func CodeFunction(val string) attribute.KeyValue { + return CodeFunctionKey.String(val) +} + +// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" +// semantic conventions. It represents the line number in `code.filepath` best +// representing the operation. It SHOULD point within the code unit named in +// `code.function`. +func CodeLineNumber(val int) attribute.KeyValue { + return CodeLineNumberKey.Int(val) +} + +// CodeNamespace returns an attribute KeyValue conforming to the +// "code.namespace" semantic conventions. It represents the "namespace" within +// which `code.function` is defined. Usually the qualified class or module +// name, such that `code.namespace` + some separator + `code.function` form a +// unique identifier for the code unit. +func CodeNamespace(val string) attribute.KeyValue { + return CodeNamespaceKey.String(val) +} + +// CodeStacktrace returns an attribute KeyValue conforming to the +// "code.stacktrace" semantic conventions. It represents a stacktrace as a +// string in the natural representation for the language runtime. The +// representation is to be determined and documented by each language SIG. +func CodeStacktrace(val string) attribute.KeyValue { + return CodeStacktraceKey.String(val) +} + +// A container instance. +const ( + // ContainerCommandKey is the attribute Key conforming to the + // "container.command" semantic conventions. It represents the command used + // to run the container (i.e. the command name). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcontribcol' + // Note: If using embedded credentials or sensitive data, it is recommended + // to remove them to prevent potential leakage. + ContainerCommandKey = attribute.Key("container.command") + + // ContainerCommandArgsKey is the attribute Key conforming to the + // "container.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) run by the + // container. [2] + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcontribcol, --config, config.yaml' + ContainerCommandArgsKey = attribute.Key("container.command_args") + + // ContainerCommandLineKey is the attribute Key conforming to the + // "container.command_line" semantic conventions. It represents the full + // command run by the container as a single string representing the full + // command. [2] + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcontribcol --config config.yaml' + ContainerCommandLineKey = attribute.Key("container.command_line") + + // ContainerCPUStateKey is the attribute Key conforming to the + // "container.cpu.state" semantic conventions. It represents the CPU state + // for this data point. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'user', 'kernel' + ContainerCPUStateKey = attribute.Key("container.cpu.state") + + // ContainerIDKey is the attribute Key conforming to the "container.id" + // semantic conventions. It represents the container ID. Usually a UUID, as + // for example used to [identify Docker + // containers](https://docs.docker.com/engine/reference/run/#container-identification). + // The UUID might be abbreviated. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'a3bf90e006b2' + ContainerIDKey = attribute.Key("container.id") + + // ContainerImageIDKey is the attribute Key conforming to the + // "container.image.id" semantic conventions. It represents the runtime + // specific image identifier. Usually a hash algorithm followed by a UUID. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' + // Note: Docker defines a sha256 of the image id; `container.image.id` + // corresponds to the `Image` field from the Docker container inspect + // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) + // endpoint. + // K8S defines a link to the container registry repository with digest + // `"imageID": "registry.azurecr.io + // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. + // The ID is assigned by the container runtime and can vary in different + // environments. Consider using `oci.manifest.digest` if it is important to + // identify the same image in different environments/runtimes. + ContainerImageIDKey = attribute.Key("container.image.id") + + // ContainerImageNameKey is the attribute Key conforming to the + // "container.image.name" semantic conventions. It represents the name of + // the image the container was built on. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'gcr.io/opentelemetry/operator' + ContainerImageNameKey = attribute.Key("container.image.name") + + // ContainerImageRepoDigestsKey is the attribute Key conforming to the + // "container.image.repo_digests" semantic conventions. It represents the + // repo digests of the container image as provided by the container + // runtime. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb', + // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' + // Note: + // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) + // and + // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) + // report those under the `RepoDigests` field. + ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests") + + // ContainerImageTagsKey is the attribute Key conforming to the + // "container.image.tags" semantic conventions. It represents the container + // image tags. An example can be found in [Docker Image + // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). + // Should be only the `` section of the full name for example from + // `registry.example.com/my-org/my-image:`. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'v1.27.1', '3.5.7-0' + ContainerImageTagsKey = attribute.Key("container.image.tags") + + // ContainerNameKey is the attribute Key conforming to the "container.name" + // semantic conventions. It represents the container name used by container + // runtime. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-autoconf' + ContainerNameKey = attribute.Key("container.name") + + // ContainerRuntimeKey is the attribute Key conforming to the + // "container.runtime" semantic conventions. It represents the container + // runtime managing this container. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'docker', 'containerd', 'rkt' + ContainerRuntimeKey = attribute.Key("container.runtime") +) + +var ( + // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows) + ContainerCPUStateUser = ContainerCPUStateKey.String("user") + // When CPU is used by the system (host OS) + ContainerCPUStateSystem = ContainerCPUStateKey.String("system") + // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows) + ContainerCPUStateKernel = ContainerCPUStateKey.String("kernel") +) + +// ContainerCommand returns an attribute KeyValue conforming to the +// "container.command" semantic conventions. It represents the command used to +// run the container (i.e. the command name). +func ContainerCommand(val string) attribute.KeyValue { + return ContainerCommandKey.String(val) +} + +// ContainerCommandArgs returns an attribute KeyValue conforming to the +// "container.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) run by the +// container. [2] +func ContainerCommandArgs(val ...string) attribute.KeyValue { + return ContainerCommandArgsKey.StringSlice(val) +} + +// ContainerCommandLine returns an attribute KeyValue conforming to the +// "container.command_line" semantic conventions. It represents the full +// command run by the container as a single string representing the full +// command. [2] +func ContainerCommandLine(val string) attribute.KeyValue { + return ContainerCommandLineKey.String(val) +} + +// ContainerID returns an attribute KeyValue conforming to the +// "container.id" semantic conventions. It represents the container ID. Usually +// a UUID, as for example used to [identify Docker +// containers](https://docs.docker.com/engine/reference/run/#container-identification). +// The UUID might be abbreviated. +func ContainerID(val string) attribute.KeyValue { + return ContainerIDKey.String(val) +} + +// ContainerImageID returns an attribute KeyValue conforming to the +// "container.image.id" semantic conventions. It represents the runtime +// specific image identifier. Usually a hash algorithm followed by a UUID. +func ContainerImageID(val string) attribute.KeyValue { + return ContainerImageIDKey.String(val) +} + +// ContainerImageName returns an attribute KeyValue conforming to the +// "container.image.name" semantic conventions. It represents the name of the +// image the container was built on. +func ContainerImageName(val string) attribute.KeyValue { + return ContainerImageNameKey.String(val) +} + +// ContainerImageRepoDigests returns an attribute KeyValue conforming to the +// "container.image.repo_digests" semantic conventions. It represents the repo +// digests of the container image as provided by the container runtime. +func ContainerImageRepoDigests(val ...string) attribute.KeyValue { + return ContainerImageRepoDigestsKey.StringSlice(val) +} + +// ContainerImageTags returns an attribute KeyValue conforming to the +// "container.image.tags" semantic conventions. It represents the container +// image tags. An example can be found in [Docker Image +// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). +// Should be only the `` section of the full name for example from +// `registry.example.com/my-org/my-image:`. +func ContainerImageTags(val ...string) attribute.KeyValue { + return ContainerImageTagsKey.StringSlice(val) +} + +// ContainerName returns an attribute KeyValue conforming to the +// "container.name" semantic conventions. It represents the container name used +// by container runtime. +func ContainerName(val string) attribute.KeyValue { + return ContainerNameKey.String(val) +} + +// ContainerRuntime returns an attribute KeyValue conforming to the +// "container.runtime" semantic conventions. It represents the container +// runtime managing this container. +func ContainerRuntime(val string) attribute.KeyValue { + return ContainerRuntimeKey.String(val) +} + +// This group defines the attributes used to describe telemetry in the context +// of databases. +const ( + // DBClientConnectionsPoolNameKey is the attribute Key conforming to the + // "db.client.connections.pool.name" semantic conventions. It represents + // the name of the connection pool; unique within the instrumented + // application. In case the connection pool implementation doesn't provide + // a name, instrumentation should use a combination of `server.address` and + // `server.port` attributes formatted as `server.address:server.port`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myDataSource' + DBClientConnectionsPoolNameKey = attribute.Key("db.client.connections.pool.name") + + // DBClientConnectionsStateKey is the attribute Key conforming to the + // "db.client.connections.state" semantic conventions. It represents the + // state of a connection in the pool + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'idle' + DBClientConnectionsStateKey = attribute.Key("db.client.connections.state") + + // DBCollectionNameKey is the attribute Key conforming to the + // "db.collection.name" semantic conventions. It represents the name of a + // collection (table, container) within the database. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'public.users', 'customers' + // Note: If the collection name is parsed from the query, it SHOULD match + // the value provided in the query and may be qualified with the schema and + // database name. + // It is RECOMMENDED to capture the value as provided by the application + // without attempting to do any case normalization. + DBCollectionNameKey = attribute.Key("db.collection.name") + + // DBNamespaceKey is the attribute Key conforming to the "db.namespace" + // semantic conventions. It represents the name of the database, fully + // qualified within the server address and port. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'customers', 'test.users' + // Note: If a database system has multiple namespace components, they + // SHOULD be concatenated (potentially using database system specific + // conventions) from most general to most specific namespace component, and + // more specific namespaces SHOULD NOT be captured without the more general + // namespaces, to ensure that "startswith" queries for the more general + // namespaces will be valid. + // Semantic conventions for individual database systems SHOULD document + // what `db.namespace` means in the context of that system. + // It is RECOMMENDED to capture the value as provided by the application + // without attempting to do any case normalization. + DBNamespaceKey = attribute.Key("db.namespace") + + // DBOperationNameKey is the attribute Key conforming to the + // "db.operation.name" semantic conventions. It represents the name of the + // operation or command being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'findAndModify', 'HMSET', 'SELECT' + // Note: It is RECOMMENDED to capture the value as provided by the + // application without attempting to do any case normalization. + DBOperationNameKey = attribute.Key("db.operation.name") + + // DBQueryTextKey is the attribute Key conforming to the "db.query.text" + // semantic conventions. It represents the database query being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey + // "WuValue"' + DBQueryTextKey = attribute.Key("db.query.text") + + // DBSystemKey is the attribute Key conforming to the "db.system" semantic + // conventions. It represents the database management system (DBMS) product + // as identified by the client instrumentation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The actual DBMS may differ from the one identified by the client. + // For example, when using PostgreSQL client libraries to connect to a + // CockroachDB, the `db.system` is set to `postgresql` based on the + // instrumentation's best knowledge. + DBSystemKey = attribute.Key("db.system") +) + +var ( + // idle + DBClientConnectionsStateIdle = DBClientConnectionsStateKey.String("idle") + // used + DBClientConnectionsStateUsed = DBClientConnectionsStateKey.String("used") +) + +var ( + // Some other SQL database. Fallback only. See notes + DBSystemOtherSQL = DBSystemKey.String("other_sql") + // Microsoft SQL Server + DBSystemMSSQL = DBSystemKey.String("mssql") + // Microsoft SQL Server Compact + DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") + // MySQL + DBSystemMySQL = DBSystemKey.String("mysql") + // Oracle Database + DBSystemOracle = DBSystemKey.String("oracle") + // IBM DB2 + DBSystemDB2 = DBSystemKey.String("db2") + // PostgreSQL + DBSystemPostgreSQL = DBSystemKey.String("postgresql") + // Amazon Redshift + DBSystemRedshift = DBSystemKey.String("redshift") + // Apache Hive + DBSystemHive = DBSystemKey.String("hive") + // Cloudscape + DBSystemCloudscape = DBSystemKey.String("cloudscape") + // HyperSQL DataBase + DBSystemHSQLDB = DBSystemKey.String("hsqldb") + // Progress Database + DBSystemProgress = DBSystemKey.String("progress") + // SAP MaxDB + DBSystemMaxDB = DBSystemKey.String("maxdb") + // SAP HANA + DBSystemHanaDB = DBSystemKey.String("hanadb") + // Ingres + DBSystemIngres = DBSystemKey.String("ingres") + // FirstSQL + DBSystemFirstSQL = DBSystemKey.String("firstsql") + // EnterpriseDB + DBSystemEDB = DBSystemKey.String("edb") + // InterSystems Caché + DBSystemCache = DBSystemKey.String("cache") + // Adabas (Adaptable Database System) + DBSystemAdabas = DBSystemKey.String("adabas") + // Firebird + DBSystemFirebird = DBSystemKey.String("firebird") + // Apache Derby + DBSystemDerby = DBSystemKey.String("derby") + // FileMaker + DBSystemFilemaker = DBSystemKey.String("filemaker") + // Informix + DBSystemInformix = DBSystemKey.String("informix") + // InstantDB + DBSystemInstantDB = DBSystemKey.String("instantdb") + // InterBase + DBSystemInterbase = DBSystemKey.String("interbase") + // MariaDB + DBSystemMariaDB = DBSystemKey.String("mariadb") + // Netezza + DBSystemNetezza = DBSystemKey.String("netezza") + // Pervasive PSQL + DBSystemPervasive = DBSystemKey.String("pervasive") + // PointBase + DBSystemPointbase = DBSystemKey.String("pointbase") + // SQLite + DBSystemSqlite = DBSystemKey.String("sqlite") + // Sybase + DBSystemSybase = DBSystemKey.String("sybase") + // Teradata + DBSystemTeradata = DBSystemKey.String("teradata") + // Vertica + DBSystemVertica = DBSystemKey.String("vertica") + // H2 + DBSystemH2 = DBSystemKey.String("h2") + // ColdFusion IMQ + DBSystemColdfusion = DBSystemKey.String("coldfusion") + // Apache Cassandra + DBSystemCassandra = DBSystemKey.String("cassandra") + // Apache HBase + DBSystemHBase = DBSystemKey.String("hbase") + // MongoDB + DBSystemMongoDB = DBSystemKey.String("mongodb") + // Redis + DBSystemRedis = DBSystemKey.String("redis") + // Couchbase + DBSystemCouchbase = DBSystemKey.String("couchbase") + // CouchDB + DBSystemCouchDB = DBSystemKey.String("couchdb") + // Microsoft Azure Cosmos DB + DBSystemCosmosDB = DBSystemKey.String("cosmosdb") + // Amazon DynamoDB + DBSystemDynamoDB = DBSystemKey.String("dynamodb") + // Neo4j + DBSystemNeo4j = DBSystemKey.String("neo4j") + // Apache Geode + DBSystemGeode = DBSystemKey.String("geode") + // Elasticsearch + DBSystemElasticsearch = DBSystemKey.String("elasticsearch") + // Memcached + DBSystemMemcached = DBSystemKey.String("memcached") + // CockroachDB + DBSystemCockroachdb = DBSystemKey.String("cockroachdb") + // OpenSearch + DBSystemOpensearch = DBSystemKey.String("opensearch") + // ClickHouse + DBSystemClickhouse = DBSystemKey.String("clickhouse") + // Cloud Spanner + DBSystemSpanner = DBSystemKey.String("spanner") + // Trino + DBSystemTrino = DBSystemKey.String("trino") +) + +// DBClientConnectionsPoolName returns an attribute KeyValue conforming to +// the "db.client.connections.pool.name" semantic conventions. It represents +// the name of the connection pool; unique within the instrumented application. +// In case the connection pool implementation doesn't provide a name, +// instrumentation should use a combination of `server.address` and +// `server.port` attributes formatted as `server.address:server.port`. +func DBClientConnectionsPoolName(val string) attribute.KeyValue { + return DBClientConnectionsPoolNameKey.String(val) +} + +// DBCollectionName returns an attribute KeyValue conforming to the +// "db.collection.name" semantic conventions. It represents the name of a +// collection (table, container) within the database. +func DBCollectionName(val string) attribute.KeyValue { + return DBCollectionNameKey.String(val) +} + +// DBNamespace returns an attribute KeyValue conforming to the +// "db.namespace" semantic conventions. It represents the name of the database, +// fully qualified within the server address and port. +func DBNamespace(val string) attribute.KeyValue { + return DBNamespaceKey.String(val) +} + +// DBOperationName returns an attribute KeyValue conforming to the +// "db.operation.name" semantic conventions. It represents the name of the +// operation or command being executed. +func DBOperationName(val string) attribute.KeyValue { + return DBOperationNameKey.String(val) +} + +// DBQueryText returns an attribute KeyValue conforming to the +// "db.query.text" semantic conventions. It represents the database query being +// executed. +func DBQueryText(val string) attribute.KeyValue { + return DBQueryTextKey.String(val) +} + +// This group defines attributes for Cassandra. +const ( + // DBCassandraConsistencyLevelKey is the attribute Key conforming to the + // "db.cassandra.consistency_level" semantic conventions. It represents the + // consistency level of the query. Based on consistency values from + // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") + + // DBCassandraCoordinatorDCKey is the attribute Key conforming to the + // "db.cassandra.coordinator.dc" semantic conventions. It represents the + // data center of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'us-west-2' + DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") + + // DBCassandraCoordinatorIDKey is the attribute Key conforming to the + // "db.cassandra.coordinator.id" semantic conventions. It represents the ID + // of the coordinating node for a query. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' + DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") + + // DBCassandraIdempotenceKey is the attribute Key conforming to the + // "db.cassandra.idempotence" semantic conventions. It represents the + // whether or not the query is idempotent. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") + + // DBCassandraPageSizeKey is the attribute Key conforming to the + // "db.cassandra.page_size" semantic conventions. It represents the fetch + // size used for paging, i.e. how many rows will be returned at once. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 5000 + DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") + + // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming + // to the "db.cassandra.speculative_execution_count" semantic conventions. + // It represents the number of times a query was speculatively executed. + // Not set or `0` if the query was not executed speculatively. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 2 + DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") +) + +var ( + // all + DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") + // each_quorum + DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") + // quorum + DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") + // local_quorum + DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") + // one + DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") + // two + DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") + // three + DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") + // local_one + DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") + // any + DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") + // serial + DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") + // local_serial + DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") +) + +// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.dc" semantic conventions. It represents the data +// center of the coordinating node for a query. +func DBCassandraCoordinatorDC(val string) attribute.KeyValue { + return DBCassandraCoordinatorDCKey.String(val) +} + +// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the +// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of +// the coordinating node for a query. +func DBCassandraCoordinatorID(val string) attribute.KeyValue { + return DBCassandraCoordinatorIDKey.String(val) +} + +// DBCassandraIdempotence returns an attribute KeyValue conforming to the +// "db.cassandra.idempotence" semantic conventions. It represents the whether +// or not the query is idempotent. +func DBCassandraIdempotence(val bool) attribute.KeyValue { + return DBCassandraIdempotenceKey.Bool(val) +} + +// DBCassandraPageSize returns an attribute KeyValue conforming to the +// "db.cassandra.page_size" semantic conventions. It represents the fetch size +// used for paging, i.e. how many rows will be returned at once. +func DBCassandraPageSize(val int) attribute.KeyValue { + return DBCassandraPageSizeKey.Int(val) +} + +// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue +// conforming to the "db.cassandra.speculative_execution_count" semantic +// conventions. It represents the number of times a query was speculatively +// executed. Not set or `0` if the query was not executed speculatively. +func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { + return DBCassandraSpeculativeExecutionCountKey.Int(val) +} + +// This group defines attributes for Azure Cosmos DB. +const ( + // DBCosmosDBClientIDKey is the attribute Key conforming to the + // "db.cosmosdb.client_id" semantic conventions. It represents the unique + // Cosmos client instance id. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' + DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") + + // DBCosmosDBConnectionModeKey is the attribute Key conforming to the + // "db.cosmosdb.connection_mode" semantic conventions. It represents the + // cosmos client connection mode. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") + + // DBCosmosDBOperationTypeKey is the attribute Key conforming to the + // "db.cosmosdb.operation_type" semantic conventions. It represents the + // cosmosDB Operation Type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") + + // DBCosmosDBRequestChargeKey is the attribute Key conforming to the + // "db.cosmosdb.request_charge" semantic conventions. It represents the rU + // consumed for that operation + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 46.18, 1.0 + DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") + + // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the + // "db.cosmosdb.request_content_length" semantic conventions. It represents + // the request payload size in bytes + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") + + // DBCosmosDBStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos + // DB status code. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 200, 201 + DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") + + // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the + // "db.cosmosdb.sub_status_code" semantic conventions. It represents the + // cosmos DB sub status code. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1000, 1002 + DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") +) + +var ( + // Gateway (HTTP) connections mode + DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") + // Direct connection + DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") +) + +var ( + // invalid + DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") + // create + DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") + // patch + DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") + // read + DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") + // read_feed + DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") + // delete + DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") + // replace + DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") + // execute + DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") + // query + DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") + // head + DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") + // head_feed + DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") + // upsert + DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") + // batch + DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") + // query_plan + DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") + // execute_javascript + DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") +) + +// DBCosmosDBClientID returns an attribute KeyValue conforming to the +// "db.cosmosdb.client_id" semantic conventions. It represents the unique +// Cosmos client instance id. +func DBCosmosDBClientID(val string) attribute.KeyValue { + return DBCosmosDBClientIDKey.String(val) +} + +// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the +// "db.cosmosdb.request_charge" semantic conventions. It represents the rU +// consumed for that operation +func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { + return DBCosmosDBRequestChargeKey.Float64(val) +} + +// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming +// to the "db.cosmosdb.request_content_length" semantic conventions. It +// represents the request payload size in bytes +func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { + return DBCosmosDBRequestContentLengthKey.Int(val) +} + +// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB +// status code. +func DBCosmosDBStatusCode(val int) attribute.KeyValue { + return DBCosmosDBStatusCodeKey.Int(val) +} + +// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the +// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos +// DB sub status code. +func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { + return DBCosmosDBSubStatusCodeKey.Int(val) +} + +// This group defines attributes for Elasticsearch. +const ( + // DBElasticsearchClusterNameKey is the attribute Key conforming to the + // "db.elasticsearch.cluster.name" semantic conventions. It represents the + // represents the identifier of an Elasticsearch cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' + DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name") + + // DBElasticsearchNodeNameKey is the attribute Key conforming to the + // "db.elasticsearch.node.name" semantic conventions. It represents the + // represents the human-readable identifier of the node/instance to which a + // request was routed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'instance-0000000001' + DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name") +) + +// DBElasticsearchClusterName returns an attribute KeyValue conforming to +// the "db.elasticsearch.cluster.name" semantic conventions. It represents the +// represents the identifier of an Elasticsearch cluster. +func DBElasticsearchClusterName(val string) attribute.KeyValue { + return DBElasticsearchClusterNameKey.String(val) +} + +// DBElasticsearchNodeName returns an attribute KeyValue conforming to the +// "db.elasticsearch.node.name" semantic conventions. It represents the +// represents the human-readable identifier of the node/instance to which a +// request was routed. +func DBElasticsearchNodeName(val string) attribute.KeyValue { + return DBElasticsearchNodeNameKey.String(val) +} + +// Attributes for software deployments. +const ( + // DeploymentEnvironmentKey is the attribute Key conforming to the + // "deployment.environment" semantic conventions. It represents the name of + // the [deployment + // environment](https://wikipedia.org/wiki/Deployment_environment) (aka + // deployment tier). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'staging', 'production' + // Note: `deployment.environment` does not affect the uniqueness + // constraints defined through + // the `service.namespace`, `service.name` and `service.instance.id` + // resource attributes. + // This implies that resources carrying the following attribute + // combinations MUST be + // considered to be identifying the same service: + // + // * `service.name=frontend`, `deployment.environment=production` + // * `service.name=frontend`, `deployment.environment=staging`. + DeploymentEnvironmentKey = attribute.Key("deployment.environment") +) + +// DeploymentEnvironment returns an attribute KeyValue conforming to the +// "deployment.environment" semantic conventions. It represents the name of the +// [deployment environment](https://wikipedia.org/wiki/Deployment_environment) +// (aka deployment tier). +func DeploymentEnvironment(val string) attribute.KeyValue { + return DeploymentEnvironmentKey.String(val) +} + +// Attributes that represents an occurrence of a lifecycle transition on the +// Android platform. +const ( + // AndroidStateKey is the attribute Key conforming to the "android.state" + // semantic conventions. It represents the deprecated use the + // `device.app.lifecycle` event definition including `android.state` as a + // payload field instead. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The Android lifecycle states are defined in [Activity lifecycle + // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), + // and from which the `OS identifiers` are derived. + AndroidStateKey = attribute.Key("android.state") +) + +var ( + // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time + AndroidStateCreated = AndroidStateKey.String("created") + // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state + AndroidStateBackground = AndroidStateKey.String("background") + // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states + AndroidStateForeground = AndroidStateKey.String("foreground") +) + +// These attributes may be used to describe the receiver of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API doesn't expose a clear notion of +// client and server. +const ( + // DestinationAddressKey is the attribute Key conforming to the + // "destination.address" semantic conventions. It represents the + // destination address - domain name if available without reverse DNS + // lookup; otherwise, IP address or Unix domain socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the source side, and when communicating through + // an intermediary, `destination.address` SHOULD represent the destination + // address behind any intermediaries, for example proxies, if it's + // available. + DestinationAddressKey = attribute.Key("destination.address") + + // DestinationPortKey is the attribute Key conforming to the + // "destination.port" semantic conventions. It represents the destination + // port number + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3389, 2888 + DestinationPortKey = attribute.Key("destination.port") +) + +// DestinationAddress returns an attribute KeyValue conforming to the +// "destination.address" semantic conventions. It represents the destination +// address - domain name if available without reverse DNS lookup; otherwise, IP +// address or Unix domain socket name. +func DestinationAddress(val string) attribute.KeyValue { + return DestinationAddressKey.String(val) +} + +// DestinationPort returns an attribute KeyValue conforming to the +// "destination.port" semantic conventions. It represents the destination port +// number +func DestinationPort(val int) attribute.KeyValue { + return DestinationPortKey.Int(val) +} + +// Describes device attributes. +const ( + // DeviceIDKey is the attribute Key conforming to the "device.id" semantic + // conventions. It represents a unique identifier representing the device + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' + // Note: The device identifier MUST only be defined using the values + // outlined below. This value is not an advertising identifier and MUST NOT + // be used as such. On iOS (Swift or Objective-C), this value MUST be equal + // to the [vendor + // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). + // On Android (Java or Kotlin), this value MUST be equal to the Firebase + // Installation ID or a globally unique UUID which is persisted across + // sessions in your application. More information can be found + // [here](https://developer.android.com/training/articles/user-data-ids) on + // best practices and exact implementation details. Caution should be taken + // when storing personal data or anything which can identify a user. GDPR + // and data protection laws may apply, ensure you do your own due + // diligence. + DeviceIDKey = attribute.Key("device.id") + + // DeviceManufacturerKey is the attribute Key conforming to the + // "device.manufacturer" semantic conventions. It represents the name of + // the device manufacturer + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Apple', 'Samsung' + // Note: The Android OS provides this field via + // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). + // iOS apps SHOULD hardcode the value `Apple`. + DeviceManufacturerKey = attribute.Key("device.manufacturer") + + // DeviceModelIdentifierKey is the attribute Key conforming to the + // "device.model.identifier" semantic conventions. It represents the model + // identifier for the device + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'iPhone3,4', 'SM-G920F' + // Note: It's recommended this value represents a machine-readable version + // of the model identifier rather than the market or consumer-friendly name + // of the device. + DeviceModelIdentifierKey = attribute.Key("device.model.identifier") + + // DeviceModelNameKey is the attribute Key conforming to the + // "device.model.name" semantic conventions. It represents the marketing + // name for the device model + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' + // Note: It's recommended this value represents a human-readable version of + // the device model rather than a machine-readable alternative. + DeviceModelNameKey = attribute.Key("device.model.name") +) + +// DeviceID returns an attribute KeyValue conforming to the "device.id" +// semantic conventions. It represents a unique identifier representing the +// device +func DeviceID(val string) attribute.KeyValue { + return DeviceIDKey.String(val) +} + +// DeviceManufacturer returns an attribute KeyValue conforming to the +// "device.manufacturer" semantic conventions. It represents the name of the +// device manufacturer +func DeviceManufacturer(val string) attribute.KeyValue { + return DeviceManufacturerKey.String(val) +} + +// DeviceModelIdentifier returns an attribute KeyValue conforming to the +// "device.model.identifier" semantic conventions. It represents the model +// identifier for the device +func DeviceModelIdentifier(val string) attribute.KeyValue { + return DeviceModelIdentifierKey.String(val) +} + +// DeviceModelName returns an attribute KeyValue conforming to the +// "device.model.name" semantic conventions. It represents the marketing name +// for the device model +func DeviceModelName(val string) attribute.KeyValue { + return DeviceModelNameKey.String(val) +} + +// These attributes may be used for any disk related operation. +const ( + // DiskIoDirectionKey is the attribute Key conforming to the + // "disk.io.direction" semantic conventions. It represents the disk IO + // operation direction. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'read' + DiskIoDirectionKey = attribute.Key("disk.io.direction") +) + +var ( + // read + DiskIoDirectionRead = DiskIoDirectionKey.String("read") + // write + DiskIoDirectionWrite = DiskIoDirectionKey.String("write") +) + +// The shared attributes used to report a DNS query. +const ( + // DNSQuestionNameKey is the attribute Key conforming to the + // "dns.question.name" semantic conventions. It represents the name being + // queried. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'www.example.com', 'opentelemetry.io' + // Note: If the name field contains non-printable characters (below 32 or + // above 126), those characters should be represented as escaped base 10 + // integers (\DDD). Back slashes and quotes should be escaped. Tabs, + // carriage returns, and line feeds should be converted to \t, \r, and \n + // respectively. + DNSQuestionNameKey = attribute.Key("dns.question.name") +) + +// DNSQuestionName returns an attribute KeyValue conforming to the +// "dns.question.name" semantic conventions. It represents the name being +// queried. +func DNSQuestionName(val string) attribute.KeyValue { + return DNSQuestionNameKey.String(val) +} + +// Attributes for operations with an authenticated and/or authorized enduser. +const ( + // EnduserIDKey is the attribute Key conforming to the "enduser.id" + // semantic conventions. It represents the username or client_id extracted + // from the access token or + // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header + // in the inbound request from outside the system. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'username' + EnduserIDKey = attribute.Key("enduser.id") + + // EnduserRoleKey is the attribute Key conforming to the "enduser.role" + // semantic conventions. It represents the actual/assumed role the client + // is making the request under extracted from token or application security + // context. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'admin' + EnduserRoleKey = attribute.Key("enduser.role") + + // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" + // semantic conventions. It represents the scopes or granted authorities + // the client currently possesses extracted from token or application + // security context. The value would come from the scope associated with an + // [OAuth 2.0 Access + // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute + // value in a [SAML 2.0 + // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'read:message, write:files' + EnduserScopeKey = attribute.Key("enduser.scope") +) + +// EnduserID returns an attribute KeyValue conforming to the "enduser.id" +// semantic conventions. It represents the username or client_id extracted from +// the access token or +// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in +// the inbound request from outside the system. +func EnduserID(val string) attribute.KeyValue { + return EnduserIDKey.String(val) +} + +// EnduserRole returns an attribute KeyValue conforming to the +// "enduser.role" semantic conventions. It represents the actual/assumed role +// the client is making the request under extracted from token or application +// security context. +func EnduserRole(val string) attribute.KeyValue { + return EnduserRoleKey.String(val) +} + +// EnduserScope returns an attribute KeyValue conforming to the +// "enduser.scope" semantic conventions. It represents the scopes or granted +// authorities the client currently possesses extracted from token or +// application security context. The value would come from the scope associated +// with an [OAuth 2.0 Access +// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute +// value in a [SAML 2.0 +// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). +func EnduserScope(val string) attribute.KeyValue { + return EnduserScopeKey.String(val) +} + +// The shared attributes used to report an error. +const ( + // ErrorTypeKey is the attribute Key conforming to the "error.type" + // semantic conventions. It represents the describes a class of error the + // operation ended with. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'timeout', 'java.net.UnknownHostException', + // 'server_certificate_invalid', '500' + // Note: The `error.type` SHOULD be predictable, and SHOULD have low + // cardinality. + // + // When `error.type` is set to a type (e.g., an exception type), its + // canonical class name identifying the type within the artifact SHOULD be + // used. + // + // Instrumentations SHOULD document the list of errors they report. + // + // The cardinality of `error.type` within one instrumentation library + // SHOULD be low. + // Telemetry consumers that aggregate data from multiple instrumentation + // libraries and applications + // should be prepared for `error.type` to have high cardinality at query + // time when no + // additional filters are applied. + // + // If the operation has completed successfully, instrumentations SHOULD NOT + // set `error.type`. + // + // If a specific domain defines its own set of error identifiers (such as + // HTTP or gRPC status codes), + // it's RECOMMENDED to: + // + // * Use a domain-specific attribute + // * Set `error.type` to capture all errors, regardless of whether they are + // defined within the domain-specific set or not. + ErrorTypeKey = attribute.Key("error.type") +) + +var ( + // A fallback error value to be used when the instrumentation doesn't define a custom value + ErrorTypeOther = ErrorTypeKey.String("_OTHER") +) + +// Attributes for Events represented using Log Records. +const ( + // EventNameKey is the attribute Key conforming to the "event.name" + // semantic conventions. It represents the identifies the class / type of + // event. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'browser.mouse.click', 'device.app.lifecycle' + // Note: Event names are subject to the same rules as [attribute + // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/attribute-naming.md). + // Notably, event names are namespaced to avoid collisions and provide a + // clean separation of semantics for events in separate domains like + // browser, mobile, and kubernetes. + EventNameKey = attribute.Key("event.name") +) + +// EventName returns an attribute KeyValue conforming to the "event.name" +// semantic conventions. It represents the identifies the class / type of +// event. +func EventName(val string) attribute.KeyValue { + return EventNameKey.String(val) +} + +// The shared attributes used to report a single exception associated with a +// span or log. +const ( + // ExceptionEscapedKey is the attribute Key conforming to the + // "exception.escaped" semantic conventions. It represents the sHOULD be + // set to true if the exception event is recorded at a point where it is + // known that the exception is escaping the scope of the span. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + // Note: An exception is considered to have escaped (or left) the scope of + // a span, + // if that span is ended while the exception is still logically "in + // flight". + // This may be actually "in flight" in some languages (e.g. if the + // exception + // is passed to a Context manager's `__exit__` method in Python) but will + // usually be caught at the point of recording the exception in most + // languages. + // + // It is usually not possible to determine at the point where an exception + // is thrown + // whether it will escape the scope of a span. + // However, it is trivial to know that an exception + // will escape, if one checks for an active exception just before ending + // the span, + // as done in the [example for recording span + // exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception). + // + // It follows that an exception may still escape the scope of the span + // even if the `exception.escaped` attribute was not set or set to false, + // since the event might have been recorded at a time where it was not + // clear whether the exception will escape. + ExceptionEscapedKey = attribute.Key("exception.escaped") + + // ExceptionMessageKey is the attribute Key conforming to the + // "exception.message" semantic conventions. It represents the exception + // message. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Division by zero', "Can't convert 'int' object to str + // implicitly" + ExceptionMessageKey = attribute.Key("exception.message") + + // ExceptionStacktraceKey is the attribute Key conforming to the + // "exception.stacktrace" semantic conventions. It represents a stacktrace + // as a string in the natural representation for the language runtime. The + // representation is to be determined and documented by each language SIG. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test + // exception\\n at ' + // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' + // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' + // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' + ExceptionStacktraceKey = attribute.Key("exception.stacktrace") + + // ExceptionTypeKey is the attribute Key conforming to the "exception.type" + // semantic conventions. It represents the type of the exception (its + // fully-qualified class name, if applicable). The dynamic type of the + // exception should be preferred over the static type in languages that + // support it. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'java.net.ConnectException', 'OSError' + ExceptionTypeKey = attribute.Key("exception.type") +) + +// ExceptionEscaped returns an attribute KeyValue conforming to the +// "exception.escaped" semantic conventions. It represents the sHOULD be set to +// true if the exception event is recorded at a point where it is known that +// the exception is escaping the scope of the span. +func ExceptionEscaped(val bool) attribute.KeyValue { + return ExceptionEscapedKey.Bool(val) +} + +// ExceptionMessage returns an attribute KeyValue conforming to the +// "exception.message" semantic conventions. It represents the exception +// message. +func ExceptionMessage(val string) attribute.KeyValue { + return ExceptionMessageKey.String(val) +} + +// ExceptionStacktrace returns an attribute KeyValue conforming to the +// "exception.stacktrace" semantic conventions. It represents a stacktrace as a +// string in the natural representation for the language runtime. The +// representation is to be determined and documented by each language SIG. +func ExceptionStacktrace(val string) attribute.KeyValue { + return ExceptionStacktraceKey.String(val) +} + +// ExceptionType returns an attribute KeyValue conforming to the +// "exception.type" semantic conventions. It represents the type of the +// exception (its fully-qualified class name, if applicable). The dynamic type +// of the exception should be preferred over the static type in languages that +// support it. +func ExceptionType(val string) attribute.KeyValue { + return ExceptionTypeKey.String(val) +} + +// FaaS attributes +const ( + // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" + // semantic conventions. It represents a boolean that is true if the + // serverless function is executed for the first time (aka cold-start). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + FaaSColdstartKey = attribute.Key("faas.coldstart") + + // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic + // conventions. It represents a string containing the schedule period as + // [Cron + // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0/5 * * * ? *' + FaaSCronKey = attribute.Key("faas.cron") + + // FaaSDocumentCollectionKey is the attribute Key conforming to the + // "faas.document.collection" semantic conventions. It represents the name + // of the source on which the triggering operation was performed. For + // example, in Cloud Storage or S3 corresponds to the bucket name, and in + // Cosmos DB to the database name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myBucketName', 'myDBName' + FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") + + // FaaSDocumentNameKey is the attribute Key conforming to the + // "faas.document.name" semantic conventions. It represents the document + // name/table subjected to the operation. For example, in Cloud Storage or + // S3 is the name of the file, and in Cosmos DB the table name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myFile.txt', 'myTableName' + FaaSDocumentNameKey = attribute.Key("faas.document.name") + + // FaaSDocumentOperationKey is the attribute Key conforming to the + // "faas.document.operation" semantic conventions. It represents the + // describes the type of the operation that was performed on the data. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + FaaSDocumentOperationKey = attribute.Key("faas.document.operation") + + // FaaSDocumentTimeKey is the attribute Key conforming to the + // "faas.document.time" semantic conventions. It represents a string + // containing the time when the data was accessed in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + FaaSDocumentTimeKey = attribute.Key("faas.document.time") + + // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" + // semantic conventions. It represents the execution environment ID as a + // string, that will be potentially reused for other invocations to the + // same function/function version. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' + // Note: * **AWS Lambda:** Use the (full) log stream name. + FaaSInstanceKey = attribute.Key("faas.instance") + + // FaaSInvocationIDKey is the attribute Key conforming to the + // "faas.invocation_id" semantic conventions. It represents the invocation + // ID of the current function invocation. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' + FaaSInvocationIDKey = attribute.Key("faas.invocation_id") + + // FaaSInvokedNameKey is the attribute Key conforming to the + // "faas.invoked_name" semantic conventions. It represents the name of the + // invoked function. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-function' + // Note: SHOULD be equal to the `faas.name` resource attribute of the + // invoked function. + FaaSInvokedNameKey = attribute.Key("faas.invoked_name") + + // FaaSInvokedProviderKey is the attribute Key conforming to the + // "faas.invoked_provider" semantic conventions. It represents the cloud + // provider of the invoked function. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: SHOULD be equal to the `cloud.provider` resource attribute of the + // invoked function. + FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") + + // FaaSInvokedRegionKey is the attribute Key conforming to the + // "faas.invoked_region" semantic conventions. It represents the cloud + // region of the invoked function. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'eu-central-1' + // Note: SHOULD be equal to the `cloud.region` resource attribute of the + // invoked function. + FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") + + // FaaSMaxMemoryKey is the attribute Key conforming to the + // "faas.max_memory" semantic conventions. It represents the amount of + // memory available to the serverless function converted to Bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 134217728 + // Note: It's recommended to set this attribute since e.g. too little + // memory can easily stop a Java AWS Lambda function from working + // correctly. On AWS Lambda, the environment variable + // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must + // be multiplied by 1,048,576). + FaaSMaxMemoryKey = attribute.Key("faas.max_memory") + + // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic + // conventions. It represents the name of the single function that this + // runtime instance executes. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-function', 'myazurefunctionapp/some-function-name' + // Note: This is the name of the function as configured/deployed on the + // FaaS + // platform and is usually different from the name of the callback + // function (which may be stored in the + // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) + // span attributes). + // + // For some cloud providers, the above definition is ambiguous. The + // following + // definition of function name MUST be used for this attribute + // (and consequently the span name) for the listed cloud + // providers/products: + // + // * **Azure:** The full name `/`, i.e., function app name + // followed by a forward slash followed by the function name (this form + // can also be seen in the resource JSON for the function). + // This means that a span attribute MUST be used, as an Azure function + // app can host multiple functions that would usually share + // a TracerProvider (see also the `cloud.resource_id` attribute). + FaaSNameKey = attribute.Key("faas.name") + + // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic + // conventions. It represents a string containing the function invocation + // time in the [ISO + // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format + // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2020-01-23T13:47:06Z' + FaaSTimeKey = attribute.Key("faas.time") + + // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" + // semantic conventions. It represents the type of the trigger which caused + // this function invocation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + FaaSTriggerKey = attribute.Key("faas.trigger") + + // FaaSVersionKey is the attribute Key conforming to the "faas.version" + // semantic conventions. It represents the immutable version of the + // function being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '26', 'pinkfroid-00002' + // Note: Depending on the cloud provider and platform, use: + // + // * **AWS Lambda:** The [function + // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) + // (an integer represented as a decimal string). + // * **Google Cloud Run (Services):** The + // [revision](https://cloud.google.com/run/docs/managing/revisions) + // (i.e., the function name plus the revision suffix). + // * **Google Cloud Functions:** The value of the + // [`K_REVISION` environment + // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). + // * **Azure Functions:** Not applicable. Do not set this attribute. + FaaSVersionKey = attribute.Key("faas.version") +) + +var ( + // When a new object is created + FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") + // When an object is modified + FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") + // When an object is deleted + FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") +) + +var ( + // Alibaba Cloud + FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") + // Amazon Web Services + FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") + // Microsoft Azure + FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") + // Google Cloud Platform + FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") + // Tencent Cloud + FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") +) + +var ( + // A response to some data source operation such as a database or filesystem read/write + FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") + // To provide an answer to an inbound HTTP request + FaaSTriggerHTTP = FaaSTriggerKey.String("http") + // A function is set to be executed when messages are sent to a messaging system + FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") + // A function is scheduled to be executed regularly + FaaSTriggerTimer = FaaSTriggerKey.String("timer") + // If none of the others apply + FaaSTriggerOther = FaaSTriggerKey.String("other") +) + +// FaaSColdstart returns an attribute KeyValue conforming to the +// "faas.coldstart" semantic conventions. It represents a boolean that is true +// if the serverless function is executed for the first time (aka cold-start). +func FaaSColdstart(val bool) attribute.KeyValue { + return FaaSColdstartKey.Bool(val) +} + +// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" +// semantic conventions. It represents a string containing the schedule period +// as [Cron +// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). +func FaaSCron(val string) attribute.KeyValue { + return FaaSCronKey.String(val) +} + +// FaaSDocumentCollection returns an attribute KeyValue conforming to the +// "faas.document.collection" semantic conventions. It represents the name of +// the source on which the triggering operation was performed. For example, in +// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the +// database name. +func FaaSDocumentCollection(val string) attribute.KeyValue { + return FaaSDocumentCollectionKey.String(val) +} + +// FaaSDocumentName returns an attribute KeyValue conforming to the +// "faas.document.name" semantic conventions. It represents the document +// name/table subjected to the operation. For example, in Cloud Storage or S3 +// is the name of the file, and in Cosmos DB the table name. +func FaaSDocumentName(val string) attribute.KeyValue { + return FaaSDocumentNameKey.String(val) +} + +// FaaSDocumentTime returns an attribute KeyValue conforming to the +// "faas.document.time" semantic conventions. It represents a string containing +// the time when the data was accessed in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSDocumentTime(val string) attribute.KeyValue { + return FaaSDocumentTimeKey.String(val) +} + +// FaaSInstance returns an attribute KeyValue conforming to the +// "faas.instance" semantic conventions. It represents the execution +// environment ID as a string, that will be potentially reused for other +// invocations to the same function/function version. +func FaaSInstance(val string) attribute.KeyValue { + return FaaSInstanceKey.String(val) +} + +// FaaSInvocationID returns an attribute KeyValue conforming to the +// "faas.invocation_id" semantic conventions. It represents the invocation ID +// of the current function invocation. +func FaaSInvocationID(val string) attribute.KeyValue { + return FaaSInvocationIDKey.String(val) +} + +// FaaSInvokedName returns an attribute KeyValue conforming to the +// "faas.invoked_name" semantic conventions. It represents the name of the +// invoked function. +func FaaSInvokedName(val string) attribute.KeyValue { + return FaaSInvokedNameKey.String(val) +} + +// FaaSInvokedRegion returns an attribute KeyValue conforming to the +// "faas.invoked_region" semantic conventions. It represents the cloud region +// of the invoked function. +func FaaSInvokedRegion(val string) attribute.KeyValue { + return FaaSInvokedRegionKey.String(val) +} + +// FaaSMaxMemory returns an attribute KeyValue conforming to the +// "faas.max_memory" semantic conventions. It represents the amount of memory +// available to the serverless function converted to Bytes. +func FaaSMaxMemory(val int) attribute.KeyValue { + return FaaSMaxMemoryKey.Int(val) +} + +// FaaSName returns an attribute KeyValue conforming to the "faas.name" +// semantic conventions. It represents the name of the single function that +// this runtime instance executes. +func FaaSName(val string) attribute.KeyValue { + return FaaSNameKey.String(val) +} + +// FaaSTime returns an attribute KeyValue conforming to the "faas.time" +// semantic conventions. It represents a string containing the function +// invocation time in the [ISO +// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format +// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). +func FaaSTime(val string) attribute.KeyValue { + return FaaSTimeKey.String(val) +} + +// FaaSVersion returns an attribute KeyValue conforming to the +// "faas.version" semantic conventions. It represents the immutable version of +// the function being executed. +func FaaSVersion(val string) attribute.KeyValue { + return FaaSVersionKey.String(val) +} + +// Attributes for Feature Flags. +const ( + // FeatureFlagKeyKey is the attribute Key conforming to the + // "feature_flag.key" semantic conventions. It represents the unique + // identifier of the feature flag. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'logo-color' + FeatureFlagKeyKey = attribute.Key("feature_flag.key") + + // FeatureFlagProviderNameKey is the attribute Key conforming to the + // "feature_flag.provider_name" semantic conventions. It represents the + // name of the service provider that performs the flag evaluation. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Flag Manager' + FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") + + // FeatureFlagVariantKey is the attribute Key conforming to the + // "feature_flag.variant" semantic conventions. It represents the sHOULD be + // a semantic identifier for a value. If one is unavailable, a stringified + // version of the value can be used. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'red', 'true', 'on' + // Note: A semantic identifier, commonly referred to as a variant, provides + // a means + // for referring to a value without including the value itself. This can + // provide additional context for understanding the meaning behind a value. + // For example, the variant `red` maybe be used for the value `#c05543`. + // + // A stringified version of the value can be used in situations where a + // semantic identifier is unavailable. String representation of the value + // should be determined by the implementer. + FeatureFlagVariantKey = attribute.Key("feature_flag.variant") +) + +// FeatureFlagKey returns an attribute KeyValue conforming to the +// "feature_flag.key" semantic conventions. It represents the unique identifier +// of the feature flag. +func FeatureFlagKey(val string) attribute.KeyValue { + return FeatureFlagKeyKey.String(val) +} + +// FeatureFlagProviderName returns an attribute KeyValue conforming to the +// "feature_flag.provider_name" semantic conventions. It represents the name of +// the service provider that performs the flag evaluation. +func FeatureFlagProviderName(val string) attribute.KeyValue { + return FeatureFlagProviderNameKey.String(val) +} + +// FeatureFlagVariant returns an attribute KeyValue conforming to the +// "feature_flag.variant" semantic conventions. It represents the sHOULD be a +// semantic identifier for a value. If one is unavailable, a stringified +// version of the value can be used. +func FeatureFlagVariant(val string) attribute.KeyValue { + return FeatureFlagVariantKey.String(val) +} + +// Describes file attributes. +const ( + // FileDirectoryKey is the attribute Key conforming to the "file.directory" + // semantic conventions. It represents the directory where the file is + // located. It should include the drive letter, when appropriate. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/home/user', 'C:\\Program Files\\MyApp' + FileDirectoryKey = attribute.Key("file.directory") + + // FileExtensionKey is the attribute Key conforming to the "file.extension" + // semantic conventions. It represents the file extension, excluding the + // leading dot. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'png', 'gz' + // Note: When the file name has multiple extensions (example.tar.gz), only + // the last one should be captured ("gz", not "tar.gz"). + FileExtensionKey = attribute.Key("file.extension") + + // FileNameKey is the attribute Key conforming to the "file.name" semantic + // conventions. It represents the name of the file including the extension, + // without the directory. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'example.png' + FileNameKey = attribute.Key("file.name") + + // FilePathKey is the attribute Key conforming to the "file.path" semantic + // conventions. It represents the full path to the file, including the file + // name. It should include the drive letter, when appropriate. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/home/alice/example.png', 'C:\\Program + // Files\\MyApp\\myapp.exe' + FilePathKey = attribute.Key("file.path") + + // FileSizeKey is the attribute Key conforming to the "file.size" semantic + // conventions. It represents the file size in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + FileSizeKey = attribute.Key("file.size") +) + +// FileDirectory returns an attribute KeyValue conforming to the +// "file.directory" semantic conventions. It represents the directory where the +// file is located. It should include the drive letter, when appropriate. +func FileDirectory(val string) attribute.KeyValue { + return FileDirectoryKey.String(val) +} + +// FileExtension returns an attribute KeyValue conforming to the +// "file.extension" semantic conventions. It represents the file extension, +// excluding the leading dot. +func FileExtension(val string) attribute.KeyValue { + return FileExtensionKey.String(val) +} + +// FileName returns an attribute KeyValue conforming to the "file.name" +// semantic conventions. It represents the name of the file including the +// extension, without the directory. +func FileName(val string) attribute.KeyValue { + return FileNameKey.String(val) +} + +// FilePath returns an attribute KeyValue conforming to the "file.path" +// semantic conventions. It represents the full path to the file, including the +// file name. It should include the drive letter, when appropriate. +func FilePath(val string) attribute.KeyValue { + return FilePathKey.String(val) +} + +// FileSize returns an attribute KeyValue conforming to the "file.size" +// semantic conventions. It represents the file size in bytes. +func FileSize(val int) attribute.KeyValue { + return FileSizeKey.Int(val) +} + +// Attributes for Google Cloud Run. +const ( + // GCPCloudRunJobExecutionKey is the attribute Key conforming to the + // "gcp.cloud_run.job.execution" semantic conventions. It represents the + // name of the Cloud Run + // [execution](https://cloud.google.com/run/docs/managing/job-executions) + // being run for the Job, as set by the + // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) + // environment variable. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'job-name-xxxx', 'sample-job-mdw84' + GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") + + // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the + // "gcp.cloud_run.job.task_index" semantic conventions. It represents the + // index for a task within an execution as provided by the + // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) + // environment variable. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 1 + GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") +) + +// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.execution" semantic conventions. It represents the name +// of the Cloud Run +// [execution](https://cloud.google.com/run/docs/managing/job-executions) being +// run for the Job, as set by the +// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) +// environment variable. +func GCPCloudRunJobExecution(val string) attribute.KeyValue { + return GCPCloudRunJobExecutionKey.String(val) +} + +// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the +// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index +// for a task within an execution as provided by the +// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) +// environment variable. +func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { + return GCPCloudRunJobTaskIndexKey.Int(val) +} + +// Attributes for Google Compute Engine (GCE). +const ( + // GCPGceInstanceHostnameKey is the attribute Key conforming to the + // "gcp.gce.instance.hostname" semantic conventions. It represents the + // hostname of a GCE instance. This is the full value of the default or + // [custom + // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-host1234.example.com', + // 'sample-vm.us-west1-b.c.my-project.internal' + GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") + + // GCPGceInstanceNameKey is the attribute Key conforming to the + // "gcp.gce.instance.name" semantic conventions. It represents the instance + // name of a GCE instance. This is the value provided by `host.name`, the + // visible name of the instance in the Cloud Console UI, and the prefix for + // the default hostname of the instance as defined by the [default internal + // DNS + // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'instance-1', 'my-vm-name' + GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") +) + +// GCPGceInstanceHostname returns an attribute KeyValue conforming to the +// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname +// of a GCE instance. This is the full value of the default or [custom +// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). +func GCPGceInstanceHostname(val string) attribute.KeyValue { + return GCPGceInstanceHostnameKey.String(val) +} + +// GCPGceInstanceName returns an attribute KeyValue conforming to the +// "gcp.gce.instance.name" semantic conventions. It represents the instance +// name of a GCE instance. This is the value provided by `host.name`, the +// visible name of the instance in the Cloud Console UI, and the prefix for the +// default hostname of the instance as defined by the [default internal DNS +// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). +func GCPGceInstanceName(val string) attribute.KeyValue { + return GCPGceInstanceNameKey.String(val) +} + +// The attributes used to describe telemetry in the context of LLM (Large +// Language Models) requests and responses. +const ( + // GenAiCompletionKey is the attribute Key conforming to the + // "gen_ai.completion" semantic conventions. It represents the full + // response received from the LLM. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: "[{'role': 'assistant', 'content': 'The capital of France is + // Paris.'}]" + // Note: It's RECOMMENDED to format completions as JSON string matching + // [OpenAI messages + // format](https://platform.openai.com/docs/guides/text-generation) + GenAiCompletionKey = attribute.Key("gen_ai.completion") + + // GenAiPromptKey is the attribute Key conforming to the "gen_ai.prompt" + // semantic conventions. It represents the full prompt sent to an LLM. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: "[{'role': 'user', 'content': 'What is the capital of + // France?'}]" + // Note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI + // messages + // format](https://platform.openai.com/docs/guides/text-generation) + GenAiPromptKey = attribute.Key("gen_ai.prompt") + + // GenAiRequestMaxTokensKey is the attribute Key conforming to the + // "gen_ai.request.max_tokens" semantic conventions. It represents the + // maximum number of tokens the LLM generates for a request. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 100 + GenAiRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens") + + // GenAiRequestModelKey is the attribute Key conforming to the + // "gen_ai.request.model" semantic conventions. It represents the name of + // the LLM a request is being made to. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'gpt-4' + GenAiRequestModelKey = attribute.Key("gen_ai.request.model") + + // GenAiRequestTemperatureKey is the attribute Key conforming to the + // "gen_ai.request.temperature" semantic conventions. It represents the + // temperature setting for the LLM request. + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0.0 + GenAiRequestTemperatureKey = attribute.Key("gen_ai.request.temperature") + + // GenAiRequestTopPKey is the attribute Key conforming to the + // "gen_ai.request.top_p" semantic conventions. It represents the top_p + // sampling setting for the LLM request. + // + // Type: double + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1.0 + GenAiRequestTopPKey = attribute.Key("gen_ai.request.top_p") + + // GenAiResponseFinishReasonsKey is the attribute Key conforming to the + // "gen_ai.response.finish_reasons" semantic conventions. It represents the + // array of reasons the model stopped generating tokens, corresponding to + // each generation received. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'stop' + GenAiResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons") + + // GenAiResponseIDKey is the attribute Key conforming to the + // "gen_ai.response.id" semantic conventions. It represents the unique + // identifier for the completion. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'chatcmpl-123' + GenAiResponseIDKey = attribute.Key("gen_ai.response.id") + + // GenAiResponseModelKey is the attribute Key conforming to the + // "gen_ai.response.model" semantic conventions. It represents the name of + // the LLM a response was generated from. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'gpt-4-0613' + GenAiResponseModelKey = attribute.Key("gen_ai.response.model") + + // GenAiSystemKey is the attribute Key conforming to the "gen_ai.system" + // semantic conventions. It represents the Generative AI product as + // identified by the client instrumentation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'openai' + // Note: The actual GenAI product may differ from the one identified by the + // client. For example, when using OpenAI client libraries to communicate + // with Mistral, the `gen_ai.system` is set to `openai` based on the + // instrumentation's best knowledge. + GenAiSystemKey = attribute.Key("gen_ai.system") + + // GenAiUsageCompletionTokensKey is the attribute Key conforming to the + // "gen_ai.usage.completion_tokens" semantic conventions. It represents the + // number of tokens used in the LLM response (completion). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 180 + GenAiUsageCompletionTokensKey = attribute.Key("gen_ai.usage.completion_tokens") + + // GenAiUsagePromptTokensKey is the attribute Key conforming to the + // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the + // number of tokens used in the LLM prompt. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 100 + GenAiUsagePromptTokensKey = attribute.Key("gen_ai.usage.prompt_tokens") +) + +var ( + // OpenAI + GenAiSystemOpenai = GenAiSystemKey.String("openai") +) + +// GenAiCompletion returns an attribute KeyValue conforming to the +// "gen_ai.completion" semantic conventions. It represents the full response +// received from the LLM. +func GenAiCompletion(val string) attribute.KeyValue { + return GenAiCompletionKey.String(val) +} + +// GenAiPrompt returns an attribute KeyValue conforming to the +// "gen_ai.prompt" semantic conventions. It represents the full prompt sent to +// an LLM. +func GenAiPrompt(val string) attribute.KeyValue { + return GenAiPromptKey.String(val) +} + +// GenAiRequestMaxTokens returns an attribute KeyValue conforming to the +// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum +// number of tokens the LLM generates for a request. +func GenAiRequestMaxTokens(val int) attribute.KeyValue { + return GenAiRequestMaxTokensKey.Int(val) +} + +// GenAiRequestModel returns an attribute KeyValue conforming to the +// "gen_ai.request.model" semantic conventions. It represents the name of the +// LLM a request is being made to. +func GenAiRequestModel(val string) attribute.KeyValue { + return GenAiRequestModelKey.String(val) +} + +// GenAiRequestTemperature returns an attribute KeyValue conforming to the +// "gen_ai.request.temperature" semantic conventions. It represents the +// temperature setting for the LLM request. +func GenAiRequestTemperature(val float64) attribute.KeyValue { + return GenAiRequestTemperatureKey.Float64(val) +} + +// GenAiRequestTopP returns an attribute KeyValue conforming to the +// "gen_ai.request.top_p" semantic conventions. It represents the top_p +// sampling setting for the LLM request. +func GenAiRequestTopP(val float64) attribute.KeyValue { + return GenAiRequestTopPKey.Float64(val) +} + +// GenAiResponseFinishReasons returns an attribute KeyValue conforming to +// the "gen_ai.response.finish_reasons" semantic conventions. It represents the +// array of reasons the model stopped generating tokens, corresponding to each +// generation received. +func GenAiResponseFinishReasons(val ...string) attribute.KeyValue { + return GenAiResponseFinishReasonsKey.StringSlice(val) +} + +// GenAiResponseID returns an attribute KeyValue conforming to the +// "gen_ai.response.id" semantic conventions. It represents the unique +// identifier for the completion. +func GenAiResponseID(val string) attribute.KeyValue { + return GenAiResponseIDKey.String(val) +} + +// GenAiResponseModel returns an attribute KeyValue conforming to the +// "gen_ai.response.model" semantic conventions. It represents the name of the +// LLM a response was generated from. +func GenAiResponseModel(val string) attribute.KeyValue { + return GenAiResponseModelKey.String(val) +} + +// GenAiUsageCompletionTokens returns an attribute KeyValue conforming to +// the "gen_ai.usage.completion_tokens" semantic conventions. It represents the +// number of tokens used in the LLM response (completion). +func GenAiUsageCompletionTokens(val int) attribute.KeyValue { + return GenAiUsageCompletionTokensKey.Int(val) +} + +// GenAiUsagePromptTokens returns an attribute KeyValue conforming to the +// "gen_ai.usage.prompt_tokens" semantic conventions. It represents the number +// of tokens used in the LLM prompt. +func GenAiUsagePromptTokens(val int) attribute.KeyValue { + return GenAiUsagePromptTokensKey.Int(val) +} + +// Attributes for GraphQL. +const ( + // GraphqlDocumentKey is the attribute Key conforming to the + // "graphql.document" semantic conventions. It represents the GraphQL + // document being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'query findBookByID { bookByID(id: ?) { name } }' + // Note: The value may be sanitized to exclude sensitive information. + GraphqlDocumentKey = attribute.Key("graphql.document") + + // GraphqlOperationNameKey is the attribute Key conforming to the + // "graphql.operation.name" semantic conventions. It represents the name of + // the operation being executed. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'findBookByID' + GraphqlOperationNameKey = attribute.Key("graphql.operation.name") + + // GraphqlOperationTypeKey is the attribute Key conforming to the + // "graphql.operation.type" semantic conventions. It represents the type of + // the operation being executed. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'query', 'mutation', 'subscription' + GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") +) + +var ( + // GraphQL query + GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") + // GraphQL mutation + GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") + // GraphQL subscription + GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") +) + +// GraphqlDocument returns an attribute KeyValue conforming to the +// "graphql.document" semantic conventions. It represents the GraphQL document +// being executed. +func GraphqlDocument(val string) attribute.KeyValue { + return GraphqlDocumentKey.String(val) +} + +// GraphqlOperationName returns an attribute KeyValue conforming to the +// "graphql.operation.name" semantic conventions. It represents the name of the +// operation being executed. +func GraphqlOperationName(val string) attribute.KeyValue { + return GraphqlOperationNameKey.String(val) +} + +// Attributes for the Android platform on which the Android application is +// running. +const ( + // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" + // semantic conventions. It represents the unique identifier for the + // application + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' + HerokuAppIDKey = attribute.Key("heroku.app.id") + + // HerokuReleaseCommitKey is the attribute Key conforming to the + // "heroku.release.commit" semantic conventions. It represents the commit + // hash for the current release + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' + HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") + + // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the + // "heroku.release.creation_timestamp" semantic conventions. It represents + // the time and date the release was created + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2022-10-23T18:00:42Z' + HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") +) + +// HerokuAppID returns an attribute KeyValue conforming to the +// "heroku.app.id" semantic conventions. It represents the unique identifier +// for the application +func HerokuAppID(val string) attribute.KeyValue { + return HerokuAppIDKey.String(val) +} + +// HerokuReleaseCommit returns an attribute KeyValue conforming to the +// "heroku.release.commit" semantic conventions. It represents the commit hash +// for the current release +func HerokuReleaseCommit(val string) attribute.KeyValue { + return HerokuReleaseCommitKey.String(val) +} + +// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming +// to the "heroku.release.creation_timestamp" semantic conventions. It +// represents the time and date the release was created +func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { + return HerokuReleaseCreationTimestampKey.String(val) +} + +// A host is defined as a computing instance. For example, physical servers, +// virtual machines, switches or disk array. +const ( + // HostArchKey is the attribute Key conforming to the "host.arch" semantic + // conventions. It represents the CPU architecture the host system is + // running on. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + HostArchKey = attribute.Key("host.arch") + + // HostCPUCacheL2SizeKey is the attribute Key conforming to the + // "host.cpu.cache.l2.size" semantic conventions. It represents the amount + // of level 2 memory cache available to the processor (in Bytes). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 12288000 + HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size") + + // HostCPUFamilyKey is the attribute Key conforming to the + // "host.cpu.family" semantic conventions. It represents the family or + // generation of the CPU. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '6', 'PA-RISC 1.1e' + HostCPUFamilyKey = attribute.Key("host.cpu.family") + + // HostCPUModelIDKey is the attribute Key conforming to the + // "host.cpu.model.id" semantic conventions. It represents the model + // identifier. It provides more granular information about the CPU, + // distinguishing it from other CPUs within the same family. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '6', '9000/778/B180L' + HostCPUModelIDKey = attribute.Key("host.cpu.model.id") + + // HostCPUModelNameKey is the attribute Key conforming to the + // "host.cpu.model.name" semantic conventions. It represents the model + // designation of the processor. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' + HostCPUModelNameKey = attribute.Key("host.cpu.model.name") + + // HostCPUSteppingKey is the attribute Key conforming to the + // "host.cpu.stepping" semantic conventions. It represents the stepping or + // core revisions. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1', 'r1p1' + HostCPUSteppingKey = attribute.Key("host.cpu.stepping") + + // HostCPUVendorIDKey is the attribute Key conforming to the + // "host.cpu.vendor.id" semantic conventions. It represents the processor + // manufacturer identifier. A maximum 12-character string. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'GenuineIntel' + // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor + // ID string in EBX, EDX and ECX registers. Writing these to memory in this + // order results in a 12-character string. + HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id") + + // HostIDKey is the attribute Key conforming to the "host.id" semantic + // conventions. It represents the unique host ID. For Cloud, this must be + // the instance_id assigned by the cloud provider. For non-containerized + // systems, this should be the `machine-id`. See the table below for the + // sources to use to determine the `machine-id` based on operating system. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'fdbf79e8af94cb7f9e8df36789187052' + HostIDKey = attribute.Key("host.id") + + // HostImageIDKey is the attribute Key conforming to the "host.image.id" + // semantic conventions. It represents the vM image ID or host OS image ID. + // For Cloud, this value is from the provider. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ami-07b06b442921831e5' + HostImageIDKey = attribute.Key("host.image.id") + + // HostImageNameKey is the attribute Key conforming to the + // "host.image.name" semantic conventions. It represents the name of the VM + // image or OS install the host was instantiated from. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' + HostImageNameKey = attribute.Key("host.image.name") + + // HostImageVersionKey is the attribute Key conforming to the + // "host.image.version" semantic conventions. It represents the version + // string of the VM image or host OS as defined in [Version + // Attributes](/docs/resource/README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0.1' + HostImageVersionKey = attribute.Key("host.image.version") + + // HostIPKey is the attribute Key conforming to the "host.ip" semantic + // conventions. It represents the available IP addresses of the host, + // excluding loopback interfaces. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' + // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 + // addresses MUST be specified in the [RFC + // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. + HostIPKey = attribute.Key("host.ip") + + // HostMacKey is the attribute Key conforming to the "host.mac" semantic + // conventions. It represents the available MAC addresses of the host, + // excluding loopback interfaces. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' + // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal + // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): + // as hyphen-separated octets in uppercase hexadecimal form from most to + // least significant. + HostMacKey = attribute.Key("host.mac") + + // HostNameKey is the attribute Key conforming to the "host.name" semantic + // conventions. It represents the name of the host. On Unix systems, it may + // contain what the hostname command returns, or the fully qualified + // hostname, or another name specified by the user. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-test' + HostNameKey = attribute.Key("host.name") + + // HostTypeKey is the attribute Key conforming to the "host.type" semantic + // conventions. It represents the type of host. For Cloud, this must be the + // machine type. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'n1-standard-1' + HostTypeKey = attribute.Key("host.type") +) + +var ( + // AMD64 + HostArchAMD64 = HostArchKey.String("amd64") + // ARM32 + HostArchARM32 = HostArchKey.String("arm32") + // ARM64 + HostArchARM64 = HostArchKey.String("arm64") + // Itanium + HostArchIA64 = HostArchKey.String("ia64") + // 32-bit PowerPC + HostArchPPC32 = HostArchKey.String("ppc32") + // 64-bit PowerPC + HostArchPPC64 = HostArchKey.String("ppc64") + // IBM z/Architecture + HostArchS390x = HostArchKey.String("s390x") + // 32-bit x86 + HostArchX86 = HostArchKey.String("x86") +) + +// HostCPUCacheL2Size returns an attribute KeyValue conforming to the +// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of +// level 2 memory cache available to the processor (in Bytes). +func HostCPUCacheL2Size(val int) attribute.KeyValue { + return HostCPUCacheL2SizeKey.Int(val) +} + +// HostCPUFamily returns an attribute KeyValue conforming to the +// "host.cpu.family" semantic conventions. It represents the family or +// generation of the CPU. +func HostCPUFamily(val string) attribute.KeyValue { + return HostCPUFamilyKey.String(val) +} + +// HostCPUModelID returns an attribute KeyValue conforming to the +// "host.cpu.model.id" semantic conventions. It represents the model +// identifier. It provides more granular information about the CPU, +// distinguishing it from other CPUs within the same family. +func HostCPUModelID(val string) attribute.KeyValue { + return HostCPUModelIDKey.String(val) +} + +// HostCPUModelName returns an attribute KeyValue conforming to the +// "host.cpu.model.name" semantic conventions. It represents the model +// designation of the processor. +func HostCPUModelName(val string) attribute.KeyValue { + return HostCPUModelNameKey.String(val) +} + +// HostCPUStepping returns an attribute KeyValue conforming to the +// "host.cpu.stepping" semantic conventions. It represents the stepping or core +// revisions. +func HostCPUStepping(val string) attribute.KeyValue { + return HostCPUSteppingKey.String(val) +} + +// HostCPUVendorID returns an attribute KeyValue conforming to the +// "host.cpu.vendor.id" semantic conventions. It represents the processor +// manufacturer identifier. A maximum 12-character string. +func HostCPUVendorID(val string) attribute.KeyValue { + return HostCPUVendorIDKey.String(val) +} + +// HostID returns an attribute KeyValue conforming to the "host.id" semantic +// conventions. It represents the unique host ID. For Cloud, this must be the +// instance_id assigned by the cloud provider. For non-containerized systems, +// this should be the `machine-id`. See the table below for the sources to use +// to determine the `machine-id` based on operating system. +func HostID(val string) attribute.KeyValue { + return HostIDKey.String(val) +} + +// HostImageID returns an attribute KeyValue conforming to the +// "host.image.id" semantic conventions. It represents the vM image ID or host +// OS image ID. For Cloud, this value is from the provider. +func HostImageID(val string) attribute.KeyValue { + return HostImageIDKey.String(val) +} + +// HostImageName returns an attribute KeyValue conforming to the +// "host.image.name" semantic conventions. It represents the name of the VM +// image or OS install the host was instantiated from. +func HostImageName(val string) attribute.KeyValue { + return HostImageNameKey.String(val) +} + +// HostImageVersion returns an attribute KeyValue conforming to the +// "host.image.version" semantic conventions. It represents the version string +// of the VM image or host OS as defined in [Version +// Attributes](/docs/resource/README.md#version-attributes). +func HostImageVersion(val string) attribute.KeyValue { + return HostImageVersionKey.String(val) +} + +// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic +// conventions. It represents the available IP addresses of the host, excluding +// loopback interfaces. +func HostIP(val ...string) attribute.KeyValue { + return HostIPKey.StringSlice(val) +} + +// HostMac returns an attribute KeyValue conforming to the "host.mac" +// semantic conventions. It represents the available MAC addresses of the host, +// excluding loopback interfaces. +func HostMac(val ...string) attribute.KeyValue { + return HostMacKey.StringSlice(val) +} + +// HostName returns an attribute KeyValue conforming to the "host.name" +// semantic conventions. It represents the name of the host. On Unix systems, +// it may contain what the hostname command returns, or the fully qualified +// hostname, or another name specified by the user. +func HostName(val string) attribute.KeyValue { + return HostNameKey.String(val) +} + +// HostType returns an attribute KeyValue conforming to the "host.type" +// semantic conventions. It represents the type of host. For Cloud, this must +// be the machine type. +func HostType(val string) attribute.KeyValue { + return HostTypeKey.String(val) +} + +// Semantic convention attributes in the HTTP namespace. +const ( + // HTTPConnectionStateKey is the attribute Key conforming to the + // "http.connection.state" semantic conventions. It represents the state of + // the HTTP connection in the HTTP connection pool. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'active', 'idle' + HTTPConnectionStateKey = attribute.Key("http.connection.state") + + // HTTPRequestBodySizeKey is the attribute Key conforming to the + // "http.request.body.size" semantic conventions. It represents the size of + // the request payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3495 + HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") + + // HTTPRequestMethodKey is the attribute Key conforming to the + // "http.request.method" semantic conventions. It represents the hTTP + // request method. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'GET', 'POST', 'HEAD' + // Note: HTTP request method value SHOULD be "known" to the + // instrumentation. + // By default, this convention defines "known" methods as the ones listed + // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) + // and the PATCH method defined in + // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). + // + // If the HTTP request method is not known to instrumentation, it MUST set + // the `http.request.method` attribute to `_OTHER`. + // + // If the HTTP instrumentation could end up converting valid HTTP request + // methods to `_OTHER`, then it MUST provide a way to override + // the list of known HTTP methods. If this override is done via environment + // variable, then the environment variable MUST be named + // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated + // list of case-sensitive known HTTP methods + // (this list MUST be a full override of the default known method, it is + // not a list of known methods in addition to the defaults). + // + // HTTP method names are case-sensitive and `http.request.method` attribute + // value MUST match a known HTTP method name exactly. + // Instrumentations for specific web frameworks that consider HTTP methods + // to be case insensitive, SHOULD populate a canonical equivalent. + // Tracing instrumentations that do so, MUST also set + // `http.request.method_original` to the original value. + HTTPRequestMethodKey = attribute.Key("http.request.method") + + // HTTPRequestMethodOriginalKey is the attribute Key conforming to the + // "http.request.method_original" semantic conventions. It represents the + // original HTTP method sent by the client in the request line. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'GeT', 'ACL', 'foo' + HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") + + // HTTPRequestResendCountKey is the attribute Key conforming to the + // "http.request.resend_count" semantic conventions. It represents the + // ordinal number of request resending attempt (for any reason, including + // redirects). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 3 + // Note: The resend count SHOULD be updated each time an HTTP request gets + // resent by the client, regardless of what was the cause of the resending + // (e.g. redirection, authorization failure, 503 Server Unavailable, + // network issues, or any other). + HTTPRequestResendCountKey = attribute.Key("http.request.resend_count") + + // HTTPRequestSizeKey is the attribute Key conforming to the + // "http.request.size" semantic conventions. It represents the total size + // of the request in bytes. This should be the total number of bytes sent + // over the wire, including the request line (HTTP/1.1), framing (HTTP/2 + // and HTTP/3), headers, and request body if any. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1437 + HTTPRequestSizeKey = attribute.Key("http.request.size") + + // HTTPResponseBodySizeKey is the attribute Key conforming to the + // "http.response.body.size" semantic conventions. It represents the size + // of the response payload body in bytes. This is the number of bytes + // transferred excluding headers and is often, but not always, present as + // the + // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) + // header. For requests using transport encoding, this should be the + // compressed size. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3495 + HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") + + // HTTPResponseSizeKey is the attribute Key conforming to the + // "http.response.size" semantic conventions. It represents the total size + // of the response in bytes. This should be the total number of bytes sent + // over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and + // HTTP/3), headers, and response body and trailers if any. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1437 + HTTPResponseSizeKey = attribute.Key("http.response.size") + + // HTTPResponseStatusCodeKey is the attribute Key conforming to the + // "http.response.status_code" semantic conventions. It represents the + // [HTTP response status + // code](https://tools.ietf.org/html/rfc7231#section-6). + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 200 + HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") + + // HTTPRouteKey is the attribute Key conforming to the "http.route" + // semantic conventions. It represents the matched route, that is, the path + // template in the format used by the respective server framework. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/users/:userID?', '{controller}/{action}/{id?}' + // Note: MUST NOT be populated when this is not supported by the HTTP + // server framework as the route attribute should have low-cardinality and + // the URI path can NOT substitute it. + // SHOULD include the [application + // root](/docs/http/http-spans.md#http-server-definitions) if there is one. + HTTPRouteKey = attribute.Key("http.route") +) + +var ( + // active state + HTTPConnectionStateActive = HTTPConnectionStateKey.String("active") + // idle state + HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle") +) + +var ( + // CONNECT method + HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") + // DELETE method + HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") + // GET method + HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") + // HEAD method + HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") + // OPTIONS method + HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") + // PATCH method + HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") + // POST method + HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") + // PUT method + HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") + // TRACE method + HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") + // Any HTTP method that the instrumentation has no prior knowledge of + HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") +) + +// HTTPRequestBodySize returns an attribute KeyValue conforming to the +// "http.request.body.size" semantic conventions. It represents the size of the +// request payload body in bytes. This is the number of bytes transferred +// excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPRequestBodySize(val int) attribute.KeyValue { + return HTTPRequestBodySizeKey.Int(val) +} + +// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the +// "http.request.method_original" semantic conventions. It represents the +// original HTTP method sent by the client in the request line. +func HTTPRequestMethodOriginal(val string) attribute.KeyValue { + return HTTPRequestMethodOriginalKey.String(val) +} + +// HTTPRequestResendCount returns an attribute KeyValue conforming to the +// "http.request.resend_count" semantic conventions. It represents the ordinal +// number of request resending attempt (for any reason, including redirects). +func HTTPRequestResendCount(val int) attribute.KeyValue { + return HTTPRequestResendCountKey.Int(val) +} + +// HTTPRequestSize returns an attribute KeyValue conforming to the +// "http.request.size" semantic conventions. It represents the total size of +// the request in bytes. This should be the total number of bytes sent over the +// wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), +// headers, and request body if any. +func HTTPRequestSize(val int) attribute.KeyValue { + return HTTPRequestSizeKey.Int(val) +} + +// HTTPResponseBodySize returns an attribute KeyValue conforming to the +// "http.response.body.size" semantic conventions. It represents the size of +// the response payload body in bytes. This is the number of bytes transferred +// excluding headers and is often, but not always, present as the +// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) +// header. For requests using transport encoding, this should be the compressed +// size. +func HTTPResponseBodySize(val int) attribute.KeyValue { + return HTTPResponseBodySizeKey.Int(val) +} + +// HTTPResponseSize returns an attribute KeyValue conforming to the +// "http.response.size" semantic conventions. It represents the total size of +// the response in bytes. This should be the total number of bytes sent over +// the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), +// headers, and response body and trailers if any. +func HTTPResponseSize(val int) attribute.KeyValue { + return HTTPResponseSizeKey.Int(val) +} + +// HTTPResponseStatusCode returns an attribute KeyValue conforming to the +// "http.response.status_code" semantic conventions. It represents the [HTTP +// response status code](https://tools.ietf.org/html/rfc7231#section-6). +func HTTPResponseStatusCode(val int) attribute.KeyValue { + return HTTPResponseStatusCodeKey.Int(val) +} + +// HTTPRoute returns an attribute KeyValue conforming to the "http.route" +// semantic conventions. It represents the matched route, that is, the path +// template in the format used by the respective server framework. +func HTTPRoute(val string) attribute.KeyValue { + return HTTPRouteKey.String(val) +} + +// Java Virtual machine related attributes. +const ( + // JvmBufferPoolNameKey is the attribute Key conforming to the + // "jvm.buffer.pool.name" semantic conventions. It represents the name of + // the buffer pool. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'mapped', 'direct' + // Note: Pool names are generally obtained via + // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). + JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name") + + // JvmGcActionKey is the attribute Key conforming to the "jvm.gc.action" + // semantic conventions. It represents the name of the garbage collector + // action. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'end of minor GC', 'end of major GC' + // Note: Garbage collector action is generally obtained via + // [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). + JvmGcActionKey = attribute.Key("jvm.gc.action") + + // JvmGcNameKey is the attribute Key conforming to the "jvm.gc.name" + // semantic conventions. It represents the name of the garbage collector. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'G1 Young Generation', 'G1 Old Generation' + // Note: Garbage collector name is generally obtained via + // [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). + JvmGcNameKey = attribute.Key("jvm.gc.name") + + // JvmMemoryPoolNameKey is the attribute Key conforming to the + // "jvm.memory.pool.name" semantic conventions. It represents the name of + // the memory pool. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' + // Note: Pool names are generally obtained via + // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). + JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name") + + // JvmMemoryTypeKey is the attribute Key conforming to the + // "jvm.memory.type" semantic conventions. It represents the type of + // memory. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'heap', 'non_heap' + JvmMemoryTypeKey = attribute.Key("jvm.memory.type") + + // JvmThreadDaemonKey is the attribute Key conforming to the + // "jvm.thread.daemon" semantic conventions. It represents the whether the + // thread is daemon or not. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: stable + JvmThreadDaemonKey = attribute.Key("jvm.thread.daemon") + + // JvmThreadStateKey is the attribute Key conforming to the + // "jvm.thread.state" semantic conventions. It represents the state of the + // thread. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'runnable', 'blocked' + JvmThreadStateKey = attribute.Key("jvm.thread.state") +) + +var ( + // Heap memory + JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap") + // Non-heap memory + JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap") +) + +var ( + // A thread that has not yet started is in this state + JvmThreadStateNew = JvmThreadStateKey.String("new") + // A thread executing in the Java virtual machine is in this state + JvmThreadStateRunnable = JvmThreadStateKey.String("runnable") + // A thread that is blocked waiting for a monitor lock is in this state + JvmThreadStateBlocked = JvmThreadStateKey.String("blocked") + // A thread that is waiting indefinitely for another thread to perform a particular action is in this state + JvmThreadStateWaiting = JvmThreadStateKey.String("waiting") + // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state + JvmThreadStateTimedWaiting = JvmThreadStateKey.String("timed_waiting") + // A thread that has exited is in this state + JvmThreadStateTerminated = JvmThreadStateKey.String("terminated") +) + +// JvmBufferPoolName returns an attribute KeyValue conforming to the +// "jvm.buffer.pool.name" semantic conventions. It represents the name of the +// buffer pool. +func JvmBufferPoolName(val string) attribute.KeyValue { + return JvmBufferPoolNameKey.String(val) +} + +// JvmGcAction returns an attribute KeyValue conforming to the +// "jvm.gc.action" semantic conventions. It represents the name of the garbage +// collector action. +func JvmGcAction(val string) attribute.KeyValue { + return JvmGcActionKey.String(val) +} + +// JvmGcName returns an attribute KeyValue conforming to the "jvm.gc.name" +// semantic conventions. It represents the name of the garbage collector. +func JvmGcName(val string) attribute.KeyValue { + return JvmGcNameKey.String(val) +} + +// JvmMemoryPoolName returns an attribute KeyValue conforming to the +// "jvm.memory.pool.name" semantic conventions. It represents the name of the +// memory pool. +func JvmMemoryPoolName(val string) attribute.KeyValue { + return JvmMemoryPoolNameKey.String(val) +} + +// JvmThreadDaemon returns an attribute KeyValue conforming to the +// "jvm.thread.daemon" semantic conventions. It represents the whether the +// thread is daemon or not. +func JvmThreadDaemon(val bool) attribute.KeyValue { + return JvmThreadDaemonKey.Bool(val) +} + +// Kubernetes resource attributes. +const ( + // K8SClusterNameKey is the attribute Key conforming to the + // "k8s.cluster.name" semantic conventions. It represents the name of the + // cluster. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-cluster' + K8SClusterNameKey = attribute.Key("k8s.cluster.name") + + // K8SClusterUIDKey is the attribute Key conforming to the + // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for + // the cluster, set to the UID of the `kube-system` namespace. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' + // Note: K8S doesn't have support for obtaining a cluster ID. If this is + // ever + // added, we will recommend collecting the `k8s.cluster.uid` through the + // official APIs. In the meantime, we are able to use the `uid` of the + // `kube-system` namespace as a proxy for cluster ID. Read on for the + // rationale. + // + // Every object created in a K8S cluster is assigned a distinct UID. The + // `kube-system` namespace is used by Kubernetes itself and will exist + // for the lifetime of the cluster. Using the `uid` of the `kube-system` + // namespace is a reasonable proxy for the K8S ClusterID as it will only + // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are + // UUIDs as standardized by + // [ISO/IEC 9834-8 and ITU-T + // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). + // Which states: + // + // > If generated according to one of the mechanisms defined in Rec. + // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be + // different from all other UUIDs generated before 3603 A.D., or is + // extremely likely to be different (depending on the mechanism chosen). + // + // Therefore, UIDs between clusters should be extremely unlikely to + // conflict. + K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") + + // K8SContainerNameKey is the attribute Key conforming to the + // "k8s.container.name" semantic conventions. It represents the name of the + // Container from Pod specification, must be unique within a Pod. Container + // runtime usually uses different globally unique name (`container.name`). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'redis' + K8SContainerNameKey = attribute.Key("k8s.container.name") + + // K8SContainerRestartCountKey is the attribute Key conforming to the + // "k8s.container.restart_count" semantic conventions. It represents the + // number of times the container was restarted. This attribute can be used + // to identify a particular container (running or stopped) within a + // container spec. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") + + // K8SContainerStatusLastTerminatedReasonKey is the attribute Key + // conforming to the "k8s.container.status.last_terminated_reason" semantic + // conventions. It represents the last terminated reason of the Container. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Evicted', 'Error' + K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason") + + // K8SCronJobNameKey is the attribute Key conforming to the + // "k8s.cronjob.name" semantic conventions. It represents the name of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") + + // K8SCronJobUIDKey is the attribute Key conforming to the + // "k8s.cronjob.uid" semantic conventions. It represents the UID of the + // CronJob. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") + + // K8SDaemonSetNameKey is the attribute Key conforming to the + // "k8s.daemonset.name" semantic conventions. It represents the name of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") + + // K8SDaemonSetUIDKey is the attribute Key conforming to the + // "k8s.daemonset.uid" semantic conventions. It represents the UID of the + // DaemonSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") + + // K8SDeploymentNameKey is the attribute Key conforming to the + // "k8s.deployment.name" semantic conventions. It represents the name of + // the Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") + + // K8SDeploymentUIDKey is the attribute Key conforming to the + // "k8s.deployment.uid" semantic conventions. It represents the UID of the + // Deployment. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") + + // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" + // semantic conventions. It represents the name of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SJobNameKey = attribute.Key("k8s.job.name") + + // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" + // semantic conventions. It represents the UID of the Job. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SJobUIDKey = attribute.Key("k8s.job.uid") + + // K8SNamespaceNameKey is the attribute Key conforming to the + // "k8s.namespace.name" semantic conventions. It represents the name of the + // namespace that the pod is running in. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'default' + K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") + + // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" + // semantic conventions. It represents the name of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'node-1' + K8SNodeNameKey = attribute.Key("k8s.node.name") + + // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" + // semantic conventions. It represents the UID of the Node. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' + K8SNodeUIDKey = attribute.Key("k8s.node.uid") + + // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" + // semantic conventions. It represents the name of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry-pod-autoconf' + K8SPodNameKey = attribute.Key("k8s.pod.name") + + // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" + // semantic conventions. It represents the UID of the Pod. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SPodUIDKey = attribute.Key("k8s.pod.uid") + + // K8SReplicaSetNameKey is the attribute Key conforming to the + // "k8s.replicaset.name" semantic conventions. It represents the name of + // the ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") + + // K8SReplicaSetUIDKey is the attribute Key conforming to the + // "k8s.replicaset.uid" semantic conventions. It represents the UID of the + // ReplicaSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") + + // K8SStatefulSetNameKey is the attribute Key conforming to the + // "k8s.statefulset.name" semantic conventions. It represents the name of + // the StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry' + K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") + + // K8SStatefulSetUIDKey is the attribute Key conforming to the + // "k8s.statefulset.uid" semantic conventions. It represents the UID of the + // StatefulSet. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' + K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") +) + +// K8SClusterName returns an attribute KeyValue conforming to the +// "k8s.cluster.name" semantic conventions. It represents the name of the +// cluster. +func K8SClusterName(val string) attribute.KeyValue { + return K8SClusterNameKey.String(val) +} + +// K8SClusterUID returns an attribute KeyValue conforming to the +// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the +// cluster, set to the UID of the `kube-system` namespace. +func K8SClusterUID(val string) attribute.KeyValue { + return K8SClusterUIDKey.String(val) +} + +// K8SContainerName returns an attribute KeyValue conforming to the +// "k8s.container.name" semantic conventions. It represents the name of the +// Container from Pod specification, must be unique within a Pod. Container +// runtime usually uses different globally unique name (`container.name`). +func K8SContainerName(val string) attribute.KeyValue { + return K8SContainerNameKey.String(val) +} + +// K8SContainerRestartCount returns an attribute KeyValue conforming to the +// "k8s.container.restart_count" semantic conventions. It represents the number +// of times the container was restarted. This attribute can be used to identify +// a particular container (running or stopped) within a container spec. +func K8SContainerRestartCount(val int) attribute.KeyValue { + return K8SContainerRestartCountKey.Int(val) +} + +// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue +// conforming to the "k8s.container.status.last_terminated_reason" semantic +// conventions. It represents the last terminated reason of the Container. +func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue { + return K8SContainerStatusLastTerminatedReasonKey.String(val) +} + +// K8SCronJobName returns an attribute KeyValue conforming to the +// "k8s.cronjob.name" semantic conventions. It represents the name of the +// CronJob. +func K8SCronJobName(val string) attribute.KeyValue { + return K8SCronJobNameKey.String(val) +} + +// K8SCronJobUID returns an attribute KeyValue conforming to the +// "k8s.cronjob.uid" semantic conventions. It represents the UID of the +// CronJob. +func K8SCronJobUID(val string) attribute.KeyValue { + return K8SCronJobUIDKey.String(val) +} + +// K8SDaemonSetName returns an attribute KeyValue conforming to the +// "k8s.daemonset.name" semantic conventions. It represents the name of the +// DaemonSet. +func K8SDaemonSetName(val string) attribute.KeyValue { + return K8SDaemonSetNameKey.String(val) +} + +// K8SDaemonSetUID returns an attribute KeyValue conforming to the +// "k8s.daemonset.uid" semantic conventions. It represents the UID of the +// DaemonSet. +func K8SDaemonSetUID(val string) attribute.KeyValue { + return K8SDaemonSetUIDKey.String(val) +} + +// K8SDeploymentName returns an attribute KeyValue conforming to the +// "k8s.deployment.name" semantic conventions. It represents the name of the +// Deployment. +func K8SDeploymentName(val string) attribute.KeyValue { + return K8SDeploymentNameKey.String(val) +} + +// K8SDeploymentUID returns an attribute KeyValue conforming to the +// "k8s.deployment.uid" semantic conventions. It represents the UID of the +// Deployment. +func K8SDeploymentUID(val string) attribute.KeyValue { + return K8SDeploymentUIDKey.String(val) +} + +// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" +// semantic conventions. It represents the name of the Job. +func K8SJobName(val string) attribute.KeyValue { + return K8SJobNameKey.String(val) +} + +// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" +// semantic conventions. It represents the UID of the Job. +func K8SJobUID(val string) attribute.KeyValue { + return K8SJobUIDKey.String(val) +} + +// K8SNamespaceName returns an attribute KeyValue conforming to the +// "k8s.namespace.name" semantic conventions. It represents the name of the +// namespace that the pod is running in. +func K8SNamespaceName(val string) attribute.KeyValue { + return K8SNamespaceNameKey.String(val) +} + +// K8SNodeName returns an attribute KeyValue conforming to the +// "k8s.node.name" semantic conventions. It represents the name of the Node. +func K8SNodeName(val string) attribute.KeyValue { + return K8SNodeNameKey.String(val) +} + +// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" +// semantic conventions. It represents the UID of the Node. +func K8SNodeUID(val string) attribute.KeyValue { + return K8SNodeUIDKey.String(val) +} + +// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" +// semantic conventions. It represents the name of the Pod. +func K8SPodName(val string) attribute.KeyValue { + return K8SPodNameKey.String(val) +} + +// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" +// semantic conventions. It represents the UID of the Pod. +func K8SPodUID(val string) attribute.KeyValue { + return K8SPodUIDKey.String(val) +} + +// K8SReplicaSetName returns an attribute KeyValue conforming to the +// "k8s.replicaset.name" semantic conventions. It represents the name of the +// ReplicaSet. +func K8SReplicaSetName(val string) attribute.KeyValue { + return K8SReplicaSetNameKey.String(val) +} + +// K8SReplicaSetUID returns an attribute KeyValue conforming to the +// "k8s.replicaset.uid" semantic conventions. It represents the UID of the +// ReplicaSet. +func K8SReplicaSetUID(val string) attribute.KeyValue { + return K8SReplicaSetUIDKey.String(val) +} + +// K8SStatefulSetName returns an attribute KeyValue conforming to the +// "k8s.statefulset.name" semantic conventions. It represents the name of the +// StatefulSet. +func K8SStatefulSetName(val string) attribute.KeyValue { + return K8SStatefulSetNameKey.String(val) +} + +// K8SStatefulSetUID returns an attribute KeyValue conforming to the +// "k8s.statefulset.uid" semantic conventions. It represents the UID of the +// StatefulSet. +func K8SStatefulSetUID(val string) attribute.KeyValue { + return K8SStatefulSetUIDKey.String(val) +} + +// Log attributes +const ( + // LogIostreamKey is the attribute Key conforming to the "log.iostream" + // semantic conventions. It represents the stream associated with the log. + // See below for a list of well-known values. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + LogIostreamKey = attribute.Key("log.iostream") +) + +var ( + // Logs from stdout stream + LogIostreamStdout = LogIostreamKey.String("stdout") + // Events from stderr stream + LogIostreamStderr = LogIostreamKey.String("stderr") +) + +// Attributes for a file to which log was emitted. +const ( + // LogFileNameKey is the attribute Key conforming to the "log.file.name" + // semantic conventions. It represents the basename of the file. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'audit.log' + LogFileNameKey = attribute.Key("log.file.name") + + // LogFileNameResolvedKey is the attribute Key conforming to the + // "log.file.name_resolved" semantic conventions. It represents the + // basename of the file, with symlinks resolved. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'uuid.log' + LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") + + // LogFilePathKey is the attribute Key conforming to the "log.file.path" + // semantic conventions. It represents the full path to the file. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/var/log/mysql/audit.log' + LogFilePathKey = attribute.Key("log.file.path") + + // LogFilePathResolvedKey is the attribute Key conforming to the + // "log.file.path_resolved" semantic conventions. It represents the full + // path to the file, with symlinks resolved. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/var/lib/docker/uuid.log' + LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") +) + +// LogFileName returns an attribute KeyValue conforming to the +// "log.file.name" semantic conventions. It represents the basename of the +// file. +func LogFileName(val string) attribute.KeyValue { + return LogFileNameKey.String(val) +} + +// LogFileNameResolved returns an attribute KeyValue conforming to the +// "log.file.name_resolved" semantic conventions. It represents the basename of +// the file, with symlinks resolved. +func LogFileNameResolved(val string) attribute.KeyValue { + return LogFileNameResolvedKey.String(val) +} + +// LogFilePath returns an attribute KeyValue conforming to the +// "log.file.path" semantic conventions. It represents the full path to the +// file. +func LogFilePath(val string) attribute.KeyValue { + return LogFilePathKey.String(val) +} + +// LogFilePathResolved returns an attribute KeyValue conforming to the +// "log.file.path_resolved" semantic conventions. It represents the full path +// to the file, with symlinks resolved. +func LogFilePathResolved(val string) attribute.KeyValue { + return LogFilePathResolvedKey.String(val) +} + +// The generic attributes that may be used in any Log Record. +const ( + // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" + // semantic conventions. It represents a unique identifier for the Log + // Record. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' + // Note: If an id is provided, other log records with the same id will be + // considered duplicates and can be removed safely. This means, that two + // distinguishable log records MUST have different values. + // The id MAY be an [Universally Unique Lexicographically Sortable + // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers + // (e.g. UUID) may be used as needed. + LogRecordUIDKey = attribute.Key("log.record.uid") +) + +// LogRecordUID returns an attribute KeyValue conforming to the +// "log.record.uid" semantic conventions. It represents a unique identifier for +// the Log Record. +func LogRecordUID(val string) attribute.KeyValue { + return LogRecordUIDKey.String(val) +} + +// Attributes describing telemetry around messaging systems and messaging +// activities. +const ( + // MessagingBatchMessageCountKey is the attribute Key conforming to the + // "messaging.batch.message_count" semantic conventions. It represents the + // number of messages sent, received, or processed in the scope of the + // batching operation. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 0, 1, 2 + // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on + // spans that operate with a single message. When a messaging client + // library supports both batch and single-message API for the same + // operation, instrumentations SHOULD use `messaging.batch.message_count` + // for batching APIs and SHOULD NOT use it for single-message APIs. + MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") + + // MessagingClientIDKey is the attribute Key conforming to the + // "messaging.client.id" semantic conventions. It represents a unique + // identifier for the client that consumes or produces a message. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'client-5', 'myhost@8742@s8083jm' + MessagingClientIDKey = attribute.Key("messaging.client.id") + + // MessagingDestinationAnonymousKey is the attribute Key conforming to the + // "messaging.destination.anonymous" semantic conventions. It represents a + // boolean that is true if the message destination is anonymous (could be + // unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") + + // MessagingDestinationNameKey is the attribute Key conforming to the + // "messaging.destination.name" semantic conventions. It represents the + // message destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MyQueue', 'MyTopic' + // Note: Destination name SHOULD uniquely identify a specific queue, topic + // or other entity within the broker. If + // the broker doesn't have such notion, the destination name SHOULD + // uniquely identify the broker. + MessagingDestinationNameKey = attribute.Key("messaging.destination.name") + + // MessagingDestinationPartitionIDKey is the attribute Key conforming to + // the "messaging.destination.partition.id" semantic conventions. It + // represents the identifier of the partition messages are sent to or + // received from, unique within the `messaging.destination.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1' + MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id") + + // MessagingDestinationTemplateKey is the attribute Key conforming to the + // "messaging.destination.template" semantic conventions. It represents the + // low cardinality representation of the messaging destination name + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/customers/{customerID}' + // Note: Destination names could be constructed from templates. An example + // would be a destination name involving a user name or product id. + // Although the destination name in this case is of high cardinality, the + // underlying template is of low cardinality and can be effectively used + // for grouping and aggregation. + MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") + + // MessagingDestinationTemporaryKey is the attribute Key conforming to the + // "messaging.destination.temporary" semantic conventions. It represents a + // boolean that is true if the message destination is temporary and might + // not exist anymore after messages are processed. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") + + // MessagingDestinationPublishAnonymousKey is the attribute Key conforming + // to the "messaging.destination_publish.anonymous" semantic conventions. + // It represents a boolean that is true if the publish message destination + // is anonymous (could be unnamed or have auto-generated name). + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous") + + // MessagingDestinationPublishNameKey is the attribute Key conforming to + // the "messaging.destination_publish.name" semantic conventions. It + // represents the name of the original destination the message was + // published to + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MyQueue', 'MyTopic' + // Note: The name SHOULD uniquely identify a specific queue, topic, or + // other entity within the broker. If + // the broker doesn't have such notion, the original destination name + // SHOULD uniquely identify the broker. + MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name") + + // MessagingMessageBodySizeKey is the attribute Key conforming to the + // "messaging.message.body.size" semantic conventions. It represents the + // size of the message body in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1439 + // Note: This can refer to both the compressed or uncompressed body size. + // If both sizes are known, the uncompressed + // body size should be used. + MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size") + + // MessagingMessageConversationIDKey is the attribute Key conforming to the + // "messaging.message.conversation_id" semantic conventions. It represents + // the conversation ID identifying the conversation to which the message + // belongs, represented as a string. Sometimes called "Correlation ID". + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MyConversationID' + MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") + + // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the + // "messaging.message.envelope.size" semantic conventions. It represents + // the size of the message body and metadata in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 2738 + // Note: This can refer to both the compressed or uncompressed size. If + // both sizes are known, the uncompressed + // size should be used. + MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size") + + // MessagingMessageIDKey is the attribute Key conforming to the + // "messaging.message.id" semantic conventions. It represents a value used + // by the messaging system as an identifier for the message, represented as + // a string. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '452a7c7c7c7048c2f887f61572b18fc2' + MessagingMessageIDKey = attribute.Key("messaging.message.id") + + // MessagingOperationNameKey is the attribute Key conforming to the + // "messaging.operation.name" semantic conventions. It represents the + // system-specific name of the messaging operation. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ack', 'nack', 'send' + MessagingOperationNameKey = attribute.Key("messaging.operation.name") + + // MessagingOperationTypeKey is the attribute Key conforming to the + // "messaging.operation.type" semantic conventions. It represents a string + // identifying the type of the messaging operation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: If a custom value is used, it MUST be of low cardinality. + MessagingOperationTypeKey = attribute.Key("messaging.operation.type") + + // MessagingSystemKey is the attribute Key conforming to the + // "messaging.system" semantic conventions. It represents the messaging + // system as identified by the client instrumentation. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The actual messaging system may differ from the one known by the + // client. For example, when using Kafka client libraries to communicate + // with Azure Event Hubs, the `messaging.system` is set to `kafka` based on + // the instrumentation's best knowledge. + MessagingSystemKey = attribute.Key("messaging.system") +) + +var ( + // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created + MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish") + // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios + MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create") + // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages + MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive") + // One or more messages are delivered to or processed by a consumer + MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("process") + // One or more messages are settled + MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle") +) + +var ( + // Apache ActiveMQ + MessagingSystemActivemq = MessagingSystemKey.String("activemq") + // Amazon Simple Queue Service (SQS) + MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs") + // Azure Event Grid + MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid") + // Azure Event Hubs + MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs") + // Azure Service Bus + MessagingSystemServicebus = MessagingSystemKey.String("servicebus") + // Google Cloud Pub/Sub + MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub") + // Java Message Service + MessagingSystemJms = MessagingSystemKey.String("jms") + // Apache Kafka + MessagingSystemKafka = MessagingSystemKey.String("kafka") + // RabbitMQ + MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq") + // Apache RocketMQ + MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq") +) + +// MessagingBatchMessageCount returns an attribute KeyValue conforming to +// the "messaging.batch.message_count" semantic conventions. It represents the +// number of messages sent, received, or processed in the scope of the batching +// operation. +func MessagingBatchMessageCount(val int) attribute.KeyValue { + return MessagingBatchMessageCountKey.Int(val) +} + +// MessagingClientID returns an attribute KeyValue conforming to the +// "messaging.client.id" semantic conventions. It represents a unique +// identifier for the client that consumes or produces a message. +func MessagingClientID(val string) attribute.KeyValue { + return MessagingClientIDKey.String(val) +} + +// MessagingDestinationAnonymous returns an attribute KeyValue conforming to +// the "messaging.destination.anonymous" semantic conventions. It represents a +// boolean that is true if the message destination is anonymous (could be +// unnamed or have auto-generated name). +func MessagingDestinationAnonymous(val bool) attribute.KeyValue { + return MessagingDestinationAnonymousKey.Bool(val) +} + +// MessagingDestinationName returns an attribute KeyValue conforming to the +// "messaging.destination.name" semantic conventions. It represents the message +// destination name +func MessagingDestinationName(val string) attribute.KeyValue { + return MessagingDestinationNameKey.String(val) +} + +// MessagingDestinationPartitionID returns an attribute KeyValue conforming +// to the "messaging.destination.partition.id" semantic conventions. It +// represents the identifier of the partition messages are sent to or received +// from, unique within the `messaging.destination.name`. +func MessagingDestinationPartitionID(val string) attribute.KeyValue { + return MessagingDestinationPartitionIDKey.String(val) +} + +// MessagingDestinationTemplate returns an attribute KeyValue conforming to +// the "messaging.destination.template" semantic conventions. It represents the +// low cardinality representation of the messaging destination name +func MessagingDestinationTemplate(val string) attribute.KeyValue { + return MessagingDestinationTemplateKey.String(val) +} + +// MessagingDestinationTemporary returns an attribute KeyValue conforming to +// the "messaging.destination.temporary" semantic conventions. It represents a +// boolean that is true if the message destination is temporary and might not +// exist anymore after messages are processed. +func MessagingDestinationTemporary(val bool) attribute.KeyValue { + return MessagingDestinationTemporaryKey.Bool(val) +} + +// MessagingDestinationPublishAnonymous returns an attribute KeyValue +// conforming to the "messaging.destination_publish.anonymous" semantic +// conventions. It represents a boolean that is true if the publish message +// destination is anonymous (could be unnamed or have auto-generated name). +func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue { + return MessagingDestinationPublishAnonymousKey.Bool(val) +} + +// MessagingDestinationPublishName returns an attribute KeyValue conforming +// to the "messaging.destination_publish.name" semantic conventions. It +// represents the name of the original destination the message was published to +func MessagingDestinationPublishName(val string) attribute.KeyValue { + return MessagingDestinationPublishNameKey.String(val) +} + +// MessagingMessageBodySize returns an attribute KeyValue conforming to the +// "messaging.message.body.size" semantic conventions. It represents the size +// of the message body in bytes. +func MessagingMessageBodySize(val int) attribute.KeyValue { + return MessagingMessageBodySizeKey.Int(val) +} + +// MessagingMessageConversationID returns an attribute KeyValue conforming +// to the "messaging.message.conversation_id" semantic conventions. It +// represents the conversation ID identifying the conversation to which the +// message belongs, represented as a string. Sometimes called "Correlation ID". +func MessagingMessageConversationID(val string) attribute.KeyValue { + return MessagingMessageConversationIDKey.String(val) +} + +// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to +// the "messaging.message.envelope.size" semantic conventions. It represents +// the size of the message body and metadata in bytes. +func MessagingMessageEnvelopeSize(val int) attribute.KeyValue { + return MessagingMessageEnvelopeSizeKey.Int(val) +} + +// MessagingMessageID returns an attribute KeyValue conforming to the +// "messaging.message.id" semantic conventions. It represents a value used by +// the messaging system as an identifier for the message, represented as a +// string. +func MessagingMessageID(val string) attribute.KeyValue { + return MessagingMessageIDKey.String(val) +} + +// MessagingOperationName returns an attribute KeyValue conforming to the +// "messaging.operation.name" semantic conventions. It represents the +// system-specific name of the messaging operation. +func MessagingOperationName(val string) attribute.KeyValue { + return MessagingOperationNameKey.String(val) +} + +// This group describes attributes specific to Apache Kafka. +const ( + // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the + // "messaging.kafka.consumer.group" semantic conventions. It represents the + // name of the Kafka Consumer Group that is handling the message. Only + // applies to consumers, not producers. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'my-group' + MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") + + // MessagingKafkaMessageKeyKey is the attribute Key conforming to the + // "messaging.kafka.message.key" semantic conventions. It represents the + // message keys in Kafka are used for grouping alike messages to ensure + // they're processed on the same partition. They differ from + // `messaging.message.id` in that they're not unique. If the key is `null`, + // the attribute MUST NOT be set. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myKey' + // Note: If the key type is not string, it's string representation has to + // be supplied for the attribute. If the key has no unambiguous, canonical + // string form, don't include its value. + MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") + + // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the + // "messaging.kafka.message.offset" semantic conventions. It represents the + // offset of a record in the corresponding Kafka partition. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 42 + MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") + + // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the + // "messaging.kafka.message.tombstone" semantic conventions. It represents + // a boolean that is true if the message is a tombstone. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") +) + +// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to +// the "messaging.kafka.consumer.group" semantic conventions. It represents the +// name of the Kafka Consumer Group that is handling the message. Only applies +// to consumers, not producers. +func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { + return MessagingKafkaConsumerGroupKey.String(val) +} + +// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the +// "messaging.kafka.message.key" semantic conventions. It represents the +// message keys in Kafka are used for grouping alike messages to ensure they're +// processed on the same partition. They differ from `messaging.message.id` in +// that they're not unique. If the key is `null`, the attribute MUST NOT be +// set. +func MessagingKafkaMessageKey(val string) attribute.KeyValue { + return MessagingKafkaMessageKeyKey.String(val) +} + +// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to +// the "messaging.kafka.message.offset" semantic conventions. It represents the +// offset of a record in the corresponding Kafka partition. +func MessagingKafkaMessageOffset(val int) attribute.KeyValue { + return MessagingKafkaMessageOffsetKey.Int(val) +} + +// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming +// to the "messaging.kafka.message.tombstone" semantic conventions. It +// represents a boolean that is true if the message is a tombstone. +func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { + return MessagingKafkaMessageTombstoneKey.Bool(val) +} + +// This group describes attributes specific to RabbitMQ. +const ( + // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key + // conforming to the "messaging.rabbitmq.destination.routing_key" semantic + // conventions. It represents the rabbitMQ message routing key. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myKey' + MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") + + // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming + // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. + // It represents the rabbitMQ message delivery tag + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 123 + MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") +) + +// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue +// conforming to the "messaging.rabbitmq.destination.routing_key" semantic +// conventions. It represents the rabbitMQ message routing key. +func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { + return MessagingRabbitmqDestinationRoutingKeyKey.String(val) +} + +// MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue +// conforming to the "messaging.rabbitmq.message.delivery_tag" semantic +// conventions. It represents the rabbitMQ message delivery tag +func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue { + return MessagingRabbitmqMessageDeliveryTagKey.Int(val) +} + +// This group describes attributes specific to RocketMQ. +const ( + // MessagingRocketmqClientGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.client_group" semantic conventions. It represents + // the name of the RocketMQ producer/consumer group that is handling the + // message. The client type is identified by the SpanKind. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myConsumerGroup' + MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") + + // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to + // the "messaging.rocketmq.consumption_model" semantic conventions. It + // represents the model of message consumption. This only applies to + // consumer spans. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") + + // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delay_time_level" semantic + // conventions. It represents the delay time level for delay message, which + // determines the message delay time. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3 + MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") + + // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key + // conforming to the "messaging.rocketmq.message.delivery_timestamp" + // semantic conventions. It represents the timestamp in milliseconds that + // the delay message is expected to be delivered to consumer. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1665987217045 + MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") + + // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the + // "messaging.rocketmq.message.group" semantic conventions. It represents + // the it is essential for FIFO message. Messages that belong to the same + // message group are always processed one by one within the same consumer + // group. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myMessageGroup' + MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") + + // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the + // "messaging.rocketmq.message.keys" semantic conventions. It represents + // the key(s) of message, another way to mark message besides message id. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'keyA', 'keyB' + MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") + + // MessagingRocketmqMessageTagKey is the attribute Key conforming to the + // "messaging.rocketmq.message.tag" semantic conventions. It represents the + // secondary classifier of message besides topic. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'tagA' + MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") + + // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the + // "messaging.rocketmq.message.type" semantic conventions. It represents + // the type of message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") + + // MessagingRocketmqNamespaceKey is the attribute Key conforming to the + // "messaging.rocketmq.namespace" semantic conventions. It represents the + // namespace of RocketMQ resources, resources in different namespaces are + // individual. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myNamespace' + MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") +) + +var ( + // Clustering consumption model + MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") + // Broadcasting consumption model + MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") +) + +var ( + // Normal message + MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") + // FIFO message + MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") + // Delay message + MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") + // Transaction message + MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") +) + +// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.client_group" semantic conventions. It represents +// the name of the RocketMQ producer/consumer group that is handling the +// message. The client type is identified by the SpanKind. +func MessagingRocketmqClientGroup(val string) attribute.KeyValue { + return MessagingRocketmqClientGroupKey.String(val) +} + +// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delay_time_level" semantic +// conventions. It represents the delay time level for delay message, which +// determines the message delay time. +func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { + return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) +} + +// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue +// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic +// conventions. It represents the timestamp in milliseconds that the delay +// message is expected to be delivered to consumer. +func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { + return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) +} + +// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.group" semantic conventions. It represents +// the it is essential for FIFO message. Messages that belong to the same +// message group are always processed one by one within the same consumer +// group. +func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { + return MessagingRocketmqMessageGroupKey.String(val) +} + +// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.keys" semantic conventions. It represents +// the key(s) of message, another way to mark message besides message id. +func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { + return MessagingRocketmqMessageKeysKey.StringSlice(val) +} + +// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to +// the "messaging.rocketmq.message.tag" semantic conventions. It represents the +// secondary classifier of message besides topic. +func MessagingRocketmqMessageTag(val string) attribute.KeyValue { + return MessagingRocketmqMessageTagKey.String(val) +} + +// MessagingRocketmqNamespace returns an attribute KeyValue conforming to +// the "messaging.rocketmq.namespace" semantic conventions. It represents the +// namespace of RocketMQ resources, resources in different namespaces are +// individual. +func MessagingRocketmqNamespace(val string) attribute.KeyValue { + return MessagingRocketmqNamespaceKey.String(val) +} + +// This group describes attributes specific to GCP Pub/Sub. +const ( + // MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming + // to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. + // It represents the ack deadline in seconds set for the modify ack + // deadline request. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 10 + MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline") + + // MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the + // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It + // represents the ack id for a given message. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ack_id' + MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id") + + // MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key + // conforming to the "messaging.gcp_pubsub.message.delivery_attempt" + // semantic conventions. It represents the delivery attempt for a given + // message. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 2 + MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt") + + // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming + // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. + // It represents the ordering key for a given message. If the attribute is + // not present, the message does not have an ordering key. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ordering_key' + MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") +) + +// MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue +// conforming to the "messaging.gcp_pubsub.message.ack_deadline" semantic +// conventions. It represents the ack deadline in seconds set for the modify +// ack deadline request. +func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue { + return MessagingGCPPubsubMessageAckDeadlineKey.Int(val) +} + +// MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming +// to the "messaging.gcp_pubsub.message.ack_id" semantic conventions. It +// represents the ack id for a given message. +func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue { + return MessagingGCPPubsubMessageAckIDKey.String(val) +} + +// MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue +// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic +// conventions. It represents the delivery attempt for a given message. +func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue { + return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val) +} + +// MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue +// conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic +// conventions. It represents the ordering key for a given message. If the +// attribute is not present, the message does not have an ordering key. +func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue { + return MessagingGCPPubsubMessageOrderingKeyKey.String(val) +} + +// This group describes attributes specific to Azure Service Bus. +const ( + // MessagingServicebusDestinationSubscriptionNameKey is the attribute Key + // conforming to the "messaging.servicebus.destination.subscription_name" + // semantic conventions. It represents the name of the subscription in the + // topic messages are received from. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'mySubscription' + MessagingServicebusDestinationSubscriptionNameKey = attribute.Key("messaging.servicebus.destination.subscription_name") + + // MessagingServicebusDispositionStatusKey is the attribute Key conforming + // to the "messaging.servicebus.disposition_status" semantic conventions. + // It represents the describes the [settlement + // type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status") + + // MessagingServicebusMessageDeliveryCountKey is the attribute Key + // conforming to the "messaging.servicebus.message.delivery_count" semantic + // conventions. It represents the number of deliveries that have been + // attempted for this message. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 2 + MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count") + + // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key + // conforming to the "messaging.servicebus.message.enqueued_time" semantic + // conventions. It represents the UTC epoch seconds at which the message + // has been accepted and stored in the entity. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1701393730 + MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") +) + +var ( + // Message is completed + MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete") + // Message is abandoned + MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon") + // Message is sent to dead letter queue + MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter") + // Message is deferred + MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer") +) + +// MessagingServicebusDestinationSubscriptionName returns an attribute +// KeyValue conforming to the +// "messaging.servicebus.destination.subscription_name" semantic conventions. +// It represents the name of the subscription in the topic messages are +// received from. +func MessagingServicebusDestinationSubscriptionName(val string) attribute.KeyValue { + return MessagingServicebusDestinationSubscriptionNameKey.String(val) +} + +// MessagingServicebusMessageDeliveryCount returns an attribute KeyValue +// conforming to the "messaging.servicebus.message.delivery_count" semantic +// conventions. It represents the number of deliveries that have been attempted +// for this message. +func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue { + return MessagingServicebusMessageDeliveryCountKey.Int(val) +} + +// MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue +// conforming to the "messaging.servicebus.message.enqueued_time" semantic +// conventions. It represents the UTC epoch seconds at which the message has +// been accepted and stored in the entity. +func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue { + return MessagingServicebusMessageEnqueuedTimeKey.Int(val) +} + +// This group describes attributes specific to Azure Event Hubs. +const ( + // MessagingEventhubsConsumerGroupKey is the attribute Key conforming to + // the "messaging.eventhubs.consumer.group" semantic conventions. It + // represents the name of the consumer group the event consumer is + // associated with. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'indexer' + MessagingEventhubsConsumerGroupKey = attribute.Key("messaging.eventhubs.consumer.group") + + // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming + // to the "messaging.eventhubs.message.enqueued_time" semantic conventions. + // It represents the UTC epoch seconds at which the message has been + // accepted and stored in the entity. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1701393730 + MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") +) + +// MessagingEventhubsConsumerGroup returns an attribute KeyValue conforming +// to the "messaging.eventhubs.consumer.group" semantic conventions. It +// represents the name of the consumer group the event consumer is associated +// with. +func MessagingEventhubsConsumerGroup(val string) attribute.KeyValue { + return MessagingEventhubsConsumerGroupKey.String(val) +} + +// MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue +// conforming to the "messaging.eventhubs.message.enqueued_time" semantic +// conventions. It represents the UTC epoch seconds at which the message has +// been accepted and stored in the entity. +func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue { + return MessagingEventhubsMessageEnqueuedTimeKey.Int(val) +} + +// These attributes may be used for any network related operation. +const ( + // NetworkCarrierIccKey is the attribute Key conforming to the + // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 + // alpha-2 2-character country code associated with the mobile carrier + // network. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'DE' + NetworkCarrierIccKey = attribute.Key("network.carrier.icc") + + // NetworkCarrierMccKey is the attribute Key conforming to the + // "network.carrier.mcc" semantic conventions. It represents the mobile + // carrier country code. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '310' + NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") + + // NetworkCarrierMncKey is the attribute Key conforming to the + // "network.carrier.mnc" semantic conventions. It represents the mobile + // carrier network code. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '001' + NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") + + // NetworkCarrierNameKey is the attribute Key conforming to the + // "network.carrier.name" semantic conventions. It represents the name of + // the mobile carrier. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'sprint' + NetworkCarrierNameKey = attribute.Key("network.carrier.name") + + // NetworkConnectionSubtypeKey is the attribute Key conforming to the + // "network.connection.subtype" semantic conventions. It represents the + // this describes more details regarding the connection.type. It may be the + // type of cell technology connection, but it could be used for describing + // details about a wifi connection. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'LTE' + NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") + + // NetworkConnectionTypeKey is the attribute Key conforming to the + // "network.connection.type" semantic conventions. It represents the + // internet connection type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'wifi' + NetworkConnectionTypeKey = attribute.Key("network.connection.type") + + // NetworkIoDirectionKey is the attribute Key conforming to the + // "network.io.direction" semantic conventions. It represents the network + // IO operation direction. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'transmit' + NetworkIoDirectionKey = attribute.Key("network.io.direction") + + // NetworkLocalAddressKey is the attribute Key conforming to the + // "network.local.address" semantic conventions. It represents the local + // address of the network connection - IP address or Unix domain socket + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10.1.2.80', '/tmp/my.sock' + NetworkLocalAddressKey = attribute.Key("network.local.address") + + // NetworkLocalPortKey is the attribute Key conforming to the + // "network.local.port" semantic conventions. It represents the local port + // number of the network connection. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + NetworkLocalPortKey = attribute.Key("network.local.port") + + // NetworkPeerAddressKey is the attribute Key conforming to the + // "network.peer.address" semantic conventions. It represents the peer + // address of the network connection - IP address or Unix domain socket + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '10.1.2.80', '/tmp/my.sock' + NetworkPeerAddressKey = attribute.Key("network.peer.address") + + // NetworkPeerPortKey is the attribute Key conforming to the + // "network.peer.port" semantic conventions. It represents the peer port + // number of the network connection. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 65123 + NetworkPeerPortKey = attribute.Key("network.peer.port") + + // NetworkProtocolNameKey is the attribute Key conforming to the + // "network.protocol.name" semantic conventions. It represents the [OSI + // application layer](https://osi-model.com/application-layer/) or non-OSI + // equivalent. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'amqp', 'http', 'mqtt' + // Note: The value SHOULD be normalized to lowercase. + NetworkProtocolNameKey = attribute.Key("network.protocol.name") + + // NetworkProtocolVersionKey is the attribute Key conforming to the + // "network.protocol.version" semantic conventions. It represents the + // actual version of the protocol used for network communication. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.1', '2' + // Note: If protocol version is subject to negotiation (for example using + // [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute + // SHOULD be set to the negotiated version. If the actual protocol version + // is not known, this attribute SHOULD NOT be set. + NetworkProtocolVersionKey = attribute.Key("network.protocol.version") + + // NetworkTransportKey is the attribute Key conforming to the + // "network.transport" semantic conventions. It represents the [OSI + // transport layer](https://osi-model.com/transport-layer/) or + // [inter-process communication + // method](https://wikipedia.org/wiki/Inter-process_communication). + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'tcp', 'udp' + // Note: The value SHOULD be normalized to lowercase. + // + // Consider always setting the transport when setting a port number, since + // a port number is ambiguous without knowing the transport. For example + // different processes could be listening on TCP port 12345 and UDP port + // 12345. + NetworkTransportKey = attribute.Key("network.transport") + + // NetworkTypeKey is the attribute Key conforming to the "network.type" + // semantic conventions. It represents the [OSI network + // layer](https://osi-model.com/network-layer/) or non-OSI equivalent. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'ipv4', 'ipv6' + // Note: The value SHOULD be normalized to lowercase. + NetworkTypeKey = attribute.Key("network.type") +) + +var ( + // GPRS + NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") + // EDGE + NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") + // UMTS + NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") + // CDMA + NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") + // EVDO Rel. 0 + NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") + // EVDO Rev. A + NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") + // CDMA2000 1XRTT + NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") + // HSDPA + NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") + // HSUPA + NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") + // HSPA + NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") + // IDEN + NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") + // EVDO Rev. B + NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") + // LTE + NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") + // EHRPD + NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") + // HSPAP + NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") + // GSM + NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") + // TD-SCDMA + NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") + // IWLAN + NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") + // 5G NR (New Radio) + NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") + // 5G NRNSA (New Radio Non-Standalone) + NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") + // LTE CA + NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") +) + +var ( + // wifi + NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") + // wired + NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") + // cell + NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") + // unavailable + NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") + // unknown + NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") +) + +var ( + // transmit + NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit") + // receive + NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive") +) + +var ( + // TCP + NetworkTransportTCP = NetworkTransportKey.String("tcp") + // UDP + NetworkTransportUDP = NetworkTransportKey.String("udp") + // Named or anonymous pipe + NetworkTransportPipe = NetworkTransportKey.String("pipe") + // Unix domain socket + NetworkTransportUnix = NetworkTransportKey.String("unix") +) + +var ( + // IPv4 + NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") + // IPv6 + NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") +) + +// NetworkCarrierIcc returns an attribute KeyValue conforming to the +// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 +// alpha-2 2-character country code associated with the mobile carrier network. +func NetworkCarrierIcc(val string) attribute.KeyValue { + return NetworkCarrierIccKey.String(val) +} + +// NetworkCarrierMcc returns an attribute KeyValue conforming to the +// "network.carrier.mcc" semantic conventions. It represents the mobile carrier +// country code. +func NetworkCarrierMcc(val string) attribute.KeyValue { + return NetworkCarrierMccKey.String(val) +} + +// NetworkCarrierMnc returns an attribute KeyValue conforming to the +// "network.carrier.mnc" semantic conventions. It represents the mobile carrier +// network code. +func NetworkCarrierMnc(val string) attribute.KeyValue { + return NetworkCarrierMncKey.String(val) +} + +// NetworkCarrierName returns an attribute KeyValue conforming to the +// "network.carrier.name" semantic conventions. It represents the name of the +// mobile carrier. +func NetworkCarrierName(val string) attribute.KeyValue { + return NetworkCarrierNameKey.String(val) +} + +// NetworkLocalAddress returns an attribute KeyValue conforming to the +// "network.local.address" semantic conventions. It represents the local +// address of the network connection - IP address or Unix domain socket name. +func NetworkLocalAddress(val string) attribute.KeyValue { + return NetworkLocalAddressKey.String(val) +} + +// NetworkLocalPort returns an attribute KeyValue conforming to the +// "network.local.port" semantic conventions. It represents the local port +// number of the network connection. +func NetworkLocalPort(val int) attribute.KeyValue { + return NetworkLocalPortKey.Int(val) +} + +// NetworkPeerAddress returns an attribute KeyValue conforming to the +// "network.peer.address" semantic conventions. It represents the peer address +// of the network connection - IP address or Unix domain socket name. +func NetworkPeerAddress(val string) attribute.KeyValue { + return NetworkPeerAddressKey.String(val) +} + +// NetworkPeerPort returns an attribute KeyValue conforming to the +// "network.peer.port" semantic conventions. It represents the peer port number +// of the network connection. +func NetworkPeerPort(val int) attribute.KeyValue { + return NetworkPeerPortKey.Int(val) +} + +// NetworkProtocolName returns an attribute KeyValue conforming to the +// "network.protocol.name" semantic conventions. It represents the [OSI +// application layer](https://osi-model.com/application-layer/) or non-OSI +// equivalent. +func NetworkProtocolName(val string) attribute.KeyValue { + return NetworkProtocolNameKey.String(val) +} + +// NetworkProtocolVersion returns an attribute KeyValue conforming to the +// "network.protocol.version" semantic conventions. It represents the actual +// version of the protocol used for network communication. +func NetworkProtocolVersion(val string) attribute.KeyValue { + return NetworkProtocolVersionKey.String(val) +} + +// An OCI image manifest. +const ( + // OciManifestDigestKey is the attribute Key conforming to the + // "oci.manifest.digest" semantic conventions. It represents the digest of + // the OCI image manifest. For container images specifically is the digest + // by which the container image is known. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' + // Note: Follows [OCI Image Manifest + // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), + // and specifically the [Digest + // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). + // An example can be found in [Example Image + // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). + OciManifestDigestKey = attribute.Key("oci.manifest.digest") +) + +// OciManifestDigest returns an attribute KeyValue conforming to the +// "oci.manifest.digest" semantic conventions. It represents the digest of the +// OCI image manifest. For container images specifically is the digest by which +// the container image is known. +func OciManifestDigest(val string) attribute.KeyValue { + return OciManifestDigestKey.String(val) +} + +// Attributes used by the OpenTracing Shim layer. +const ( + // OpentracingRefTypeKey is the attribute Key conforming to the + // "opentracing.ref_type" semantic conventions. It represents the + // parent-child Reference type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Note: The causal relationship between a child Span and a parent Span. + OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") +) + +var ( + // The parent Span depends on the child Span in some capacity + OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") + // The parent Span doesn't depend in any way on the result of the child Span + OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") +) + +// The operating system (OS) on which the process represented by this resource +// is running. +const ( + // OSBuildIDKey is the attribute Key conforming to the "os.build_id" + // semantic conventions. It represents the unique identifier for a + // particular build or compilation of the operating system. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' + OSBuildIDKey = attribute.Key("os.build_id") + + // OSDescriptionKey is the attribute Key conforming to the "os.description" + // semantic conventions. It represents the human readable (not intended to + // be parsed) OS version information, like e.g. reported by `ver` or + // `lsb_release -a` commands. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 + // LTS' + OSDescriptionKey = attribute.Key("os.description") + + // OSNameKey is the attribute Key conforming to the "os.name" semantic + // conventions. It represents the human readable operating system name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'iOS', 'Android', 'Ubuntu' + OSNameKey = attribute.Key("os.name") + + // OSTypeKey is the attribute Key conforming to the "os.type" semantic + // conventions. It represents the operating system type. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + OSTypeKey = attribute.Key("os.type") + + // OSVersionKey is the attribute Key conforming to the "os.version" + // semantic conventions. It represents the version string of the operating + // system as defined in [Version + // Attributes](/docs/resource/README.md#version-attributes). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '14.2.1', '18.04.1' + OSVersionKey = attribute.Key("os.version") +) + +var ( + // Microsoft Windows + OSTypeWindows = OSTypeKey.String("windows") + // Linux + OSTypeLinux = OSTypeKey.String("linux") + // Apple Darwin + OSTypeDarwin = OSTypeKey.String("darwin") + // FreeBSD + OSTypeFreeBSD = OSTypeKey.String("freebsd") + // NetBSD + OSTypeNetBSD = OSTypeKey.String("netbsd") + // OpenBSD + OSTypeOpenBSD = OSTypeKey.String("openbsd") + // DragonFly BSD + OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") + // HP-UX (Hewlett Packard Unix) + OSTypeHPUX = OSTypeKey.String("hpux") + // AIX (Advanced Interactive eXecutive) + OSTypeAIX = OSTypeKey.String("aix") + // SunOS, Oracle Solaris + OSTypeSolaris = OSTypeKey.String("solaris") + // IBM z/OS + OSTypeZOS = OSTypeKey.String("z_os") +) + +// OSBuildID returns an attribute KeyValue conforming to the "os.build_id" +// semantic conventions. It represents the unique identifier for a particular +// build or compilation of the operating system. +func OSBuildID(val string) attribute.KeyValue { + return OSBuildIDKey.String(val) +} + +// OSDescription returns an attribute KeyValue conforming to the +// "os.description" semantic conventions. It represents the human readable (not +// intended to be parsed) OS version information, like e.g. reported by `ver` +// or `lsb_release -a` commands. +func OSDescription(val string) attribute.KeyValue { + return OSDescriptionKey.String(val) +} + +// OSName returns an attribute KeyValue conforming to the "os.name" semantic +// conventions. It represents the human readable operating system name. +func OSName(val string) attribute.KeyValue { + return OSNameKey.String(val) +} + +// OSVersion returns an attribute KeyValue conforming to the "os.version" +// semantic conventions. It represents the version string of the operating +// system as defined in [Version +// Attributes](/docs/resource/README.md#version-attributes). +func OSVersion(val string) attribute.KeyValue { + return OSVersionKey.String(val) +} + +// Attributes reserved for OpenTelemetry +const ( + // OTelStatusCodeKey is the attribute Key conforming to the + // "otel.status_code" semantic conventions. It represents the name of the + // code, either "OK" or "ERROR". MUST NOT be set if the status code is + // UNSET. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + OTelStatusCodeKey = attribute.Key("otel.status_code") + + // OTelStatusDescriptionKey is the attribute Key conforming to the + // "otel.status_description" semantic conventions. It represents the + // description of the Status if it has a value, otherwise not set. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'resource not found' + OTelStatusDescriptionKey = attribute.Key("otel.status_description") +) + +var ( + // The operation has been validated by an Application developer or Operator to have completed successfully + OTelStatusCodeOk = OTelStatusCodeKey.String("OK") + // The operation contains an error + OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") +) + +// OTelStatusDescription returns an attribute KeyValue conforming to the +// "otel.status_description" semantic conventions. It represents the +// description of the Status if it has a value, otherwise not set. +func OTelStatusDescription(val string) attribute.KeyValue { + return OTelStatusDescriptionKey.String(val) +} + +// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's +// concepts. +const ( + // OTelScopeNameKey is the attribute Key conforming to the + // "otel.scope.name" semantic conventions. It represents the name of the + // instrumentation scope - (`InstrumentationScope.Name` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'io.opentelemetry.contrib.mongodb' + OTelScopeNameKey = attribute.Key("otel.scope.name") + + // OTelScopeVersionKey is the attribute Key conforming to the + // "otel.scope.version" semantic conventions. It represents the version of + // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '1.0.0' + OTelScopeVersionKey = attribute.Key("otel.scope.version") +) + +// OTelScopeName returns an attribute KeyValue conforming to the +// "otel.scope.name" semantic conventions. It represents the name of the +// instrumentation scope - (`InstrumentationScope.Name` in OTLP). +func OTelScopeName(val string) attribute.KeyValue { + return OTelScopeNameKey.String(val) +} + +// OTelScopeVersion returns an attribute KeyValue conforming to the +// "otel.scope.version" semantic conventions. It represents the version of the +// instrumentation scope - (`InstrumentationScope.Version` in OTLP). +func OTelScopeVersion(val string) attribute.KeyValue { + return OTelScopeVersionKey.String(val) +} + +// Operations that access some remote service. +const ( + // PeerServiceKey is the attribute Key conforming to the "peer.service" + // semantic conventions. It represents the + // [`service.name`](/docs/resource/README.md#service) of the remote + // service. SHOULD be equal to the actual `service.name` resource attribute + // of the remote service if any. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'AuthTokenCache' + PeerServiceKey = attribute.Key("peer.service") +) + +// PeerService returns an attribute KeyValue conforming to the +// "peer.service" semantic conventions. It represents the +// [`service.name`](/docs/resource/README.md#service) of the remote service. +// SHOULD be equal to the actual `service.name` resource attribute of the +// remote service if any. +func PeerService(val string) attribute.KeyValue { + return PeerServiceKey.String(val) +} + +// An operating system process. +const ( + // ProcessCommandKey is the attribute Key conforming to the + // "process.command" semantic conventions. It represents the command used + // to launch the process (i.e. the command name). On Linux based systems, + // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can + // be set to the first parameter extracted from `GetCommandLineW`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'cmd/otelcol' + ProcessCommandKey = attribute.Key("process.command") + + // ProcessCommandArgsKey is the attribute Key conforming to the + // "process.command_args" semantic conventions. It represents the all the + // command arguments (including the command/executable itself) as received + // by the process. On Linux-based systems (and some other Unixoid systems + // supporting procfs), can be set according to the list of null-delimited + // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, + // this would be the full argv vector passed to `main`. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'cmd/otecol', '--config=config.yaml' + ProcessCommandArgsKey = attribute.Key("process.command_args") + + // ProcessCommandLineKey is the attribute Key conforming to the + // "process.command_line" semantic conventions. It represents the full + // command used to launch the process as a single string representing the + // full command. On Windows, can be set to the result of `GetCommandLineW`. + // Do not set this if you have to assemble it just for monitoring; use + // `process.command_args` instead. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' + ProcessCommandLineKey = attribute.Key("process.command_line") + + // ProcessContextSwitchTypeKey is the attribute Key conforming to the + // "process.context_switch_type" semantic conventions. It represents the + // specifies whether the context switches for this data point were + // voluntary or involuntary. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type") + + // ProcessCreationTimeKey is the attribute Key conforming to the + // "process.creation.time" semantic conventions. It represents the date and + // time the process was created, in ISO 8601 format. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2023-11-21T09:25:34.853Z' + ProcessCreationTimeKey = attribute.Key("process.creation.time") + + // ProcessExecutableNameKey is the attribute Key conforming to the + // "process.executable.name" semantic conventions. It represents the name + // of the process executable. On Linux based systems, can be set to the + // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name + // of `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'otelcol' + ProcessExecutableNameKey = attribute.Key("process.executable.name") + + // ProcessExecutablePathKey is the attribute Key conforming to the + // "process.executable.path" semantic conventions. It represents the full + // path to the process executable. On Linux based systems, can be set to + // the target of `proc/[pid]/exe`. On Windows, can be set to the result of + // `GetProcessImageFileNameW`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/usr/bin/cmd/otelcol' + ProcessExecutablePathKey = attribute.Key("process.executable.path") + + // ProcessExitCodeKey is the attribute Key conforming to the + // "process.exit.code" semantic conventions. It represents the exit code of + // the process. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 127 + ProcessExitCodeKey = attribute.Key("process.exit.code") + + // ProcessExitTimeKey is the attribute Key conforming to the + // "process.exit.time" semantic conventions. It represents the date and + // time the process exited, in ISO 8601 format. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2023-11-21T09:26:12.315Z' + ProcessExitTimeKey = attribute.Key("process.exit.time") + + // ProcessGroupLeaderPIDKey is the attribute Key conforming to the + // "process.group_leader.pid" semantic conventions. It represents the PID + // of the process's group leader. This is also the process group ID (PGID) + // of the process. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 23 + ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid") + + // ProcessInteractiveKey is the attribute Key conforming to the + // "process.interactive" semantic conventions. It represents the whether + // the process is connected to an interactive shell. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + ProcessInteractiveKey = attribute.Key("process.interactive") + + // ProcessOwnerKey is the attribute Key conforming to the "process.owner" + // semantic conventions. It represents the username of the user that owns + // the process. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'root' + ProcessOwnerKey = attribute.Key("process.owner") + + // ProcessPagingFaultTypeKey is the attribute Key conforming to the + // "process.paging.fault_type" semantic conventions. It represents the type + // of page fault for this data point. Type `major` is for major/hard page + // faults, and `minor` is for minor/soft page faults. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type") + + // ProcessParentPIDKey is the attribute Key conforming to the + // "process.parent_pid" semantic conventions. It represents the parent + // Process identifier (PPID). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 111 + ProcessParentPIDKey = attribute.Key("process.parent_pid") + + // ProcessPIDKey is the attribute Key conforming to the "process.pid" + // semantic conventions. It represents the process identifier (PID). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1234 + ProcessPIDKey = attribute.Key("process.pid") + + // ProcessRealUserIDKey is the attribute Key conforming to the + // "process.real_user.id" semantic conventions. It represents the real user + // ID (RUID) of the process. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1000 + ProcessRealUserIDKey = attribute.Key("process.real_user.id") + + // ProcessRealUserNameKey is the attribute Key conforming to the + // "process.real_user.name" semantic conventions. It represents the + // username of the real user of the process. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'operator' + ProcessRealUserNameKey = attribute.Key("process.real_user.name") + + // ProcessRuntimeDescriptionKey is the attribute Key conforming to the + // "process.runtime.description" semantic conventions. It represents an + // additional description about the runtime of the process, for example a + // specific vendor customization of the runtime environment. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' + ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") + + // ProcessRuntimeNameKey is the attribute Key conforming to the + // "process.runtime.name" semantic conventions. It represents the name of + // the runtime of this process. For compiled native binaries, this SHOULD + // be the name of the compiler. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'OpenJDK Runtime Environment' + ProcessRuntimeNameKey = attribute.Key("process.runtime.name") + + // ProcessRuntimeVersionKey is the attribute Key conforming to the + // "process.runtime.version" semantic conventions. It represents the + // version of the runtime of this process, as returned by the runtime + // without modification. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '14.0.2' + ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") + + // ProcessSavedUserIDKey is the attribute Key conforming to the + // "process.saved_user.id" semantic conventions. It represents the saved + // user ID (SUID) of the process. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1002 + ProcessSavedUserIDKey = attribute.Key("process.saved_user.id") + + // ProcessSavedUserNameKey is the attribute Key conforming to the + // "process.saved_user.name" semantic conventions. It represents the + // username of the saved user. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'operator' + ProcessSavedUserNameKey = attribute.Key("process.saved_user.name") + + // ProcessSessionLeaderPIDKey is the attribute Key conforming to the + // "process.session_leader.pid" semantic conventions. It represents the PID + // of the process's session leader. This is also the session ID (SID) of + // the process. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 14 + ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid") + + // ProcessUserIDKey is the attribute Key conforming to the + // "process.user.id" semantic conventions. It represents the effective user + // ID (EUID) of the process. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1001 + ProcessUserIDKey = attribute.Key("process.user.id") + + // ProcessUserNameKey is the attribute Key conforming to the + // "process.user.name" semantic conventions. It represents the username of + // the effective user of the process. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'root' + ProcessUserNameKey = attribute.Key("process.user.name") + + // ProcessVpidKey is the attribute Key conforming to the "process.vpid" + // semantic conventions. It represents the virtual process identifier. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 12 + // Note: The process ID within a PID namespace. This is not necessarily + // unique across all processes on the host but it is unique within the + // process namespace that the process exists within. + ProcessVpidKey = attribute.Key("process.vpid") +) + +var ( + // voluntary + ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary") + // involuntary + ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary") +) + +var ( + // major + ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major") + // minor + ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor") +) + +// ProcessCommand returns an attribute KeyValue conforming to the +// "process.command" semantic conventions. It represents the command used to +// launch the process (i.e. the command name). On Linux based systems, can be +// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to +// the first parameter extracted from `GetCommandLineW`. +func ProcessCommand(val string) attribute.KeyValue { + return ProcessCommandKey.String(val) +} + +// ProcessCommandArgs returns an attribute KeyValue conforming to the +// "process.command_args" semantic conventions. It represents the all the +// command arguments (including the command/executable itself) as received by +// the process. On Linux-based systems (and some other Unixoid systems +// supporting procfs), can be set according to the list of null-delimited +// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, +// this would be the full argv vector passed to `main`. +func ProcessCommandArgs(val ...string) attribute.KeyValue { + return ProcessCommandArgsKey.StringSlice(val) +} + +// ProcessCommandLine returns an attribute KeyValue conforming to the +// "process.command_line" semantic conventions. It represents the full command +// used to launch the process as a single string representing the full command. +// On Windows, can be set to the result of `GetCommandLineW`. Do not set this +// if you have to assemble it just for monitoring; use `process.command_args` +// instead. +func ProcessCommandLine(val string) attribute.KeyValue { + return ProcessCommandLineKey.String(val) +} + +// ProcessCreationTime returns an attribute KeyValue conforming to the +// "process.creation.time" semantic conventions. It represents the date and +// time the process was created, in ISO 8601 format. +func ProcessCreationTime(val string) attribute.KeyValue { + return ProcessCreationTimeKey.String(val) +} + +// ProcessExecutableName returns an attribute KeyValue conforming to the +// "process.executable.name" semantic conventions. It represents the name of +// the process executable. On Linux based systems, can be set to the `Name` in +// `proc/[pid]/status`. On Windows, can be set to the base name of +// `GetProcessImageFileNameW`. +func ProcessExecutableName(val string) attribute.KeyValue { + return ProcessExecutableNameKey.String(val) +} + +// ProcessExecutablePath returns an attribute KeyValue conforming to the +// "process.executable.path" semantic conventions. It represents the full path +// to the process executable. On Linux based systems, can be set to the target +// of `proc/[pid]/exe`. On Windows, can be set to the result of +// `GetProcessImageFileNameW`. +func ProcessExecutablePath(val string) attribute.KeyValue { + return ProcessExecutablePathKey.String(val) +} + +// ProcessExitCode returns an attribute KeyValue conforming to the +// "process.exit.code" semantic conventions. It represents the exit code of the +// process. +func ProcessExitCode(val int) attribute.KeyValue { + return ProcessExitCodeKey.Int(val) +} + +// ProcessExitTime returns an attribute KeyValue conforming to the +// "process.exit.time" semantic conventions. It represents the date and time +// the process exited, in ISO 8601 format. +func ProcessExitTime(val string) attribute.KeyValue { + return ProcessExitTimeKey.String(val) +} + +// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the +// "process.group_leader.pid" semantic conventions. It represents the PID of +// the process's group leader. This is also the process group ID (PGID) of the +// process. +func ProcessGroupLeaderPID(val int) attribute.KeyValue { + return ProcessGroupLeaderPIDKey.Int(val) +} + +// ProcessInteractive returns an attribute KeyValue conforming to the +// "process.interactive" semantic conventions. It represents the whether the +// process is connected to an interactive shell. +func ProcessInteractive(val bool) attribute.KeyValue { + return ProcessInteractiveKey.Bool(val) +} + +// ProcessOwner returns an attribute KeyValue conforming to the +// "process.owner" semantic conventions. It represents the username of the user +// that owns the process. +func ProcessOwner(val string) attribute.KeyValue { + return ProcessOwnerKey.String(val) +} + +// ProcessParentPID returns an attribute KeyValue conforming to the +// "process.parent_pid" semantic conventions. It represents the parent Process +// identifier (PPID). +func ProcessParentPID(val int) attribute.KeyValue { + return ProcessParentPIDKey.Int(val) +} + +// ProcessPID returns an attribute KeyValue conforming to the "process.pid" +// semantic conventions. It represents the process identifier (PID). +func ProcessPID(val int) attribute.KeyValue { + return ProcessPIDKey.Int(val) +} + +// ProcessRealUserID returns an attribute KeyValue conforming to the +// "process.real_user.id" semantic conventions. It represents the real user ID +// (RUID) of the process. +func ProcessRealUserID(val int) attribute.KeyValue { + return ProcessRealUserIDKey.Int(val) +} + +// ProcessRealUserName returns an attribute KeyValue conforming to the +// "process.real_user.name" semantic conventions. It represents the username of +// the real user of the process. +func ProcessRealUserName(val string) attribute.KeyValue { + return ProcessRealUserNameKey.String(val) +} + +// ProcessRuntimeDescription returns an attribute KeyValue conforming to the +// "process.runtime.description" semantic conventions. It represents an +// additional description about the runtime of the process, for example a +// specific vendor customization of the runtime environment. +func ProcessRuntimeDescription(val string) attribute.KeyValue { + return ProcessRuntimeDescriptionKey.String(val) +} + +// ProcessRuntimeName returns an attribute KeyValue conforming to the +// "process.runtime.name" semantic conventions. It represents the name of the +// runtime of this process. For compiled native binaries, this SHOULD be the +// name of the compiler. +func ProcessRuntimeName(val string) attribute.KeyValue { + return ProcessRuntimeNameKey.String(val) +} + +// ProcessRuntimeVersion returns an attribute KeyValue conforming to the +// "process.runtime.version" semantic conventions. It represents the version of +// the runtime of this process, as returned by the runtime without +// modification. +func ProcessRuntimeVersion(val string) attribute.KeyValue { + return ProcessRuntimeVersionKey.String(val) +} + +// ProcessSavedUserID returns an attribute KeyValue conforming to the +// "process.saved_user.id" semantic conventions. It represents the saved user +// ID (SUID) of the process. +func ProcessSavedUserID(val int) attribute.KeyValue { + return ProcessSavedUserIDKey.Int(val) +} + +// ProcessSavedUserName returns an attribute KeyValue conforming to the +// "process.saved_user.name" semantic conventions. It represents the username +// of the saved user. +func ProcessSavedUserName(val string) attribute.KeyValue { + return ProcessSavedUserNameKey.String(val) +} + +// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the +// "process.session_leader.pid" semantic conventions. It represents the PID of +// the process's session leader. This is also the session ID (SID) of the +// process. +func ProcessSessionLeaderPID(val int) attribute.KeyValue { + return ProcessSessionLeaderPIDKey.Int(val) +} + +// ProcessUserID returns an attribute KeyValue conforming to the +// "process.user.id" semantic conventions. It represents the effective user ID +// (EUID) of the process. +func ProcessUserID(val int) attribute.KeyValue { + return ProcessUserIDKey.Int(val) +} + +// ProcessUserName returns an attribute KeyValue conforming to the +// "process.user.name" semantic conventions. It represents the username of the +// effective user of the process. +func ProcessUserName(val string) attribute.KeyValue { + return ProcessUserNameKey.String(val) +} + +// ProcessVpid returns an attribute KeyValue conforming to the +// "process.vpid" semantic conventions. It represents the virtual process +// identifier. +func ProcessVpid(val int) attribute.KeyValue { + return ProcessVpidKey.Int(val) +} + +// Attributes for process CPU +const ( + // ProcessCPUStateKey is the attribute Key conforming to the + // "process.cpu.state" semantic conventions. It represents the CPU state of + // the process. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + ProcessCPUStateKey = attribute.Key("process.cpu.state") +) + +var ( + // system + ProcessCPUStateSystem = ProcessCPUStateKey.String("system") + // user + ProcessCPUStateUser = ProcessCPUStateKey.String("user") + // wait + ProcessCPUStateWait = ProcessCPUStateKey.String("wait") +) + +// Attributes for remote procedure calls. +const ( + // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the + // "rpc.connect_rpc.error_code" semantic conventions. It represents the + // [error codes](https://connect.build/docs/protocol/#error-codes) of the + // Connect request. Error codes are always string values. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") + + // RPCGRPCStatusCodeKey is the attribute Key conforming to the + // "rpc.grpc.status_code" semantic conventions. It represents the [numeric + // status + // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of + // the gRPC request. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") + + // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_code" semantic conventions. It represents the + // `error.code` property of response if it is an error response. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: -32700, 100 + RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") + + // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the + // "rpc.jsonrpc.error_message" semantic conventions. It represents the + // `error.message` property of response if it is an error response. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Parse error', 'User already exists' + RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") + + // RPCJsonrpcRequestIDKey is the attribute Key conforming to the + // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` + // property of request or response. Since protocol allows id to be int, + // string, `null` or missing (for notifications), value is expected to be + // cast to string for simplicity. Use empty string in case of `null` value. + // Omit entirely if this is a notification. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '10', 'request-7', '' + RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") + + // RPCJsonrpcVersionKey is the attribute Key conforming to the + // "rpc.jsonrpc.version" semantic conventions. It represents the protocol + // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 + // doesn't specify this, the value can be omitted. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2.0', '1.0' + RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") + + // RPCMessageCompressedSizeKey is the attribute Key conforming to the + // "rpc.message.compressed_size" semantic conventions. It represents the + // compressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size") + + // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id" + // semantic conventions. It represents the mUST be calculated as two + // different counters starting from `1` one for sent messages and one for + // received message. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Note: This way we guarantee that the values will be consistent between + // different implementations. + RPCMessageIDKey = attribute.Key("rpc.message.id") + + // RPCMessageTypeKey is the attribute Key conforming to the + // "rpc.message.type" semantic conventions. It represents the whether this + // is a received or sent message. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCMessageTypeKey = attribute.Key("rpc.message.type") + + // RPCMessageUncompressedSizeKey is the attribute Key conforming to the + // "rpc.message.uncompressed_size" semantic conventions. It represents the + // uncompressed size of the message in bytes. + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size") + + // RPCMethodKey is the attribute Key conforming to the "rpc.method" + // semantic conventions. It represents the name of the (logical) method + // being called, must be equal to the $method part in the span name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'exampleMethod' + // Note: This is the logical name of the method from the RPC interface + // perspective, which can be different from the name of any implementing + // method/function. The `code.function` attribute may be used to store the + // latter (e.g., method actually executing the call on the server side, RPC + // client stub method on the client side). + RPCMethodKey = attribute.Key("rpc.method") + + // RPCServiceKey is the attribute Key conforming to the "rpc.service" + // semantic conventions. It represents the full (logical) name of the + // service being called, including its package name, if applicable. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'myservice.EchoService' + // Note: This is the logical name of the service from the RPC interface + // perspective, which can be different from the name of any implementing + // class. The `code.namespace` attribute may be used to store the latter + // (despite the attribute name, it may include a class name; e.g., class + // with method actually executing the call on the server side, RPC client + // stub class on the client side). + RPCServiceKey = attribute.Key("rpc.service") + + // RPCSystemKey is the attribute Key conforming to the "rpc.system" + // semantic conventions. It represents a string identifying the remoting + // system. See below for a list of well-known identifiers. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + RPCSystemKey = attribute.Key("rpc.system") +) + +var ( + // cancelled + RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") + // unknown + RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") + // invalid_argument + RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") + // deadline_exceeded + RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") + // not_found + RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") + // already_exists + RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") + // permission_denied + RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") + // resource_exhausted + RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") + // failed_precondition + RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") + // aborted + RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") + // out_of_range + RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") + // unimplemented + RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") + // internal + RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") + // unavailable + RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") + // data_loss + RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") + // unauthenticated + RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") +) + +var ( + // OK + RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) + // CANCELLED + RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) + // UNKNOWN + RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) + // INVALID_ARGUMENT + RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) + // DEADLINE_EXCEEDED + RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) + // NOT_FOUND + RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) + // ALREADY_EXISTS + RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) + // PERMISSION_DENIED + RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) + // RESOURCE_EXHAUSTED + RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) + // FAILED_PRECONDITION + RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) + // ABORTED + RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) + // OUT_OF_RANGE + RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) + // UNIMPLEMENTED + RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) + // INTERNAL + RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) + // UNAVAILABLE + RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) + // DATA_LOSS + RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) + // UNAUTHENTICATED + RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) +) + +var ( + // sent + RPCMessageTypeSent = RPCMessageTypeKey.String("SENT") + // received + RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED") +) + +var ( + // gRPC + RPCSystemGRPC = RPCSystemKey.String("grpc") + // Java RMI + RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") + // .NET WCF + RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") + // Apache Dubbo + RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") + // Connect RPC + RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") +) + +// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_code" semantic conventions. It represents the +// `error.code` property of response if it is an error response. +func RPCJsonrpcErrorCode(val int) attribute.KeyValue { + return RPCJsonrpcErrorCodeKey.Int(val) +} + +// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.error_message" semantic conventions. It represents the +// `error.message` property of response if it is an error response. +func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { + return RPCJsonrpcErrorMessageKey.String(val) +} + +// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` +// property of request or response. Since protocol allows id to be int, string, +// `null` or missing (for notifications), value is expected to be cast to +// string for simplicity. Use empty string in case of `null` value. Omit +// entirely if this is a notification. +func RPCJsonrpcRequestID(val string) attribute.KeyValue { + return RPCJsonrpcRequestIDKey.String(val) +} + +// RPCJsonrpcVersion returns an attribute KeyValue conforming to the +// "rpc.jsonrpc.version" semantic conventions. It represents the protocol +// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 +// doesn't specify this, the value can be omitted. +func RPCJsonrpcVersion(val string) attribute.KeyValue { + return RPCJsonrpcVersionKey.String(val) +} + +// RPCMessageCompressedSize returns an attribute KeyValue conforming to the +// "rpc.message.compressed_size" semantic conventions. It represents the +// compressed size of the message in bytes. +func RPCMessageCompressedSize(val int) attribute.KeyValue { + return RPCMessageCompressedSizeKey.Int(val) +} + +// RPCMessageID returns an attribute KeyValue conforming to the +// "rpc.message.id" semantic conventions. It represents the mUST be calculated +// as two different counters starting from `1` one for sent messages and one +// for received message. +func RPCMessageID(val int) attribute.KeyValue { + return RPCMessageIDKey.Int(val) +} + +// RPCMessageUncompressedSize returns an attribute KeyValue conforming to +// the "rpc.message.uncompressed_size" semantic conventions. It represents the +// uncompressed size of the message in bytes. +func RPCMessageUncompressedSize(val int) attribute.KeyValue { + return RPCMessageUncompressedSizeKey.Int(val) +} + +// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" +// semantic conventions. It represents the name of the (logical) method being +// called, must be equal to the $method part in the span name. +func RPCMethod(val string) attribute.KeyValue { + return RPCMethodKey.String(val) +} + +// RPCService returns an attribute KeyValue conforming to the "rpc.service" +// semantic conventions. It represents the full (logical) name of the service +// being called, including its package name, if applicable. +func RPCService(val string) attribute.KeyValue { + return RPCServiceKey.String(val) +} + +// These attributes may be used to describe the server in a connection-based +// network interaction where there is one side that initiates the connection +// (the client is the side that initiates the connection). This covers all TCP +// network interactions since TCP is connection-based and one side initiates +// the connection (an exception is made for peer-to-peer communication over TCP +// where the "user-facing" surface of the protocol / API doesn't expose a clear +// notion of client and server). This also covers UDP network interactions +// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. +const ( + // ServerAddressKey is the attribute Key conforming to the "server.address" + // semantic conventions. It represents the server domain name if available + // without reverse DNS lookup; otherwise, IP address or Unix domain socket + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the client side, and when communicating through + // an intermediary, `server.address` SHOULD represent the server address + // behind any intermediaries, for example proxies, if it's available. + ServerAddressKey = attribute.Key("server.address") + + // ServerPortKey is the attribute Key conforming to the "server.port" + // semantic conventions. It represents the server port number. + // + // Type: int + // RequirementLevel: Optional + // Stability: stable + // Examples: 80, 8080, 443 + // Note: When observed from the client side, and when communicating through + // an intermediary, `server.port` SHOULD represent the server port behind + // any intermediaries, for example proxies, if it's available. + ServerPortKey = attribute.Key("server.port") +) + +// ServerAddress returns an attribute KeyValue conforming to the +// "server.address" semantic conventions. It represents the server domain name +// if available without reverse DNS lookup; otherwise, IP address or Unix +// domain socket name. +func ServerAddress(val string) attribute.KeyValue { + return ServerAddressKey.String(val) +} + +// ServerPort returns an attribute KeyValue conforming to the "server.port" +// semantic conventions. It represents the server port number. +func ServerPort(val int) attribute.KeyValue { + return ServerPortKey.Int(val) +} + +// A service instance. +const ( + // ServiceInstanceIDKey is the attribute Key conforming to the + // "service.instance.id" semantic conventions. It represents the string ID + // of the service instance. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '627cc493-f310-47de-96bd-71410b7dec09' + // Note: MUST be unique for each instance of the same + // `service.namespace,service.name` pair (in other words + // `service.namespace,service.name,service.instance.id` triplet MUST be + // globally unique). The ID helps to + // distinguish instances of the same service that exist at the same time + // (e.g. instances of a horizontally scaled + // service). + // + // Implementations, such as SDKs, are recommended to generate a random + // Version 1 or Version 4 [RFC + // 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an + // inherent unique ID as the source of + // this value if stability is desirable. In that case, the ID SHOULD be + // used as source of a UUID Version 5 and + // SHOULD use the following UUID as the namespace: + // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. + // + // UUIDs are typically recommended, as only an opaque value for the + // purposes of identifying a service instance is + // needed. Similar to what can be seen in the man page for the + // [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) + // file, the underlying + // data, such as pod name and namespace should be treated as confidential, + // being the user's choice to expose it + // or not via another resource attribute. + // + // For applications running behind an application server (like unicorn), we + // do not recommend using one identifier + // for all processes participating in the application. Instead, it's + // recommended each division (e.g. a worker + // thread in unicorn) to have its own instance.id. + // + // It's not recommended for a Collector to set `service.instance.id` if it + // can't unambiguously determine the + // service instance that is generating that telemetry. For instance, + // creating an UUID based on `pod.name` will + // likely be wrong, as the Collector might not know from which container + // within that pod the telemetry originated. + // However, Collectors can set the `service.instance.id` if they can + // unambiguously determine the service instance + // for that telemetry. This is typically the case for scraping receivers, + // as they know the target address and + // port. + ServiceInstanceIDKey = attribute.Key("service.instance.id") + + // ServiceNameKey is the attribute Key conforming to the "service.name" + // semantic conventions. It represents the logical name of the service. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'shoppingcart' + // Note: MUST be the same for all instances of horizontally scaled + // services. If the value was not specified, SDKs MUST fallback to + // `unknown_service:` concatenated with + // [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If + // `process.executable.name` is not available, the value MUST be set to + // `unknown_service`. + ServiceNameKey = attribute.Key("service.name") + + // ServiceNamespaceKey is the attribute Key conforming to the + // "service.namespace" semantic conventions. It represents a namespace for + // `service.name`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Shop' + // Note: A string value having a meaning that helps to distinguish a group + // of services, for example the team name that owns a group of services. + // `service.name` is expected to be unique within the same namespace. If + // `service.namespace` is not specified in the Resource then `service.name` + // is expected to be unique for all services that have no explicit + // namespace defined (so the empty/unspecified namespace is simply one more + // valid namespace). Zero-length namespace string is assumed equal to + // unspecified namespace. + ServiceNamespaceKey = attribute.Key("service.namespace") + + // ServiceVersionKey is the attribute Key conforming to the + // "service.version" semantic conventions. It represents the version string + // of the service API or implementation. The format is not defined by these + // conventions. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '2.0.0', 'a01dbef8a' + ServiceVersionKey = attribute.Key("service.version") +) + +// ServiceInstanceID returns an attribute KeyValue conforming to the +// "service.instance.id" semantic conventions. It represents the string ID of +// the service instance. +func ServiceInstanceID(val string) attribute.KeyValue { + return ServiceInstanceIDKey.String(val) +} + +// ServiceName returns an attribute KeyValue conforming to the +// "service.name" semantic conventions. It represents the logical name of the +// service. +func ServiceName(val string) attribute.KeyValue { + return ServiceNameKey.String(val) +} + +// ServiceNamespace returns an attribute KeyValue conforming to the +// "service.namespace" semantic conventions. It represents a namespace for +// `service.name`. +func ServiceNamespace(val string) attribute.KeyValue { + return ServiceNamespaceKey.String(val) +} + +// ServiceVersion returns an attribute KeyValue conforming to the +// "service.version" semantic conventions. It represents the version string of +// the service API or implementation. The format is not defined by these +// conventions. +func ServiceVersion(val string) attribute.KeyValue { + return ServiceVersionKey.String(val) +} + +// Session is defined as the period of time encompassing all activities +// performed by the application and the actions executed by the end user. +// Consequently, a Session is represented as a collection of Logs, Events, and +// Spans emitted by the Client Application throughout the Session's duration. +// Each Session is assigned a unique identifier, which is included as an +// attribute in the Logs, Events, and Spans generated during the Session's +// lifecycle. +// When a session reaches end of life, typically due to user inactivity or +// session timeout, a new session identifier will be assigned. The previous +// session identifier may be provided by the instrumentation so that telemetry +// backends can link the two sessions. +const ( + // SessionIDKey is the attribute Key conforming to the "session.id" + // semantic conventions. It represents a unique id to identify a session. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '00112233-4455-6677-8899-aabbccddeeff' + SessionIDKey = attribute.Key("session.id") + + // SessionPreviousIDKey is the attribute Key conforming to the + // "session.previous_id" semantic conventions. It represents the previous + // `session.id` for this user, when known. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '00112233-4455-6677-8899-aabbccddeeff' + SessionPreviousIDKey = attribute.Key("session.previous_id") +) + +// SessionID returns an attribute KeyValue conforming to the "session.id" +// semantic conventions. It represents a unique id to identify a session. +func SessionID(val string) attribute.KeyValue { + return SessionIDKey.String(val) +} + +// SessionPreviousID returns an attribute KeyValue conforming to the +// "session.previous_id" semantic conventions. It represents the previous +// `session.id` for this user, when known. +func SessionPreviousID(val string) attribute.KeyValue { + return SessionPreviousIDKey.String(val) +} + +// SignalR attributes +const ( + // SignalrConnectionStatusKey is the attribute Key conforming to the + // "signalr.connection.status" semantic conventions. It represents the + // signalR HTTP connection closure status. + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'app_shutdown', 'timeout' + SignalrConnectionStatusKey = attribute.Key("signalr.connection.status") + + // SignalrTransportKey is the attribute Key conforming to the + // "signalr.transport" semantic conventions. It represents the [SignalR + // transport + // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) + // + // Type: Enum + // RequirementLevel: Optional + // Stability: stable + // Examples: 'web_sockets', 'long_polling' + SignalrTransportKey = attribute.Key("signalr.transport") +) + +var ( + // The connection was closed normally + SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure") + // The connection was closed due to a timeout + SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout") + // The connection was closed because the app is shutting down + SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown") +) + +var ( + // ServerSentEvents protocol + SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events") + // LongPolling protocol + SignalrTransportLongPolling = SignalrTransportKey.String("long_polling") + // WebSockets protocol + SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets") +) + +// These attributes may be used to describe the sender of a network +// exchange/packet. These should be used when there is no client/server +// relationship between the two sides, or when that relationship is unknown. +// This covers low-level network interactions (e.g. packet tracing) where you +// don't know if there was a connection or which side initiated it. This also +// covers unidirectional UDP flows and peer-to-peer communication where the +// "user-facing" surface of the protocol / API doesn't expose a clear notion of +// client and server. +const ( + // SourceAddressKey is the attribute Key conforming to the "source.address" + // semantic conventions. It represents the source address - domain name if + // available without reverse DNS lookup; otherwise, IP address or Unix + // domain socket name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' + // Note: When observed from the destination side, and when communicating + // through an intermediary, `source.address` SHOULD represent the source + // address behind any intermediaries, for example proxies, if it's + // available. + SourceAddressKey = attribute.Key("source.address") + + // SourcePortKey is the attribute Key conforming to the "source.port" + // semantic conventions. It represents the source port number + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 3389, 2888 + SourcePortKey = attribute.Key("source.port") +) + +// SourceAddress returns an attribute KeyValue conforming to the +// "source.address" semantic conventions. It represents the source address - +// domain name if available without reverse DNS lookup; otherwise, IP address +// or Unix domain socket name. +func SourceAddress(val string) attribute.KeyValue { + return SourceAddressKey.String(val) +} + +// SourcePort returns an attribute KeyValue conforming to the "source.port" +// semantic conventions. It represents the source port number +func SourcePort(val int) attribute.KeyValue { + return SourcePortKey.Int(val) +} + +// Describes System attributes +const ( + // SystemDeviceKey is the attribute Key conforming to the "system.device" + // semantic conventions. It represents the device identifier + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '(identifier)' + SystemDeviceKey = attribute.Key("system.device") +) + +// SystemDevice returns an attribute KeyValue conforming to the +// "system.device" semantic conventions. It represents the device identifier +func SystemDevice(val string) attribute.KeyValue { + return SystemDeviceKey.String(val) +} + +// Describes System CPU attributes +const ( + // SystemCPULogicalNumberKey is the attribute Key conforming to the + // "system.cpu.logical_number" semantic conventions. It represents the + // logical CPU number [0..n-1] + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 1 + SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number") + + // SystemCPUStateKey is the attribute Key conforming to the + // "system.cpu.state" semantic conventions. It represents the state of the + // CPU + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'idle', 'interrupt' + SystemCPUStateKey = attribute.Key("system.cpu.state") +) + +var ( + // user + SystemCPUStateUser = SystemCPUStateKey.String("user") + // system + SystemCPUStateSystem = SystemCPUStateKey.String("system") + // nice + SystemCPUStateNice = SystemCPUStateKey.String("nice") + // idle + SystemCPUStateIdle = SystemCPUStateKey.String("idle") + // iowait + SystemCPUStateIowait = SystemCPUStateKey.String("iowait") + // interrupt + SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt") + // steal + SystemCPUStateSteal = SystemCPUStateKey.String("steal") +) + +// SystemCPULogicalNumber returns an attribute KeyValue conforming to the +// "system.cpu.logical_number" semantic conventions. It represents the logical +// CPU number [0..n-1] +func SystemCPULogicalNumber(val int) attribute.KeyValue { + return SystemCPULogicalNumberKey.Int(val) +} + +// Describes System Memory attributes +const ( + // SystemMemoryStateKey is the attribute Key conforming to the + // "system.memory.state" semantic conventions. It represents the memory + // state + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'free', 'cached' + SystemMemoryStateKey = attribute.Key("system.memory.state") +) + +var ( + // used + SystemMemoryStateUsed = SystemMemoryStateKey.String("used") + // free + SystemMemoryStateFree = SystemMemoryStateKey.String("free") + // shared + SystemMemoryStateShared = SystemMemoryStateKey.String("shared") + // buffers + SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") + // cached + SystemMemoryStateCached = SystemMemoryStateKey.String("cached") +) + +// Describes System Memory Paging attributes +const ( + // SystemPagingDirectionKey is the attribute Key conforming to the + // "system.paging.direction" semantic conventions. It represents the paging + // access direction + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'in' + SystemPagingDirectionKey = attribute.Key("system.paging.direction") + + // SystemPagingStateKey is the attribute Key conforming to the + // "system.paging.state" semantic conventions. It represents the memory + // paging state + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'free' + SystemPagingStateKey = attribute.Key("system.paging.state") + + // SystemPagingTypeKey is the attribute Key conforming to the + // "system.paging.type" semantic conventions. It represents the memory + // paging type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'minor' + SystemPagingTypeKey = attribute.Key("system.paging.type") +) + +var ( + // in + SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") + // out + SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") +) + +var ( + // used + SystemPagingStateUsed = SystemPagingStateKey.String("used") + // free + SystemPagingStateFree = SystemPagingStateKey.String("free") +) + +var ( + // major + SystemPagingTypeMajor = SystemPagingTypeKey.String("major") + // minor + SystemPagingTypeMinor = SystemPagingTypeKey.String("minor") +) + +// Describes Filesystem attributes +const ( + // SystemFilesystemModeKey is the attribute Key conforming to the + // "system.filesystem.mode" semantic conventions. It represents the + // filesystem mode + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'rw, ro' + SystemFilesystemModeKey = attribute.Key("system.filesystem.mode") + + // SystemFilesystemMountpointKey is the attribute Key conforming to the + // "system.filesystem.mountpoint" semantic conventions. It represents the + // filesystem mount path + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/mnt/data' + SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint") + + // SystemFilesystemStateKey is the attribute Key conforming to the + // "system.filesystem.state" semantic conventions. It represents the + // filesystem state + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'used' + SystemFilesystemStateKey = attribute.Key("system.filesystem.state") + + // SystemFilesystemTypeKey is the attribute Key conforming to the + // "system.filesystem.type" semantic conventions. It represents the + // filesystem type + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'ext4' + SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") +) + +var ( + // used + SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") + // free + SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") + // reserved + SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") +) + +var ( + // fat32 + SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") + // exfat + SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") + // ntfs + SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") + // refs + SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") + // hfsplus + SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") + // ext4 + SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") +) + +// SystemFilesystemMode returns an attribute KeyValue conforming to the +// "system.filesystem.mode" semantic conventions. It represents the filesystem +// mode +func SystemFilesystemMode(val string) attribute.KeyValue { + return SystemFilesystemModeKey.String(val) +} + +// SystemFilesystemMountpoint returns an attribute KeyValue conforming to +// the "system.filesystem.mountpoint" semantic conventions. It represents the +// filesystem mount path +func SystemFilesystemMountpoint(val string) attribute.KeyValue { + return SystemFilesystemMountpointKey.String(val) +} + +// Describes Network attributes +const ( + // SystemNetworkStateKey is the attribute Key conforming to the + // "system.network.state" semantic conventions. It represents a stateless + // protocol MUST NOT set this attribute + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'close_wait' + SystemNetworkStateKey = attribute.Key("system.network.state") +) + +var ( + // close + SystemNetworkStateClose = SystemNetworkStateKey.String("close") + // close_wait + SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait") + // closing + SystemNetworkStateClosing = SystemNetworkStateKey.String("closing") + // delete + SystemNetworkStateDelete = SystemNetworkStateKey.String("delete") + // established + SystemNetworkStateEstablished = SystemNetworkStateKey.String("established") + // fin_wait_1 + SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1") + // fin_wait_2 + SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2") + // last_ack + SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack") + // listen + SystemNetworkStateListen = SystemNetworkStateKey.String("listen") + // syn_recv + SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv") + // syn_sent + SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent") + // time_wait + SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait") +) + +// Describes System Process attributes +const ( + // SystemProcessStatusKey is the attribute Key conforming to the + // "system.process.status" semantic conventions. It represents the process + // state, e.g., [Linux Process State + // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'running' + SystemProcessStatusKey = attribute.Key("system.process.status") +) + +var ( + // running + SystemProcessStatusRunning = SystemProcessStatusKey.String("running") + // sleeping + SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping") + // stopped + SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped") + // defunct + SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct") +) + +// Attributes for telemetry SDK. +const ( + // TelemetrySDKLanguageKey is the attribute Key conforming to the + // "telemetry.sdk.language" semantic conventions. It represents the + // language of the telemetry SDK. + // + // Type: Enum + // RequirementLevel: Required + // Stability: stable + TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") + + // TelemetrySDKNameKey is the attribute Key conforming to the + // "telemetry.sdk.name" semantic conventions. It represents the name of the + // telemetry SDK as defined above. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: 'opentelemetry' + // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute + // to `opentelemetry`. + // If another SDK, like a fork or a vendor-provided implementation, is + // used, this SDK MUST set the + // `telemetry.sdk.name` attribute to the fully-qualified class or module + // name of this SDK's main entry point + // or another suitable identifier depending on the language. + // The identifier `opentelemetry` is reserved and MUST NOT be used in this + // case. + // All custom identifiers SHOULD be stable across different versions of an + // implementation. + TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") + + // TelemetrySDKVersionKey is the attribute Key conforming to the + // "telemetry.sdk.version" semantic conventions. It represents the version + // string of the telemetry SDK. + // + // Type: string + // RequirementLevel: Required + // Stability: stable + // Examples: '1.2.3' + TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") + + // TelemetryDistroNameKey is the attribute Key conforming to the + // "telemetry.distro.name" semantic conventions. It represents the name of + // the auto instrumentation agent or distribution, if used. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'parts-unlimited-java' + // Note: Official auto instrumentation agents and distributions SHOULD set + // the `telemetry.distro.name` attribute to + // a string starting with `opentelemetry-`, e.g. + // `opentelemetry-java-instrumentation`. + TelemetryDistroNameKey = attribute.Key("telemetry.distro.name") + + // TelemetryDistroVersionKey is the attribute Key conforming to the + // "telemetry.distro.version" semantic conventions. It represents the + // version string of the auto instrumentation agent or distribution, if + // used. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.2.3' + TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") +) + +var ( + // cpp + TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") + // dotnet + TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") + // erlang + TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") + // go + TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") + // java + TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") + // nodejs + TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") + // php + TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") + // python + TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") + // ruby + TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") + // rust + TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") + // swift + TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") + // webjs + TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") +) + +// TelemetrySDKName returns an attribute KeyValue conforming to the +// "telemetry.sdk.name" semantic conventions. It represents the name of the +// telemetry SDK as defined above. +func TelemetrySDKName(val string) attribute.KeyValue { + return TelemetrySDKNameKey.String(val) +} + +// TelemetrySDKVersion returns an attribute KeyValue conforming to the +// "telemetry.sdk.version" semantic conventions. It represents the version +// string of the telemetry SDK. +func TelemetrySDKVersion(val string) attribute.KeyValue { + return TelemetrySDKVersionKey.String(val) +} + +// TelemetryDistroName returns an attribute KeyValue conforming to the +// "telemetry.distro.name" semantic conventions. It represents the name of the +// auto instrumentation agent or distribution, if used. +func TelemetryDistroName(val string) attribute.KeyValue { + return TelemetryDistroNameKey.String(val) +} + +// TelemetryDistroVersion returns an attribute KeyValue conforming to the +// "telemetry.distro.version" semantic conventions. It represents the version +// string of the auto instrumentation agent or distribution, if used. +func TelemetryDistroVersion(val string) attribute.KeyValue { + return TelemetryDistroVersionKey.String(val) +} + +// These attributes may be used for any operation to store information about a +// thread that started a span. +const ( + // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic + // conventions. It represents the current "managed" thread ID (as opposed + // to OS thread ID). + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 42 + ThreadIDKey = attribute.Key("thread.id") + + // ThreadNameKey is the attribute Key conforming to the "thread.name" + // semantic conventions. It represents the current thread name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'main' + ThreadNameKey = attribute.Key("thread.name") +) + +// ThreadID returns an attribute KeyValue conforming to the "thread.id" +// semantic conventions. It represents the current "managed" thread ID (as +// opposed to OS thread ID). +func ThreadID(val int) attribute.KeyValue { + return ThreadIDKey.Int(val) +} + +// ThreadName returns an attribute KeyValue conforming to the "thread.name" +// semantic conventions. It represents the current thread name. +func ThreadName(val string) attribute.KeyValue { + return ThreadNameKey.String(val) +} + +// Semantic convention attributes in the TLS namespace. +const ( + // TLSCipherKey is the attribute Key conforming to the "tls.cipher" + // semantic conventions. It represents the string indicating the + // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) + // used during the current connection. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', + // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' + // Note: The values allowed for `tls.cipher` MUST be one of the + // `Descriptions` of the [registered TLS Cipher + // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). + TLSCipherKey = attribute.Key("tls.cipher") + + // TLSClientCertificateKey is the attribute Key conforming to the + // "tls.client.certificate" semantic conventions. It represents the + // pEM-encoded stand-alone certificate offered by the client. This is + // usually mutually-exclusive of `client.certificate_chain` since this + // value also exists in that list. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...' + TLSClientCertificateKey = attribute.Key("tls.client.certificate") + + // TLSClientCertificateChainKey is the attribute Key conforming to the + // "tls.client.certificate_chain" semantic conventions. It represents the + // array of PEM-encoded certificates that make up the certificate chain + // offered by the client. This is usually mutually-exclusive of + // `client.certificate` since that value should be the first certificate in + // the chain. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...', 'MI...' + TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain") + + // TLSClientHashMd5Key is the attribute Key conforming to the + // "tls.client.hash.md5" semantic conventions. It represents the + // certificate fingerprint using the MD5 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' + TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5") + + // TLSClientHashSha1Key is the attribute Key conforming to the + // "tls.client.hash.sha1" semantic conventions. It represents the + // certificate fingerprint using the SHA1 digest of DER-encoded version of + // certificate offered by the client. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' + TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1") + + // TLSClientHashSha256Key is the attribute Key conforming to the + // "tls.client.hash.sha256" semantic conventions. It represents the + // certificate fingerprint using the SHA256 digest of DER-encoded version + // of certificate offered by the client. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' + TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256") + + // TLSClientIssuerKey is the attribute Key conforming to the + // "tls.client.issuer" semantic conventions. It represents the + // distinguished name of + // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) + // of the issuer of the x.509 certificate presented by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, + // DC=com' + TLSClientIssuerKey = attribute.Key("tls.client.issuer") + + // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3" + // semantic conventions. It represents a hash that identifies clients based + // on how they perform an SSL/TLS handshake. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'd4e5b18d6b55c71272893221c96ba240' + TLSClientJa3Key = attribute.Key("tls.client.ja3") + + // TLSClientNotAfterKey is the attribute Key conforming to the + // "tls.client.not_after" semantic conventions. It represents the date/Time + // indicating when client certificate is no longer considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2021-01-01T00:00:00.000Z' + TLSClientNotAfterKey = attribute.Key("tls.client.not_after") + + // TLSClientNotBeforeKey is the attribute Key conforming to the + // "tls.client.not_before" semantic conventions. It represents the + // date/Time indicating when client certificate is first considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1970-01-01T00:00:00.000Z' + TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") + + // TLSClientServerNameKey is the attribute Key conforming to the + // "tls.client.server_name" semantic conventions. It represents the also + // called an SNI, this tells the server which hostname to which the client + // is attempting to connect to. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'opentelemetry.io' + TLSClientServerNameKey = attribute.Key("tls.client.server_name") + + // TLSClientSubjectKey is the attribute Key conforming to the + // "tls.client.subject" semantic conventions. It represents the + // distinguished name of subject of the x.509 certificate presented by the + // client. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' + TLSClientSubjectKey = attribute.Key("tls.client.subject") + + // TLSClientSupportedCiphersKey is the attribute Key conforming to the + // "tls.client.supported_ciphers" semantic conventions. It represents the + // array of ciphers offered by the client during the client hello. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", + // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."' + TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers") + + // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic + // conventions. It represents the string indicating the curve used for the + // given cipher, when applicable + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'secp256r1' + TLSCurveKey = attribute.Key("tls.curve") + + // TLSEstablishedKey is the attribute Key conforming to the + // "tls.established" semantic conventions. It represents the boolean flag + // indicating if the TLS negotiation was successful and transitioned to an + // encrypted tunnel. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Examples: True + TLSEstablishedKey = attribute.Key("tls.established") + + // TLSNextProtocolKey is the attribute Key conforming to the + // "tls.next_protocol" semantic conventions. It represents the string + // indicating the protocol being tunneled. Per the values in the [IANA + // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), + // this string should be lower case. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'http/1.1' + TLSNextProtocolKey = attribute.Key("tls.next_protocol") + + // TLSProtocolNameKey is the attribute Key conforming to the + // "tls.protocol.name" semantic conventions. It represents the normalized + // lowercase protocol name parsed from original string of the negotiated + // [SSL/TLS protocol + // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + // + // Type: Enum + // RequirementLevel: Optional + // Stability: experimental + TLSProtocolNameKey = attribute.Key("tls.protocol.name") + + // TLSProtocolVersionKey is the attribute Key conforming to the + // "tls.protocol.version" semantic conventions. It represents the numeric + // part of the version parsed from the original string of the negotiated + // [SSL/TLS protocol + // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1.2', '3' + TLSProtocolVersionKey = attribute.Key("tls.protocol.version") + + // TLSResumedKey is the attribute Key conforming to the "tls.resumed" + // semantic conventions. It represents the boolean flag indicating if this + // TLS connection was resumed from an existing TLS negotiation. + // + // Type: boolean + // RequirementLevel: Optional + // Stability: experimental + // Examples: True + TLSResumedKey = attribute.Key("tls.resumed") + + // TLSServerCertificateKey is the attribute Key conforming to the + // "tls.server.certificate" semantic conventions. It represents the + // pEM-encoded stand-alone certificate offered by the server. This is + // usually mutually-exclusive of `server.certificate_chain` since this + // value also exists in that list. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...' + TLSServerCertificateKey = attribute.Key("tls.server.certificate") + + // TLSServerCertificateChainKey is the attribute Key conforming to the + // "tls.server.certificate_chain" semantic conventions. It represents the + // array of PEM-encoded certificates that make up the certificate chain + // offered by the server. This is usually mutually-exclusive of + // `server.certificate` since that value should be the first certificate in + // the chain. + // + // Type: string[] + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'MII...', 'MI...' + TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain") + + // TLSServerHashMd5Key is the attribute Key conforming to the + // "tls.server.hash.md5" semantic conventions. It represents the + // certificate fingerprint using the MD5 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' + TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5") + + // TLSServerHashSha1Key is the attribute Key conforming to the + // "tls.server.hash.sha1" semantic conventions. It represents the + // certificate fingerprint using the SHA1 digest of DER-encoded version of + // certificate offered by the server. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' + TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1") + + // TLSServerHashSha256Key is the attribute Key conforming to the + // "tls.server.hash.sha256" semantic conventions. It represents the + // certificate fingerprint using the SHA256 digest of DER-encoded version + // of certificate offered by the server. For consistency with other hash + // values, this value should be formatted as an uppercase hash. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: + // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' + TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256") + + // TLSServerIssuerKey is the attribute Key conforming to the + // "tls.server.issuer" semantic conventions. It represents the + // distinguished name of + // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) + // of the issuer of the x.509 certificate presented by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, + // DC=com' + TLSServerIssuerKey = attribute.Key("tls.server.issuer") + + // TLSServerJa3sKey is the attribute Key conforming to the + // "tls.server.ja3s" semantic conventions. It represents a hash that + // identifies servers based on how they perform an SSL/TLS handshake. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'd4e5b18d6b55c71272893221c96ba240' + TLSServerJa3sKey = attribute.Key("tls.server.ja3s") + + // TLSServerNotAfterKey is the attribute Key conforming to the + // "tls.server.not_after" semantic conventions. It represents the date/Time + // indicating when server certificate is no longer considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '2021-01-01T00:00:00.000Z' + TLSServerNotAfterKey = attribute.Key("tls.server.not_after") + + // TLSServerNotBeforeKey is the attribute Key conforming to the + // "tls.server.not_before" semantic conventions. It represents the + // date/Time indicating when server certificate is first considered valid. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '1970-01-01T00:00:00.000Z' + TLSServerNotBeforeKey = attribute.Key("tls.server.not_before") + + // TLSServerSubjectKey is the attribute Key conforming to the + // "tls.server.subject" semantic conventions. It represents the + // distinguished name of subject of the x.509 certificate presented by the + // server. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' + TLSServerSubjectKey = attribute.Key("tls.server.subject") +) + +var ( + // ssl + TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") + // tls + TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") +) + +// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" +// semantic conventions. It represents the string indicating the +// [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used +// during the current connection. +func TLSCipher(val string) attribute.KeyValue { + return TLSCipherKey.String(val) +} + +// TLSClientCertificate returns an attribute KeyValue conforming to the +// "tls.client.certificate" semantic conventions. It represents the pEM-encoded +// stand-alone certificate offered by the client. This is usually +// mutually-exclusive of `client.certificate_chain` since this value also +// exists in that list. +func TLSClientCertificate(val string) attribute.KeyValue { + return TLSClientCertificateKey.String(val) +} + +// TLSClientCertificateChain returns an attribute KeyValue conforming to the +// "tls.client.certificate_chain" semantic conventions. It represents the array +// of PEM-encoded certificates that make up the certificate chain offered by +// the client. This is usually mutually-exclusive of `client.certificate` since +// that value should be the first certificate in the chain. +func TLSClientCertificateChain(val ...string) attribute.KeyValue { + return TLSClientCertificateChainKey.StringSlice(val) +} + +// TLSClientHashMd5 returns an attribute KeyValue conforming to the +// "tls.client.hash.md5" semantic conventions. It represents the certificate +// fingerprint using the MD5 digest of DER-encoded version of certificate +// offered by the client. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSClientHashMd5(val string) attribute.KeyValue { + return TLSClientHashMd5Key.String(val) +} + +// TLSClientHashSha1 returns an attribute KeyValue conforming to the +// "tls.client.hash.sha1" semantic conventions. It represents the certificate +// fingerprint using the SHA1 digest of DER-encoded version of certificate +// offered by the client. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSClientHashSha1(val string) attribute.KeyValue { + return TLSClientHashSha1Key.String(val) +} + +// TLSClientHashSha256 returns an attribute KeyValue conforming to the +// "tls.client.hash.sha256" semantic conventions. It represents the certificate +// fingerprint using the SHA256 digest of DER-encoded version of certificate +// offered by the client. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSClientHashSha256(val string) attribute.KeyValue { + return TLSClientHashSha256Key.String(val) +} + +// TLSClientIssuer returns an attribute KeyValue conforming to the +// "tls.client.issuer" semantic conventions. It represents the distinguished +// name of +// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of +// the issuer of the x.509 certificate presented by the client. +func TLSClientIssuer(val string) attribute.KeyValue { + return TLSClientIssuerKey.String(val) +} + +// TLSClientJa3 returns an attribute KeyValue conforming to the +// "tls.client.ja3" semantic conventions. It represents a hash that identifies +// clients based on how they perform an SSL/TLS handshake. +func TLSClientJa3(val string) attribute.KeyValue { + return TLSClientJa3Key.String(val) +} + +// TLSClientNotAfter returns an attribute KeyValue conforming to the +// "tls.client.not_after" semantic conventions. It represents the date/Time +// indicating when client certificate is no longer considered valid. +func TLSClientNotAfter(val string) attribute.KeyValue { + return TLSClientNotAfterKey.String(val) +} + +// TLSClientNotBefore returns an attribute KeyValue conforming to the +// "tls.client.not_before" semantic conventions. It represents the date/Time +// indicating when client certificate is first considered valid. +func TLSClientNotBefore(val string) attribute.KeyValue { + return TLSClientNotBeforeKey.String(val) +} + +// TLSClientServerName returns an attribute KeyValue conforming to the +// "tls.client.server_name" semantic conventions. It represents the also called +// an SNI, this tells the server which hostname to which the client is +// attempting to connect to. +func TLSClientServerName(val string) attribute.KeyValue { + return TLSClientServerNameKey.String(val) +} + +// TLSClientSubject returns an attribute KeyValue conforming to the +// "tls.client.subject" semantic conventions. It represents the distinguished +// name of subject of the x.509 certificate presented by the client. +func TLSClientSubject(val string) attribute.KeyValue { + return TLSClientSubjectKey.String(val) +} + +// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the +// "tls.client.supported_ciphers" semantic conventions. It represents the array +// of ciphers offered by the client during the client hello. +func TLSClientSupportedCiphers(val ...string) attribute.KeyValue { + return TLSClientSupportedCiphersKey.StringSlice(val) +} + +// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" +// semantic conventions. It represents the string indicating the curve used for +// the given cipher, when applicable +func TLSCurve(val string) attribute.KeyValue { + return TLSCurveKey.String(val) +} + +// TLSEstablished returns an attribute KeyValue conforming to the +// "tls.established" semantic conventions. It represents the boolean flag +// indicating if the TLS negotiation was successful and transitioned to an +// encrypted tunnel. +func TLSEstablished(val bool) attribute.KeyValue { + return TLSEstablishedKey.Bool(val) +} + +// TLSNextProtocol returns an attribute KeyValue conforming to the +// "tls.next_protocol" semantic conventions. It represents the string +// indicating the protocol being tunneled. Per the values in the [IANA +// registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), +// this string should be lower case. +func TLSNextProtocol(val string) attribute.KeyValue { + return TLSNextProtocolKey.String(val) +} + +// TLSProtocolVersion returns an attribute KeyValue conforming to the +// "tls.protocol.version" semantic conventions. It represents the numeric part +// of the version parsed from the original string of the negotiated [SSL/TLS +// protocol +// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) +func TLSProtocolVersion(val string) attribute.KeyValue { + return TLSProtocolVersionKey.String(val) +} + +// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed" +// semantic conventions. It represents the boolean flag indicating if this TLS +// connection was resumed from an existing TLS negotiation. +func TLSResumed(val bool) attribute.KeyValue { + return TLSResumedKey.Bool(val) +} + +// TLSServerCertificate returns an attribute KeyValue conforming to the +// "tls.server.certificate" semantic conventions. It represents the pEM-encoded +// stand-alone certificate offered by the server. This is usually +// mutually-exclusive of `server.certificate_chain` since this value also +// exists in that list. +func TLSServerCertificate(val string) attribute.KeyValue { + return TLSServerCertificateKey.String(val) +} + +// TLSServerCertificateChain returns an attribute KeyValue conforming to the +// "tls.server.certificate_chain" semantic conventions. It represents the array +// of PEM-encoded certificates that make up the certificate chain offered by +// the server. This is usually mutually-exclusive of `server.certificate` since +// that value should be the first certificate in the chain. +func TLSServerCertificateChain(val ...string) attribute.KeyValue { + return TLSServerCertificateChainKey.StringSlice(val) +} + +// TLSServerHashMd5 returns an attribute KeyValue conforming to the +// "tls.server.hash.md5" semantic conventions. It represents the certificate +// fingerprint using the MD5 digest of DER-encoded version of certificate +// offered by the server. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSServerHashMd5(val string) attribute.KeyValue { + return TLSServerHashMd5Key.String(val) +} + +// TLSServerHashSha1 returns an attribute KeyValue conforming to the +// "tls.server.hash.sha1" semantic conventions. It represents the certificate +// fingerprint using the SHA1 digest of DER-encoded version of certificate +// offered by the server. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSServerHashSha1(val string) attribute.KeyValue { + return TLSServerHashSha1Key.String(val) +} + +// TLSServerHashSha256 returns an attribute KeyValue conforming to the +// "tls.server.hash.sha256" semantic conventions. It represents the certificate +// fingerprint using the SHA256 digest of DER-encoded version of certificate +// offered by the server. For consistency with other hash values, this value +// should be formatted as an uppercase hash. +func TLSServerHashSha256(val string) attribute.KeyValue { + return TLSServerHashSha256Key.String(val) +} + +// TLSServerIssuer returns an attribute KeyValue conforming to the +// "tls.server.issuer" semantic conventions. It represents the distinguished +// name of +// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of +// the issuer of the x.509 certificate presented by the client. +func TLSServerIssuer(val string) attribute.KeyValue { + return TLSServerIssuerKey.String(val) +} + +// TLSServerJa3s returns an attribute KeyValue conforming to the +// "tls.server.ja3s" semantic conventions. It represents a hash that identifies +// servers based on how they perform an SSL/TLS handshake. +func TLSServerJa3s(val string) attribute.KeyValue { + return TLSServerJa3sKey.String(val) +} + +// TLSServerNotAfter returns an attribute KeyValue conforming to the +// "tls.server.not_after" semantic conventions. It represents the date/Time +// indicating when server certificate is no longer considered valid. +func TLSServerNotAfter(val string) attribute.KeyValue { + return TLSServerNotAfterKey.String(val) +} + +// TLSServerNotBefore returns an attribute KeyValue conforming to the +// "tls.server.not_before" semantic conventions. It represents the date/Time +// indicating when server certificate is first considered valid. +func TLSServerNotBefore(val string) attribute.KeyValue { + return TLSServerNotBeforeKey.String(val) +} + +// TLSServerSubject returns an attribute KeyValue conforming to the +// "tls.server.subject" semantic conventions. It represents the distinguished +// name of subject of the x.509 certificate presented by the server. +func TLSServerSubject(val string) attribute.KeyValue { + return TLSServerSubjectKey.String(val) +} + +// Attributes describing URL. +const ( + // URLDomainKey is the attribute Key conforming to the "url.domain" + // semantic conventions. It represents the domain extracted from the + // `url.full`, such as "opentelemetry.io". + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2', + // '[1080:0:0:0:8:800:200C:417A]' + // Note: In some cases a URL may refer to an IP and/or port directly, + // without a domain name. In this case, the IP address would go to the + // domain field. If the URL contains a [literal IPv6 + // address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by + // `[` and `]`, the `[` and `]` characters should also be captured in the + // domain field. + URLDomainKey = attribute.Key("url.domain") + + // URLExtensionKey is the attribute Key conforming to the "url.extension" + // semantic conventions. It represents the file extension extracted from + // the `url.full`, excluding the leading dot. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'png', 'gz' + // Note: The file extension is only set if it exists, as not every url has + // a file extension. When the file name has multiple extensions + // `example.tar.gz`, only the last one should be captured `gz`, not + // `tar.gz`. + URLExtensionKey = attribute.Key("url.extension") + + // URLFragmentKey is the attribute Key conforming to the "url.fragment" + // semantic conventions. It represents the [URI + // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'SemConv' + URLFragmentKey = attribute.Key("url.fragment") + + // URLFullKey is the attribute Key conforming to the "url.full" semantic + // conventions. It represents the absolute URL describing a network + // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', + // '//localhost' + // Note: For network calls, URL usually has + // `scheme://host[:port][path][?query][#fragment]` format, where the + // fragment is not transmitted over HTTP, but if it is known, it SHOULD be + // included nevertheless. + // `url.full` MUST NOT contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case username and + // password SHOULD be redacted and attribute's value SHOULD be + // `https://REDACTED:REDACTED@www.example.com/`. + // `url.full` SHOULD capture the absolute URL when it is available (or can + // be reconstructed). Sensitive content provided in `url.full` SHOULD be + // scrubbed when instrumentations can identify it. + URLFullKey = attribute.Key("url.full") + + // URLOriginalKey is the attribute Key conforming to the "url.original" + // semantic conventions. It represents the unmodified original URL as seen + // in the event source. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', + // 'search?q=OpenTelemetry' + // Note: In network monitoring, the observed URL may be a full URL, whereas + // in access logs, the URL is often just represented as a path. This field + // is meant to represent the URL as it was observed, complete or not. + // `url.original` might contain credentials passed via URL in form of + // `https://username:password@www.example.com/`. In such case password and + // username SHOULD NOT be redacted and attribute's value SHOULD remain the + // same. + URLOriginalKey = attribute.Key("url.original") + + // URLPathKey is the attribute Key conforming to the "url.path" semantic + // conventions. It represents the [URI + // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: '/search' + // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when + // instrumentations can identify it. + URLPathKey = attribute.Key("url.path") + + // URLPortKey is the attribute Key conforming to the "url.port" semantic + // conventions. It represents the port extracted from the `url.full` + // + // Type: int + // RequirementLevel: Optional + // Stability: experimental + // Examples: 443 + URLPortKey = attribute.Key("url.port") + + // URLQueryKey is the attribute Key conforming to the "url.query" semantic + // conventions. It represents the [URI + // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'q=OpenTelemetry' + // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when + // instrumentations can identify it. + URLQueryKey = attribute.Key("url.query") + + // URLRegisteredDomainKey is the attribute Key conforming to the + // "url.registered_domain" semantic conventions. It represents the highest + // registered url domain, stripped of the subdomain. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'example.com', 'foo.co.uk' + // Note: This value can be determined precisely with the [public suffix + // list](http://publicsuffix.org). For example, the registered domain for + // `foo.example.com` is `example.com`. Trying to approximate this by simply + // taking the last two labels will not work well for TLDs such as `co.uk`. + URLRegisteredDomainKey = attribute.Key("url.registered_domain") + + // URLSchemeKey is the attribute Key conforming to the "url.scheme" + // semantic conventions. It represents the [URI + // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component + // identifying the used protocol. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'https', 'ftp', 'telnet' + URLSchemeKey = attribute.Key("url.scheme") + + // URLSubdomainKey is the attribute Key conforming to the "url.subdomain" + // semantic conventions. It represents the subdomain portion of a fully + // qualified domain name includes all of the names except the host name + // under the registered_domain. In a partially qualified domain, or if the + // qualification level of the full name cannot be determined, subdomain + // contains all of the names below the registered domain. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'east', 'sub2.sub1' + // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If + // the domain has multiple levels of subdomain, such as + // `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, + // with no trailing period. + URLSubdomainKey = attribute.Key("url.subdomain") + + // URLTemplateKey is the attribute Key conforming to the "url.template" + // semantic conventions. It represents the low-cardinality template of an + // [absolute path + // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '/users/{id}', '/users/:id', '/users?id={id}' + URLTemplateKey = attribute.Key("url.template") + + // URLTopLevelDomainKey is the attribute Key conforming to the + // "url.top_level_domain" semantic conventions. It represents the effective + // top level domain (eTLD), also known as the domain suffix, is the last + // part of the domain name. For example, the top level domain for + // example.com is `com`. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'com', 'co.uk' + // Note: This value can be determined precisely with the [public suffix + // list](http://publicsuffix.org). + URLTopLevelDomainKey = attribute.Key("url.top_level_domain") +) + +// URLDomain returns an attribute KeyValue conforming to the "url.domain" +// semantic conventions. It represents the domain extracted from the +// `url.full`, such as "opentelemetry.io". +func URLDomain(val string) attribute.KeyValue { + return URLDomainKey.String(val) +} + +// URLExtension returns an attribute KeyValue conforming to the +// "url.extension" semantic conventions. It represents the file extension +// extracted from the `url.full`, excluding the leading dot. +func URLExtension(val string) attribute.KeyValue { + return URLExtensionKey.String(val) +} + +// URLFragment returns an attribute KeyValue conforming to the +// "url.fragment" semantic conventions. It represents the [URI +// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component +func URLFragment(val string) attribute.KeyValue { + return URLFragmentKey.String(val) +} + +// URLFull returns an attribute KeyValue conforming to the "url.full" +// semantic conventions. It represents the absolute URL describing a network +// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) +func URLFull(val string) attribute.KeyValue { + return URLFullKey.String(val) +} + +// URLOriginal returns an attribute KeyValue conforming to the +// "url.original" semantic conventions. It represents the unmodified original +// URL as seen in the event source. +func URLOriginal(val string) attribute.KeyValue { + return URLOriginalKey.String(val) +} + +// URLPath returns an attribute KeyValue conforming to the "url.path" +// semantic conventions. It represents the [URI +// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component +func URLPath(val string) attribute.KeyValue { + return URLPathKey.String(val) +} + +// URLPort returns an attribute KeyValue conforming to the "url.port" +// semantic conventions. It represents the port extracted from the `url.full` +func URLPort(val int) attribute.KeyValue { + return URLPortKey.Int(val) +} + +// URLQuery returns an attribute KeyValue conforming to the "url.query" +// semantic conventions. It represents the [URI +// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component +func URLQuery(val string) attribute.KeyValue { + return URLQueryKey.String(val) +} + +// URLRegisteredDomain returns an attribute KeyValue conforming to the +// "url.registered_domain" semantic conventions. It represents the highest +// registered url domain, stripped of the subdomain. +func URLRegisteredDomain(val string) attribute.KeyValue { + return URLRegisteredDomainKey.String(val) +} + +// URLScheme returns an attribute KeyValue conforming to the "url.scheme" +// semantic conventions. It represents the [URI +// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component +// identifying the used protocol. +func URLScheme(val string) attribute.KeyValue { + return URLSchemeKey.String(val) +} + +// URLSubdomain returns an attribute KeyValue conforming to the +// "url.subdomain" semantic conventions. It represents the subdomain portion of +// a fully qualified domain name includes all of the names except the host name +// under the registered_domain. In a partially qualified domain, or if the +// qualification level of the full name cannot be determined, subdomain +// contains all of the names below the registered domain. +func URLSubdomain(val string) attribute.KeyValue { + return URLSubdomainKey.String(val) +} + +// URLTemplate returns an attribute KeyValue conforming to the +// "url.template" semantic conventions. It represents the low-cardinality +// template of an [absolute path +// reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). +func URLTemplate(val string) attribute.KeyValue { + return URLTemplateKey.String(val) +} + +// URLTopLevelDomain returns an attribute KeyValue conforming to the +// "url.top_level_domain" semantic conventions. It represents the effective top +// level domain (eTLD), also known as the domain suffix, is the last part of +// the domain name. For example, the top level domain for example.com is `com`. +func URLTopLevelDomain(val string) attribute.KeyValue { + return URLTopLevelDomainKey.String(val) +} + +// Describes user-agent attributes. +const ( + // UserAgentNameKey is the attribute Key conforming to the + // "user_agent.name" semantic conventions. It represents the name of the + // user-agent extracted from original. Usually refers to the browser's + // name. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'Safari', 'YourApp' + // Note: [Example](https://www.whatsmyua.info) of extracting browser's name + // from original string. In the case of using a user-agent for non-browser + // products, such as microservices with multiple names/versions inside the + // `user_agent.original`, the most significant name SHOULD be selected. In + // such a scenario it should align with `user_agent.version` + UserAgentNameKey = attribute.Key("user_agent.name") + + // UserAgentOriginalKey is the attribute Key conforming to the + // "user_agent.original" semantic conventions. It represents the value of + // the [HTTP + // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) + // header sent by the client. + // + // Type: string + // RequirementLevel: Optional + // Stability: stable + // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU + // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) + // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 + // grpc-java-okhttp/1.27.2' + UserAgentOriginalKey = attribute.Key("user_agent.original") + + // UserAgentVersionKey is the attribute Key conforming to the + // "user_agent.version" semantic conventions. It represents the version of + // the user-agent extracted from original. Usually refers to the browser's + // version + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '14.1.2', '1.0.0' + // Note: [Example](https://www.whatsmyua.info) of extracting browser's + // version from original string. In the case of using a user-agent for + // non-browser products, such as microservices with multiple names/versions + // inside the `user_agent.original`, the most significant version SHOULD be + // selected. In such a scenario it should align with `user_agent.name` + UserAgentVersionKey = attribute.Key("user_agent.version") +) + +// UserAgentName returns an attribute KeyValue conforming to the +// "user_agent.name" semantic conventions. It represents the name of the +// user-agent extracted from original. Usually refers to the browser's name. +func UserAgentName(val string) attribute.KeyValue { + return UserAgentNameKey.String(val) +} + +// UserAgentOriginal returns an attribute KeyValue conforming to the +// "user_agent.original" semantic conventions. It represents the value of the +// [HTTP +// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) +// header sent by the client. +func UserAgentOriginal(val string) attribute.KeyValue { + return UserAgentOriginalKey.String(val) +} + +// UserAgentVersion returns an attribute KeyValue conforming to the +// "user_agent.version" semantic conventions. It represents the version of the +// user-agent extracted from original. Usually refers to the browser's version +func UserAgentVersion(val string) attribute.KeyValue { + return UserAgentVersionKey.String(val) +} + +// The attributes used to describe the packaged software running the +// application code. +const ( + // WebEngineDescriptionKey is the attribute Key conforming to the + // "webengine.description" semantic conventions. It represents the + // additional description of the web engine (e.g. detailed version and + // edition information). + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - + // 2.2.2.Final' + WebEngineDescriptionKey = attribute.Key("webengine.description") + + // WebEngineNameKey is the attribute Key conforming to the "webengine.name" + // semantic conventions. It represents the name of the web engine. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: 'WildFly' + WebEngineNameKey = attribute.Key("webengine.name") + + // WebEngineVersionKey is the attribute Key conforming to the + // "webengine.version" semantic conventions. It represents the version of + // the web engine. + // + // Type: string + // RequirementLevel: Optional + // Stability: experimental + // Examples: '21.0.0' + WebEngineVersionKey = attribute.Key("webengine.version") +) + +// WebEngineDescription returns an attribute KeyValue conforming to the +// "webengine.description" semantic conventions. It represents the additional +// description of the web engine (e.g. detailed version and edition +// information). +func WebEngineDescription(val string) attribute.KeyValue { + return WebEngineDescriptionKey.String(val) +} + +// WebEngineName returns an attribute KeyValue conforming to the +// "webengine.name" semantic conventions. It represents the name of the web +// engine. +func WebEngineName(val string) attribute.KeyValue { + return WebEngineNameKey.String(val) +} + +// WebEngineVersion returns an attribute KeyValue conforming to the +// "webengine.version" semantic conventions. It represents the version of the +// web engine. +func WebEngineVersion(val string) attribute.KeyValue { + return WebEngineVersionKey.String(val) +} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go new file mode 100644 index 000000000..d031bbea7 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Package semconv implements OpenTelemetry semantic conventions. +// +// OpenTelemetry semantic conventions are agreed standardized naming +// patterns for OpenTelemetry things. This package represents the v1.26.0 +// version of the OpenTelemetry semantic conventions. +package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go new file mode 100644 index 000000000..bfaee0d56 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" + +const ( + // ExceptionEventName is the name of the Span event representing an exception. + ExceptionEventName = "exception" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go new file mode 100644 index 000000000..fcdb9f485 --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go @@ -0,0 +1,1307 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +// Code generated from semantic convention specification. DO NOT EDIT. + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" + +const ( + + // ContainerCPUTime is the metric conforming to the "container.cpu.time" + // semantic conventions. It represents the total CPU time consumed. + // Instrument: counter + // Unit: s + // Stability: Experimental + ContainerCPUTimeName = "container.cpu.time" + ContainerCPUTimeUnit = "s" + ContainerCPUTimeDescription = "Total CPU time consumed" + + // ContainerMemoryUsage is the metric conforming to the + // "container.memory.usage" semantic conventions. It represents the memory + // usage of the container. + // Instrument: counter + // Unit: By + // Stability: Experimental + ContainerMemoryUsageName = "container.memory.usage" + ContainerMemoryUsageUnit = "By" + ContainerMemoryUsageDescription = "Memory usage of the container." + + // ContainerDiskIo is the metric conforming to the "container.disk.io" semantic + // conventions. It represents the disk bytes for the container. + // Instrument: counter + // Unit: By + // Stability: Experimental + ContainerDiskIoName = "container.disk.io" + ContainerDiskIoUnit = "By" + ContainerDiskIoDescription = "Disk bytes for the container." + + // ContainerNetworkIo is the metric conforming to the "container.network.io" + // semantic conventions. It represents the network bytes for the container. + // Instrument: counter + // Unit: By + // Stability: Experimental + ContainerNetworkIoName = "container.network.io" + ContainerNetworkIoUnit = "By" + ContainerNetworkIoDescription = "Network bytes for the container." + + // DBClientOperationDuration is the metric conforming to the + // "db.client.operation.duration" semantic conventions. It represents the + // duration of database client operations. + // Instrument: histogram + // Unit: s + // Stability: Experimental + DBClientOperationDurationName = "db.client.operation.duration" + DBClientOperationDurationUnit = "s" + DBClientOperationDurationDescription = "Duration of database client operations." + + // DBClientConnectionCount is the metric conforming to the + // "db.client.connection.count" semantic conventions. It represents the number + // of connections that are currently in state described by the `state` + // attribute. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionCountName = "db.client.connection.count" + DBClientConnectionCountUnit = "{connection}" + DBClientConnectionCountDescription = "The number of connections that are currently in state described by the `state` attribute" + + // DBClientConnectionIdleMax is the metric conforming to the + // "db.client.connection.idle.max" semantic conventions. It represents the + // maximum number of idle open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionIdleMaxName = "db.client.connection.idle.max" + DBClientConnectionIdleMaxUnit = "{connection}" + DBClientConnectionIdleMaxDescription = "The maximum number of idle open connections allowed" + + // DBClientConnectionIdleMin is the metric conforming to the + // "db.client.connection.idle.min" semantic conventions. It represents the + // minimum number of idle open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionIdleMinName = "db.client.connection.idle.min" + DBClientConnectionIdleMinUnit = "{connection}" + DBClientConnectionIdleMinDescription = "The minimum number of idle open connections allowed" + + // DBClientConnectionMax is the metric conforming to the + // "db.client.connection.max" semantic conventions. It represents the maximum + // number of open connections allowed. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionMaxName = "db.client.connection.max" + DBClientConnectionMaxUnit = "{connection}" + DBClientConnectionMaxDescription = "The maximum number of open connections allowed" + + // DBClientConnectionPendingRequests is the metric conforming to the + // "db.client.connection.pending_requests" semantic conventions. It represents + // the number of pending requests for an open connection, cumulative for the + // entire pool. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + DBClientConnectionPendingRequestsName = "db.client.connection.pending_requests" + DBClientConnectionPendingRequestsUnit = "{request}" + DBClientConnectionPendingRequestsDescription = "The number of pending requests for an open connection, cumulative for the entire pool" + + // DBClientConnectionTimeouts is the metric conforming to the + // "db.client.connection.timeouts" semantic conventions. It represents the + // number of connection timeouts that have occurred trying to obtain a + // connection from the pool. + // Instrument: counter + // Unit: {timeout} + // Stability: Experimental + DBClientConnectionTimeoutsName = "db.client.connection.timeouts" + DBClientConnectionTimeoutsUnit = "{timeout}" + DBClientConnectionTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" + + // DBClientConnectionCreateTime is the metric conforming to the + // "db.client.connection.create_time" semantic conventions. It represents the + // time it took to create a new connection. + // Instrument: histogram + // Unit: s + // Stability: Experimental + DBClientConnectionCreateTimeName = "db.client.connection.create_time" + DBClientConnectionCreateTimeUnit = "s" + DBClientConnectionCreateTimeDescription = "The time it took to create a new connection" + + // DBClientConnectionWaitTime is the metric conforming to the + // "db.client.connection.wait_time" semantic conventions. It represents the + // time it took to obtain an open connection from the pool. + // Instrument: histogram + // Unit: s + // Stability: Experimental + DBClientConnectionWaitTimeName = "db.client.connection.wait_time" + DBClientConnectionWaitTimeUnit = "s" + DBClientConnectionWaitTimeDescription = "The time it took to obtain an open connection from the pool" + + // DBClientConnectionUseTime is the metric conforming to the + // "db.client.connection.use_time" semantic conventions. It represents the time + // between borrowing a connection and returning it to the pool. + // Instrument: histogram + // Unit: s + // Stability: Experimental + DBClientConnectionUseTimeName = "db.client.connection.use_time" + DBClientConnectionUseTimeUnit = "s" + DBClientConnectionUseTimeDescription = "The time between borrowing a connection and returning it to the pool" + + // DBClientConnectionsUsage is the metric conforming to the + // "db.client.connections.usage" semantic conventions. It represents the + // deprecated, use `db.client.connection.count` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsUsageName = "db.client.connections.usage" + DBClientConnectionsUsageUnit = "{connection}" + DBClientConnectionsUsageDescription = "Deprecated, use `db.client.connection.count` instead." + + // DBClientConnectionsIdleMax is the metric conforming to the + // "db.client.connections.idle.max" semantic conventions. It represents the + // deprecated, use `db.client.connection.idle.max` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" + DBClientConnectionsIdleMaxUnit = "{connection}" + DBClientConnectionsIdleMaxDescription = "Deprecated, use `db.client.connection.idle.max` instead." + + // DBClientConnectionsIdleMin is the metric conforming to the + // "db.client.connections.idle.min" semantic conventions. It represents the + // deprecated, use `db.client.connection.idle.min` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsIdleMinName = "db.client.connections.idle.min" + DBClientConnectionsIdleMinUnit = "{connection}" + DBClientConnectionsIdleMinDescription = "Deprecated, use `db.client.connection.idle.min` instead." + + // DBClientConnectionsMax is the metric conforming to the + // "db.client.connections.max" semantic conventions. It represents the + // deprecated, use `db.client.connection.max` instead. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + DBClientConnectionsMaxName = "db.client.connections.max" + DBClientConnectionsMaxUnit = "{connection}" + DBClientConnectionsMaxDescription = "Deprecated, use `db.client.connection.max` instead." + + // DBClientConnectionsPendingRequests is the metric conforming to the + // "db.client.connections.pending_requests" semantic conventions. It represents + // the deprecated, use `db.client.connection.pending_requests` instead. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" + DBClientConnectionsPendingRequestsUnit = "{request}" + DBClientConnectionsPendingRequestsDescription = "Deprecated, use `db.client.connection.pending_requests` instead." + + // DBClientConnectionsTimeouts is the metric conforming to the + // "db.client.connections.timeouts" semantic conventions. It represents the + // deprecated, use `db.client.connection.timeouts` instead. + // Instrument: counter + // Unit: {timeout} + // Stability: Experimental + DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" + DBClientConnectionsTimeoutsUnit = "{timeout}" + DBClientConnectionsTimeoutsDescription = "Deprecated, use `db.client.connection.timeouts` instead." + + // DBClientConnectionsCreateTime is the metric conforming to the + // "db.client.connections.create_time" semantic conventions. It represents the + // deprecated, use `db.client.connection.create_time` instead. Note: the unit + // also changed from `ms` to `s`. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + DBClientConnectionsCreateTimeName = "db.client.connections.create_time" + DBClientConnectionsCreateTimeUnit = "ms" + DBClientConnectionsCreateTimeDescription = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`." + + // DBClientConnectionsWaitTime is the metric conforming to the + // "db.client.connections.wait_time" semantic conventions. It represents the + // deprecated, use `db.client.connection.wait_time` instead. Note: the unit + // also changed from `ms` to `s`. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" + DBClientConnectionsWaitTimeUnit = "ms" + DBClientConnectionsWaitTimeDescription = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`." + + // DBClientConnectionsUseTime is the metric conforming to the + // "db.client.connections.use_time" semantic conventions. It represents the + // deprecated, use `db.client.connection.use_time` instead. Note: the unit also + // changed from `ms` to `s`. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + DBClientConnectionsUseTimeName = "db.client.connections.use_time" + DBClientConnectionsUseTimeUnit = "ms" + DBClientConnectionsUseTimeDescription = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`." + + // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" + // semantic conventions. It represents the measures the time taken to perform a + // DNS lookup. + // Instrument: histogram + // Unit: s + // Stability: Experimental + DNSLookupDurationName = "dns.lookup.duration" + DNSLookupDurationUnit = "s" + DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." + + // AspnetcoreRoutingMatchAttempts is the metric conforming to the + // "aspnetcore.routing.match_attempts" semantic conventions. It represents the + // number of requests that were attempted to be matched to an endpoint. + // Instrument: counter + // Unit: {match_attempt} + // Stability: Stable + AspnetcoreRoutingMatchAttemptsName = "aspnetcore.routing.match_attempts" + AspnetcoreRoutingMatchAttemptsUnit = "{match_attempt}" + AspnetcoreRoutingMatchAttemptsDescription = "Number of requests that were attempted to be matched to an endpoint." + + // AspnetcoreDiagnosticsExceptions is the metric conforming to the + // "aspnetcore.diagnostics.exceptions" semantic conventions. It represents the + // number of exceptions caught by exception handling middleware. + // Instrument: counter + // Unit: {exception} + // Stability: Stable + AspnetcoreDiagnosticsExceptionsName = "aspnetcore.diagnostics.exceptions" + AspnetcoreDiagnosticsExceptionsUnit = "{exception}" + AspnetcoreDiagnosticsExceptionsDescription = "Number of exceptions caught by exception handling middleware." + + // AspnetcoreRateLimitingActiveRequestLeases is the metric conforming to the + // "aspnetcore.rate_limiting.active_request_leases" semantic conventions. It + // represents the number of requests that are currently active on the server + // that hold a rate limiting lease. + // Instrument: updowncounter + // Unit: {request} + // Stability: Stable + AspnetcoreRateLimitingActiveRequestLeasesName = "aspnetcore.rate_limiting.active_request_leases" + AspnetcoreRateLimitingActiveRequestLeasesUnit = "{request}" + AspnetcoreRateLimitingActiveRequestLeasesDescription = "Number of requests that are currently active on the server that hold a rate limiting lease." + + // AspnetcoreRateLimitingRequestLeaseDuration is the metric conforming to the + // "aspnetcore.rate_limiting.request_lease.duration" semantic conventions. It + // represents the duration of rate limiting lease held by requests on the + // server. + // Instrument: histogram + // Unit: s + // Stability: Stable + AspnetcoreRateLimitingRequestLeaseDurationName = "aspnetcore.rate_limiting.request_lease.duration" + AspnetcoreRateLimitingRequestLeaseDurationUnit = "s" + AspnetcoreRateLimitingRequestLeaseDurationDescription = "The duration of rate limiting lease held by requests on the server." + + // AspnetcoreRateLimitingRequestTimeInQueue is the metric conforming to the + // "aspnetcore.rate_limiting.request.time_in_queue" semantic conventions. It + // represents the time the request spent in a queue waiting to acquire a rate + // limiting lease. + // Instrument: histogram + // Unit: s + // Stability: Stable + AspnetcoreRateLimitingRequestTimeInQueueName = "aspnetcore.rate_limiting.request.time_in_queue" + AspnetcoreRateLimitingRequestTimeInQueueUnit = "s" + AspnetcoreRateLimitingRequestTimeInQueueDescription = "The time the request spent in a queue waiting to acquire a rate limiting lease." + + // AspnetcoreRateLimitingQueuedRequests is the metric conforming to the + // "aspnetcore.rate_limiting.queued_requests" semantic conventions. It + // represents the number of requests that are currently queued, waiting to + // acquire a rate limiting lease. + // Instrument: updowncounter + // Unit: {request} + // Stability: Stable + AspnetcoreRateLimitingQueuedRequestsName = "aspnetcore.rate_limiting.queued_requests" + AspnetcoreRateLimitingQueuedRequestsUnit = "{request}" + AspnetcoreRateLimitingQueuedRequestsDescription = "Number of requests that are currently queued, waiting to acquire a rate limiting lease." + + // AspnetcoreRateLimitingRequests is the metric conforming to the + // "aspnetcore.rate_limiting.requests" semantic conventions. It represents the + // number of requests that tried to acquire a rate limiting lease. + // Instrument: counter + // Unit: {request} + // Stability: Stable + AspnetcoreRateLimitingRequestsName = "aspnetcore.rate_limiting.requests" + AspnetcoreRateLimitingRequestsUnit = "{request}" + AspnetcoreRateLimitingRequestsDescription = "Number of requests that tried to acquire a rate limiting lease." + + // KestrelActiveConnections is the metric conforming to the + // "kestrel.active_connections" semantic conventions. It represents the number + // of connections that are currently active on the server. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Stable + KestrelActiveConnectionsName = "kestrel.active_connections" + KestrelActiveConnectionsUnit = "{connection}" + KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." + + // KestrelConnectionDuration is the metric conforming to the + // "kestrel.connection.duration" semantic conventions. It represents the + // duration of connections on the server. + // Instrument: histogram + // Unit: s + // Stability: Stable + KestrelConnectionDurationName = "kestrel.connection.duration" + KestrelConnectionDurationUnit = "s" + KestrelConnectionDurationDescription = "The duration of connections on the server." + + // KestrelRejectedConnections is the metric conforming to the + // "kestrel.rejected_connections" semantic conventions. It represents the + // number of connections rejected by the server. + // Instrument: counter + // Unit: {connection} + // Stability: Stable + KestrelRejectedConnectionsName = "kestrel.rejected_connections" + KestrelRejectedConnectionsUnit = "{connection}" + KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." + + // KestrelQueuedConnections is the metric conforming to the + // "kestrel.queued_connections" semantic conventions. It represents the number + // of connections that are currently queued and are waiting to start. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Stable + KestrelQueuedConnectionsName = "kestrel.queued_connections" + KestrelQueuedConnectionsUnit = "{connection}" + KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." + + // KestrelQueuedRequests is the metric conforming to the + // "kestrel.queued_requests" semantic conventions. It represents the number of + // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are + // currently queued and are waiting to start. + // Instrument: updowncounter + // Unit: {request} + // Stability: Stable + KestrelQueuedRequestsName = "kestrel.queued_requests" + KestrelQueuedRequestsUnit = "{request}" + KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." + + // KestrelUpgradedConnections is the metric conforming to the + // "kestrel.upgraded_connections" semantic conventions. It represents the + // number of connections that are currently upgraded (WebSockets). . + // Instrument: updowncounter + // Unit: {connection} + // Stability: Stable + KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" + KestrelUpgradedConnectionsUnit = "{connection}" + KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." + + // KestrelTLSHandshakeDuration is the metric conforming to the + // "kestrel.tls_handshake.duration" semantic conventions. It represents the + // duration of TLS handshakes on the server. + // Instrument: histogram + // Unit: s + // Stability: Stable + KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" + KestrelTLSHandshakeDurationUnit = "s" + KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." + + // KestrelActiveTLSHandshakes is the metric conforming to the + // "kestrel.active_tls_handshakes" semantic conventions. It represents the + // number of TLS handshakes that are currently in progress on the server. + // Instrument: updowncounter + // Unit: {handshake} + // Stability: Stable + KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" + KestrelActiveTLSHandshakesUnit = "{handshake}" + KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." + + // SignalrServerConnectionDuration is the metric conforming to the + // "signalr.server.connection.duration" semantic conventions. It represents the + // duration of connections on the server. + // Instrument: histogram + // Unit: s + // Stability: Stable + SignalrServerConnectionDurationName = "signalr.server.connection.duration" + SignalrServerConnectionDurationUnit = "s" + SignalrServerConnectionDurationDescription = "The duration of connections on the server." + + // SignalrServerActiveConnections is the metric conforming to the + // "signalr.server.active_connections" semantic conventions. It represents the + // number of connections that are currently active on the server. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Stable + SignalrServerActiveConnectionsName = "signalr.server.active_connections" + SignalrServerActiveConnectionsUnit = "{connection}" + SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." + + // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" + // semantic conventions. It represents the measures the duration of the + // function's logic execution. + // Instrument: histogram + // Unit: s + // Stability: Experimental + FaaSInvokeDurationName = "faas.invoke_duration" + FaaSInvokeDurationUnit = "s" + FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" + + // FaaSInitDuration is the metric conforming to the "faas.init_duration" + // semantic conventions. It represents the measures the duration of the + // function's initialization, such as a cold start. + // Instrument: histogram + // Unit: s + // Stability: Experimental + FaaSInitDurationName = "faas.init_duration" + FaaSInitDurationUnit = "s" + FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" + + // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic + // conventions. It represents the number of invocation cold starts. + // Instrument: counter + // Unit: {coldstart} + // Stability: Experimental + FaaSColdstartsName = "faas.coldstarts" + FaaSColdstartsUnit = "{coldstart}" + FaaSColdstartsDescription = "Number of invocation cold starts" + + // FaaSErrors is the metric conforming to the "faas.errors" semantic + // conventions. It represents the number of invocation errors. + // Instrument: counter + // Unit: {error} + // Stability: Experimental + FaaSErrorsName = "faas.errors" + FaaSErrorsUnit = "{error}" + FaaSErrorsDescription = "Number of invocation errors" + + // FaaSInvocations is the metric conforming to the "faas.invocations" semantic + // conventions. It represents the number of successful invocations. + // Instrument: counter + // Unit: {invocation} + // Stability: Experimental + FaaSInvocationsName = "faas.invocations" + FaaSInvocationsUnit = "{invocation}" + FaaSInvocationsDescription = "Number of successful invocations" + + // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic + // conventions. It represents the number of invocation timeouts. + // Instrument: counter + // Unit: {timeout} + // Stability: Experimental + FaaSTimeoutsName = "faas.timeouts" + FaaSTimeoutsUnit = "{timeout}" + FaaSTimeoutsDescription = "Number of invocation timeouts" + + // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic + // conventions. It represents the distribution of max memory usage per + // invocation. + // Instrument: histogram + // Unit: By + // Stability: Experimental + FaaSMemUsageName = "faas.mem_usage" + FaaSMemUsageUnit = "By" + FaaSMemUsageDescription = "Distribution of max memory usage per invocation" + + // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic + // conventions. It represents the distribution of CPU usage per invocation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + FaaSCPUUsageName = "faas.cpu_usage" + FaaSCPUUsageUnit = "s" + FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" + + // FaaSNetIo is the metric conforming to the "faas.net_io" semantic + // conventions. It represents the distribution of net I/O usage per invocation. + // Instrument: histogram + // Unit: By + // Stability: Experimental + FaaSNetIoName = "faas.net_io" + FaaSNetIoUnit = "By" + FaaSNetIoDescription = "Distribution of net I/O usage per invocation" + + // HTTPServerRequestDuration is the metric conforming to the + // "http.server.request.duration" semantic conventions. It represents the + // duration of HTTP server requests. + // Instrument: histogram + // Unit: s + // Stability: Stable + HTTPServerRequestDurationName = "http.server.request.duration" + HTTPServerRequestDurationUnit = "s" + HTTPServerRequestDurationDescription = "Duration of HTTP server requests." + + // HTTPServerActiveRequests is the metric conforming to the + // "http.server.active_requests" semantic conventions. It represents the number + // of active HTTP server requests. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + HTTPServerActiveRequestsName = "http.server.active_requests" + HTTPServerActiveRequestsUnit = "{request}" + HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." + + // HTTPServerRequestBodySize is the metric conforming to the + // "http.server.request.body.size" semantic conventions. It represents the size + // of HTTP server request bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPServerRequestBodySizeName = "http.server.request.body.size" + HTTPServerRequestBodySizeUnit = "By" + HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." + + // HTTPServerResponseBodySize is the metric conforming to the + // "http.server.response.body.size" semantic conventions. It represents the + // size of HTTP server response bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPServerResponseBodySizeName = "http.server.response.body.size" + HTTPServerResponseBodySizeUnit = "By" + HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." + + // HTTPClientRequestDuration is the metric conforming to the + // "http.client.request.duration" semantic conventions. It represents the + // duration of HTTP client requests. + // Instrument: histogram + // Unit: s + // Stability: Stable + HTTPClientRequestDurationName = "http.client.request.duration" + HTTPClientRequestDurationUnit = "s" + HTTPClientRequestDurationDescription = "Duration of HTTP client requests." + + // HTTPClientRequestBodySize is the metric conforming to the + // "http.client.request.body.size" semantic conventions. It represents the size + // of HTTP client request bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPClientRequestBodySizeName = "http.client.request.body.size" + HTTPClientRequestBodySizeUnit = "By" + HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." + + // HTTPClientResponseBodySize is the metric conforming to the + // "http.client.response.body.size" semantic conventions. It represents the + // size of HTTP client response bodies. + // Instrument: histogram + // Unit: By + // Stability: Experimental + HTTPClientResponseBodySizeName = "http.client.response.body.size" + HTTPClientResponseBodySizeUnit = "By" + HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." + + // HTTPClientOpenConnections is the metric conforming to the + // "http.client.open_connections" semantic conventions. It represents the + // number of outbound HTTP connections that are currently active or idle on the + // client. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + HTTPClientOpenConnectionsName = "http.client.open_connections" + HTTPClientOpenConnectionsUnit = "{connection}" + HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." + + // HTTPClientConnectionDuration is the metric conforming to the + // "http.client.connection.duration" semantic conventions. It represents the + // duration of the successfully established outbound HTTP connections. + // Instrument: histogram + // Unit: s + // Stability: Experimental + HTTPClientConnectionDurationName = "http.client.connection.duration" + HTTPClientConnectionDurationUnit = "s" + HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." + + // HTTPClientActiveRequests is the metric conforming to the + // "http.client.active_requests" semantic conventions. It represents the number + // of active HTTP requests. + // Instrument: updowncounter + // Unit: {request} + // Stability: Experimental + HTTPClientActiveRequestsName = "http.client.active_requests" + HTTPClientActiveRequestsUnit = "{request}" + HTTPClientActiveRequestsDescription = "Number of active HTTP requests." + + // JvmMemoryInit is the metric conforming to the "jvm.memory.init" semantic + // conventions. It represents the measure of initial memory requested. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + JvmMemoryInitName = "jvm.memory.init" + JvmMemoryInitUnit = "By" + JvmMemoryInitDescription = "Measure of initial memory requested." + + // JvmSystemCPUUtilization is the metric conforming to the + // "jvm.system.cpu.utilization" semantic conventions. It represents the recent + // CPU utilization for the whole system as reported by the JVM. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + JvmSystemCPUUtilizationName = "jvm.system.cpu.utilization" + JvmSystemCPUUtilizationUnit = "1" + JvmSystemCPUUtilizationDescription = "Recent CPU utilization for the whole system as reported by the JVM." + + // JvmSystemCPULoad1m is the metric conforming to the "jvm.system.cpu.load_1m" + // semantic conventions. It represents the average CPU load of the whole system + // for the last minute as reported by the JVM. + // Instrument: gauge + // Unit: {run_queue_item} + // Stability: Experimental + JvmSystemCPULoad1mName = "jvm.system.cpu.load_1m" + JvmSystemCPULoad1mUnit = "{run_queue_item}" + JvmSystemCPULoad1mDescription = "Average CPU load of the whole system for the last minute as reported by the JVM." + + // JvmBufferMemoryUsage is the metric conforming to the + // "jvm.buffer.memory.usage" semantic conventions. It represents the measure of + // memory used by buffers. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + JvmBufferMemoryUsageName = "jvm.buffer.memory.usage" + JvmBufferMemoryUsageUnit = "By" + JvmBufferMemoryUsageDescription = "Measure of memory used by buffers." + + // JvmBufferMemoryLimit is the metric conforming to the + // "jvm.buffer.memory.limit" semantic conventions. It represents the measure of + // total memory capacity of buffers. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + JvmBufferMemoryLimitName = "jvm.buffer.memory.limit" + JvmBufferMemoryLimitUnit = "By" + JvmBufferMemoryLimitDescription = "Measure of total memory capacity of buffers." + + // JvmBufferCount is the metric conforming to the "jvm.buffer.count" semantic + // conventions. It represents the number of buffers in the pool. + // Instrument: updowncounter + // Unit: {buffer} + // Stability: Experimental + JvmBufferCountName = "jvm.buffer.count" + JvmBufferCountUnit = "{buffer}" + JvmBufferCountDescription = "Number of buffers in the pool." + + // JvmMemoryUsed is the metric conforming to the "jvm.memory.used" semantic + // conventions. It represents the measure of memory used. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryUsedName = "jvm.memory.used" + JvmMemoryUsedUnit = "By" + JvmMemoryUsedDescription = "Measure of memory used." + + // JvmMemoryCommitted is the metric conforming to the "jvm.memory.committed" + // semantic conventions. It represents the measure of memory committed. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryCommittedName = "jvm.memory.committed" + JvmMemoryCommittedUnit = "By" + JvmMemoryCommittedDescription = "Measure of memory committed." + + // JvmMemoryLimit is the metric conforming to the "jvm.memory.limit" semantic + // conventions. It represents the measure of max obtainable memory. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryLimitName = "jvm.memory.limit" + JvmMemoryLimitUnit = "By" + JvmMemoryLimitDescription = "Measure of max obtainable memory." + + // JvmMemoryUsedAfterLastGc is the metric conforming to the + // "jvm.memory.used_after_last_gc" semantic conventions. It represents the + // measure of memory used, as measured after the most recent garbage collection + // event on this pool. + // Instrument: updowncounter + // Unit: By + // Stability: Stable + JvmMemoryUsedAfterLastGcName = "jvm.memory.used_after_last_gc" + JvmMemoryUsedAfterLastGcUnit = "By" + JvmMemoryUsedAfterLastGcDescription = "Measure of memory used, as measured after the most recent garbage collection event on this pool." + + // JvmGcDuration is the metric conforming to the "jvm.gc.duration" semantic + // conventions. It represents the duration of JVM garbage collection actions. + // Instrument: histogram + // Unit: s + // Stability: Stable + JvmGcDurationName = "jvm.gc.duration" + JvmGcDurationUnit = "s" + JvmGcDurationDescription = "Duration of JVM garbage collection actions." + + // JvmThreadCount is the metric conforming to the "jvm.thread.count" semantic + // conventions. It represents the number of executing platform threads. + // Instrument: updowncounter + // Unit: {thread} + // Stability: Stable + JvmThreadCountName = "jvm.thread.count" + JvmThreadCountUnit = "{thread}" + JvmThreadCountDescription = "Number of executing platform threads." + + // JvmClassLoaded is the metric conforming to the "jvm.class.loaded" semantic + // conventions. It represents the number of classes loaded since JVM start. + // Instrument: counter + // Unit: {class} + // Stability: Stable + JvmClassLoadedName = "jvm.class.loaded" + JvmClassLoadedUnit = "{class}" + JvmClassLoadedDescription = "Number of classes loaded since JVM start." + + // JvmClassUnloaded is the metric conforming to the "jvm.class.unloaded" + // semantic conventions. It represents the number of classes unloaded since JVM + // start. + // Instrument: counter + // Unit: {class} + // Stability: Stable + JvmClassUnloadedName = "jvm.class.unloaded" + JvmClassUnloadedUnit = "{class}" + JvmClassUnloadedDescription = "Number of classes unloaded since JVM start." + + // JvmClassCount is the metric conforming to the "jvm.class.count" semantic + // conventions. It represents the number of classes currently loaded. + // Instrument: updowncounter + // Unit: {class} + // Stability: Stable + JvmClassCountName = "jvm.class.count" + JvmClassCountUnit = "{class}" + JvmClassCountDescription = "Number of classes currently loaded." + + // JvmCPUCount is the metric conforming to the "jvm.cpu.count" semantic + // conventions. It represents the number of processors available to the Java + // virtual machine. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: Stable + JvmCPUCountName = "jvm.cpu.count" + JvmCPUCountUnit = "{cpu}" + JvmCPUCountDescription = "Number of processors available to the Java virtual machine." + + // JvmCPUTime is the metric conforming to the "jvm.cpu.time" semantic + // conventions. It represents the cPU time used by the process as reported by + // the JVM. + // Instrument: counter + // Unit: s + // Stability: Stable + JvmCPUTimeName = "jvm.cpu.time" + JvmCPUTimeUnit = "s" + JvmCPUTimeDescription = "CPU time used by the process as reported by the JVM." + + // JvmCPURecentUtilization is the metric conforming to the + // "jvm.cpu.recent_utilization" semantic conventions. It represents the recent + // CPU utilization for the process as reported by the JVM. + // Instrument: gauge + // Unit: 1 + // Stability: Stable + JvmCPURecentUtilizationName = "jvm.cpu.recent_utilization" + JvmCPURecentUtilizationUnit = "1" + JvmCPURecentUtilizationDescription = "Recent CPU utilization for the process as reported by the JVM." + + // MessagingPublishDuration is the metric conforming to the + // "messaging.publish.duration" semantic conventions. It represents the + // measures the duration of publish operation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + MessagingPublishDurationName = "messaging.publish.duration" + MessagingPublishDurationUnit = "s" + MessagingPublishDurationDescription = "Measures the duration of publish operation." + + // MessagingReceiveDuration is the metric conforming to the + // "messaging.receive.duration" semantic conventions. It represents the + // measures the duration of receive operation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + MessagingReceiveDurationName = "messaging.receive.duration" + MessagingReceiveDurationUnit = "s" + MessagingReceiveDurationDescription = "Measures the duration of receive operation." + + // MessagingProcessDuration is the metric conforming to the + // "messaging.process.duration" semantic conventions. It represents the + // measures the duration of process operation. + // Instrument: histogram + // Unit: s + // Stability: Experimental + MessagingProcessDurationName = "messaging.process.duration" + MessagingProcessDurationUnit = "s" + MessagingProcessDurationDescription = "Measures the duration of process operation." + + // MessagingPublishMessages is the metric conforming to the + // "messaging.publish.messages" semantic conventions. It represents the + // measures the number of published messages. + // Instrument: counter + // Unit: {message} + // Stability: Experimental + MessagingPublishMessagesName = "messaging.publish.messages" + MessagingPublishMessagesUnit = "{message}" + MessagingPublishMessagesDescription = "Measures the number of published messages." + + // MessagingReceiveMessages is the metric conforming to the + // "messaging.receive.messages" semantic conventions. It represents the + // measures the number of received messages. + // Instrument: counter + // Unit: {message} + // Stability: Experimental + MessagingReceiveMessagesName = "messaging.receive.messages" + MessagingReceiveMessagesUnit = "{message}" + MessagingReceiveMessagesDescription = "Measures the number of received messages." + + // MessagingProcessMessages is the metric conforming to the + // "messaging.process.messages" semantic conventions. It represents the + // measures the number of processed messages. + // Instrument: counter + // Unit: {message} + // Stability: Experimental + MessagingProcessMessagesName = "messaging.process.messages" + MessagingProcessMessagesUnit = "{message}" + MessagingProcessMessagesDescription = "Measures the number of processed messages." + + // ProcessCPUTime is the metric conforming to the "process.cpu.time" semantic + // conventions. It represents the total CPU seconds broken down by different + // states. + // Instrument: counter + // Unit: s + // Stability: Experimental + ProcessCPUTimeName = "process.cpu.time" + ProcessCPUTimeUnit = "s" + ProcessCPUTimeDescription = "Total CPU seconds broken down by different states." + + // ProcessCPUUtilization is the metric conforming to the + // "process.cpu.utilization" semantic conventions. It represents the difference + // in process.cpu.time since the last measurement, divided by the elapsed time + // and number of CPUs available to the process. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + ProcessCPUUtilizationName = "process.cpu.utilization" + ProcessCPUUtilizationUnit = "1" + ProcessCPUUtilizationDescription = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process." + + // ProcessMemoryUsage is the metric conforming to the "process.memory.usage" + // semantic conventions. It represents the amount of physical memory in use. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + ProcessMemoryUsageName = "process.memory.usage" + ProcessMemoryUsageUnit = "By" + ProcessMemoryUsageDescription = "The amount of physical memory in use." + + // ProcessMemoryVirtual is the metric conforming to the + // "process.memory.virtual" semantic conventions. It represents the amount of + // committed virtual memory. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + ProcessMemoryVirtualName = "process.memory.virtual" + ProcessMemoryVirtualUnit = "By" + ProcessMemoryVirtualDescription = "The amount of committed virtual memory." + + // ProcessDiskIo is the metric conforming to the "process.disk.io" semantic + // conventions. It represents the disk bytes transferred. + // Instrument: counter + // Unit: By + // Stability: Experimental + ProcessDiskIoName = "process.disk.io" + ProcessDiskIoUnit = "By" + ProcessDiskIoDescription = "Disk bytes transferred." + + // ProcessNetworkIo is the metric conforming to the "process.network.io" + // semantic conventions. It represents the network bytes transferred. + // Instrument: counter + // Unit: By + // Stability: Experimental + ProcessNetworkIoName = "process.network.io" + ProcessNetworkIoUnit = "By" + ProcessNetworkIoDescription = "Network bytes transferred." + + // ProcessThreadCount is the metric conforming to the "process.thread.count" + // semantic conventions. It represents the process threads count. + // Instrument: updowncounter + // Unit: {thread} + // Stability: Experimental + ProcessThreadCountName = "process.thread.count" + ProcessThreadCountUnit = "{thread}" + ProcessThreadCountDescription = "Process threads count." + + // ProcessOpenFileDescriptorCount is the metric conforming to the + // "process.open_file_descriptor.count" semantic conventions. It represents the + // number of file descriptors in use by the process. + // Instrument: updowncounter + // Unit: {count} + // Stability: Experimental + ProcessOpenFileDescriptorCountName = "process.open_file_descriptor.count" + ProcessOpenFileDescriptorCountUnit = "{count}" + ProcessOpenFileDescriptorCountDescription = "Number of file descriptors in use by the process." + + // ProcessContextSwitches is the metric conforming to the + // "process.context_switches" semantic conventions. It represents the number of + // times the process has been context switched. + // Instrument: counter + // Unit: {count} + // Stability: Experimental + ProcessContextSwitchesName = "process.context_switches" + ProcessContextSwitchesUnit = "{count}" + ProcessContextSwitchesDescription = "Number of times the process has been context switched." + + // ProcessPagingFaults is the metric conforming to the "process.paging.faults" + // semantic conventions. It represents the number of page faults the process + // has made. + // Instrument: counter + // Unit: {fault} + // Stability: Experimental + ProcessPagingFaultsName = "process.paging.faults" + ProcessPagingFaultsUnit = "{fault}" + ProcessPagingFaultsDescription = "Number of page faults the process has made." + + // RPCServerDuration is the metric conforming to the "rpc.server.duration" + // semantic conventions. It represents the measures the duration of inbound + // RPC. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + RPCServerDurationName = "rpc.server.duration" + RPCServerDurationUnit = "ms" + RPCServerDurationDescription = "Measures the duration of inbound RPC." + + // RPCServerRequestSize is the metric conforming to the + // "rpc.server.request.size" semantic conventions. It represents the measures + // the size of RPC request messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCServerRequestSizeName = "rpc.server.request.size" + RPCServerRequestSizeUnit = "By" + RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." + + // RPCServerResponseSize is the metric conforming to the + // "rpc.server.response.size" semantic conventions. It represents the measures + // the size of RPC response messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCServerResponseSizeName = "rpc.server.response.size" + RPCServerResponseSizeUnit = "By" + RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." + + // RPCServerRequestsPerRPC is the metric conforming to the + // "rpc.server.requests_per_rpc" semantic conventions. It represents the + // measures the number of messages received per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" + RPCServerRequestsPerRPCUnit = "{count}" + RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." + + // RPCServerResponsesPerRPC is the metric conforming to the + // "rpc.server.responses_per_rpc" semantic conventions. It represents the + // measures the number of messages sent per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" + RPCServerResponsesPerRPCUnit = "{count}" + RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." + + // RPCClientDuration is the metric conforming to the "rpc.client.duration" + // semantic conventions. It represents the measures the duration of outbound + // RPC. + // Instrument: histogram + // Unit: ms + // Stability: Experimental + RPCClientDurationName = "rpc.client.duration" + RPCClientDurationUnit = "ms" + RPCClientDurationDescription = "Measures the duration of outbound RPC." + + // RPCClientRequestSize is the metric conforming to the + // "rpc.client.request.size" semantic conventions. It represents the measures + // the size of RPC request messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCClientRequestSizeName = "rpc.client.request.size" + RPCClientRequestSizeUnit = "By" + RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." + + // RPCClientResponseSize is the metric conforming to the + // "rpc.client.response.size" semantic conventions. It represents the measures + // the size of RPC response messages (uncompressed). + // Instrument: histogram + // Unit: By + // Stability: Experimental + RPCClientResponseSizeName = "rpc.client.response.size" + RPCClientResponseSizeUnit = "By" + RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." + + // RPCClientRequestsPerRPC is the metric conforming to the + // "rpc.client.requests_per_rpc" semantic conventions. It represents the + // measures the number of messages received per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" + RPCClientRequestsPerRPCUnit = "{count}" + RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." + + // RPCClientResponsesPerRPC is the metric conforming to the + // "rpc.client.responses_per_rpc" semantic conventions. It represents the + // measures the number of messages sent per RPC. + // Instrument: histogram + // Unit: {count} + // Stability: Experimental + RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" + RPCClientResponsesPerRPCUnit = "{count}" + RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." + + // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic + // conventions. It represents the seconds each logical CPU spent on each mode. + // Instrument: counter + // Unit: s + // Stability: Experimental + SystemCPUTimeName = "system.cpu.time" + SystemCPUTimeUnit = "s" + SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" + + // SystemCPUUtilization is the metric conforming to the + // "system.cpu.utilization" semantic conventions. It represents the difference + // in system.cpu.time since the last measurement, divided by the elapsed time + // and number of logical CPUs. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + SystemCPUUtilizationName = "system.cpu.utilization" + SystemCPUUtilizationUnit = "1" + SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" + + // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" + // semantic conventions. It represents the reports the current frequency of the + // CPU in Hz. + // Instrument: gauge + // Unit: {Hz} + // Stability: Experimental + SystemCPUFrequencyName = "system.cpu.frequency" + SystemCPUFrequencyUnit = "{Hz}" + SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" + + // SystemCPUPhysicalCount is the metric conforming to the + // "system.cpu.physical.count" semantic conventions. It represents the reports + // the number of actual physical processor cores on the hardware. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: Experimental + SystemCPUPhysicalCountName = "system.cpu.physical.count" + SystemCPUPhysicalCountUnit = "{cpu}" + SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" + + // SystemCPULogicalCount is the metric conforming to the + // "system.cpu.logical.count" semantic conventions. It represents the reports + // the number of logical (virtual) processor cores created by the operating + // system to manage multitasking. + // Instrument: updowncounter + // Unit: {cpu} + // Stability: Experimental + SystemCPULogicalCountName = "system.cpu.logical.count" + SystemCPULogicalCountUnit = "{cpu}" + SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" + + // SystemMemoryUsage is the metric conforming to the "system.memory.usage" + // semantic conventions. It represents the reports memory in use by state. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemMemoryUsageName = "system.memory.usage" + SystemMemoryUsageUnit = "By" + SystemMemoryUsageDescription = "Reports memory in use by state." + + // SystemMemoryLimit is the metric conforming to the "system.memory.limit" + // semantic conventions. It represents the total memory available in the + // system. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemMemoryLimitName = "system.memory.limit" + SystemMemoryLimitUnit = "By" + SystemMemoryLimitDescription = "Total memory available in the system." + + // SystemMemoryShared is the metric conforming to the "system.memory.shared" + // semantic conventions. It represents the shared memory used (mostly by + // tmpfs). + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemMemorySharedName = "system.memory.shared" + SystemMemorySharedUnit = "By" + SystemMemorySharedDescription = "Shared memory used (mostly by tmpfs)." + + // SystemMemoryUtilization is the metric conforming to the + // "system.memory.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemMemoryUtilizationName = "system.memory.utilization" + SystemMemoryUtilizationUnit = "1" + + // SystemPagingUsage is the metric conforming to the "system.paging.usage" + // semantic conventions. It represents the unix swap or windows pagefile usage. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemPagingUsageName = "system.paging.usage" + SystemPagingUsageUnit = "By" + SystemPagingUsageDescription = "Unix swap or windows pagefile usage" + + // SystemPagingUtilization is the metric conforming to the + // "system.paging.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingUtilizationName = "system.paging.utilization" + SystemPagingUtilizationUnit = "1" + + // SystemPagingFaults is the metric conforming to the "system.paging.faults" + // semantic conventions. + // Instrument: counter + // Unit: {fault} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingFaultsName = "system.paging.faults" + SystemPagingFaultsUnit = "{fault}" + + // SystemPagingOperations is the metric conforming to the + // "system.paging.operations" semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemPagingOperationsName = "system.paging.operations" + SystemPagingOperationsUnit = "{operation}" + + // SystemDiskIo is the metric conforming to the "system.disk.io" semantic + // conventions. + // Instrument: counter + // Unit: By + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskIoName = "system.disk.io" + SystemDiskIoUnit = "By" + + // SystemDiskOperations is the metric conforming to the + // "system.disk.operations" semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskOperationsName = "system.disk.operations" + SystemDiskOperationsUnit = "{operation}" + + // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" + // semantic conventions. It represents the time disk spent activated. + // Instrument: counter + // Unit: s + // Stability: Experimental + SystemDiskIoTimeName = "system.disk.io_time" + SystemDiskIoTimeUnit = "s" + SystemDiskIoTimeDescription = "Time disk spent activated" + + // SystemDiskOperationTime is the metric conforming to the + // "system.disk.operation_time" semantic conventions. It represents the sum of + // the time each operation took to complete. + // Instrument: counter + // Unit: s + // Stability: Experimental + SystemDiskOperationTimeName = "system.disk.operation_time" + SystemDiskOperationTimeUnit = "s" + SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" + + // SystemDiskMerged is the metric conforming to the "system.disk.merged" + // semantic conventions. + // Instrument: counter + // Unit: {operation} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemDiskMergedName = "system.disk.merged" + SystemDiskMergedUnit = "{operation}" + + // SystemFilesystemUsage is the metric conforming to the + // "system.filesystem.usage" semantic conventions. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemFilesystemUsageName = "system.filesystem.usage" + SystemFilesystemUsageUnit = "By" + + // SystemFilesystemUtilization is the metric conforming to the + // "system.filesystem.utilization" semantic conventions. + // Instrument: gauge + // Unit: 1 + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemFilesystemUtilizationName = "system.filesystem.utilization" + SystemFilesystemUtilizationUnit = "1" + + // SystemNetworkDropped is the metric conforming to the + // "system.network.dropped" semantic conventions. It represents the count of + // packets that are dropped or discarded even though there was no error. + // Instrument: counter + // Unit: {packet} + // Stability: Experimental + SystemNetworkDroppedName = "system.network.dropped" + SystemNetworkDroppedUnit = "{packet}" + SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" + + // SystemNetworkPackets is the metric conforming to the + // "system.network.packets" semantic conventions. + // Instrument: counter + // Unit: {packet} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkPacketsName = "system.network.packets" + SystemNetworkPacketsUnit = "{packet}" + + // SystemNetworkErrors is the metric conforming to the "system.network.errors" + // semantic conventions. It represents the count of network errors detected. + // Instrument: counter + // Unit: {error} + // Stability: Experimental + SystemNetworkErrorsName = "system.network.errors" + SystemNetworkErrorsUnit = "{error}" + SystemNetworkErrorsDescription = "Count of network errors detected" + + // SystemNetworkIo is the metric conforming to the "system.network.io" semantic + // conventions. + // Instrument: counter + // Unit: By + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkIoName = "system.network.io" + SystemNetworkIoUnit = "By" + + // SystemNetworkConnections is the metric conforming to the + // "system.network.connections" semantic conventions. + // Instrument: updowncounter + // Unit: {connection} + // Stability: Experimental + // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. + SystemNetworkConnectionsName = "system.network.connections" + SystemNetworkConnectionsUnit = "{connection}" + + // SystemProcessCount is the metric conforming to the "system.process.count" + // semantic conventions. It represents the total number of processes in each + // state. + // Instrument: updowncounter + // Unit: {process} + // Stability: Experimental + SystemProcessCountName = "system.process.count" + SystemProcessCountUnit = "{process}" + SystemProcessCountDescription = "Total number of processes in each state" + + // SystemProcessCreated is the metric conforming to the + // "system.process.created" semantic conventions. It represents the total + // number of processes created over uptime of the host. + // Instrument: counter + // Unit: {process} + // Stability: Experimental + SystemProcessCreatedName = "system.process.created" + SystemProcessCreatedUnit = "{process}" + SystemProcessCreatedDescription = "Total number of processes created over uptime of the host" + + // SystemLinuxMemoryAvailable is the metric conforming to the + // "system.linux.memory.available" semantic conventions. It represents an + // estimate of how much memory is available for starting new applications, + // without causing swapping. + // Instrument: updowncounter + // Unit: By + // Stability: Experimental + SystemLinuxMemoryAvailableName = "system.linux.memory.available" + SystemLinuxMemoryAvailableUnit = "By" + SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" +) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go new file mode 100644 index 000000000..4c87c7adc --- /dev/null +++ b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go @@ -0,0 +1,9 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" + +// SchemaURL is the schema URL that matches the version of the semantic conventions +// that this package defines. Semconv packages starting from v1.4.0 must declare +// non-empty schema URL in the form https://opentelemetry.io/schemas/ +const SchemaURL = "https://opentelemetry.io/schemas/1.26.0" diff --git a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go index 1dfa52c52..64a4f1b36 100644 --- a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go +++ b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go @@ -67,11 +67,13 @@ func (t Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) span = Span{sc: sc} } else { // No parent, return a No-Op span with an empty span context. - span = Span{} + span = noopSpanInstance } return trace.ContextWithSpan(ctx, span), span } +var noopSpanInstance trace.Span = Span{} + // Span is an OpenTelemetry No-Op Span. type Span struct { embedded.Span diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go index 102f2f508..ab2896052 100644 --- a/vendor/go.opentelemetry.io/otel/version.go +++ b/vendor/go.opentelemetry.io/otel/version.go @@ -5,5 +5,5 @@ package otel // import "go.opentelemetry.io/otel" // Version is the current release version of OpenTelemetry in use. func Version() string { - return "1.27.0" + return "1.28.0" } diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml index 60985f436..241cfc82a 100644 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ b/vendor/go.opentelemetry.io/otel/versions.yaml @@ -3,7 +3,7 @@ module-sets: stable-v1: - version: v1.27.0 + version: v1.28.0 modules: - go.opentelemetry.io/otel - go.opentelemetry.io/otel/bridge/opencensus @@ -29,12 +29,12 @@ module-sets: - go.opentelemetry.io/otel/sdk/metric - go.opentelemetry.io/otel/trace experimental-metrics: - version: v0.49.0 + version: v0.50.0 modules: - go.opentelemetry.io/otel/example/prometheus - go.opentelemetry.io/otel/exporters/prometheus experimental-logs: - version: v0.3.0 + version: v0.4.0 modules: - go.opentelemetry.io/otel/log - go.opentelemetry.io/otel/sdk/log diff --git a/vendor/golang.org/x/crypto/sha3/hashes.go b/vendor/golang.org/x/crypto/sha3/hashes.go index 0d8043fd2..5eae6cb92 100644 --- a/vendor/golang.org/x/crypto/sha3/hashes.go +++ b/vendor/golang.org/x/crypto/sha3/hashes.go @@ -16,39 +16,43 @@ import ( // Its generic security strength is 224 bits against preimage attacks, // and 112 bits against collision attacks. func New224() hash.Hash { - if h := new224Asm(); h != nil { - return h - } - return &state{rate: 144, outputLen: 28, dsbyte: 0x06} + return new224() } // New256 creates a new SHA3-256 hash. // Its generic security strength is 256 bits against preimage attacks, // and 128 bits against collision attacks. func New256() hash.Hash { - if h := new256Asm(); h != nil { - return h - } - return &state{rate: 136, outputLen: 32, dsbyte: 0x06} + return new256() } // New384 creates a new SHA3-384 hash. // Its generic security strength is 384 bits against preimage attacks, // and 192 bits against collision attacks. func New384() hash.Hash { - if h := new384Asm(); h != nil { - return h - } - return &state{rate: 104, outputLen: 48, dsbyte: 0x06} + return new384() } // New512 creates a new SHA3-512 hash. // Its generic security strength is 512 bits against preimage attacks, // and 256 bits against collision attacks. func New512() hash.Hash { - if h := new512Asm(); h != nil { - return h - } + return new512() +} + +func new224Generic() *state { + return &state{rate: 144, outputLen: 28, dsbyte: 0x06} +} + +func new256Generic() *state { + return &state{rate: 136, outputLen: 32, dsbyte: 0x06} +} + +func new384Generic() *state { + return &state{rate: 104, outputLen: 48, dsbyte: 0x06} +} + +func new512Generic() *state { return &state{rate: 72, outputLen: 64, dsbyte: 0x06} } diff --git a/vendor/golang.org/x/crypto/sha3/hashes_generic.go b/vendor/golang.org/x/crypto/sha3/hashes_generic.go deleted file mode 100644 index fe8c84793..000000000 --- a/vendor/golang.org/x/crypto/sha3/hashes_generic.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !gc || purego || !s390x - -package sha3 - -import ( - "hash" -) - -// new224Asm returns an assembly implementation of SHA3-224 if available, -// otherwise it returns nil. -func new224Asm() hash.Hash { return nil } - -// new256Asm returns an assembly implementation of SHA3-256 if available, -// otherwise it returns nil. -func new256Asm() hash.Hash { return nil } - -// new384Asm returns an assembly implementation of SHA3-384 if available, -// otherwise it returns nil. -func new384Asm() hash.Hash { return nil } - -// new512Asm returns an assembly implementation of SHA3-512 if available, -// otherwise it returns nil. -func new512Asm() hash.Hash { return nil } diff --git a/vendor/golang.org/x/crypto/sha3/hashes_noasm.go b/vendor/golang.org/x/crypto/sha3/hashes_noasm.go new file mode 100644 index 000000000..9d85fb621 --- /dev/null +++ b/vendor/golang.org/x/crypto/sha3/hashes_noasm.go @@ -0,0 +1,23 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !gc || purego || !s390x + +package sha3 + +func new224() *state { + return new224Generic() +} + +func new256() *state { + return new256Generic() +} + +func new384() *state { + return new384Generic() +} + +func new512() *state { + return new512Generic() +} diff --git a/vendor/golang.org/x/crypto/sha3/sha3.go b/vendor/golang.org/x/crypto/sha3/sha3.go index 4884d172a..afedde5ab 100644 --- a/vendor/golang.org/x/crypto/sha3/sha3.go +++ b/vendor/golang.org/x/crypto/sha3/sha3.go @@ -23,7 +23,6 @@ const ( type state struct { // Generic sponge components. a [25]uint64 // main state of the hash - buf []byte // points into storage rate int // the number of bytes of state to use // dsbyte contains the "domain separation" bits and the first bit of @@ -40,7 +39,8 @@ type state struct { // Extendable-Output Functions (May 2014)" dsbyte byte - storage storageBuf + i, n int // storage[i:n] is the buffer, i is only used while squeezing + storage [maxRate]byte // Specific to SHA-3 and SHAKE. outputLen int // the default output size in bytes @@ -54,24 +54,18 @@ func (d *state) BlockSize() int { return d.rate } func (d *state) Size() int { return d.outputLen } // Reset clears the internal state by zeroing the sponge state and -// the byte buffer, and setting Sponge.state to absorbing. +// the buffer indexes, and setting Sponge.state to absorbing. func (d *state) Reset() { // Zero the permutation's state. for i := range d.a { d.a[i] = 0 } d.state = spongeAbsorbing - d.buf = d.storage.asBytes()[:0] + d.i, d.n = 0, 0 } func (d *state) clone() *state { ret := *d - if ret.state == spongeAbsorbing { - ret.buf = ret.storage.asBytes()[:len(ret.buf)] - } else { - ret.buf = ret.storage.asBytes()[d.rate-cap(d.buf) : d.rate] - } - return &ret } @@ -82,43 +76,40 @@ func (d *state) permute() { case spongeAbsorbing: // If we're absorbing, we need to xor the input into the state // before applying the permutation. - xorIn(d, d.buf) - d.buf = d.storage.asBytes()[:0] + xorIn(d, d.storage[:d.rate]) + d.n = 0 keccakF1600(&d.a) case spongeSqueezing: // If we're squeezing, we need to apply the permutation before // copying more output. keccakF1600(&d.a) - d.buf = d.storage.asBytes()[:d.rate] - copyOut(d, d.buf) + d.i = 0 + copyOut(d, d.storage[:d.rate]) } } // pads appends the domain separation bits in dsbyte, applies // the multi-bitrate 10..1 padding rule, and permutes the state. -func (d *state) padAndPermute(dsbyte byte) { - if d.buf == nil { - d.buf = d.storage.asBytes()[:0] - } +func (d *state) padAndPermute() { // Pad with this instance's domain-separator bits. We know that there's // at least one byte of space in d.buf because, if it were full, // permute would have been called to empty it. dsbyte also contains the // first one bit for the padding. See the comment in the state struct. - d.buf = append(d.buf, dsbyte) - zerosStart := len(d.buf) - d.buf = d.storage.asBytes()[:d.rate] - for i := zerosStart; i < d.rate; i++ { - d.buf[i] = 0 + d.storage[d.n] = d.dsbyte + d.n++ + for d.n < d.rate { + d.storage[d.n] = 0 + d.n++ } // This adds the final one bit for the padding. Because of the way that // bits are numbered from the LSB upwards, the final bit is the MSB of // the last byte. - d.buf[d.rate-1] ^= 0x80 + d.storage[d.rate-1] ^= 0x80 // Apply the permutation d.permute() d.state = spongeSqueezing - d.buf = d.storage.asBytes()[:d.rate] - copyOut(d, d.buf) + d.n = d.rate + copyOut(d, d.storage[:d.rate]) } // Write absorbs more data into the hash's state. It panics if any @@ -127,28 +118,25 @@ func (d *state) Write(p []byte) (written int, err error) { if d.state != spongeAbsorbing { panic("sha3: Write after Read") } - if d.buf == nil { - d.buf = d.storage.asBytes()[:0] - } written = len(p) for len(p) > 0 { - if len(d.buf) == 0 && len(p) >= d.rate { + if d.n == 0 && len(p) >= d.rate { // The fast path; absorb a full "rate" bytes of input and apply the permutation. xorIn(d, p[:d.rate]) p = p[d.rate:] keccakF1600(&d.a) } else { // The slow path; buffer the input until we can fill the sponge, and then xor it in. - todo := d.rate - len(d.buf) + todo := d.rate - d.n if todo > len(p) { todo = len(p) } - d.buf = append(d.buf, p[:todo]...) + d.n += copy(d.storage[d.n:], p[:todo]) p = p[todo:] // If the sponge is full, apply the permutation. - if len(d.buf) == d.rate { + if d.n == d.rate { d.permute() } } @@ -161,19 +149,19 @@ func (d *state) Write(p []byte) (written int, err error) { func (d *state) Read(out []byte) (n int, err error) { // If we're still absorbing, pad and apply the permutation. if d.state == spongeAbsorbing { - d.padAndPermute(d.dsbyte) + d.padAndPermute() } n = len(out) // Now, do the squeezing. for len(out) > 0 { - n := copy(out, d.buf) - d.buf = d.buf[n:] + n := copy(out, d.storage[d.i:d.n]) + d.i += n out = out[n:] // Apply the permutation if we've squeezed the sponge dry. - if len(d.buf) == 0 { + if d.i == d.rate { d.permute() } } diff --git a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go index b4fbbf869..00d8034ae 100644 --- a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go +++ b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go @@ -248,56 +248,56 @@ func (s *asmState) Clone() ShakeHash { return s.clone() } -// new224Asm returns an assembly implementation of SHA3-224 if available, -// otherwise it returns nil. -func new224Asm() hash.Hash { +// new224 returns an assembly implementation of SHA3-224 if available, +// otherwise it returns a generic implementation. +func new224() hash.Hash { if cpu.S390X.HasSHA3 { return newAsmState(sha3_224) } - return nil + return new224Generic() } -// new256Asm returns an assembly implementation of SHA3-256 if available, -// otherwise it returns nil. -func new256Asm() hash.Hash { +// new256 returns an assembly implementation of SHA3-256 if available, +// otherwise it returns a generic implementation. +func new256() hash.Hash { if cpu.S390X.HasSHA3 { return newAsmState(sha3_256) } - return nil + return new256Generic() } -// new384Asm returns an assembly implementation of SHA3-384 if available, -// otherwise it returns nil. -func new384Asm() hash.Hash { +// new384 returns an assembly implementation of SHA3-384 if available, +// otherwise it returns a generic implementation. +func new384() hash.Hash { if cpu.S390X.HasSHA3 { return newAsmState(sha3_384) } - return nil + return new384Generic() } -// new512Asm returns an assembly implementation of SHA3-512 if available, -// otherwise it returns nil. -func new512Asm() hash.Hash { +// new512 returns an assembly implementation of SHA3-512 if available, +// otherwise it returns a generic implementation. +func new512() hash.Hash { if cpu.S390X.HasSHA3 { return newAsmState(sha3_512) } - return nil + return new512Generic() } -// newShake128Asm returns an assembly implementation of SHAKE-128 if available, -// otherwise it returns nil. -func newShake128Asm() ShakeHash { +// newShake128 returns an assembly implementation of SHAKE-128 if available, +// otherwise it returns a generic implementation. +func newShake128() ShakeHash { if cpu.S390X.HasSHA3 { return newAsmState(shake_128) } - return nil + return newShake128Generic() } -// newShake256Asm returns an assembly implementation of SHAKE-256 if available, -// otherwise it returns nil. -func newShake256Asm() ShakeHash { +// newShake256 returns an assembly implementation of SHAKE-256 if available, +// otherwise it returns a generic implementation. +func newShake256() ShakeHash { if cpu.S390X.HasSHA3 { return newAsmState(shake_256) } - return nil + return newShake256Generic() } diff --git a/vendor/golang.org/x/crypto/sha3/shake.go b/vendor/golang.org/x/crypto/sha3/shake.go index bb6998402..1ea9275b8 100644 --- a/vendor/golang.org/x/crypto/sha3/shake.go +++ b/vendor/golang.org/x/crypto/sha3/shake.go @@ -115,19 +115,21 @@ func (c *state) Clone() ShakeHash { // Its generic security strength is 128 bits against all attacks if at // least 32 bytes of its output are used. func NewShake128() ShakeHash { - if h := newShake128Asm(); h != nil { - return h - } - return &state{rate: rate128, outputLen: 32, dsbyte: dsbyteShake} + return newShake128() } // NewShake256 creates a new SHAKE256 variable-output-length ShakeHash. // Its generic security strength is 256 bits against all attacks if // at least 64 bytes of its output are used. func NewShake256() ShakeHash { - if h := newShake256Asm(); h != nil { - return h - } + return newShake256() +} + +func newShake128Generic() *state { + return &state{rate: rate128, outputLen: 32, dsbyte: dsbyteShake} +} + +func newShake256Generic() *state { return &state{rate: rate256, outputLen: 64, dsbyte: dsbyteShake} } diff --git a/vendor/golang.org/x/crypto/sha3/shake_generic.go b/vendor/golang.org/x/crypto/sha3/shake_generic.go deleted file mode 100644 index 8d31cf5be..000000000 --- a/vendor/golang.org/x/crypto/sha3/shake_generic.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !gc || purego || !s390x - -package sha3 - -// newShake128Asm returns an assembly implementation of SHAKE-128 if available, -// otherwise it returns nil. -func newShake128Asm() ShakeHash { - return nil -} - -// newShake256Asm returns an assembly implementation of SHAKE-256 if available, -// otherwise it returns nil. -func newShake256Asm() ShakeHash { - return nil -} diff --git a/vendor/golang.org/x/crypto/sha3/shake_noasm.go b/vendor/golang.org/x/crypto/sha3/shake_noasm.go new file mode 100644 index 000000000..4276ba4ab --- /dev/null +++ b/vendor/golang.org/x/crypto/sha3/shake_noasm.go @@ -0,0 +1,15 @@ +// Copyright 2023 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !gc || purego || !s390x + +package sha3 + +func newShake128() *state { + return newShake128Generic() +} + +func newShake256() *state { + return newShake256Generic() +} diff --git a/vendor/golang.org/x/crypto/sha3/xor.go b/vendor/golang.org/x/crypto/sha3/xor.go index 7337cca88..6ada5c957 100644 --- a/vendor/golang.org/x/crypto/sha3/xor.go +++ b/vendor/golang.org/x/crypto/sha3/xor.go @@ -2,22 +2,39 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (!amd64 && !386 && !ppc64le) || purego - package sha3 -// A storageBuf is an aligned array of maxRate bytes. -type storageBuf [maxRate]byte - -func (b *storageBuf) asBytes() *[maxRate]byte { - return (*[maxRate]byte)(b) -} +import ( + "crypto/subtle" + "encoding/binary" + "unsafe" -var ( - xorIn = xorInGeneric - copyOut = copyOutGeneric - xorInUnaligned = xorInGeneric - copyOutUnaligned = copyOutGeneric + "golang.org/x/sys/cpu" ) -const xorImplementationUnaligned = "generic" +// xorIn xors the bytes in buf into the state. +func xorIn(d *state, buf []byte) { + if cpu.IsBigEndian { + for i := 0; len(buf) >= 8; i++ { + a := binary.LittleEndian.Uint64(buf) + d.a[i] ^= a + buf = buf[8:] + } + } else { + ab := (*[25 * 64 / 8]byte)(unsafe.Pointer(&d.a)) + subtle.XORBytes(ab[:], ab[:], buf) + } +} + +// copyOut copies uint64s to a byte buffer. +func copyOut(d *state, b []byte) { + if cpu.IsBigEndian { + for i := 0; len(b) >= 8; i++ { + binary.LittleEndian.PutUint64(b, d.a[i]) + b = b[8:] + } + } else { + ab := (*[25 * 64 / 8]byte)(unsafe.Pointer(&d.a)) + copy(b, ab[:]) + } +} diff --git a/vendor/golang.org/x/crypto/sha3/xor_generic.go b/vendor/golang.org/x/crypto/sha3/xor_generic.go deleted file mode 100644 index 8d9477112..000000000 --- a/vendor/golang.org/x/crypto/sha3/xor_generic.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sha3 - -import "encoding/binary" - -// xorInGeneric xors the bytes in buf into the state; it -// makes no non-portable assumptions about memory layout -// or alignment. -func xorInGeneric(d *state, buf []byte) { - n := len(buf) / 8 - - for i := 0; i < n; i++ { - a := binary.LittleEndian.Uint64(buf) - d.a[i] ^= a - buf = buf[8:] - } -} - -// copyOutGeneric copies uint64s to a byte buffer. -func copyOutGeneric(d *state, b []byte) { - for i := 0; len(b) >= 8; i++ { - binary.LittleEndian.PutUint64(b, d.a[i]) - b = b[8:] - } -} diff --git a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go b/vendor/golang.org/x/crypto/sha3/xor_unaligned.go deleted file mode 100644 index 870e2d16e..000000000 --- a/vendor/golang.org/x/crypto/sha3/xor_unaligned.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2015 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build (amd64 || 386 || ppc64le) && !purego - -package sha3 - -import "unsafe" - -// A storageBuf is an aligned array of maxRate bytes. -type storageBuf [maxRate / 8]uint64 - -func (b *storageBuf) asBytes() *[maxRate]byte { - return (*[maxRate]byte)(unsafe.Pointer(b)) -} - -// xorInUnaligned uses unaligned reads and writes to update d.a to contain d.a -// XOR buf. -func xorInUnaligned(d *state, buf []byte) { - n := len(buf) - bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8] - if n >= 72 { - d.a[0] ^= bw[0] - d.a[1] ^= bw[1] - d.a[2] ^= bw[2] - d.a[3] ^= bw[3] - d.a[4] ^= bw[4] - d.a[5] ^= bw[5] - d.a[6] ^= bw[6] - d.a[7] ^= bw[7] - d.a[8] ^= bw[8] - } - if n >= 104 { - d.a[9] ^= bw[9] - d.a[10] ^= bw[10] - d.a[11] ^= bw[11] - d.a[12] ^= bw[12] - } - if n >= 136 { - d.a[13] ^= bw[13] - d.a[14] ^= bw[14] - d.a[15] ^= bw[15] - d.a[16] ^= bw[16] - } - if n >= 144 { - d.a[17] ^= bw[17] - } - if n >= 168 { - d.a[18] ^= bw[18] - d.a[19] ^= bw[19] - d.a[20] ^= bw[20] - } -} - -func copyOutUnaligned(d *state, buf []byte) { - ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0])) - copy(buf, ab[:]) -} - -var ( - xorIn = xorInUnaligned - copyOut = copyOutUnaligned -) - -const xorImplementationUnaligned = "unaligned" diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go index 6f2df2818..003e649f3 100644 --- a/vendor/golang.org/x/net/http2/http2.go +++ b/vendor/golang.org/x/net/http2/http2.go @@ -17,6 +17,7 @@ package http2 // import "golang.org/x/net/http2" import ( "bufio" + "context" "crypto/tls" "fmt" "io" @@ -26,6 +27,7 @@ import ( "strconv" "strings" "sync" + "time" "golang.org/x/net/http/httpguts" ) @@ -210,12 +212,6 @@ type stringWriter interface { WriteString(s string) (n int, err error) } -// A gate lets two goroutines coordinate their activities. -type gate chan struct{} - -func (g gate) Done() { g <- struct{}{} } -func (g gate) Wait() { <-g } - // A closeWaiter is like a sync.WaitGroup but only goes 1 to 0 (open to closed). type closeWaiter chan struct{} @@ -383,3 +379,14 @@ func validPseudoPath(v string) bool { // makes that struct also non-comparable, and generally doesn't add // any size (as long as it's first). type incomparable [0]func() + +// synctestGroupInterface is the methods of synctestGroup used by Server and Transport. +// It's defined as an interface here to let us keep synctestGroup entirely test-only +// and not a part of non-test builds. +type synctestGroupInterface interface { + Join() + Now() time.Time + NewTimer(d time.Duration) timer + AfterFunc(d time.Duration, f func()) timer + ContextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) +} diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go index c5d081081..6c349f3ec 100644 --- a/vendor/golang.org/x/net/http2/server.go +++ b/vendor/golang.org/x/net/http2/server.go @@ -154,6 +154,39 @@ type Server struct { // so that we don't embed a Mutex in this struct, which will make the // struct non-copyable, which might break some callers. state *serverInternalState + + // Synchronization group used for testing. + // Outside of tests, this is nil. + group synctestGroupInterface +} + +func (s *Server) markNewGoroutine() { + if s.group != nil { + s.group.Join() + } +} + +func (s *Server) now() time.Time { + if s.group != nil { + return s.group.Now() + } + return time.Now() +} + +// newTimer creates a new time.Timer, or a synthetic timer in tests. +func (s *Server) newTimer(d time.Duration) timer { + if s.group != nil { + return s.group.NewTimer(d) + } + return timeTimer{time.NewTimer(d)} +} + +// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. +func (s *Server) afterFunc(d time.Duration, f func()) timer { + if s.group != nil { + return s.group.AfterFunc(d, f) + } + return timeTimer{time.AfterFunc(d, f)} } func (s *Server) initialConnRecvWindowSize() int32 { @@ -400,6 +433,10 @@ func (o *ServeConnOpts) handler() http.Handler { // // The opts parameter is optional. If nil, default values are used. func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { + s.serveConn(c, opts, nil) +} + +func (s *Server) serveConn(c net.Conn, opts *ServeConnOpts, newf func(*serverConn)) { baseCtx, cancel := serverConnBaseContext(c, opts) defer cancel() @@ -426,6 +463,9 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) { pushEnabled: true, sawClientPreface: opts.SawClientPreface, } + if newf != nil { + newf(sc) + } s.state.registerConn(sc) defer s.state.unregisterConn(sc) @@ -599,8 +639,8 @@ type serverConn struct { inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop needToSendGoAway bool // we need to schedule a GOAWAY frame write goAwayCode ErrCode - shutdownTimer *time.Timer // nil until used - idleTimer *time.Timer // nil if unused + shutdownTimer timer // nil until used + idleTimer timer // nil if unused // Owned by the writeFrameAsync goroutine: headerWriteBuf bytes.Buffer @@ -649,12 +689,12 @@ type stream struct { flow outflow // limits writing from Handler to client inflow inflow // what the client is allowed to POST/etc to us state streamState - resetQueued bool // RST_STREAM queued for write; set by sc.resetStream - gotTrailerHeader bool // HEADER frame for trailers was seen - wroteHeaders bool // whether we wrote headers (not status 100) - readDeadline *time.Timer // nil if unused - writeDeadline *time.Timer // nil if unused - closeErr error // set before cw is closed + resetQueued bool // RST_STREAM queued for write; set by sc.resetStream + gotTrailerHeader bool // HEADER frame for trailers was seen + wroteHeaders bool // whether we wrote headers (not status 100) + readDeadline timer // nil if unused + writeDeadline timer // nil if unused + closeErr error // set before cw is closed trailer http.Header // accumulated trailers reqTrailer http.Header // handler's Request.Trailer @@ -811,8 +851,9 @@ type readFrameResult struct { // consumer is done with the frame. // It's run on its own goroutine. func (sc *serverConn) readFrames() { - gate := make(gate) - gateDone := gate.Done + sc.srv.markNewGoroutine() + gate := make(chan struct{}) + gateDone := func() { gate <- struct{}{} } for { f, err := sc.framer.ReadFrame() select { @@ -843,6 +884,7 @@ type frameWriteResult struct { // At most one goroutine can be running writeFrameAsync at a time per // serverConn. func (sc *serverConn) writeFrameAsync(wr FrameWriteRequest, wd *writeData) { + sc.srv.markNewGoroutine() var err error if wd == nil { err = wr.write.writeFrame(sc) @@ -922,13 +964,13 @@ func (sc *serverConn) serve() { sc.setConnState(http.StateIdle) if sc.srv.IdleTimeout > 0 { - sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) + sc.idleTimer = sc.srv.afterFunc(sc.srv.IdleTimeout, sc.onIdleTimer) defer sc.idleTimer.Stop() } go sc.readFrames() // closed by defer sc.conn.Close above - settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer) + settingsTimer := sc.srv.afterFunc(firstSettingsTimeout, sc.onSettingsTimer) defer settingsTimer.Stop() loopNum := 0 @@ -1057,10 +1099,10 @@ func (sc *serverConn) readPreface() error { errc <- nil } }() - timer := time.NewTimer(prefaceTimeout) // TODO: configurable on *Server? + timer := sc.srv.newTimer(prefaceTimeout) // TODO: configurable on *Server? defer timer.Stop() select { - case <-timer.C: + case <-timer.C(): return errPrefaceTimeout case err := <-errc: if err == nil { @@ -1425,7 +1467,7 @@ func (sc *serverConn) goAway(code ErrCode) { func (sc *serverConn) shutDownIn(d time.Duration) { sc.serveG.check() - sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer) + sc.shutdownTimer = sc.srv.afterFunc(d, sc.onShutdownTimer) } func (sc *serverConn) resetStream(se StreamError) { @@ -1639,7 +1681,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { delete(sc.streams, st.id) if len(sc.streams) == 0 { sc.setConnState(http.StateIdle) - if sc.srv.IdleTimeout > 0 { + if sc.srv.IdleTimeout > 0 && sc.idleTimer != nil { sc.idleTimer.Reset(sc.srv.IdleTimeout) } if h1ServerKeepAlivesDisabled(sc.hs) { @@ -1661,6 +1703,7 @@ func (sc *serverConn) closeStream(st *stream, err error) { } } st.closeErr = err + st.cancelCtx() st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc sc.writeSched.CloseStream(st.id) } @@ -2021,7 +2064,7 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error { // (in Go 1.8), though. That's a more sane option anyway. if sc.hs.ReadTimeout > 0 { sc.conn.SetReadDeadline(time.Time{}) - st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout) + st.readDeadline = sc.srv.afterFunc(sc.hs.ReadTimeout, st.onReadTimeout) } return sc.scheduleHandler(id, rw, req, handler) @@ -2119,7 +2162,7 @@ func (sc *serverConn) newStream(id, pusherID uint32, state streamState) *stream st.flow.add(sc.initialStreamSendWindowSize) st.inflow.init(sc.srv.initialStreamRecvWindowSize()) if sc.hs.WriteTimeout > 0 { - st.writeDeadline = time.AfterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) + st.writeDeadline = sc.srv.afterFunc(sc.hs.WriteTimeout, st.onWriteTimeout) } sc.streams[id] = st @@ -2343,6 +2386,7 @@ func (sc *serverConn) handlerDone() { // Run on its own goroutine. func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler func(http.ResponseWriter, *http.Request)) { + sc.srv.markNewGoroutine() defer sc.sendServeMsg(handlerDoneMsg) didPanic := true defer func() { @@ -2639,7 +2683,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) { var date string if _, ok := rws.snapHeader["Date"]; !ok { // TODO(bradfitz): be faster here, like net/http? measure. - date = time.Now().UTC().Format(http.TimeFormat) + date = rws.conn.srv.now().UTC().Format(http.TimeFormat) } for _, v := range rws.snapHeader["Trailer"] { @@ -2761,7 +2805,7 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() { func (w *responseWriter) SetReadDeadline(deadline time.Time) error { st := w.rws.stream - if !deadline.IsZero() && deadline.Before(time.Now()) { + if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) { // If we're setting a deadline in the past, reset the stream immediately // so writes after SetWriteDeadline returns will fail. st.onReadTimeout() @@ -2777,9 +2821,9 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error { if deadline.IsZero() { st.readDeadline = nil } else if st.readDeadline == nil { - st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout) + st.readDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onReadTimeout) } else { - st.readDeadline.Reset(deadline.Sub(time.Now())) + st.readDeadline.Reset(deadline.Sub(sc.srv.now())) } }) return nil @@ -2787,7 +2831,7 @@ func (w *responseWriter) SetReadDeadline(deadline time.Time) error { func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { st := w.rws.stream - if !deadline.IsZero() && deadline.Before(time.Now()) { + if !deadline.IsZero() && deadline.Before(w.rws.conn.srv.now()) { // If we're setting a deadline in the past, reset the stream immediately // so writes after SetWriteDeadline returns will fail. st.onWriteTimeout() @@ -2803,9 +2847,9 @@ func (w *responseWriter) SetWriteDeadline(deadline time.Time) error { if deadline.IsZero() { st.writeDeadline = nil } else if st.writeDeadline == nil { - st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout) + st.writeDeadline = sc.srv.afterFunc(deadline.Sub(sc.srv.now()), st.onWriteTimeout) } else { - st.writeDeadline.Reset(deadline.Sub(time.Now())) + st.writeDeadline.Reset(deadline.Sub(sc.srv.now())) } }) return nil diff --git a/vendor/golang.org/x/net/http2/testsync.go b/vendor/golang.org/x/net/http2/testsync.go deleted file mode 100644 index 61075bd16..000000000 --- a/vendor/golang.org/x/net/http2/testsync.go +++ /dev/null @@ -1,331 +0,0 @@ -// Copyright 2024 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. -package http2 - -import ( - "context" - "sync" - "time" -) - -// testSyncHooks coordinates goroutines in tests. -// -// For example, a call to ClientConn.RoundTrip involves several goroutines, including: -// - the goroutine running RoundTrip; -// - the clientStream.doRequest goroutine, which writes the request; and -// - the clientStream.readLoop goroutine, which reads the response. -// -// Using testSyncHooks, a test can start a RoundTrip and identify when all these goroutines -// are blocked waiting for some condition such as reading the Request.Body or waiting for -// flow control to become available. -// -// The testSyncHooks also manage timers and synthetic time in tests. -// This permits us to, for example, start a request and cause it to time out waiting for -// response headers without resorting to time.Sleep calls. -type testSyncHooks struct { - // active/inactive act as a mutex and condition variable. - // - // - neither chan contains a value: testSyncHooks is locked. - // - active contains a value: unlocked, and at least one goroutine is not blocked - // - inactive contains a value: unlocked, and all goroutines are blocked - active chan struct{} - inactive chan struct{} - - // goroutine counts - total int // total goroutines - condwait map[*sync.Cond]int // blocked in sync.Cond.Wait - blocked []*testBlockedGoroutine // otherwise blocked - - // fake time - now time.Time - timers []*fakeTimer - - // Transport testing: Report various events. - newclientconn func(*ClientConn) - newstream func(*clientStream) -} - -// testBlockedGoroutine is a blocked goroutine. -type testBlockedGoroutine struct { - f func() bool // blocked until f returns true - ch chan struct{} // closed when unblocked -} - -func newTestSyncHooks() *testSyncHooks { - h := &testSyncHooks{ - active: make(chan struct{}, 1), - inactive: make(chan struct{}, 1), - condwait: map[*sync.Cond]int{}, - } - h.inactive <- struct{}{} - h.now = time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC) - return h -} - -// lock acquires the testSyncHooks mutex. -func (h *testSyncHooks) lock() { - select { - case <-h.active: - case <-h.inactive: - } -} - -// waitInactive waits for all goroutines to become inactive. -func (h *testSyncHooks) waitInactive() { - for { - <-h.inactive - if !h.unlock() { - break - } - } -} - -// unlock releases the testSyncHooks mutex. -// It reports whether any goroutines are active. -func (h *testSyncHooks) unlock() (active bool) { - // Look for a blocked goroutine which can be unblocked. - blocked := h.blocked[:0] - unblocked := false - for _, b := range h.blocked { - if !unblocked && b.f() { - unblocked = true - close(b.ch) - } else { - blocked = append(blocked, b) - } - } - h.blocked = blocked - - // Count goroutines blocked on condition variables. - condwait := 0 - for _, count := range h.condwait { - condwait += count - } - - if h.total > condwait+len(blocked) { - h.active <- struct{}{} - return true - } else { - h.inactive <- struct{}{} - return false - } -} - -// goRun starts a new goroutine. -func (h *testSyncHooks) goRun(f func()) { - h.lock() - h.total++ - h.unlock() - go func() { - defer func() { - h.lock() - h.total-- - h.unlock() - }() - f() - }() -} - -// blockUntil indicates that a goroutine is blocked waiting for some condition to become true. -// It waits until f returns true before proceeding. -// -// Example usage: -// -// h.blockUntil(func() bool { -// // Is the context done yet? -// select { -// case <-ctx.Done(): -// default: -// return false -// } -// return true -// }) -// // Wait for the context to become done. -// <-ctx.Done() -// -// The function f passed to blockUntil must be non-blocking and idempotent. -func (h *testSyncHooks) blockUntil(f func() bool) { - if f() { - return - } - ch := make(chan struct{}) - h.lock() - h.blocked = append(h.blocked, &testBlockedGoroutine{ - f: f, - ch: ch, - }) - h.unlock() - <-ch -} - -// broadcast is sync.Cond.Broadcast. -func (h *testSyncHooks) condBroadcast(cond *sync.Cond) { - h.lock() - delete(h.condwait, cond) - h.unlock() - cond.Broadcast() -} - -// broadcast is sync.Cond.Wait. -func (h *testSyncHooks) condWait(cond *sync.Cond) { - h.lock() - h.condwait[cond]++ - h.unlock() -} - -// newTimer creates a new fake timer. -func (h *testSyncHooks) newTimer(d time.Duration) timer { - h.lock() - defer h.unlock() - t := &fakeTimer{ - hooks: h, - when: h.now.Add(d), - c: make(chan time.Time), - } - h.timers = append(h.timers, t) - return t -} - -// afterFunc creates a new fake AfterFunc timer. -func (h *testSyncHooks) afterFunc(d time.Duration, f func()) timer { - h.lock() - defer h.unlock() - t := &fakeTimer{ - hooks: h, - when: h.now.Add(d), - f: f, - } - h.timers = append(h.timers, t) - return t -} - -func (h *testSyncHooks) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { - ctx, cancel := context.WithCancel(ctx) - t := h.afterFunc(d, cancel) - return ctx, func() { - t.Stop() - cancel() - } -} - -func (h *testSyncHooks) timeUntilEvent() time.Duration { - h.lock() - defer h.unlock() - var next time.Time - for _, t := range h.timers { - if next.IsZero() || t.when.Before(next) { - next = t.when - } - } - if d := next.Sub(h.now); d > 0 { - return d - } - return 0 -} - -// advance advances time and causes synthetic timers to fire. -func (h *testSyncHooks) advance(d time.Duration) { - h.lock() - defer h.unlock() - h.now = h.now.Add(d) - timers := h.timers[:0] - for _, t := range h.timers { - t := t // remove after go.mod depends on go1.22 - t.mu.Lock() - switch { - case t.when.After(h.now): - timers = append(timers, t) - case t.when.IsZero(): - // stopped timer - default: - t.when = time.Time{} - if t.c != nil { - close(t.c) - } - if t.f != nil { - h.total++ - go func() { - defer func() { - h.lock() - h.total-- - h.unlock() - }() - t.f() - }() - } - } - t.mu.Unlock() - } - h.timers = timers -} - -// A timer wraps a time.Timer, or a synthetic equivalent in tests. -// Unlike time.Timer, timer is single-use: The timer channel is closed when the timer expires. -type timer interface { - C() <-chan time.Time - Stop() bool - Reset(d time.Duration) bool -} - -// timeTimer implements timer using real time. -type timeTimer struct { - t *time.Timer - c chan time.Time -} - -// newTimeTimer creates a new timer using real time. -func newTimeTimer(d time.Duration) timer { - ch := make(chan time.Time) - t := time.AfterFunc(d, func() { - close(ch) - }) - return &timeTimer{t, ch} -} - -// newTimeAfterFunc creates an AfterFunc timer using real time. -func newTimeAfterFunc(d time.Duration, f func()) timer { - return &timeTimer{ - t: time.AfterFunc(d, f), - } -} - -func (t timeTimer) C() <-chan time.Time { return t.c } -func (t timeTimer) Stop() bool { return t.t.Stop() } -func (t timeTimer) Reset(d time.Duration) bool { return t.t.Reset(d) } - -// fakeTimer implements timer using fake time. -type fakeTimer struct { - hooks *testSyncHooks - - mu sync.Mutex - when time.Time // when the timer will fire - c chan time.Time // closed when the timer fires; mutually exclusive with f - f func() // called when the timer fires; mutually exclusive with c -} - -func (t *fakeTimer) C() <-chan time.Time { return t.c } - -func (t *fakeTimer) Stop() bool { - t.mu.Lock() - defer t.mu.Unlock() - stopped := t.when.IsZero() - t.when = time.Time{} - return stopped -} - -func (t *fakeTimer) Reset(d time.Duration) bool { - if t.c != nil || t.f == nil { - panic("fakeTimer only supports Reset on AfterFunc timers") - } - t.mu.Lock() - defer t.mu.Unlock() - t.hooks.lock() - defer t.hooks.unlock() - active := !t.when.IsZero() - t.when = t.hooks.now.Add(d) - if !active { - t.hooks.timers = append(t.hooks.timers, t) - } - return active -} diff --git a/vendor/golang.org/x/net/http2/timer.go b/vendor/golang.org/x/net/http2/timer.go new file mode 100644 index 000000000..0b1c17b81 --- /dev/null +++ b/vendor/golang.org/x/net/http2/timer.go @@ -0,0 +1,20 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package http2 + +import "time" + +// A timer is a time.Timer, as an interface which can be replaced in tests. +type timer = interface { + C() <-chan time.Time + Reset(d time.Duration) bool + Stop() bool +} + +// timeTimer adapts a time.Timer to the timer interface. +type timeTimer struct { + *time.Timer +} + +func (t timeTimer) C() <-chan time.Time { return t.Timer.C } diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 2fa49490c..98a49c6b6 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -185,7 +185,45 @@ type Transport struct { connPoolOnce sync.Once connPoolOrDef ClientConnPool // non-nil version of ConnPool - syncHooks *testSyncHooks + *transportTestHooks +} + +// Hook points used for testing. +// Outside of tests, t.transportTestHooks is nil and these all have minimal implementations. +// Inside tests, see the testSyncHooks function docs. + +type transportTestHooks struct { + newclientconn func(*ClientConn) + group synctestGroupInterface +} + +func (t *Transport) markNewGoroutine() { + if t != nil && t.transportTestHooks != nil { + t.transportTestHooks.group.Join() + } +} + +// newTimer creates a new time.Timer, or a synthetic timer in tests. +func (t *Transport) newTimer(d time.Duration) timer { + if t.transportTestHooks != nil { + return t.transportTestHooks.group.NewTimer(d) + } + return timeTimer{time.NewTimer(d)} +} + +// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. +func (t *Transport) afterFunc(d time.Duration, f func()) timer { + if t.transportTestHooks != nil { + return t.transportTestHooks.group.AfterFunc(d, f) + } + return timeTimer{time.AfterFunc(d, f)} +} + +func (t *Transport) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { + if t.transportTestHooks != nil { + return t.transportTestHooks.group.ContextWithTimeout(ctx, d) + } + return context.WithTimeout(ctx, d) } func (t *Transport) maxHeaderListSize() uint32 { @@ -352,60 +390,6 @@ type ClientConn struct { werr error // first write error that has occurred hbuf bytes.Buffer // HPACK encoder writes into this henc *hpack.Encoder - - syncHooks *testSyncHooks // can be nil -} - -// Hook points used for testing. -// Outside of tests, cc.syncHooks is nil and these all have minimal implementations. -// Inside tests, see the testSyncHooks function docs. - -// goRun starts a new goroutine. -func (cc *ClientConn) goRun(f func()) { - if cc.syncHooks != nil { - cc.syncHooks.goRun(f) - return - } - go f() -} - -// condBroadcast is cc.cond.Broadcast. -func (cc *ClientConn) condBroadcast() { - if cc.syncHooks != nil { - cc.syncHooks.condBroadcast(cc.cond) - } - cc.cond.Broadcast() -} - -// condWait is cc.cond.Wait. -func (cc *ClientConn) condWait() { - if cc.syncHooks != nil { - cc.syncHooks.condWait(cc.cond) - } - cc.cond.Wait() -} - -// newTimer creates a new time.Timer, or a synthetic timer in tests. -func (cc *ClientConn) newTimer(d time.Duration) timer { - if cc.syncHooks != nil { - return cc.syncHooks.newTimer(d) - } - return newTimeTimer(d) -} - -// afterFunc creates a new time.AfterFunc timer, or a synthetic timer in tests. -func (cc *ClientConn) afterFunc(d time.Duration, f func()) timer { - if cc.syncHooks != nil { - return cc.syncHooks.afterFunc(d, f) - } - return newTimeAfterFunc(d, f) -} - -func (cc *ClientConn) contextWithTimeout(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { - if cc.syncHooks != nil { - return cc.syncHooks.contextWithTimeout(ctx, d) - } - return context.WithTimeout(ctx, d) } // clientStream is the state for a single HTTP/2 stream. One of these @@ -487,7 +471,7 @@ func (cs *clientStream) abortStreamLocked(err error) { // TODO(dneil): Clean up tests where cs.cc.cond is nil. if cs.cc.cond != nil { // Wake up writeRequestBody if it is waiting on flow control. - cs.cc.condBroadcast() + cs.cc.cond.Broadcast() } } @@ -497,7 +481,7 @@ func (cs *clientStream) abortRequestBodyWrite() { defer cc.mu.Unlock() if cs.reqBody != nil && cs.reqBodyClosed == nil { cs.closeReqBodyLocked() - cc.condBroadcast() + cc.cond.Broadcast() } } @@ -507,10 +491,11 @@ func (cs *clientStream) closeReqBodyLocked() { } cs.reqBodyClosed = make(chan struct{}) reqBodyClosed := cs.reqBodyClosed - cs.cc.goRun(func() { + go func() { + cs.cc.t.markNewGoroutine() cs.reqBody.Close() close(reqBodyClosed) - }) + }() } type stickyErrWriter struct { @@ -626,21 +611,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res backoff := float64(uint(1) << (uint(retry) - 1)) backoff += backoff * (0.1 * mathrand.Float64()) d := time.Second * time.Duration(backoff) - var tm timer - if t.syncHooks != nil { - tm = t.syncHooks.newTimer(d) - t.syncHooks.blockUntil(func() bool { - select { - case <-tm.C(): - case <-req.Context().Done(): - default: - return false - } - return true - }) - } else { - tm = newTimeTimer(d) - } + tm := t.newTimer(d) select { case <-tm.C(): t.vlogf("RoundTrip retrying after failure: %v", roundTripErr) @@ -725,8 +696,8 @@ func canRetryError(err error) bool { } func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse bool) (*ClientConn, error) { - if t.syncHooks != nil { - return t.newClientConn(nil, singleUse, t.syncHooks) + if t.transportTestHooks != nil { + return t.newClientConn(nil, singleUse) } host, _, err := net.SplitHostPort(addr) if err != nil { @@ -736,7 +707,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b if err != nil { return nil, err } - return t.newClientConn(tconn, singleUse, nil) + return t.newClientConn(tconn, singleUse) } func (t *Transport) newTLSConfig(host string) *tls.Config { @@ -802,10 +773,10 @@ func (t *Transport) maxEncoderHeaderTableSize() uint32 { } func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) { - return t.newClientConn(c, t.disableKeepAlives(), nil) + return t.newClientConn(c, t.disableKeepAlives()) } -func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHooks) (*ClientConn, error) { +func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) { cc := &ClientConn{ t: t, tconn: c, @@ -820,16 +791,12 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo wantSettingsAck: true, pings: make(map[[8]byte]chan struct{}), reqHeaderMu: make(chan struct{}, 1), - syncHooks: hooks, } - if hooks != nil { - hooks.newclientconn(cc) + if t.transportTestHooks != nil { + t.markNewGoroutine() + t.transportTestHooks.newclientconn(cc) c = cc.tconn } - if d := t.idleConnTimeout(); d != 0 { - cc.idleTimeout = d - cc.idleTimer = cc.afterFunc(d, cc.onIdleTimeout) - } if VerboseLogs { t.vlogf("http2: Transport creating client conn %p to %v", cc, c.RemoteAddr()) } @@ -893,7 +860,13 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool, hooks *testSyncHoo return nil, cc.werr } - cc.goRun(cc.readLoop) + // Start the idle timer after the connection is fully initialized. + if d := t.idleConnTimeout(); d != 0 { + cc.idleTimeout = d + cc.idleTimer = t.afterFunc(d, cc.onIdleTimeout) + } + + go cc.readLoop() return cc, nil } @@ -901,7 +874,7 @@ func (cc *ClientConn) healthCheck() { pingTimeout := cc.t.pingTimeout() // We don't need to periodically ping in the health check, because the readLoop of ClientConn will // trigger the healthCheck again if there is no frame received. - ctx, cancel := cc.contextWithTimeout(context.Background(), pingTimeout) + ctx, cancel := cc.t.contextWithTimeout(context.Background(), pingTimeout) defer cancel() cc.vlogf("http2: Transport sending health check") err := cc.Ping(ctx) @@ -1144,7 +1117,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { // Wait for all in-flight streams to complete or connection to close done := make(chan struct{}) cancelled := false // guarded by cc.mu - cc.goRun(func() { + go func() { + cc.t.markNewGoroutine() cc.mu.Lock() defer cc.mu.Unlock() for { @@ -1156,9 +1130,9 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { if cancelled { break } - cc.condWait() + cc.cond.Wait() } - }) + }() shutdownEnterWaitStateHook() select { case <-done: @@ -1168,7 +1142,7 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error { cc.mu.Lock() // Free the goroutine above cancelled = true - cc.condBroadcast() + cc.cond.Broadcast() cc.mu.Unlock() return ctx.Err() } @@ -1206,7 +1180,7 @@ func (cc *ClientConn) closeForError(err error) { for _, cs := range cc.streams { cs.abortStreamLocked(err) } - cc.condBroadcast() + cc.cond.Broadcast() cc.mu.Unlock() cc.closeConn() } @@ -1321,23 +1295,30 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) respHeaderRecv: make(chan struct{}), donec: make(chan struct{}), } - cc.goRun(func() { - cs.doRequest(req) - }) + + // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? + if !cc.t.disableCompression() && + req.Header.Get("Accept-Encoding") == "" && + req.Header.Get("Range") == "" && + !cs.isHead { + // Request gzip only, not deflate. Deflate is ambiguous and + // not as universally supported anyway. + // See: https://zlib.net/zlib_faq.html#faq39 + // + // Note that we don't request this for HEAD requests, + // due to a bug in nginx: + // http://trac.nginx.org/nginx/ticket/358 + // https://golang.org/issue/5522 + // + // We don't request gzip if the request is for a range, since + // auto-decoding a portion of a gzipped document will just fail + // anyway. See https://golang.org/issue/8923 + cs.requestedGzip = true + } + + go cs.doRequest(req, streamf) waitDone := func() error { - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-cs.donec: - case <-ctx.Done(): - case <-cs.reqCancel: - default: - return false - } - return true - }) - } select { case <-cs.donec: return nil @@ -1398,24 +1379,7 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) return err } - if streamf != nil { - streamf(cs) - } - for { - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-cs.respHeaderRecv: - case <-cs.abort: - case <-ctx.Done(): - case <-cs.reqCancel: - default: - return false - } - return true - }) - } select { case <-cs.respHeaderRecv: return handleResponseHeaders() @@ -1445,8 +1409,9 @@ func (cc *ClientConn) roundTrip(req *http.Request, streamf func(*clientStream)) // doRequest runs for the duration of the request lifetime. // // It sends the request and performs post-request cleanup (closing Request.Body, etc.). -func (cs *clientStream) doRequest(req *http.Request) { - err := cs.writeRequest(req) +func (cs *clientStream) doRequest(req *http.Request, streamf func(*clientStream)) { + cs.cc.t.markNewGoroutine() + err := cs.writeRequest(req, streamf) cs.cleanupWriteRequest(err) } @@ -1457,7 +1422,7 @@ func (cs *clientStream) doRequest(req *http.Request) { // // It returns non-nil if the request ends otherwise. // If the returned error is StreamError, the error Code may be used in resetting the stream. -func (cs *clientStream) writeRequest(req *http.Request) (err error) { +func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStream)) (err error) { cc := cs.cc ctx := cs.ctx @@ -1471,21 +1436,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { if cc.reqHeaderMu == nil { panic("RoundTrip on uninitialized ClientConn") // for tests } - var newStreamHook func(*clientStream) - if cc.syncHooks != nil { - newStreamHook = cc.syncHooks.newstream - cc.syncHooks.blockUntil(func() bool { - select { - case cc.reqHeaderMu <- struct{}{}: - <-cc.reqHeaderMu - case <-cs.reqCancel: - case <-ctx.Done(): - default: - return false - } - return true - }) - } select { case cc.reqHeaderMu <- struct{}{}: case <-cs.reqCancel: @@ -1510,28 +1460,8 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { } cc.mu.Unlock() - if newStreamHook != nil { - newStreamHook(cs) - } - - // TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere? - if !cc.t.disableCompression() && - req.Header.Get("Accept-Encoding") == "" && - req.Header.Get("Range") == "" && - !cs.isHead { - // Request gzip only, not deflate. Deflate is ambiguous and - // not as universally supported anyway. - // See: https://zlib.net/zlib_faq.html#faq39 - // - // Note that we don't request this for HEAD requests, - // due to a bug in nginx: - // http://trac.nginx.org/nginx/ticket/358 - // https://golang.org/issue/5522 - // - // We don't request gzip if the request is for a range, since - // auto-decoding a portion of a gzipped document will just fail - // anyway. See https://golang.org/issue/8923 - cs.requestedGzip = true + if streamf != nil { + streamf(cs) } continueTimeout := cc.t.expectContinueTimeout() @@ -1594,7 +1524,7 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { var respHeaderTimer <-chan time.Time var respHeaderRecv chan struct{} if d := cc.responseHeaderTimeout(); d != 0 { - timer := cc.newTimer(d) + timer := cc.t.newTimer(d) defer timer.Stop() respHeaderTimer = timer.C() respHeaderRecv = cs.respHeaderRecv @@ -1603,21 +1533,6 @@ func (cs *clientStream) writeRequest(req *http.Request) (err error) { // or until the request is aborted (via context, error, or otherwise), // whichever comes first. for { - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-cs.peerClosed: - case <-respHeaderTimer: - case <-respHeaderRecv: - case <-cs.abort: - case <-ctx.Done(): - case <-cs.reqCancel: - default: - return false - } - return true - }) - } select { case <-cs.peerClosed: return nil @@ -1766,7 +1681,7 @@ func (cc *ClientConn) awaitOpenSlotForStreamLocked(cs *clientStream) error { return nil } cc.pendingRequests++ - cc.condWait() + cc.cond.Wait() cc.pendingRequests-- select { case <-cs.abort: @@ -2028,7 +1943,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error) cs.flow.take(take) return take, nil } - cc.condWait() + cc.cond.Wait() } } @@ -2311,7 +2226,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) { } // Wake up writeRequestBody via clientStream.awaitFlowControl and // wake up RoundTrip if there is a pending request. - cc.condBroadcast() + cc.cond.Broadcast() closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 { @@ -2333,6 +2248,7 @@ type clientConnReadLoop struct { // readLoop runs in its own goroutine and reads and dispatches frames. func (cc *ClientConn) readLoop() { + cc.t.markNewGoroutine() rl := &clientConnReadLoop{cc: cc} defer rl.cleanup() cc.readerErr = rl.run() @@ -2399,7 +2315,7 @@ func (rl *clientConnReadLoop) cleanup() { cs.abortStreamLocked(err) } } - cc.condBroadcast() + cc.cond.Broadcast() cc.mu.Unlock() } @@ -2436,7 +2352,7 @@ func (rl *clientConnReadLoop) run() error { readIdleTimeout := cc.t.ReadIdleTimeout var t timer if readIdleTimeout != 0 { - t = cc.afterFunc(readIdleTimeout, cc.healthCheck) + t = cc.t.afterFunc(readIdleTimeout, cc.healthCheck) } for { f, err := cc.fr.ReadFrame() @@ -3034,7 +2950,7 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error { for _, cs := range cc.streams { cs.flow.add(delta) } - cc.condBroadcast() + cc.cond.Broadcast() cc.initialWindowSize = s.Val case SettingHeaderTableSize: @@ -3089,7 +3005,7 @@ func (rl *clientConnReadLoop) processWindowUpdate(f *WindowUpdateFrame) error { return ConnectionError(ErrCodeFlowControl) } - cc.condBroadcast() + cc.cond.Broadcast() return nil } @@ -3133,7 +3049,8 @@ func (cc *ClientConn) Ping(ctx context.Context) error { } var pingError error errc := make(chan struct{}) - cc.goRun(func() { + go func() { + cc.t.markNewGoroutine() cc.wmu.Lock() defer cc.wmu.Unlock() if pingError = cc.fr.WritePing(false, p); pingError != nil { @@ -3144,20 +3061,7 @@ func (cc *ClientConn) Ping(ctx context.Context) error { close(errc) return } - }) - if cc.syncHooks != nil { - cc.syncHooks.blockUntil(func() bool { - select { - case <-c: - case <-errc: - case <-ctx.Done(): - case <-cc.readerDone: - default: - return false - } - return true - }) - } + }() select { case <-c: return nil diff --git a/vendor/golang.org/x/net/http2/writesched_priority.go b/vendor/golang.org/x/net/http2/writesched_priority.go index 0a242c669..f6783339d 100644 --- a/vendor/golang.org/x/net/http2/writesched_priority.go +++ b/vendor/golang.org/x/net/http2/writesched_priority.go @@ -443,8 +443,8 @@ func (ws *priorityWriteScheduler) addClosedOrIdleNode(list *[]*priorityNode, max } func (ws *priorityWriteScheduler) removeNode(n *priorityNode) { - for k := n.kids; k != nil; k = k.next { - k.setParent(n.parent) + for n.kids != nil { + n.kids.setParent(n.parent) } n.setParent(nil) delete(ws.nodes, n.id) diff --git a/vendor/golang.org/x/net/proxy/per_host.go b/vendor/golang.org/x/net/proxy/per_host.go index 573fe79e8..d7d4b8b6e 100644 --- a/vendor/golang.org/x/net/proxy/per_host.go +++ b/vendor/golang.org/x/net/proxy/per_host.go @@ -137,9 +137,7 @@ func (p *PerHost) AddNetwork(net *net.IPNet) { // AddZone specifies a DNS suffix that will use the bypass proxy. A zone of // "example.com" matches "example.com" and all of its subdomains. func (p *PerHost) AddZone(zone string) { - if strings.HasSuffix(zone, ".") { - zone = zone[:len(zone)-1] - } + zone = strings.TrimSuffix(zone, ".") if !strings.HasPrefix(zone, ".") { zone = "." + zone } @@ -148,8 +146,6 @@ func (p *PerHost) AddZone(zone string) { // AddHost specifies a host name that will use the bypass proxy. func (p *PerHost) AddHost(host string) { - if strings.HasSuffix(host, ".") { - host = host[:len(host)-1] - } + host = strings.TrimSuffix(host, ".") p.bypassHosts = append(p.bypassHosts, host) } diff --git a/vendor/golang.org/x/net/publicsuffix/data/children b/vendor/golang.org/x/net/publicsuffix/data/children new file mode 100644 index 000000000..08261bffd Binary files /dev/null and b/vendor/golang.org/x/net/publicsuffix/data/children differ diff --git a/vendor/golang.org/x/net/publicsuffix/data/nodes b/vendor/golang.org/x/net/publicsuffix/data/nodes new file mode 100644 index 000000000..1dae6ede8 Binary files /dev/null and b/vendor/golang.org/x/net/publicsuffix/data/nodes differ diff --git a/vendor/golang.org/x/net/publicsuffix/data/text b/vendor/golang.org/x/net/publicsuffix/data/text new file mode 100644 index 000000000..7e516413f --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/data/text @@ -0,0 +1 @@ +birkenesoddtangentinglogoweirbitbucketrzynishikatakayamatta-varjjatjomembersaltdalovepopartysfjordiskussionsbereichatinhlfanishikatsuragitappassenger-associationishikawazukamiokameokamakurazakitaurayasudabitternidisrechtrainingloomy-routerbjarkoybjerkreimdbalsan-suedtirololitapunkapsienamsskoganeibmdeveloperauniteroirmemorialombardiadempresashibetsukumiyamagasakinderoyonagunicloudevelopmentaxiijimarriottayninhaccanthobby-siteval-d-aosta-valleyoriikaracolognebinatsukigataiwanumatajimidsundgcahcesuolocustomer-ocimperiautoscanalytics-gatewayonagoyaveroykenflfanpachihayaakasakawaiishopitsitemasekd1kappenginedre-eikerimo-siemenscaledekaascolipicenoboribetsucks3-eu-west-3utilities-16-balestrandabergentappsseekloges3-eu-west-123paginawebcamauction-acornfshostrodawaraktyubinskaunicommbank123kotisivultrobjectselinogradimo-i-rana4u2-localhostrolekanieruchomoscientistordal-o-g-i-nikolaevents3-ap-northeast-2-ddnsking123homepagefrontappchizip61123saitamakawababia-goracleaningheannakadomarineat-urlimanowarudakuneustarostwodzislawdev-myqnapcloudcontrolledgesuite-stagingdyniamusementdllclstagehirnikonantomobelementorayokosukanoyakumoliserniaurland-4-salernord-aurdalipaywhirlimiteddnslivelanddnss3-ap-south-123siteweberlevagangaviikanonji234lima-cityeats3-ap-southeast-123webseiteambulancechireadmyblogspotaribeiraogakicks-assurfakefurniturealmpmninoheguribigawaurskog-holandinggfarsundds3-ap-southeast-20001wwwedeployokote123hjemmesidealerdalaheadjuegoshikibichuobiraustevollimombetsupplyokoze164-balena-devices3-ca-central-123websiteleaf-south-12hparliamentatsunobninsk8s3-eu-central-1337bjugnishimerablackfridaynightjxn--11b4c3ditchyouripatriabloombergretaijindustriesteinkjerbloxcmsaludivtasvuodnakaiwanairlinekobayashimodatecnologiablushakotanishinomiyashironomniwebview-assetsalvadorbmoattachmentsamegawabmsamnangerbmwellbeingzonebnrweatherchannelsdvrdnsamparalleluxenishinoomotegotsukishiwadavvenjargamvikarpaczest-a-la-maisondre-landivttasvuotnakamai-stagingloppennebomlocalzonebonavstackartuzybondigitaloceanspacesamsclubartowest1-usamsunglugsmall-webspacebookonlineboomlaakesvuemielecceboschristmasakilatiron-riopretoeidsvollovesickaruizawabostik-serverrankoshigayachtsandvikcoromantovalle-d-aostakinouebostonakijinsekikogentlentapisa-geekarumaifmemsetkmaxxn--12c1fe0bradescotksatmpaviancapitalonebouncemerckmsdscloudiybounty-fullensakerrypropertiesangovtoyosatoyokawaboutiquebecologialaichaugiangmbhartiengiangminakamichiharaboutireservdrangedalpusercontentoyotapfizerboyfriendoftheinternetflixn--12cfi8ixb8lublindesnesanjosoyrovnoticiasannanishinoshimattelemarkasaokamikitayamatsurinfinitigopocznore-og-uvdalucaniabozen-sudtiroluccanva-appstmnishiokoppegardray-dnsupdaterbozen-suedtirolukowesteuropencraftoyotomiyazakinsurealtypeformesswithdnsannohekinanporovigonohejinternationaluroybplacedogawarabikomaezakirunordkappgfoggiabrandrayddns5ybrasiliadboxoslockerbresciaogashimadachicappadovaapstemp-dnswatchest-mon-blogueurodirumagazinebrindisiciliabroadwaybroke-itvedestrandraydnsanokashibatakashimashikiyosatokigawabrokerbrothermesserlifestylebtimnetzpisdnpharmaciensantamariakebrowsersafetymarketingmodumetacentrumeteorappharmacymruovatlassian-dev-builderschaefflerbrumunddalutskashiharabrusselsantoandreclaimsanukintlon-2bryanskiptveterinaireadthedocsaobernardovre-eikerbrynebwestus2bzhitomirbzzwhitesnowflakecommunity-prochowicecomodalenissandoycompanyaarphdfcbankasumigaurawa-mazowszexn--1ck2e1bambinagisobetsuldalpha-myqnapcloudaccess3-us-east-2ixboxeroxfinityolasiteastus2comparemarkerryhotelsaves-the-whalessandria-trani-barletta-andriatranibarlettaandriacomsecaasnesoddeno-stagingrondarcondoshifteditorxn--1ctwolominamatarnobrzegrongrossetouchijiwadedyn-berlincolnissayokoshibahikariyaltakazakinzais-a-bookkeepermarshallstatebankasuyalibabahccavuotnagaraholtaleniwaizumiotsurugashimaintenanceomutazasavonarviikaminoyamaxunispaceconferenceconstructionflashdrivefsncf-ipfsaxoconsuladobeio-static-accesscamdvrcampaniaconsultantranoyconsultingroundhandlingroznysaitohnoshookuwanakayamangyshlakdnepropetrovskanlandyndns-freeboxostrowwlkpmgrphilipsyno-dschokokekscholarshipschoolbusinessebycontactivetrailcontagematsubaravendbambleborkdalvdalcest-le-patron-rancherkasydneyukuhashimokawavoues3-sa-east-1contractorskenissedalcookingruecoolblogdnsfor-better-thanhhoarairforcentralus-1cooperativano-frankivskodjeephonefosschoolsztynsetransiphotographysiocoproductionschulplattforminamiechizenisshingucciprianiigatairaumalatvuopmicrolightinguidefinimaringatlancastercorsicafjschulservercosenzakopanecosidnshome-webservercellikescandypopensocialcouchpotatofrieschwarzgwangjuh-ohtawaramotoineppueblockbusternopilawacouncilcouponscrapper-sitecozoravennaharimalborkaszubytemarketscrappinguitarscrysecretrosnubananarepublic-inquiryurihonjoyenthickaragandaxarnetbankanzakiwielunnerepairbusanagochigasakishimabarakawaharaolbia-tempio-olbiatempioolbialowiezachpomorskiengiangjesdalolipopmcdirepbodyn53cqcxn--1lqs03niyodogawacrankyotobetsumidaknongujaratmallcrdyndns-homednscwhminamifuranocreditcardyndns-iphutholdingservehttpbincheonl-ams-1creditunionionjukujitawaravpagecremonashorokanaiecrewhoswholidaycricketnedalcrimeast-kazakhstanangercrotonecrowniphuyencrsvp4cruiseservehumourcuisinellair-traffic-controllagdenesnaaseinet-freakserveircasertainaircraftingvolloansnasaarlanduponthewifidelitypedreamhostersaotomeldaluxurycuneocupcakecuritibacgiangiangryggeecurvalled-aostargets-itranslatedyndns-mailcutegirlfriendyndns-office-on-the-webhoptogurafedoraprojectransurlfeirafembetsukuis-a-bruinsfanfermodenakasatsunairportrapaniizaferraraferraris-a-bulls-fanferrerotikagoshimalopolskanittedalfetsundyndns-wikimobetsumitakagildeskaliszkolamericanfamilydservemp3fgunmaniwamannorth-kazakhstanfhvalerfilegear-augustowiiheyakagefilegear-deatnuniversitysvardofilegear-gbizfilegear-iefilegear-jpmorgangwonporterfilegear-sg-1filminamiizukamiminefinalchikugokasellfyis-a-candidatefinancefinnoyfirebaseappiemontefirenetlifylkesbiblackbaudcdn-edgestackhero-networkinggroupowiathletajimabaria-vungtaudiopsysharpigboatshawilliamhillfirenzefirestonefireweblikes-piedmontravelersinsurancefirmdalegalleryfishingoldpoint2thisamitsukefitjarfitnessettsurugiminamimakis-a-catererfjalerfkatsushikabeebyteappilottonsberguovdageaidnunjargausdalflekkefjordyndns-workservep2phxn--1lqs71dyndns-remotewdyndns-picserveminecraftransporteflesbergushikamifuranorthflankatsuyamashikokuchuoflickragerokunohealthcareershellflierneflirfloginlinefloppythonanywherealtorfloraflorencefloripalmasfjordenfloristanohatajiris-a-celticsfanfloromskogxn--2m4a15eflowershimokitayamafltravinhlonganflynnhosting-clusterfncashgabadaddjabbottoyourafndyndns1fnwkzfolldalfoolfor-ourfor-somegurownproviderfor-theaterfordebianforexrotheworkpccwinbar0emmafann-arborlandd-dnsiskinkyowariasahikawarszawashtenawsmppl-wawsglobalacceleratorahimeshimakanegasakievennodebalancern4t3l3p0rtatarantours3-ap-northeast-123minsidaarborteaches-yogano-ipifony-123miwebaccelastx4432-b-datacenterprisesakijobservableusercontentateshinanomachintaifun-dnsdojournalistoloseyouriparisor-fronavuotnarashinoharaetnabudejjunipereggio-emilia-romagnaroyboltateyamajureggiocalabriakrehamnayoro0o0forgotdnshimonitayanagithubpreviewsaikisarazure-mobileirfjordynnservepicservequakeforli-cesena-forlicesenaforlillehammerfeste-ipimientaketomisatoolshimonosekikawaforsalegoismailillesandefjordynservebbservesarcasmileforsandasuolodingenfortalfortefosneshimosuwalkis-a-chefashionstorebaseljordyndns-serverisignfotrdynulvikatowicefoxn--2scrj9casinordlandurbanamexnetgamersapporomurafozfr-1fr-par-1fr-par-2franamizuhoboleslawiecommerce-shoppingyeongnamdinhachijohanamakisofukushimaoris-a-conservativegarsheiheijis-a-cparachutingfredrikstadynv6freedesktopazimuthaibinhphuocelotenkawakayamagnetcieszynh-servebeero-stageiseiroumugifuchungbukharag-cloud-championshiphoplixn--30rr7yfreemyiphosteurovisionredumbrellangevagrigentobishimadridvagsoygardenebakkeshibechambagricoharugbydgoszczecin-berlindasdaburfreesitefreetlshimotsukefreisennankokubunjis-a-cubicle-slavellinodeobjectshimotsumafrenchkisshikindleikangerfreseniushinichinanfriuli-v-giuliafriuli-ve-giuliafriuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-vgiuliafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-giuliafriuliveneziagiuliafriulivgiuliafrlfroganshinjotelulubin-vpncateringebunkyonanaoshimamateramockashiwarafrognfrolandynvpnpluservicesevastopolitiendafrom-akamaized-stagingfrom-alfrom-arfrom-azurewebsiteshikagamiishibuyabukihokuizumobaragusabaerobaticketshinjukuleuvenicefrom-campobassociatest-iserveblogsytenrissadistdlibestadultrentin-sudtirolfrom-coachaseljeducationcillahppiacenzaganfrom-ctrentin-sued-tirolfrom-dcatfooddagestangefrom-decagliarikuzentakataikillfrom-flapymntrentin-suedtirolfrom-gap-east-1from-higashiagatsumagoianiafrom-iafrom-idyroyrvikingulenfrom-ilfrom-in-the-bandairtelebitbridgestonemurorangecloudplatform0from-kshinkamigototalfrom-kyfrom-langsonyantakahamalselveruminamiminowafrom-malvikaufentigerfrom-mdfrom-mein-vigorlicefrom-mifunefrom-mnfrom-modshinshinotsurgeryfrom-mshinshirofrom-mtnfrom-ncatholicurus-4from-ndfrom-nefrom-nhs-heilbronnoysundfrom-njshintokushimafrom-nminamioguni5from-nvalledaostargithubusercontentrentino-a-adigefrom-nycaxiaskvollpagesardegnarutolgaulardalvivanovoldafrom-ohdancefrom-okegawassamukawataris-a-democratrentino-aadigefrom-orfrom-panasonichernovtsykkylvenneslaskerrylogisticsardiniafrom-pratohmamurogawatsonrenderfrom-ris-a-designerimarugame-hostyhostingfrom-schmidtre-gauldalfrom-sdfrom-tnfrom-txn--32vp30hachinoheavyfrom-utsiracusagaeroclubmedecin-addrammenuorodoyerfrom-val-daostavalleyfrom-vtrentino-alto-adigefrom-wafrom-wiardwebthingsjcbnpparibashkiriafrom-wvallee-aosteroyfrom-wyfrosinonefrostabackplaneapplebesbyengerdalp1froyal-commissionfruskydivingfujiiderafujikawaguchikonefujiminokamoenairtrafficplexus-2fujinomiyadapliefujiokazakinkobearalvahkikonaibetsubame-south-1fujisatoshoeshintomikasaharafujisawafujishiroishidakabiratoridediboxn--3bst00minamisanrikubetsupportrentino-altoadigefujitsuruokakamigaharafujiyoshidappnodearthainguyenfukayabeardubaikawagoefukuchiyamadatsunanjoburgfukudomigawafukuis-a-doctorfukumitsubishigakirkeneshinyoshitomiokamisatokamachippubetsuikitchenfukuokakegawafukuroishikariwakunigamigrationfukusakirovogradoyfukuyamagatakaharunusualpersonfunabashiriuchinadattorelayfunagatakahashimamakiryuohkurafunahashikamiamakusatsumasendaisenergyeongginowaniihamatamakinoharafundfunkfeuerfuoiskujukuriyamandalfuosskoczowindowskrakowinefurubirafurudonordreisa-hockeynutwentertainmentrentino-s-tirolfurukawajimangolffanshiojirishirifujiedafusoctrangfussagamiharafutabayamaguchinomihachimanagementrentino-stirolfutboldlygoingnowhere-for-more-og-romsdalfuttsurutashinais-a-financialadvisor-aurdalfuturecmshioyamelhushirahamatonbetsurnadalfuturehostingfuturemailingfvghakuis-a-gurunzenhakusandnessjoenhaldenhalfmoonscalebookinghostedpictetrentino-sud-tirolhalsakakinokiaham-radio-opinbar1hamburghammarfeastasiahamurakamigoris-a-hard-workershiraokamisunagawahanamigawahanawahandavvesiidanangodaddyn-o-saurealestatefarmerseinehandcrafteducatorprojectrentino-sudtirolhangglidinghangoutrentino-sued-tirolhannannestadhannosegawahanoipinkazohanyuzenhappouzshiratakahagianghasamap-northeast-3hasaminami-alpshishikuis-a-hunterhashbanghasudazaifudaigodogadobeioruntimedio-campidano-mediocampidanomediohasura-appinokokamikoaniikappudopaashisogndalhasvikazteleportrentino-suedtirolhatogayahoooshikamagayaitakamoriokakudamatsuehatoyamazakitahiroshimarcheapartmentshisuifuettertdasnetzhatsukaichikaiseiyoichipshitaramahattfjelldalhayashimamotobusells-for-lesshizukuishimoichilloutsystemscloudsitehazuminobushibukawahelplfinancialhelsinkitakamiizumisanofidonnakamurataitogliattinnhemneshizuokamitondabayashiogamagoriziahemsedalhepforgeblockshoujis-a-knightpointtokaizukamaishikshacknetrentinoa-adigehetemlbfanhigashichichibuzentsujiiehigashihiroshimanehigashiizumozakitakatakanabeautychyattorneyagawakkanaioirasebastopoleangaviikadenagahamaroyhigashikagawahigashikagurasoedahigashikawakitaaikitakyushunantankazunovecorebungoonow-dnshowahigashikurumeinforumzhigashimatsushimarnardalhigashimatsuyamakitaakitadaitoigawahigashimurayamamotorcycleshowtimeloyhigashinarusells-for-uhigashinehigashiomitamanoshiroomghigashiosakasayamanakakogawahigashishirakawamatakanezawahigashisumiyoshikawaminamiaikitamihamadahigashitsunospamproxyhigashiurausukitamotosunnydayhigashiyamatokoriyamanashiibaclieu-1higashiyodogawahigashiyoshinogaris-a-landscaperspectakasakitanakagusukumoldeliveryhippyhiraizumisatohokkaidontexistmein-iservschulecznakaniikawatanagurahirakatashinagawahiranais-a-lawyerhirarahiratsukaeruhirayaizuwakamatsubushikusakadogawahitachiomiyaginozawaonsensiositehitachiotaketakaokalmykiahitraeumtgeradegreehjartdalhjelmelandholyhomegoodshwinnersiiitesilkddiamondsimple-urlhomeipioneerhomelinkyard-cloudjiffyresdalhomelinuxn--3ds443ghomeofficehomesecuritymacaparecidahomesecuritypchiryukyuragiizehomesenseeringhomeskleppippugliahomeunixn--3e0b707ehondahonjyoitakarazukaluganskfh-muensterhornindalhorsells-itrentinoaadigehortendofinternet-dnsimplesitehospitalhotelwithflightsirdalhotmailhoyangerhoylandetakasagooglecodespotrentinoalto-adigehungyenhurdalhurumajis-a-liberalhyllestadhyogoris-a-libertarianhyugawarahyundaiwafuneis-very-evillasalleitungsenis-very-goodyearis-very-niceis-very-sweetpepperugiais-with-thebandoomdnstraceisk01isk02jenv-arubacninhbinhdinhktistoryjeonnamegawajetztrentinostiroljevnakerjewelryjgorajlljls-sto1jls-sto2jls-sto3jmpixolinodeusercontentrentinosud-tiroljnjcloud-ver-jpchitosetogitsuliguriajoyokaichibahcavuotnagaivuotnagaokakyotambabymilk3jozis-a-musicianjpnjprsolarvikhersonlanxessolundbeckhmelnitskiyamasoykosaigawakosakaerodromegalloabatobamaceratachikawafaicloudineencoreapigeekoseis-a-painterhostsolutionslupskhakassiakosheroykoshimizumakis-a-patsfankoshughesomakosugekotohiradomainstitutekotourakouhokumakogenkounosupersalevangerkouyamasudakouzushimatrixn--3pxu8khplaystation-cloudyclusterkozagawakozakis-a-personaltrainerkozowiosomnarviklabudhabikinokawachinaganoharamcocottekpnkppspbarcelonagawakepnord-odalwaysdatabaseballangenkainanaejrietisalatinabenogiehtavuoatnaamesjevuemielnombrendlyngen-rootaruibxos3-us-gov-west-1krasnikahokutokonamegatakatoris-a-photographerokussldkrasnodarkredstonekrelliankristiansandcatsoowitdkmpspawnextdirectrentinosudtirolkristiansundkrodsheradkrokstadelvaldaostavangerkropyvnytskyis-a-playershiftcryptonomichinomiyakekryminamiyamashirokawanabelaudnedalnkumamotoyamatsumaebashimofusakatakatsukis-a-republicanonoichinosekigaharakumanowtvaokumatorinokumejimatsumotofukekumenanyokkaichirurgiens-dentistes-en-francekundenkunisakis-a-rockstarachowicekunitachiaraisaijolsterkunitomigusukukis-a-socialistgstagekunneppubtlsopotrentinosued-tirolkuokgroupizzakurgankurobegetmyipirangalluplidlugolekagaminorddalkurogimimozaokinawashirosatochiokinoshimagentositempurlkuroisodegaurakuromatsunais-a-soxfankuronkurotakikawasakis-a-studentalkushirogawakustanais-a-teacherkassyncloudkusuppliesor-odalkutchanelkutnokuzumakis-a-techietipslzkvafjordkvalsundkvamsterdamnserverbaniakvanangenkvinesdalkvinnheradkviteseidatingkvitsoykwpspdnsor-varangermishimatsusakahogirlymisugitokorozawamitakeharamitourismartlabelingmitoyoakemiuramiyazurecontainerdpoliticaobangmiyotamatsukuris-an-actormjondalenmonzabrianzaramonzaebrianzamonzaedellabrianzamordoviamorenapolicemoriyamatsuuramoriyoshiminamiashigaramormonstermoroyamatsuzakis-an-actressmushcdn77-sslingmortgagemoscowithgoogleapiszmoseushimogosenmosjoenmoskenesorreisahayakawakamiichikawamisatottoris-an-anarchistjordalshalsenmossortlandmosviknx-serversusakiyosupabaseminemotegit-reposoruminanomoviemovimientokyotangotembaixadattowebhareidsbergmozilla-iotrentinosuedtirolmtranbytomaridagawalmartrentinsud-tirolmuikaminokawanishiaizubangemukoelnmunakatanemuosattemupkomatsushimassa-carrara-massacarraramassabuzzmurmanskomforbar2murotorcraftranakatombetsumy-gatewaymusashinodesakegawamuseumincomcastoripressorfoldmusicapetownnews-stagingmutsuzawamy-vigormy-wanggoupilemyactivedirectorymyamazeplaymyasustor-elvdalmycdmycloudnsoundcastorjdevcloudfunctionsokndalmydattolocalcertificationmyddnsgeekgalaxymydissentrentinsudtirolmydobissmarterthanyoumydrobofageometre-experts-comptablesowamydspectruminisitemyeffectrentinsued-tirolmyfastly-edgekey-stagingmyfirewalledreplittlestargardmyforuminterecifedextraspace-to-rentalstomakomaibaramyfritzmyftpaccesspeedpartnermyhome-servermyjinomykolaivencloud66mymailermymediapchoseikarugalsacemyokohamamatsudamypeplatformsharis-an-artistockholmestrandmypetsphinxn--41amyphotoshibajddarvodkafjordvaporcloudmypictureshinomypsxn--42c2d9amysecuritycamerakermyshopblockspjelkavikommunalforbundmyshopifymyspreadshopselectrentinsuedtirolmytabitordermythic-beastspydebergmytis-a-anarchistg-buildermytuleap-partnersquaresindevicenzamyvnchoshichikashukudoyamakeuppermywirecipescaracallypoivronpokerpokrovskommunepolkowicepoltavalle-aostavernpomorzeszowithyoutuberspacekitagawaponpesaro-urbino-pesarourbinopesaromasvuotnaritakurashikis-bykleclerchitachinakagawaltervistaipeigersundynamic-dnsarlpordenonepornporsangerporsangugeporsgrunnanpoznanpraxihuanprdprgmrprimetelprincipeprivatelinkomonowruzhgorodeoprivatizehealthinsuranceprofesionalprogressivegasrlpromonza-e-della-brianzaptokuyamatsushigepropertysnesrvarggatrevisogneprotectionprotonetroandindependent-inquest-a-la-masionprudentialpruszkowiwatsukiyonotaireserve-onlineprvcyonabarumbriaprzeworskogpunyufuelpupulawypussycatanzarowixsitepvhachirogatakahatakaishimojis-a-geekautokeinotteroypvtrogstadpwchowderpzqhadanorthwesternmutualqldqotoyohashimotoshimaqponiatowadaqslgbtroitskomorotsukagawaqualifioapplatter-applatterplcube-serverquangngais-certifiedugit-pagespeedmobilizeroticaltanissettailscaleforcequangninhthuanquangtritonoshonais-foundationquickconnectromsakuragawaquicksytestreamlitapplumbingouvaresearchitectesrhtrentoyonakagyokutoyakomakizunokunimimatakasugais-an-engineeringquipelementstrippertuscanytushungrytuvalle-daostamayukis-into-animeiwamizawatuxfamilytuyenquangbinhthuantwmailvestnesuzukis-gonevestre-slidreggio-calabriavestre-totennishiawakuravestvagoyvevelstadvibo-valentiaavibovalentiavideovinhphuchromedicinagatorogerssarufutsunomiyawakasaikaitakokonoevinnicarbonia-iglesias-carboniaiglesiascarboniavinnytsiavipsinaapplurinacionalvirginanmokurennebuvirtual-userveexchangevirtualservervirtualuserveftpodhalevisakurais-into-carsnoasakuholeckodairaviterboliviajessheimmobilienvivianvivoryvixn--45br5cylvlaanderennesoyvladikavkazimierz-dolnyvladimirvlogintoyonezawavmintsorocabalashovhachiojiyahikobierzycevologdanskoninjambylvolvolkswagencyouvolyngdalvoorlopervossevangenvotevotingvotoyonovps-hostrowiechungnamdalseidfjordynathomebuiltwithdarkhangelskypecorittogojomeetoystre-slidrettozawawmemergencyahabackdropalermochizukikirarahkkeravjuwmflabsvalbardunloppadualstackomvuxn--3hcrj9chonanbuskerudynamisches-dnsarpsborgripeeweeklylotterywoodsidellogliastradingworse-thanhphohochiminhadselbuyshouseshirakolobrzegersundongthapmircloudletshiranukamishihorowowloclawekonskowolawawpdevcloudwpenginepoweredwphostedmailwpmucdnipropetrovskygearappodlasiellaknoluoktagajobojis-an-entertainerwpmudevcdnaccessojamparaglidingwritesthisblogoipodzonewroclawmcloudwsseoullensvanguardianwtcp4wtfastlylbanzaicloudappspotagereporthruherecreationinomiyakonojorpelandigickarasjohkameyamatotakadawuozuerichardlillywzmiuwajimaxn--4it797konsulatrobeepsondriobranconagareyamaizuruhrxn--4pvxs4allxn--54b7fta0ccistrondheimpertrixcdn77-secureadymadealstahaugesunderxn--55qw42gxn--55qx5dxn--5dbhl8dxn--5js045dxn--5rtp49citadelhichisochimkentozsdell-ogliastraderxn--5rtq34kontuminamiuonumatsunoxn--5su34j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986b3xlxn--7t0a264citicarrdrobakamaiorigin-stagingmxn--12co0c3b4evalleaostaobaomoriguchiharaffleentrycloudflare-ipfstcgroupaaskimitsubatamibulsan-suedtirolkuszczytnoopscbgrimstadrrxn--80aaa0cvacationsvchoyodobashichinohealth-carereforminamidaitomanaustdalxn--80adxhksveioxn--80ao21axn--80aqecdr1axn--80asehdbarclaycards3-us-west-1xn--80aswgxn--80aukraanghkeliwebpaaskoyabeagleboardxn--8dbq2axn--8ltr62konyvelohmusashimurayamassivegridxn--8pvr4uxn--8y0a063axn--90a1affinitylotterybnikeisencowayxn--90a3academiamicable-modemoneyxn--90aeroportsinfolionetworkangerxn--90aishobaraxn--90amckinseyxn--90azhytomyrxn--9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byanagawaxn--asky-iraxn--aurskog-hland-jnbarclays3-us-west-2xn--avery-yuasakurastoragexn--b-5gaxn--b4w605ferdxn--balsan-sdtirol-nsbsvelvikongsbergxn--bck1b9a5dre4civilaviationfabricafederation-webredirectmediatechnologyeongbukashiwazakiyosembokutamamuraxn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fyanaizuxn--bjddar-ptarumizusawaxn--blt-elabcienciamallamaceiobbcn-north-1xn--bmlo-graingerxn--bod-2natalxn--bozen-sdtirol-2obanazawaxn--brnny-wuacademy-firewall-gatewayxn--brnnysund-m8accident-investigation-aptibleadpagesquare7xn--brum-voagatrustkanazawaxn--btsfjord-9zaxn--bulsan-sdtirol-nsbarefootballooningjovikarasjoketokashikiyokawaraxn--c1avgxn--c2br7gxn--c3s14misakis-a-therapistoiaxn--cck2b3baremetalombardyn-vpndns3-website-ap-northeast-1xn--cckwcxetdxn--cesena-forl-mcbremangerxn--cesenaforl-i8axn--cg4bkis-into-cartoonsokamitsuexn--ciqpnxn--clchc0ea0b2g2a9gcdxn--czr694bargainstantcloudfrontdoorestauranthuathienhuebinordre-landiherokuapparochernigovernmentjeldsundiscordsays3-website-ap-southeast-1xn--czrs0trvaroyxn--czru2dxn--czrw28barrel-of-knowledgeapplinziitatebayashijonawatebizenakanojoetsumomodellinglassnillfjordiscordsezgoraxn--d1acj3barrell-of-knowledgecomputermezproxyzgorzeleccoffeedbackanagawarmiastalowa-wolayangroupars3-website-ap-southeast-2xn--d1alfaststacksevenassigdalxn--d1atrysiljanxn--d5qv7z876clanbibaiduckdnsaseboknowsitallxn--davvenjrga-y4axn--djrs72d6uyxn--djty4koobindalxn--dnna-grajewolterskluwerxn--drbak-wuaxn--dyry-iraxn--e1a4cldmail-boxaxn--eckvdtc9dxn--efvn9svn-repostuff-4-salexn--efvy88haebaruericssongdalenviknaklodzkochikushinonsenasakuchinotsuchiurakawaxn--ehqz56nxn--elqq16hagakhanhhoabinhduongxn--eveni-0qa01gaxn--f6qx53axn--fct429kooris-a-nascarfanxn--fhbeiarnxn--finny-yuaxn--fiq228c5hsbcleverappsassarinuyamashinazawaxn--fiq64barsycenterprisecloudcontrolappgafanquangnamasteigenoamishirasatochigifts3-website-eu-west-1xn--fiqs8swidnicaravanylvenetogakushimotoganexn--fiqz9swidnikitagatakkomaganexn--fjord-lraxn--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--forl-cesena-fcbsswiebodzindependent-commissionxn--forlcesena-c8axn--fpcrj9c3dxn--frde-granexn--frna-woaxn--frya-hraxn--fzc2c9e2clickrisinglesjaguarxn--fzys8d69uvgmailxn--g2xx48clinicasacampinagrandebungotakadaemongolianishitosashimizunaminamiawajikintuitoyotsukaidownloadrudtvsaogoncapooguyxn--gckr3f0fastvps-serveronakanotoddenxn--gecrj9cliniquedaklakasamatsudoesntexisteingeekasserversicherungroks-theatrentin-sud-tirolxn--ggaviika-8ya47hagebostadxn--gildeskl-g0axn--givuotna-8yandexcloudxn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-into-gamessinamsosnowieconomiasadojin-dslattuminamitanexn--gmqw5axn--gnstigbestellen-zvbrplsbxn--45brj9churcharterxn--gnstigliefern-wobihirosakikamijimayfirstorfjordxn--h-2failxn--h1ahnxn--h1alizxn--h2breg3eveneswinoujsciencexn--h2brj9c8clothingdustdatadetectrani-andria-barletta-trani-andriaxn--h3cuzk1dienbienxn--hbmer-xqaxn--hcesuolo-7ya35barsyonlinehimejiiyamanouchikujoinvilleirvikarasuyamashikemrevistathellequipmentjmaxxxjavald-aostatics3-website-sa-east-1xn--hebda8basicserversejny-2xn--hery-iraxn--hgebostad-g3axn--hkkinen-5waxn--hmmrfeasta-s4accident-prevention-k3swisstufftoread-booksnestudioxn--hnefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr513nxn--indery-fyaotsusonoxn--io0a7is-leetrentinoaltoadigexn--j1adpohlxn--j1aefauskedsmokorsetagayaseralingenovaraxn--j1ael8basilicataniaxn--j1amhaibarakisosakitahatakamatsukawaxn--j6w193gxn--jlq480n2rgxn--jlster-byasakaiminatoyookananiimiharuxn--jrpeland-54axn--jvr189misasaguris-an-accountantsmolaquilaocais-a-linux-useranishiaritabashikaoizumizakitashiobaraxn--k7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--45q11circlerkstagentsasayamaxn--koluokta-7ya57haiduongxn--kprw13dxn--kpry57dxn--kput3is-lostre-toteneis-a-llamarumorimachidaxn--krager-gyasugitlabbvieeexn--kranghke-b0axn--krdsherad-m8axn--krehamn-dxaxn--krjohka-hwab49jdfastly-terrariuminamiiseharaxn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyasuokanmakiwakuratexn--kvnangen-k0axn--l-1fairwindsynology-diskstationxn--l1accentureklamborghinikkofuefukihabororosynology-dsuzakadnsaliastudynaliastrynxn--laheadju-7yatominamibosoftwarendalenugxn--langevg-jxaxn--lcvr32dxn--ldingen-q1axn--leagaviika-52basketballfinanzjaworznoticeableksvikaratsuginamikatagamilanotogawaxn--lesund-huaxn--lgbbat1ad8jejuxn--lgrd-poacctulaspeziaxn--lhppi-xqaxn--linds-pramericanexpresservegame-serverxn--loabt-0qaxn--lrdal-sraxn--lrenskog-54axn--lt-liacn-northwest-1xn--lten-granvindafjordxn--lury-iraxn--m3ch0j3axn--mely-iraxn--merker-kuaxn--mgb2ddesxn--mgb9awbfbsbxn--1qqw23axn--mgba3a3ejtunesuzukamogawaxn--mgba3a4f16axn--mgba3a4fra1-deloittexn--mgba7c0bbn0axn--mgbaakc7dvfsxn--mgbaam7a8haiphongonnakatsugawaxn--mgbab2bdxn--mgbah1a3hjkrdxn--mgbai9a5eva00batsfjordiscountry-snowplowiczeladzlgleezeu-2xn--mgbai9azgqp6jelasticbeanstalkharkovalleeaostexn--mgbayh7gparasitexn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgbcpq6gpa1axn--mgberp4a5d4a87gxn--mgberp4a5d4arxn--mgbgu82axn--mgbi4ecexposedxn--mgbpl2fhskopervikhmelnytskyivalleedaostexn--mgbqly7c0a67fbcngroks-thisayamanobeatsaudaxn--mgbqly7cvafricargoboavistanbulsan-sudtirolxn--mgbt3dhdxn--mgbtf8flatangerxn--mgbtx2bauhauspostman-echofunatoriginstances3-website-us-east-1xn--mgbx4cd0abkhaziaxn--mix082fbx-osewienxn--mix891fbxosexyxn--mjndalen-64axn--mk0axindependent-inquiryxn--mk1bu44cnpyatigorskjervoyagexn--mkru45is-not-certifiedxn--mlatvuopmi-s4axn--mli-tlavagiskexn--mlselv-iuaxn--moreke-juaxn--mori-qsakuratanxn--mosjen-eyatsukannamihokksundxn--mot-tlavangenxn--mre-og-romsdal-qqbuservecounterstrikexn--msy-ula0hair-surveillancexn--mtta-vrjjat-k7aflakstadaokayamazonaws-cloud9guacuiababybluebiteckidsmynasushiobaracingrok-freeddnsfreebox-osascoli-picenogatabuseating-organicbcgjerdrumcprequalifymelbourneasypanelblagrarq-authgear-stagingjerstadeltaishinomakilovecollegefantasyleaguenoharauthgearappspacehosted-by-previderehabmereitattoolforgerockyombolzano-altoadigeorgeorgiauthordalandroideporteatonamidorivnebetsukubankanumazuryomitanocparmautocodebergamoarekembuchikumagayagawafflecelloisirs3-external-180reggioemiliaromagnarusawaustrheimbalsan-sudtirolivingitpagexlivornobserveregruhostingivestbyglandroverhalladeskjakamaiedge-stagingivingjemnes3-eu-west-2038xn--muost-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--4dbgdty6ciscofreakamaihd-stagingriwataraindroppdalxn--nit225koryokamikawanehonbetsuwanouchikuhokuryugasakis-a-nursellsyourhomeftpiwatexn--nmesjevuemie-tcbalatinord-frontierxn--nnx388axn--nodessakurawebsozais-savedxn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nttery-byaeservehalflifeinsurancexn--nvuotna-hwaxn--nyqy26axn--o1achernivtsicilynxn--4dbrk0cexn--o3cw4hakatanortonkotsunndalxn--o3cyx2axn--od0algardxn--od0aq3beneventodayusuharaxn--ogbpf8fldrvelvetromsohuissier-justicexn--oppegrd-ixaxn--ostery-fyatsushiroxn--osyro-wuaxn--otu796dxn--p1acfedjeezxn--p1ais-slickharkivallee-d-aostexn--pgbs0dhlx3xn--porsgu-sta26fedorainfraclouderaxn--pssu33lxn--pssy2uxn--q7ce6axn--q9jyb4cnsauheradyndns-at-homedepotenzamamicrosoftbankasukabedzin-brbalsfjordietgoryoshiokanravocats3-fips-us-gov-west-1xn--qcka1pmcpenzapposxn--qqqt11misconfusedxn--qxa6axn--qxamunexus-3xn--rady-iraxn--rdal-poaxn--rde-ulazioxn--rdy-0nabaris-uberleetrentinos-tirolxn--rennesy-v1axn--rhkkervju-01afedorapeoplefrakkestadyndns-webhostingujogaszxn--rholt-mragowoltlab-democraciaxn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn--risa-5naturalxn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmskog-byawaraxn--rny31hakodatexn--rovu88bentleyusuitatamotorsitestinglitchernihivgubs3-website-us-west-1xn--rros-graphicsxn--rskog-uuaxn--rst-0naturbruksgymnxn--rsta-framercanvasxn--rvc1e0am3exn--ryken-vuaxn--ryrvik-byawatahamaxn--s-1faitheshopwarezzoxn--s9brj9cntraniandriabarlettatraniandriaxn--sandnessjen-ogbentrendhostingliwiceu-3xn--sandy-yuaxn--sdtirol-n2axn--seral-lraxn--ses554gxn--sgne-graphoxn--4gbriminiserverxn--skierv-utazurestaticappspaceusercontentunkongsvingerxn--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknland-fxaxn--slat-5navigationxn--slt-elabogadobeaemcloud-fr1xn--smla-hraxn--smna-gratangenxn--snase-nraxn--sndre-land-0cbeppublishproxyuufcfanirasakindependent-panelomonza-brianzaporizhzhedmarkarelianceu-4xn--snes-poaxn--snsa-roaxn--sr-aurdal-l8axn--sr-fron-q1axn--sr-odal-q1axn--sr-varanger-ggbeskidyn-ip24xn--srfold-byaxn--srreisa-q1axn--srum-gratis-a-bloggerxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshalsen-sqbestbuyshoparenagasakikuchikuseihicampinashikiminohostfoldnavyuzawaxn--stre-toten-zcbetainaboxfuselfipartindependent-reviewegroweibolognagasukeu-north-1xn--t60b56axn--tckweddingxn--tiq49xqyjelenia-goraxn--tjme-hraxn--tn0agrocerydxn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trentin-sd-tirol-rzbhzc66xn--trentin-sdtirol-7vbialystokkeymachineu-south-1xn--trentino-sd-tirol-c3bielawakuyachimataharanzanishiazaindielddanuorrindigenamerikawauevje-og-hornnes3-website-us-west-2xn--trentino-sdtirol-szbiella-speziaxn--trentinosd-tirol-rzbieszczadygeyachiyodaeguamfamscompute-1xn--trentinosdtirol-7vbievat-band-campaignieznoorstaplesakyotanabellunordeste-idclkarlsoyxn--trentinsd-tirol-6vbifukagawalbrzycharitydalomzaporizhzhiaxn--trentinsdtirol-nsbigv-infolkebiblegnicalvinklein-butterhcloudiscoursesalangenishigotpantheonsitexn--trgstad-r1axn--trna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atventuresinstagingxn--uc0ay4axn--uist22hakonexn--uisz3gxn--unjrga-rtashkenturindalxn--unup4yxn--uuwu58axn--vads-jraxn--valle-aoste-ebbturystykaneyamazoexn--valle-d-aoste-ehboehringerikexn--valleaoste-e7axn--valledaoste-ebbvadsoccertmgreaterxn--vard-jraxn--vegrshei-c0axn--vermgensberater-ctb-hostingxn--vermgensberatung-pwbiharstadotsubetsugarulezajskiervaksdalondonetskarmoyxn--vestvgy-ixa6oxn--vg-yiabruzzombieidskogasawarackmazerbaijan-mayenbaidarmeniaxn--vgan-qoaxn--vgsy-qoa0jellybeanxn--vgu402coguchikuzenishiwakinvestmentsaveincloudyndns-at-workisboringsakershusrcfdyndns-blogsitexn--vhquvestfoldxn--vler-qoaxn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861bihoronobeokagakikugawalesundiscoverdalondrinaplesknsalon-1xn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dxn--wgbh1communexn--wgbl6axn--xhq521bikedaejeonbuk0xn--xkc2al3hye2axn--xkc2dl3a5ee0hakubackyardshiraois-a-greenxn--y9a3aquarelleasingxn--yer-znavois-very-badxn--yfro4i67oxn--ygarden-p1axn--ygbi2ammxn--4it168dxn--ystre-slidre-ujbiofficialorenskoglobodoes-itcouldbeworldishangrilamdongnairkitapps-audibleasecuritytacticsxn--0trq7p7nnishiharaxn--zbx025dxn--zf0ao64axn--zf0avxlxn--zfr164bipartsaloonishiizunazukindustriaxnbayernxz \ No newline at end of file diff --git a/vendor/golang.org/x/net/publicsuffix/list.go b/vendor/golang.org/x/net/publicsuffix/list.go new file mode 100644 index 000000000..d56e9e762 --- /dev/null +++ b/vendor/golang.org/x/net/publicsuffix/list.go @@ -0,0 +1,203 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:generate go run gen.go + +// Package publicsuffix provides a public suffix list based on data from +// https://publicsuffix.org/ +// +// A public suffix is one under which Internet users can directly register +// names. It is related to, but different from, a TLD (top level domain). +// +// "com" is a TLD (top level domain). Top level means it has no dots. +// +// "com" is also a public suffix. Amazon and Google have registered different +// siblings under that domain: "amazon.com" and "google.com". +// +// "au" is another TLD, again because it has no dots. But it's not "amazon.au". +// Instead, it's "amazon.com.au". +// +// "com.au" isn't an actual TLD, because it's not at the top level (it has +// dots). But it is an eTLD (effective TLD), because that's the branching point +// for domain name registrars. +// +// Another name for "an eTLD" is "a public suffix". Often, what's more of +// interest is the eTLD+1, or one more label than the public suffix. For +// example, browsers partition read/write access to HTTP cookies according to +// the eTLD+1. Web pages served from "amazon.com.au" can't read cookies from +// "google.com.au", but web pages served from "maps.google.com" can share +// cookies from "www.google.com", so you don't have to sign into Google Maps +// separately from signing into Google Web Search. Note that all four of those +// domains have 3 labels and 2 dots. The first two domains are each an eTLD+1, +// the last two are not (but share the same eTLD+1: "google.com"). +// +// All of these domains have the same eTLD+1: +// - "www.books.amazon.co.uk" +// - "books.amazon.co.uk" +// - "amazon.co.uk" +// +// Specifically, the eTLD+1 is "amazon.co.uk", because the eTLD is "co.uk". +// +// There is no closed form algorithm to calculate the eTLD of a domain. +// Instead, the calculation is data driven. This package provides a +// pre-compiled snapshot of Mozilla's PSL (Public Suffix List) data at +// https://publicsuffix.org/ +package publicsuffix // import "golang.org/x/net/publicsuffix" + +// TODO: specify case sensitivity and leading/trailing dot behavior for +// func PublicSuffix and func EffectiveTLDPlusOne. + +import ( + "fmt" + "net/http/cookiejar" + "strings" +) + +// List implements the cookiejar.PublicSuffixList interface by calling the +// PublicSuffix function. +var List cookiejar.PublicSuffixList = list{} + +type list struct{} + +func (list) PublicSuffix(domain string) string { + ps, _ := PublicSuffix(domain) + return ps +} + +func (list) String() string { + return version +} + +// PublicSuffix returns the public suffix of the domain using a copy of the +// publicsuffix.org database compiled into the library. +// +// icann is whether the public suffix is managed by the Internet Corporation +// for Assigned Names and Numbers. If not, the public suffix is either a +// privately managed domain (and in practice, not a top level domain) or an +// unmanaged top level domain (and not explicitly mentioned in the +// publicsuffix.org list). For example, "foo.org" and "foo.co.uk" are ICANN +// domains, "foo.dyndns.org" and "foo.blogspot.co.uk" are private domains and +// "cromulent" is an unmanaged top level domain. +// +// Use cases for distinguishing ICANN domains like "foo.com" from private +// domains like "foo.appspot.com" can be found at +// https://wiki.mozilla.org/Public_Suffix_List/Use_Cases +func PublicSuffix(domain string) (publicSuffix string, icann bool) { + lo, hi := uint32(0), uint32(numTLD) + s, suffix, icannNode, wildcard := domain, len(domain), false, false +loop: + for { + dot := strings.LastIndex(s, ".") + if wildcard { + icann = icannNode + suffix = 1 + dot + } + if lo == hi { + break + } + f := find(s[1+dot:], lo, hi) + if f == notFound { + break + } + + u := uint32(nodes.get(f) >> (nodesBitsTextOffset + nodesBitsTextLength)) + icannNode = u&(1<>= nodesBitsICANN + u = children.get(u & (1<>= childrenBitsLo + hi = u & (1<>= childrenBitsHi + switch u & (1<>= childrenBitsNodeType + wildcard = u&(1<>= nodesBitsTextLength + offset := x & (1< #include #include +#include #include #include #include @@ -549,6 +550,7 @@ ccflags="$@" $2 !~ "NLA_TYPE_MASK" && $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || + $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 93a38a97d..877a62b47 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -502,6 +502,7 @@ const ( BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 + BPF_JCOND = 0xe0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 @@ -657,6 +658,9 @@ const ( CAN_NPROTO = 0x8 CAN_RAW = 0x1 CAN_RAW_FILTER_MAX = 0x200 + CAN_RAW_XL_VCID_RX_FILTER = 0x4 + CAN_RAW_XL_VCID_TX_PASS = 0x2 + CAN_RAW_XL_VCID_TX_SET = 0x1 CAN_RTR_FLAG = 0x40000000 CAN_SFF_ID_BITS = 0xb CAN_SFF_MASK = 0x7ff @@ -1339,6 +1343,7 @@ const ( F_OFD_SETLK = 0x25 F_OFD_SETLKW = 0x26 F_OK = 0x0 + F_SEAL_EXEC = 0x20 F_SEAL_FUTURE_WRITE = 0x10 F_SEAL_GROW = 0x4 F_SEAL_SEAL = 0x1 @@ -1627,6 +1632,7 @@ const ( IP_FREEBIND = 0xf IP_HDRINCL = 0x3 IP_IPSEC_POLICY = 0x10 + IP_LOCAL_PORT_RANGE = 0x33 IP_MAXPACKET = 0xffff IP_MAX_MEMBERSHIPS = 0x14 IP_MF = 0x2000 @@ -1653,6 +1659,7 @@ const ( IP_PMTUDISC_OMIT = 0x5 IP_PMTUDISC_PROBE = 0x3 IP_PMTUDISC_WANT = 0x1 + IP_PROTOCOL = 0x34 IP_RECVERR = 0xb IP_RECVERR_RFC4884 = 0x1a IP_RECVFRAGSIZE = 0x19 @@ -2169,7 +2176,7 @@ const ( NFT_SECMARK_CTX_MAXLEN = 0x100 NFT_SET_MAXNAMELEN = 0x100 NFT_SOCKET_MAX = 0x3 - NFT_TABLE_F_MASK = 0x3 + NFT_TABLE_F_MASK = 0x7 NFT_TABLE_MAXNAMELEN = 0x100 NFT_TRACETYPE_MAX = 0x3 NFT_TUNNEL_F_MASK = 0x7 @@ -2403,6 +2410,7 @@ const ( PERF_RECORD_MISC_USER = 0x2 PERF_SAMPLE_BRANCH_PLM_ALL = 0x7 PERF_SAMPLE_WEIGHT_TYPE = 0x1004000 + PID_FS_MAGIC = 0x50494446 PIPEFS_MAGIC = 0x50495045 PPPIOCGNPMODE = 0xc008744c PPPIOCNEWUNIT = 0xc004743e @@ -2896,8 +2904,9 @@ const ( RWF_APPEND = 0x10 RWF_DSYNC = 0x2 RWF_HIPRI = 0x1 + RWF_NOAPPEND = 0x20 RWF_NOWAIT = 0x8 - RWF_SUPPORTED = 0x1f + RWF_SUPPORTED = 0x3f RWF_SYNC = 0x4 RWF_WRITE_LIFE_NOT_SET = 0x0 SCHED_BATCH = 0x3 @@ -2918,7 +2927,9 @@ const ( SCHED_RESET_ON_FORK = 0x40000000 SCHED_RR = 0x2 SCM_CREDENTIALS = 0x2 + SCM_PIDFD = 0x4 SCM_RIGHTS = 0x1 + SCM_SECURITY = 0x3 SCM_TIMESTAMP = 0x1d SC_LOG_FLUSH = 0x100000 SECCOMP_ADDFD_FLAG_SEND = 0x2 @@ -3051,6 +3062,8 @@ const ( SIOCSMIIREG = 0x8949 SIOCSRARP = 0x8962 SIOCWANDEV = 0x894a + SK_DIAG_BPF_STORAGE_MAX = 0x3 + SK_DIAG_BPF_STORAGE_REQ_MAX = 0x1 SMACK_MAGIC = 0x43415d53 SMART_AUTOSAVE = 0xd2 SMART_AUTO_OFFLINE = 0xdb @@ -3071,6 +3084,8 @@ const ( SOCKFS_MAGIC = 0x534f434b SOCK_BUF_LOCK_MASK = 0x3 SOCK_DCCP = 0x6 + SOCK_DESTROY = 0x15 + SOCK_DIAG_BY_FAMILY = 0x14 SOCK_IOC_TYPE = 0x89 SOCK_PACKET = 0xa SOCK_RAW = 0x3 @@ -3260,6 +3275,7 @@ const ( TCP_MAX_WINSHIFT = 0xe TCP_MD5SIG = 0xe TCP_MD5SIG_EXT = 0x20 + TCP_MD5SIG_FLAG_IFINDEX = 0x2 TCP_MD5SIG_FLAG_PREFIX = 0x1 TCP_MD5SIG_MAXKEYLEN = 0x50 TCP_MSS = 0x200 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index 42ff8c3c1..e4bc0bd57 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 + MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index dca436004..689317afd 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -118,6 +118,7 @@ const ( IXOFF = 0x1000 IXON = 0x400 MAP_32BIT = 0x40 + MAP_ABOVE4G = 0x80 MAP_ANON = 0x20 MAP_ANONYMOUS = 0x20 MAP_DENYWRITE = 0x800 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index d8cae6d15..14270508b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -87,6 +87,7 @@ const ( FICLONE = 0x40049409 FICLONERANGE = 0x4020940d FLUSHO = 0x1000 + FPMR_MAGIC = 0x46504d52 FPSIMD_MAGIC = 0x46508001 FS_IOC_ENABLE_VERITY = 0x40806685 FS_IOC_GETFLAGS = 0x80086601 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 0036746ea..4740b8348 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -4605,7 +4605,7 @@ const ( NL80211_ATTR_MAC_HINT = 0xc8 NL80211_ATTR_MAC_MASK = 0xd7 NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca - NL80211_ATTR_MAX = 0x149 + NL80211_ATTR_MAX = 0x14a NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4 NL80211_ATTR_MAX_CSA_COUNTERS = 0xce NL80211_ATTR_MAX_MATCH_SETS = 0x85 @@ -5209,7 +5209,7 @@ const ( NL80211_FREQUENCY_ATTR_GO_CONCURRENT = 0xf NL80211_FREQUENCY_ATTR_INDOOR_ONLY = 0xe NL80211_FREQUENCY_ATTR_IR_CONCURRENT = 0xf - NL80211_FREQUENCY_ATTR_MAX = 0x1f + NL80211_FREQUENCY_ATTR_MAX = 0x20 NL80211_FREQUENCY_ATTR_MAX_TX_POWER = 0x6 NL80211_FREQUENCY_ATTR_NO_10MHZ = 0x11 NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc @@ -5703,7 +5703,7 @@ const ( NL80211_STA_FLAG_ASSOCIATED = 0x7 NL80211_STA_FLAG_AUTHENTICATED = 0x5 NL80211_STA_FLAG_AUTHORIZED = 0x1 - NL80211_STA_FLAG_MAX = 0x7 + NL80211_STA_FLAG_MAX = 0x8 NL80211_STA_FLAG_MAX_OLD_API = 0x6 NL80211_STA_FLAG_MFP = 0x4 NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2 @@ -6001,3 +6001,34 @@ type CachestatRange struct { Off uint64 Len uint64 } + +const ( + SK_MEMINFO_RMEM_ALLOC = 0x0 + SK_MEMINFO_RCVBUF = 0x1 + SK_MEMINFO_WMEM_ALLOC = 0x2 + SK_MEMINFO_SNDBUF = 0x3 + SK_MEMINFO_FWD_ALLOC = 0x4 + SK_MEMINFO_WMEM_QUEUED = 0x5 + SK_MEMINFO_OPTMEM = 0x6 + SK_MEMINFO_BACKLOG = 0x7 + SK_MEMINFO_DROPS = 0x8 + SK_MEMINFO_VARS = 0x9 + SKNLGRP_NONE = 0x0 + SKNLGRP_INET_TCP_DESTROY = 0x1 + SKNLGRP_INET_UDP_DESTROY = 0x2 + SKNLGRP_INET6_TCP_DESTROY = 0x3 + SKNLGRP_INET6_UDP_DESTROY = 0x4 + SK_DIAG_BPF_STORAGE_REQ_NONE = 0x0 + SK_DIAG_BPF_STORAGE_REQ_MAP_FD = 0x1 + SK_DIAG_BPF_STORAGE_REP_NONE = 0x0 + SK_DIAG_BPF_STORAGE = 0x1 + SK_DIAG_BPF_STORAGE_NONE = 0x0 + SK_DIAG_BPF_STORAGE_PAD = 0x1 + SK_DIAG_BPF_STORAGE_MAP_ID = 0x2 + SK_DIAG_BPF_STORAGE_MAP_VALUE = 0x3 +) + +type SockDiagReq struct { + Family uint8 + Protocol uint8 +} diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 26be94a8a..6f7d2ac70 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -68,6 +68,7 @@ type UserInfo10 struct { //sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo //sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation //sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree +//sys NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) = netapi32.NetUserEnum const ( // do not reorder diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 5c6035ddf..9f73df75b 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -401,6 +401,7 @@ var ( procTransmitFile = modmswsock.NewProc("TransmitFile") procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") + procNetUserEnum = modnetapi32.NewProc("NetUserEnum") procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") procNtCreateFile = modntdll.NewProc("NtCreateFile") procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") @@ -3486,6 +3487,14 @@ func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (nete return } +func NetUserEnum(serverName *uint16, level uint32, filter uint32, buf **byte, prefMaxLen uint32, entriesRead *uint32, totalEntries *uint32, resumeHandle *uint32) (neterr error) { + r0, _, _ := syscall.Syscall9(procNetUserEnum.Addr(), 8, uintptr(unsafe.Pointer(serverName)), uintptr(level), uintptr(filter), uintptr(unsafe.Pointer(buf)), uintptr(prefMaxLen), uintptr(unsafe.Pointer(entriesRead)), uintptr(unsafe.Pointer(totalEntries)), uintptr(unsafe.Pointer(resumeHandle)), 0) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) if r0 != 0 { diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index f0e0cf3cb..8f6c7f493 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit { // or its associated context.Context is canceled. // // The methods AllowN, ReserveN, and WaitN consume n tokens. +// +// Limiter is safe for simultaneous use by multiple goroutines. type Limiter struct { mu sync.Mutex limit Limit diff --git a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go index f47902371..bb2966e3b 100644 --- a/vendor/google.golang.org/protobuf/encoding/protojson/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/protojson/decode.go @@ -102,7 +102,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -114,7 +114,7 @@ func (d decoder) unexpectedTokenError(tok json.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index a45f112bc..24bc98ac4 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -84,7 +84,7 @@ type decoder struct { } // newError returns an error object with position info. -func (d decoder) newError(pos int, f string, x ...interface{}) error { +func (d decoder) newError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("(line %d:%d): ", line, column) return errors.New(head+f, x...) @@ -96,7 +96,7 @@ func (d decoder) unexpectedTokenError(tok text.Token) error { } // syntaxError returns a syntax error for given position. -func (d decoder) syntaxError(pos int, f string, x ...interface{}) error { +func (d decoder) syntaxError(pos int, f string, x ...any) error { line, column := d.Position(pos) head := fmt.Sprintf("syntax error (line %d:%d): ", line, column) return errors.New(head+f, x...) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go index d2b3ac031..ea1d3e65a 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/json/decode.go @@ -214,7 +214,7 @@ func (d *Decoder) parseNext() (Token, error) { // newSyntaxError returns an error with line and column information useful for // syntax errors. -func (d *Decoder) newSyntaxError(pos int, f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(pos int, f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(pos) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go index 87853e786..099b2bf45 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go @@ -601,7 +601,7 @@ func (d *Decoder) consumeToken(kind Kind, size int, attrs uint8) Token { // newSyntaxError returns a syntax error with line and column information for // current position. -func (d *Decoder) newSyntaxError(f string, x ...interface{}) error { +func (d *Decoder) newSyntaxError(f string, x ...any) error { e := errors.New(f, x...) line, column := d.Position(len(d.orig) - len(d.in)) return errors.New("syntax error (line %d:%d): %v", line, column, e) diff --git a/vendor/google.golang.org/protobuf/internal/errors/errors.go b/vendor/google.golang.org/protobuf/internal/errors/errors.go index d96719829..c2d6bd526 100644 --- a/vendor/google.golang.org/protobuf/internal/errors/errors.go +++ b/vendor/google.golang.org/protobuf/internal/errors/errors.go @@ -17,7 +17,7 @@ var Error = errors.New("protobuf error") // New formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func New(f string, x ...interface{}) error { +func New(f string, x ...any) error { return &prefixError{s: format(f, x...)} } @@ -43,7 +43,7 @@ func (e *prefixError) Unwrap() error { // Wrap returns an error that has a "proto" prefix, the formatted string described // by the format specifier and arguments, and a suffix of err. The error wraps err. -func Wrap(err error, f string, x ...interface{}) error { +func Wrap(err error, f string, x ...any) error { return &wrapError{ s: format(f, x...), err: err, @@ -67,7 +67,7 @@ func (e *wrapError) Is(target error) bool { return target == Error } -func format(f string, x ...interface{}) string { +func format(f string, x ...any) string { // avoid "proto: " prefix when chaining for i := 0; i < len(x); i++ { switch e := x[i].(type) { diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go index ece53bea3..df53ff40b 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc.go @@ -383,6 +383,10 @@ func (fd *Field) Message() protoreflect.MessageDescriptor { } return fd.L1.Message } +func (fd *Field) IsMapEntry() bool { + parent, ok := fd.L0.Parent.(protoreflect.MessageDescriptor) + return ok && parent.IsMapEntry() +} func (fd *Field) Format(s fmt.State, r rune) { descfmt.FormatDesc(s, r, fd) } func (fd *Field) ProtoType(protoreflect.FieldDescriptor) {} diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go index 3bc3b1cdf..8a57d60b0 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_init.go @@ -534,7 +534,7 @@ func (sd *Service) unmarshalSeed(b []byte, sb *strs.Builder, pf *File, pd protor } var nameBuilderPool = sync.Pool{ - New: func() interface{} { return new(strs.Builder) }, + New: func() any { return new(strs.Builder) }, } func getBuilder() *strs.Builder { diff --git a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go index 570181eb4..e56c91a8d 100644 --- a/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go +++ b/vendor/google.golang.org/protobuf/internal/filedesc/desc_lazy.go @@ -45,6 +45,11 @@ func (file *File) resolveMessages() { case protoreflect.MessageKind, protoreflect.GroupKind: fd.L1.Message = file.resolveMessageDependency(fd.L1.Message, listFieldDeps, depIdx) depIdx++ + if fd.L1.Kind == protoreflect.GroupKind && (fd.IsMap() || fd.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + fd.L1.Kind = protoreflect.MessageKind + } } // Default is resolved here since it depends on Enum being resolved. diff --git a/vendor/google.golang.org/protobuf/internal/filetype/build.go b/vendor/google.golang.org/protobuf/internal/filetype/build.go index f0e38c4ef..ba83fea44 100644 --- a/vendor/google.golang.org/protobuf/internal/filetype/build.go +++ b/vendor/google.golang.org/protobuf/internal/filetype/build.go @@ -68,7 +68,7 @@ type Builder struct { // and for input and output messages referenced by service methods. // Dependencies must come after declarations, but the ordering of // dependencies themselves is unspecified. - GoTypes []interface{} + GoTypes []any // DependencyIndexes is an ordered list of indexes into GoTypes for the // dependencies of messages, extensions, or services. @@ -268,7 +268,7 @@ func (x depIdxs) Get(i, j int32) int32 { type ( resolverByIndex struct { - goTypes []interface{} + goTypes []any depIdxs depIdxs fileRegistry } diff --git a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go index 1447a1198..f30ab6b58 100644 --- a/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go +++ b/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go @@ -860,11 +860,13 @@ const ( EnumValueOptions_Deprecated_field_name protoreflect.Name = "deprecated" EnumValueOptions_Features_field_name protoreflect.Name = "features" EnumValueOptions_DebugRedact_field_name protoreflect.Name = "debug_redact" + EnumValueOptions_FeatureSupport_field_name protoreflect.Name = "feature_support" EnumValueOptions_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option" EnumValueOptions_Deprecated_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.deprecated" EnumValueOptions_Features_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.features" EnumValueOptions_DebugRedact_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.debug_redact" + EnumValueOptions_FeatureSupport_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.feature_support" EnumValueOptions_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.EnumValueOptions.uninterpreted_option" ) @@ -873,6 +875,7 @@ const ( EnumValueOptions_Deprecated_field_number protoreflect.FieldNumber = 1 EnumValueOptions_Features_field_number protoreflect.FieldNumber = 2 EnumValueOptions_DebugRedact_field_number protoreflect.FieldNumber = 3 + EnumValueOptions_FeatureSupport_field_number protoreflect.FieldNumber = 4 EnumValueOptions_UninterpretedOption_field_number protoreflect.FieldNumber = 999 ) diff --git a/vendor/google.golang.org/protobuf/internal/impl/api_export.go b/vendor/google.golang.org/protobuf/internal/impl/api_export.go index a371f98de..5d5771c2e 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/api_export.go +++ b/vendor/google.golang.org/protobuf/internal/impl/api_export.go @@ -22,13 +22,13 @@ type Export struct{} // NewError formats a string according to the format specifier and arguments and // returns an error that has a "proto" prefix. -func (Export) NewError(f string, x ...interface{}) error { +func (Export) NewError(f string, x ...any) error { return errors.New(f, x...) } // enum is any enum type generated by protoc-gen-go // and must be a named int32 type. -type enum = interface{} +type enum = any // EnumOf returns the protoreflect.Enum interface over e. // It returns nil if e is nil. @@ -81,7 +81,7 @@ func (Export) EnumStringOf(ed protoreflect.EnumDescriptor, n protoreflect.EnumNu // message is any message type generated by protoc-gen-go // and must be a pointer to a named struct type. -type message = interface{} +type message = any // legacyMessageWrapper wraps a v2 message as a v1 message. type legacyMessageWrapper struct{ m protoreflect.ProtoMessage } diff --git a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go index bff041edc..f29e6a8fa 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/checkinit.go +++ b/vendor/google.golang.org/protobuf/internal/impl/checkinit.go @@ -68,7 +68,7 @@ func (mi *MessageInfo) isInitExtensions(ext *map[int32]ExtensionField) error { } for _, x := range *ext { ei := getExtensionFieldInfo(x.Type()) - if ei.funcs.isInit == nil { + if ei.funcs.isInit == nil || x.isUnexpandedLazy() { continue } v := x.Value() diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go index 2b8f122c2..4bb0a7a20 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_extension.go @@ -99,6 +99,28 @@ func (f *ExtensionField) canLazy(xt protoreflect.ExtensionType) bool { return false } +// isUnexpandedLazy returns true if the ExensionField is lazy and not +// yet expanded, which means it's present and already checked for +// initialized required fields. +func (f *ExtensionField) isUnexpandedLazy() bool { + return f.lazy != nil && atomic.LoadUint32(&f.lazy.atomicOnce) == 0 +} + +// lazyBuffer retrieves the buffer for a lazy extension if it's not yet expanded. +// +// The returned buffer has to be kept over whatever operation we're planning, +// as re-retrieving it will fail after the message is lazily decoded. +func (f *ExtensionField) lazyBuffer() []byte { + // This function might be in the critical path, so check the atomic without + // taking a look first, then only take the lock if needed. + if !f.isUnexpandedLazy() { + return nil + } + f.lazy.mu.Lock() + defer f.lazy.mu.Unlock() + return f.lazy.b +} + func (f *ExtensionField) lazyInit() { f.lazy.mu.Lock() defer f.lazy.mu.Unlock() diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go index b7a23faf1..7a16ec13d 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go +++ b/vendor/google.golang.org/protobuf/internal/impl/codec_messageset.go @@ -26,6 +26,15 @@ func sizeMessageSet(mi *MessageInfo, p pointer, opts marshalOptions) (size int) } num, _ := protowire.DecodeTag(xi.wiretag) size += messageset.SizeField(num) + if fullyLazyExtensions(opts) { + // Don't expand the extension, instead use the buffer to calculate size + if lb := x.lazyBuffer(); lb != nil { + // We got hold of the buffer, so it's still lazy. + // Don't count the tag size in the extension buffer, it's already added. + size += protowire.SizeTag(messageset.FieldMessage) + len(lb) - xi.tagsize + continue + } + } size += xi.funcs.size(x.Value(), protowire.SizeTag(messageset.FieldMessage), opts) } @@ -85,6 +94,19 @@ func marshalMessageSetField(mi *MessageInfo, b []byte, x ExtensionField, opts ma xi := getExtensionFieldInfo(x.Type()) num, _ := protowire.DecodeTag(xi.wiretag) b = messageset.AppendFieldStart(b, num) + + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + // The tag inside the lazy buffer is a different tag (the extension + // number), but what we need here is the tag for FieldMessage: + b = protowire.AppendVarint(b, protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType)) + b = append(b, lb[xi.tagsize:]...) + b = messageset.AppendFieldEnd(b) + return b, nil + } + } + b, err := xi.funcs.marshal(b, x.Value(), protowire.EncodeTag(messageset.FieldMessage, protowire.BytesType), opts) if err != nil { return b, err diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert.go b/vendor/google.golang.org/protobuf/internal/impl/convert.go index 185ef2efa..e06ece55a 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert.go @@ -14,7 +14,7 @@ import ( // unwrapper unwraps the value to the underlying value. // This is implemented by List and Map. type unwrapper interface { - protoUnwrap() interface{} + protoUnwrap() any } // A Converter coverts to/from Go reflect.Value types and protobuf protoreflect.Value types. diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go index f89136516..18cb96fd7 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_list.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_list.go @@ -136,6 +136,6 @@ func (ls *listReflect) NewElement() protoreflect.Value { func (ls *listReflect) IsValid() bool { return !ls.v.IsNil() } -func (ls *listReflect) protoUnwrap() interface{} { +func (ls *listReflect) protoUnwrap() any { return ls.v.Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go index f30b0a057..304244a65 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/convert_map.go +++ b/vendor/google.golang.org/protobuf/internal/impl/convert_map.go @@ -116,6 +116,6 @@ func (ms *mapReflect) NewValue() protoreflect.Value { func (ms *mapReflect) IsValid() bool { return !ms.v.IsNil() } -func (ms *mapReflect) protoUnwrap() interface{} { +func (ms *mapReflect) protoUnwrap() any { return ms.v.Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/encode.go b/vendor/google.golang.org/protobuf/internal/impl/encode.go index 845c67d6e..febd21224 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/encode.go +++ b/vendor/google.golang.org/protobuf/internal/impl/encode.go @@ -49,8 +49,11 @@ func (mi *MessageInfo) sizePointer(p pointer, opts marshalOptions) (size int) { return 0 } if opts.UseCachedSize() && mi.sizecacheOffset.IsValid() { - if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size >= 0 { - return int(size) + // The size cache contains the size + 1, to allow the + // zero value to be invalid, while also allowing for a + // 0 size to be cached. + if size := atomic.LoadInt32(p.Apply(mi.sizecacheOffset).Int32()); size > 0 { + return int(size - 1) } } return mi.sizePointerSlow(p, opts) @@ -60,7 +63,7 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int if flags.ProtoLegacy && mi.isMessageSet { size = sizeMessageSet(mi, p, opts) if mi.sizecacheOffset.IsValid() { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) } return size } @@ -84,13 +87,16 @@ func (mi *MessageInfo) sizePointerSlow(p pointer, opts marshalOptions) (size int } } if mi.sizecacheOffset.IsValid() { - if size > math.MaxInt32 { + if size > (math.MaxInt32 - 1) { // The size is too large for the int32 sizecache field. // We will need to recompute the size when encoding; // unfortunately expensive, but better than invalid output. - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), -1) + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), 0) } else { - atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size)) + // The size cache contains the size + 1, to allow the + // zero value to be invalid, while also allowing for a + // 0 size to be cached. + atomic.StoreInt32(p.Apply(mi.sizecacheOffset).Int32(), int32(size+1)) } } return size @@ -149,6 +155,14 @@ func (mi *MessageInfo) marshalAppendPointer(b []byte, p pointer, opts marshalOpt return b, nil } +// fullyLazyExtensions returns true if we should attempt to keep extensions lazy over size and marshal. +func fullyLazyExtensions(opts marshalOptions) bool { + // When deterministic marshaling is requested, force an unmarshal for lazy + // extensions to produce a deterministic result, instead of passing through + // bytes lazily that may or may not match what Go Protobuf would produce. + return opts.flags&piface.MarshalDeterministic == 0 +} + func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marshalOptions) (n int) { if ext == nil { return 0 @@ -158,6 +172,14 @@ func (mi *MessageInfo) sizeExtensions(ext *map[int32]ExtensionField, opts marsha if xi.funcs.size == nil { continue } + if fullyLazyExtensions(opts) { + // Don't expand the extension, instead use the buffer to calculate size + if lb := x.lazyBuffer(); lb != nil { + // We got hold of the buffer, so it's still lazy. + n += len(lb) + continue + } + } n += xi.funcs.size(x.Value(), xi.tagsize, opts) } return n @@ -176,6 +198,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, var err error for _, x := range *ext { xi := getExtensionFieldInfo(x.Type()) + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + b = append(b, lb...) + continue + } + } b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) } return b, err @@ -191,6 +220,13 @@ func (mi *MessageInfo) appendExtensions(b []byte, ext *map[int32]ExtensionField, for _, k := range keys { x := (*ext)[int32(k)] xi := getExtensionFieldInfo(x.Type()) + if fullyLazyExtensions(opts) { + // Don't expand the extension if it's still in wire format, instead use the buffer content. + if lb := x.lazyBuffer(); lb != nil { + b = append(b, lb...) + continue + } + } b, err = xi.funcs.marshal(b, x.Value(), xi.wiretag, opts) if err != nil { return b, err diff --git a/vendor/google.golang.org/protobuf/internal/impl/extension.go b/vendor/google.golang.org/protobuf/internal/impl/extension.go index cb25b0bae..e31249f64 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/extension.go +++ b/vendor/google.golang.org/protobuf/internal/impl/extension.go @@ -53,7 +53,7 @@ type ExtensionInfo struct { // type returned by InterfaceOf may not be identical. // // Deprecated: Use InterfaceOf(xt.Zero()) instead. - ExtensionType interface{} + ExtensionType any // Field is the field number of the extension. // @@ -95,16 +95,16 @@ func (xi *ExtensionInfo) New() protoreflect.Value { func (xi *ExtensionInfo) Zero() protoreflect.Value { return xi.lazyInit().Zero() } -func (xi *ExtensionInfo) ValueOf(v interface{}) protoreflect.Value { +func (xi *ExtensionInfo) ValueOf(v any) protoreflect.Value { return xi.lazyInit().PBValueOf(reflect.ValueOf(v)) } -func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) interface{} { +func (xi *ExtensionInfo) InterfaceOf(v protoreflect.Value) any { return xi.lazyInit().GoValueOf(v).Interface() } func (xi *ExtensionInfo) IsValidValue(v protoreflect.Value) bool { return xi.lazyInit().IsValidPB(v) } -func (xi *ExtensionInfo) IsValidInterface(v interface{}) bool { +func (xi *ExtensionInfo) IsValidInterface(v any) bool { return xi.lazyInit().IsValidGo(reflect.ValueOf(v)) } func (xi *ExtensionInfo) TypeDescriptor() protoreflect.ExtensionTypeDescriptor { diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go index c1c33d005..81b2b1a76 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_enum.go @@ -97,7 +97,7 @@ func (e *legacyEnumWrapper) Number() protoreflect.EnumNumber { func (e *legacyEnumWrapper) ProtoReflect() protoreflect.Enum { return e } -func (e *legacyEnumWrapper) protoUnwrap() interface{} { +func (e *legacyEnumWrapper) protoUnwrap() any { v := reflect.New(e.goTyp).Elem() v.SetInt(int64(e.num)) return v.Interface() diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 950e9a1fe..bf0b6049b 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -216,7 +216,7 @@ func aberrantLoadMessageDescReentrant(t reflect.Type, name protoreflect.FullName } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { for _, v := range vs { oneofWrappers = append(oneofWrappers, reflect.TypeOf(v)) } @@ -567,6 +567,6 @@ func (m aberrantMessage) IsValid() bool { func (m aberrantMessage) ProtoMethods() *protoiface.Methods { return aberrantProtoMethods } -func (m aberrantMessage) protoUnwrap() interface{} { +func (m aberrantMessage) protoUnwrap() any { return m.v.Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message.go b/vendor/google.golang.org/protobuf/internal/impl/message.go index 629bacdce..019399d45 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message.go @@ -35,7 +35,7 @@ type MessageInfo struct { Exporter exporter // OneofWrappers is list of pointers to oneof wrapper struct types. - OneofWrappers []interface{} + OneofWrappers []any initMu sync.Mutex // protects all unexported fields initDone uint32 @@ -47,7 +47,7 @@ type MessageInfo struct { // exporter is a function that returns a reference to the ith field of v, // where v is a pointer to a struct. It returns nil if it does not support // exporting the requested field (e.g., already exported). -type exporter func(v interface{}, i int) interface{} +type exporter func(v any, i int) any // getMessageInfo returns the MessageInfo for any message type that // is generated by our implementation of protoc-gen-go (for v2 and on). @@ -201,7 +201,7 @@ fieldLoop: } for _, fn := range methods { for _, v := range fn.Func.Call([]reflect.Value{reflect.Zero(fn.Type.In(0))}) { - if vs, ok := v.Interface().([]interface{}); ok { + if vs, ok := v.Interface().([]any); ok { oneofWrappers = vs } } @@ -256,7 +256,7 @@ func (mi *MessageInfo) Message(i int) protoreflect.MessageType { type mapEntryType struct { desc protoreflect.MessageDescriptor - valType interface{} // zero value of enum or message type + valType any // zero value of enum or message type } func (mt mapEntryType) New() protoreflect.Message { diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go index a6f0dbdad..ecb4623d7 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect.go @@ -20,7 +20,7 @@ type reflectMessageInfo struct { // fieldTypes contains the zero value of an enum or message field. // For lists, it contains the element type. // For maps, it contains the entry value type. - fieldTypes map[protoreflect.FieldNumber]interface{} + fieldTypes map[protoreflect.FieldNumber]any // denseFields is a subset of fields where: // 0 < fieldDesc.Number() < len(denseFields) @@ -28,7 +28,7 @@ type reflectMessageInfo struct { denseFields []*fieldInfo // rangeInfos is a list of all fields (not belonging to a oneof) and oneofs. - rangeInfos []interface{} // either *fieldInfo or *oneofInfo + rangeInfos []any // either *fieldInfo or *oneofInfo getUnknown func(pointer) protoreflect.RawFields setUnknown func(pointer, protoreflect.RawFields) @@ -224,7 +224,7 @@ func (mi *MessageInfo) makeFieldTypes(si structInfo) { } if ft != nil { if mi.fieldTypes == nil { - mi.fieldTypes = make(map[protoreflect.FieldNumber]interface{}) + mi.fieldTypes = make(map[protoreflect.FieldNumber]any) } mi.fieldTypes[fd.Number()] = reflect.Zero(ft).Interface() } @@ -255,6 +255,10 @@ func (m *extensionMap) Has(xd protoreflect.ExtensionTypeDescriptor) (ok bool) { if !ok { return false } + if x.isUnexpandedLazy() { + // Avoid calling x.Value(), which triggers a lazy unmarshal. + return true + } switch { case xd.IsList(): return x.Value().List().Len() > 0 @@ -389,7 +393,7 @@ var ( // MessageOf returns a reflective view over a message. The input must be a // pointer to a named Go struct. If the provided type has a ProtoReflect method, // it must be implemented by calling this method. -func (mi *MessageInfo) MessageOf(m interface{}) protoreflect.Message { +func (mi *MessageInfo) MessageOf(m any) protoreflect.Message { if reflect.TypeOf(m) != mi.GoReflectType { panic(fmt.Sprintf("type mismatch: got %T, want %v", m, mi.GoReflectType)) } @@ -417,7 +421,7 @@ func (m *messageIfaceWrapper) Reset() { func (m *messageIfaceWrapper) ProtoReflect() protoreflect.Message { return (*messageReflectWrapper)(m) } -func (m *messageIfaceWrapper) protoUnwrap() interface{} { +func (m *messageIfaceWrapper) protoUnwrap() any { return m.p.AsIfaceOf(m.mi.GoReflectType.Elem()) } diff --git a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go index 29ba6bd35..99dc23c6f 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go +++ b/vendor/google.golang.org/protobuf/internal/impl/message_reflect_gen.go @@ -23,7 +23,7 @@ func (m *messageState) New() protoreflect.Message { func (m *messageState) Interface() protoreflect.ProtoMessage { return m.protoUnwrap().(protoreflect.ProtoMessage) } -func (m *messageState) protoUnwrap() interface{} { +func (m *messageState) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageState) ProtoMethods() *protoiface.Methods { @@ -154,7 +154,7 @@ func (m *messageReflectWrapper) Interface() protoreflect.ProtoMessage { } return (*messageIfaceWrapper)(m) } -func (m *messageReflectWrapper) protoUnwrap() interface{} { +func (m *messageReflectWrapper) protoUnwrap() any { return m.pointer().AsIfaceOf(m.messageInfo().GoReflectType.Elem()) } func (m *messageReflectWrapper) ProtoMethods() *protoiface.Methods { diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go index 517e94434..da685e8a2 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go @@ -16,7 +16,7 @@ import ( const UnsafeEnabled = false // Pointer is an opaque pointer type. -type Pointer interface{} +type Pointer any // offset represents the offset to a struct field, accessible from a pointer. // The offset is the field index into a struct. @@ -62,7 +62,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { return pointer{v: reflect.ValueOf(v)} } @@ -93,7 +93,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { return p.AsValueOf(t).Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go index 4b020e311..5f20ca5d8 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go +++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go @@ -50,7 +50,7 @@ func pointerOfValue(v reflect.Value) pointer { } // pointerOfIface returns the pointer portion of an interface. -func pointerOfIface(v interface{}) pointer { +func pointerOfIface(v any) pointer { type ifaceHeader struct { Type unsafe.Pointer Data unsafe.Pointer @@ -80,7 +80,7 @@ func (p pointer) AsValueOf(t reflect.Type) reflect.Value { // AsIfaceOf treats p as a pointer to an object of type t and returns the value. // It is equivalent to p.AsValueOf(t).Interface() -func (p pointer) AsIfaceOf(t reflect.Type) interface{} { +func (p pointer) AsIfaceOf(t reflect.Type) any { // TODO: Use tricky unsafe magic to directly create ifaceHeader. return p.AsValueOf(t).Interface() } diff --git a/vendor/google.golang.org/protobuf/internal/order/range.go b/vendor/google.golang.org/protobuf/internal/order/range.go index 1665a68e5..a1f09162d 100644 --- a/vendor/google.golang.org/protobuf/internal/order/range.go +++ b/vendor/google.golang.org/protobuf/internal/order/range.go @@ -18,7 +18,7 @@ type messageField struct { } var messageFieldPool = sync.Pool{ - New: func() interface{} { return new([]messageField) }, + New: func() any { return new([]messageField) }, } type ( @@ -69,7 +69,7 @@ type mapEntry struct { } var mapEntryPool = sync.Pool{ - New: func() interface{} { return new([]mapEntry) }, + New: func() any { return new([]mapEntry) }, } type ( diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index a3cba5080..dbbf1f686 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -52,7 +52,7 @@ import ( const ( Major = 1 Minor = 34 - Patch = 1 + Patch = 2 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/proto/extension.go b/vendor/google.golang.org/protobuf/proto/extension.go index c9c8721a6..d248f2928 100644 --- a/vendor/google.golang.org/protobuf/proto/extension.go +++ b/vendor/google.golang.org/protobuf/proto/extension.go @@ -39,7 +39,7 @@ func ClearExtension(m Message, xt protoreflect.ExtensionType) { // If the field is unpopulated, it returns the default value for // scalars and an immutable, empty value for lists or messages. // It panics if xt does not extend m. -func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { +func GetExtension(m Message, xt protoreflect.ExtensionType) any { // Treat nil message interface as an empty message; return the default. if m == nil { return xt.InterfaceOf(xt.Zero()) @@ -51,7 +51,7 @@ func GetExtension(m Message, xt protoreflect.ExtensionType) interface{} { // SetExtension stores the value of an extension field. // It panics if m is invalid, xt does not extend m, or if type of v // is invalid for the specified extension field. -func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { +func SetExtension(m Message, xt protoreflect.ExtensionType, v any) { xd := xt.TypeDescriptor() pv := xt.ValueOf(v) @@ -78,7 +78,7 @@ func SetExtension(m Message, xt protoreflect.ExtensionType, v interface{}) { // It returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current extension field. -func RangeExtensions(m Message, f func(protoreflect.ExtensionType, interface{}) bool) { +func RangeExtensions(m Message, f func(protoreflect.ExtensionType, any) bool) { // Treat nil message interface as an empty message; nothing to range over. if m == nil { return diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go index 254ca5854..f3cebab29 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_resolve.go @@ -46,6 +46,11 @@ func (r *resolver) resolveMessageDependencies(ms []filedesc.Message, mds []*desc if f.L1.Kind, f.L1.Enum, f.L1.Message, err = r.findTarget(f.Kind(), f.Parent().FullName(), partialName(fd.GetTypeName()), f.IsWeak()); err != nil { return errors.New("message field %q cannot resolve type: %v", f.FullName(), err) } + if f.L1.Kind == protoreflect.GroupKind && (f.IsMap() || f.IsMapEntry()) { + // A map field might inherit delimited encoding from a file-wide default feature. + // But maps never actually use delimited encoding. (At least for now...) + f.L1.Kind = protoreflect.MessageKind + } if fd.DefaultValue != nil { v, ev, err := unmarshalDefault(fd.GetDefaultValue(), f, r.allowUnresolvable) if err != nil { diff --git a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go index c62930867..6de31c2eb 100644 --- a/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go +++ b/vendor/google.golang.org/protobuf/reflect/protodesc/desc_validate.go @@ -116,18 +116,6 @@ func validateMessageDeclarations(file *filedesc.File, ms []filedesc.Message, mds if m.ExtensionRanges().Len() > 0 { return errors.New("message %q using proto3 semantics cannot have extension ranges", m.FullName()) } - // Verify that field names in proto3 do not conflict if lowercased - // with all underscores removed. - // See protoc v3.8.0: src/google/protobuf/descriptor.cc:5830-5847 - names := map[string]protoreflect.FieldDescriptor{} - for i := 0; i < m.Fields().Len(); i++ { - f1 := m.Fields().Get(i) - s := strings.Replace(strings.ToLower(string(f1.Name())), "_", "", -1) - if f2, ok := names[s]; ok { - return errors.New("message %q using proto3 semantics has conflict: %q with %q", m.FullName(), f1.Name(), f2.Name()) - } - names[s] = f1 - } } for j, fd := range md.GetField() { diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go index 00102d311..ea154eec4 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go @@ -485,6 +485,8 @@ func (p *SourcePath) appendEnumValueOptions(b []byte) []byte { b = p.appendSingularField(b, "features", (*SourcePath).appendFeatureSet) case 3: b = p.appendSingularField(b, "debug_redact", nil) + case 4: + b = p.appendSingularField(b, "feature_support", (*SourcePath).appendFieldOptions_FeatureSupport) case 999: b = p.appendRepeatedField(b, "uninterpreted_option", (*SourcePath).appendUninterpretedOption) } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go index 5b80afe52..cd8fadbaf 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/type.go @@ -510,7 +510,7 @@ type ExtensionType interface { // // ValueOf is more extensive than protoreflect.ValueOf for a given field's // value as it has more type information available. - ValueOf(interface{}) Value + ValueOf(any) Value // InterfaceOf completely unwraps the Value to the underlying Go type. // InterfaceOf panics if the input is nil or does not represent the @@ -519,13 +519,13 @@ type ExtensionType interface { // // InterfaceOf is able to unwrap the Value further than Value.Interface // as it has more type information available. - InterfaceOf(Value) interface{} + InterfaceOf(Value) any // IsValidValue reports whether the Value is valid to assign to the field. IsValidValue(Value) bool // IsValidInterface reports whether the input is valid to assign to the field. - IsValidInterface(interface{}) bool + IsValidInterface(any) bool } // EnumDescriptor describes an enum and diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go index 7ced876f4..75f83a2af 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go @@ -32,11 +32,11 @@ const ( type value struct { pragma.DoNotCompare // 0B - typ valueType // 8B - num uint64 // 8B - str string // 16B - bin []byte // 24B - iface interface{} // 16B + typ valueType // 8B + num uint64 // 8B + str string // 16B + bin []byte // 24B + iface any // 16B } func valueOfString(v string) Value { @@ -45,7 +45,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, bin: v} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { return Value{typ: ifaceType, iface: v} } @@ -55,6 +55,6 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return v.bin } -func (v Value) getIface() interface{} { +func (v Value) getIface() any { return v.iface } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go index 160309731..9fe83cef5 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go @@ -69,8 +69,8 @@ import ( // composite Value. Modifying an empty, read-only value panics. type Value value -// The protoreflect API uses a custom Value union type instead of interface{} -// to keep the future open for performance optimizations. Using an interface{} +// The protoreflect API uses a custom Value union type instead of any +// to keep the future open for performance optimizations. Using an any // always incurs an allocation for primitives (e.g., int64) since it needs to // be boxed on the heap (as interfaces can only contain pointers natively). // Instead, we represent the Value union as a flat struct that internally keeps @@ -85,7 +85,7 @@ type Value value // ValueOf returns a Value initialized with the concrete value stored in v. // This panics if the type does not match one of the allowed types in the // Value union. -func ValueOf(v interface{}) Value { +func ValueOf(v any) Value { switch v := v.(type) { case nil: return Value{} @@ -192,10 +192,10 @@ func (v Value) IsValid() bool { return v.typ != nilType } -// Interface returns v as an interface{}. +// Interface returns v as an any. // // Invariant: v == ValueOf(v).Interface() -func (v Value) Interface() interface{} { +func (v Value) Interface() any { switch v.typ { case nilType: return nil @@ -406,8 +406,8 @@ func (k MapKey) IsValid() bool { return Value(k).IsValid() } -// Interface returns k as an interface{}. -func (k MapKey) Interface() interface{} { +// Interface returns k as an any. +func (k MapKey) Interface() any { return Value(k).Interface() } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go index b1fdbe3e8..7f3583ead 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go120.go @@ -45,7 +45,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -80,7 +80,7 @@ func valueOfBytes(v []byte) Value { p := (*sliceHeader)(unsafe.Pointer(&v)) return Value{typ: bytesType, ptr: p.Data, num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -93,7 +93,7 @@ func (v Value) getBytes() (x []byte) { *(*sliceHeader)(unsafe.Pointer(&x)) = sliceHeader{Data: v.ptr, Len: int(v.num), Cap: int(v.num)} return x } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go index 435470111..f7d386990 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go +++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe_go121.go @@ -15,7 +15,7 @@ import ( type ( ifaceHeader struct { - _ [0]interface{} // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. + _ [0]any // if interfaces have greater alignment than unsafe.Pointer, this will enforce it. Type unsafe.Pointer Data unsafe.Pointer } @@ -37,7 +37,7 @@ var ( // typeOf returns a pointer to the Go type information. // The pointer is comparable and equal if and only if the types are identical. -func typeOf(t interface{}) unsafe.Pointer { +func typeOf(t any) unsafe.Pointer { return (*ifaceHeader)(unsafe.Pointer(&t)).Type } @@ -70,7 +70,7 @@ func valueOfString(v string) Value { func valueOfBytes(v []byte) Value { return Value{typ: bytesType, ptr: unsafe.Pointer(unsafe.SliceData(v)), num: uint64(len(v))} } -func valueOfIface(v interface{}) Value { +func valueOfIface(v any) Value { p := (*ifaceHeader)(unsafe.Pointer(&v)) return Value{typ: p.Type, ptr: p.Data} } @@ -81,7 +81,7 @@ func (v Value) getString() string { func (v Value) getBytes() []byte { return unsafe.Slice((*byte)(v.ptr), v.num) } -func (v Value) getIface() (x interface{}) { +func (v Value) getIface() (x any) { *(*ifaceHeader)(unsafe.Pointer(&x)) = ifaceHeader{Type: v.typ, Data: v.ptr} return x } diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 6267dc52a..de1777339 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -95,7 +95,7 @@ type Files struct { // multiple files. Only top-level declarations are registered. // Note that enum values are in the top-level since that are in the same // scope as the parent enum. - descsByName map[protoreflect.FullName]interface{} + descsByName map[protoreflect.FullName]any filesByPath map[string][]protoreflect.FileDescriptor numFiles int } @@ -117,7 +117,7 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { defer globalMutex.Unlock() } if r.descsByName == nil { - r.descsByName = map[protoreflect.FullName]interface{}{ + r.descsByName = map[protoreflect.FullName]any{ "": &packageDescriptor{}, } r.filesByPath = make(map[string][]protoreflect.FileDescriptor) @@ -485,7 +485,7 @@ type Types struct { } type ( - typesByName map[protoreflect.FullName]interface{} + typesByName map[protoreflect.FullName]any extensionsByMessage map[protoreflect.FullName]extensionsByNumber extensionsByNumber map[protoreflect.FieldNumber]protoreflect.ExtensionType ) @@ -570,7 +570,7 @@ func (r *Types) RegisterExtension(xt protoreflect.ExtensionType) error { return nil } -func (r *Types) register(kind string, desc protoreflect.Descriptor, typ interface{}) error { +func (r *Types) register(kind string, desc protoreflect.Descriptor, typ any) error { name := desc.FullName() prev := r.typesByName[name] if prev != nil { @@ -841,7 +841,7 @@ func (r *Types) RangeExtensionsByMessage(message protoreflect.FullName, f func(p } } -func typeName(t interface{}) string { +func typeName(t any) string { switch t.(type) { case protoreflect.EnumType: return "enum" @@ -854,7 +854,7 @@ func typeName(t interface{}) string { } } -func amendErrorWithCaller(err error, prev, curr interface{}) error { +func amendErrorWithCaller(err error, prev, curr any) error { prevPkg := goPackage(prev) currPkg := goPackage(curr) if prevPkg == "" || currPkg == "" || prevPkg == currPkg { @@ -863,7 +863,7 @@ func amendErrorWithCaller(err error, prev, curr interface{}) error { return errors.New("%s\n\tpreviously from: %q\n\tcurrently from: %q", err, prevPkg, currPkg) } -func goPackage(v interface{}) string { +func goPackage(v any) string { switch d := v.(type) { case protoreflect.EnumType: v = d.Descriptor() diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index 10c9030eb..9403eb075 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -3012,6 +3012,8 @@ type EnumValueOptions struct { // out when using debug formats, e.g. when the field contains sensitive // credentials. DebugRedact *bool `protobuf:"varint,3,opt,name=debug_redact,json=debugRedact,def=0" json:"debug_redact,omitempty"` + // Information about the support window of a feature value. + FeatureSupport *FieldOptions_FeatureSupport `protobuf:"bytes,4,opt,name=feature_support,json=featureSupport" json:"feature_support,omitempty"` // The parser stores options it doesn't recognize here. See above. UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` } @@ -3075,6 +3077,13 @@ func (x *EnumValueOptions) GetDebugRedact() bool { return Default_EnumValueOptions_DebugRedact } +func (x *EnumValueOptions) GetFeatureSupport() *FieldOptions_FeatureSupport { + if x != nil { + return x.FeatureSupport + } + return nil +} + func (x *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -4706,7 +4715,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x67, 0x12, 0x30, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x22, 0x97, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, + 0x69, 0x6e, 0x67, 0x22, 0xad, 0x09, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6a, 0x61, 0x76, 0x61, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, @@ -4779,438 +4788,445 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{ 0x45, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x03, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x22, 0xf4, 0x03, - 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, - 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, - 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, - 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, - 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, - 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, - 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, - 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, - 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, - 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, - 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, - 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, - 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, - 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, - 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, - 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, - 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, - 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, - 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, - 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, - 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, - 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, - 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, - 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, - 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, - 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, - 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, - 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, - 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, - 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, - 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, - 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, - 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, - 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, - 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, - 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, - 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, - 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, - 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, - 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, - 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, - 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, - 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, - 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, - 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, - 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, - 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, - 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, - 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, - 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, - 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, - 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, - 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, - 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, - 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, - 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, - 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, + 0x02, 0x4a, 0x04, 0x08, 0x2a, 0x10, 0x2b, 0x4a, 0x04, 0x08, 0x26, 0x10, 0x27, 0x52, 0x14, 0x70, + 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x22, 0xf4, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x0a, 0x17, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x14, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x57, 0x69, 0x72, 0x65, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x12, 0x4c, 0x0a, 0x1f, 0x6e, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x6e, 0x64, + 0x61, 0x72, 0x64, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x61, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x1c, 0x6e, 0x6f, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, + 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x70, + 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6d, 0x61, + 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, + 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, + 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, - 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0x81, 0x02, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, - 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, - 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, - 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, + 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x4a, 0x04, + 0x08, 0x08, 0x10, 0x09, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0x9d, 0x0d, 0x0a, 0x0c, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x41, 0x0a, 0x05, 0x63, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x43, 0x54, 0x79, 0x70, 0x65, 0x3a, + 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, + 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x09, 0x4a, 0x53, + 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x52, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x19, 0x0a, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, + 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x6c, 0x61, 0x7a, 0x79, 0x12, 0x2e, 0x0a, 0x0f, 0x75, 0x6e, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x0f, 0x20, + 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0e, 0x75, 0x6e, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x19, 0x0a, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x04, 0x77, 0x65, 0x61, 0x6b, 0x12, 0x28, 0x0a, 0x0c, + 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, 0x63, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, - 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x4b, 0x0a, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x72, 0x65, 0x74, 0x65, 0x6e, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x48, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x13, + 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x12, 0x57, 0x0a, + 0x10, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x18, 0x14, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, + 0x55, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, - 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, - 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, - 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, - 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x1a, 0x5a, 0x0a, 0x0e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x96, 0x02, 0x0a, + 0x0e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x12, + 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x74, 0x72, 0x6f, + 0x64, 0x75, 0x63, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, + 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x12, 0x47, 0x0a, 0x12, 0x65, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x61, 0x72, 0x6e, 0x69, + 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x0f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x22, 0x2f, 0x0a, 0x05, 0x43, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0a, + 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x4f, + 0x52, 0x44, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, + 0x49, 0x45, 0x43, 0x45, 0x10, 0x02, 0x22, 0x35, 0x0a, 0x06, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, + 0x0a, 0x09, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x22, 0x55, 0x0a, + 0x0f, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x74, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x54, 0x45, 0x4e, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x14, + 0x0a, 0x10, 0x52, 0x45, 0x54, 0x45, 0x4e, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x4f, 0x55, 0x52, + 0x43, 0x45, 0x10, 0x02, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x54, 0x41, 0x52, 0x47, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x52, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, + 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x54, 0x41, 0x52, + 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x4e, 0x45, 0x4f, 0x46, 0x10, 0x05, + 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x45, 0x4e, 0x55, 0x4d, 0x10, 0x06, 0x12, 0x1a, 0x0a, 0x16, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, + 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x12, 0x16, 0x0a, 0x12, 0x54, + 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x54, 0x48, 0x4f, + 0x44, 0x10, 0x09, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x12, 0x10, 0x13, 0x22, 0xac, 0x01, 0x0a, 0x0c, 0x4f, + 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, - 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, - 0x80, 0x80, 0x02, 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, - 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, - 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, - 0x6c, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, - 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, - 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, - 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, - 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, - 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, - 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, - 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0f, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, - 0x54, 0x53, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, - 0x4e, 0x54, 0x10, 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, - 0x9a, 0x03, 0x0a, 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, - 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, - 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, - 0x50, 0x61, 0x72, 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, - 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x10, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, - 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x10, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x1a, 0x4a, 0x0a, 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, - 0x08, 0x6e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x73, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xb9, 0x0a, 0x0a, - 0x0a, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, - 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, - 0x3f, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, - 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, - 0x58, 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, - 0x52, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, - 0x6c, 0x0a, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, - 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, - 0x07, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, - 0x08, 0xe8, 0x07, 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, - 0x0a, 0x17, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x31, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x42, 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, - 0x12, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, - 0x12, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, - 0x07, 0x52, 0x15, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, - 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, - 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, - 0x45, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, - 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, - 0x26, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, - 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, - 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, - 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, - 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, - 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, - 0x0a, 0x12, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, - 0x07, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, - 0x0d, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, - 0x0a, 0x16, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, - 0x50, 0x4c, 0x49, 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, - 0x49, 0x43, 0x49, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, - 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, - 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, - 0x0a, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, - 0x45, 0x44, 0x10, 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, - 0x1f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, - 0x0a, 0x08, 0x45, 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x43, 0x0a, 0x0e, - 0x55, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, - 0x0a, 0x17, 0x55, 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, - 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x03, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, - 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, - 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x4c, 0x49, 0x4d, - 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x52, - 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x09, 0x0a, - 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x45, 0x47, 0x41, - 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x10, 0x02, - 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0xe9, 0x07, 0x2a, 0x06, 0x08, 0xe9, 0x07, 0x10, 0xea, 0x07, - 0x2a, 0x06, 0x08, 0xea, 0x07, 0x10, 0xeb, 0x07, 0x2a, 0x06, 0x08, 0x86, 0x4e, 0x10, 0x87, 0x4e, - 0x2a, 0x06, 0x08, 0x8b, 0x4e, 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, - 0x4a, 0x06, 0x08, 0xe7, 0x07, 0x10, 0xe8, 0x07, 0x22, 0xd9, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, - 0x58, 0x0a, 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x3c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, - 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, - 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, - 0x08, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, - 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, - 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, - 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0e, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, - 0xe2, 0x01, 0x0a, 0x18, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, - 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, + 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, + 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd1, 0x02, 0x0a, 0x0b, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, + 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, + 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x12, 0x56, 0x0a, 0x26, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x5f, + 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x22, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, + 0x64, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, + 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, + 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, + 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x22, 0xd8, 0x02, + 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x12, 0x28, 0x0a, 0x0c, 0x64, 0x65, 0x62, 0x75, 0x67, 0x5f, 0x72, 0x65, 0x64, 0x61, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0b, 0x64, 0x65, 0x62, 0x75, 0x67, 0x52, 0x65, 0x64, 0x61, 0x63, 0x74, 0x12, 0x55, 0x0a, 0x0f, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x0e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x75, 0x70, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, + 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, + 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0xd5, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x08, 0x66, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x4e, 0x0a, 0x14, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, - 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, + 0x65, 0x64, 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x58, 0x0a, 0x14, 0x75, + 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, + 0x22, 0x99, 0x03, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, + 0x18, 0x21, 0x20, 0x01, 0x28, 0x08, 0x3a, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x52, 0x0a, 0x64, + 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x11, 0x69, 0x64, 0x65, + 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x22, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x3a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, + 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x37, 0x0a, 0x08, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, - 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x12, 0x42, 0x0a, 0x0e, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, 0x01, - 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, - 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05, - 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, 0x65, - 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, - 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x65, - 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x65, - 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xd0, - 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, - 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, 0x69, - 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, - 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, 0x73, - 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, 0x6e, - 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, 0x0a, - 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, 0x10, - 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x0a, - 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, 0x45, - 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, 0x0e, - 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, 0xe7, - 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, 0x32, - 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, - 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, - 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, 0x45, - 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, - 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, - 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, - 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, - 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, 0x63, - 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, - 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, - 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x14, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0xe7, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, + 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x75, 0x6e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x50, 0x0a, 0x10, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, + 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, + 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, + 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x10, + 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x10, + 0x02, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x22, 0x9a, 0x03, 0x0a, + 0x13, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, + 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, + 0x74, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, + 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2c, 0x0a, 0x12, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6e, 0x65, + 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x4a, 0x0a, + 0x08, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x02, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x61, + 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, + 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x02, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, + 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa7, 0x0a, 0x0a, 0x0a, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x0e, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x5f, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x3f, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x49, 0x4d, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe7, 0x07, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, 0x58, 0x50, 0x4c, + 0x49, 0x43, 0x49, 0x54, 0x18, 0xe8, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0d, 0x66, + 0x69, 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x09, + 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x75, + 0x6d, 0x54, 0x79, 0x70, 0x65, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, + 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, + 0x09, 0x12, 0x04, 0x4f, 0x50, 0x45, 0x4e, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, + 0x52, 0x08, 0x65, 0x6e, 0x75, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x17, 0x72, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x65, 0x6e, + 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, + 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, + 0x2d, 0x88, 0x01, 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x0d, 0x12, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x44, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x15, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x7e, 0x0a, 0x0f, 0x75, 0x74, 0x66, 0x38, 0x5f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x55, 0x74, 0x66, 0x38, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x29, 0x88, 0x01, 0x01, 0x98, + 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x18, 0xe6, + 0x07, 0xa2, 0x01, 0x0b, 0x12, 0x06, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x18, 0xe7, 0x07, 0xb2, + 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0e, 0x75, 0x74, 0x66, 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7e, 0x0a, 0x10, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x2b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x26, 0x88, 0x01, + 0x01, 0x98, 0x01, 0x04, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x14, 0x12, 0x0f, 0x4c, 0x45, 0x4e, 0x47, + 0x54, 0x48, 0x5f, 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x18, 0xe6, 0x07, 0xb2, 0x01, + 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x82, 0x01, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x2e, 0x4a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x42, 0x39, 0x88, 0x01, 0x01, 0x98, 0x01, 0x03, 0x98, 0x01, 0x06, 0x98, 0x01, + 0x01, 0xa2, 0x01, 0x17, 0x12, 0x12, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, + 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, 0x54, 0x18, 0xe6, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, + 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x18, 0xe7, 0x07, 0xb2, 0x01, 0x03, 0x08, 0xe8, 0x07, 0x52, 0x0a, + 0x6a, 0x73, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x5c, 0x0a, 0x0d, 0x46, 0x69, + 0x65, 0x6c, 0x64, 0x50, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4c, 0x49, + 0x43, 0x49, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x43, 0x49, + 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x52, 0x45, + 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x10, 0x03, 0x22, 0x37, 0x0a, 0x08, 0x45, 0x6e, 0x75, 0x6d, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4f, + 0x50, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, + 0x02, 0x22, 0x56, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, + 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x5f, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x45, + 0x58, 0x50, 0x41, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02, 0x22, 0x49, 0x0a, 0x0e, 0x55, 0x74, 0x66, + 0x38, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x55, + 0x54, 0x46, 0x38, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x56, 0x45, 0x52, 0x49, + 0x46, 0x59, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x22, 0x04, + 0x08, 0x01, 0x10, 0x01, 0x22, 0x53, 0x0a, 0x0f, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, + 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, + 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x4e, 0x47, 0x54, 0x48, 0x5f, + 0x50, 0x52, 0x45, 0x46, 0x49, 0x58, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, + 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x10, 0x02, 0x22, 0x48, 0x0a, 0x0a, 0x4a, 0x73, 0x6f, + 0x6e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x17, 0x0a, 0x13, 0x4a, 0x53, 0x4f, 0x4e, 0x5f, + 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x5f, 0x42, 0x45, 0x53, 0x54, 0x5f, 0x45, 0x46, 0x46, 0x4f, 0x52, + 0x54, 0x10, 0x02, 0x2a, 0x06, 0x08, 0xe8, 0x07, 0x10, 0x8b, 0x4e, 0x2a, 0x06, 0x08, 0x8b, 0x4e, + 0x10, 0x90, 0x4e, 0x2a, 0x06, 0x08, 0x90, 0x4e, 0x10, 0x91, 0x4e, 0x4a, 0x06, 0x08, 0xe7, 0x07, + 0x10, 0xe8, 0x07, 0x22, 0xef, 0x03, 0x0a, 0x12, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, + 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x58, 0x0a, 0x08, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x73, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x08, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, + 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, + 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, + 0x75, 0x6d, 0x5f, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x75, 0x6d, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xf8, 0x01, 0x0a, 0x18, 0x46, + 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x32, 0x0a, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x07, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x14, 0x6f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x52, 0x13, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x61, + 0x62, 0x6c, 0x65, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x0e, 0x66, + 0x69, 0x78, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, + 0x52, 0x0d, 0x66, 0x69, 0x78, 0x65, 0x64, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x4a, + 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x08, 0x66, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x22, 0xa7, 0x02, 0x0a, 0x0e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x44, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xce, + 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, + 0x61, 0x74, 0x68, 0x12, 0x16, 0x0a, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x73, 0x70, 0x61, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6c, + 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, + 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x19, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x64, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x17, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, + 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, + 0xd0, 0x02, 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xeb, 0x01, 0x0a, 0x0a, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x05, 0x42, 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x62, 0x65, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x62, 0x65, 0x67, + 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x03, 0x65, 0x6e, 0x64, 0x12, 0x52, 0x0a, 0x08, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x52, 0x08, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x22, 0x28, 0x0a, 0x08, 0x53, 0x65, 0x6d, 0x61, + 0x6e, 0x74, 0x69, 0x63, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x53, 0x45, 0x54, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x49, 0x41, 0x53, + 0x10, 0x02, 0x2a, 0xa7, 0x02, 0x0a, 0x07, 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x13, + 0x0a, 0x0f, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4c, + 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x84, 0x07, 0x12, 0x13, 0x0a, 0x0e, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x10, 0xe6, 0x07, 0x12, 0x13, 0x0a, + 0x0e, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x10, + 0xe7, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x30, + 0x32, 0x33, 0x10, 0xe8, 0x07, 0x12, 0x11, 0x0a, 0x0c, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x5f, 0x32, 0x30, 0x32, 0x34, 0x10, 0xe9, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, + 0x01, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x32, 0x5f, 0x54, + 0x45, 0x53, 0x54, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, + 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x37, 0x5f, 0x54, 0x45, 0x53, 0x54, + 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9d, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x38, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, + 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x9e, 0x8d, 0x06, 0x12, 0x1d, 0x0a, 0x17, 0x45, 0x44, 0x49, 0x54, + 0x49, 0x4f, 0x4e, 0x5f, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5f, 0x54, 0x45, 0x53, 0x54, 0x5f, 0x4f, + 0x4e, 0x4c, 0x59, 0x10, 0x9f, 0x8d, 0x06, 0x12, 0x13, 0x0a, 0x0b, 0x45, 0x44, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4d, 0x41, 0x58, 0x10, 0xff, 0xff, 0xff, 0xff, 0x07, 0x42, 0x7e, 0x0a, 0x13, + 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x42, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x48, 0x01, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x6f, 0x72, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, + 0x02, 0x1a, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, } var ( @@ -5227,7 +5243,7 @@ func file_google_protobuf_descriptor_proto_rawDescGZIP() []byte { var file_google_protobuf_descriptor_proto_enumTypes = make([]protoimpl.EnumInfo, 17) var file_google_protobuf_descriptor_proto_msgTypes = make([]protoimpl.MessageInfo, 33) -var file_google_protobuf_descriptor_proto_goTypes = []interface{}{ +var file_google_protobuf_descriptor_proto_goTypes = []any{ (Edition)(0), // 0: google.protobuf.Edition (ExtensionRangeOptions_VerificationState)(0), // 1: google.protobuf.ExtensionRangeOptions.VerificationState (FieldDescriptorProto_Type)(0), // 2: google.protobuf.FieldDescriptorProto.Type @@ -5329,38 +5345,39 @@ var file_google_protobuf_descriptor_proto_depIdxs = []int32{ 36, // 46: google.protobuf.EnumOptions.features:type_name -> google.protobuf.FeatureSet 35, // 47: google.protobuf.EnumOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption 36, // 48: google.protobuf.EnumValueOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 49: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 36, // 50: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 51: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 9, // 52: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel - 36, // 53: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet - 35, // 54: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption - 46, // 55: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart - 10, // 56: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence - 11, // 57: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType - 12, // 58: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding - 13, // 59: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation - 14, // 60: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding - 15, // 61: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat - 47, // 62: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - 0, // 63: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition - 0, // 64: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition - 48, // 65: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location - 49, // 66: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation - 20, // 67: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions - 0, // 68: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition - 0, // 69: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition - 0, // 70: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition - 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition - 0, // 72: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition - 36, // 73: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet - 36, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet - 16, // 75: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic - 76, // [76:76] is the sub-list for method output_type - 76, // [76:76] is the sub-list for method input_type - 76, // [76:76] is the sub-list for extension type_name - 76, // [76:76] is the sub-list for extension extendee - 0, // [0:76] is the sub-list for field type_name + 45, // 49: google.protobuf.EnumValueOptions.feature_support:type_name -> google.protobuf.FieldOptions.FeatureSupport + 35, // 50: google.protobuf.EnumValueOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 36, // 51: google.protobuf.ServiceOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 52: google.protobuf.ServiceOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 9, // 53: google.protobuf.MethodOptions.idempotency_level:type_name -> google.protobuf.MethodOptions.IdempotencyLevel + 36, // 54: google.protobuf.MethodOptions.features:type_name -> google.protobuf.FeatureSet + 35, // 55: google.protobuf.MethodOptions.uninterpreted_option:type_name -> google.protobuf.UninterpretedOption + 46, // 56: google.protobuf.UninterpretedOption.name:type_name -> google.protobuf.UninterpretedOption.NamePart + 10, // 57: google.protobuf.FeatureSet.field_presence:type_name -> google.protobuf.FeatureSet.FieldPresence + 11, // 58: google.protobuf.FeatureSet.enum_type:type_name -> google.protobuf.FeatureSet.EnumType + 12, // 59: google.protobuf.FeatureSet.repeated_field_encoding:type_name -> google.protobuf.FeatureSet.RepeatedFieldEncoding + 13, // 60: google.protobuf.FeatureSet.utf8_validation:type_name -> google.protobuf.FeatureSet.Utf8Validation + 14, // 61: google.protobuf.FeatureSet.message_encoding:type_name -> google.protobuf.FeatureSet.MessageEncoding + 15, // 62: google.protobuf.FeatureSet.json_format:type_name -> google.protobuf.FeatureSet.JsonFormat + 47, // 63: google.protobuf.FeatureSetDefaults.defaults:type_name -> google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + 0, // 64: google.protobuf.FeatureSetDefaults.minimum_edition:type_name -> google.protobuf.Edition + 0, // 65: google.protobuf.FeatureSetDefaults.maximum_edition:type_name -> google.protobuf.Edition + 48, // 66: google.protobuf.SourceCodeInfo.location:type_name -> google.protobuf.SourceCodeInfo.Location + 49, // 67: google.protobuf.GeneratedCodeInfo.annotation:type_name -> google.protobuf.GeneratedCodeInfo.Annotation + 20, // 68: google.protobuf.DescriptorProto.ExtensionRange.options:type_name -> google.protobuf.ExtensionRangeOptions + 0, // 69: google.protobuf.FieldOptions.EditionDefault.edition:type_name -> google.protobuf.Edition + 0, // 70: google.protobuf.FieldOptions.FeatureSupport.edition_introduced:type_name -> google.protobuf.Edition + 0, // 71: google.protobuf.FieldOptions.FeatureSupport.edition_deprecated:type_name -> google.protobuf.Edition + 0, // 72: google.protobuf.FieldOptions.FeatureSupport.edition_removed:type_name -> google.protobuf.Edition + 0, // 73: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.edition:type_name -> google.protobuf.Edition + 36, // 74: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridable_features:type_name -> google.protobuf.FeatureSet + 36, // 75: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixed_features:type_name -> google.protobuf.FeatureSet + 16, // 76: google.protobuf.GeneratedCodeInfo.Annotation.semantic:type_name -> google.protobuf.GeneratedCodeInfo.Annotation.Semantic + 77, // [77:77] is the sub-list for method output_type + 77, // [77:77] is the sub-list for method input_type + 77, // [77:77] is the sub-list for extension type_name + 77, // [77:77] is the sub-list for extension extendee + 0, // [0:77] is the sub-list for field type_name } func init() { file_google_protobuf_descriptor_proto_init() } @@ -5369,7 +5386,7 @@ func file_google_protobuf_descriptor_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorSet); i { case 0: return &v.state @@ -5381,7 +5398,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FileDescriptorProto); i { case 0: return &v.state @@ -5393,7 +5410,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto); i { case 0: return &v.state @@ -5405,7 +5422,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions); i { case 0: return &v.state @@ -5419,7 +5436,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*FieldDescriptorProto); i { case 0: return &v.state @@ -5431,7 +5448,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*OneofDescriptorProto); i { case 0: return &v.state @@ -5443,7 +5460,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto); i { case 0: return &v.state @@ -5455,7 +5472,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*EnumValueDescriptorProto); i { case 0: return &v.state @@ -5467,7 +5484,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*ServiceDescriptorProto); i { case 0: return &v.state @@ -5479,7 +5496,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[9].Exporter = func(v any, i int) any { switch v := v.(*MethodDescriptorProto); i { case 0: return &v.state @@ -5491,7 +5508,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[10].Exporter = func(v any, i int) any { switch v := v.(*FileOptions); i { case 0: return &v.state @@ -5505,7 +5522,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*MessageOptions); i { case 0: return &v.state @@ -5519,7 +5536,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[12].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions); i { case 0: return &v.state @@ -5533,7 +5550,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*OneofOptions); i { case 0: return &v.state @@ -5547,7 +5564,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*EnumOptions); i { case 0: return &v.state @@ -5561,7 +5578,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*EnumValueOptions); i { case 0: return &v.state @@ -5575,7 +5592,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*ServiceOptions); i { case 0: return &v.state @@ -5589,7 +5606,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[17].Exporter = func(v any, i int) any { switch v := v.(*MethodOptions); i { case 0: return &v.state @@ -5603,7 +5620,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[18].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption); i { case 0: return &v.state @@ -5615,7 +5632,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[19].Exporter = func(v any, i int) any { switch v := v.(*FeatureSet); i { case 0: return &v.state @@ -5629,7 +5646,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[20].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults); i { case 0: return &v.state @@ -5641,7 +5658,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[21].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo); i { case 0: return &v.state @@ -5653,7 +5670,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[22].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo); i { case 0: return &v.state @@ -5665,7 +5682,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[23].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ExtensionRange); i { case 0: return &v.state @@ -5677,7 +5694,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[24].Exporter = func(v any, i int) any { switch v := v.(*DescriptorProto_ReservedRange); i { case 0: return &v.state @@ -5689,7 +5706,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[25].Exporter = func(v any, i int) any { switch v := v.(*ExtensionRangeOptions_Declaration); i { case 0: return &v.state @@ -5701,7 +5718,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[26].Exporter = func(v any, i int) any { switch v := v.(*EnumDescriptorProto_EnumReservedRange); i { case 0: return &v.state @@ -5713,7 +5730,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[27].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_EditionDefault); i { case 0: return &v.state @@ -5725,7 +5742,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[28].Exporter = func(v any, i int) any { switch v := v.(*FieldOptions_FeatureSupport); i { case 0: return &v.state @@ -5737,7 +5754,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[29].Exporter = func(v any, i int) any { switch v := v.(*UninterpretedOption_NamePart); i { case 0: return &v.state @@ -5749,7 +5766,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[30].Exporter = func(v any, i int) any { switch v := v.(*FeatureSetDefaults_FeatureSetEditionDefault); i { case 0: return &v.state @@ -5761,7 +5778,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[31].Exporter = func(v any, i int) any { switch v := v.(*SourceCodeInfo_Location); i { case 0: return &v.state @@ -5773,7 +5790,7 @@ func file_google_protobuf_descriptor_proto_init() { return nil } } - file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_descriptor_proto_msgTypes[32].Exporter = func(v any, i int) any { switch v := v.(*GeneratedCodeInfo_Annotation); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go index b0df3fb33..a2ca940c5 100644 --- a/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go +++ b/vendor/google.golang.org/protobuf/types/gofeaturespb/go_features.pb.go @@ -90,27 +90,27 @@ var file_google_protobuf_go_features_proto_rawDesc = []byte{ 0x66, 0x2f, 0x67, 0x6f, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x70, 0x62, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x0a, 0x47, 0x6f, - 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xba, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcd, 0x01, 0x0a, 0x0a, 0x47, 0x6f, + 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x12, 0xbe, 0x01, 0x0a, 0x1a, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x75, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x5f, 0x6a, 0x73, - 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x7d, 0x88, - 0x01, 0x01, 0x98, 0x01, 0x06, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, 0x75, 0x65, 0x18, 0x84, - 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, 0xe7, 0x07, 0xb2, 0x01, - 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x53, 0x4f, - 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, - 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, - 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74, - 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x17, 0x6c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x4a, 0x73, 0x6f, - 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, 0x1b, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x65, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x52, - 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, - 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x70, 0x62, + 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x42, 0x80, 0x01, + 0x88, 0x01, 0x01, 0x98, 0x01, 0x06, 0x98, 0x01, 0x01, 0xa2, 0x01, 0x09, 0x12, 0x04, 0x74, 0x72, + 0x75, 0x65, 0x18, 0x84, 0x07, 0xa2, 0x01, 0x0a, 0x12, 0x05, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x18, + 0xe7, 0x07, 0xb2, 0x01, 0x5b, 0x08, 0xe8, 0x07, 0x10, 0xe8, 0x07, 0x1a, 0x53, 0x54, 0x68, 0x65, + 0x20, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x20, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, + 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, + 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, + 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x52, 0x17, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, + 0x6c, 0x4a, 0x73, 0x6f, 0x6e, 0x45, 0x6e, 0x75, 0x6d, 0x3a, 0x3c, 0x0a, 0x02, 0x67, 0x6f, 0x12, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x53, 0x65, 0x74, 0x18, 0xea, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x47, 0x6f, 0x46, 0x65, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x52, 0x02, 0x67, 0x6f, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x67, 0x6f, 0x66, 0x65, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x70, 0x62, } var ( @@ -126,7 +126,7 @@ func file_google_protobuf_go_features_proto_rawDescGZIP() []byte { } var file_google_protobuf_go_features_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_go_features_proto_goTypes = []interface{}{ +var file_google_protobuf_go_features_proto_goTypes = []any{ (*GoFeatures)(nil), // 0: pb.GoFeatures (*descriptorpb.FeatureSet)(nil), // 1: google.protobuf.FeatureSet } @@ -146,7 +146,7 @@ func file_google_protobuf_go_features_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_go_features_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*GoFeatures); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go index 9de51be54..7172b43d3 100644 --- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go @@ -445,7 +445,7 @@ func file_google_protobuf_any_proto_rawDescGZIP() []byte { } var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_any_proto_goTypes = []interface{}{ +var file_google_protobuf_any_proto_goTypes = []any{ (*Any)(nil), // 0: google.protobuf.Any } var file_google_protobuf_any_proto_depIdxs = []int32{ @@ -462,7 +462,7 @@ func file_google_protobuf_any_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Any); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go index df709a8dd..1b71bcd91 100644 --- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go @@ -323,7 +323,7 @@ func file_google_protobuf_duration_proto_rawDescGZIP() []byte { } var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_duration_proto_goTypes = []interface{}{ +var file_google_protobuf_duration_proto_goTypes = []any{ (*Duration)(nil), // 0: google.protobuf.Duration } var file_google_protobuf_duration_proto_depIdxs = []int32{ @@ -340,7 +340,7 @@ func file_google_protobuf_duration_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Duration); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go index e8789cb33..ac1e91bb6 100644 --- a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go @@ -537,7 +537,7 @@ func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte { } var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_field_mask_proto_goTypes = []interface{}{ +var file_google_protobuf_field_mask_proto_goTypes = []any{ (*FieldMask)(nil), // 0: google.protobuf.FieldMask } var file_google_protobuf_field_mask_proto_depIdxs = []int32{ @@ -554,7 +554,7 @@ func file_google_protobuf_field_mask_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_field_mask_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*FieldMask); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go index d2bac8b88..d45361cbc 100644 --- a/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/structpb/struct.pb.go @@ -49,11 +49,11 @@ // The standard Go "encoding/json" package has functionality to serialize // arbitrary types to a large degree. The Value.AsInterface, Struct.AsMap, and // ListValue.AsSlice methods can convert the protobuf message representation into -// a form represented by interface{}, map[string]interface{}, and []interface{}. +// a form represented by any, map[string]any, and []any. // This form can be used with other packages that operate on such data structures // and also directly with the standard json package. // -// In order to convert the interface{}, map[string]interface{}, and []interface{} +// In order to convert the any, map[string]any, and []any // forms back as Value, Struct, and ListValue messages, use the NewStruct, // NewList, and NewValue constructor functions. // @@ -88,28 +88,28 @@ // // To construct a Value message representing the above JSON object: // -// m, err := structpb.NewValue(map[string]interface{}{ +// m, err := structpb.NewValue(map[string]any{ // "firstName": "John", // "lastName": "Smith", // "isAlive": true, // "age": 27, -// "address": map[string]interface{}{ +// "address": map[string]any{ // "streetAddress": "21 2nd Street", // "city": "New York", // "state": "NY", // "postalCode": "10021-3100", // }, -// "phoneNumbers": []interface{}{ -// map[string]interface{}{ +// "phoneNumbers": []any{ +// map[string]any{ // "type": "home", // "number": "212 555-1234", // }, -// map[string]interface{}{ +// map[string]any{ // "type": "office", // "number": "646 555-4567", // }, // }, -// "children": []interface{}{}, +// "children": []any{}, // "spouse": nil, // }) // if err != nil { @@ -197,7 +197,7 @@ type Struct struct { // NewStruct constructs a Struct from a general-purpose Go map. // The map keys must be valid UTF-8. // The map values are converted using NewValue. -func NewStruct(v map[string]interface{}) (*Struct, error) { +func NewStruct(v map[string]any) (*Struct, error) { x := &Struct{Fields: make(map[string]*Value, len(v))} for k, v := range v { if !utf8.ValidString(k) { @@ -214,9 +214,9 @@ func NewStruct(v map[string]interface{}) (*Struct, error) { // AsMap converts x to a general-purpose Go map. // The map values are converted by calling Value.AsInterface. -func (x *Struct) AsMap() map[string]interface{} { +func (x *Struct) AsMap() map[string]any { f := x.GetFields() - vs := make(map[string]interface{}, len(f)) + vs := make(map[string]any, len(f)) for k, v := range f { vs[k] = v.AsInterface() } @@ -306,13 +306,13 @@ type Value struct { // ║ float32, float64 │ stored as NumberValue ║ // ║ string │ stored as StringValue; must be valid UTF-8 ║ // ║ []byte │ stored as StringValue; base64-encoded ║ -// ║ map[string]interface{} │ stored as StructValue ║ -// ║ []interface{} │ stored as ListValue ║ +// ║ map[string]any │ stored as StructValue ║ +// ║ []any │ stored as ListValue ║ // ╚════════════════════════╧════════════════════════════════════════════╝ // // When converting an int64 or uint64 to a NumberValue, numeric precision loss // is possible since they are stored as a float64. -func NewValue(v interface{}) (*Value, error) { +func NewValue(v any) (*Value, error) { switch v := v.(type) { case nil: return NewNullValue(), nil @@ -342,13 +342,13 @@ func NewValue(v interface{}) (*Value, error) { case []byte: s := base64.StdEncoding.EncodeToString(v) return NewStringValue(s), nil - case map[string]interface{}: + case map[string]any: v2, err := NewStruct(v) if err != nil { return nil, err } return NewStructValue(v2), nil - case []interface{}: + case []any: v2, err := NewList(v) if err != nil { return nil, err @@ -396,7 +396,7 @@ func NewListValue(v *ListValue) *Value { // // Floating-point values (i.e., "NaN", "Infinity", and "-Infinity") are // converted as strings to remain compatible with MarshalJSON. -func (x *Value) AsInterface() interface{} { +func (x *Value) AsInterface() any { switch v := x.GetKind().(type) { case *Value_NumberValue: if v != nil { @@ -580,7 +580,7 @@ type ListValue struct { // NewList constructs a ListValue from a general-purpose Go slice. // The slice elements are converted using NewValue. -func NewList(v []interface{}) (*ListValue, error) { +func NewList(v []any) (*ListValue, error) { x := &ListValue{Values: make([]*Value, len(v))} for i, v := range v { var err error @@ -594,9 +594,9 @@ func NewList(v []interface{}) (*ListValue, error) { // AsSlice converts x to a general-purpose Go slice. // The slice elements are converted by calling Value.AsInterface. -func (x *ListValue) AsSlice() []interface{} { +func (x *ListValue) AsSlice() []any { vals := x.GetValues() - vs := make([]interface{}, len(vals)) + vs := make([]any, len(vals)) for i, v := range vals { vs[i] = v.AsInterface() } @@ -716,7 +716,7 @@ func file_google_protobuf_struct_proto_rawDescGZIP() []byte { var file_google_protobuf_struct_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_google_protobuf_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_google_protobuf_struct_proto_goTypes = []interface{}{ +var file_google_protobuf_struct_proto_goTypes = []any{ (NullValue)(0), // 0: google.protobuf.NullValue (*Struct)(nil), // 1: google.protobuf.Struct (*Value)(nil), // 2: google.protobuf.Value @@ -743,7 +743,7 @@ func file_google_protobuf_struct_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Struct); i { case 0: return &v.state @@ -755,7 +755,7 @@ func file_google_protobuf_struct_proto_init() { return nil } } - file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*Value); i { case 0: return &v.state @@ -767,7 +767,7 @@ func file_google_protobuf_struct_proto_init() { return nil } } - file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_struct_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*ListValue); i { case 0: return &v.state @@ -780,7 +780,7 @@ func file_google_protobuf_struct_proto_init() { } } } - file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []interface{}{ + file_google_protobuf_struct_proto_msgTypes[1].OneofWrappers = []any{ (*Value_NullValue)(nil), (*Value_NumberValue)(nil), (*Value_StringValue)(nil), diff --git a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go index 81511a336..83a5a645b 100644 --- a/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/timestamppb/timestamp.pb.go @@ -332,7 +332,7 @@ func file_google_protobuf_timestamp_proto_rawDescGZIP() []byte { } var file_google_protobuf_timestamp_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_google_protobuf_timestamp_proto_goTypes = []interface{}{ +var file_google_protobuf_timestamp_proto_goTypes = []any{ (*Timestamp)(nil), // 0: google.protobuf.Timestamp } var file_google_protobuf_timestamp_proto_depIdxs = []int32{ @@ -349,7 +349,7 @@ func file_google_protobuf_timestamp_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_timestamp_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*Timestamp); i { case 0: return &v.state diff --git a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go index 762a87130..e473f826a 100644 --- a/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go +++ b/vendor/google.golang.org/protobuf/types/known/wrapperspb/wrappers.pb.go @@ -605,7 +605,7 @@ func file_google_protobuf_wrappers_proto_rawDescGZIP() []byte { } var file_google_protobuf_wrappers_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_google_protobuf_wrappers_proto_goTypes = []interface{}{ +var file_google_protobuf_wrappers_proto_goTypes = []any{ (*DoubleValue)(nil), // 0: google.protobuf.DoubleValue (*FloatValue)(nil), // 1: google.protobuf.FloatValue (*Int64Value)(nil), // 2: google.protobuf.Int64Value @@ -630,7 +630,7 @@ func file_google_protobuf_wrappers_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[0].Exporter = func(v any, i int) any { switch v := v.(*DoubleValue); i { case 0: return &v.state @@ -642,7 +642,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[1].Exporter = func(v any, i int) any { switch v := v.(*FloatValue); i { case 0: return &v.state @@ -654,7 +654,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[2].Exporter = func(v any, i int) any { switch v := v.(*Int64Value); i { case 0: return &v.state @@ -666,7 +666,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[3].Exporter = func(v any, i int) any { switch v := v.(*UInt64Value); i { case 0: return &v.state @@ -678,7 +678,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[4].Exporter = func(v any, i int) any { switch v := v.(*Int32Value); i { case 0: return &v.state @@ -690,7 +690,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[5].Exporter = func(v any, i int) any { switch v := v.(*UInt32Value); i { case 0: return &v.state @@ -702,7 +702,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[6].Exporter = func(v any, i int) any { switch v := v.(*BoolValue); i { case 0: return &v.state @@ -714,7 +714,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[7].Exporter = func(v any, i int) any { switch v := v.(*StringValue); i { case 0: return &v.state @@ -726,7 +726,7 @@ func file_google_protobuf_wrappers_proto_init() { return nil } } - file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_google_protobuf_wrappers_proto_msgTypes[8].Exporter = func(v any, i int) any { switch v := v.(*BytesValue); i { case 0: return &v.state diff --git a/vendor/k8s.io/client-go/tools/remotecommand/websocket.go b/vendor/k8s.io/client-go/tools/remotecommand/websocket.go index a60986dec..49ef4717c 100644 --- a/vendor/k8s.io/client-go/tools/remotecommand/websocket.go +++ b/vendor/k8s.io/client-go/tools/remotecommand/websocket.go @@ -187,6 +187,9 @@ type wsStreamCreator struct { // map of stream id to stream; multiple streams read/write the connection streams map[byte]*stream streamsMu sync.Mutex + // setStreamErr holds the error to return to anyone calling setStreams. + // this is populated in closeAllStreamReaders + setStreamErr error } func newWSStreamCreator(conn *gwebsocket.Conn) *wsStreamCreator { @@ -202,10 +205,14 @@ func (c *wsStreamCreator) getStream(id byte) *stream { return c.streams[id] } -func (c *wsStreamCreator) setStream(id byte, s *stream) { +func (c *wsStreamCreator) setStream(id byte, s *stream) error { c.streamsMu.Lock() defer c.streamsMu.Unlock() + if c.setStreamErr != nil { + return c.setStreamErr + } c.streams[id] = s + return nil } // CreateStream uses id from passed headers to create a stream over "c.conn" connection. @@ -228,7 +235,11 @@ func (c *wsStreamCreator) CreateStream(headers http.Header) (httpstream.Stream, connWriteLock: &c.connWriteLock, id: id, } - c.setStream(id, s) + if err := c.setStream(id, s); err != nil { + _ = s.writePipe.Close() + _ = s.readPipe.Close() + return nil, err + } return s, nil } @@ -312,7 +323,7 @@ func (c *wsStreamCreator) readDemuxLoop(bufferSize int, period time.Duration, de } // closeAllStreamReaders closes readers in all streams. -// This unblocks all stream.Read() calls. +// This unblocks all stream.Read() calls, and keeps any future streams from being created. func (c *wsStreamCreator) closeAllStreamReaders(err error) { c.streamsMu.Lock() defer c.streamsMu.Unlock() @@ -320,6 +331,12 @@ func (c *wsStreamCreator) closeAllStreamReaders(err error) { // Closing writePipe unblocks all readPipe.Read() callers and prevents any future writes. _ = s.writePipe.CloseWithError(err) } + // ensure callers to setStreams receive an error after this point + if err != nil { + c.setStreamErr = err + } else { + c.setStreamErr = fmt.Errorf("closed all streams") + } } type stream struct { diff --git a/vendor/k8s.io/klog/v2/OWNERS b/vendor/k8s.io/klog/v2/OWNERS index a2fe8f351..7500475a6 100644 --- a/vendor/k8s.io/klog/v2/OWNERS +++ b/vendor/k8s.io/klog/v2/OWNERS @@ -1,14 +1,16 @@ # See the OWNERS docs at https://go.k8s.io/owners reviewers: - harshanarayana + - mengjiao-liu - pohly approvers: - dims + - pohly - thockin - - serathius emeritus_approvers: - brancz - justinsb - lavalamp - piosz + - serathius - tallclair diff --git a/vendor/k8s.io/klog/v2/contextual_slog.go b/vendor/k8s.io/klog/v2/contextual_slog.go new file mode 100644 index 000000000..d3b562521 --- /dev/null +++ b/vendor/k8s.io/klog/v2/contextual_slog.go @@ -0,0 +1,31 @@ +//go:build go1.21 +// +build go1.21 + +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package klog + +import ( + "log/slog" + + "github.com/go-logr/logr" +) + +// SetSlogLogger reconfigures klog to log through the slog logger. The logger must not be nil. +func SetSlogLogger(logger *slog.Logger) { + SetLoggerWithOptions(logr.FromSlogHandler(logger.Handler()), ContextualLogger(true)) +} diff --git a/vendor/k8s.io/klog/v2/klog.go b/vendor/k8s.io/klog/v2/klog.go index 72502db3a..47ec9466a 100644 --- a/vendor/k8s.io/klog/v2/klog.go +++ b/vendor/k8s.io/klog/v2/klog.go @@ -14,9 +14,26 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Package klog implements logging analogous to the Google-internal C++ INFO/ERROR/V setup. -// It provides functions Info, Warning, Error, Fatal, plus formatting variants such as -// Infof. It also provides V-style logging controlled by the -v and -vmodule=file=2 flags. +// Package klog contains the following functionality: +// +// - output routing as defined via command line flags ([InitFlags]) +// - log formatting as text, either with a single, unstructured string ([Info], [Infof], etc.) +// or as a structured log entry with message and key/value pairs ([InfoS], etc.) +// - management of a go-logr [Logger] ([SetLogger], [Background], [TODO]) +// - helper functions for logging values ([Format]) and managing the state of klog ([CaptureState], [State.Restore]) +// - wrappers for [logr] APIs for contextual logging where the wrappers can +// be turned into no-ops ([EnableContextualLogging], [NewContext], [FromContext], +// [LoggerWithValues], [LoggerWithName]); if the ability to turn off +// contextual logging is not needed, then go-logr can also be used directly +// - type aliases for go-logr types to simplify imports in code which uses both (e.g. [Logger]) +// - [k8s.io/klog/v2/textlogger]: a logger which uses the same formatting as klog log with +// simpler output routing; beware that it comes with its own command line flags +// and does not use the ones from klog +// - [k8s.io/klog/v2/ktesting]: per-test output in Go unit tests +// - [k8s.io/klog/v2/klogr]: a deprecated, standalone [logr.Logger] on top of the main klog package; +// use [Background] instead if klog output routing is needed, [k8s.io/klog/v2/textlogger] if not +// - [k8s.io/klog/v2/examples]: demos of this functionality +// - [k8s.io/klog/v2/test]: reusable tests for [logr.Logger] implementations // // Basic examples: // @@ -387,13 +404,6 @@ func (t *traceLocation) Set(value string) error { return nil } -// flushSyncWriter is the interface satisfied by logging destinations. -type flushSyncWriter interface { - Flush() error - Sync() error - io.Writer -} - var logging loggingT var commandLine flag.FlagSet @@ -469,7 +479,7 @@ type settings struct { // Access to all of the following fields must be protected via a mutex. // file holds writer for each of the log types. - file [severity.NumSeverity]flushSyncWriter + file [severity.NumSeverity]io.Writer // flushInterval is the interval for periodic flushing. If zero, // the global default will be used. flushInterval time.Duration @@ -814,32 +824,12 @@ func (l *loggingT) printS(err error, s severity.Severity, depth int, msg string, buffer.PutBuffer(b) } -// redirectBuffer is used to set an alternate destination for the logs -type redirectBuffer struct { - w io.Writer -} - -func (rb *redirectBuffer) Sync() error { - return nil -} - -func (rb *redirectBuffer) Flush() error { - return nil -} - -func (rb *redirectBuffer) Write(bytes []byte) (n int, err error) { - return rb.w.Write(bytes) -} - // SetOutput sets the output destination for all severities func SetOutput(w io.Writer) { logging.mu.Lock() defer logging.mu.Unlock() for s := severity.FatalLog; s >= severity.InfoLog; s-- { - rb := &redirectBuffer{ - w: w, - } - logging.file[s] = rb + logging.file[s] = w } } @@ -851,10 +841,7 @@ func SetOutputBySeverity(name string, w io.Writer) { if !ok { panic(fmt.Sprintf("SetOutputBySeverity(%q): unrecognized severity name", name)) } - rb := &redirectBuffer{ - w: w, - } - logging.file[sev] = rb + logging.file[sev] = w } // LogToStderr sets whether to log exclusively to stderr, bypassing outputs @@ -994,7 +981,8 @@ func (l *loggingT) exit(err error) { logExitFunc(err) return } - l.flushAll() + needToSync := l.flushAll() + l.syncAll(needToSync) OsExit(2) } @@ -1011,10 +999,6 @@ type syncBuffer struct { maxbytes uint64 // The max number of bytes this syncBuffer.file can hold before cleaning up. } -func (sb *syncBuffer) Sync() error { - return sb.file.Sync() -} - // CalculateMaxSize returns the real max size in bytes after considering the default max size and the flag options. func CalculateMaxSize() uint64 { if logging.logFile != "" { @@ -1206,24 +1190,45 @@ func StartFlushDaemon(interval time.Duration) { // lockAndFlushAll is like flushAll but locks l.mu first. func (l *loggingT) lockAndFlushAll() { l.mu.Lock() - l.flushAll() + needToSync := l.flushAll() l.mu.Unlock() + // Some environments are slow when syncing and holding the lock might cause contention. + l.syncAll(needToSync) } -// flushAll flushes all the logs and attempts to "sync" their data to disk. +// flushAll flushes all the logs // l.mu is held. -func (l *loggingT) flushAll() { +// +// The result is the number of files which need to be synced and the pointers to them. +func (l *loggingT) flushAll() fileArray { + var needToSync fileArray + // Flush from fatal down, in case there's trouble flushing. for s := severity.FatalLog; s >= severity.InfoLog; s-- { file := l.file[s] - if file != nil { - _ = file.Flush() // ignore error - _ = file.Sync() // ignore error + if sb, ok := file.(*syncBuffer); ok && sb.file != nil { + _ = sb.Flush() // ignore error + needToSync.files[needToSync.num] = sb.file + needToSync.num++ } } if logging.loggerOptions.flush != nil { logging.loggerOptions.flush() } + return needToSync +} + +type fileArray struct { + num int + files [severity.NumSeverity]*os.File +} + +// syncAll attempts to "sync" their data to disk. +func (l *loggingT) syncAll(needToSync fileArray) { + // Flush from fatal down, in case there's trouble flushing. + for i := 0; i < needToSync.num; i++ { + _ = needToSync.files[i].Sync() // ignore error + } } // CopyStandardLogTo arranges for messages written to the Go "log" package's diff --git a/vendor/k8s.io/klog/v2/klogr_slog.go b/vendor/k8s.io/klog/v2/klogr_slog.go index f7bf74030..c77d7baaf 100644 --- a/vendor/k8s.io/klog/v2/klogr_slog.go +++ b/vendor/k8s.io/klog/v2/klogr_slog.go @@ -25,7 +25,7 @@ import ( "strconv" "time" - "github.com/go-logr/logr/slogr" + "github.com/go-logr/logr" "k8s.io/klog/v2/internal/buffer" "k8s.io/klog/v2/internal/serialize" @@ -35,7 +35,7 @@ import ( func (l *klogger) Handle(ctx context.Context, record slog.Record) error { if logging.logger != nil { - if slogSink, ok := logging.logger.GetSink().(slogr.SlogSink); ok { + if slogSink, ok := logging.logger.GetSink().(logr.SlogSink); ok { // Let that logger do the work. return slogSink.Handle(ctx, record) } @@ -77,13 +77,13 @@ func slogOutput(file string, line int, now time.Time, err error, s severity.Seve buffer.PutBuffer(b) } -func (l *klogger) WithAttrs(attrs []slog.Attr) slogr.SlogSink { +func (l *klogger) WithAttrs(attrs []slog.Attr) logr.SlogSink { clone := *l clone.values = serialize.WithValues(l.values, sloghandler.Attrs2KVList(l.groups, attrs)) return &clone } -func (l *klogger) WithGroup(name string) slogr.SlogSink { +func (l *klogger) WithGroup(name string) logr.SlogSink { clone := *l if clone.groups != "" { clone.groups += "." + name @@ -93,4 +93,4 @@ func (l *klogger) WithGroup(name string) slogr.SlogSink { return &clone } -var _ slogr.SlogSink = &klogger{} +var _ logr.SlogSink = &klogger{} diff --git a/vendor/k8s.io/klog/v2/safeptr.go b/vendor/k8s.io/klog/v2/safeptr.go new file mode 100644 index 000000000..bbe24c2e8 --- /dev/null +++ b/vendor/k8s.io/klog/v2/safeptr.go @@ -0,0 +1,34 @@ +//go:build go1.18 +// +build go1.18 + +/* +Copyright 2023 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package klog + +// SafePtr is a function that takes a pointer of any type (T) as an argument. +// If the provided pointer is not nil, it returns the same pointer. If it is nil, it returns nil instead. +// +// This function is particularly useful to prevent nil pointer dereferencing when: +// +// - The type implements interfaces that are called by the logger, such as `fmt.Stringer`. +// - And these interface implementations do not perform nil checks themselves. +func SafePtr[T any](p *T) any { + if p == nil { + return nil + } + return p +} diff --git a/vendor/k8s.io/kube-openapi/pkg/common/common.go b/vendor/k8s.io/kube-openapi/pkg/common/common.go index 2e15e163c..e4ce843b0 100644 --- a/vendor/k8s.io/kube-openapi/pkg/common/common.go +++ b/vendor/k8s.io/kube-openapi/pkg/common/common.go @@ -164,6 +164,9 @@ type OpenAPIV3Config struct { // It is an optional function to customize model names. GetDefinitionName func(name string) (string, spec.Extensions) + // PostProcessSpec runs after the spec is ready to serve. It allows a final modification to the spec before serving. + PostProcessSpec func(*spec3.OpenAPI) (*spec3.OpenAPI, error) + // SecuritySchemes is list of all security schemes for OpenAPI service. SecuritySchemes spec3.SecuritySchemes diff --git a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go index 799d866d5..9887d185b 100644 --- a/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go +++ b/vendor/k8s.io/kube-openapi/pkg/schemaconv/smd.go @@ -214,9 +214,6 @@ func makeUnion(extensions map[string]interface{}) (schema.Union, error) { } } - if union.Discriminator != nil && len(union.Fields) == 0 { - return schema.Union{}, fmt.Errorf("discriminator set to %v, but no fields in union", *union.Discriminator) - } return union, nil } diff --git a/vendor/k8s.io/utils/integer/integer.go b/vendor/k8s.io/utils/integer/integer.go index e4e740cad..e0811e834 100644 --- a/vendor/k8s.io/utils/integer/integer.go +++ b/vendor/k8s.io/utils/integer/integer.go @@ -16,6 +16,8 @@ limitations under the License. package integer +import "math" + // IntMax returns the maximum of the params func IntMax(a, b int) int { if b > a { @@ -65,9 +67,7 @@ func Int64Min(a, b int64) int64 { } // RoundToInt32 rounds floats into integer numbers. +// Deprecated: use math.Round() and a cast directly. func RoundToInt32(a float64) int32 { - if a < 0 { - return int32(a - 0.5) - } - return int32(a + 0.5) + return int32(math.Round(a)) } diff --git a/vendor/k8s.io/utils/trace/trace.go b/vendor/k8s.io/utils/trace/trace.go index 187eb5d8c..559aebb59 100644 --- a/vendor/k8s.io/utils/trace/trace.go +++ b/vendor/k8s.io/utils/trace/trace.go @@ -192,7 +192,7 @@ func (t *Trace) Log() { t.endTime = &endTime t.lock.Unlock() // an explicit logging request should dump all the steps out at the higher level - if t.parentTrace == nil { // We don't start logging until Log or LogIfLong is called on the root trace + if t.parentTrace == nil && klogV(2) { // We don't start logging until Log or LogIfLong is called on the root trace t.logTrace() } } diff --git a/vendor/modules.txt b/vendor/modules.txt index 30b66bb98..bb6aed296 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -4,69 +4,6 @@ github.com/AlessandroPomponio/go-gibberish/analysis github.com/AlessandroPomponio/go-gibberish/consts github.com/AlessandroPomponio/go-gibberish/gibberish github.com/AlessandroPomponio/go-gibberish/structs -# github.com/aws/aws-sdk-go-v2 v1.25.2 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/aws -github.com/aws/aws-sdk-go-v2/aws/defaults -github.com/aws/aws-sdk-go-v2/aws/middleware -github.com/aws/aws-sdk-go-v2/aws/middleware/private/metrics -github.com/aws/aws-sdk-go-v2/aws/protocol/ec2query -github.com/aws/aws-sdk-go-v2/aws/protocol/query -github.com/aws/aws-sdk-go-v2/aws/ratelimit -github.com/aws/aws-sdk-go-v2/aws/retry -github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4 -github.com/aws/aws-sdk-go-v2/aws/signer/v4 -github.com/aws/aws-sdk-go-v2/aws/transport/http -github.com/aws/aws-sdk-go-v2/internal/auth -github.com/aws/aws-sdk-go-v2/internal/auth/smithy -github.com/aws/aws-sdk-go-v2/internal/endpoints -github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn -github.com/aws/aws-sdk-go-v2/internal/rand -github.com/aws/aws-sdk-go-v2/internal/sdk -github.com/aws/aws-sdk-go-v2/internal/strings -github.com/aws/aws-sdk-go-v2/internal/sync/singleflight -github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/credentials v1.17.4 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/credentials -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.2 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.2 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/service/ec2 v1.149.1 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/service/ec2 -github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints -github.com/aws/aws-sdk-go-v2/service/ec2/types -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.2 -## explicit; go 1.20 -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/smithy-go v1.20.1 -## explicit; go 1.20 -github.com/aws/smithy-go -github.com/aws/smithy-go/auth -github.com/aws/smithy-go/auth/bearer -github.com/aws/smithy-go/context -github.com/aws/smithy-go/document -github.com/aws/smithy-go/encoding -github.com/aws/smithy-go/encoding/httpbinding -github.com/aws/smithy-go/encoding/xml -github.com/aws/smithy-go/endpoints -github.com/aws/smithy-go/internal/sync/singleflight -github.com/aws/smithy-go/io -github.com/aws/smithy-go/logging -github.com/aws/smithy-go/middleware -github.com/aws/smithy-go/ptr -github.com/aws/smithy-go/rand -github.com/aws/smithy-go/time -github.com/aws/smithy-go/transport/http -github.com/aws/smithy-go/transport/http/internal/io -github.com/aws/smithy-go/waiter # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile @@ -123,7 +60,7 @@ github.com/cilium/ebpf/rlimit # github.com/davecgh/go-spew v1.1.1 ## explicit github.com/davecgh/go-spew/spew -# github.com/emicklei/go-restful/v3 v3.11.0 +# github.com/emicklei/go-restful/v3 v3.12.1 ## explicit; go 1.13 github.com/emicklei/go-restful/v3 github.com/emicklei/go-restful/v3/log @@ -162,7 +99,6 @@ github.com/gin-gonic/gin/render ## explicit; go 1.18 github.com/go-logr/logr github.com/go-logr/logr/funcr -github.com/go-logr/logr/slogr # github.com/go-logr/stdr v1.2.2 ## explicit; go 1.16 github.com/go-logr/stdr @@ -170,15 +106,15 @@ github.com/go-logr/stdr ## explicit; go 1.12 github.com/go-ole/go-ole github.com/go-ole/go-ole/oleutil -# github.com/go-openapi/jsonpointer v0.19.6 -## explicit; go 1.13 +# github.com/go-openapi/jsonpointer v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonpointer -# github.com/go-openapi/jsonreference v0.20.2 -## explicit; go 1.13 +# github.com/go-openapi/jsonreference v0.21.0 +## explicit; go 1.20 github.com/go-openapi/jsonreference github.com/go-openapi/jsonreference/internal -# github.com/go-openapi/swag v0.22.3 -## explicit; go 1.18 +# github.com/go-openapi/swag v0.23.0 +## explicit; go 1.20 github.com/go-openapi/swag # github.com/go-playground/locales v0.14.1 ## explicit; go 1.17 @@ -281,16 +217,13 @@ github.com/hashicorp/golang-lru/v2/simplelru # github.com/imdario/mergo v0.3.15 ## explicit; go 1.13 github.com/imdario/mergo -# github.com/jmespath/go-jmespath v0.4.0 -## explicit; go 1.14 -github.com/jmespath/go-jmespath # github.com/josharian/intern v1.0.0 ## explicit; go 1.5 github.com/josharian/intern # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/klauspost/compress v1.17.8 +# github.com/klauspost/compress v1.17.9 ## explicit; go 1.20 github.com/klauspost/compress github.com/klauspost/compress/fse @@ -348,10 +281,12 @@ github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.2 ## explicit; go 1.12 github.com/modern-go/reflect2 -# github.com/mostynb/go-grpc-compression v1.2.2 +# github.com/mostynb/go-grpc-compression v1.2.3 ## explicit; go 1.17 github.com/mostynb/go-grpc-compression/internal/snappy +github.com/mostynb/go-grpc-compression/internal/zstd github.com/mostynb/go-grpc-compression/nonclobbering/snappy +github.com/mostynb/go-grpc-compression/nonclobbering/zstd # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg @@ -382,7 +317,7 @@ github.com/prometheus/client_golang/prometheus/promhttp # github.com/prometheus/client_model v0.6.1 ## explicit; go 1.19 github.com/prometheus/client_model/go -# github.com/prometheus/common v0.53.0 +# github.com/prometheus/common v0.54.0 ## explicit; go 1.20 github.com/prometheus/common/expfmt github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg @@ -470,55 +405,55 @@ github.com/yl2chen/cidranger/net # github.com/yusufpapurcu/wmi v1.2.4 ## explicit; go 1.16 github.com/yusufpapurcu/wmi -# go.opentelemetry.io/collector v0.102.1 +# go.opentelemetry.io/collector v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/client go.opentelemetry.io/collector/internal/httphelper go.opentelemetry.io/collector/internal/localhostgate go.opentelemetry.io/collector/internal/obsreportconfig/obsmetrics -# go.opentelemetry.io/collector/component v0.102.1 +# go.opentelemetry.io/collector/component v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/component -# go.opentelemetry.io/collector/config/configauth v0.102.1 +# go.opentelemetry.io/collector/config/configauth v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configauth -# go.opentelemetry.io/collector/config/configcompression v1.9.0 +# go.opentelemetry.io/collector/config/configcompression v1.11.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configcompression -# go.opentelemetry.io/collector/config/configgrpc v0.102.1 +# go.opentelemetry.io/collector/config/configgrpc v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configgrpc -go.opentelemetry.io/collector/config/configgrpc/internal -# go.opentelemetry.io/collector/config/confighttp v0.102.1 +# go.opentelemetry.io/collector/config/confighttp v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/confighttp -# go.opentelemetry.io/collector/config/confignet v0.102.1 +# go.opentelemetry.io/collector/config/confignet v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/confignet -# go.opentelemetry.io/collector/config/configopaque v1.9.0 +# go.opentelemetry.io/collector/config/configopaque v1.11.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configopaque -# go.opentelemetry.io/collector/config/configretry v0.102.1 +# go.opentelemetry.io/collector/config/configretry v1.11.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configretry -# go.opentelemetry.io/collector/config/configtelemetry v0.102.1 +# go.opentelemetry.io/collector/config/configtelemetry v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configtelemetry -# go.opentelemetry.io/collector/config/configtls v0.102.1 +# go.opentelemetry.io/collector/config/configtls v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/configtls -# go.opentelemetry.io/collector/config/internal v0.102.1 +# go.opentelemetry.io/collector/config/internal v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/config/internal -# go.opentelemetry.io/collector/confmap v0.102.1 +# go.opentelemetry.io/collector/confmap v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/confmap +go.opentelemetry.io/collector/confmap/internal go.opentelemetry.io/collector/confmap/internal/mapstructure -# go.opentelemetry.io/collector/consumer v0.102.1 +# go.opentelemetry.io/collector/consumer v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/consumer go.opentelemetry.io/collector/consumer/consumererror -# go.opentelemetry.io/collector/exporter v0.102.1 +# go.opentelemetry.io/collector/exporter v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/exporter go.opentelemetry.io/collector/exporter/exporterbatcher @@ -527,34 +462,36 @@ go.opentelemetry.io/collector/exporter/exporterhelper/internal/metadata go.opentelemetry.io/collector/exporter/exporterqueue go.opentelemetry.io/collector/exporter/internal/experr go.opentelemetry.io/collector/exporter/internal/queue -# go.opentelemetry.io/collector/exporter/otlpexporter v0.102.1 +# go.opentelemetry.io/collector/exporter/otlpexporter v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/exporter/otlpexporter go.opentelemetry.io/collector/exporter/otlpexporter/internal/metadata -# go.opentelemetry.io/collector/exporter/otlphttpexporter v0.102.1 +# go.opentelemetry.io/collector/exporter/otlphttpexporter v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/exporter/otlphttpexporter go.opentelemetry.io/collector/exporter/otlphttpexporter/internal/metadata -# go.opentelemetry.io/collector/extension v0.102.1 +# go.opentelemetry.io/collector/extension v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/extension go.opentelemetry.io/collector/extension/experimental/storage -# go.opentelemetry.io/collector/extension/auth v0.102.1 +# go.opentelemetry.io/collector/extension/auth v0.104.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/extension/auth -# go.opentelemetry.io/collector/featuregate v1.9.0 +# go.opentelemetry.io/collector/featuregate v1.11.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/featuregate -# go.opentelemetry.io/collector/pdata v1.9.0 +# go.opentelemetry.io/collector/pdata v1.11.0 ## explicit; go 1.21.0 go.opentelemetry.io/collector/pdata/internal go.opentelemetry.io/collector/pdata/internal/data go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1 go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1 +go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1experimental go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1 go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1 go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1 go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1 +go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1experimental go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1 go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1 go.opentelemetry.io/collector/pdata/internal/json @@ -566,6 +503,9 @@ go.opentelemetry.io/collector/pdata/pmetric go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp go.opentelemetry.io/collector/pdata/ptrace go.opentelemetry.io/collector/pdata/ptrace/ptraceotlp +# go.opentelemetry.io/contrib/detectors/aws/eks v1.28.0 +## explicit; go 1.21 +go.opentelemetry.io/contrib/detectors/aws/eks # go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.52.0 ## explicit; go 1.21 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc @@ -575,7 +515,7 @@ go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/inte go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil -# go.opentelemetry.io/otel v1.27.0 => github.com/grafana/opentelemetry-go v1.27.0-grafana.1 +# go.opentelemetry.io/otel v1.28.0 => github.com/grafana/opentelemetry-go v1.28.0-grafana.2 ## explicit; go 1.21 go.opentelemetry.io/otel go.opentelemetry.io/otel/attribute @@ -590,7 +530,8 @@ go.opentelemetry.io/otel/semconv/v1.17.0 go.opentelemetry.io/otel/semconv/v1.19.0 go.opentelemetry.io/otel/semconv/v1.20.0 go.opentelemetry.io/otel/semconv/v1.25.0 -# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.27.0 +go.opentelemetry.io/otel/semconv/v1.26.0 +# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal @@ -598,7 +539,7 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/envco go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/oconf go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/retry go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal/transform -# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.27.0 +# go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal @@ -606,38 +547,38 @@ go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/envco go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/oconf go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/retry go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal/transform -# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.27.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/exporters/otlp/otlptrace go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/tracetransform -# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.27.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/envconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal/retry -# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.27.0 +# go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.28.0 ## explicit; go 1.21 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/envconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal/retry -# go.opentelemetry.io/otel/metric v1.27.0 => github.com/grafana/opentelemetry-go/metric v1.27.0-grafana.1 +# go.opentelemetry.io/otel/metric v1.28.0 => github.com/grafana/opentelemetry-go/metric v1.28.0-grafana.2 ## explicit; go 1.21 go.opentelemetry.io/otel/metric go.opentelemetry.io/otel/metric/embedded go.opentelemetry.io/otel/metric/noop -# go.opentelemetry.io/otel/sdk v1.27.0 => github.com/grafana/opentelemetry-go/sdk v1.27.0-grafana.1 +# go.opentelemetry.io/otel/sdk v1.28.0 => github.com/grafana/opentelemetry-go/sdk v1.28.0-grafana.2 ## explicit; go 1.21 go.opentelemetry.io/otel/sdk go.opentelemetry.io/otel/sdk/instrumentation -go.opentelemetry.io/otel/sdk/internal go.opentelemetry.io/otel/sdk/internal/env +go.opentelemetry.io/otel/sdk/internal/x go.opentelemetry.io/otel/sdk/resource go.opentelemetry.io/otel/sdk/trace -# go.opentelemetry.io/otel/sdk/metric v1.27.0 => github.com/grafana/opentelemetry-go/sdk/metric v1.27.0-grafana.1 +# go.opentelemetry.io/otel/sdk/metric v1.28.0 => github.com/grafana/opentelemetry-go/sdk/metric v1.28.0-grafana.2 ## explicit; go 1.21 go.opentelemetry.io/otel/sdk/metric go.opentelemetry.io/otel/sdk/metric/internal @@ -645,12 +586,12 @@ go.opentelemetry.io/otel/sdk/metric/internal/aggregate go.opentelemetry.io/otel/sdk/metric/internal/exemplar go.opentelemetry.io/otel/sdk/metric/internal/x go.opentelemetry.io/otel/sdk/metric/metricdata -# go.opentelemetry.io/otel/trace v1.27.0 => github.com/grafana/opentelemetry-go/trace v1.27.0-grafana.1 +# go.opentelemetry.io/otel/trace v1.28.0 => github.com/grafana/opentelemetry-go/trace v1.28.0-grafana.2 ## explicit; go 1.21 go.opentelemetry.io/otel/trace go.opentelemetry.io/otel/trace/embedded go.opentelemetry.io/otel/trace/noop -# go.opentelemetry.io/proto/otlp v1.2.0 +# go.opentelemetry.io/proto/otlp v1.3.1 ## explicit; go 1.17 go.opentelemetry.io/proto/otlp/collector/metrics/v1 go.opentelemetry.io/proto/otlp/collector/trace/v1 @@ -676,7 +617,7 @@ go.uber.org/zap/zapcore ## explicit; go 1.18 golang.org/x/arch/arm64/arm64asm golang.org/x/arch/x86/x86asm -# golang.org/x/crypto v0.23.0 +# golang.org/x/crypto v0.24.0 ## explicit; go 1.18 golang.org/x/crypto/sha3 # golang.org/x/exp v0.0.0-20230224173230-c95f2b4c22f2 @@ -684,10 +625,10 @@ golang.org/x/crypto/sha3 golang.org/x/exp/constraints golang.org/x/exp/maps golang.org/x/exp/slices -# golang.org/x/mod v0.15.0 +# golang.org/x/mod v0.17.0 ## explicit; go 1.18 golang.org/x/mod/semver -# golang.org/x/net v0.25.0 +# golang.org/x/net v0.26.0 ## explicit; go 1.18 golang.org/x/net/html golang.org/x/net/html/atom @@ -699,22 +640,23 @@ golang.org/x/net/idna golang.org/x/net/internal/socks golang.org/x/net/internal/timeseries golang.org/x/net/proxy +golang.org/x/net/publicsuffix golang.org/x/net/trace -# golang.org/x/oauth2 v0.20.0 +# golang.org/x/oauth2 v0.21.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/internal -# golang.org/x/sys v0.20.0 +# golang.org/x/sys v0.21.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.20.0 +# golang.org/x/term v0.21.0 ## explicit; go 1.18 golang.org/x/term -# golang.org/x/text v0.15.0 +# golang.org/x/text v0.16.0 ## explicit; go 1.18 golang.org/x/text/internal/language golang.org/x/text/internal/language/compact @@ -724,13 +666,13 @@ golang.org/x/text/secure/bidirule golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm -# golang.org/x/time v0.3.0 -## explicit +# golang.org/x/time v0.5.0 +## explicit; go 1.18 golang.org/x/time/rate -# google.golang.org/genproto/googleapis/api v0.0.0-20240520151616-dc85e6b867a5 +# google.golang.org/genproto/googleapis/api v0.0.0-20240701130421-f6361c86f094 ## explicit; go 1.20 google.golang.org/genproto/googleapis/api/httpbody -# google.golang.org/genproto/googleapis/rpc v0.0.0-20240520151616-dc85e6b867a5 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 ## explicit; go 1.20 google.golang.org/genproto/googleapis/rpc/errdetails google.golang.org/genproto/googleapis/rpc/status @@ -789,8 +731,8 @@ google.golang.org/grpc/serviceconfig google.golang.org/grpc/stats google.golang.org/grpc/status google.golang.org/grpc/tap -# google.golang.org/protobuf v1.34.1 -## explicit; go 1.17 +# google.golang.org/protobuf v1.34.2 +## explicit; go 1.20 google.golang.org/protobuf/encoding/protodelim google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext @@ -840,7 +782,7 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 -# k8s.io/api v0.29.3 +# k8s.io/api v0.29.4 ## explicit; go 1.21 k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1alpha1 @@ -894,7 +836,7 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apimachinery v0.29.3 +# k8s.io/apimachinery v0.29.4 ## explicit; go 1.21 k8s.io/apimachinery/pkg/api/equality k8s.io/apimachinery/pkg/api/errors @@ -950,7 +892,7 @@ k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/netutil k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/client-go v0.29.3 +# k8s.io/client-go v0.29.4 ## explicit; go 1.21 k8s.io/client-go/applyconfigurations/admissionregistration/v1 k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1 @@ -1255,8 +1197,8 @@ k8s.io/client-go/util/flowcontrol k8s.io/client-go/util/homedir k8s.io/client-go/util/keyutil k8s.io/client-go/util/workqueue -# k8s.io/klog/v2 v2.110.1 -## explicit; go 1.13 +# k8s.io/klog/v2 v2.130.1 +## explicit; go 1.18 k8s.io/klog/v2 k8s.io/klog/v2/internal/buffer k8s.io/klog/v2/internal/clock @@ -1264,8 +1206,8 @@ k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler -# k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 -## explicit; go 1.19 +# k8s.io/kube-openapi v0.0.0-20240620174524-b456828f718b +## explicit; go 1.20 k8s.io/kube-openapi/pkg/cached k8s.io/kube-openapi/pkg/common k8s.io/kube-openapi/pkg/handler3 @@ -1275,7 +1217,7 @@ k8s.io/kube-openapi/pkg/schemaconv k8s.io/kube-openapi/pkg/spec3 k8s.io/kube-openapi/pkg/util/proto k8s.io/kube-openapi/pkg/validation/spec -# k8s.io/utils v0.0.0-20230726121419-3b25d923346b +# k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 ## explicit; go 1.18 k8s.io/utils/buffer k8s.io/utils/clock @@ -1323,11 +1265,12 @@ sigs.k8s.io/structured-merge-diff/v4/merge sigs.k8s.io/structured-merge-diff/v4/schema sigs.k8s.io/structured-merge-diff/v4/typed sigs.k8s.io/structured-merge-diff/v4/value -# sigs.k8s.io/yaml v1.3.0 +# sigs.k8s.io/yaml v1.4.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# go.opentelemetry.io/otel => github.com/grafana/opentelemetry-go v1.27.0-grafana.1 -# go.opentelemetry.io/otel/metric => github.com/grafana/opentelemetry-go/metric v1.27.0-grafana.1 -# go.opentelemetry.io/otel/trace => github.com/grafana/opentelemetry-go/trace v1.27.0-grafana.1 -# go.opentelemetry.io/otel/sdk => github.com/grafana/opentelemetry-go/sdk v1.27.0-grafana.1 -# go.opentelemetry.io/otel/sdk/metric => github.com/grafana/opentelemetry-go/sdk/metric v1.27.0-grafana.1 +sigs.k8s.io/yaml/goyaml.v2 +# go.opentelemetry.io/otel => github.com/grafana/opentelemetry-go v1.28.0-grafana.2 +# go.opentelemetry.io/otel/metric => github.com/grafana/opentelemetry-go/metric v1.28.0-grafana.2 +# go.opentelemetry.io/otel/trace => github.com/grafana/opentelemetry-go/trace v1.28.0-grafana.2 +# go.opentelemetry.io/otel/sdk => github.com/grafana/opentelemetry-go/sdk v1.28.0-grafana.2 +# go.opentelemetry.io/otel/sdk/metric => github.com/grafana/opentelemetry-go/sdk/metric v1.28.0-grafana.2 diff --git a/vendor/sigs.k8s.io/yaml/LICENSE b/vendor/sigs.k8s.io/yaml/LICENSE index 7805d36de..093d6d3ed 100644 --- a/vendor/sigs.k8s.io/yaml/LICENSE +++ b/vendor/sigs.k8s.io/yaml/LICENSE @@ -48,3 +48,259 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# The forked go-yaml.v3 library under this project is covered by two +different licenses (MIT and Apache): + +#### MIT License #### + +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original MIT license, with the additional +copyright staring in 2011 when the project was ported over: + + apic.go emitterc.go parserc.go readerc.go scannerc.go + writerc.go yamlh.go yamlprivateh.go + +Copyright (c) 2006-2010 Kirill Simonov +Copyright (c) 2006-2011 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +### Apache License ### + +All the remaining project files are covered by the Apache license: + +Copyright (c) 2011-2019 Canonical Ltd + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +# The forked go-yaml.v2 library under the project is covered by an +Apache license: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/sigs.k8s.io/yaml/OWNERS b/vendor/sigs.k8s.io/yaml/OWNERS index 325b40b07..003a149e1 100644 --- a/vendor/sigs.k8s.io/yaml/OWNERS +++ b/vendor/sigs.k8s.io/yaml/OWNERS @@ -2,26 +2,22 @@ approvers: - dims -- lavalamp +- jpbetz - smarterclayton - deads2k - sttts - liggitt -- caesarxuchao reviewers: - dims - thockin -- lavalamp +- jpbetz - smarterclayton - wojtek-t - deads2k - derekwaynecarr -- caesarxuchao - mikedanese - liggitt -- gmarek - sttts -- ncdc - tallclair labels: - sig/api-machinery diff --git a/vendor/sigs.k8s.io/yaml/fields.go b/vendor/sigs.k8s.io/yaml/fields.go index 235b7f2cf..0ea28bd03 100644 --- a/vendor/sigs.k8s.io/yaml/fields.go +++ b/vendor/sigs.k8s.io/yaml/fields.go @@ -16,53 +16,53 @@ import ( "unicode/utf8" ) -// indirect walks down v allocating pointers as needed, +// indirect walks down 'value' allocating pointers as needed, // until it gets to a non-pointer. // if it encounters an Unmarshaler, indirect stops and returns that. // if decodingNull is true, indirect stops at the last pointer so it can be set to nil. -func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { - // If v is a named type and is addressable, +func indirect(value reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { + // If 'value' is a named type and is addressable, // start with its address, so that if the type has pointer methods, // we find them. - if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { - v = v.Addr() + if value.Kind() != reflect.Ptr && value.Type().Name() != "" && value.CanAddr() { + value = value.Addr() } for { // Load value from interface, but only if the result will be // usefully addressable. - if v.Kind() == reflect.Interface && !v.IsNil() { - e := v.Elem() - if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) { - v = e + if value.Kind() == reflect.Interface && !value.IsNil() { + element := value.Elem() + if element.Kind() == reflect.Ptr && !element.IsNil() && (!decodingNull || element.Elem().Kind() == reflect.Ptr) { + value = element continue } } - if v.Kind() != reflect.Ptr { + if value.Kind() != reflect.Ptr { break } - if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() { + if value.Elem().Kind() != reflect.Ptr && decodingNull && value.CanSet() { break } - if v.IsNil() { - if v.CanSet() { - v.Set(reflect.New(v.Type().Elem())) + if value.IsNil() { + if value.CanSet() { + value.Set(reflect.New(value.Type().Elem())) } else { - v = reflect.New(v.Type().Elem()) + value = reflect.New(value.Type().Elem()) } } - if v.Type().NumMethod() > 0 { - if u, ok := v.Interface().(json.Unmarshaler); ok { + if value.Type().NumMethod() > 0 { + if u, ok := value.Interface().(json.Unmarshaler); ok { return u, nil, reflect.Value{} } - if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { + if u, ok := value.Interface().(encoding.TextUnmarshaler); ok { return nil, u, reflect.Value{} } } - v = v.Elem() + value = value.Elem() } - return nil, nil, v + return nil, nil, value } // A field represents a single field found in a struct. @@ -134,8 +134,8 @@ func typeFields(t reflect.Type) []field { next := []field{{typ: t}} // Count of queued names for current level and the next. - count := map[reflect.Type]int{} - nextCount := map[reflect.Type]int{} + var count map[reflect.Type]int + var nextCount map[reflect.Type]int // Types already visited at an earlier level. visited := map[reflect.Type]bool{} @@ -348,8 +348,9 @@ const ( // 4) simpleLetterEqualFold, no specials, no non-letters. // // The letters S and K are special because they map to 3 runes, not just 2: -// * S maps to s and to U+017F 'ſ' Latin small letter long s -// * k maps to K and to U+212A 'K' Kelvin sign +// - S maps to s and to U+017F 'ſ' Latin small letter long s +// - k maps to K and to U+212A 'K' Kelvin sign +// // See http://play.golang.org/p/tTxjOc0OGo // // The returned function is specialized for matching against s and @@ -420,10 +421,8 @@ func equalFoldRight(s, t []byte) bool { t = t[size:] } - if len(t) > 0 { - return false - } - return true + + return len(t) <= 0 } // asciiEqualFold is a specialization of bytes.EqualFold for use when diff --git a/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt b/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE similarity index 99% rename from vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt rename to vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE index d64569567..8dada3eda 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE @@ -1,4 +1,3 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -179,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -187,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE.libyaml b/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE.libyaml new file mode 100644 index 000000000..8da58fbf6 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/LICENSE.libyaml @@ -0,0 +1,31 @@ +The following files were ported to Go from C files of libyaml, and thus +are still covered by their original copyright and license: + + apic.go + emitterc.go + parserc.go + readerc.go + scannerc.go + writerc.go + yamlh.go + yamlprivateh.go + +Copyright (c) 2006 Kirill Simonov + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/jmespath/go-jmespath/LICENSE b/vendor/sigs.k8s.io/yaml/goyaml.v2/NOTICE similarity index 93% rename from vendor/github.com/jmespath/go-jmespath/LICENSE rename to vendor/sigs.k8s.io/yaml/goyaml.v2/NOTICE index b03310a91..866d74a7a 100644 --- a/vendor/github.com/jmespath/go-jmespath/LICENSE +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/NOTICE @@ -1,4 +1,4 @@ -Copyright 2015 James Saryerwinnie +Copyright 2011-2016 Canonical Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/OWNERS b/vendor/sigs.k8s.io/yaml/goyaml.v2/OWNERS new file mode 100644 index 000000000..73be0a3a9 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/OWNERS @@ -0,0 +1,24 @@ +# See the OWNERS docs at https://go.k8s.io/owners + +approvers: +- dims +- jpbetz +- smarterclayton +- deads2k +- sttts +- liggitt +- natasha41575 +- knverey +reviewers: +- dims +- thockin +- jpbetz +- smarterclayton +- deads2k +- derekwaynecarr +- mikedanese +- liggitt +- sttts +- tallclair +labels: +- sig/api-machinery diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/README.md b/vendor/sigs.k8s.io/yaml/goyaml.v2/README.md new file mode 100644 index 000000000..53f4139dc --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/README.md @@ -0,0 +1,143 @@ +# go-yaml fork + +This package is a fork of the go-yaml library and is intended solely for consumption +by kubernetes projects. In this fork, we plan to support only critical changes required for +kubernetes, such as small bug fixes and regressions. Larger, general-purpose feature requests +should be made in the upstream go-yaml library, and we will reject such changes in this fork +unless we are pulling them from upstream. + +This fork is based on v2.4.0: https://github.com/go-yaml/yaml/releases/tag/v2.4.0 + +# YAML support for the Go language + +Introduction +------------ + +The yaml package enables Go programs to comfortably encode and decode YAML +values. It was developed within [Canonical](https://www.canonical.com) as +part of the [juju](https://juju.ubuntu.com) project, and is based on a +pure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML) +C library to parse and generate YAML data quickly and reliably. + +Compatibility +------------- + +The yaml package supports most of YAML 1.1 and 1.2, including support for +anchors, tags, map merging, etc. Multi-document unmarshalling is not yet +implemented, and base-60 floats from YAML 1.1 are purposefully not +supported since they're a poor design and are gone in YAML 1.2. + +Installation and usage +---------------------- + +The import path for the package is *gopkg.in/yaml.v2*. + +To install it, run: + + go get gopkg.in/yaml.v2 + +API documentation +----------------- + +If opened in a browser, the import path itself leads to the API documentation: + + * [https://gopkg.in/yaml.v2](https://gopkg.in/yaml.v2) + +API stability +------------- + +The package API for yaml v2 will remain stable as described in [gopkg.in](https://gopkg.in). + + +License +------- + +The yaml package is licensed under the Apache License 2.0. Please see the LICENSE file for details. + + +Example +------- + +```Go +package main + +import ( + "fmt" + "log" + + "gopkg.in/yaml.v2" +) + +var data = ` +a: Easy! +b: + c: 2 + d: [3, 4] +` + +// Note: struct fields must be public in order for unmarshal to +// correctly populate the data. +type T struct { + A string + B struct { + RenamedC int `yaml:"c"` + D []int `yaml:",flow"` + } +} + +func main() { + t := T{} + + err := yaml.Unmarshal([]byte(data), &t) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- t:\n%v\n\n", t) + + d, err := yaml.Marshal(&t) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- t dump:\n%s\n\n", string(d)) + + m := make(map[interface{}]interface{}) + + err = yaml.Unmarshal([]byte(data), &m) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- m:\n%v\n\n", m) + + d, err = yaml.Marshal(&m) + if err != nil { + log.Fatalf("error: %v", err) + } + fmt.Printf("--- m dump:\n%s\n\n", string(d)) +} +``` + +This example will generate the following output: + +``` +--- t: +{Easy! {2 [3 4]}} + +--- t dump: +a: Easy! +b: + c: 2 + d: [3, 4] + + +--- m: +map[a:Easy! b:map[c:2 d:[3 4]]] + +--- m dump: +a: Easy! +b: + c: 2 + d: + - 3 + - 4 +``` + diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go new file mode 100644 index 000000000..acf71402c --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/apic.go @@ -0,0 +1,744 @@ +package yaml + +import ( + "io" +) + +func yaml_insert_token(parser *yaml_parser_t, pos int, token *yaml_token_t) { + //fmt.Println("yaml_insert_token", "pos:", pos, "typ:", token.typ, "head:", parser.tokens_head, "len:", len(parser.tokens)) + + // Check if we can move the queue at the beginning of the buffer. + if parser.tokens_head > 0 && len(parser.tokens) == cap(parser.tokens) { + if parser.tokens_head != len(parser.tokens) { + copy(parser.tokens, parser.tokens[parser.tokens_head:]) + } + parser.tokens = parser.tokens[:len(parser.tokens)-parser.tokens_head] + parser.tokens_head = 0 + } + parser.tokens = append(parser.tokens, *token) + if pos < 0 { + return + } + copy(parser.tokens[parser.tokens_head+pos+1:], parser.tokens[parser.tokens_head+pos:]) + parser.tokens[parser.tokens_head+pos] = *token +} + +// Create a new parser object. +func yaml_parser_initialize(parser *yaml_parser_t) bool { + *parser = yaml_parser_t{ + raw_buffer: make([]byte, 0, input_raw_buffer_size), + buffer: make([]byte, 0, input_buffer_size), + } + return true +} + +// Destroy a parser object. +func yaml_parser_delete(parser *yaml_parser_t) { + *parser = yaml_parser_t{} +} + +// String read handler. +func yaml_string_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + if parser.input_pos == len(parser.input) { + return 0, io.EOF + } + n = copy(buffer, parser.input[parser.input_pos:]) + parser.input_pos += n + return n, nil +} + +// Reader read handler. +func yaml_reader_read_handler(parser *yaml_parser_t, buffer []byte) (n int, err error) { + return parser.input_reader.Read(buffer) +} + +// Set a string input. +func yaml_parser_set_input_string(parser *yaml_parser_t, input []byte) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_string_read_handler + parser.input = input + parser.input_pos = 0 +} + +// Set a file input. +func yaml_parser_set_input_reader(parser *yaml_parser_t, r io.Reader) { + if parser.read_handler != nil { + panic("must set the input source only once") + } + parser.read_handler = yaml_reader_read_handler + parser.input_reader = r +} + +// Set the source encoding. +func yaml_parser_set_encoding(parser *yaml_parser_t, encoding yaml_encoding_t) { + if parser.encoding != yaml_ANY_ENCODING { + panic("must set the encoding only once") + } + parser.encoding = encoding +} + +var disableLineWrapping = false + +// Create a new emitter object. +func yaml_emitter_initialize(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{ + buffer: make([]byte, output_buffer_size), + raw_buffer: make([]byte, 0, output_raw_buffer_size), + states: make([]yaml_emitter_state_t, 0, initial_stack_size), + events: make([]yaml_event_t, 0, initial_queue_size), + } + if disableLineWrapping { + emitter.best_width = -1 + } +} + +// Destroy an emitter object. +func yaml_emitter_delete(emitter *yaml_emitter_t) { + *emitter = yaml_emitter_t{} +} + +// String write handler. +func yaml_string_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + *emitter.output_buffer = append(*emitter.output_buffer, buffer...) + return nil +} + +// yaml_writer_write_handler uses emitter.output_writer to write the +// emitted text. +func yaml_writer_write_handler(emitter *yaml_emitter_t, buffer []byte) error { + _, err := emitter.output_writer.Write(buffer) + return err +} + +// Set a string output. +func yaml_emitter_set_output_string(emitter *yaml_emitter_t, output_buffer *[]byte) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_string_write_handler + emitter.output_buffer = output_buffer +} + +// Set a file output. +func yaml_emitter_set_output_writer(emitter *yaml_emitter_t, w io.Writer) { + if emitter.write_handler != nil { + panic("must set the output target only once") + } + emitter.write_handler = yaml_writer_write_handler + emitter.output_writer = w +} + +// Set the output encoding. +func yaml_emitter_set_encoding(emitter *yaml_emitter_t, encoding yaml_encoding_t) { + if emitter.encoding != yaml_ANY_ENCODING { + panic("must set the output encoding only once") + } + emitter.encoding = encoding +} + +// Set the canonical output style. +func yaml_emitter_set_canonical(emitter *yaml_emitter_t, canonical bool) { + emitter.canonical = canonical +} + +//// Set the indentation increment. +func yaml_emitter_set_indent(emitter *yaml_emitter_t, indent int) { + if indent < 2 || indent > 9 { + indent = 2 + } + emitter.best_indent = indent +} + +// Set the preferred line width. +func yaml_emitter_set_width(emitter *yaml_emitter_t, width int) { + if width < 0 { + width = -1 + } + emitter.best_width = width +} + +// Set if unescaped non-ASCII characters are allowed. +func yaml_emitter_set_unicode(emitter *yaml_emitter_t, unicode bool) { + emitter.unicode = unicode +} + +// Set the preferred line break character. +func yaml_emitter_set_break(emitter *yaml_emitter_t, line_break yaml_break_t) { + emitter.line_break = line_break +} + +///* +// * Destroy a token object. +// */ +// +//YAML_DECLARE(void) +//yaml_token_delete(yaml_token_t *token) +//{ +// assert(token); // Non-NULL token object expected. +// +// switch (token.type) +// { +// case YAML_TAG_DIRECTIVE_TOKEN: +// yaml_free(token.data.tag_directive.handle); +// yaml_free(token.data.tag_directive.prefix); +// break; +// +// case YAML_ALIAS_TOKEN: +// yaml_free(token.data.alias.value); +// break; +// +// case YAML_ANCHOR_TOKEN: +// yaml_free(token.data.anchor.value); +// break; +// +// case YAML_TAG_TOKEN: +// yaml_free(token.data.tag.handle); +// yaml_free(token.data.tag.suffix); +// break; +// +// case YAML_SCALAR_TOKEN: +// yaml_free(token.data.scalar.value); +// break; +// +// default: +// break; +// } +// +// memset(token, 0, sizeof(yaml_token_t)); +//} +// +///* +// * Check if a string is a valid UTF-8 sequence. +// * +// * Check 'reader.c' for more details on UTF-8 encoding. +// */ +// +//static int +//yaml_check_utf8(yaml_char_t *start, size_t length) +//{ +// yaml_char_t *end = start+length; +// yaml_char_t *pointer = start; +// +// while (pointer < end) { +// unsigned char octet; +// unsigned int width; +// unsigned int value; +// size_t k; +// +// octet = pointer[0]; +// width = (octet & 0x80) == 0x00 ? 1 : +// (octet & 0xE0) == 0xC0 ? 2 : +// (octet & 0xF0) == 0xE0 ? 3 : +// (octet & 0xF8) == 0xF0 ? 4 : 0; +// value = (octet & 0x80) == 0x00 ? octet & 0x7F : +// (octet & 0xE0) == 0xC0 ? octet & 0x1F : +// (octet & 0xF0) == 0xE0 ? octet & 0x0F : +// (octet & 0xF8) == 0xF0 ? octet & 0x07 : 0; +// if (!width) return 0; +// if (pointer+width > end) return 0; +// for (k = 1; k < width; k ++) { +// octet = pointer[k]; +// if ((octet & 0xC0) != 0x80) return 0; +// value = (value << 6) + (octet & 0x3F); +// } +// if (!((width == 1) || +// (width == 2 && value >= 0x80) || +// (width == 3 && value >= 0x800) || +// (width == 4 && value >= 0x10000))) return 0; +// +// pointer += width; +// } +// +// return 1; +//} +// + +// Create STREAM-START. +func yaml_stream_start_event_initialize(event *yaml_event_t, encoding yaml_encoding_t) { + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + encoding: encoding, + } +} + +// Create STREAM-END. +func yaml_stream_end_event_initialize(event *yaml_event_t) { + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + } +} + +// Create DOCUMENT-START. +func yaml_document_start_event_initialize( + event *yaml_event_t, + version_directive *yaml_version_directive_t, + tag_directives []yaml_tag_directive_t, + implicit bool, +) { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: implicit, + } +} + +// Create DOCUMENT-END. +func yaml_document_end_event_initialize(event *yaml_event_t, implicit bool) { + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + implicit: implicit, + } +} + +///* +// * Create ALIAS. +// */ +// +//YAML_DECLARE(int) +//yaml_alias_event_initialize(event *yaml_event_t, anchor *yaml_char_t) +//{ +// mark yaml_mark_t = { 0, 0, 0 } +// anchor_copy *yaml_char_t = NULL +// +// assert(event) // Non-NULL event object is expected. +// assert(anchor) // Non-NULL anchor is expected. +// +// if (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0 +// +// anchor_copy = yaml_strdup(anchor) +// if (!anchor_copy) +// return 0 +// +// ALIAS_EVENT_INIT(*event, anchor_copy, mark, mark) +// +// return 1 +//} + +// Create SCALAR. +func yaml_scalar_event_initialize(event *yaml_event_t, anchor, tag, value []byte, plain_implicit, quoted_implicit bool, style yaml_scalar_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + anchor: anchor, + tag: tag, + value: value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-START. +func yaml_sequence_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_sequence_style_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } + return true +} + +// Create SEQUENCE-END. +func yaml_sequence_end_event_initialize(event *yaml_event_t) bool { + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + } + return true +} + +// Create MAPPING-START. +func yaml_mapping_start_event_initialize(event *yaml_event_t, anchor, tag []byte, implicit bool, style yaml_mapping_style_t) { + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(style), + } +} + +// Create MAPPING-END. +func yaml_mapping_end_event_initialize(event *yaml_event_t) { + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + } +} + +// Destroy an event object. +func yaml_event_delete(event *yaml_event_t) { + *event = yaml_event_t{} +} + +///* +// * Create a document object. +// */ +// +//YAML_DECLARE(int) +//yaml_document_initialize(document *yaml_document_t, +// version_directive *yaml_version_directive_t, +// tag_directives_start *yaml_tag_directive_t, +// tag_directives_end *yaml_tag_directive_t, +// start_implicit int, end_implicit int) +//{ +// struct { +// error yaml_error_type_t +// } context +// struct { +// start *yaml_node_t +// end *yaml_node_t +// top *yaml_node_t +// } nodes = { NULL, NULL, NULL } +// version_directive_copy *yaml_version_directive_t = NULL +// struct { +// start *yaml_tag_directive_t +// end *yaml_tag_directive_t +// top *yaml_tag_directive_t +// } tag_directives_copy = { NULL, NULL, NULL } +// value yaml_tag_directive_t = { NULL, NULL } +// mark yaml_mark_t = { 0, 0, 0 } +// +// assert(document) // Non-NULL document object is expected. +// assert((tag_directives_start && tag_directives_end) || +// (tag_directives_start == tag_directives_end)) +// // Valid tag directives are expected. +// +// if (!STACK_INIT(&context, nodes, INITIAL_STACK_SIZE)) goto error +// +// if (version_directive) { +// version_directive_copy = yaml_malloc(sizeof(yaml_version_directive_t)) +// if (!version_directive_copy) goto error +// version_directive_copy.major = version_directive.major +// version_directive_copy.minor = version_directive.minor +// } +// +// if (tag_directives_start != tag_directives_end) { +// tag_directive *yaml_tag_directive_t +// if (!STACK_INIT(&context, tag_directives_copy, INITIAL_STACK_SIZE)) +// goto error +// for (tag_directive = tag_directives_start +// tag_directive != tag_directives_end; tag_directive ++) { +// assert(tag_directive.handle) +// assert(tag_directive.prefix) +// if (!yaml_check_utf8(tag_directive.handle, +// strlen((char *)tag_directive.handle))) +// goto error +// if (!yaml_check_utf8(tag_directive.prefix, +// strlen((char *)tag_directive.prefix))) +// goto error +// value.handle = yaml_strdup(tag_directive.handle) +// value.prefix = yaml_strdup(tag_directive.prefix) +// if (!value.handle || !value.prefix) goto error +// if (!PUSH(&context, tag_directives_copy, value)) +// goto error +// value.handle = NULL +// value.prefix = NULL +// } +// } +// +// DOCUMENT_INIT(*document, nodes.start, nodes.end, version_directive_copy, +// tag_directives_copy.start, tag_directives_copy.top, +// start_implicit, end_implicit, mark, mark) +// +// return 1 +// +//error: +// STACK_DEL(&context, nodes) +// yaml_free(version_directive_copy) +// while (!STACK_EMPTY(&context, tag_directives_copy)) { +// value yaml_tag_directive_t = POP(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// } +// STACK_DEL(&context, tag_directives_copy) +// yaml_free(value.handle) +// yaml_free(value.prefix) +// +// return 0 +//} +// +///* +// * Destroy a document object. +// */ +// +//YAML_DECLARE(void) +//yaml_document_delete(document *yaml_document_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// tag_directive *yaml_tag_directive_t +// +// context.error = YAML_NO_ERROR // Eliminate a compiler warning. +// +// assert(document) // Non-NULL document object is expected. +// +// while (!STACK_EMPTY(&context, document.nodes)) { +// node yaml_node_t = POP(&context, document.nodes) +// yaml_free(node.tag) +// switch (node.type) { +// case YAML_SCALAR_NODE: +// yaml_free(node.data.scalar.value) +// break +// case YAML_SEQUENCE_NODE: +// STACK_DEL(&context, node.data.sequence.items) +// break +// case YAML_MAPPING_NODE: +// STACK_DEL(&context, node.data.mapping.pairs) +// break +// default: +// assert(0) // Should not happen. +// } +// } +// STACK_DEL(&context, document.nodes) +// +// yaml_free(document.version_directive) +// for (tag_directive = document.tag_directives.start +// tag_directive != document.tag_directives.end +// tag_directive++) { +// yaml_free(tag_directive.handle) +// yaml_free(tag_directive.prefix) +// } +// yaml_free(document.tag_directives.start) +// +// memset(document, 0, sizeof(yaml_document_t)) +//} +// +///** +// * Get a document node. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_node(document *yaml_document_t, index int) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (index > 0 && document.nodes.start + index <= document.nodes.top) { +// return document.nodes.start + index - 1 +// } +// return NULL +//} +// +///** +// * Get the root object. +// */ +// +//YAML_DECLARE(yaml_node_t *) +//yaml_document_get_root_node(document *yaml_document_t) +//{ +// assert(document) // Non-NULL document object is expected. +// +// if (document.nodes.top != document.nodes.start) { +// return document.nodes.start +// } +// return NULL +//} +// +///* +// * Add a scalar node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_scalar(document *yaml_document_t, +// tag *yaml_char_t, value *yaml_char_t, length int, +// style yaml_scalar_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// value_copy *yaml_char_t = NULL +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// assert(value) // Non-NULL value is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (length < 0) { +// length = strlen((char *)value) +// } +// +// if (!yaml_check_utf8(value, length)) goto error +// value_copy = yaml_malloc(length+1) +// if (!value_copy) goto error +// memcpy(value_copy, value, length) +// value_copy[length] = '\0' +// +// SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// yaml_free(tag_copy) +// yaml_free(value_copy) +// +// return 0 +//} +// +///* +// * Add a sequence node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_sequence(document *yaml_document_t, +// tag *yaml_char_t, style yaml_sequence_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_item_t +// end *yaml_node_item_t +// top *yaml_node_item_t +// } items = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_SEQUENCE_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, items, INITIAL_STACK_SIZE)) goto error +// +// SEQUENCE_NODE_INIT(node, tag_copy, items.start, items.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, items) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Add a mapping node to a document. +// */ +// +//YAML_DECLARE(int) +//yaml_document_add_mapping(document *yaml_document_t, +// tag *yaml_char_t, style yaml_mapping_style_t) +//{ +// struct { +// error yaml_error_type_t +// } context +// mark yaml_mark_t = { 0, 0, 0 } +// tag_copy *yaml_char_t = NULL +// struct { +// start *yaml_node_pair_t +// end *yaml_node_pair_t +// top *yaml_node_pair_t +// } pairs = { NULL, NULL, NULL } +// node yaml_node_t +// +// assert(document) // Non-NULL document object is expected. +// +// if (!tag) { +// tag = (yaml_char_t *)YAML_DEFAULT_MAPPING_TAG +// } +// +// if (!yaml_check_utf8(tag, strlen((char *)tag))) goto error +// tag_copy = yaml_strdup(tag) +// if (!tag_copy) goto error +// +// if (!STACK_INIT(&context, pairs, INITIAL_STACK_SIZE)) goto error +// +// MAPPING_NODE_INIT(node, tag_copy, pairs.start, pairs.end, +// style, mark, mark) +// if (!PUSH(&context, document.nodes, node)) goto error +// +// return document.nodes.top - document.nodes.start +// +//error: +// STACK_DEL(&context, pairs) +// yaml_free(tag_copy) +// +// return 0 +//} +// +///* +// * Append an item to a sequence node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_sequence_item(document *yaml_document_t, +// sequence int, item int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// assert(document) // Non-NULL document is required. +// assert(sequence > 0 +// && document.nodes.start + sequence <= document.nodes.top) +// // Valid sequence id is required. +// assert(document.nodes.start[sequence-1].type == YAML_SEQUENCE_NODE) +// // A sequence node is required. +// assert(item > 0 && document.nodes.start + item <= document.nodes.top) +// // Valid item id is required. +// +// if (!PUSH(&context, +// document.nodes.start[sequence-1].data.sequence.items, item)) +// return 0 +// +// return 1 +//} +// +///* +// * Append a pair of a key and a value to a mapping node. +// */ +// +//YAML_DECLARE(int) +//yaml_document_append_mapping_pair(document *yaml_document_t, +// mapping int, key int, value int) +//{ +// struct { +// error yaml_error_type_t +// } context +// +// pair yaml_node_pair_t +// +// assert(document) // Non-NULL document is required. +// assert(mapping > 0 +// && document.nodes.start + mapping <= document.nodes.top) +// // Valid mapping id is required. +// assert(document.nodes.start[mapping-1].type == YAML_MAPPING_NODE) +// // A mapping node is required. +// assert(key > 0 && document.nodes.start + key <= document.nodes.top) +// // Valid key id is required. +// assert(value > 0 && document.nodes.start + value <= document.nodes.top) +// // Valid value id is required. +// +// pair.key = key +// pair.value = value +// +// if (!PUSH(&context, +// document.nodes.start[mapping-1].data.mapping.pairs, pair)) +// return 0 +// +// return 1 +//} +// +// diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go new file mode 100644 index 000000000..129bc2a97 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/decode.go @@ -0,0 +1,815 @@ +package yaml + +import ( + "encoding" + "encoding/base64" + "fmt" + "io" + "math" + "reflect" + "strconv" + "time" +) + +const ( + documentNode = 1 << iota + mappingNode + sequenceNode + scalarNode + aliasNode +) + +type node struct { + kind int + line, column int + tag string + // For an alias node, alias holds the resolved alias. + alias *node + value string + implicit bool + children []*node + anchors map[string]*node +} + +// ---------------------------------------------------------------------------- +// Parser, produces a node tree out of a libyaml event stream. + +type parser struct { + parser yaml_parser_t + event yaml_event_t + doc *node + doneInit bool +} + +func newParser(b []byte) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + if len(b) == 0 { + b = []byte{'\n'} + } + yaml_parser_set_input_string(&p.parser, b) + return &p +} + +func newParserFromReader(r io.Reader) *parser { + p := parser{} + if !yaml_parser_initialize(&p.parser) { + panic("failed to initialize YAML emitter") + } + yaml_parser_set_input_reader(&p.parser, r) + return &p +} + +func (p *parser) init() { + if p.doneInit { + return + } + p.expect(yaml_STREAM_START_EVENT) + p.doneInit = true +} + +func (p *parser) destroy() { + if p.event.typ != yaml_NO_EVENT { + yaml_event_delete(&p.event) + } + yaml_parser_delete(&p.parser) +} + +// expect consumes an event from the event stream and +// checks that it's of the expected type. +func (p *parser) expect(e yaml_event_type_t) { + if p.event.typ == yaml_NO_EVENT { + if !yaml_parser_parse(&p.parser, &p.event) { + p.fail() + } + } + if p.event.typ == yaml_STREAM_END_EVENT { + failf("attempted to go past the end of stream; corrupted value?") + } + if p.event.typ != e { + p.parser.problem = fmt.Sprintf("expected %s event but got %s", e, p.event.typ) + p.fail() + } + yaml_event_delete(&p.event) + p.event.typ = yaml_NO_EVENT +} + +// peek peeks at the next event in the event stream, +// puts the results into p.event and returns the event type. +func (p *parser) peek() yaml_event_type_t { + if p.event.typ != yaml_NO_EVENT { + return p.event.typ + } + if !yaml_parser_parse(&p.parser, &p.event) { + p.fail() + } + return p.event.typ +} + +func (p *parser) fail() { + var where string + var line int + if p.parser.problem_mark.line != 0 { + line = p.parser.problem_mark.line + // Scanner errors don't iterate line before returning error + if p.parser.error == yaml_SCANNER_ERROR { + line++ + } + } else if p.parser.context_mark.line != 0 { + line = p.parser.context_mark.line + } + if line != 0 { + where = "line " + strconv.Itoa(line) + ": " + } + var msg string + if len(p.parser.problem) > 0 { + msg = p.parser.problem + } else { + msg = "unknown problem parsing YAML content" + } + failf("%s%s", where, msg) +} + +func (p *parser) anchor(n *node, anchor []byte) { + if anchor != nil { + p.doc.anchors[string(anchor)] = n + } +} + +func (p *parser) parse() *node { + p.init() + switch p.peek() { + case yaml_SCALAR_EVENT: + return p.scalar() + case yaml_ALIAS_EVENT: + return p.alias() + case yaml_MAPPING_START_EVENT: + return p.mapping() + case yaml_SEQUENCE_START_EVENT: + return p.sequence() + case yaml_DOCUMENT_START_EVENT: + return p.document() + case yaml_STREAM_END_EVENT: + // Happens when attempting to decode an empty buffer. + return nil + default: + panic("attempted to parse unknown event: " + p.event.typ.String()) + } +} + +func (p *parser) node(kind int) *node { + return &node{ + kind: kind, + line: p.event.start_mark.line, + column: p.event.start_mark.column, + } +} + +func (p *parser) document() *node { + n := p.node(documentNode) + n.anchors = make(map[string]*node) + p.doc = n + p.expect(yaml_DOCUMENT_START_EVENT) + n.children = append(n.children, p.parse()) + p.expect(yaml_DOCUMENT_END_EVENT) + return n +} + +func (p *parser) alias() *node { + n := p.node(aliasNode) + n.value = string(p.event.anchor) + n.alias = p.doc.anchors[n.value] + if n.alias == nil { + failf("unknown anchor '%s' referenced", n.value) + } + p.expect(yaml_ALIAS_EVENT) + return n +} + +func (p *parser) scalar() *node { + n := p.node(scalarNode) + n.value = string(p.event.value) + n.tag = string(p.event.tag) + n.implicit = p.event.implicit + p.anchor(n, p.event.anchor) + p.expect(yaml_SCALAR_EVENT) + return n +} + +func (p *parser) sequence() *node { + n := p.node(sequenceNode) + p.anchor(n, p.event.anchor) + p.expect(yaml_SEQUENCE_START_EVENT) + for p.peek() != yaml_SEQUENCE_END_EVENT { + n.children = append(n.children, p.parse()) + } + p.expect(yaml_SEQUENCE_END_EVENT) + return n +} + +func (p *parser) mapping() *node { + n := p.node(mappingNode) + p.anchor(n, p.event.anchor) + p.expect(yaml_MAPPING_START_EVENT) + for p.peek() != yaml_MAPPING_END_EVENT { + n.children = append(n.children, p.parse(), p.parse()) + } + p.expect(yaml_MAPPING_END_EVENT) + return n +} + +// ---------------------------------------------------------------------------- +// Decoder, unmarshals a node into a provided value. + +type decoder struct { + doc *node + aliases map[*node]bool + mapType reflect.Type + terrors []string + strict bool + + decodeCount int + aliasCount int + aliasDepth int +} + +var ( + mapItemType = reflect.TypeOf(MapItem{}) + durationType = reflect.TypeOf(time.Duration(0)) + defaultMapType = reflect.TypeOf(map[interface{}]interface{}{}) + ifaceType = defaultMapType.Elem() + timeType = reflect.TypeOf(time.Time{}) + ptrTimeType = reflect.TypeOf(&time.Time{}) +) + +func newDecoder(strict bool) *decoder { + d := &decoder{mapType: defaultMapType, strict: strict} + d.aliases = make(map[*node]bool) + return d +} + +func (d *decoder) terror(n *node, tag string, out reflect.Value) { + if n.tag != "" { + tag = n.tag + } + value := n.value + if tag != yaml_SEQ_TAG && tag != yaml_MAP_TAG { + if len(value) > 10 { + value = " `" + value[:7] + "...`" + } else { + value = " `" + value + "`" + } + } + d.terrors = append(d.terrors, fmt.Sprintf("line %d: cannot unmarshal %s%s into %s", n.line+1, shortTag(tag), value, out.Type())) +} + +func (d *decoder) callUnmarshaler(n *node, u Unmarshaler) (good bool) { + terrlen := len(d.terrors) + err := u.UnmarshalYAML(func(v interface{}) (err error) { + defer handleErr(&err) + d.unmarshal(n, reflect.ValueOf(v)) + if len(d.terrors) > terrlen { + issues := d.terrors[terrlen:] + d.terrors = d.terrors[:terrlen] + return &TypeError{issues} + } + return nil + }) + if e, ok := err.(*TypeError); ok { + d.terrors = append(d.terrors, e.Errors...) + return false + } + if err != nil { + fail(err) + } + return true +} + +// d.prepare initializes and dereferences pointers and calls UnmarshalYAML +// if a value is found to implement it. +// It returns the initialized and dereferenced out value, whether +// unmarshalling was already done by UnmarshalYAML, and if so whether +// its types unmarshalled appropriately. +// +// If n holds a null value, prepare returns before doing anything. +func (d *decoder) prepare(n *node, out reflect.Value) (newout reflect.Value, unmarshaled, good bool) { + if n.tag == yaml_NULL_TAG || n.kind == scalarNode && n.tag == "" && (n.value == "null" || n.value == "~" || n.value == "" && n.implicit) { + return out, false, false + } + again := true + for again { + again = false + if out.Kind() == reflect.Ptr { + if out.IsNil() { + out.Set(reflect.New(out.Type().Elem())) + } + out = out.Elem() + again = true + } + if out.CanAddr() { + if u, ok := out.Addr().Interface().(Unmarshaler); ok { + good = d.callUnmarshaler(n, u) + return out, true, good + } + } + } + return out, false, false +} + +const ( + // 400,000 decode operations is ~500kb of dense object declarations, or + // ~5kb of dense object declarations with 10000% alias expansion + alias_ratio_range_low = 400000 + + // 4,000,000 decode operations is ~5MB of dense object declarations, or + // ~4.5MB of dense object declarations with 10% alias expansion + alias_ratio_range_high = 4000000 + + // alias_ratio_range is the range over which we scale allowed alias ratios + alias_ratio_range = float64(alias_ratio_range_high - alias_ratio_range_low) +) + +func allowedAliasRatio(decodeCount int) float64 { + switch { + case decodeCount <= alias_ratio_range_low: + // allow 99% to come from alias expansion for small-to-medium documents + return 0.99 + case decodeCount >= alias_ratio_range_high: + // allow 10% to come from alias expansion for very large documents + return 0.10 + default: + // scale smoothly from 99% down to 10% over the range. + // this maps to 396,000 - 400,000 allowed alias-driven decodes over the range. + // 400,000 decode operations is ~100MB of allocations in worst-case scenarios (single-item maps). + return 0.99 - 0.89*(float64(decodeCount-alias_ratio_range_low)/alias_ratio_range) + } +} + +func (d *decoder) unmarshal(n *node, out reflect.Value) (good bool) { + d.decodeCount++ + if d.aliasDepth > 0 { + d.aliasCount++ + } + if d.aliasCount > 100 && d.decodeCount > 1000 && float64(d.aliasCount)/float64(d.decodeCount) > allowedAliasRatio(d.decodeCount) { + failf("document contains excessive aliasing") + } + switch n.kind { + case documentNode: + return d.document(n, out) + case aliasNode: + return d.alias(n, out) + } + out, unmarshaled, good := d.prepare(n, out) + if unmarshaled { + return good + } + switch n.kind { + case scalarNode: + good = d.scalar(n, out) + case mappingNode: + good = d.mapping(n, out) + case sequenceNode: + good = d.sequence(n, out) + default: + panic("internal error: unknown node kind: " + strconv.Itoa(n.kind)) + } + return good +} + +func (d *decoder) document(n *node, out reflect.Value) (good bool) { + if len(n.children) == 1 { + d.doc = n + d.unmarshal(n.children[0], out) + return true + } + return false +} + +func (d *decoder) alias(n *node, out reflect.Value) (good bool) { + if d.aliases[n] { + // TODO this could actually be allowed in some circumstances. + failf("anchor '%s' value contains itself", n.value) + } + d.aliases[n] = true + d.aliasDepth++ + good = d.unmarshal(n.alias, out) + d.aliasDepth-- + delete(d.aliases, n) + return good +} + +var zeroValue reflect.Value + +func resetMap(out reflect.Value) { + for _, k := range out.MapKeys() { + out.SetMapIndex(k, zeroValue) + } +} + +func (d *decoder) scalar(n *node, out reflect.Value) bool { + var tag string + var resolved interface{} + if n.tag == "" && !n.implicit { + tag = yaml_STR_TAG + resolved = n.value + } else { + tag, resolved = resolve(n.tag, n.value) + if tag == yaml_BINARY_TAG { + data, err := base64.StdEncoding.DecodeString(resolved.(string)) + if err != nil { + failf("!!binary value contains invalid base64 data") + } + resolved = string(data) + } + } + if resolved == nil { + if out.Kind() == reflect.Map && !out.CanAddr() { + resetMap(out) + } else { + out.Set(reflect.Zero(out.Type())) + } + return true + } + if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { + // We've resolved to exactly the type we want, so use that. + out.Set(resolvedv) + return true + } + // Perhaps we can use the value as a TextUnmarshaler to + // set its value. + if out.CanAddr() { + u, ok := out.Addr().Interface().(encoding.TextUnmarshaler) + if ok { + var text []byte + if tag == yaml_BINARY_TAG { + text = []byte(resolved.(string)) + } else { + // We let any value be unmarshaled into TextUnmarshaler. + // That might be more lax than we'd like, but the + // TextUnmarshaler itself should bowl out any dubious values. + text = []byte(n.value) + } + err := u.UnmarshalText(text) + if err != nil { + fail(err) + } + return true + } + } + switch out.Kind() { + case reflect.String: + if tag == yaml_BINARY_TAG { + out.SetString(resolved.(string)) + return true + } + if resolved != nil { + out.SetString(n.value) + return true + } + case reflect.Interface: + if resolved == nil { + out.Set(reflect.Zero(out.Type())) + } else if tag == yaml_TIMESTAMP_TAG { + // It looks like a timestamp but for backward compatibility + // reasons we set it as a string, so that code that unmarshals + // timestamp-like values into interface{} will continue to + // see a string and not a time.Time. + // TODO(v3) Drop this. + out.Set(reflect.ValueOf(n.value)) + } else { + out.Set(reflect.ValueOf(resolved)) + } + return true + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + switch resolved := resolved.(type) { + case int: + if !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case int64: + if !out.OverflowInt(resolved) { + out.SetInt(resolved) + return true + } + case uint64: + if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case float64: + if resolved <= math.MaxInt64 && !out.OverflowInt(int64(resolved)) { + out.SetInt(int64(resolved)) + return true + } + case string: + if out.Type() == durationType { + d, err := time.ParseDuration(resolved) + if err == nil { + out.SetInt(int64(d)) + return true + } + } + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + switch resolved := resolved.(type) { + case int: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case int64: + if resolved >= 0 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case uint64: + if !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + case float64: + if resolved <= math.MaxUint64 && !out.OverflowUint(uint64(resolved)) { + out.SetUint(uint64(resolved)) + return true + } + } + case reflect.Bool: + switch resolved := resolved.(type) { + case bool: + out.SetBool(resolved) + return true + } + case reflect.Float32, reflect.Float64: + switch resolved := resolved.(type) { + case int: + out.SetFloat(float64(resolved)) + return true + case int64: + out.SetFloat(float64(resolved)) + return true + case uint64: + out.SetFloat(float64(resolved)) + return true + case float64: + out.SetFloat(resolved) + return true + } + case reflect.Struct: + if resolvedv := reflect.ValueOf(resolved); out.Type() == resolvedv.Type() { + out.Set(resolvedv) + return true + } + case reflect.Ptr: + if out.Type().Elem() == reflect.TypeOf(resolved) { + // TODO DOes this make sense? When is out a Ptr except when decoding a nil value? + elem := reflect.New(out.Type().Elem()) + elem.Elem().Set(reflect.ValueOf(resolved)) + out.Set(elem) + return true + } + } + d.terror(n, tag, out) + return false +} + +func settableValueOf(i interface{}) reflect.Value { + v := reflect.ValueOf(i) + sv := reflect.New(v.Type()).Elem() + sv.Set(v) + return sv +} + +func (d *decoder) sequence(n *node, out reflect.Value) (good bool) { + l := len(n.children) + + var iface reflect.Value + switch out.Kind() { + case reflect.Slice: + out.Set(reflect.MakeSlice(out.Type(), l, l)) + case reflect.Array: + if l != out.Len() { + failf("invalid array: want %d elements but got %d", out.Len(), l) + } + case reflect.Interface: + // No type hints. Will have to use a generic sequence. + iface = out + out = settableValueOf(make([]interface{}, l)) + default: + d.terror(n, yaml_SEQ_TAG, out) + return false + } + et := out.Type().Elem() + + j := 0 + for i := 0; i < l; i++ { + e := reflect.New(et).Elem() + if ok := d.unmarshal(n.children[i], e); ok { + out.Index(j).Set(e) + j++ + } + } + if out.Kind() != reflect.Array { + out.Set(out.Slice(0, j)) + } + if iface.IsValid() { + iface.Set(out) + } + return true +} + +func (d *decoder) mapping(n *node, out reflect.Value) (good bool) { + switch out.Kind() { + case reflect.Struct: + return d.mappingStruct(n, out) + case reflect.Slice: + return d.mappingSlice(n, out) + case reflect.Map: + // okay + case reflect.Interface: + if d.mapType.Kind() == reflect.Map { + iface := out + out = reflect.MakeMap(d.mapType) + iface.Set(out) + } else { + slicev := reflect.New(d.mapType).Elem() + if !d.mappingSlice(n, slicev) { + return false + } + out.Set(slicev) + return true + } + default: + d.terror(n, yaml_MAP_TAG, out) + return false + } + outt := out.Type() + kt := outt.Key() + et := outt.Elem() + + mapType := d.mapType + if outt.Key() == ifaceType && outt.Elem() == ifaceType { + d.mapType = outt + } + + if out.IsNil() { + out.Set(reflect.MakeMap(outt)) + } + l := len(n.children) + for i := 0; i < l; i += 2 { + if isMerge(n.children[i]) { + d.merge(n.children[i+1], out) + continue + } + k := reflect.New(kt).Elem() + if d.unmarshal(n.children[i], k) { + kkind := k.Kind() + if kkind == reflect.Interface { + kkind = k.Elem().Kind() + } + if kkind == reflect.Map || kkind == reflect.Slice { + failf("invalid map key: %#v", k.Interface()) + } + e := reflect.New(et).Elem() + if d.unmarshal(n.children[i+1], e) { + d.setMapIndex(n.children[i+1], out, k, e) + } + } + } + d.mapType = mapType + return true +} + +func (d *decoder) setMapIndex(n *node, out, k, v reflect.Value) { + if d.strict && out.MapIndex(k) != zeroValue { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: key %#v already set in map", n.line+1, k.Interface())) + return + } + out.SetMapIndex(k, v) +} + +func (d *decoder) mappingSlice(n *node, out reflect.Value) (good bool) { + outt := out.Type() + if outt.Elem() != mapItemType { + d.terror(n, yaml_MAP_TAG, out) + return false + } + + mapType := d.mapType + d.mapType = outt + + var slice []MapItem + var l = len(n.children) + for i := 0; i < l; i += 2 { + if isMerge(n.children[i]) { + d.merge(n.children[i+1], out) + continue + } + item := MapItem{} + k := reflect.ValueOf(&item.Key).Elem() + if d.unmarshal(n.children[i], k) { + v := reflect.ValueOf(&item.Value).Elem() + if d.unmarshal(n.children[i+1], v) { + slice = append(slice, item) + } + } + } + out.Set(reflect.ValueOf(slice)) + d.mapType = mapType + return true +} + +func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { + sinfo, err := getStructInfo(out.Type()) + if err != nil { + panic(err) + } + name := settableValueOf("") + l := len(n.children) + + var inlineMap reflect.Value + var elemType reflect.Type + if sinfo.InlineMap != -1 { + inlineMap = out.Field(sinfo.InlineMap) + inlineMap.Set(reflect.New(inlineMap.Type()).Elem()) + elemType = inlineMap.Type().Elem() + } + + var doneFields []bool + if d.strict { + doneFields = make([]bool, len(sinfo.FieldsList)) + } + for i := 0; i < l; i += 2 { + ni := n.children[i] + if isMerge(ni) { + d.merge(n.children[i+1], out) + continue + } + if !d.unmarshal(ni, name) { + continue + } + if info, ok := sinfo.FieldsMap[name.String()]; ok { + if d.strict { + if doneFields[info.Id] { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s already set in type %s", ni.line+1, name.String(), out.Type())) + continue + } + doneFields[info.Id] = true + } + var field reflect.Value + if info.Inline == nil { + field = out.Field(info.Num) + } else { + field = out.FieldByIndex(info.Inline) + } + d.unmarshal(n.children[i+1], field) + } else if sinfo.InlineMap != -1 { + if inlineMap.IsNil() { + inlineMap.Set(reflect.MakeMap(inlineMap.Type())) + } + value := reflect.New(elemType).Elem() + d.unmarshal(n.children[i+1], value) + d.setMapIndex(n.children[i+1], inlineMap, name, value) + } else if d.strict { + d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in type %s", ni.line+1, name.String(), out.Type())) + } + } + return true +} + +func failWantMap() { + failf("map merge requires map or sequence of maps as the value") +} + +func (d *decoder) merge(n *node, out reflect.Value) { + switch n.kind { + case mappingNode: + d.unmarshal(n, out) + case aliasNode: + if n.alias != nil && n.alias.kind != mappingNode { + failWantMap() + } + d.unmarshal(n, out) + case sequenceNode: + // Step backwards as earlier nodes take precedence. + for i := len(n.children) - 1; i >= 0; i-- { + ni := n.children[i] + if ni.kind == aliasNode { + if ni.alias != nil && ni.alias.kind != mappingNode { + failWantMap() + } + } else if ni.kind != mappingNode { + failWantMap() + } + d.unmarshal(ni, out) + } + default: + failWantMap() + } +} + +func isMerge(n *node) bool { + return n.kind == scalarNode && n.value == "<<" && (n.implicit == true || n.tag == yaml_MERGE_TAG) +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go new file mode 100644 index 000000000..a1c2cc526 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/emitterc.go @@ -0,0 +1,1685 @@ +package yaml + +import ( + "bytes" + "fmt" +) + +// Flush the buffer if needed. +func flush(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) { + return yaml_emitter_flush(emitter) + } + return true +} + +// Put a character to the output buffer. +func put(emitter *yaml_emitter_t, value byte) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + emitter.buffer[emitter.buffer_pos] = value + emitter.buffer_pos++ + emitter.column++ + return true +} + +// Put a line break to the output buffer. +func put_break(emitter *yaml_emitter_t) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + switch emitter.line_break { + case yaml_CR_BREAK: + emitter.buffer[emitter.buffer_pos] = '\r' + emitter.buffer_pos += 1 + case yaml_LN_BREAK: + emitter.buffer[emitter.buffer_pos] = '\n' + emitter.buffer_pos += 1 + case yaml_CRLN_BREAK: + emitter.buffer[emitter.buffer_pos+0] = '\r' + emitter.buffer[emitter.buffer_pos+1] = '\n' + emitter.buffer_pos += 2 + default: + panic("unknown line break setting") + } + emitter.column = 0 + emitter.line++ + return true +} + +// Copy a character from a string into buffer. +func write(emitter *yaml_emitter_t, s []byte, i *int) bool { + if emitter.buffer_pos+5 >= len(emitter.buffer) && !yaml_emitter_flush(emitter) { + return false + } + p := emitter.buffer_pos + w := width(s[*i]) + switch w { + case 4: + emitter.buffer[p+3] = s[*i+3] + fallthrough + case 3: + emitter.buffer[p+2] = s[*i+2] + fallthrough + case 2: + emitter.buffer[p+1] = s[*i+1] + fallthrough + case 1: + emitter.buffer[p+0] = s[*i+0] + default: + panic("unknown character width") + } + emitter.column++ + emitter.buffer_pos += w + *i += w + return true +} + +// Write a whole string into buffer. +func write_all(emitter *yaml_emitter_t, s []byte) bool { + for i := 0; i < len(s); { + if !write(emitter, s, &i) { + return false + } + } + return true +} + +// Copy a line break character from a string into buffer. +func write_break(emitter *yaml_emitter_t, s []byte, i *int) bool { + if s[*i] == '\n' { + if !put_break(emitter) { + return false + } + *i++ + } else { + if !write(emitter, s, i) { + return false + } + emitter.column = 0 + emitter.line++ + } + return true +} + +// Set an emitter error and return false. +func yaml_emitter_set_emitter_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_EMITTER_ERROR + emitter.problem = problem + return false +} + +// Emit an event. +func yaml_emitter_emit(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.events = append(emitter.events, *event) + for !yaml_emitter_need_more_events(emitter) { + event := &emitter.events[emitter.events_head] + if !yaml_emitter_analyze_event(emitter, event) { + return false + } + if !yaml_emitter_state_machine(emitter, event) { + return false + } + yaml_event_delete(event) + emitter.events_head++ + } + return true +} + +// Check if we need to accumulate more events before emitting. +// +// We accumulate extra +// - 1 event for DOCUMENT-START +// - 2 events for SEQUENCE-START +// - 3 events for MAPPING-START +// +func yaml_emitter_need_more_events(emitter *yaml_emitter_t) bool { + if emitter.events_head == len(emitter.events) { + return true + } + var accumulate int + switch emitter.events[emitter.events_head].typ { + case yaml_DOCUMENT_START_EVENT: + accumulate = 1 + break + case yaml_SEQUENCE_START_EVENT: + accumulate = 2 + break + case yaml_MAPPING_START_EVENT: + accumulate = 3 + break + default: + return false + } + if len(emitter.events)-emitter.events_head > accumulate { + return false + } + var level int + for i := emitter.events_head; i < len(emitter.events); i++ { + switch emitter.events[i].typ { + case yaml_STREAM_START_EVENT, yaml_DOCUMENT_START_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT: + level++ + case yaml_STREAM_END_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_END_EVENT, yaml_MAPPING_END_EVENT: + level-- + } + if level == 0 { + return false + } + } + return true +} + +// Append a directive to the directives stack. +func yaml_emitter_append_tag_directive(emitter *yaml_emitter_t, value *yaml_tag_directive_t, allow_duplicates bool) bool { + for i := 0; i < len(emitter.tag_directives); i++ { + if bytes.Equal(value.handle, emitter.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_emitter_set_emitter_error(emitter, "duplicate %TAG directive") + } + } + + // [Go] Do we actually need to copy this given garbage collection + // and the lack of deallocating destructors? + tag_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(tag_copy.handle, value.handle) + copy(tag_copy.prefix, value.prefix) + emitter.tag_directives = append(emitter.tag_directives, tag_copy) + return true +} + +// Increase the indentation level. +func yaml_emitter_increase_indent(emitter *yaml_emitter_t, flow, indentless bool) bool { + emitter.indents = append(emitter.indents, emitter.indent) + if emitter.indent < 0 { + if flow { + emitter.indent = emitter.best_indent + } else { + emitter.indent = 0 + } + } else if !indentless { + emitter.indent += emitter.best_indent + } + return true +} + +// State dispatcher. +func yaml_emitter_state_machine(emitter *yaml_emitter_t, event *yaml_event_t) bool { + switch emitter.state { + default: + case yaml_EMIT_STREAM_START_STATE: + return yaml_emitter_emit_stream_start(emitter, event) + + case yaml_EMIT_FIRST_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, true) + + case yaml_EMIT_DOCUMENT_START_STATE: + return yaml_emitter_emit_document_start(emitter, event, false) + + case yaml_EMIT_DOCUMENT_CONTENT_STATE: + return yaml_emitter_emit_document_content(emitter, event) + + case yaml_EMIT_DOCUMENT_END_STATE: + return yaml_emitter_emit_document_end(emitter, event) + + case yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, true) + + case yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_flow_sequence_item(emitter, event, false) + + case yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, true) + + case yaml_EMIT_FLOW_MAPPING_KEY_STATE: + return yaml_emitter_emit_flow_mapping_key(emitter, event, false) + + case yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, true) + + case yaml_EMIT_FLOW_MAPPING_VALUE_STATE: + return yaml_emitter_emit_flow_mapping_value(emitter, event, false) + + case yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, true) + + case yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE: + return yaml_emitter_emit_block_sequence_item(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_KEY_STATE: + return yaml_emitter_emit_block_mapping_key(emitter, event, false) + + case yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, true) + + case yaml_EMIT_BLOCK_MAPPING_VALUE_STATE: + return yaml_emitter_emit_block_mapping_value(emitter, event, false) + + case yaml_EMIT_END_STATE: + return yaml_emitter_set_emitter_error(emitter, "expected nothing after STREAM-END") + } + panic("invalid emitter state") +} + +// Expect STREAM-START. +func yaml_emitter_emit_stream_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_STREAM_START_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected STREAM-START") + } + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = event.encoding + if emitter.encoding == yaml_ANY_ENCODING { + emitter.encoding = yaml_UTF8_ENCODING + } + } + if emitter.best_indent < 2 || emitter.best_indent > 9 { + emitter.best_indent = 2 + } + if emitter.best_width >= 0 && emitter.best_width <= emitter.best_indent*2 { + emitter.best_width = 80 + } + if emitter.best_width < 0 { + emitter.best_width = 1<<31 - 1 + } + if emitter.line_break == yaml_ANY_BREAK { + emitter.line_break = yaml_LN_BREAK + } + + emitter.indent = -1 + emitter.line = 0 + emitter.column = 0 + emitter.whitespace = true + emitter.indention = true + + if emitter.encoding != yaml_UTF8_ENCODING { + if !yaml_emitter_write_bom(emitter) { + return false + } + } + emitter.state = yaml_EMIT_FIRST_DOCUMENT_START_STATE + return true +} + +// Expect DOCUMENT-START or STREAM-END. +func yaml_emitter_emit_document_start(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + + if event.typ == yaml_DOCUMENT_START_EVENT { + + if event.version_directive != nil { + if !yaml_emitter_analyze_version_directive(emitter, event.version_directive) { + return false + } + } + + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_analyze_tag_directive(emitter, tag_directive) { + return false + } + if !yaml_emitter_append_tag_directive(emitter, tag_directive, false) { + return false + } + } + + for i := 0; i < len(default_tag_directives); i++ { + tag_directive := &default_tag_directives[i] + if !yaml_emitter_append_tag_directive(emitter, tag_directive, true) { + return false + } + } + + implicit := event.implicit + if !first || emitter.canonical { + implicit = false + } + + if emitter.open_ended && (event.version_directive != nil || len(event.tag_directives) > 0) { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if event.version_directive != nil { + implicit = false + if !yaml_emitter_write_indicator(emitter, []byte("%YAML"), true, false, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("1.1"), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if len(event.tag_directives) > 0 { + implicit = false + for i := 0; i < len(event.tag_directives); i++ { + tag_directive := &event.tag_directives[i] + if !yaml_emitter_write_indicator(emitter, []byte("%TAG"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_handle(emitter, tag_directive.handle) { + return false + } + if !yaml_emitter_write_tag_content(emitter, tag_directive.prefix, true) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + if yaml_emitter_check_empty_document(emitter) { + implicit = false + } + if !implicit { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte("---"), true, false, false) { + return false + } + if emitter.canonical { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + } + + emitter.state = yaml_EMIT_DOCUMENT_CONTENT_STATE + return true + } + + if event.typ == yaml_STREAM_END_EVENT { + if emitter.open_ended { + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_END_STATE + return true + } + + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-START or STREAM-END") +} + +// Expect the root node. +func yaml_emitter_emit_document_content(emitter *yaml_emitter_t, event *yaml_event_t) bool { + emitter.states = append(emitter.states, yaml_EMIT_DOCUMENT_END_STATE) + return yaml_emitter_emit_node(emitter, event, true, false, false, false) +} + +// Expect DOCUMENT-END. +func yaml_emitter_emit_document_end(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if event.typ != yaml_DOCUMENT_END_EVENT { + return yaml_emitter_set_emitter_error(emitter, "expected DOCUMENT-END") + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !event.implicit { + // [Go] Allocate the slice elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("..."), true, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_flush(emitter) { + return false + } + emitter.state = yaml_EMIT_DOCUMENT_START_STATE + emitter.tag_directives = emitter.tag_directives[:0] + return true +} + +// Expect a flow item node. +func yaml_emitter_emit_flow_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'['}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_SEQUENCE_END_EVENT { + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.canonical && !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{']'}, false, false, false) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + + return true + } + + if !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE) + return yaml_emitter_emit_node(emitter, event, false, true, false, false) +} + +// Expect a flow key node. +func yaml_emitter_emit_flow_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_write_indicator(emitter, []byte{'{'}, true, true, false) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + emitter.flow_level++ + } + + if event.typ == yaml_MAPPING_END_EVENT { + emitter.flow_level-- + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + if emitter.canonical && !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'}'}, false, false, false) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + + if !first { + if !yaml_emitter_write_indicator(emitter, []byte{','}, false, false, false) { + return false + } + } + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + + if !emitter.canonical && yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, false) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a flow value node. +func yaml_emitter_emit_flow_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if emitter.canonical || emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, false) { + return false + } + } + emitter.states = append(emitter.states, yaml_EMIT_FLOW_MAPPING_KEY_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a block item node. +func yaml_emitter_emit_block_sequence_item(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, emitter.mapping_context && !emitter.indention) { + return false + } + } + if event.typ == yaml_SEQUENCE_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'-'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE) + return yaml_emitter_emit_node(emitter, event, false, true, false, false) +} + +// Expect a block key node. +func yaml_emitter_emit_block_mapping_key(emitter *yaml_emitter_t, event *yaml_event_t, first bool) bool { + if first { + if !yaml_emitter_increase_indent(emitter, false, false) { + return false + } + } + if event.typ == yaml_MAPPING_END_EVENT { + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true + } + if !yaml_emitter_write_indent(emitter) { + return false + } + if yaml_emitter_check_simple_key(emitter) { + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, true) + } + if !yaml_emitter_write_indicator(emitter, []byte{'?'}, true, false, true) { + return false + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_VALUE_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a block value node. +func yaml_emitter_emit_block_mapping_value(emitter *yaml_emitter_t, event *yaml_event_t, simple bool) bool { + if simple { + if !yaml_emitter_write_indicator(emitter, []byte{':'}, false, false, false) { + return false + } + } else { + if !yaml_emitter_write_indent(emitter) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{':'}, true, false, true) { + return false + } + } + emitter.states = append(emitter.states, yaml_EMIT_BLOCK_MAPPING_KEY_STATE) + return yaml_emitter_emit_node(emitter, event, false, false, true, false) +} + +// Expect a node. +func yaml_emitter_emit_node(emitter *yaml_emitter_t, event *yaml_event_t, + root bool, sequence bool, mapping bool, simple_key bool) bool { + + emitter.root_context = root + emitter.sequence_context = sequence + emitter.mapping_context = mapping + emitter.simple_key_context = simple_key + + switch event.typ { + case yaml_ALIAS_EVENT: + return yaml_emitter_emit_alias(emitter, event) + case yaml_SCALAR_EVENT: + return yaml_emitter_emit_scalar(emitter, event) + case yaml_SEQUENCE_START_EVENT: + return yaml_emitter_emit_sequence_start(emitter, event) + case yaml_MAPPING_START_EVENT: + return yaml_emitter_emit_mapping_start(emitter, event) + default: + return yaml_emitter_set_emitter_error(emitter, + fmt.Sprintf("expected SCALAR, SEQUENCE-START, MAPPING-START, or ALIAS, but got %v", event.typ)) + } +} + +// Expect ALIAS. +func yaml_emitter_emit_alias(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SCALAR. +func yaml_emitter_emit_scalar(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_select_scalar_style(emitter, event) { + return false + } + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if !yaml_emitter_increase_indent(emitter, true, false) { + return false + } + if !yaml_emitter_process_scalar(emitter) { + return false + } + emitter.indent = emitter.indents[len(emitter.indents)-1] + emitter.indents = emitter.indents[:len(emitter.indents)-1] + emitter.state = emitter.states[len(emitter.states)-1] + emitter.states = emitter.states[:len(emitter.states)-1] + return true +} + +// Expect SEQUENCE-START. +func yaml_emitter_emit_sequence_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.sequence_style() == yaml_FLOW_SEQUENCE_STYLE || + yaml_emitter_check_empty_sequence(emitter) { + emitter.state = yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE + } + return true +} + +// Expect MAPPING-START. +func yaml_emitter_emit_mapping_start(emitter *yaml_emitter_t, event *yaml_event_t) bool { + if !yaml_emitter_process_anchor(emitter) { + return false + } + if !yaml_emitter_process_tag(emitter) { + return false + } + if emitter.flow_level > 0 || emitter.canonical || event.mapping_style() == yaml_FLOW_MAPPING_STYLE || + yaml_emitter_check_empty_mapping(emitter) { + emitter.state = yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE + } else { + emitter.state = yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE + } + return true +} + +// Check if the document content is an empty scalar. +func yaml_emitter_check_empty_document(emitter *yaml_emitter_t) bool { + return false // [Go] Huh? +} + +// Check if the next events represent an empty sequence. +func yaml_emitter_check_empty_sequence(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_SEQUENCE_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_SEQUENCE_END_EVENT +} + +// Check if the next events represent an empty mapping. +func yaml_emitter_check_empty_mapping(emitter *yaml_emitter_t) bool { + if len(emitter.events)-emitter.events_head < 2 { + return false + } + return emitter.events[emitter.events_head].typ == yaml_MAPPING_START_EVENT && + emitter.events[emitter.events_head+1].typ == yaml_MAPPING_END_EVENT +} + +// Check if the next node can be expressed as a simple key. +func yaml_emitter_check_simple_key(emitter *yaml_emitter_t) bool { + length := 0 + switch emitter.events[emitter.events_head].typ { + case yaml_ALIAS_EVENT: + length += len(emitter.anchor_data.anchor) + case yaml_SCALAR_EVENT: + if emitter.scalar_data.multiline { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + + len(emitter.scalar_data.value) + case yaml_SEQUENCE_START_EVENT: + if !yaml_emitter_check_empty_sequence(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + case yaml_MAPPING_START_EVENT: + if !yaml_emitter_check_empty_mapping(emitter) { + return false + } + length += len(emitter.anchor_data.anchor) + + len(emitter.tag_data.handle) + + len(emitter.tag_data.suffix) + default: + return false + } + return length <= 128 +} + +// Determine an acceptable scalar style. +func yaml_emitter_select_scalar_style(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + no_tag := len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 + if no_tag && !event.implicit && !event.quoted_implicit { + return yaml_emitter_set_emitter_error(emitter, "neither tag nor implicit flags are specified") + } + + style := event.scalar_style() + if style == yaml_ANY_SCALAR_STYLE { + style = yaml_PLAIN_SCALAR_STYLE + } + if emitter.canonical { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + if emitter.simple_key_context && emitter.scalar_data.multiline { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + + if style == yaml_PLAIN_SCALAR_STYLE { + if emitter.flow_level > 0 && !emitter.scalar_data.flow_plain_allowed || + emitter.flow_level == 0 && !emitter.scalar_data.block_plain_allowed { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if len(emitter.scalar_data.value) == 0 && (emitter.flow_level > 0 || emitter.simple_key_context) { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + if no_tag && !event.implicit { + style = yaml_SINGLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_SINGLE_QUOTED_SCALAR_STYLE { + if !emitter.scalar_data.single_quoted_allowed { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + if style == yaml_LITERAL_SCALAR_STYLE || style == yaml_FOLDED_SCALAR_STYLE { + if !emitter.scalar_data.block_allowed || emitter.flow_level > 0 || emitter.simple_key_context { + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + } + + if no_tag && !event.quoted_implicit && style != yaml_PLAIN_SCALAR_STYLE { + emitter.tag_data.handle = []byte{'!'} + } + emitter.scalar_data.style = style + return true +} + +// Write an anchor. +func yaml_emitter_process_anchor(emitter *yaml_emitter_t) bool { + if emitter.anchor_data.anchor == nil { + return true + } + c := []byte{'&'} + if emitter.anchor_data.alias { + c[0] = '*' + } + if !yaml_emitter_write_indicator(emitter, c, true, false, false) { + return false + } + return yaml_emitter_write_anchor(emitter, emitter.anchor_data.anchor) +} + +// Write a tag. +func yaml_emitter_process_tag(emitter *yaml_emitter_t) bool { + if len(emitter.tag_data.handle) == 0 && len(emitter.tag_data.suffix) == 0 { + return true + } + if len(emitter.tag_data.handle) > 0 { + if !yaml_emitter_write_tag_handle(emitter, emitter.tag_data.handle) { + return false + } + if len(emitter.tag_data.suffix) > 0 { + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + } + } else { + // [Go] Allocate these slices elsewhere. + if !yaml_emitter_write_indicator(emitter, []byte("!<"), true, false, false) { + return false + } + if !yaml_emitter_write_tag_content(emitter, emitter.tag_data.suffix, false) { + return false + } + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, false, false, false) { + return false + } + } + return true +} + +// Write a scalar. +func yaml_emitter_process_scalar(emitter *yaml_emitter_t) bool { + switch emitter.scalar_data.style { + case yaml_PLAIN_SCALAR_STYLE: + return yaml_emitter_write_plain_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_SINGLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_single_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_DOUBLE_QUOTED_SCALAR_STYLE: + return yaml_emitter_write_double_quoted_scalar(emitter, emitter.scalar_data.value, !emitter.simple_key_context) + + case yaml_LITERAL_SCALAR_STYLE: + return yaml_emitter_write_literal_scalar(emitter, emitter.scalar_data.value) + + case yaml_FOLDED_SCALAR_STYLE: + return yaml_emitter_write_folded_scalar(emitter, emitter.scalar_data.value) + } + panic("unknown scalar style") +} + +// Check if a %YAML directive is valid. +func yaml_emitter_analyze_version_directive(emitter *yaml_emitter_t, version_directive *yaml_version_directive_t) bool { + if version_directive.major != 1 || version_directive.minor != 1 { + return yaml_emitter_set_emitter_error(emitter, "incompatible %YAML directive") + } + return true +} + +// Check if a %TAG directive is valid. +func yaml_emitter_analyze_tag_directive(emitter *yaml_emitter_t, tag_directive *yaml_tag_directive_t) bool { + handle := tag_directive.handle + prefix := tag_directive.prefix + if len(handle) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag handle must not be empty") + } + if handle[0] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must start with '!'") + } + if handle[len(handle)-1] != '!' { + return yaml_emitter_set_emitter_error(emitter, "tag handle must end with '!'") + } + for i := 1; i < len(handle)-1; i += width(handle[i]) { + if !is_alpha(handle, i) { + return yaml_emitter_set_emitter_error(emitter, "tag handle must contain alphanumerical characters only") + } + } + if len(prefix) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag prefix must not be empty") + } + return true +} + +// Check if an anchor is valid. +func yaml_emitter_analyze_anchor(emitter *yaml_emitter_t, anchor []byte, alias bool) bool { + if len(anchor) == 0 { + problem := "anchor value must not be empty" + if alias { + problem = "alias value must not be empty" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + for i := 0; i < len(anchor); i += width(anchor[i]) { + if !is_alpha(anchor, i) { + problem := "anchor value must contain alphanumerical characters only" + if alias { + problem = "alias value must contain alphanumerical characters only" + } + return yaml_emitter_set_emitter_error(emitter, problem) + } + } + emitter.anchor_data.anchor = anchor + emitter.anchor_data.alias = alias + return true +} + +// Check if a tag is valid. +func yaml_emitter_analyze_tag(emitter *yaml_emitter_t, tag []byte) bool { + if len(tag) == 0 { + return yaml_emitter_set_emitter_error(emitter, "tag value must not be empty") + } + for i := 0; i < len(emitter.tag_directives); i++ { + tag_directive := &emitter.tag_directives[i] + if bytes.HasPrefix(tag, tag_directive.prefix) { + emitter.tag_data.handle = tag_directive.handle + emitter.tag_data.suffix = tag[len(tag_directive.prefix):] + return true + } + } + emitter.tag_data.suffix = tag + return true +} + +// Check if a scalar is valid. +func yaml_emitter_analyze_scalar(emitter *yaml_emitter_t, value []byte) bool { + var ( + block_indicators = false + flow_indicators = false + line_breaks = false + special_characters = false + + leading_space = false + leading_break = false + trailing_space = false + trailing_break = false + break_space = false + space_break = false + + preceded_by_whitespace = false + followed_by_whitespace = false + previous_space = false + previous_break = false + ) + + emitter.scalar_data.value = value + + if len(value) == 0 { + emitter.scalar_data.multiline = false + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = false + return true + } + + if len(value) >= 3 && ((value[0] == '-' && value[1] == '-' && value[2] == '-') || (value[0] == '.' && value[1] == '.' && value[2] == '.')) { + block_indicators = true + flow_indicators = true + } + + preceded_by_whitespace = true + for i, w := 0, 0; i < len(value); i += w { + w = width(value[i]) + followed_by_whitespace = i+w >= len(value) || is_blank(value, i+w) + + if i == 0 { + switch value[i] { + case '#', ',', '[', ']', '{', '}', '&', '*', '!', '|', '>', '\'', '"', '%', '@', '`': + flow_indicators = true + block_indicators = true + case '?', ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '-': + if followed_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } else { + switch value[i] { + case ',', '?', '[', ']', '{', '}': + flow_indicators = true + case ':': + flow_indicators = true + if followed_by_whitespace { + block_indicators = true + } + case '#': + if preceded_by_whitespace { + flow_indicators = true + block_indicators = true + } + } + } + + if !is_printable(value, i) || !is_ascii(value, i) && !emitter.unicode { + special_characters = true + } + if is_space(value, i) { + if i == 0 { + leading_space = true + } + if i+width(value[i]) == len(value) { + trailing_space = true + } + if previous_break { + break_space = true + } + previous_space = true + previous_break = false + } else if is_break(value, i) { + line_breaks = true + if i == 0 { + leading_break = true + } + if i+width(value[i]) == len(value) { + trailing_break = true + } + if previous_space { + space_break = true + } + previous_space = false + previous_break = true + } else { + previous_space = false + previous_break = false + } + + // [Go]: Why 'z'? Couldn't be the end of the string as that's the loop condition. + preceded_by_whitespace = is_blankz(value, i) + } + + emitter.scalar_data.multiline = line_breaks + emitter.scalar_data.flow_plain_allowed = true + emitter.scalar_data.block_plain_allowed = true + emitter.scalar_data.single_quoted_allowed = true + emitter.scalar_data.block_allowed = true + + if leading_space || leading_break || trailing_space || trailing_break { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if trailing_space { + emitter.scalar_data.block_allowed = false + } + if break_space { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + } + if space_break || special_characters { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + emitter.scalar_data.single_quoted_allowed = false + emitter.scalar_data.block_allowed = false + } + if line_breaks { + emitter.scalar_data.flow_plain_allowed = false + emitter.scalar_data.block_plain_allowed = false + } + if flow_indicators { + emitter.scalar_data.flow_plain_allowed = false + } + if block_indicators { + emitter.scalar_data.block_plain_allowed = false + } + return true +} + +// Check if the event data is valid. +func yaml_emitter_analyze_event(emitter *yaml_emitter_t, event *yaml_event_t) bool { + + emitter.anchor_data.anchor = nil + emitter.tag_data.handle = nil + emitter.tag_data.suffix = nil + emitter.scalar_data.value = nil + + switch event.typ { + case yaml_ALIAS_EVENT: + if !yaml_emitter_analyze_anchor(emitter, event.anchor, true) { + return false + } + + case yaml_SCALAR_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || (!event.implicit && !event.quoted_implicit)) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + if !yaml_emitter_analyze_scalar(emitter, event.value) { + return false + } + + case yaml_SEQUENCE_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + + case yaml_MAPPING_START_EVENT: + if len(event.anchor) > 0 { + if !yaml_emitter_analyze_anchor(emitter, event.anchor, false) { + return false + } + } + if len(event.tag) > 0 && (emitter.canonical || !event.implicit) { + if !yaml_emitter_analyze_tag(emitter, event.tag) { + return false + } + } + } + return true +} + +// Write the BOM character. +func yaml_emitter_write_bom(emitter *yaml_emitter_t) bool { + if !flush(emitter) { + return false + } + pos := emitter.buffer_pos + emitter.buffer[pos+0] = '\xEF' + emitter.buffer[pos+1] = '\xBB' + emitter.buffer[pos+2] = '\xBF' + emitter.buffer_pos += 3 + return true +} + +func yaml_emitter_write_indent(emitter *yaml_emitter_t) bool { + indent := emitter.indent + if indent < 0 { + indent = 0 + } + if !emitter.indention || emitter.column > indent || (emitter.column == indent && !emitter.whitespace) { + if !put_break(emitter) { + return false + } + } + for emitter.column < indent { + if !put(emitter, ' ') { + return false + } + } + emitter.whitespace = true + emitter.indention = true + return true +} + +func yaml_emitter_write_indicator(emitter *yaml_emitter_t, indicator []byte, need_whitespace, is_whitespace, is_indention bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, indicator) { + return false + } + emitter.whitespace = is_whitespace + emitter.indention = (emitter.indention && is_indention) + emitter.open_ended = false + return true +} + +func yaml_emitter_write_anchor(emitter *yaml_emitter_t, value []byte) bool { + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_handle(emitter *yaml_emitter_t, value []byte) bool { + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + if !write_all(emitter, value) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_tag_content(emitter *yaml_emitter_t, value []byte, need_whitespace bool) bool { + if need_whitespace && !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + for i := 0; i < len(value); { + var must_write bool + switch value[i] { + case ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '_', '.', '~', '*', '\'', '(', ')', '[', ']': + must_write = true + default: + must_write = is_alpha(value, i) + } + if must_write { + if !write(emitter, value, &i) { + return false + } + } else { + w := width(value[i]) + for k := 0; k < w; k++ { + octet := value[i] + i++ + if !put(emitter, '%') { + return false + } + + c := octet >> 4 + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + + c = octet & 0x0f + if c < 10 { + c += '0' + } else { + c += 'A' - 10 + } + if !put(emitter, c) { + return false + } + } + } + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_plain_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + if !emitter.whitespace { + if !put(emitter, ' ') { + return false + } + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + + emitter.whitespace = false + emitter.indention = false + if emitter.root_context { + emitter.open_ended = true + } + + return true +} + +func yaml_emitter_write_single_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, true, false, false) { + return false + } + + spaces := false + breaks := false + for i := 0; i < len(value); { + if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 && !is_space(value, i+1) { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + spaces = true + } else if is_break(value, i) { + if !breaks && value[i] == '\n' { + if !put_break(emitter) { + return false + } + } + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if value[i] == '\'' { + if !put(emitter, '\'') { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + spaces = false + breaks = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'\''}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_double_quoted_scalar(emitter *yaml_emitter_t, value []byte, allow_breaks bool) bool { + spaces := false + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, true, false, false) { + return false + } + + for i := 0; i < len(value); { + if !is_printable(value, i) || (!emitter.unicode && !is_ascii(value, i)) || + is_bom(value, i) || is_break(value, i) || + value[i] == '"' || value[i] == '\\' { + + octet := value[i] + + var w int + var v rune + switch { + case octet&0x80 == 0x00: + w, v = 1, rune(octet&0x7F) + case octet&0xE0 == 0xC0: + w, v = 2, rune(octet&0x1F) + case octet&0xF0 == 0xE0: + w, v = 3, rune(octet&0x0F) + case octet&0xF8 == 0xF0: + w, v = 4, rune(octet&0x07) + } + for k := 1; k < w; k++ { + octet = value[i+k] + v = (v << 6) + (rune(octet) & 0x3F) + } + i += w + + if !put(emitter, '\\') { + return false + } + + var ok bool + switch v { + case 0x00: + ok = put(emitter, '0') + case 0x07: + ok = put(emitter, 'a') + case 0x08: + ok = put(emitter, 'b') + case 0x09: + ok = put(emitter, 't') + case 0x0A: + ok = put(emitter, 'n') + case 0x0b: + ok = put(emitter, 'v') + case 0x0c: + ok = put(emitter, 'f') + case 0x0d: + ok = put(emitter, 'r') + case 0x1b: + ok = put(emitter, 'e') + case 0x22: + ok = put(emitter, '"') + case 0x5c: + ok = put(emitter, '\\') + case 0x85: + ok = put(emitter, 'N') + case 0xA0: + ok = put(emitter, '_') + case 0x2028: + ok = put(emitter, 'L') + case 0x2029: + ok = put(emitter, 'P') + default: + if v <= 0xFF { + ok = put(emitter, 'x') + w = 2 + } else if v <= 0xFFFF { + ok = put(emitter, 'u') + w = 4 + } else { + ok = put(emitter, 'U') + w = 8 + } + for k := (w - 1) * 4; ok && k >= 0; k -= 4 { + digit := byte((v >> uint(k)) & 0x0F) + if digit < 10 { + ok = put(emitter, digit+'0') + } else { + ok = put(emitter, digit+'A'-10) + } + } + } + if !ok { + return false + } + spaces = false + } else if is_space(value, i) { + if allow_breaks && !spaces && emitter.column > emitter.best_width && i > 0 && i < len(value)-1 { + if !yaml_emitter_write_indent(emitter) { + return false + } + if is_space(value, i+1) { + if !put(emitter, '\\') { + return false + } + } + i += width(value[i]) + } else if !write(emitter, value, &i) { + return false + } + spaces = true + } else { + if !write(emitter, value, &i) { + return false + } + spaces = false + } + } + if !yaml_emitter_write_indicator(emitter, []byte{'"'}, false, false, false) { + return false + } + emitter.whitespace = false + emitter.indention = false + return true +} + +func yaml_emitter_write_block_scalar_hints(emitter *yaml_emitter_t, value []byte) bool { + if is_space(value, 0) || is_break(value, 0) { + indent_hint := []byte{'0' + byte(emitter.best_indent)} + if !yaml_emitter_write_indicator(emitter, indent_hint, false, false, false) { + return false + } + } + + emitter.open_ended = false + + var chomp_hint [1]byte + if len(value) == 0 { + chomp_hint[0] = '-' + } else { + i := len(value) - 1 + for value[i]&0xC0 == 0x80 { + i-- + } + if !is_break(value, i) { + chomp_hint[0] = '-' + } else if i == 0 { + chomp_hint[0] = '+' + emitter.open_ended = true + } else { + i-- + for value[i]&0xC0 == 0x80 { + i-- + } + if is_break(value, i) { + chomp_hint[0] = '+' + emitter.open_ended = true + } + } + } + if chomp_hint[0] != 0 { + if !yaml_emitter_write_indicator(emitter, chomp_hint[:], false, false, false) { + return false + } + } + return true +} + +func yaml_emitter_write_literal_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'|'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + if !put_break(emitter) { + return false + } + emitter.indention = true + emitter.whitespace = true + breaks := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + } + if !write(emitter, value, &i) { + return false + } + emitter.indention = false + breaks = false + } + } + + return true +} + +func yaml_emitter_write_folded_scalar(emitter *yaml_emitter_t, value []byte) bool { + if !yaml_emitter_write_indicator(emitter, []byte{'>'}, true, false, false) { + return false + } + if !yaml_emitter_write_block_scalar_hints(emitter, value) { + return false + } + + if !put_break(emitter) { + return false + } + emitter.indention = true + emitter.whitespace = true + + breaks := true + leading_spaces := true + for i := 0; i < len(value); { + if is_break(value, i) { + if !breaks && !leading_spaces && value[i] == '\n' { + k := 0 + for is_break(value, k) { + k += width(value[k]) + } + if !is_blankz(value, k) { + if !put_break(emitter) { + return false + } + } + } + if !write_break(emitter, value, &i) { + return false + } + emitter.indention = true + breaks = true + } else { + if breaks { + if !yaml_emitter_write_indent(emitter) { + return false + } + leading_spaces = is_blank(value, i) + } + if !breaks && is_space(value, i) && !is_space(value, i+1) && emitter.column > emitter.best_width { + if !yaml_emitter_write_indent(emitter) { + return false + } + i += width(value[i]) + } else { + if !write(emitter, value, &i) { + return false + } + } + emitter.indention = false + breaks = false + } + } + return true +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/encode.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/encode.go new file mode 100644 index 000000000..0ee738e11 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/encode.go @@ -0,0 +1,390 @@ +package yaml + +import ( + "encoding" + "fmt" + "io" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "time" + "unicode/utf8" +) + +// jsonNumber is the interface of the encoding/json.Number datatype. +// Repeating the interface here avoids a dependency on encoding/json, and also +// supports other libraries like jsoniter, which use a similar datatype with +// the same interface. Detecting this interface is useful when dealing with +// structures containing json.Number, which is a string under the hood. The +// encoder should prefer the use of Int64(), Float64() and string(), in that +// order, when encoding this type. +type jsonNumber interface { + Float64() (float64, error) + Int64() (int64, error) + String() string +} + +type encoder struct { + emitter yaml_emitter_t + event yaml_event_t + out []byte + flow bool + // doneInit holds whether the initial stream_start_event has been + // emitted. + doneInit bool +} + +func newEncoder() *encoder { + e := &encoder{} + yaml_emitter_initialize(&e.emitter) + yaml_emitter_set_output_string(&e.emitter, &e.out) + yaml_emitter_set_unicode(&e.emitter, true) + return e +} + +func newEncoderWithWriter(w io.Writer) *encoder { + e := &encoder{} + yaml_emitter_initialize(&e.emitter) + yaml_emitter_set_output_writer(&e.emitter, w) + yaml_emitter_set_unicode(&e.emitter, true) + return e +} + +func (e *encoder) init() { + if e.doneInit { + return + } + yaml_stream_start_event_initialize(&e.event, yaml_UTF8_ENCODING) + e.emit() + e.doneInit = true +} + +func (e *encoder) finish() { + e.emitter.open_ended = false + yaml_stream_end_event_initialize(&e.event) + e.emit() +} + +func (e *encoder) destroy() { + yaml_emitter_delete(&e.emitter) +} + +func (e *encoder) emit() { + // This will internally delete the e.event value. + e.must(yaml_emitter_emit(&e.emitter, &e.event)) +} + +func (e *encoder) must(ok bool) { + if !ok { + msg := e.emitter.problem + if msg == "" { + msg = "unknown problem generating YAML content" + } + failf("%s", msg) + } +} + +func (e *encoder) marshalDoc(tag string, in reflect.Value) { + e.init() + yaml_document_start_event_initialize(&e.event, nil, nil, true) + e.emit() + e.marshal(tag, in) + yaml_document_end_event_initialize(&e.event, true) + e.emit() +} + +func (e *encoder) marshal(tag string, in reflect.Value) { + if !in.IsValid() || in.Kind() == reflect.Ptr && in.IsNil() { + e.nilv() + return + } + iface := in.Interface() + switch m := iface.(type) { + case jsonNumber: + integer, err := m.Int64() + if err == nil { + // In this case the json.Number is a valid int64 + in = reflect.ValueOf(integer) + break + } + float, err := m.Float64() + if err == nil { + // In this case the json.Number is a valid float64 + in = reflect.ValueOf(float) + break + } + // fallback case - no number could be obtained + in = reflect.ValueOf(m.String()) + case time.Time, *time.Time: + // Although time.Time implements TextMarshaler, + // we don't want to treat it as a string for YAML + // purposes because YAML has special support for + // timestamps. + case Marshaler: + v, err := m.MarshalYAML() + if err != nil { + fail(err) + } + if v == nil { + e.nilv() + return + } + in = reflect.ValueOf(v) + case encoding.TextMarshaler: + text, err := m.MarshalText() + if err != nil { + fail(err) + } + in = reflect.ValueOf(string(text)) + case nil: + e.nilv() + return + } + switch in.Kind() { + case reflect.Interface: + e.marshal(tag, in.Elem()) + case reflect.Map: + e.mapv(tag, in) + case reflect.Ptr: + if in.Type() == ptrTimeType { + e.timev(tag, in.Elem()) + } else { + e.marshal(tag, in.Elem()) + } + case reflect.Struct: + if in.Type() == timeType { + e.timev(tag, in) + } else { + e.structv(tag, in) + } + case reflect.Slice, reflect.Array: + if in.Type().Elem() == mapItemType { + e.itemsv(tag, in) + } else { + e.slicev(tag, in) + } + case reflect.String: + e.stringv(tag, in) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + if in.Type() == durationType { + e.stringv(tag, reflect.ValueOf(iface.(time.Duration).String())) + } else { + e.intv(tag, in) + } + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + e.uintv(tag, in) + case reflect.Float32, reflect.Float64: + e.floatv(tag, in) + case reflect.Bool: + e.boolv(tag, in) + default: + panic("cannot marshal type: " + in.Type().String()) + } +} + +func (e *encoder) mapv(tag string, in reflect.Value) { + e.mappingv(tag, func() { + keys := keyList(in.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + e.marshal("", k) + e.marshal("", in.MapIndex(k)) + } + }) +} + +func (e *encoder) itemsv(tag string, in reflect.Value) { + e.mappingv(tag, func() { + slice := in.Convert(reflect.TypeOf([]MapItem{})).Interface().([]MapItem) + for _, item := range slice { + e.marshal("", reflect.ValueOf(item.Key)) + e.marshal("", reflect.ValueOf(item.Value)) + } + }) +} + +func (e *encoder) structv(tag string, in reflect.Value) { + sinfo, err := getStructInfo(in.Type()) + if err != nil { + panic(err) + } + e.mappingv(tag, func() { + for _, info := range sinfo.FieldsList { + var value reflect.Value + if info.Inline == nil { + value = in.Field(info.Num) + } else { + value = in.FieldByIndex(info.Inline) + } + if info.OmitEmpty && isZero(value) { + continue + } + e.marshal("", reflect.ValueOf(info.Key)) + e.flow = info.Flow + e.marshal("", value) + } + if sinfo.InlineMap >= 0 { + m := in.Field(sinfo.InlineMap) + if m.Len() > 0 { + e.flow = false + keys := keyList(m.MapKeys()) + sort.Sort(keys) + for _, k := range keys { + if _, found := sinfo.FieldsMap[k.String()]; found { + panic(fmt.Sprintf("Can't have key %q in inlined map; conflicts with struct field", k.String())) + } + e.marshal("", k) + e.flow = false + e.marshal("", m.MapIndex(k)) + } + } + } + }) +} + +func (e *encoder) mappingv(tag string, f func()) { + implicit := tag == "" + style := yaml_BLOCK_MAPPING_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_MAPPING_STYLE + } + yaml_mapping_start_event_initialize(&e.event, nil, []byte(tag), implicit, style) + e.emit() + f() + yaml_mapping_end_event_initialize(&e.event) + e.emit() +} + +func (e *encoder) slicev(tag string, in reflect.Value) { + implicit := tag == "" + style := yaml_BLOCK_SEQUENCE_STYLE + if e.flow { + e.flow = false + style = yaml_FLOW_SEQUENCE_STYLE + } + e.must(yaml_sequence_start_event_initialize(&e.event, nil, []byte(tag), implicit, style)) + e.emit() + n := in.Len() + for i := 0; i < n; i++ { + e.marshal("", in.Index(i)) + } + e.must(yaml_sequence_end_event_initialize(&e.event)) + e.emit() +} + +// isBase60 returns whether s is in base 60 notation as defined in YAML 1.1. +// +// The base 60 float notation in YAML 1.1 is a terrible idea and is unsupported +// in YAML 1.2 and by this package, but these should be marshalled quoted for +// the time being for compatibility with other parsers. +func isBase60Float(s string) (result bool) { + // Fast path. + if s == "" { + return false + } + c := s[0] + if !(c == '+' || c == '-' || c >= '0' && c <= '9') || strings.IndexByte(s, ':') < 0 { + return false + } + // Do the full match. + return base60float.MatchString(s) +} + +// From http://yaml.org/type/float.html, except the regular expression there +// is bogus. In practice parsers do not enforce the "\.[0-9_]*" suffix. +var base60float = regexp.MustCompile(`^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+(?:\.[0-9_]*)?$`) + +func (e *encoder) stringv(tag string, in reflect.Value) { + var style yaml_scalar_style_t + s := in.String() + canUsePlain := true + switch { + case !utf8.ValidString(s): + if tag == yaml_BINARY_TAG { + failf("explicitly tagged !!binary data must be base64-encoded") + } + if tag != "" { + failf("cannot marshal invalid UTF-8 data as %s", shortTag(tag)) + } + // It can't be encoded directly as YAML so use a binary tag + // and encode it as base64. + tag = yaml_BINARY_TAG + s = encodeBase64(s) + case tag == "": + // Check to see if it would resolve to a specific + // tag when encoded unquoted. If it doesn't, + // there's no need to quote it. + rtag, _ := resolve("", s) + canUsePlain = rtag == yaml_STR_TAG && !isBase60Float(s) + } + // Note: it's possible for user code to emit invalid YAML + // if they explicitly specify a tag and a string containing + // text that's incompatible with that tag. + switch { + case strings.Contains(s, "\n"): + style = yaml_LITERAL_SCALAR_STYLE + case canUsePlain: + style = yaml_PLAIN_SCALAR_STYLE + default: + style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + e.emitScalar(s, "", tag, style) +} + +func (e *encoder) boolv(tag string, in reflect.Value) { + var s string + if in.Bool() { + s = "true" + } else { + s = "false" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) intv(tag string, in reflect.Value) { + s := strconv.FormatInt(in.Int(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) uintv(tag string, in reflect.Value) { + s := strconv.FormatUint(in.Uint(), 10) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) timev(tag string, in reflect.Value) { + t := in.Interface().(time.Time) + s := t.Format(time.RFC3339Nano) + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) floatv(tag string, in reflect.Value) { + // Issue #352: When formatting, use the precision of the underlying value + precision := 64 + if in.Kind() == reflect.Float32 { + precision = 32 + } + + s := strconv.FormatFloat(in.Float(), 'g', -1, precision) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + e.emitScalar(s, "", tag, yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) nilv() { + e.emitScalar("null", "", "", yaml_PLAIN_SCALAR_STYLE) +} + +func (e *encoder) emitScalar(value, anchor, tag string, style yaml_scalar_style_t) { + implicit := tag == "" + e.must(yaml_scalar_event_initialize(&e.event, []byte(anchor), []byte(tag), []byte(value), implicit, implicit, style)) + e.emit() +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go new file mode 100644 index 000000000..81d05dfe5 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/parserc.go @@ -0,0 +1,1095 @@ +package yaml + +import ( + "bytes" +) + +// The parser implements the following grammar: +// +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// implicit_document ::= block_node DOCUMENT-END* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// block_node_or_indentless_sequence ::= +// ALIAS +// | properties (block_content | indentless_block_sequence)? +// | block_content +// | indentless_block_sequence +// block_node ::= ALIAS +// | properties block_content? +// | block_content +// flow_node ::= ALIAS +// | properties flow_content? +// | flow_content +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// block_content ::= block_collection | flow_collection | SCALAR +// flow_content ::= flow_collection | SCALAR +// block_collection ::= block_sequence | block_mapping +// flow_collection ::= flow_sequence | flow_mapping +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// block_mapping ::= BLOCK-MAPPING_START +// ((KEY block_node_or_indentless_sequence?)? +// (VALUE block_node_or_indentless_sequence?)?)* +// BLOCK-END +// flow_sequence ::= FLOW-SEQUENCE-START +// (flow_sequence_entry FLOW-ENTRY)* +// flow_sequence_entry? +// FLOW-SEQUENCE-END +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// flow_mapping ::= FLOW-MAPPING-START +// (flow_mapping_entry FLOW-ENTRY)* +// flow_mapping_entry? +// FLOW-MAPPING-END +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? + +// Peek the next token in the token queue. +func peek_token(parser *yaml_parser_t) *yaml_token_t { + if parser.token_available || yaml_parser_fetch_more_tokens(parser) { + return &parser.tokens[parser.tokens_head] + } + return nil +} + +// Remove the next token from the queue (must be called after peek_token). +func skip_token(parser *yaml_parser_t) { + parser.token_available = false + parser.tokens_parsed++ + parser.stream_end_produced = parser.tokens[parser.tokens_head].typ == yaml_STREAM_END_TOKEN + parser.tokens_head++ +} + +// Get the next event. +func yaml_parser_parse(parser *yaml_parser_t, event *yaml_event_t) bool { + // Erase the event object. + *event = yaml_event_t{} + + // No events after the end of the stream or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR || parser.state == yaml_PARSE_END_STATE { + return true + } + + // Generate the next event. + return yaml_parser_state_machine(parser, event) +} + +// Set parser error. +func yaml_parser_set_parser_error(parser *yaml_parser_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +func yaml_parser_set_parser_error_context(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string, problem_mark yaml_mark_t) bool { + parser.error = yaml_PARSER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = problem_mark + return false +} + +// State dispatcher. +func yaml_parser_state_machine(parser *yaml_parser_t, event *yaml_event_t) bool { + //trace("yaml_parser_state_machine", "state:", parser.state.String()) + + switch parser.state { + case yaml_PARSE_STREAM_START_STATE: + return yaml_parser_parse_stream_start(parser, event) + + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, true) + + case yaml_PARSE_DOCUMENT_START_STATE: + return yaml_parser_parse_document_start(parser, event, false) + + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return yaml_parser_parse_document_content(parser, event) + + case yaml_PARSE_DOCUMENT_END_STATE: + return yaml_parser_parse_document_end(parser, event) + + case yaml_PARSE_BLOCK_NODE_STATE: + return yaml_parser_parse_node(parser, event, true, false) + + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return yaml_parser_parse_node(parser, event, true, true) + + case yaml_PARSE_FLOW_NODE_STATE: + return yaml_parser_parse_node(parser, event, false, false) + + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, true) + + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_block_sequence_entry(parser, event, false) + + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_indentless_sequence_entry(parser, event) + + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, true) + + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return yaml_parser_parse_block_mapping_key(parser, event, false) + + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return yaml_parser_parse_block_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, true) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return yaml_parser_parse_flow_sequence_entry(parser, event, false) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_key(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_value(parser, event) + + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return yaml_parser_parse_flow_sequence_entry_mapping_end(parser, event) + + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, true) + + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return yaml_parser_parse_flow_mapping_key(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, false) + + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return yaml_parser_parse_flow_mapping_value(parser, event, true) + + default: + panic("invalid parser state") + } +} + +// Parse the production: +// stream ::= STREAM-START implicit_document? explicit_document* STREAM-END +// ************ +func yaml_parser_parse_stream_start(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_STREAM_START_TOKEN { + return yaml_parser_set_parser_error(parser, "did not find expected ", token.start_mark) + } + parser.state = yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + encoding: token.encoding, + } + skip_token(parser) + return true +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// * +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// ************************* +func yaml_parser_parse_document_start(parser *yaml_parser_t, event *yaml_event_t, implicit bool) bool { + + token := peek_token(parser) + if token == nil { + return false + } + + // Parse extra document end indicators. + if !implicit { + for token.typ == yaml_DOCUMENT_END_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + if implicit && token.typ != yaml_VERSION_DIRECTIVE_TOKEN && + token.typ != yaml_TAG_DIRECTIVE_TOKEN && + token.typ != yaml_DOCUMENT_START_TOKEN && + token.typ != yaml_STREAM_END_TOKEN { + // Parse an implicit document. + if !yaml_parser_process_directives(parser, nil, nil) { + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_BLOCK_NODE_STATE + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + } else if token.typ != yaml_STREAM_END_TOKEN { + // Parse an explicit document. + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + start_mark := token.start_mark + if !yaml_parser_process_directives(parser, &version_directive, &tag_directives) { + return false + } + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_DOCUMENT_START_TOKEN { + yaml_parser_set_parser_error(parser, + "did not find expected ", token.start_mark) + return false + } + parser.states = append(parser.states, yaml_PARSE_DOCUMENT_END_STATE) + parser.state = yaml_PARSE_DOCUMENT_CONTENT_STATE + end_mark := token.end_mark + + *event = yaml_event_t{ + typ: yaml_DOCUMENT_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + version_directive: version_directive, + tag_directives: tag_directives, + implicit: false, + } + skip_token(parser) + + } else { + // Parse the stream end. + parser.state = yaml_PARSE_END_STATE + *event = yaml_event_t{ + typ: yaml_STREAM_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + } + + return true +} + +// Parse the productions: +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// *********** +// +func yaml_parser_parse_document_content(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN || + token.typ == yaml_TAG_DIRECTIVE_TOKEN || + token.typ == yaml_DOCUMENT_START_TOKEN || + token.typ == yaml_DOCUMENT_END_TOKEN || + token.typ == yaml_STREAM_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + return yaml_parser_process_empty_scalar(parser, event, + token.start_mark) + } + return yaml_parser_parse_node(parser, event, true, false) +} + +// Parse the productions: +// implicit_document ::= block_node DOCUMENT-END* +// ************* +// explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* +// +func yaml_parser_parse_document_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + start_mark := token.start_mark + end_mark := token.start_mark + + implicit := true + if token.typ == yaml_DOCUMENT_END_TOKEN { + end_mark = token.end_mark + skip_token(parser) + implicit = false + } + + parser.tag_directives = parser.tag_directives[:0] + + parser.state = yaml_PARSE_DOCUMENT_START_STATE + *event = yaml_event_t{ + typ: yaml_DOCUMENT_END_EVENT, + start_mark: start_mark, + end_mark: end_mark, + implicit: implicit, + } + return true +} + +// Parse the productions: +// block_node_or_indentless_sequence ::= +// ALIAS +// ***** +// | properties (block_content | indentless_block_sequence)? +// ********** * +// | block_content | indentless_block_sequence +// * +// block_node ::= ALIAS +// ***** +// | properties block_content? +// ********** * +// | block_content +// * +// flow_node ::= ALIAS +// ***** +// | properties flow_content? +// ********** * +// | flow_content +// * +// properties ::= TAG ANCHOR? | ANCHOR TAG? +// ************************* +// block_content ::= block_collection | flow_collection | SCALAR +// ****** +// flow_content ::= flow_collection | SCALAR +// ****** +func yaml_parser_parse_node(parser *yaml_parser_t, event *yaml_event_t, block, indentless_sequence bool) bool { + //defer trace("yaml_parser_parse_node", "block:", block, "indentless_sequence:", indentless_sequence)() + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_ALIAS_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + *event = yaml_event_t{ + typ: yaml_ALIAS_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + anchor: token.value, + } + skip_token(parser) + return true + } + + start_mark := token.start_mark + end_mark := token.start_mark + + var tag_token bool + var tag_handle, tag_suffix, anchor []byte + var tag_mark yaml_mark_t + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + start_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } else if token.typ == yaml_TAG_TOKEN { + tag_token = true + tag_handle = token.value + tag_suffix = token.suffix + start_mark = token.start_mark + tag_mark = token.start_mark + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_ANCHOR_TOKEN { + anchor = token.value + end_mark = token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + } + + var tag []byte + if tag_token { + if len(tag_handle) == 0 { + tag = tag_suffix + tag_suffix = nil + } else { + for i := range parser.tag_directives { + if bytes.Equal(parser.tag_directives[i].handle, tag_handle) { + tag = append([]byte(nil), parser.tag_directives[i].prefix...) + tag = append(tag, tag_suffix...) + break + } + } + if len(tag) == 0 { + yaml_parser_set_parser_error_context(parser, + "while parsing a node", start_mark, + "found undefined tag handle", tag_mark) + return false + } + } + } + + implicit := len(tag) == 0 + if indentless_sequence && token.typ == yaml_BLOCK_ENTRY_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + return true + } + if token.typ == yaml_SCALAR_TOKEN { + var plain_implicit, quoted_implicit bool + end_mark = token.end_mark + if (len(tag) == 0 && token.style == yaml_PLAIN_SCALAR_STYLE) || (len(tag) == 1 && tag[0] == '!') { + plain_implicit = true + } else if len(tag) == 0 { + quoted_implicit = true + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + value: token.value, + implicit: plain_implicit, + quoted_implicit: quoted_implicit, + style: yaml_style_t(token.style), + } + skip_token(parser) + return true + } + if token.typ == yaml_FLOW_SEQUENCE_START_TOKEN { + // [Go] Some of the events below can be merged as they differ only on style. + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_SEQUENCE_STYLE), + } + return true + } + if token.typ == yaml_FLOW_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + return true + } + if block && token.typ == yaml_BLOCK_SEQUENCE_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_SEQUENCE_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_SEQUENCE_STYLE), + } + return true + } + if block && token.typ == yaml_BLOCK_MAPPING_START_TOKEN { + end_mark = token.end_mark + parser.state = yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + style: yaml_style_t(yaml_BLOCK_MAPPING_STYLE), + } + return true + } + if len(anchor) > 0 || len(tag) > 0 { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: start_mark, + end_mark: end_mark, + anchor: anchor, + tag: tag, + implicit: implicit, + quoted_implicit: false, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true + } + + context := "while parsing a flow node" + if block { + context = "while parsing a block node" + } + yaml_parser_set_parser_error_context(parser, context, start_mark, + "did not find expected node content", token.start_mark) + return false +} + +// Parse the productions: +// block_sequence ::= BLOCK-SEQUENCE-START (BLOCK-ENTRY block_node?)* BLOCK-END +// ******************** *********** * ********* +// +func yaml_parser_parse_block_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } else { + parser.state = yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } + if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block collection", context_mark, + "did not find expected '-' indicator", token.start_mark) +} + +// Parse the productions: +// indentless_sequence ::= (BLOCK-ENTRY block_node?)+ +// *********** * +func yaml_parser_parse_indentless_sequence_entry(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_BLOCK_ENTRY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_BLOCK_ENTRY_TOKEN && + token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, true, false) + } + parser.state = yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be token.end_mark? + } + return true +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// ******************* +// ((KEY block_node_or_indentless_sequence?)? +// *** * +// (VALUE block_node_or_indentless_sequence?)?)* +// +// BLOCK-END +// ********* +// +func yaml_parser_parse_block_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ == yaml_KEY_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } else { + parser.state = yaml_PARSE_BLOCK_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + } else if token.typ == yaml_BLOCK_END_TOKEN { + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + return true + } + + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a block mapping", context_mark, + "did not find expected key", token.start_mark) +} + +// Parse the productions: +// block_mapping ::= BLOCK-MAPPING_START +// +// ((KEY block_node_or_indentless_sequence?)? +// +// (VALUE block_node_or_indentless_sequence?)?)* +// ***** * +// BLOCK-END +// +// +func yaml_parser_parse_block_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + mark := token.end_mark + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_KEY_TOKEN && + token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_BLOCK_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_BLOCK_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, true, true) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) + } + parser.state = yaml_PARSE_BLOCK_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence ::= FLOW-SEQUENCE-START +// ******************* +// (flow_sequence_entry FLOW-ENTRY)* +// * ********** +// flow_sequence_entry? +// * +// FLOW-SEQUENCE-END +// ***************** +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * +// +func yaml_parser_parse_flow_sequence_entry(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow sequence", context_mark, + "did not find expected ',' or ']'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_START_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + implicit: true, + style: yaml_style_t(yaml_FLOW_MAPPING_STYLE), + } + skip_token(parser) + return true + } else if token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + + *event = yaml_event_t{ + typ: yaml_SEQUENCE_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + + skip_token(parser) + return true +} + +// +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// *** * +// +func yaml_parser_parse_flow_sequence_entry_mapping_key(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + mark := token.end_mark + skip_token(parser) + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// ***** * +// +func yaml_parser_parse_flow_sequence_entry_mapping_value(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token := peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_SEQUENCE_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Parse the productions: +// flow_sequence_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * +// +func yaml_parser_parse_flow_sequence_entry_mapping_end(parser *yaml_parser_t, event *yaml_event_t) bool { + token := peek_token(parser) + if token == nil { + return false + } + parser.state = yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.start_mark, // [Go] Shouldn't this be end_mark? + } + return true +} + +// Parse the productions: +// flow_mapping ::= FLOW-MAPPING-START +// ****************** +// (flow_mapping_entry FLOW-ENTRY)* +// * ********** +// flow_mapping_entry? +// ****************** +// FLOW-MAPPING-END +// **************** +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * *** * +// +func yaml_parser_parse_flow_mapping_key(parser *yaml_parser_t, event *yaml_event_t, first bool) bool { + if first { + token := peek_token(parser) + parser.marks = append(parser.marks, token.start_mark) + skip_token(parser) + } + + token := peek_token(parser) + if token == nil { + return false + } + + if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + if !first { + if token.typ == yaml_FLOW_ENTRY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } else { + context_mark := parser.marks[len(parser.marks)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + return yaml_parser_set_parser_error_context(parser, + "while parsing a flow mapping", context_mark, + "did not find expected ',' or '}'", token.start_mark) + } + } + + if token.typ == yaml_KEY_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_VALUE_TOKEN && + token.typ != yaml_FLOW_ENTRY_TOKEN && + token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } else { + parser.state = yaml_PARSE_FLOW_MAPPING_VALUE_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + } else if token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + + parser.state = parser.states[len(parser.states)-1] + parser.states = parser.states[:len(parser.states)-1] + parser.marks = parser.marks[:len(parser.marks)-1] + *event = yaml_event_t{ + typ: yaml_MAPPING_END_EVENT, + start_mark: token.start_mark, + end_mark: token.end_mark, + } + skip_token(parser) + return true +} + +// Parse the productions: +// flow_mapping_entry ::= flow_node | KEY flow_node? (VALUE flow_node?)? +// * ***** * +// +func yaml_parser_parse_flow_mapping_value(parser *yaml_parser_t, event *yaml_event_t, empty bool) bool { + token := peek_token(parser) + if token == nil { + return false + } + if empty { + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) + } + if token.typ == yaml_VALUE_TOKEN { + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + if token.typ != yaml_FLOW_ENTRY_TOKEN && token.typ != yaml_FLOW_MAPPING_END_TOKEN { + parser.states = append(parser.states, yaml_PARSE_FLOW_MAPPING_KEY_STATE) + return yaml_parser_parse_node(parser, event, false, false) + } + } + parser.state = yaml_PARSE_FLOW_MAPPING_KEY_STATE + return yaml_parser_process_empty_scalar(parser, event, token.start_mark) +} + +// Generate an empty scalar event. +func yaml_parser_process_empty_scalar(parser *yaml_parser_t, event *yaml_event_t, mark yaml_mark_t) bool { + *event = yaml_event_t{ + typ: yaml_SCALAR_EVENT, + start_mark: mark, + end_mark: mark, + value: nil, // Empty + implicit: true, + style: yaml_style_t(yaml_PLAIN_SCALAR_STYLE), + } + return true +} + +var default_tag_directives = []yaml_tag_directive_t{ + {[]byte("!"), []byte("!")}, + {[]byte("!!"), []byte("tag:yaml.org,2002:")}, +} + +// Parse directives. +func yaml_parser_process_directives(parser *yaml_parser_t, + version_directive_ref **yaml_version_directive_t, + tag_directives_ref *[]yaml_tag_directive_t) bool { + + var version_directive *yaml_version_directive_t + var tag_directives []yaml_tag_directive_t + + token := peek_token(parser) + if token == nil { + return false + } + + for token.typ == yaml_VERSION_DIRECTIVE_TOKEN || token.typ == yaml_TAG_DIRECTIVE_TOKEN { + if token.typ == yaml_VERSION_DIRECTIVE_TOKEN { + if version_directive != nil { + yaml_parser_set_parser_error(parser, + "found duplicate %YAML directive", token.start_mark) + return false + } + if token.major != 1 || token.minor != 1 { + yaml_parser_set_parser_error(parser, + "found incompatible YAML document", token.start_mark) + return false + } + version_directive = &yaml_version_directive_t{ + major: token.major, + minor: token.minor, + } + } else if token.typ == yaml_TAG_DIRECTIVE_TOKEN { + value := yaml_tag_directive_t{ + handle: token.value, + prefix: token.prefix, + } + if !yaml_parser_append_tag_directive(parser, value, false, token.start_mark) { + return false + } + tag_directives = append(tag_directives, value) + } + + skip_token(parser) + token = peek_token(parser) + if token == nil { + return false + } + } + + for i := range default_tag_directives { + if !yaml_parser_append_tag_directive(parser, default_tag_directives[i], true, token.start_mark) { + return false + } + } + + if version_directive_ref != nil { + *version_directive_ref = version_directive + } + if tag_directives_ref != nil { + *tag_directives_ref = tag_directives + } + return true +} + +// Append a tag directive to the directives stack. +func yaml_parser_append_tag_directive(parser *yaml_parser_t, value yaml_tag_directive_t, allow_duplicates bool, mark yaml_mark_t) bool { + for i := range parser.tag_directives { + if bytes.Equal(value.handle, parser.tag_directives[i].handle) { + if allow_duplicates { + return true + } + return yaml_parser_set_parser_error(parser, "found duplicate %TAG directive", mark) + } + } + + // [Go] I suspect the copy is unnecessary. This was likely done + // because there was no way to track ownership of the data. + value_copy := yaml_tag_directive_t{ + handle: make([]byte, len(value.handle)), + prefix: make([]byte, len(value.prefix)), + } + copy(value_copy.handle, value.handle) + copy(value_copy.prefix, value.prefix) + parser.tag_directives = append(parser.tag_directives, value_copy) + return true +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go new file mode 100644 index 000000000..7c1f5fac3 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/readerc.go @@ -0,0 +1,412 @@ +package yaml + +import ( + "io" +) + +// Set the reader error and return 0. +func yaml_parser_set_reader_error(parser *yaml_parser_t, problem string, offset int, value int) bool { + parser.error = yaml_READER_ERROR + parser.problem = problem + parser.problem_offset = offset + parser.problem_value = value + return false +} + +// Byte order marks. +const ( + bom_UTF8 = "\xef\xbb\xbf" + bom_UTF16LE = "\xff\xfe" + bom_UTF16BE = "\xfe\xff" +) + +// Determine the input stream encoding by checking the BOM symbol. If no BOM is +// found, the UTF-8 encoding is assumed. Return 1 on success, 0 on failure. +func yaml_parser_determine_encoding(parser *yaml_parser_t) bool { + // Ensure that we had enough bytes in the raw buffer. + for !parser.eof && len(parser.raw_buffer)-parser.raw_buffer_pos < 3 { + if !yaml_parser_update_raw_buffer(parser) { + return false + } + } + + // Determine the encoding. + buf := parser.raw_buffer + pos := parser.raw_buffer_pos + avail := len(buf) - pos + if avail >= 2 && buf[pos] == bom_UTF16LE[0] && buf[pos+1] == bom_UTF16LE[1] { + parser.encoding = yaml_UTF16LE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 2 && buf[pos] == bom_UTF16BE[0] && buf[pos+1] == bom_UTF16BE[1] { + parser.encoding = yaml_UTF16BE_ENCODING + parser.raw_buffer_pos += 2 + parser.offset += 2 + } else if avail >= 3 && buf[pos] == bom_UTF8[0] && buf[pos+1] == bom_UTF8[1] && buf[pos+2] == bom_UTF8[2] { + parser.encoding = yaml_UTF8_ENCODING + parser.raw_buffer_pos += 3 + parser.offset += 3 + } else { + parser.encoding = yaml_UTF8_ENCODING + } + return true +} + +// Update the raw buffer. +func yaml_parser_update_raw_buffer(parser *yaml_parser_t) bool { + size_read := 0 + + // Return if the raw buffer is full. + if parser.raw_buffer_pos == 0 && len(parser.raw_buffer) == cap(parser.raw_buffer) { + return true + } + + // Return on EOF. + if parser.eof { + return true + } + + // Move the remaining bytes in the raw buffer to the beginning. + if parser.raw_buffer_pos > 0 && parser.raw_buffer_pos < len(parser.raw_buffer) { + copy(parser.raw_buffer, parser.raw_buffer[parser.raw_buffer_pos:]) + } + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)-parser.raw_buffer_pos] + parser.raw_buffer_pos = 0 + + // Call the read handler to fill the buffer. + size_read, err := parser.read_handler(parser, parser.raw_buffer[len(parser.raw_buffer):cap(parser.raw_buffer)]) + parser.raw_buffer = parser.raw_buffer[:len(parser.raw_buffer)+size_read] + if err == io.EOF { + parser.eof = true + } else if err != nil { + return yaml_parser_set_reader_error(parser, "input error: "+err.Error(), parser.offset, -1) + } + return true +} + +// Ensure that the buffer contains at least `length` characters. +// Return true on success, false on failure. +// +// The length is supposed to be significantly less that the buffer size. +func yaml_parser_update_buffer(parser *yaml_parser_t, length int) bool { + if parser.read_handler == nil { + panic("read handler must be set") + } + + // [Go] This function was changed to guarantee the requested length size at EOF. + // The fact we need to do this is pretty awful, but the description above implies + // for that to be the case, and there are tests + + // If the EOF flag is set and the raw buffer is empty, do nothing. + if parser.eof && parser.raw_buffer_pos == len(parser.raw_buffer) { + // [Go] ACTUALLY! Read the documentation of this function above. + // This is just broken. To return true, we need to have the + // given length in the buffer. Not doing that means every single + // check that calls this function to make sure the buffer has a + // given length is Go) panicking; or C) accessing invalid memory. + //return true + } + + // Return if the buffer contains enough characters. + if parser.unread >= length { + return true + } + + // Determine the input encoding if it is not known yet. + if parser.encoding == yaml_ANY_ENCODING { + if !yaml_parser_determine_encoding(parser) { + return false + } + } + + // Move the unread characters to the beginning of the buffer. + buffer_len := len(parser.buffer) + if parser.buffer_pos > 0 && parser.buffer_pos < buffer_len { + copy(parser.buffer, parser.buffer[parser.buffer_pos:]) + buffer_len -= parser.buffer_pos + parser.buffer_pos = 0 + } else if parser.buffer_pos == buffer_len { + buffer_len = 0 + parser.buffer_pos = 0 + } + + // Open the whole buffer for writing, and cut it before returning. + parser.buffer = parser.buffer[:cap(parser.buffer)] + + // Fill the buffer until it has enough characters. + first := true + for parser.unread < length { + + // Fill the raw buffer if necessary. + if !first || parser.raw_buffer_pos == len(parser.raw_buffer) { + if !yaml_parser_update_raw_buffer(parser) { + parser.buffer = parser.buffer[:buffer_len] + return false + } + } + first = false + + // Decode the raw buffer. + inner: + for parser.raw_buffer_pos != len(parser.raw_buffer) { + var value rune + var width int + + raw_unread := len(parser.raw_buffer) - parser.raw_buffer_pos + + // Decode the next character. + switch parser.encoding { + case yaml_UTF8_ENCODING: + // Decode a UTF-8 character. Check RFC 3629 + // (http://www.ietf.org/rfc/rfc3629.txt) for more details. + // + // The following table (taken from the RFC) is used for + // decoding. + // + // Char. number range | UTF-8 octet sequence + // (hexadecimal) | (binary) + // --------------------+------------------------------------ + // 0000 0000-0000 007F | 0xxxxxxx + // 0000 0080-0000 07FF | 110xxxxx 10xxxxxx + // 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx + // 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + // + // Additionally, the characters in the range 0xD800-0xDFFF + // are prohibited as they are reserved for use with UTF-16 + // surrogate pairs. + + // Determine the length of the UTF-8 sequence. + octet := parser.raw_buffer[parser.raw_buffer_pos] + switch { + case octet&0x80 == 0x00: + width = 1 + case octet&0xE0 == 0xC0: + width = 2 + case octet&0xF0 == 0xE0: + width = 3 + case octet&0xF8 == 0xF0: + width = 4 + default: + // The leading octet is invalid. + return yaml_parser_set_reader_error(parser, + "invalid leading UTF-8 octet", + parser.offset, int(octet)) + } + + // Check if the raw buffer contains an incomplete character. + if width > raw_unread { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-8 octet sequence", + parser.offset, -1) + } + break inner + } + + // Decode the leading octet. + switch { + case octet&0x80 == 0x00: + value = rune(octet & 0x7F) + case octet&0xE0 == 0xC0: + value = rune(octet & 0x1F) + case octet&0xF0 == 0xE0: + value = rune(octet & 0x0F) + case octet&0xF8 == 0xF0: + value = rune(octet & 0x07) + default: + value = 0 + } + + // Check and decode the trailing octets. + for k := 1; k < width; k++ { + octet = parser.raw_buffer[parser.raw_buffer_pos+k] + + // Check if the octet is valid. + if (octet & 0xC0) != 0x80 { + return yaml_parser_set_reader_error(parser, + "invalid trailing UTF-8 octet", + parser.offset+k, int(octet)) + } + + // Decode the octet. + value = (value << 6) + rune(octet&0x3F) + } + + // Check the length of the sequence against the value. + switch { + case width == 1: + case width == 2 && value >= 0x80: + case width == 3 && value >= 0x800: + case width == 4 && value >= 0x10000: + default: + return yaml_parser_set_reader_error(parser, + "invalid length of a UTF-8 sequence", + parser.offset, -1) + } + + // Check the range of the value. + if value >= 0xD800 && value <= 0xDFFF || value > 0x10FFFF { + return yaml_parser_set_reader_error(parser, + "invalid Unicode character", + parser.offset, int(value)) + } + + case yaml_UTF16LE_ENCODING, yaml_UTF16BE_ENCODING: + var low, high int + if parser.encoding == yaml_UTF16LE_ENCODING { + low, high = 0, 1 + } else { + low, high = 1, 0 + } + + // The UTF-16 encoding is not as simple as one might + // naively think. Check RFC 2781 + // (http://www.ietf.org/rfc/rfc2781.txt). + // + // Normally, two subsequent bytes describe a Unicode + // character. However a special technique (called a + // surrogate pair) is used for specifying character + // values larger than 0xFFFF. + // + // A surrogate pair consists of two pseudo-characters: + // high surrogate area (0xD800-0xDBFF) + // low surrogate area (0xDC00-0xDFFF) + // + // The following formulas are used for decoding + // and encoding characters using surrogate pairs: + // + // U = U' + 0x10000 (0x01 00 00 <= U <= 0x10 FF FF) + // U' = yyyyyyyyyyxxxxxxxxxx (0 <= U' <= 0x0F FF FF) + // W1 = 110110yyyyyyyyyy + // W2 = 110111xxxxxxxxxx + // + // where U is the character value, W1 is the high surrogate + // area, W2 is the low surrogate area. + + // Check for incomplete UTF-16 character. + if raw_unread < 2 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 character", + parser.offset, -1) + } + break inner + } + + // Get the character. + value = rune(parser.raw_buffer[parser.raw_buffer_pos+low]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high]) << 8) + + // Check for unexpected low surrogate area. + if value&0xFC00 == 0xDC00 { + return yaml_parser_set_reader_error(parser, + "unexpected low surrogate area", + parser.offset, int(value)) + } + + // Check for a high surrogate area. + if value&0xFC00 == 0xD800 { + width = 4 + + // Check for incomplete surrogate pair. + if raw_unread < 4 { + if parser.eof { + return yaml_parser_set_reader_error(parser, + "incomplete UTF-16 surrogate pair", + parser.offset, -1) + } + break inner + } + + // Get the next character. + value2 := rune(parser.raw_buffer[parser.raw_buffer_pos+low+2]) + + (rune(parser.raw_buffer[parser.raw_buffer_pos+high+2]) << 8) + + // Check for a low surrogate area. + if value2&0xFC00 != 0xDC00 { + return yaml_parser_set_reader_error(parser, + "expected low surrogate area", + parser.offset+2, int(value2)) + } + + // Generate the value of the surrogate pair. + value = 0x10000 + ((value & 0x3FF) << 10) + (value2 & 0x3FF) + } else { + width = 2 + } + + default: + panic("impossible") + } + + // Check if the character is in the allowed range: + // #x9 | #xA | #xD | [#x20-#x7E] (8 bit) + // | #x85 | [#xA0-#xD7FF] | [#xE000-#xFFFD] (16 bit) + // | [#x10000-#x10FFFF] (32 bit) + switch { + case value == 0x09: + case value == 0x0A: + case value == 0x0D: + case value >= 0x20 && value <= 0x7E: + case value == 0x85: + case value >= 0xA0 && value <= 0xD7FF: + case value >= 0xE000 && value <= 0xFFFD: + case value >= 0x10000 && value <= 0x10FFFF: + default: + return yaml_parser_set_reader_error(parser, + "control characters are not allowed", + parser.offset, int(value)) + } + + // Move the raw pointers. + parser.raw_buffer_pos += width + parser.offset += width + + // Finally put the character into the buffer. + if value <= 0x7F { + // 0000 0000-0000 007F . 0xxxxxxx + parser.buffer[buffer_len+0] = byte(value) + buffer_len += 1 + } else if value <= 0x7FF { + // 0000 0080-0000 07FF . 110xxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xC0 + (value >> 6)) + parser.buffer[buffer_len+1] = byte(0x80 + (value & 0x3F)) + buffer_len += 2 + } else if value <= 0xFFFF { + // 0000 0800-0000 FFFF . 1110xxxx 10xxxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xE0 + (value >> 12)) + parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 6) & 0x3F)) + parser.buffer[buffer_len+2] = byte(0x80 + (value & 0x3F)) + buffer_len += 3 + } else { + // 0001 0000-0010 FFFF . 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + parser.buffer[buffer_len+0] = byte(0xF0 + (value >> 18)) + parser.buffer[buffer_len+1] = byte(0x80 + ((value >> 12) & 0x3F)) + parser.buffer[buffer_len+2] = byte(0x80 + ((value >> 6) & 0x3F)) + parser.buffer[buffer_len+3] = byte(0x80 + (value & 0x3F)) + buffer_len += 4 + } + + parser.unread++ + } + + // On EOF, put NUL into the buffer and return. + if parser.eof { + parser.buffer[buffer_len] = 0 + buffer_len++ + parser.unread++ + break + } + } + // [Go] Read the documentation of this function above. To return true, + // we need to have the given length in the buffer. Not doing that means + // every single check that calls this function to make sure the buffer + // has a given length is Go) panicking; or C) accessing invalid memory. + // This happens here due to the EOF above breaking early. + for buffer_len < length { + parser.buffer[buffer_len] = 0 + buffer_len++ + } + parser.buffer = parser.buffer[:buffer_len] + return true +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go new file mode 100644 index 000000000..4120e0c91 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/resolve.go @@ -0,0 +1,258 @@ +package yaml + +import ( + "encoding/base64" + "math" + "regexp" + "strconv" + "strings" + "time" +) + +type resolveMapItem struct { + value interface{} + tag string +} + +var resolveTable = make([]byte, 256) +var resolveMap = make(map[string]resolveMapItem) + +func init() { + t := resolveTable + t[int('+')] = 'S' // Sign + t[int('-')] = 'S' + for _, c := range "0123456789" { + t[int(c)] = 'D' // Digit + } + for _, c := range "yYnNtTfFoO~" { + t[int(c)] = 'M' // In map + } + t[int('.')] = '.' // Float (potentially in map) + + var resolveMapList = []struct { + v interface{} + tag string + l []string + }{ + {true, yaml_BOOL_TAG, []string{"y", "Y", "yes", "Yes", "YES"}}, + {true, yaml_BOOL_TAG, []string{"true", "True", "TRUE"}}, + {true, yaml_BOOL_TAG, []string{"on", "On", "ON"}}, + {false, yaml_BOOL_TAG, []string{"n", "N", "no", "No", "NO"}}, + {false, yaml_BOOL_TAG, []string{"false", "False", "FALSE"}}, + {false, yaml_BOOL_TAG, []string{"off", "Off", "OFF"}}, + {nil, yaml_NULL_TAG, []string{"", "~", "null", "Null", "NULL"}}, + {math.NaN(), yaml_FLOAT_TAG, []string{".nan", ".NaN", ".NAN"}}, + {math.Inf(+1), yaml_FLOAT_TAG, []string{".inf", ".Inf", ".INF"}}, + {math.Inf(+1), yaml_FLOAT_TAG, []string{"+.inf", "+.Inf", "+.INF"}}, + {math.Inf(-1), yaml_FLOAT_TAG, []string{"-.inf", "-.Inf", "-.INF"}}, + {"<<", yaml_MERGE_TAG, []string{"<<"}}, + } + + m := resolveMap + for _, item := range resolveMapList { + for _, s := range item.l { + m[s] = resolveMapItem{item.v, item.tag} + } + } +} + +const longTagPrefix = "tag:yaml.org,2002:" + +func shortTag(tag string) string { + // TODO This can easily be made faster and produce less garbage. + if strings.HasPrefix(tag, longTagPrefix) { + return "!!" + tag[len(longTagPrefix):] + } + return tag +} + +func longTag(tag string) string { + if strings.HasPrefix(tag, "!!") { + return longTagPrefix + tag[2:] + } + return tag +} + +func resolvableTag(tag string) bool { + switch tag { + case "", yaml_STR_TAG, yaml_BOOL_TAG, yaml_INT_TAG, yaml_FLOAT_TAG, yaml_NULL_TAG, yaml_TIMESTAMP_TAG: + return true + } + return false +} + +var yamlStyleFloat = regexp.MustCompile(`^[-+]?(\.[0-9]+|[0-9]+(\.[0-9]*)?)([eE][-+]?[0-9]+)?$`) + +func resolve(tag string, in string) (rtag string, out interface{}) { + if !resolvableTag(tag) { + return tag, in + } + + defer func() { + switch tag { + case "", rtag, yaml_STR_TAG, yaml_BINARY_TAG: + return + case yaml_FLOAT_TAG: + if rtag == yaml_INT_TAG { + switch v := out.(type) { + case int64: + rtag = yaml_FLOAT_TAG + out = float64(v) + return + case int: + rtag = yaml_FLOAT_TAG + out = float64(v) + return + } + } + } + failf("cannot decode %s `%s` as a %s", shortTag(rtag), in, shortTag(tag)) + }() + + // Any data is accepted as a !!str or !!binary. + // Otherwise, the prefix is enough of a hint about what it might be. + hint := byte('N') + if in != "" { + hint = resolveTable[in[0]] + } + if hint != 0 && tag != yaml_STR_TAG && tag != yaml_BINARY_TAG { + // Handle things we can lookup in a map. + if item, ok := resolveMap[in]; ok { + return item.tag, item.value + } + + // Base 60 floats are a bad idea, were dropped in YAML 1.2, and + // are purposefully unsupported here. They're still quoted on + // the way out for compatibility with other parser, though. + + switch hint { + case 'M': + // We've already checked the map above. + + case '.': + // Not in the map, so maybe a normal float. + floatv, err := strconv.ParseFloat(in, 64) + if err == nil { + return yaml_FLOAT_TAG, floatv + } + + case 'D', 'S': + // Int, float, or timestamp. + // Only try values as a timestamp if the value is unquoted or there's an explicit + // !!timestamp tag. + if tag == "" || tag == yaml_TIMESTAMP_TAG { + t, ok := parseTimestamp(in) + if ok { + return yaml_TIMESTAMP_TAG, t + } + } + + plain := strings.Replace(in, "_", "", -1) + intv, err := strconv.ParseInt(plain, 0, 64) + if err == nil { + if intv == int64(int(intv)) { + return yaml_INT_TAG, int(intv) + } else { + return yaml_INT_TAG, intv + } + } + uintv, err := strconv.ParseUint(plain, 0, 64) + if err == nil { + return yaml_INT_TAG, uintv + } + if yamlStyleFloat.MatchString(plain) { + floatv, err := strconv.ParseFloat(plain, 64) + if err == nil { + return yaml_FLOAT_TAG, floatv + } + } + if strings.HasPrefix(plain, "0b") { + intv, err := strconv.ParseInt(plain[2:], 2, 64) + if err == nil { + if intv == int64(int(intv)) { + return yaml_INT_TAG, int(intv) + } else { + return yaml_INT_TAG, intv + } + } + uintv, err := strconv.ParseUint(plain[2:], 2, 64) + if err == nil { + return yaml_INT_TAG, uintv + } + } else if strings.HasPrefix(plain, "-0b") { + intv, err := strconv.ParseInt("-" + plain[3:], 2, 64) + if err == nil { + if true || intv == int64(int(intv)) { + return yaml_INT_TAG, int(intv) + } else { + return yaml_INT_TAG, intv + } + } + } + default: + panic("resolveTable item not yet handled: " + string(rune(hint)) + " (with " + in + ")") + } + } + return yaml_STR_TAG, in +} + +// encodeBase64 encodes s as base64 that is broken up into multiple lines +// as appropriate for the resulting length. +func encodeBase64(s string) string { + const lineLen = 70 + encLen := base64.StdEncoding.EncodedLen(len(s)) + lines := encLen/lineLen + 1 + buf := make([]byte, encLen*2+lines) + in := buf[0:encLen] + out := buf[encLen:] + base64.StdEncoding.Encode(in, []byte(s)) + k := 0 + for i := 0; i < len(in); i += lineLen { + j := i + lineLen + if j > len(in) { + j = len(in) + } + k += copy(out[k:], in[i:j]) + if lines > 1 { + out[k] = '\n' + k++ + } + } + return string(out[:k]) +} + +// This is a subset of the formats allowed by the regular expression +// defined at http://yaml.org/type/timestamp.html. +var allowedTimestampFormats = []string{ + "2006-1-2T15:4:5.999999999Z07:00", // RCF3339Nano with short date fields. + "2006-1-2t15:4:5.999999999Z07:00", // RFC3339Nano with short date fields and lower-case "t". + "2006-1-2 15:4:5.999999999", // space separated with no time zone + "2006-1-2", // date only + // Notable exception: time.Parse cannot handle: "2001-12-14 21:59:43.10 -5" + // from the set of examples. +} + +// parseTimestamp parses s as a timestamp string and +// returns the timestamp and reports whether it succeeded. +// Timestamp formats are defined at http://yaml.org/type/timestamp.html +func parseTimestamp(s string) (time.Time, bool) { + // TODO write code to check all the formats supported by + // http://yaml.org/type/timestamp.html instead of using time.Parse. + + // Quick check: all date formats start with YYYY-. + i := 0 + for ; i < len(s); i++ { + if c := s[i]; c < '0' || c > '9' { + break + } + } + if i != 4 || i == len(s) || s[i] != '-' { + return time.Time{}, false + } + for _, format := range allowedTimestampFormats { + if t, err := time.Parse(format, s); err == nil { + return t, true + } + } + return time.Time{}, false +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go new file mode 100644 index 000000000..0b9bb6030 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/scannerc.go @@ -0,0 +1,2711 @@ +package yaml + +import ( + "bytes" + "fmt" +) + +// Introduction +// ************ +// +// The following notes assume that you are familiar with the YAML specification +// (http://yaml.org/spec/1.2/spec.html). We mostly follow it, although in +// some cases we are less restrictive that it requires. +// +// The process of transforming a YAML stream into a sequence of events is +// divided on two steps: Scanning and Parsing. +// +// The Scanner transforms the input stream into a sequence of tokens, while the +// parser transform the sequence of tokens produced by the Scanner into a +// sequence of parsing events. +// +// The Scanner is rather clever and complicated. The Parser, on the contrary, +// is a straightforward implementation of a recursive-descendant parser (or, +// LL(1) parser, as it is usually called). +// +// Actually there are two issues of Scanning that might be called "clever", the +// rest is quite straightforward. The issues are "block collection start" and +// "simple keys". Both issues are explained below in details. +// +// Here the Scanning step is explained and implemented. We start with the list +// of all the tokens produced by the Scanner together with short descriptions. +// +// Now, tokens: +// +// STREAM-START(encoding) # The stream start. +// STREAM-END # The stream end. +// VERSION-DIRECTIVE(major,minor) # The '%YAML' directive. +// TAG-DIRECTIVE(handle,prefix) # The '%TAG' directive. +// DOCUMENT-START # '---' +// DOCUMENT-END # '...' +// BLOCK-SEQUENCE-START # Indentation increase denoting a block +// BLOCK-MAPPING-START # sequence or a block mapping. +// BLOCK-END # Indentation decrease. +// FLOW-SEQUENCE-START # '[' +// FLOW-SEQUENCE-END # ']' +// BLOCK-SEQUENCE-START # '{' +// BLOCK-SEQUENCE-END # '}' +// BLOCK-ENTRY # '-' +// FLOW-ENTRY # ',' +// KEY # '?' or nothing (simple keys). +// VALUE # ':' +// ALIAS(anchor) # '*anchor' +// ANCHOR(anchor) # '&anchor' +// TAG(handle,suffix) # '!handle!suffix' +// SCALAR(value,style) # A scalar. +// +// The following two tokens are "virtual" tokens denoting the beginning and the +// end of the stream: +// +// STREAM-START(encoding) +// STREAM-END +// +// We pass the information about the input stream encoding with the +// STREAM-START token. +// +// The next two tokens are responsible for tags: +// +// VERSION-DIRECTIVE(major,minor) +// TAG-DIRECTIVE(handle,prefix) +// +// Example: +// +// %YAML 1.1 +// %TAG ! !foo +// %TAG !yaml! tag:yaml.org,2002: +// --- +// +// The correspoding sequence of tokens: +// +// STREAM-START(utf-8) +// VERSION-DIRECTIVE(1,1) +// TAG-DIRECTIVE("!","!foo") +// TAG-DIRECTIVE("!yaml","tag:yaml.org,2002:") +// DOCUMENT-START +// STREAM-END +// +// Note that the VERSION-DIRECTIVE and TAG-DIRECTIVE tokens occupy a whole +// line. +// +// The document start and end indicators are represented by: +// +// DOCUMENT-START +// DOCUMENT-END +// +// Note that if a YAML stream contains an implicit document (without '---' +// and '...' indicators), no DOCUMENT-START and DOCUMENT-END tokens will be +// produced. +// +// In the following examples, we present whole documents together with the +// produced tokens. +// +// 1. An implicit document: +// +// 'a scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// STREAM-END +// +// 2. An explicit document: +// +// --- +// 'a scalar' +// ... +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// SCALAR("a scalar",single-quoted) +// DOCUMENT-END +// STREAM-END +// +// 3. Several documents in a stream: +// +// 'a scalar' +// --- +// 'another scalar' +// --- +// 'yet another scalar' +// +// Tokens: +// +// STREAM-START(utf-8) +// SCALAR("a scalar",single-quoted) +// DOCUMENT-START +// SCALAR("another scalar",single-quoted) +// DOCUMENT-START +// SCALAR("yet another scalar",single-quoted) +// STREAM-END +// +// We have already introduced the SCALAR token above. The following tokens are +// used to describe aliases, anchors, tag, and scalars: +// +// ALIAS(anchor) +// ANCHOR(anchor) +// TAG(handle,suffix) +// SCALAR(value,style) +// +// The following series of examples illustrate the usage of these tokens: +// +// 1. A recursive sequence: +// +// &A [ *A ] +// +// Tokens: +// +// STREAM-START(utf-8) +// ANCHOR("A") +// FLOW-SEQUENCE-START +// ALIAS("A") +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A tagged scalar: +// +// !!float "3.14" # A good approximation. +// +// Tokens: +// +// STREAM-START(utf-8) +// TAG("!!","float") +// SCALAR("3.14",double-quoted) +// STREAM-END +// +// 3. Various scalar styles: +// +// --- # Implicit empty plain scalars do not produce tokens. +// --- a plain scalar +// --- 'a single-quoted scalar' +// --- "a double-quoted scalar" +// --- |- +// a literal scalar +// --- >- +// a folded +// scalar +// +// Tokens: +// +// STREAM-START(utf-8) +// DOCUMENT-START +// DOCUMENT-START +// SCALAR("a plain scalar",plain) +// DOCUMENT-START +// SCALAR("a single-quoted scalar",single-quoted) +// DOCUMENT-START +// SCALAR("a double-quoted scalar",double-quoted) +// DOCUMENT-START +// SCALAR("a literal scalar",literal) +// DOCUMENT-START +// SCALAR("a folded scalar",folded) +// STREAM-END +// +// Now it's time to review collection-related tokens. We will start with +// flow collections: +// +// FLOW-SEQUENCE-START +// FLOW-SEQUENCE-END +// FLOW-MAPPING-START +// FLOW-MAPPING-END +// FLOW-ENTRY +// KEY +// VALUE +// +// The tokens FLOW-SEQUENCE-START, FLOW-SEQUENCE-END, FLOW-MAPPING-START, and +// FLOW-MAPPING-END represent the indicators '[', ']', '{', and '}' +// correspondingly. FLOW-ENTRY represent the ',' indicator. Finally the +// indicators '?' and ':', which are used for denoting mapping keys and values, +// are represented by the KEY and VALUE tokens. +// +// The following examples show flow collections: +// +// 1. A flow sequence: +// +// [item 1, item 2, item 3] +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-SEQUENCE-START +// SCALAR("item 1",plain) +// FLOW-ENTRY +// SCALAR("item 2",plain) +// FLOW-ENTRY +// SCALAR("item 3",plain) +// FLOW-SEQUENCE-END +// STREAM-END +// +// 2. A flow mapping: +// +// { +// a simple key: a value, # Note that the KEY token is produced. +// ? a complex key: another value, +// } +// +// Tokens: +// +// STREAM-START(utf-8) +// FLOW-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// FLOW-ENTRY +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// FLOW-ENTRY +// FLOW-MAPPING-END +// STREAM-END +// +// A simple key is a key which is not denoted by the '?' indicator. Note that +// the Scanner still produce the KEY token whenever it encounters a simple key. +// +// For scanning block collections, the following tokens are used (note that we +// repeat KEY and VALUE here): +// +// BLOCK-SEQUENCE-START +// BLOCK-MAPPING-START +// BLOCK-END +// BLOCK-ENTRY +// KEY +// VALUE +// +// The tokens BLOCK-SEQUENCE-START and BLOCK-MAPPING-START denote indentation +// increase that precedes a block collection (cf. the INDENT token in Python). +// The token BLOCK-END denote indentation decrease that ends a block collection +// (cf. the DEDENT token in Python). However YAML has some syntax pecularities +// that makes detections of these tokens more complex. +// +// The tokens BLOCK-ENTRY, KEY, and VALUE are used to represent the indicators +// '-', '?', and ':' correspondingly. +// +// The following examples show how the tokens BLOCK-SEQUENCE-START, +// BLOCK-MAPPING-START, and BLOCK-END are emitted by the Scanner: +// +// 1. Block sequences: +// +// - item 1 +// - item 2 +// - +// - item 3.1 +// - item 3.2 +// - +// key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 3.1",plain) +// BLOCK-ENTRY +// SCALAR("item 3.2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Block mappings: +// +// a simple key: a value # The KEY token is produced here. +// ? a complex key +// : another value +// a mapping: +// key 1: value 1 +// key 2: value 2 +// a sequence: +// - item 1 +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a simple key",plain) +// VALUE +// SCALAR("a value",plain) +// KEY +// SCALAR("a complex key",plain) +// VALUE +// SCALAR("another value",plain) +// KEY +// SCALAR("a mapping",plain) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML does not always require to start a new block collection from a new +// line. If the current line contains only '-', '?', and ':' indicators, a new +// block collection may start at the current line. The following examples +// illustrate this case: +// +// 1. Collections in a sequence: +// +// - - item 1 +// - item 2 +// - key 1: value 1 +// key 2: value 2 +// - ? complex key +// : complex value +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-ENTRY +// BLOCK-MAPPING-START +// KEY +// SCALAR("complex key") +// VALUE +// SCALAR("complex value") +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// 2. Collections in a mapping: +// +// ? a sequence +// : - item 1 +// - item 2 +// ? a mapping +// : key 1: value 1 +// key 2: value 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("a sequence",plain) +// VALUE +// BLOCK-SEQUENCE-START +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// KEY +// SCALAR("a mapping",plain) +// VALUE +// BLOCK-MAPPING-START +// KEY +// SCALAR("key 1",plain) +// VALUE +// SCALAR("value 1",plain) +// KEY +// SCALAR("key 2",plain) +// VALUE +// SCALAR("value 2",plain) +// BLOCK-END +// BLOCK-END +// STREAM-END +// +// YAML also permits non-indented sequences if they are included into a block +// mapping. In this case, the token BLOCK-SEQUENCE-START is not produced: +// +// key: +// - item 1 # BLOCK-SEQUENCE-START is NOT produced here. +// - item 2 +// +// Tokens: +// +// STREAM-START(utf-8) +// BLOCK-MAPPING-START +// KEY +// SCALAR("key",plain) +// VALUE +// BLOCK-ENTRY +// SCALAR("item 1",plain) +// BLOCK-ENTRY +// SCALAR("item 2",plain) +// BLOCK-END +// + +// Ensure that the buffer contains the required number of characters. +// Return true on success, false on failure (reader error or memory error). +func cache(parser *yaml_parser_t, length int) bool { + // [Go] This was inlined: !cache(A, B) -> unread < B && !update(A, B) + return parser.unread >= length || yaml_parser_update_buffer(parser, length) +} + +// Advance the buffer pointer. +func skip(parser *yaml_parser_t) { + parser.mark.index++ + parser.mark.column++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) +} + +func skip_line(parser *yaml_parser_t) { + if is_crlf(parser.buffer, parser.buffer_pos) { + parser.mark.index += 2 + parser.mark.column = 0 + parser.mark.line++ + parser.unread -= 2 + parser.buffer_pos += 2 + } else if is_break(parser.buffer, parser.buffer_pos) { + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + parser.buffer_pos += width(parser.buffer[parser.buffer_pos]) + } +} + +// Copy a character to a string buffer and advance pointers. +func read(parser *yaml_parser_t, s []byte) []byte { + w := width(parser.buffer[parser.buffer_pos]) + if w == 0 { + panic("invalid character sequence") + } + if len(s) == 0 { + s = make([]byte, 0, 32) + } + if w == 1 && len(s)+w <= cap(s) { + s = s[:len(s)+1] + s[len(s)-1] = parser.buffer[parser.buffer_pos] + parser.buffer_pos++ + } else { + s = append(s, parser.buffer[parser.buffer_pos:parser.buffer_pos+w]...) + parser.buffer_pos += w + } + parser.mark.index++ + parser.mark.column++ + parser.unread-- + return s +} + +// Copy a line break character to a string buffer and advance pointers. +func read_line(parser *yaml_parser_t, s []byte) []byte { + buf := parser.buffer + pos := parser.buffer_pos + switch { + case buf[pos] == '\r' && buf[pos+1] == '\n': + // CR LF . LF + s = append(s, '\n') + parser.buffer_pos += 2 + parser.mark.index++ + parser.unread-- + case buf[pos] == '\r' || buf[pos] == '\n': + // CR|LF . LF + s = append(s, '\n') + parser.buffer_pos += 1 + case buf[pos] == '\xC2' && buf[pos+1] == '\x85': + // NEL . LF + s = append(s, '\n') + parser.buffer_pos += 2 + case buf[pos] == '\xE2' && buf[pos+1] == '\x80' && (buf[pos+2] == '\xA8' || buf[pos+2] == '\xA9'): + // LS|PS . LS|PS + s = append(s, buf[parser.buffer_pos:pos+3]...) + parser.buffer_pos += 3 + default: + return s + } + parser.mark.index++ + parser.mark.column = 0 + parser.mark.line++ + parser.unread-- + return s +} + +// Get the next token. +func yaml_parser_scan(parser *yaml_parser_t, token *yaml_token_t) bool { + // Erase the token object. + *token = yaml_token_t{} // [Go] Is this necessary? + + // No tokens after STREAM-END or error. + if parser.stream_end_produced || parser.error != yaml_NO_ERROR { + return true + } + + // Ensure that the tokens queue contains enough tokens. + if !parser.token_available { + if !yaml_parser_fetch_more_tokens(parser) { + return false + } + } + + // Fetch the next token from the queue. + *token = parser.tokens[parser.tokens_head] + parser.tokens_head++ + parser.tokens_parsed++ + parser.token_available = false + + if token.typ == yaml_STREAM_END_TOKEN { + parser.stream_end_produced = true + } + return true +} + +// Set the scanner error and return false. +func yaml_parser_set_scanner_error(parser *yaml_parser_t, context string, context_mark yaml_mark_t, problem string) bool { + parser.error = yaml_SCANNER_ERROR + parser.context = context + parser.context_mark = context_mark + parser.problem = problem + parser.problem_mark = parser.mark + return false +} + +func yaml_parser_set_scanner_tag_error(parser *yaml_parser_t, directive bool, context_mark yaml_mark_t, problem string) bool { + context := "while parsing a tag" + if directive { + context = "while parsing a %TAG directive" + } + return yaml_parser_set_scanner_error(parser, context, context_mark, problem) +} + +func trace(args ...interface{}) func() { + pargs := append([]interface{}{"+++"}, args...) + fmt.Println(pargs...) + pargs = append([]interface{}{"---"}, args...) + return func() { fmt.Println(pargs...) } +} + +// Ensure that the tokens queue contains at least one token which can be +// returned to the Parser. +func yaml_parser_fetch_more_tokens(parser *yaml_parser_t) bool { + // While we need more tokens to fetch, do it. + for { + if parser.tokens_head != len(parser.tokens) { + // If queue is non-empty, check if any potential simple key may + // occupy the head position. + head_tok_idx, ok := parser.simple_keys_by_tok[parser.tokens_parsed] + if !ok { + break + } else if valid, ok := yaml_simple_key_is_valid(parser, &parser.simple_keys[head_tok_idx]); !ok { + return false + } else if !valid { + break + } + } + // Fetch the next token. + if !yaml_parser_fetch_next_token(parser) { + return false + } + } + + parser.token_available = true + return true +} + +// The dispatcher for token fetchers. +func yaml_parser_fetch_next_token(parser *yaml_parser_t) bool { + // Ensure that the buffer is initialized. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we just started scanning. Fetch STREAM-START then. + if !parser.stream_start_produced { + return yaml_parser_fetch_stream_start(parser) + } + + // Eat whitespaces and comments until we reach the next token. + if !yaml_parser_scan_to_next_token(parser) { + return false + } + + // Check the indentation level against the current column. + if !yaml_parser_unroll_indent(parser, parser.mark.column) { + return false + } + + // Ensure that the buffer contains at least 4 characters. 4 is the length + // of the longest indicators ('--- ' and '... '). + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + // Is it the end of the stream? + if is_z(parser.buffer, parser.buffer_pos) { + return yaml_parser_fetch_stream_end(parser) + } + + // Is it a directive? + if parser.mark.column == 0 && parser.buffer[parser.buffer_pos] == '%' { + return yaml_parser_fetch_directive(parser) + } + + buf := parser.buffer + pos := parser.buffer_pos + + // Is it the document start indicator? + if parser.mark.column == 0 && buf[pos] == '-' && buf[pos+1] == '-' && buf[pos+2] == '-' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_START_TOKEN) + } + + // Is it the document end indicator? + if parser.mark.column == 0 && buf[pos] == '.' && buf[pos+1] == '.' && buf[pos+2] == '.' && is_blankz(buf, pos+3) { + return yaml_parser_fetch_document_indicator(parser, yaml_DOCUMENT_END_TOKEN) + } + + // Is it the flow sequence start indicator? + if buf[pos] == '[' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_SEQUENCE_START_TOKEN) + } + + // Is it the flow mapping start indicator? + if parser.buffer[parser.buffer_pos] == '{' { + return yaml_parser_fetch_flow_collection_start(parser, yaml_FLOW_MAPPING_START_TOKEN) + } + + // Is it the flow sequence end indicator? + if parser.buffer[parser.buffer_pos] == ']' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_SEQUENCE_END_TOKEN) + } + + // Is it the flow mapping end indicator? + if parser.buffer[parser.buffer_pos] == '}' { + return yaml_parser_fetch_flow_collection_end(parser, + yaml_FLOW_MAPPING_END_TOKEN) + } + + // Is it the flow entry indicator? + if parser.buffer[parser.buffer_pos] == ',' { + return yaml_parser_fetch_flow_entry(parser) + } + + // Is it the block entry indicator? + if parser.buffer[parser.buffer_pos] == '-' && is_blankz(parser.buffer, parser.buffer_pos+1) { + return yaml_parser_fetch_block_entry(parser) + } + + // Is it the key indicator? + if parser.buffer[parser.buffer_pos] == '?' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_key(parser) + } + + // Is it the value indicator? + if parser.buffer[parser.buffer_pos] == ':' && (parser.flow_level > 0 || is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_value(parser) + } + + // Is it an alias? + if parser.buffer[parser.buffer_pos] == '*' { + return yaml_parser_fetch_anchor(parser, yaml_ALIAS_TOKEN) + } + + // Is it an anchor? + if parser.buffer[parser.buffer_pos] == '&' { + return yaml_parser_fetch_anchor(parser, yaml_ANCHOR_TOKEN) + } + + // Is it a tag? + if parser.buffer[parser.buffer_pos] == '!' { + return yaml_parser_fetch_tag(parser) + } + + // Is it a literal scalar? + if parser.buffer[parser.buffer_pos] == '|' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, true) + } + + // Is it a folded scalar? + if parser.buffer[parser.buffer_pos] == '>' && parser.flow_level == 0 { + return yaml_parser_fetch_block_scalar(parser, false) + } + + // Is it a single-quoted scalar? + if parser.buffer[parser.buffer_pos] == '\'' { + return yaml_parser_fetch_flow_scalar(parser, true) + } + + // Is it a double-quoted scalar? + if parser.buffer[parser.buffer_pos] == '"' { + return yaml_parser_fetch_flow_scalar(parser, false) + } + + // Is it a plain scalar? + // + // A plain scalar may start with any non-blank characters except + // + // '-', '?', ':', ',', '[', ']', '{', '}', + // '#', '&', '*', '!', '|', '>', '\'', '\"', + // '%', '@', '`'. + // + // In the block context (and, for the '-' indicator, in the flow context + // too), it may also start with the characters + // + // '-', '?', ':' + // + // if it is followed by a non-space character. + // + // The last rule is more restrictive than the specification requires. + // [Go] Make this logic more reasonable. + //switch parser.buffer[parser.buffer_pos] { + //case '-', '?', ':', ',', '?', '-', ',', ':', ']', '[', '}', '{', '&', '#', '!', '*', '>', '|', '"', '\'', '@', '%', '-', '`': + //} + if !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '-' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}' || parser.buffer[parser.buffer_pos] == '#' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '*' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '|' || + parser.buffer[parser.buffer_pos] == '>' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '"' || parser.buffer[parser.buffer_pos] == '%' || + parser.buffer[parser.buffer_pos] == '@' || parser.buffer[parser.buffer_pos] == '`') || + (parser.buffer[parser.buffer_pos] == '-' && !is_blank(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level == 0 && + (parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == ':') && + !is_blankz(parser.buffer, parser.buffer_pos+1)) { + return yaml_parser_fetch_plain_scalar(parser) + } + + // If we don't determine the token type so far, it is an error. + return yaml_parser_set_scanner_error(parser, + "while scanning for the next token", parser.mark, + "found character that cannot start any token") +} + +func yaml_simple_key_is_valid(parser *yaml_parser_t, simple_key *yaml_simple_key_t) (valid, ok bool) { + if !simple_key.possible { + return false, true + } + + // The 1.2 specification says: + // + // "If the ? indicator is omitted, parsing needs to see past the + // implicit key to recognize it as such. To limit the amount of + // lookahead required, the “:” indicator must appear at most 1024 + // Unicode characters beyond the start of the key. In addition, the key + // is restricted to a single line." + // + if simple_key.mark.line < parser.mark.line || simple_key.mark.index+1024 < parser.mark.index { + // Check if the potential simple key to be removed is required. + if simple_key.required { + return false, yaml_parser_set_scanner_error(parser, + "while scanning a simple key", simple_key.mark, + "could not find expected ':'") + } + simple_key.possible = false + return false, true + } + return true, true +} + +// Check if a simple key may start at the current position and add it if +// needed. +func yaml_parser_save_simple_key(parser *yaml_parser_t) bool { + // A simple key is required at the current position if the scanner is in + // the block context and the current column coincides with the indentation + // level. + + required := parser.flow_level == 0 && parser.indent == parser.mark.column + + // + // If the current position may start a simple key, save it. + // + if parser.simple_key_allowed { + simple_key := yaml_simple_key_t{ + possible: true, + required: required, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + mark: parser.mark, + } + + if !yaml_parser_remove_simple_key(parser) { + return false + } + parser.simple_keys[len(parser.simple_keys)-1] = simple_key + parser.simple_keys_by_tok[simple_key.token_number] = len(parser.simple_keys) - 1 + } + return true +} + +// Remove a potential simple key at the current flow level. +func yaml_parser_remove_simple_key(parser *yaml_parser_t) bool { + i := len(parser.simple_keys) - 1 + if parser.simple_keys[i].possible { + // If the key is required, it is an error. + if parser.simple_keys[i].required { + return yaml_parser_set_scanner_error(parser, + "while scanning a simple key", parser.simple_keys[i].mark, + "could not find expected ':'") + } + // Remove the key from the stack. + parser.simple_keys[i].possible = false + delete(parser.simple_keys_by_tok, parser.simple_keys[i].token_number) + } + return true +} + +// max_flow_level limits the flow_level +const max_flow_level = 10000 + +// Increase the flow level and resize the simple key list if needed. +func yaml_parser_increase_flow_level(parser *yaml_parser_t) bool { + // Reset the simple key on the next level. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{ + possible: false, + required: false, + token_number: parser.tokens_parsed + (len(parser.tokens) - parser.tokens_head), + mark: parser.mark, + }) + + // Increase the flow level. + parser.flow_level++ + if parser.flow_level > max_flow_level { + return yaml_parser_set_scanner_error(parser, + "while increasing flow level", parser.simple_keys[len(parser.simple_keys)-1].mark, + fmt.Sprintf("exceeded max depth of %d", max_flow_level)) + } + return true +} + +// Decrease the flow level. +func yaml_parser_decrease_flow_level(parser *yaml_parser_t) bool { + if parser.flow_level > 0 { + parser.flow_level-- + last := len(parser.simple_keys) - 1 + delete(parser.simple_keys_by_tok, parser.simple_keys[last].token_number) + parser.simple_keys = parser.simple_keys[:last] + } + return true +} + +// max_indents limits the indents stack size +const max_indents = 10000 + +// Push the current indentation level to the stack and set the new level +// the current column is greater than the indentation level. In this case, +// append or insert the specified token into the token queue. +func yaml_parser_roll_indent(parser *yaml_parser_t, column, number int, typ yaml_token_type_t, mark yaml_mark_t) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + if parser.indent < column { + // Push the current indentation level to the stack and set the new + // indentation level. + parser.indents = append(parser.indents, parser.indent) + parser.indent = column + if len(parser.indents) > max_indents { + return yaml_parser_set_scanner_error(parser, + "while increasing indent level", parser.simple_keys[len(parser.simple_keys)-1].mark, + fmt.Sprintf("exceeded max depth of %d", max_indents)) + } + + // Create a token and insert it into the queue. + token := yaml_token_t{ + typ: typ, + start_mark: mark, + end_mark: mark, + } + if number > -1 { + number -= parser.tokens_parsed + } + yaml_insert_token(parser, number, &token) + } + return true +} + +// Pop indentation levels from the indents stack until the current level +// becomes less or equal to the column. For each indentation level, append +// the BLOCK-END token. +func yaml_parser_unroll_indent(parser *yaml_parser_t, column int) bool { + // In the flow context, do nothing. + if parser.flow_level > 0 { + return true + } + + // Loop through the indentation levels in the stack. + for parser.indent > column { + // Create a token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_END_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + } + yaml_insert_token(parser, -1, &token) + + // Pop the indentation level. + parser.indent = parser.indents[len(parser.indents)-1] + parser.indents = parser.indents[:len(parser.indents)-1] + } + return true +} + +// Initialize the scanner and produce the STREAM-START token. +func yaml_parser_fetch_stream_start(parser *yaml_parser_t) bool { + + // Set the initial indentation. + parser.indent = -1 + + // Initialize the simple key stack. + parser.simple_keys = append(parser.simple_keys, yaml_simple_key_t{}) + + parser.simple_keys_by_tok = make(map[int]int) + + // A simple key is allowed at the beginning of the stream. + parser.simple_key_allowed = true + + // We have started. + parser.stream_start_produced = true + + // Create the STREAM-START token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_START_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + encoding: parser.encoding, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the STREAM-END token and shut down the scanner. +func yaml_parser_fetch_stream_end(parser *yaml_parser_t) bool { + + // Force new line. + if parser.mark.column != 0 { + parser.mark.column = 0 + parser.mark.line++ + } + + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the STREAM-END token and append it to the queue. + token := yaml_token_t{ + typ: yaml_STREAM_END_TOKEN, + start_mark: parser.mark, + end_mark: parser.mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce a VERSION-DIRECTIVE or TAG-DIRECTIVE token. +func yaml_parser_fetch_directive(parser *yaml_parser_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Create the YAML-DIRECTIVE or TAG-DIRECTIVE token. + token := yaml_token_t{} + if !yaml_parser_scan_directive(parser, &token) { + return false + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the DOCUMENT-START or DOCUMENT-END token. +func yaml_parser_fetch_document_indicator(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset the indentation level. + if !yaml_parser_unroll_indent(parser, -1) { + return false + } + + // Reset simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + parser.simple_key_allowed = false + + // Consume the token. + start_mark := parser.mark + + skip(parser) + skip(parser) + skip(parser) + + end_mark := parser.mark + + // Create the DOCUMENT-START or DOCUMENT-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-START or FLOW-MAPPING-START token. +func yaml_parser_fetch_flow_collection_start(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // The indicators '[' and '{' may start a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // Increase the flow level. + if !yaml_parser_increase_flow_level(parser) { + return false + } + + // A simple key may follow the indicators '[' and '{'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-START of FLOW-MAPPING-START token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-SEQUENCE-END or FLOW-MAPPING-END token. +func yaml_parser_fetch_flow_collection_end(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // Reset any potential simple key on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Decrease the flow level. + if !yaml_parser_decrease_flow_level(parser) { + return false + } + + // No simple keys after the indicators ']' and '}'. + parser.simple_key_allowed = false + + // Consume the token. + + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-SEQUENCE-END of FLOW-MAPPING-END token. + token := yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + } + // Append the token to the queue. + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the FLOW-ENTRY token. +func yaml_parser_fetch_flow_entry(parser *yaml_parser_t) bool { + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after ','. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the FLOW-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_FLOW_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the BLOCK-ENTRY token. +func yaml_parser_fetch_block_entry(parser *yaml_parser_t) bool { + // Check if the scanner is in the block context. + if parser.flow_level == 0 { + // Check if we are allowed to start a new entry. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "block sequence entries are not allowed in this context") + } + // Add the BLOCK-SEQUENCE-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_SEQUENCE_START_TOKEN, parser.mark) { + return false + } + } else { + // It is an error for the '-' indicator to occur in the flow context, + // but we let the Parser detect and report about it because the Parser + // is able to point to the context. + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '-'. + parser.simple_key_allowed = true + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the BLOCK-ENTRY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_BLOCK_ENTRY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the KEY token. +func yaml_parser_fetch_key(parser *yaml_parser_t) bool { + + // In the block context, additional checks are required. + if parser.flow_level == 0 { + // Check if we are allowed to start a new key (not nessesary simple). + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping keys are not allowed in this context") + } + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Reset any potential simple keys on the current flow level. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // Simple keys are allowed after '?' in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the KEY token and append it to the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the VALUE token. +func yaml_parser_fetch_value(parser *yaml_parser_t) bool { + + simple_key := &parser.simple_keys[len(parser.simple_keys)-1] + + // Have we found a simple key? + if valid, ok := yaml_simple_key_is_valid(parser, simple_key); !ok { + return false + + } else if valid { + + // Create the KEY token and insert it into the queue. + token := yaml_token_t{ + typ: yaml_KEY_TOKEN, + start_mark: simple_key.mark, + end_mark: simple_key.mark, + } + yaml_insert_token(parser, simple_key.token_number-parser.tokens_parsed, &token) + + // In the block context, we may need to add the BLOCK-MAPPING-START token. + if !yaml_parser_roll_indent(parser, simple_key.mark.column, + simple_key.token_number, + yaml_BLOCK_MAPPING_START_TOKEN, simple_key.mark) { + return false + } + + // Remove the simple key. + simple_key.possible = false + delete(parser.simple_keys_by_tok, simple_key.token_number) + + // A simple key cannot follow another simple key. + parser.simple_key_allowed = false + + } else { + // The ':' indicator follows a complex key. + + // In the block context, extra checks are required. + if parser.flow_level == 0 { + + // Check if we are allowed to start a complex value. + if !parser.simple_key_allowed { + return yaml_parser_set_scanner_error(parser, "", parser.mark, + "mapping values are not allowed in this context") + } + + // Add the BLOCK-MAPPING-START token if needed. + if !yaml_parser_roll_indent(parser, parser.mark.column, -1, yaml_BLOCK_MAPPING_START_TOKEN, parser.mark) { + return false + } + } + + // Simple keys after ':' are allowed in the block context. + parser.simple_key_allowed = parser.flow_level == 0 + } + + // Consume the token. + start_mark := parser.mark + skip(parser) + end_mark := parser.mark + + // Create the VALUE token and append it to the queue. + token := yaml_token_t{ + typ: yaml_VALUE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the ALIAS or ANCHOR token. +func yaml_parser_fetch_anchor(parser *yaml_parser_t, typ yaml_token_type_t) bool { + // An anchor or an alias could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow an anchor or an alias. + parser.simple_key_allowed = false + + // Create the ALIAS or ANCHOR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_anchor(parser, &token, typ) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the TAG token. +func yaml_parser_fetch_tag(parser *yaml_parser_t) bool { + // A tag could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a tag. + parser.simple_key_allowed = false + + // Create the TAG token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_tag(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,literal) or SCALAR(...,folded) tokens. +func yaml_parser_fetch_block_scalar(parser *yaml_parser_t, literal bool) bool { + // Remove any potential simple keys. + if !yaml_parser_remove_simple_key(parser) { + return false + } + + // A simple key may follow a block scalar. + parser.simple_key_allowed = true + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_block_scalar(parser, &token, literal) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,single-quoted) or SCALAR(...,double-quoted) tokens. +func yaml_parser_fetch_flow_scalar(parser *yaml_parser_t, single bool) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_flow_scalar(parser, &token, single) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Produce the SCALAR(...,plain) token. +func yaml_parser_fetch_plain_scalar(parser *yaml_parser_t) bool { + // A plain scalar could be a simple key. + if !yaml_parser_save_simple_key(parser) { + return false + } + + // A simple key cannot follow a flow scalar. + parser.simple_key_allowed = false + + // Create the SCALAR token and append it to the queue. + var token yaml_token_t + if !yaml_parser_scan_plain_scalar(parser, &token) { + return false + } + yaml_insert_token(parser, -1, &token) + return true +} + +// Eat whitespaces and comments until the next token is found. +func yaml_parser_scan_to_next_token(parser *yaml_parser_t) bool { + + // Until the next token is not found. + for { + // Allow the BOM mark to start a line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.mark.column == 0 && is_bom(parser.buffer, parser.buffer_pos) { + skip(parser) + } + + // Eat whitespaces. + // Tabs are allowed: + // - in the flow context + // - in the block context, but not at the beginning of the line or + // after '-', '?', or ':' (complex value). + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for parser.buffer[parser.buffer_pos] == ' ' || ((parser.flow_level > 0 || !parser.simple_key_allowed) && parser.buffer[parser.buffer_pos] == '\t') { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Eat a comment until a line break. + if parser.buffer[parser.buffer_pos] == '#' { + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // If it is a line break, eat it. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + + // In the block context, a new line may start a simple key. + if parser.flow_level == 0 { + parser.simple_key_allowed = true + } + } else { + break // We have found a token. + } + } + + return true +} + +// Scan a YAML-DIRECTIVE or TAG-DIRECTIVE token. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +func yaml_parser_scan_directive(parser *yaml_parser_t, token *yaml_token_t) bool { + // Eat '%'. + start_mark := parser.mark + skip(parser) + + // Scan the directive name. + var name []byte + if !yaml_parser_scan_directive_name(parser, start_mark, &name) { + return false + } + + // Is it a YAML directive? + if bytes.Equal(name, []byte("YAML")) { + // Scan the VERSION directive value. + var major, minor int8 + if !yaml_parser_scan_version_directive_value(parser, start_mark, &major, &minor) { + return false + } + end_mark := parser.mark + + // Create a VERSION-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_VERSION_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + major: major, + minor: minor, + } + + // Is it a TAG directive? + } else if bytes.Equal(name, []byte("TAG")) { + // Scan the TAG directive value. + var handle, prefix []byte + if !yaml_parser_scan_tag_directive_value(parser, start_mark, &handle, &prefix) { + return false + } + end_mark := parser.mark + + // Create a TAG-DIRECTIVE token. + *token = yaml_token_t{ + typ: yaml_TAG_DIRECTIVE_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + prefix: prefix, + } + + // Unknown directive. + } else { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unknown directive name") + return false + } + + // Eat the rest of the line including any comments. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + if parser.buffer[parser.buffer_pos] == '#' { + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + return true +} + +// Scan the directive name. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^ +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^ +// +func yaml_parser_scan_directive_name(parser *yaml_parser_t, start_mark yaml_mark_t, name *[]byte) bool { + // Consume the directive name. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + var s []byte + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the name is empty. + if len(s) == 0 { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "could not find expected directive name") + return false + } + + // Check for an blank character after the name. + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a directive", + start_mark, "found unexpected non-alphabetical character") + return false + } + *name = s + return true +} + +// Scan the value of VERSION-DIRECTIVE. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^^^^^^ +func yaml_parser_scan_version_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, major, minor *int8) bool { + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the major version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, major) { + return false + } + + // Eat '.'. + if parser.buffer[parser.buffer_pos] != '.' { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected digit or '.' character") + } + + skip(parser) + + // Consume the minor version number. + if !yaml_parser_scan_version_directive_number(parser, start_mark, minor) { + return false + } + return true +} + +const max_number_length = 2 + +// Scan the version number of VERSION-DIRECTIVE. +// +// Scope: +// %YAML 1.1 # a comment \n +// ^ +// %YAML 1.1 # a comment \n +// ^ +func yaml_parser_scan_version_directive_number(parser *yaml_parser_t, start_mark yaml_mark_t, number *int8) bool { + + // Repeat while the next character is digit. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var value, length int8 + for is_digit(parser.buffer, parser.buffer_pos) { + // Check if the number is too long. + length++ + if length > max_number_length { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "found extremely long version number") + } + value = value*10 + int8(as_digit(parser.buffer, parser.buffer_pos)) + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the number was present. + if length == 0 { + return yaml_parser_set_scanner_error(parser, "while scanning a %YAML directive", + start_mark, "did not find expected version number") + } + *number = value + return true +} + +// Scan the value of a TAG-DIRECTIVE token. +// +// Scope: +// %TAG !yaml! tag:yaml.org,2002: \n +// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +// +func yaml_parser_scan_tag_directive_value(parser *yaml_parser_t, start_mark yaml_mark_t, handle, prefix *[]byte) bool { + var handle_value, prefix_value []byte + + // Eat whitespaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a handle. + if !yaml_parser_scan_tag_handle(parser, true, start_mark, &handle_value) { + return false + } + + // Expect a whitespace. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blank(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace") + return false + } + + // Eat whitespaces. + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Scan a prefix. + if !yaml_parser_scan_tag_uri(parser, true, nil, start_mark, &prefix_value) { + return false + } + + // Expect a whitespace or line break. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a %TAG directive", + start_mark, "did not find expected whitespace or line break") + return false + } + + *handle = handle_value + *prefix = prefix_value + return true +} + +func yaml_parser_scan_anchor(parser *yaml_parser_t, token *yaml_token_t, typ yaml_token_type_t) bool { + var s []byte + + // Eat the indicator character. + start_mark := parser.mark + skip(parser) + + // Consume the value. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + end_mark := parser.mark + + /* + * Check if length of the anchor is greater than 0 and it is followed by + * a whitespace character or one of the indicators: + * + * '?', ':', ',', ']', '}', '%', '@', '`'. + */ + + if len(s) == 0 || + !(is_blankz(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '}' || + parser.buffer[parser.buffer_pos] == '%' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '`') { + context := "while scanning an alias" + if typ == yaml_ANCHOR_TOKEN { + context = "while scanning an anchor" + } + yaml_parser_set_scanner_error(parser, context, start_mark, + "did not find expected alphabetic or numeric character") + return false + } + + // Create a token. + *token = yaml_token_t{ + typ: typ, + start_mark: start_mark, + end_mark: end_mark, + value: s, + } + + return true +} + +/* + * Scan a TAG token. + */ + +func yaml_parser_scan_tag(parser *yaml_parser_t, token *yaml_token_t) bool { + var handle, suffix []byte + + start_mark := parser.mark + + // Check if the tag is in the canonical form. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + if parser.buffer[parser.buffer_pos+1] == '<' { + // Keep the handle as '' + + // Eat '!<' + skip(parser) + skip(parser) + + // Consume the tag value. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + + // Check for '>' and eat it. + if parser.buffer[parser.buffer_pos] != '>' { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find the expected '>'") + return false + } + + skip(parser) + } else { + // The tag has either the '!suffix' or the '!handle!suffix' form. + + // First, try to scan a handle. + if !yaml_parser_scan_tag_handle(parser, false, start_mark, &handle) { + return false + } + + // Check if it is, indeed, handle. + if handle[0] == '!' && len(handle) > 1 && handle[len(handle)-1] == '!' { + // Scan the suffix now. + if !yaml_parser_scan_tag_uri(parser, false, nil, start_mark, &suffix) { + return false + } + } else { + // It wasn't a handle after all. Scan the rest of the tag. + if !yaml_parser_scan_tag_uri(parser, false, handle, start_mark, &suffix) { + return false + } + + // Set the handle to '!'. + handle = []byte{'!'} + + // A special case: the '!' tag. Set the handle to '' and the + // suffix to '!'. + if len(suffix) == 0 { + handle, suffix = suffix, handle + } + } + } + + // Check the character which ends the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if !is_blankz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a tag", + start_mark, "did not find expected whitespace or line break") + return false + } + + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_TAG_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: handle, + suffix: suffix, + } + return true +} + +// Scan a tag handle. +func yaml_parser_scan_tag_handle(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, handle *[]byte) bool { + // Check the initial '!' character. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] != '!' { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + + var s []byte + + // Copy the '!' character. + s = read(parser, s) + + // Copy all subsequent alphabetical and numerical characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_alpha(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check if the trailing character is '!' and copy it. + if parser.buffer[parser.buffer_pos] == '!' { + s = read(parser, s) + } else { + // It's either the '!' tag or not really a tag handle. If it's a %TAG + // directive, it's an error. If it's a tag token, it must be a part of URI. + if directive && string(s) != "!" { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected '!'") + return false + } + } + + *handle = s + return true +} + +// Scan a tag. +func yaml_parser_scan_tag_uri(parser *yaml_parser_t, directive bool, head []byte, start_mark yaml_mark_t, uri *[]byte) bool { + //size_t length = head ? strlen((char *)head) : 0 + var s []byte + hasTag := len(head) > 0 + + // Copy the head if needed. + // + // Note that we don't copy the leading '!' character. + if len(head) > 1 { + s = append(s, head[1:]...) + } + + // Scan the tag. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // The set of characters that may appear in URI is as follows: + // + // '0'-'9', 'A'-'Z', 'a'-'z', '_', '-', ';', '/', '?', ':', '@', '&', + // '=', '+', '$', ',', '.', '!', '~', '*', '\'', '(', ')', '[', ']', + // '%'. + // [Go] Convert this into more reasonable logic. + for is_alpha(parser.buffer, parser.buffer_pos) || parser.buffer[parser.buffer_pos] == ';' || + parser.buffer[parser.buffer_pos] == '/' || parser.buffer[parser.buffer_pos] == '?' || + parser.buffer[parser.buffer_pos] == ':' || parser.buffer[parser.buffer_pos] == '@' || + parser.buffer[parser.buffer_pos] == '&' || parser.buffer[parser.buffer_pos] == '=' || + parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '$' || + parser.buffer[parser.buffer_pos] == ',' || parser.buffer[parser.buffer_pos] == '.' || + parser.buffer[parser.buffer_pos] == '!' || parser.buffer[parser.buffer_pos] == '~' || + parser.buffer[parser.buffer_pos] == '*' || parser.buffer[parser.buffer_pos] == '\'' || + parser.buffer[parser.buffer_pos] == '(' || parser.buffer[parser.buffer_pos] == ')' || + parser.buffer[parser.buffer_pos] == '[' || parser.buffer[parser.buffer_pos] == ']' || + parser.buffer[parser.buffer_pos] == '%' { + // Check if it is a URI-escape sequence. + if parser.buffer[parser.buffer_pos] == '%' { + if !yaml_parser_scan_uri_escapes(parser, directive, start_mark, &s) { + return false + } + } else { + s = read(parser, s) + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + hasTag = true + } + + if !hasTag { + yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find expected tag URI") + return false + } + *uri = s + return true +} + +// Decode an URI-escape sequence corresponding to a single UTF-8 character. +func yaml_parser_scan_uri_escapes(parser *yaml_parser_t, directive bool, start_mark yaml_mark_t, s *[]byte) bool { + + // Decode the required number of characters. + w := 1024 + for w > 0 { + // Check for a URI-escaped octet. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + + if !(parser.buffer[parser.buffer_pos] == '%' && + is_hex(parser.buffer, parser.buffer_pos+1) && + is_hex(parser.buffer, parser.buffer_pos+2)) { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "did not find URI escaped octet") + } + + // Get the octet. + octet := byte((as_hex(parser.buffer, parser.buffer_pos+1) << 4) + as_hex(parser.buffer, parser.buffer_pos+2)) + + // If it is the leading octet, determine the length of the UTF-8 sequence. + if w == 1024 { + w = width(octet) + if w == 0 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect leading UTF-8 octet") + } + } else { + // Check if the trailing octet is correct. + if octet&0xC0 != 0x80 { + return yaml_parser_set_scanner_tag_error(parser, directive, + start_mark, "found an incorrect trailing UTF-8 octet") + } + } + + // Copy the octet and move the pointers. + *s = append(*s, octet) + skip(parser) + skip(parser) + skip(parser) + w-- + } + return true +} + +// Scan a block scalar. +func yaml_parser_scan_block_scalar(parser *yaml_parser_t, token *yaml_token_t, literal bool) bool { + // Eat the indicator '|' or '>'. + start_mark := parser.mark + skip(parser) + + // Scan the additional block scalar indicators. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check for a chomping indicator. + var chomping, increment int + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + // Set the chomping method and eat the indicator. + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + + // Check for an indentation indicator. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if is_digit(parser.buffer, parser.buffer_pos) { + // Check that the indentation is greater than 0. + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + + // Get the indentation level and eat the indicator. + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + } + + } else if is_digit(parser.buffer, parser.buffer_pos) { + // Do the same as above, but in the opposite order. + + if parser.buffer[parser.buffer_pos] == '0' { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found an indentation indicator equal to 0") + return false + } + increment = as_digit(parser.buffer, parser.buffer_pos) + skip(parser) + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + if parser.buffer[parser.buffer_pos] == '+' || parser.buffer[parser.buffer_pos] == '-' { + if parser.buffer[parser.buffer_pos] == '+' { + chomping = +1 + } else { + chomping = -1 + } + skip(parser) + } + } + + // Eat whitespaces and comments to the end of the line. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for is_blank(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.buffer[parser.buffer_pos] == '#' { + for !is_breakz(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + } + + // Check if we are at the end of the line. + if !is_breakz(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "did not find expected comment or line break") + return false + } + + // Eat a line break. + if is_break(parser.buffer, parser.buffer_pos) { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + skip_line(parser) + } + + end_mark := parser.mark + + // Set the indentation level if it was specified. + var indent int + if increment > 0 { + if parser.indent >= 0 { + indent = parser.indent + increment + } else { + indent = increment + } + } + + // Scan the leading line breaks and determine the indentation level if needed. + var s, leading_break, trailing_breaks []byte + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + + // Scan the block scalar content. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + var leading_blank, trailing_blank bool + for parser.mark.column == indent && !is_z(parser.buffer, parser.buffer_pos) { + // We are at the beginning of a non-empty line. + + // Is it a trailing whitespace? + trailing_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Check if we need to fold the leading line break. + if !literal && !leading_blank && !trailing_blank && len(leading_break) > 0 && leading_break[0] == '\n' { + // Do we need to join the lines by space? + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } + } else { + s = append(s, leading_break...) + } + leading_break = leading_break[:0] + + // Append the remaining line breaks. + s = append(s, trailing_breaks...) + trailing_breaks = trailing_breaks[:0] + + // Is it a leading whitespace? + leading_blank = is_blank(parser.buffer, parser.buffer_pos) + + // Consume the current line. + for !is_breakz(parser.buffer, parser.buffer_pos) { + s = read(parser, s) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + leading_break = read_line(parser, leading_break) + + // Eat the following indentation spaces and line breaks. + if !yaml_parser_scan_block_scalar_breaks(parser, &indent, &trailing_breaks, start_mark, &end_mark) { + return false + } + } + + // Chomp the tail. + if chomping != -1 { + s = append(s, leading_break...) + } + if chomping == 1 { + s = append(s, trailing_breaks...) + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_LITERAL_SCALAR_STYLE, + } + if !literal { + token.style = yaml_FOLDED_SCALAR_STYLE + } + return true +} + +// Scan indentation spaces and line breaks for a block scalar. Determine the +// indentation level if needed. +func yaml_parser_scan_block_scalar_breaks(parser *yaml_parser_t, indent *int, breaks *[]byte, start_mark yaml_mark_t, end_mark *yaml_mark_t) bool { + *end_mark = parser.mark + + // Eat the indentation spaces and line breaks. + max_indent := 0 + for { + // Eat the indentation spaces. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + for (*indent == 0 || parser.mark.column < *indent) && is_space(parser.buffer, parser.buffer_pos) { + skip(parser) + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + if parser.mark.column > max_indent { + max_indent = parser.mark.column + } + + // Check for a tab character messing the indentation. + if (*indent == 0 || parser.mark.column < *indent) && is_tab(parser.buffer, parser.buffer_pos) { + return yaml_parser_set_scanner_error(parser, "while scanning a block scalar", + start_mark, "found a tab character where an indentation space is expected") + } + + // Have we found a non-empty line? + if !is_break(parser.buffer, parser.buffer_pos) { + break + } + + // Consume the line break. + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + // [Go] Should really be returning breaks instead. + *breaks = read_line(parser, *breaks) + *end_mark = parser.mark + } + + // Determine the indentation level if needed. + if *indent == 0 { + *indent = max_indent + if *indent < parser.indent+1 { + *indent = parser.indent + 1 + } + if *indent < 1 { + *indent = 1 + } + } + return true +} + +// Scan a quoted scalar. +func yaml_parser_scan_flow_scalar(parser *yaml_parser_t, token *yaml_token_t, single bool) bool { + // Eat the left quote. + start_mark := parser.mark + skip(parser) + + // Consume the content of the quoted scalar. + var s, leading_break, trailing_breaks, whitespaces []byte + for { + // Check that there are no document indicators at the beginning of the line. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected document indicator") + return false + } + + // Check for EOF. + if is_z(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a quoted scalar", + start_mark, "found unexpected end of stream") + return false + } + + // Consume non-blank characters. + leading_blanks := false + for !is_blankz(parser.buffer, parser.buffer_pos) { + if single && parser.buffer[parser.buffer_pos] == '\'' && parser.buffer[parser.buffer_pos+1] == '\'' { + // Is is an escaped single quote. + s = append(s, '\'') + skip(parser) + skip(parser) + + } else if single && parser.buffer[parser.buffer_pos] == '\'' { + // It is a right single quote. + break + } else if !single && parser.buffer[parser.buffer_pos] == '"' { + // It is a right double quote. + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' && is_break(parser.buffer, parser.buffer_pos+1) { + // It is an escaped line break. + if parser.unread < 3 && !yaml_parser_update_buffer(parser, 3) { + return false + } + skip(parser) + skip_line(parser) + leading_blanks = true + break + + } else if !single && parser.buffer[parser.buffer_pos] == '\\' { + // It is an escape sequence. + code_length := 0 + + // Check the escape character. + switch parser.buffer[parser.buffer_pos+1] { + case '0': + s = append(s, 0) + case 'a': + s = append(s, '\x07') + case 'b': + s = append(s, '\x08') + case 't', '\t': + s = append(s, '\x09') + case 'n': + s = append(s, '\x0A') + case 'v': + s = append(s, '\x0B') + case 'f': + s = append(s, '\x0C') + case 'r': + s = append(s, '\x0D') + case 'e': + s = append(s, '\x1B') + case ' ': + s = append(s, '\x20') + case '"': + s = append(s, '"') + case '\'': + s = append(s, '\'') + case '\\': + s = append(s, '\\') + case 'N': // NEL (#x85) + s = append(s, '\xC2') + s = append(s, '\x85') + case '_': // #xA0 + s = append(s, '\xC2') + s = append(s, '\xA0') + case 'L': // LS (#x2028) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA8') + case 'P': // PS (#x2029) + s = append(s, '\xE2') + s = append(s, '\x80') + s = append(s, '\xA9') + case 'x': + code_length = 2 + case 'u': + code_length = 4 + case 'U': + code_length = 8 + default: + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found unknown escape character") + return false + } + + skip(parser) + skip(parser) + + // Consume an arbitrary escape code. + if code_length > 0 { + var value int + + // Scan the character value. + if parser.unread < code_length && !yaml_parser_update_buffer(parser, code_length) { + return false + } + for k := 0; k < code_length; k++ { + if !is_hex(parser.buffer, parser.buffer_pos+k) { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "did not find expected hexdecimal number") + return false + } + value = (value << 4) + as_hex(parser.buffer, parser.buffer_pos+k) + } + + // Check the value and write the character. + if (value >= 0xD800 && value <= 0xDFFF) || value > 0x10FFFF { + yaml_parser_set_scanner_error(parser, "while parsing a quoted scalar", + start_mark, "found invalid Unicode character escape code") + return false + } + if value <= 0x7F { + s = append(s, byte(value)) + } else if value <= 0x7FF { + s = append(s, byte(0xC0+(value>>6))) + s = append(s, byte(0x80+(value&0x3F))) + } else if value <= 0xFFFF { + s = append(s, byte(0xE0+(value>>12))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } else { + s = append(s, byte(0xF0+(value>>18))) + s = append(s, byte(0x80+((value>>12)&0x3F))) + s = append(s, byte(0x80+((value>>6)&0x3F))) + s = append(s, byte(0x80+(value&0x3F))) + } + + // Advance the pointer. + for k := 0; k < code_length; k++ { + skip(parser) + } + } + } else { + // It is a non-escaped non-blank character. + s = read(parser, s) + } + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + // Check if we are at the end of the scalar. + if single { + if parser.buffer[parser.buffer_pos] == '\'' { + break + } + } else { + if parser.buffer[parser.buffer_pos] == '"' { + break + } + } + + // Consume blank characters. + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Join the whitespaces or fold line breaks. + if leading_blanks { + // Do we need to fold line breaks? + if len(leading_break) > 0 && leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Eat the right quote. + skip(parser) + end_mark := parser.mark + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_SINGLE_QUOTED_SCALAR_STYLE, + } + if !single { + token.style = yaml_DOUBLE_QUOTED_SCALAR_STYLE + } + return true +} + +// Scan a plain scalar. +func yaml_parser_scan_plain_scalar(parser *yaml_parser_t, token *yaml_token_t) bool { + + var s, leading_break, trailing_breaks, whitespaces []byte + var leading_blanks bool + var indent = parser.indent + 1 + + start_mark := parser.mark + end_mark := parser.mark + + // Consume the content of the plain scalar. + for { + // Check for a document indicator. + if parser.unread < 4 && !yaml_parser_update_buffer(parser, 4) { + return false + } + if parser.mark.column == 0 && + ((parser.buffer[parser.buffer_pos+0] == '-' && + parser.buffer[parser.buffer_pos+1] == '-' && + parser.buffer[parser.buffer_pos+2] == '-') || + (parser.buffer[parser.buffer_pos+0] == '.' && + parser.buffer[parser.buffer_pos+1] == '.' && + parser.buffer[parser.buffer_pos+2] == '.')) && + is_blankz(parser.buffer, parser.buffer_pos+3) { + break + } + + // Check for a comment. + if parser.buffer[parser.buffer_pos] == '#' { + break + } + + // Consume non-blank characters. + for !is_blankz(parser.buffer, parser.buffer_pos) { + + // Check for indicators that may end a plain scalar. + if (parser.buffer[parser.buffer_pos] == ':' && is_blankz(parser.buffer, parser.buffer_pos+1)) || + (parser.flow_level > 0 && + (parser.buffer[parser.buffer_pos] == ',' || + parser.buffer[parser.buffer_pos] == '?' || parser.buffer[parser.buffer_pos] == '[' || + parser.buffer[parser.buffer_pos] == ']' || parser.buffer[parser.buffer_pos] == '{' || + parser.buffer[parser.buffer_pos] == '}')) { + break + } + + // Check if we need to join whitespaces and breaks. + if leading_blanks || len(whitespaces) > 0 { + if leading_blanks { + // Do we need to fold line breaks? + if leading_break[0] == '\n' { + if len(trailing_breaks) == 0 { + s = append(s, ' ') + } else { + s = append(s, trailing_breaks...) + } + } else { + s = append(s, leading_break...) + s = append(s, trailing_breaks...) + } + trailing_breaks = trailing_breaks[:0] + leading_break = leading_break[:0] + leading_blanks = false + } else { + s = append(s, whitespaces...) + whitespaces = whitespaces[:0] + } + } + + // Copy the character. + s = read(parser, s) + + end_mark = parser.mark + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + } + + // Is it the end? + if !(is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos)) { + break + } + + // Consume blank characters. + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + + for is_blank(parser.buffer, parser.buffer_pos) || is_break(parser.buffer, parser.buffer_pos) { + if is_blank(parser.buffer, parser.buffer_pos) { + + // Check for tab characters that abuse indentation. + if leading_blanks && parser.mark.column < indent && is_tab(parser.buffer, parser.buffer_pos) { + yaml_parser_set_scanner_error(parser, "while scanning a plain scalar", + start_mark, "found a tab character that violates indentation") + return false + } + + // Consume a space or a tab character. + if !leading_blanks { + whitespaces = read(parser, whitespaces) + } else { + skip(parser) + } + } else { + if parser.unread < 2 && !yaml_parser_update_buffer(parser, 2) { + return false + } + + // Check if it is a first line break. + if !leading_blanks { + whitespaces = whitespaces[:0] + leading_break = read_line(parser, leading_break) + leading_blanks = true + } else { + trailing_breaks = read_line(parser, trailing_breaks) + } + } + if parser.unread < 1 && !yaml_parser_update_buffer(parser, 1) { + return false + } + } + + // Check indentation level. + if parser.flow_level == 0 && parser.mark.column < indent { + break + } + } + + // Create a token. + *token = yaml_token_t{ + typ: yaml_SCALAR_TOKEN, + start_mark: start_mark, + end_mark: end_mark, + value: s, + style: yaml_PLAIN_SCALAR_STYLE, + } + + // Note that we change the 'simple_key_allowed' flag. + if leading_blanks { + parser.simple_key_allowed = true + } + return true +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go new file mode 100644 index 000000000..4c45e660a --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/sorter.go @@ -0,0 +1,113 @@ +package yaml + +import ( + "reflect" + "unicode" +) + +type keyList []reflect.Value + +func (l keyList) Len() int { return len(l) } +func (l keyList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l keyList) Less(i, j int) bool { + a := l[i] + b := l[j] + ak := a.Kind() + bk := b.Kind() + for (ak == reflect.Interface || ak == reflect.Ptr) && !a.IsNil() { + a = a.Elem() + ak = a.Kind() + } + for (bk == reflect.Interface || bk == reflect.Ptr) && !b.IsNil() { + b = b.Elem() + bk = b.Kind() + } + af, aok := keyFloat(a) + bf, bok := keyFloat(b) + if aok && bok { + if af != bf { + return af < bf + } + if ak != bk { + return ak < bk + } + return numLess(a, b) + } + if ak != reflect.String || bk != reflect.String { + return ak < bk + } + ar, br := []rune(a.String()), []rune(b.String()) + for i := 0; i < len(ar) && i < len(br); i++ { + if ar[i] == br[i] { + continue + } + al := unicode.IsLetter(ar[i]) + bl := unicode.IsLetter(br[i]) + if al && bl { + return ar[i] < br[i] + } + if al || bl { + return bl + } + var ai, bi int + var an, bn int64 + if ar[i] == '0' || br[i] == '0' { + for j := i-1; j >= 0 && unicode.IsDigit(ar[j]); j-- { + if ar[j] != '0' { + an = 1 + bn = 1 + break + } + } + } + for ai = i; ai < len(ar) && unicode.IsDigit(ar[ai]); ai++ { + an = an*10 + int64(ar[ai]-'0') + } + for bi = i; bi < len(br) && unicode.IsDigit(br[bi]); bi++ { + bn = bn*10 + int64(br[bi]-'0') + } + if an != bn { + return an < bn + } + if ai != bi { + return ai < bi + } + return ar[i] < br[i] + } + return len(ar) < len(br) +} + +// keyFloat returns a float value for v if it is a number/bool +// and whether it is a number/bool or not. +func keyFloat(v reflect.Value) (f float64, ok bool) { + switch v.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return float64(v.Int()), true + case reflect.Float32, reflect.Float64: + return v.Float(), true + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return float64(v.Uint()), true + case reflect.Bool: + if v.Bool() { + return 1, true + } + return 0, true + } + return 0, false +} + +// numLess returns whether a < b. +// a and b must necessarily have the same kind. +func numLess(a, b reflect.Value) bool { + switch a.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return a.Int() < b.Int() + case reflect.Float32, reflect.Float64: + return a.Float() < b.Float() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return a.Uint() < b.Uint() + case reflect.Bool: + return !a.Bool() && b.Bool() + } + panic("not a number") +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/writerc.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/writerc.go new file mode 100644 index 000000000..a2dde608c --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/writerc.go @@ -0,0 +1,26 @@ +package yaml + +// Set the writer error and return false. +func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { + emitter.error = yaml_WRITER_ERROR + emitter.problem = problem + return false +} + +// Flush the output buffer. +func yaml_emitter_flush(emitter *yaml_emitter_t) bool { + if emitter.write_handler == nil { + panic("write handler not set") + } + + // Check if the buffer is empty. + if emitter.buffer_pos == 0 { + return true + } + + if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { + return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) + } + emitter.buffer_pos = 0 + return true +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go new file mode 100644 index 000000000..30813884c --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/yaml.go @@ -0,0 +1,478 @@ +// Package yaml implements YAML support for the Go language. +// +// Source code and other details for the project are available at GitHub: +// +// https://github.com/go-yaml/yaml +// +package yaml + +import ( + "errors" + "fmt" + "io" + "reflect" + "strings" + "sync" +) + +// MapSlice encodes and decodes as a YAML map. +// The order of keys is preserved when encoding and decoding. +type MapSlice []MapItem + +// MapItem is an item in a MapSlice. +type MapItem struct { + Key, Value interface{} +} + +// The Unmarshaler interface may be implemented by types to customize their +// behavior when being unmarshaled from a YAML document. The UnmarshalYAML +// method receives a function that may be called to unmarshal the original +// YAML value into a field or variable. It is safe to call the unmarshal +// function parameter more than once if necessary. +type Unmarshaler interface { + UnmarshalYAML(unmarshal func(interface{}) error) error +} + +// The Marshaler interface may be implemented by types to customize their +// behavior when being marshaled into a YAML document. The returned value +// is marshaled in place of the original value implementing Marshaler. +// +// If an error is returned by MarshalYAML, the marshaling procedure stops +// and returns with the provided error. +type Marshaler interface { + MarshalYAML() (interface{}, error) +} + +// Unmarshal decodes the first document found within the in byte slice +// and assigns decoded values into the out value. +// +// Maps and pointers (to a struct, string, int, etc) are accepted as out +// values. If an internal pointer within a struct is not initialized, +// the yaml package will initialize it if necessary for unmarshalling +// the provided data. The out parameter must not be nil. +// +// The type of the decoded values should be compatible with the respective +// values in out. If one or more values cannot be decoded due to a type +// mismatches, decoding continues partially until the end of the YAML +// content, and a *yaml.TypeError is returned with details for all +// missed values. +// +// Struct fields are only unmarshalled if they are exported (have an +// upper case first letter), and are unmarshalled using the field name +// lowercased as the default key. Custom keys may be defined via the +// "yaml" name in the field tag: the content preceding the first comma +// is used as the key, and the following comma-separated options are +// used to tweak the marshalling process (see Marshal). +// Conflicting names result in a runtime error. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// var t T +// yaml.Unmarshal([]byte("a: 1\nb: 2"), &t) +// +// See the documentation of Marshal for the format of tags and a list of +// supported tag options. +// +func Unmarshal(in []byte, out interface{}) (err error) { + return unmarshal(in, out, false) +} + +// UnmarshalStrict is like Unmarshal except that any fields that are found +// in the data that do not have corresponding struct members, or mapping +// keys that are duplicates, will result in +// an error. +func UnmarshalStrict(in []byte, out interface{}) (err error) { + return unmarshal(in, out, true) +} + +// A Decoder reads and decodes YAML values from an input stream. +type Decoder struct { + strict bool + parser *parser +} + +// NewDecoder returns a new decoder that reads from r. +// +// The decoder introduces its own buffering and may read +// data from r beyond the YAML values requested. +func NewDecoder(r io.Reader) *Decoder { + return &Decoder{ + parser: newParserFromReader(r), + } +} + +// SetStrict sets whether strict decoding behaviour is enabled when +// decoding items in the data (see UnmarshalStrict). By default, decoding is not strict. +func (dec *Decoder) SetStrict(strict bool) { + dec.strict = strict +} + +// Decode reads the next YAML-encoded value from its input +// and stores it in the value pointed to by v. +// +// See the documentation for Unmarshal for details about the +// conversion of YAML into a Go value. +func (dec *Decoder) Decode(v interface{}) (err error) { + d := newDecoder(dec.strict) + defer handleErr(&err) + node := dec.parser.parse() + if node == nil { + return io.EOF + } + out := reflect.ValueOf(v) + if out.Kind() == reflect.Ptr && !out.IsNil() { + out = out.Elem() + } + d.unmarshal(node, out) + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +func unmarshal(in []byte, out interface{}, strict bool) (err error) { + defer handleErr(&err) + d := newDecoder(strict) + p := newParser(in) + defer p.destroy() + node := p.parse() + if node != nil { + v := reflect.ValueOf(out) + if v.Kind() == reflect.Ptr && !v.IsNil() { + v = v.Elem() + } + d.unmarshal(node, v) + } + if len(d.terrors) > 0 { + return &TypeError{d.terrors} + } + return nil +} + +// Marshal serializes the value provided into a YAML document. The structure +// of the generated document will reflect the structure of the value itself. +// Maps and pointers (to struct, string, int, etc) are accepted as the in value. +// +// Struct fields are only marshalled if they are exported (have an upper case +// first letter), and are marshalled using the field name lowercased as the +// default key. Custom keys may be defined via the "yaml" name in the field +// tag: the content preceding the first comma is used as the key, and the +// following comma-separated options are used to tweak the marshalling process. +// Conflicting names result in a runtime error. +// +// The field tag format accepted is: +// +// `(...) yaml:"[][,[,]]" (...)` +// +// The following flags are currently supported: +// +// omitempty Only include the field if it's not set to the zero +// value for the type or to empty slices or maps. +// Zero valued structs will be omitted if all their public +// fields are zero, unless they implement an IsZero +// method (see the IsZeroer interface type), in which +// case the field will be excluded if IsZero returns true. +// +// flow Marshal using a flow style (useful for structs, +// sequences and maps). +// +// inline Inline the field, which must be a struct or a map, +// causing all of its fields or keys to be processed as if +// they were part of the outer struct. For maps, keys must +// not conflict with the yaml keys of other struct fields. +// +// In addition, if the key is "-", the field is ignored. +// +// For example: +// +// type T struct { +// F int `yaml:"a,omitempty"` +// B int +// } +// yaml.Marshal(&T{B: 2}) // Returns "b: 2\n" +// yaml.Marshal(&T{F: 1}} // Returns "a: 1\nb: 0\n" +// +func Marshal(in interface{}) (out []byte, err error) { + defer handleErr(&err) + e := newEncoder() + defer e.destroy() + e.marshalDoc("", reflect.ValueOf(in)) + e.finish() + out = e.out + return +} + +// An Encoder writes YAML values to an output stream. +type Encoder struct { + encoder *encoder +} + +// NewEncoder returns a new encoder that writes to w. +// The Encoder should be closed after use to flush all data +// to w. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{ + encoder: newEncoderWithWriter(w), + } +} + +// Encode writes the YAML encoding of v to the stream. +// If multiple items are encoded to the stream, the +// second and subsequent document will be preceded +// with a "---" document separator, but the first will not. +// +// See the documentation for Marshal for details about the conversion of Go +// values to YAML. +func (e *Encoder) Encode(v interface{}) (err error) { + defer handleErr(&err) + e.encoder.marshalDoc("", reflect.ValueOf(v)) + return nil +} + +// Close closes the encoder by writing any remaining data. +// It does not write a stream terminating string "...". +func (e *Encoder) Close() (err error) { + defer handleErr(&err) + e.encoder.finish() + return nil +} + +func handleErr(err *error) { + if v := recover(); v != nil { + if e, ok := v.(yamlError); ok { + *err = e.err + } else { + panic(v) + } + } +} + +type yamlError struct { + err error +} + +func fail(err error) { + panic(yamlError{err}) +} + +func failf(format string, args ...interface{}) { + panic(yamlError{fmt.Errorf("yaml: "+format, args...)}) +} + +// A TypeError is returned by Unmarshal when one or more fields in +// the YAML document cannot be properly decoded into the requested +// types. When this error is returned, the value is still +// unmarshaled partially. +type TypeError struct { + Errors []string +} + +func (e *TypeError) Error() string { + return fmt.Sprintf("yaml: unmarshal errors:\n %s", strings.Join(e.Errors, "\n ")) +} + +// -------------------------------------------------------------------------- +// Maintain a mapping of keys to structure field indexes + +// The code in this section was copied from mgo/bson. + +// structInfo holds details for the serialization of fields of +// a given struct. +type structInfo struct { + FieldsMap map[string]fieldInfo + FieldsList []fieldInfo + + // InlineMap is the number of the field in the struct that + // contains an ,inline map, or -1 if there's none. + InlineMap int +} + +type fieldInfo struct { + Key string + Num int + OmitEmpty bool + Flow bool + // Id holds the unique field identifier, so we can cheaply + // check for field duplicates without maintaining an extra map. + Id int + + // Inline holds the field index if the field is part of an inlined struct. + Inline []int +} + +var structMap = make(map[reflect.Type]*structInfo) +var fieldMapMutex sync.RWMutex + +func getStructInfo(st reflect.Type) (*structInfo, error) { + fieldMapMutex.RLock() + sinfo, found := structMap[st] + fieldMapMutex.RUnlock() + if found { + return sinfo, nil + } + + n := st.NumField() + fieldsMap := make(map[string]fieldInfo) + fieldsList := make([]fieldInfo, 0, n) + inlineMap := -1 + for i := 0; i != n; i++ { + field := st.Field(i) + if field.PkgPath != "" && !field.Anonymous { + continue // Private field + } + + info := fieldInfo{Num: i} + + tag := field.Tag.Get("yaml") + if tag == "" && strings.Index(string(field.Tag), ":") < 0 { + tag = string(field.Tag) + } + if tag == "-" { + continue + } + + inline := false + fields := strings.Split(tag, ",") + if len(fields) > 1 { + for _, flag := range fields[1:] { + switch flag { + case "omitempty": + info.OmitEmpty = true + case "flow": + info.Flow = true + case "inline": + inline = true + default: + return nil, errors.New(fmt.Sprintf("Unsupported flag %q in tag %q of type %s", flag, tag, st)) + } + } + tag = fields[0] + } + + if inline { + switch field.Type.Kind() { + case reflect.Map: + if inlineMap >= 0 { + return nil, errors.New("Multiple ,inline maps in struct " + st.String()) + } + if field.Type.Key() != reflect.TypeOf("") { + return nil, errors.New("Option ,inline needs a map with string keys in struct " + st.String()) + } + inlineMap = info.Num + case reflect.Struct: + sinfo, err := getStructInfo(field.Type) + if err != nil { + return nil, err + } + for _, finfo := range sinfo.FieldsList { + if _, found := fieldsMap[finfo.Key]; found { + msg := "Duplicated key '" + finfo.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + if finfo.Inline == nil { + finfo.Inline = []int{i, finfo.Num} + } else { + finfo.Inline = append([]int{i}, finfo.Inline...) + } + finfo.Id = len(fieldsList) + fieldsMap[finfo.Key] = finfo + fieldsList = append(fieldsList, finfo) + } + default: + //return nil, errors.New("Option ,inline needs a struct value or map field") + return nil, errors.New("Option ,inline needs a struct value field") + } + continue + } + + if tag != "" { + info.Key = tag + } else { + info.Key = strings.ToLower(field.Name) + } + + if _, found = fieldsMap[info.Key]; found { + msg := "Duplicated key '" + info.Key + "' in struct " + st.String() + return nil, errors.New(msg) + } + + info.Id = len(fieldsList) + fieldsList = append(fieldsList, info) + fieldsMap[info.Key] = info + } + + sinfo = &structInfo{ + FieldsMap: fieldsMap, + FieldsList: fieldsList, + InlineMap: inlineMap, + } + + fieldMapMutex.Lock() + structMap[st] = sinfo + fieldMapMutex.Unlock() + return sinfo, nil +} + +// IsZeroer is used to check whether an object is zero to +// determine whether it should be omitted when marshaling +// with the omitempty flag. One notable implementation +// is time.Time. +type IsZeroer interface { + IsZero() bool +} + +func isZero(v reflect.Value) bool { + kind := v.Kind() + if z, ok := v.Interface().(IsZeroer); ok { + if (kind == reflect.Ptr || kind == reflect.Interface) && v.IsNil() { + return true + } + return z.IsZero() + } + switch kind { + case reflect.String: + return len(v.String()) == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Slice: + return v.Len() == 0 + case reflect.Map: + return v.Len() == 0 + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Struct: + vt := v.Type() + for i := v.NumField() - 1; i >= 0; i-- { + if vt.Field(i).PkgPath != "" { + continue // Private field + } + if !isZero(v.Field(i)) { + return false + } + } + return true + } + return false +} + +// FutureLineWrap globally disables line wrapping when encoding long strings. +// This is a temporary and thus deprecated method introduced to faciliate +// migration towards v3, which offers more control of line lengths on +// individual encodings, and has a default matching the behavior introduced +// by this function. +// +// The default formatting of v2 was erroneously changed in v2.3.0 and reverted +// in v2.4.0, at which point this function was introduced to help migration. +func FutureLineWrap() { + disableLineWrapping = true +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go new file mode 100644 index 000000000..f6a9c8e34 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlh.go @@ -0,0 +1,739 @@ +package yaml + +import ( + "fmt" + "io" +) + +// The version directive data. +type yaml_version_directive_t struct { + major int8 // The major version number. + minor int8 // The minor version number. +} + +// The tag directive data. +type yaml_tag_directive_t struct { + handle []byte // The tag handle. + prefix []byte // The tag prefix. +} + +type yaml_encoding_t int + +// The stream encoding. +const ( + // Let the parser choose the encoding. + yaml_ANY_ENCODING yaml_encoding_t = iota + + yaml_UTF8_ENCODING // The default UTF-8 encoding. + yaml_UTF16LE_ENCODING // The UTF-16-LE encoding with BOM. + yaml_UTF16BE_ENCODING // The UTF-16-BE encoding with BOM. +) + +type yaml_break_t int + +// Line break types. +const ( + // Let the parser choose the break type. + yaml_ANY_BREAK yaml_break_t = iota + + yaml_CR_BREAK // Use CR for line breaks (Mac style). + yaml_LN_BREAK // Use LN for line breaks (Unix style). + yaml_CRLN_BREAK // Use CR LN for line breaks (DOS style). +) + +type yaml_error_type_t int + +// Many bad things could happen with the parser and emitter. +const ( + // No error is produced. + yaml_NO_ERROR yaml_error_type_t = iota + + yaml_MEMORY_ERROR // Cannot allocate or reallocate a block of memory. + yaml_READER_ERROR // Cannot read or decode the input stream. + yaml_SCANNER_ERROR // Cannot scan the input stream. + yaml_PARSER_ERROR // Cannot parse the input stream. + yaml_COMPOSER_ERROR // Cannot compose a YAML document. + yaml_WRITER_ERROR // Cannot write to the output stream. + yaml_EMITTER_ERROR // Cannot emit a YAML stream. +) + +// The pointer position. +type yaml_mark_t struct { + index int // The position index. + line int // The position line. + column int // The position column. +} + +// Node Styles + +type yaml_style_t int8 + +type yaml_scalar_style_t yaml_style_t + +// Scalar styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SCALAR_STYLE yaml_scalar_style_t = iota + + yaml_PLAIN_SCALAR_STYLE // The plain scalar style. + yaml_SINGLE_QUOTED_SCALAR_STYLE // The single-quoted scalar style. + yaml_DOUBLE_QUOTED_SCALAR_STYLE // The double-quoted scalar style. + yaml_LITERAL_SCALAR_STYLE // The literal scalar style. + yaml_FOLDED_SCALAR_STYLE // The folded scalar style. +) + +type yaml_sequence_style_t yaml_style_t + +// Sequence styles. +const ( + // Let the emitter choose the style. + yaml_ANY_SEQUENCE_STYLE yaml_sequence_style_t = iota + + yaml_BLOCK_SEQUENCE_STYLE // The block sequence style. + yaml_FLOW_SEQUENCE_STYLE // The flow sequence style. +) + +type yaml_mapping_style_t yaml_style_t + +// Mapping styles. +const ( + // Let the emitter choose the style. + yaml_ANY_MAPPING_STYLE yaml_mapping_style_t = iota + + yaml_BLOCK_MAPPING_STYLE // The block mapping style. + yaml_FLOW_MAPPING_STYLE // The flow mapping style. +) + +// Tokens + +type yaml_token_type_t int + +// Token types. +const ( + // An empty token. + yaml_NO_TOKEN yaml_token_type_t = iota + + yaml_STREAM_START_TOKEN // A STREAM-START token. + yaml_STREAM_END_TOKEN // A STREAM-END token. + + yaml_VERSION_DIRECTIVE_TOKEN // A VERSION-DIRECTIVE token. + yaml_TAG_DIRECTIVE_TOKEN // A TAG-DIRECTIVE token. + yaml_DOCUMENT_START_TOKEN // A DOCUMENT-START token. + yaml_DOCUMENT_END_TOKEN // A DOCUMENT-END token. + + yaml_BLOCK_SEQUENCE_START_TOKEN // A BLOCK-SEQUENCE-START token. + yaml_BLOCK_MAPPING_START_TOKEN // A BLOCK-SEQUENCE-END token. + yaml_BLOCK_END_TOKEN // A BLOCK-END token. + + yaml_FLOW_SEQUENCE_START_TOKEN // A FLOW-SEQUENCE-START token. + yaml_FLOW_SEQUENCE_END_TOKEN // A FLOW-SEQUENCE-END token. + yaml_FLOW_MAPPING_START_TOKEN // A FLOW-MAPPING-START token. + yaml_FLOW_MAPPING_END_TOKEN // A FLOW-MAPPING-END token. + + yaml_BLOCK_ENTRY_TOKEN // A BLOCK-ENTRY token. + yaml_FLOW_ENTRY_TOKEN // A FLOW-ENTRY token. + yaml_KEY_TOKEN // A KEY token. + yaml_VALUE_TOKEN // A VALUE token. + + yaml_ALIAS_TOKEN // An ALIAS token. + yaml_ANCHOR_TOKEN // An ANCHOR token. + yaml_TAG_TOKEN // A TAG token. + yaml_SCALAR_TOKEN // A SCALAR token. +) + +func (tt yaml_token_type_t) String() string { + switch tt { + case yaml_NO_TOKEN: + return "yaml_NO_TOKEN" + case yaml_STREAM_START_TOKEN: + return "yaml_STREAM_START_TOKEN" + case yaml_STREAM_END_TOKEN: + return "yaml_STREAM_END_TOKEN" + case yaml_VERSION_DIRECTIVE_TOKEN: + return "yaml_VERSION_DIRECTIVE_TOKEN" + case yaml_TAG_DIRECTIVE_TOKEN: + return "yaml_TAG_DIRECTIVE_TOKEN" + case yaml_DOCUMENT_START_TOKEN: + return "yaml_DOCUMENT_START_TOKEN" + case yaml_DOCUMENT_END_TOKEN: + return "yaml_DOCUMENT_END_TOKEN" + case yaml_BLOCK_SEQUENCE_START_TOKEN: + return "yaml_BLOCK_SEQUENCE_START_TOKEN" + case yaml_BLOCK_MAPPING_START_TOKEN: + return "yaml_BLOCK_MAPPING_START_TOKEN" + case yaml_BLOCK_END_TOKEN: + return "yaml_BLOCK_END_TOKEN" + case yaml_FLOW_SEQUENCE_START_TOKEN: + return "yaml_FLOW_SEQUENCE_START_TOKEN" + case yaml_FLOW_SEQUENCE_END_TOKEN: + return "yaml_FLOW_SEQUENCE_END_TOKEN" + case yaml_FLOW_MAPPING_START_TOKEN: + return "yaml_FLOW_MAPPING_START_TOKEN" + case yaml_FLOW_MAPPING_END_TOKEN: + return "yaml_FLOW_MAPPING_END_TOKEN" + case yaml_BLOCK_ENTRY_TOKEN: + return "yaml_BLOCK_ENTRY_TOKEN" + case yaml_FLOW_ENTRY_TOKEN: + return "yaml_FLOW_ENTRY_TOKEN" + case yaml_KEY_TOKEN: + return "yaml_KEY_TOKEN" + case yaml_VALUE_TOKEN: + return "yaml_VALUE_TOKEN" + case yaml_ALIAS_TOKEN: + return "yaml_ALIAS_TOKEN" + case yaml_ANCHOR_TOKEN: + return "yaml_ANCHOR_TOKEN" + case yaml_TAG_TOKEN: + return "yaml_TAG_TOKEN" + case yaml_SCALAR_TOKEN: + return "yaml_SCALAR_TOKEN" + } + return "" +} + +// The token structure. +type yaml_token_t struct { + // The token type. + typ yaml_token_type_t + + // The start/end of the token. + start_mark, end_mark yaml_mark_t + + // The stream encoding (for yaml_STREAM_START_TOKEN). + encoding yaml_encoding_t + + // The alias/anchor/scalar value or tag/tag directive handle + // (for yaml_ALIAS_TOKEN, yaml_ANCHOR_TOKEN, yaml_SCALAR_TOKEN, yaml_TAG_TOKEN, yaml_TAG_DIRECTIVE_TOKEN). + value []byte + + // The tag suffix (for yaml_TAG_TOKEN). + suffix []byte + + // The tag directive prefix (for yaml_TAG_DIRECTIVE_TOKEN). + prefix []byte + + // The scalar style (for yaml_SCALAR_TOKEN). + style yaml_scalar_style_t + + // The version directive major/minor (for yaml_VERSION_DIRECTIVE_TOKEN). + major, minor int8 +} + +// Events + +type yaml_event_type_t int8 + +// Event types. +const ( + // An empty event. + yaml_NO_EVENT yaml_event_type_t = iota + + yaml_STREAM_START_EVENT // A STREAM-START event. + yaml_STREAM_END_EVENT // A STREAM-END event. + yaml_DOCUMENT_START_EVENT // A DOCUMENT-START event. + yaml_DOCUMENT_END_EVENT // A DOCUMENT-END event. + yaml_ALIAS_EVENT // An ALIAS event. + yaml_SCALAR_EVENT // A SCALAR event. + yaml_SEQUENCE_START_EVENT // A SEQUENCE-START event. + yaml_SEQUENCE_END_EVENT // A SEQUENCE-END event. + yaml_MAPPING_START_EVENT // A MAPPING-START event. + yaml_MAPPING_END_EVENT // A MAPPING-END event. +) + +var eventStrings = []string{ + yaml_NO_EVENT: "none", + yaml_STREAM_START_EVENT: "stream start", + yaml_STREAM_END_EVENT: "stream end", + yaml_DOCUMENT_START_EVENT: "document start", + yaml_DOCUMENT_END_EVENT: "document end", + yaml_ALIAS_EVENT: "alias", + yaml_SCALAR_EVENT: "scalar", + yaml_SEQUENCE_START_EVENT: "sequence start", + yaml_SEQUENCE_END_EVENT: "sequence end", + yaml_MAPPING_START_EVENT: "mapping start", + yaml_MAPPING_END_EVENT: "mapping end", +} + +func (e yaml_event_type_t) String() string { + if e < 0 || int(e) >= len(eventStrings) { + return fmt.Sprintf("unknown event %d", e) + } + return eventStrings[e] +} + +// The event structure. +type yaml_event_t struct { + + // The event type. + typ yaml_event_type_t + + // The start and end of the event. + start_mark, end_mark yaml_mark_t + + // The document encoding (for yaml_STREAM_START_EVENT). + encoding yaml_encoding_t + + // The version directive (for yaml_DOCUMENT_START_EVENT). + version_directive *yaml_version_directive_t + + // The list of tag directives (for yaml_DOCUMENT_START_EVENT). + tag_directives []yaml_tag_directive_t + + // The anchor (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_ALIAS_EVENT). + anchor []byte + + // The tag (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + tag []byte + + // The scalar value (for yaml_SCALAR_EVENT). + value []byte + + // Is the document start/end indicator implicit, or the tag optional? + // (for yaml_DOCUMENT_START_EVENT, yaml_DOCUMENT_END_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT, yaml_SCALAR_EVENT). + implicit bool + + // Is the tag optional for any non-plain style? (for yaml_SCALAR_EVENT). + quoted_implicit bool + + // The style (for yaml_SCALAR_EVENT, yaml_SEQUENCE_START_EVENT, yaml_MAPPING_START_EVENT). + style yaml_style_t +} + +func (e *yaml_event_t) scalar_style() yaml_scalar_style_t { return yaml_scalar_style_t(e.style) } +func (e *yaml_event_t) sequence_style() yaml_sequence_style_t { return yaml_sequence_style_t(e.style) } +func (e *yaml_event_t) mapping_style() yaml_mapping_style_t { return yaml_mapping_style_t(e.style) } + +// Nodes + +const ( + yaml_NULL_TAG = "tag:yaml.org,2002:null" // The tag !!null with the only possible value: null. + yaml_BOOL_TAG = "tag:yaml.org,2002:bool" // The tag !!bool with the values: true and false. + yaml_STR_TAG = "tag:yaml.org,2002:str" // The tag !!str for string values. + yaml_INT_TAG = "tag:yaml.org,2002:int" // The tag !!int for integer values. + yaml_FLOAT_TAG = "tag:yaml.org,2002:float" // The tag !!float for float values. + yaml_TIMESTAMP_TAG = "tag:yaml.org,2002:timestamp" // The tag !!timestamp for date and time values. + + yaml_SEQ_TAG = "tag:yaml.org,2002:seq" // The tag !!seq is used to denote sequences. + yaml_MAP_TAG = "tag:yaml.org,2002:map" // The tag !!map is used to denote mapping. + + // Not in original libyaml. + yaml_BINARY_TAG = "tag:yaml.org,2002:binary" + yaml_MERGE_TAG = "tag:yaml.org,2002:merge" + + yaml_DEFAULT_SCALAR_TAG = yaml_STR_TAG // The default scalar tag is !!str. + yaml_DEFAULT_SEQUENCE_TAG = yaml_SEQ_TAG // The default sequence tag is !!seq. + yaml_DEFAULT_MAPPING_TAG = yaml_MAP_TAG // The default mapping tag is !!map. +) + +type yaml_node_type_t int + +// Node types. +const ( + // An empty node. + yaml_NO_NODE yaml_node_type_t = iota + + yaml_SCALAR_NODE // A scalar node. + yaml_SEQUENCE_NODE // A sequence node. + yaml_MAPPING_NODE // A mapping node. +) + +// An element of a sequence node. +type yaml_node_item_t int + +// An element of a mapping node. +type yaml_node_pair_t struct { + key int // The key of the element. + value int // The value of the element. +} + +// The node structure. +type yaml_node_t struct { + typ yaml_node_type_t // The node type. + tag []byte // The node tag. + + // The node data. + + // The scalar parameters (for yaml_SCALAR_NODE). + scalar struct { + value []byte // The scalar value. + length int // The length of the scalar value. + style yaml_scalar_style_t // The scalar style. + } + + // The sequence parameters (for YAML_SEQUENCE_NODE). + sequence struct { + items_data []yaml_node_item_t // The stack of sequence items. + style yaml_sequence_style_t // The sequence style. + } + + // The mapping parameters (for yaml_MAPPING_NODE). + mapping struct { + pairs_data []yaml_node_pair_t // The stack of mapping pairs (key, value). + pairs_start *yaml_node_pair_t // The beginning of the stack. + pairs_end *yaml_node_pair_t // The end of the stack. + pairs_top *yaml_node_pair_t // The top of the stack. + style yaml_mapping_style_t // The mapping style. + } + + start_mark yaml_mark_t // The beginning of the node. + end_mark yaml_mark_t // The end of the node. + +} + +// The document structure. +type yaml_document_t struct { + + // The document nodes. + nodes []yaml_node_t + + // The version directive. + version_directive *yaml_version_directive_t + + // The list of tag directives. + tag_directives_data []yaml_tag_directive_t + tag_directives_start int // The beginning of the tag directives list. + tag_directives_end int // The end of the tag directives list. + + start_implicit int // Is the document start indicator implicit? + end_implicit int // Is the document end indicator implicit? + + // The start/end of the document. + start_mark, end_mark yaml_mark_t +} + +// The prototype of a read handler. +// +// The read handler is called when the parser needs to read more bytes from the +// source. The handler should write not more than size bytes to the buffer. +// The number of written bytes should be set to the size_read variable. +// +// [in,out] data A pointer to an application data specified by +// yaml_parser_set_input(). +// [out] buffer The buffer to write the data from the source. +// [in] size The size of the buffer. +// [out] size_read The actual number of bytes read from the source. +// +// On success, the handler should return 1. If the handler failed, +// the returned value should be 0. On EOF, the handler should set the +// size_read to 0 and return 1. +type yaml_read_handler_t func(parser *yaml_parser_t, buffer []byte) (n int, err error) + +// This structure holds information about a potential simple key. +type yaml_simple_key_t struct { + possible bool // Is a simple key possible? + required bool // Is a simple key required? + token_number int // The number of the token. + mark yaml_mark_t // The position mark. +} + +// The states of the parser. +type yaml_parser_state_t int + +const ( + yaml_PARSE_STREAM_START_STATE yaml_parser_state_t = iota + + yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE // Expect the beginning of an implicit document. + yaml_PARSE_DOCUMENT_START_STATE // Expect DOCUMENT-START. + yaml_PARSE_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_PARSE_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_PARSE_BLOCK_NODE_STATE // Expect a block node. + yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE // Expect a block node or indentless sequence. + yaml_PARSE_FLOW_NODE_STATE // Expect a flow node. + yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a block sequence. + yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE // Expect an entry of a block sequence. + yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE // Expect an entry of an indentless sequence. + yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_PARSE_BLOCK_MAPPING_KEY_STATE // Expect a block mapping key. + yaml_PARSE_BLOCK_MAPPING_VALUE_STATE // Expect a block mapping value. + yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE // Expect the first entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE // Expect an entry of a flow sequence. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE // Expect a key of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE // Expect a value of an ordered mapping. + yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE // Expect the and of an ordered mapping entry. + yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_PARSE_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE // Expect an empty value of a flow mapping. + yaml_PARSE_END_STATE // Expect nothing. +) + +func (ps yaml_parser_state_t) String() string { + switch ps { + case yaml_PARSE_STREAM_START_STATE: + return "yaml_PARSE_STREAM_START_STATE" + case yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE: + return "yaml_PARSE_IMPLICIT_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_START_STATE: + return "yaml_PARSE_DOCUMENT_START_STATE" + case yaml_PARSE_DOCUMENT_CONTENT_STATE: + return "yaml_PARSE_DOCUMENT_CONTENT_STATE" + case yaml_PARSE_DOCUMENT_END_STATE: + return "yaml_PARSE_DOCUMENT_END_STATE" + case yaml_PARSE_BLOCK_NODE_STATE: + return "yaml_PARSE_BLOCK_NODE_STATE" + case yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE: + return "yaml_PARSE_BLOCK_NODE_OR_INDENTLESS_SEQUENCE_STATE" + case yaml_PARSE_FLOW_NODE_STATE: + return "yaml_PARSE_FLOW_NODE_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_BLOCK_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_INDENTLESS_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_KEY_STATE: + return "yaml_PARSE_BLOCK_MAPPING_KEY_STATE" + case yaml_PARSE_BLOCK_MAPPING_VALUE_STATE: + return "yaml_PARSE_BLOCK_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_FIRST_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE: + return "yaml_PARSE_FLOW_SEQUENCE_ENTRY_MAPPING_END_STATE" + case yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_FIRST_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_KEY_STATE: + return "yaml_PARSE_FLOW_MAPPING_KEY_STATE" + case yaml_PARSE_FLOW_MAPPING_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_VALUE_STATE" + case yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE: + return "yaml_PARSE_FLOW_MAPPING_EMPTY_VALUE_STATE" + case yaml_PARSE_END_STATE: + return "yaml_PARSE_END_STATE" + } + return "" +} + +// This structure holds aliases data. +type yaml_alias_data_t struct { + anchor []byte // The anchor. + index int // The node id. + mark yaml_mark_t // The anchor mark. +} + +// The parser structure. +// +// All members are internal. Manage the structure using the +// yaml_parser_ family of functions. +type yaml_parser_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + + problem string // Error description. + + // The byte about which the problem occurred. + problem_offset int + problem_value int + problem_mark yaml_mark_t + + // The error context. + context string + context_mark yaml_mark_t + + // Reader stuff + + read_handler yaml_read_handler_t // Read handler. + + input_reader io.Reader // File input data. + input []byte // String input data. + input_pos int + + eof bool // EOF flag + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + unread int // The number of unread characters in the buffer. + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The input encoding. + + offset int // The offset of the current position (in bytes). + mark yaml_mark_t // The mark of the current position. + + // Scanner stuff + + stream_start_produced bool // Have we started to scan the input stream? + stream_end_produced bool // Have we reached the end of the input stream? + + flow_level int // The number of unclosed '[' and '{' indicators. + + tokens []yaml_token_t // The tokens queue. + tokens_head int // The head of the tokens queue. + tokens_parsed int // The number of tokens fetched from the queue. + token_available bool // Does the tokens queue contain a token ready for dequeueing. + + indent int // The current indentation level. + indents []int // The indentation levels stack. + + simple_key_allowed bool // May a simple key occur at the current position? + simple_keys []yaml_simple_key_t // The stack of simple keys. + simple_keys_by_tok map[int]int // possible simple_key indexes indexed by token_number + + // Parser stuff + + state yaml_parser_state_t // The current parser state. + states []yaml_parser_state_t // The parser states stack. + marks []yaml_mark_t // The stack of marks. + tag_directives []yaml_tag_directive_t // The list of TAG directives. + + // Dumper stuff + + aliases []yaml_alias_data_t // The alias data. + + document *yaml_document_t // The currently parsed document. +} + +// Emitter Definitions + +// The prototype of a write handler. +// +// The write handler is called when the emitter needs to flush the accumulated +// characters to the output. The handler should write @a size bytes of the +// @a buffer to the output. +// +// @param[in,out] data A pointer to an application data specified by +// yaml_emitter_set_output(). +// @param[in] buffer The buffer with bytes to be written. +// @param[in] size The size of the buffer. +// +// @returns On success, the handler should return @c 1. If the handler failed, +// the returned value should be @c 0. +// +type yaml_write_handler_t func(emitter *yaml_emitter_t, buffer []byte) error + +type yaml_emitter_state_t int + +// The emitter states. +const ( + // Expect STREAM-START. + yaml_EMIT_STREAM_START_STATE yaml_emitter_state_t = iota + + yaml_EMIT_FIRST_DOCUMENT_START_STATE // Expect the first DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_START_STATE // Expect DOCUMENT-START or STREAM-END. + yaml_EMIT_DOCUMENT_CONTENT_STATE // Expect the content of a document. + yaml_EMIT_DOCUMENT_END_STATE // Expect DOCUMENT-END. + yaml_EMIT_FLOW_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a flow sequence. + yaml_EMIT_FLOW_SEQUENCE_ITEM_STATE // Expect an item of a flow sequence. + yaml_EMIT_FLOW_MAPPING_FIRST_KEY_STATE // Expect the first key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_KEY_STATE // Expect a key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a flow mapping. + yaml_EMIT_FLOW_MAPPING_VALUE_STATE // Expect a value of a flow mapping. + yaml_EMIT_BLOCK_SEQUENCE_FIRST_ITEM_STATE // Expect the first item of a block sequence. + yaml_EMIT_BLOCK_SEQUENCE_ITEM_STATE // Expect an item of a block sequence. + yaml_EMIT_BLOCK_MAPPING_FIRST_KEY_STATE // Expect the first key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_KEY_STATE // Expect the key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_SIMPLE_VALUE_STATE // Expect a value for a simple key of a block mapping. + yaml_EMIT_BLOCK_MAPPING_VALUE_STATE // Expect a value of a block mapping. + yaml_EMIT_END_STATE // Expect nothing. +) + +// The emitter structure. +// +// All members are internal. Manage the structure using the @c yaml_emitter_ +// family of functions. +type yaml_emitter_t struct { + + // Error handling + + error yaml_error_type_t // Error type. + problem string // Error description. + + // Writer stuff + + write_handler yaml_write_handler_t // Write handler. + + output_buffer *[]byte // String output data. + output_writer io.Writer // File output data. + + buffer []byte // The working buffer. + buffer_pos int // The current position of the buffer. + + raw_buffer []byte // The raw buffer. + raw_buffer_pos int // The current position of the buffer. + + encoding yaml_encoding_t // The stream encoding. + + // Emitter stuff + + canonical bool // If the output is in the canonical style? + best_indent int // The number of indentation spaces. + best_width int // The preferred width of the output lines. + unicode bool // Allow unescaped non-ASCII characters? + line_break yaml_break_t // The preferred line break. + + state yaml_emitter_state_t // The current emitter state. + states []yaml_emitter_state_t // The stack of states. + + events []yaml_event_t // The event queue. + events_head int // The head of the event queue. + + indents []int // The stack of indentation levels. + + tag_directives []yaml_tag_directive_t // The list of tag directives. + + indent int // The current indentation level. + + flow_level int // The current flow level. + + root_context bool // Is it the document root context? + sequence_context bool // Is it a sequence context? + mapping_context bool // Is it a mapping context? + simple_key_context bool // Is it a simple mapping key context? + + line int // The current line. + column int // The current column. + whitespace bool // If the last character was a whitespace? + indention bool // If the last character was an indentation character (' ', '-', '?', ':')? + open_ended bool // If an explicit document end is required? + + // Anchor analysis. + anchor_data struct { + anchor []byte // The anchor value. + alias bool // Is it an alias? + } + + // Tag analysis. + tag_data struct { + handle []byte // The tag handle. + suffix []byte // The tag suffix. + } + + // Scalar analysis. + scalar_data struct { + value []byte // The scalar value. + multiline bool // Does the scalar contain line breaks? + flow_plain_allowed bool // Can the scalar be expessed in the flow plain style? + block_plain_allowed bool // Can the scalar be expressed in the block plain style? + single_quoted_allowed bool // Can the scalar be expressed in the single quoted style? + block_allowed bool // Can the scalar be expressed in the literal or folded styles? + style yaml_scalar_style_t // The output style. + } + + // Dumper stuff + + opened bool // If the stream was already opened? + closed bool // If the stream was already closed? + + // The information associated with the document nodes. + anchors *struct { + references int // The number of references. + anchor int // The anchor id. + serialized bool // If the node has been emitted? + } + + last_anchor_id int // The last assigned anchor id. + + document *yaml_document_t // The currently emitted document. +} diff --git a/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlprivateh.go b/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlprivateh.go new file mode 100644 index 000000000..8110ce3c3 --- /dev/null +++ b/vendor/sigs.k8s.io/yaml/goyaml.v2/yamlprivateh.go @@ -0,0 +1,173 @@ +package yaml + +const ( + // The size of the input raw buffer. + input_raw_buffer_size = 512 + + // The size of the input buffer. + // It should be possible to decode the whole raw buffer. + input_buffer_size = input_raw_buffer_size * 3 + + // The size of the output buffer. + output_buffer_size = 128 + + // The size of the output raw buffer. + // It should be possible to encode the whole output buffer. + output_raw_buffer_size = (output_buffer_size*2 + 2) + + // The size of other stacks and queues. + initial_stack_size = 16 + initial_queue_size = 16 + initial_string_size = 16 +) + +// Check if the character at the specified position is an alphabetical +// character, a digit, '_', or '-'. +func is_alpha(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'Z' || b[i] >= 'a' && b[i] <= 'z' || b[i] == '_' || b[i] == '-' +} + +// Check if the character at the specified position is a digit. +func is_digit(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' +} + +// Get the value of a digit. +func as_digit(b []byte, i int) int { + return int(b[i]) - '0' +} + +// Check if the character at the specified position is a hex-digit. +func is_hex(b []byte, i int) bool { + return b[i] >= '0' && b[i] <= '9' || b[i] >= 'A' && b[i] <= 'F' || b[i] >= 'a' && b[i] <= 'f' +} + +// Get the value of a hex-digit. +func as_hex(b []byte, i int) int { + bi := b[i] + if bi >= 'A' && bi <= 'F' { + return int(bi) - 'A' + 10 + } + if bi >= 'a' && bi <= 'f' { + return int(bi) - 'a' + 10 + } + return int(bi) - '0' +} + +// Check if the character is ASCII. +func is_ascii(b []byte, i int) bool { + return b[i] <= 0x7F +} + +// Check if the character at the start of the buffer can be printed unescaped. +func is_printable(b []byte, i int) bool { + return ((b[i] == 0x0A) || // . == #x0A + (b[i] >= 0x20 && b[i] <= 0x7E) || // #x20 <= . <= #x7E + (b[i] == 0xC2 && b[i+1] >= 0xA0) || // #0xA0 <= . <= #xD7FF + (b[i] > 0xC2 && b[i] < 0xED) || + (b[i] == 0xED && b[i+1] < 0xA0) || + (b[i] == 0xEE) || + (b[i] == 0xEF && // #xE000 <= . <= #xFFFD + !(b[i+1] == 0xBB && b[i+2] == 0xBF) && // && . != #xFEFF + !(b[i+1] == 0xBF && (b[i+2] == 0xBE || b[i+2] == 0xBF)))) +} + +// Check if the character at the specified position is NUL. +func is_z(b []byte, i int) bool { + return b[i] == 0x00 +} + +// Check if the beginning of the buffer is a BOM. +func is_bom(b []byte, i int) bool { + return b[0] == 0xEF && b[1] == 0xBB && b[2] == 0xBF +} + +// Check if the character at the specified position is space. +func is_space(b []byte, i int) bool { + return b[i] == ' ' +} + +// Check if the character at the specified position is tab. +func is_tab(b []byte, i int) bool { + return b[i] == '\t' +} + +// Check if the character at the specified position is blank (space or tab). +func is_blank(b []byte, i int) bool { + //return is_space(b, i) || is_tab(b, i) + return b[i] == ' ' || b[i] == '\t' +} + +// Check if the character at the specified position is a line break. +func is_break(b []byte, i int) bool { + return (b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9) // PS (#x2029) +} + +func is_crlf(b []byte, i int) bool { + return b[i] == '\r' && b[i+1] == '\n' +} + +// Check if the character is a line break or NUL. +func is_breakz(b []byte, i int) bool { + //return is_break(b, i) || is_z(b, i) + return ( // is_break: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + // is_z: + b[i] == 0) +} + +// Check if the character is a line break, space, or NUL. +func is_spacez(b []byte, i int) bool { + //return is_space(b, i) || is_breakz(b, i) + return ( // is_space: + b[i] == ' ' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Check if the character is a line break, space, tab, or NUL. +func is_blankz(b []byte, i int) bool { + //return is_blank(b, i) || is_breakz(b, i) + return ( // is_blank: + b[i] == ' ' || b[i] == '\t' || + // is_breakz: + b[i] == '\r' || // CR (#xD) + b[i] == '\n' || // LF (#xA) + b[i] == 0xC2 && b[i+1] == 0x85 || // NEL (#x85) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA8 || // LS (#x2028) + b[i] == 0xE2 && b[i+1] == 0x80 && b[i+2] == 0xA9 || // PS (#x2029) + b[i] == 0) +} + +// Determine the width of the character. +func width(b byte) int { + // Don't replace these by a switch without first + // confirming that it is being inlined. + if b&0x80 == 0x00 { + return 1 + } + if b&0xE0 == 0xC0 { + return 2 + } + if b&0xF0 == 0xE0 { + return 3 + } + if b&0xF8 == 0xF0 { + return 4 + } + return 0 + +} diff --git a/vendor/sigs.k8s.io/yaml/yaml.go b/vendor/sigs.k8s.io/yaml/yaml.go index efbc535d4..fc10246bd 100644 --- a/vendor/sigs.k8s.io/yaml/yaml.go +++ b/vendor/sigs.k8s.io/yaml/yaml.go @@ -1,3 +1,19 @@ +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package yaml import ( @@ -8,56 +24,59 @@ import ( "reflect" "strconv" - "gopkg.in/yaml.v2" + "sigs.k8s.io/yaml/goyaml.v2" ) -// Marshal marshals the object into JSON then converts JSON to YAML and returns the -// YAML. -func Marshal(o interface{}) ([]byte, error) { - j, err := json.Marshal(o) +// Marshal marshals obj into JSON using stdlib json.Marshal, and then converts JSON to YAML using JSONToYAML (see that method for more reference) +func Marshal(obj interface{}) ([]byte, error) { + jsonBytes, err := json.Marshal(obj) if err != nil { - return nil, fmt.Errorf("error marshaling into JSON: %v", err) + return nil, fmt.Errorf("error marshaling into JSON: %w", err) } - y, err := JSONToYAML(j) - if err != nil { - return nil, fmt.Errorf("error converting JSON to YAML: %v", err) - } - - return y, nil + return JSONToYAML(jsonBytes) } // JSONOpt is a decoding option for decoding from JSON format. type JSONOpt func(*json.Decoder) *json.Decoder -// Unmarshal converts YAML to JSON then uses JSON to unmarshal into an object, -// optionally configuring the behavior of the JSON unmarshal. -func Unmarshal(y []byte, o interface{}, opts ...JSONOpt) error { - return yamlUnmarshal(y, o, false, opts...) +// Unmarshal first converts the given YAML to JSON, and then unmarshals the JSON into obj. Options for the +// standard library json.Decoder can be optionally specified, e.g. to decode untyped numbers into json.Number instead of float64, or to disallow unknown fields (but for that purpose, see also UnmarshalStrict). obj must be a non-nil pointer. +// +// Important notes about the Unmarshal logic: +// +// - Decoding is case-insensitive, unlike the rest of Kubernetes API machinery, as this is using the stdlib json library. This might be confusing to users. +// - This decodes any number (although it is an integer) into a float64 if the type of obj is unknown, e.g. *map[string]interface{}, *interface{}, or *[]interface{}. This means integers above +/- 2^53 will lose precision when round-tripping. Make a JSONOpt that calls d.UseNumber() to avoid this. +// - Duplicate fields, including in-case-sensitive matches, are ignored in an undefined order. Note that the YAML specification forbids duplicate fields, so this logic is more permissive than it needs to. See UnmarshalStrict for an alternative. +// - Unknown fields, i.e. serialized data that do not map to a field in obj, are ignored. Use d.DisallowUnknownFields() or UnmarshalStrict to override. +// - As per the YAML 1.1 specification, which yaml.v2 used underneath implements, literal 'yes' and 'no' strings without quotation marks will be converted to true/false implicitly. +// - YAML non-string keys, e.g. ints, bools and floats, are converted to strings implicitly during the YAML to JSON conversion process. +// - There are no compatibility guarantees for returned error values. +func Unmarshal(yamlBytes []byte, obj interface{}, opts ...JSONOpt) error { + return unmarshal(yamlBytes, obj, yaml.Unmarshal, opts...) } -// UnmarshalStrict strictly converts YAML to JSON then uses JSON to unmarshal -// into an object, optionally configuring the behavior of the JSON unmarshal. -func UnmarshalStrict(y []byte, o interface{}, opts ...JSONOpt) error { - return yamlUnmarshal(y, o, true, append(opts, DisallowUnknownFields)...) +// UnmarshalStrict is similar to Unmarshal (please read its documentation for reference), with the following exceptions: +// +// - Duplicate fields in an object yield an error. This is according to the YAML specification. +// - If obj, or any of its recursive children, is a struct, presence of fields in the serialized data unknown to the struct will yield an error. +func UnmarshalStrict(yamlBytes []byte, obj interface{}, opts ...JSONOpt) error { + return unmarshal(yamlBytes, obj, yaml.UnmarshalStrict, append(opts, DisallowUnknownFields)...) } -// yamlUnmarshal unmarshals the given YAML byte stream into the given interface, +// unmarshal unmarshals the given YAML byte stream into the given interface, // optionally performing the unmarshalling strictly -func yamlUnmarshal(y []byte, o interface{}, strict bool, opts ...JSONOpt) error { - vo := reflect.ValueOf(o) - unmarshalFn := yaml.Unmarshal - if strict { - unmarshalFn = yaml.UnmarshalStrict - } - j, err := yamlToJSON(y, &vo, unmarshalFn) +func unmarshal(yamlBytes []byte, obj interface{}, unmarshalFn func([]byte, interface{}) error, opts ...JSONOpt) error { + jsonTarget := reflect.ValueOf(obj) + + jsonBytes, err := yamlToJSONTarget(yamlBytes, &jsonTarget, unmarshalFn) if err != nil { - return fmt.Errorf("error converting YAML to JSON: %v", err) + return fmt.Errorf("error converting YAML to JSON: %w", err) } - err = jsonUnmarshal(bytes.NewReader(j), o, opts...) + err = jsonUnmarshal(bytes.NewReader(jsonBytes), obj, opts...) if err != nil { - return fmt.Errorf("error unmarshaling JSON: %v", err) + return fmt.Errorf("error unmarshaling JSON: %w", err) } return nil @@ -67,21 +86,26 @@ func yamlUnmarshal(y []byte, o interface{}, strict bool, opts ...JSONOpt) error // object, optionally applying decoder options prior to decoding. We are not // using json.Unmarshal directly as we want the chance to pass in non-default // options. -func jsonUnmarshal(r io.Reader, o interface{}, opts ...JSONOpt) error { - d := json.NewDecoder(r) +func jsonUnmarshal(reader io.Reader, obj interface{}, opts ...JSONOpt) error { + d := json.NewDecoder(reader) for _, opt := range opts { d = opt(d) } - if err := d.Decode(&o); err != nil { + if err := d.Decode(&obj); err != nil { return fmt.Errorf("while decoding JSON: %v", err) } return nil } -// JSONToYAML Converts JSON to YAML. +// JSONToYAML converts JSON to YAML. Notable implementation details: +// +// - Duplicate fields, are case-sensitively ignored in an undefined order. +// - The sequence indentation style is compact, which means that the "- " marker for a YAML sequence will be on the same indentation level as the sequence field name. +// - Unlike Unmarshal, all integers, up to 64 bits, are preserved during this round-trip. func JSONToYAML(j []byte) ([]byte, error) { // Convert the JSON to an object. var jsonObj interface{} + // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the // Go JSON library doesn't try to pick the right number type (int, float, // etc.) when unmarshalling to interface{}, it just picks float64 @@ -93,35 +117,46 @@ func JSONToYAML(j []byte) ([]byte, error) { } // Marshal this object into YAML. - return yaml.Marshal(jsonObj) + yamlBytes, err := yaml.Marshal(jsonObj) + if err != nil { + return nil, err + } + + return yamlBytes, nil } // YAMLToJSON converts YAML to JSON. Since JSON is a subset of YAML, // passing JSON through this method should be a no-op. // -// Things YAML can do that are not supported by JSON: -// * In YAML you can have binary and null keys in your maps. These are invalid -// in JSON. (int and float keys are converted to strings.) -// * Binary data in YAML with the !!binary tag is not supported. If you want to -// use binary data with this library, encode the data as base64 as usual but do -// not use the !!binary tag in your YAML. This will ensure the original base64 -// encoded data makes it all the way through to the JSON. +// Some things YAML can do that are not supported by JSON: +// - In YAML you can have binary and null keys in your maps. These are invalid +// in JSON, and therefore int, bool and float keys are converted to strings implicitly. +// - Binary data in YAML with the !!binary tag is not supported. If you want to +// use binary data with this library, encode the data as base64 as usual but do +// not use the !!binary tag in your YAML. This will ensure the original base64 +// encoded data makes it all the way through to the JSON. +// - And more... read the YAML specification for more details. +// +// Notable about the implementation: // -// For strict decoding of YAML, use YAMLToJSONStrict. +// - Duplicate fields are case-sensitively ignored in an undefined order. Note that the YAML specification forbids duplicate fields, so this logic is more permissive than it needs to. See YAMLToJSONStrict for an alternative. +// - As per the YAML 1.1 specification, which yaml.v2 used underneath implements, literal 'yes' and 'no' strings without quotation marks will be converted to true/false implicitly. +// - Unlike Unmarshal, all integers, up to 64 bits, are preserved during this round-trip. +// - There are no compatibility guarantees for returned error values. func YAMLToJSON(y []byte) ([]byte, error) { - return yamlToJSON(y, nil, yaml.Unmarshal) + return yamlToJSONTarget(y, nil, yaml.Unmarshal) } // YAMLToJSONStrict is like YAMLToJSON but enables strict YAML decoding, // returning an error on any duplicate field names. func YAMLToJSONStrict(y []byte) ([]byte, error) { - return yamlToJSON(y, nil, yaml.UnmarshalStrict) + return yamlToJSONTarget(y, nil, yaml.UnmarshalStrict) } -func yamlToJSON(y []byte, jsonTarget *reflect.Value, yamlUnmarshal func([]byte, interface{}) error) ([]byte, error) { +func yamlToJSONTarget(yamlBytes []byte, jsonTarget *reflect.Value, unmarshalFn func([]byte, interface{}) error) ([]byte, error) { // Convert the YAML to an object. var yamlObj interface{} - err := yamlUnmarshal(y, &yamlObj) + err := unmarshalFn(yamlBytes, &yamlObj) if err != nil { return nil, err } @@ -136,7 +171,11 @@ func yamlToJSON(y []byte, jsonTarget *reflect.Value, yamlUnmarshal func([]byte, } // Convert this object to JSON and return the data. - return json.Marshal(jsonObj) + jsonBytes, err := json.Marshal(jsonObj) + if err != nil { + return nil, err + } + return jsonBytes, nil } func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) { @@ -147,13 +186,13 @@ func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (in // decoding into the value, we're just checking if the ultimate target is a // string. if jsonTarget != nil { - ju, tu, pv := indirect(*jsonTarget, false) + jsonUnmarshaler, textUnmarshaler, pointerValue := indirect(*jsonTarget, false) // We have a JSON or Text Umarshaler at this level, so we can't be trying // to decode into a string. - if ju != nil || tu != nil { + if jsonUnmarshaler != nil || textUnmarshaler != nil { jsonTarget = nil } else { - jsonTarget = &pv + jsonTarget = &pointerValue } } @@ -205,7 +244,7 @@ func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (in keyString = "false" } default: - return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v", + return nil, fmt.Errorf("unsupported map key of type: %s, key: %+#v, value: %+#v", reflect.TypeOf(k), k, v) } diff --git a/vendor/sigs.k8s.io/yaml/yaml_go110.go b/vendor/sigs.k8s.io/yaml/yaml_go110.go index ab3e06a22..94abc1719 100644 --- a/vendor/sigs.k8s.io/yaml/yaml_go110.go +++ b/vendor/sigs.k8s.io/yaml/yaml_go110.go @@ -1,7 +1,24 @@ // This file contains changes that are only compatible with go 1.10 and onwards. +//go:build go1.10 // +build go1.10 +/* +Copyright 2021 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package yaml import "encoding/json"